patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patches queued to stable release 20.11.4
@ 2021-11-10  6:28 Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/i40e: support 25G AOC/ACC cables' has been " Xueming Li
                   ` (252 more replies)
  0 siblings, 253 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Xueming Li; +Cc: Luca Boccassi, dpdk stable

Patches from 21.11-rc0 to 21.11-rc2 have been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed in December.

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---

Ajit Khaparde (5):
  net/bnxt: update ring group after ring stop start
  net/bnxt: fix Tx queue startup state
  net/bnxt: fix memzone free for Tx and Rx rings
  net/bnxt: fix tunnel port accounting
  doc: update NIC feature matrix for bnxt

Alexander Kozyrev (1):
  net/mlx5: fix mbuf replenishment check for zipped CQE

Alvin Zhang (3):
  app/testpmd: update forward engine beginning
  app/testpmd: fix txonly forwarding
  net/i40e: fix Rx packet statistics

Anatoly Burakov (3):
  vfio: fix FreeBSD clear group stub
  vfio: fix FreeBSD documentation
  vfio: set errno on unsupported OS

Andrew Rybchenko (4):
  mempool: deprecate unused physical page defines
  drivers/net: remove queue xstats auto-fill flag
  ethdev: forbid closing started device
  common/sfc_efx: fix debug compilation control

Anoob Joseph (1):
  examples/ipsec-secgw: fix parsing of flow queue

Arek Kusztal (2):
  crypto/qat: fix status in RSA decryption
  crypto/qat: fix uncleared cookies after operation

Baruch Siach (1):
  net/af_xdp: fix zero-copy Tx queue drain

Ben Magistro (1):
  doc: fix bonding driver name

Ben Pfaff (1):
  doc: fix numbers power of 2 in LPM6 guide

Bing Zhao (1):
  net/mlx5: fix flow tables double release

Bruce Richardson (4):
  usertools: fix handling EOF for telemetry input pipe
  eal/freebsd: lock memory device to prevent conflicts
  test/mem: fix memory autotests on FreeBSD
  eal/freebsd: ignore in-memory option

Chengchang Tang (4):
  net/hns3: fix queue flow action validation
  net/hns3: fix taskqueue pair reset command
  net/bonding: fix dedicated queue mode in vector burst
  net/bonding: fix RSS key length

Chengfeng Ye (1):
  net/axgbe: fix unreleased lock in I2C transfer

Chengwen Feng (1):
  kni: check error code of allmulticast mode switch

Cian Ferriter (1):
  ring: fix Doxygen comment of internal function

Ciara Loftus (1):
  net/af_xdp: disable secondary process support

Ciara Power (3):
  crypto/openssl: fix CCM processing 0 length source
  examples/fips_validation: remove unused allocation
  examples/fips_validation: fix resetting pointer

Conor Walsh (1):
  eal: fix memory leak when saving arguments

Danny Patel (1):
  crypto/octeontx2: fix unaligned access to device memory

Dapeng Yu (9):
  net/ice/base: fix PF ID for DCF
  net/bonding: fix memory leak on closing device
  net/ice: fix double free ACL flow entry
  net/ice: retry getting VF VSI map after failure
  net/ice: fix deadlock on flow redirect
  net/ice: fix function pointer in multi-process
  net/iavf: fix shared data in multi-process
  net/ice: save rule on switch filter creation
  net/ice: fix flow redirect

David Christensen (3):
  eal/ppc: ignore GCC 10 stringop-overflow warnings
  config/ppc: ignore GCC 11 psabi warnings
  test/atomic: fix 128-bit atomic test with many cores

David Marchand (13):
  net/virtio: avoid unneeded link interrupt configuration
  net/virtio-user: fix Rx interrupts with multi-queue
  net/virtio: do not use PMD log type
  bus/vmbus: fix leak on device scan
  test/latency: fix loop boundary
  test/service: fix race in attr check
  eal/x86: fix some CPU extended features definitions
  mbuf: enforce no option for dynamic fields and flags
  usertools/pmdinfo: fix plugin auto scan
  doc: fix default mempool option in guides
  test/cmdline: fix memory leak
  eal/linux: fix uevent message parsing
  app/testpmd: remove double dependency on bitrate lib

Dmitry Kozlyuk (9):
  net/mlx5: fix eCPRI matching
  build: propagate Windows system dependencies to pkg-config
  net/mlx5: fix shared RSS destruction
  eal: remove Windows-specific list of common files
  eal/windows: do not install virt2phys header
  net/mlx5: fix Rx queue resource cleanup
  net/mlx5: close tools socket with last device
  eal/windows: fix IOVA mode detection and handling
  eal/freebsd: fix IOVA mode selection

Eli Britstein (6):
  app/testpmd: add tunnel types
  net/mlx5: support more tunnel types
  app/testpmd: fix packet burst spreading stats
  net: avoid cast-align warning in VLAN insert function
  mbuf: avoid cast-align warning in data offset macro
  eal/x86: avoid cast-align warning in memcpy functions

Eugenio Pérez (1):
  vhost: clean IOTLB cache on vring stop

Fan Zhang (1):
  examples/fips_validation: fix device start

Feifei Wang (2):
  drivers/net: fix typo in vector Rx comment
  drivers/net: fix vector Rx comments

Ferruh Yigit (3):
  net/softnic: fix useless address check
  net/i40e: fix 32-bit build
  ethdev: fix crash on owner delete

Gagandeep Singh (3):
  common/dpaax/caamflib: fix IV for short MAC-I in SNOW3G
  common/dpaax: fix physical address conversion
  cryptodev: fix multi-segment raw vector processing

Gaoxiang Liu (3):
  vhost: fix crash on port deletion
  net/virtio: fix repeated freeing of virtqueue
  vhost: log socket path on adding connection

Georg Sauthoff (1):
  net: fix aliasing in checksum computation

Gowrishankar Muthukrishnan (1):
  telemetry: fix JSON output buffer length

Gregory Etelson (1):
  common/mlx5: fix flex parser DevX creation routine

Haiyue Wang (1):
  net/ice: fix memzone leak after device init failure

Hanumanth Reddy Pothula (1):
  net/octeontx2: fix MTU when PTP is enabled

Harman Kalra (1):
  net/octeontx: fix access to indirect buffers

Harry van Haaren (1):
  app/eventdev: fix terminal colour after control-c exit

Heinrich Kuhn (1):
  net/nfp: fix minimum descriptor sizes

Honnappa Nagarahalli (1):
  eal: reset lcore task callback and argument

Huichao Cai (2):
  ip_frag: fix fragmenting IPv4 fragment
  ip_frag: revert fix fragmenting IPv4 fragment

Huisong Li (8):
  net/hns3: fix input parameters of MAC functions
  app/testpmd: retain all original dev conf when config DCB
  ethdev: fix PCI device release in secondary process
  net/hns3: fix secondary process reference count
  net/hns3: fix multi-process action register and unregister
  net/hns3: unregister MP action on close for secondary
  net/hns3: simplify queue DMA address arithmetic
  app/testpmd: remove unused header file

Hyong Youb Kim (2):
  net/enic: fix filter mode detection
  net/enic: avoid error message when no advanced filtering

Ilyes Ben Hamouda (1):
  malloc: fix allocation with unknown socket ID

Ivan Ilchenko (7):
  net/virtio: fix mbuf count on Rx queue setup
  net/virtio: fix split queue vectorized Rx
  net/virtio: fix device configure without jumbo Rx offload
  net/virtio: fix Tx cleanup functions to have same signature
  net/virtio: fix Tx completed mbuf leak on device stop
  ethdev: fix xstats by ID API documentation
  net/virtio: fix link update in speed feature

Ivan Malov (1):
  net/sfc: set FDIR bit for flow mark in EF100 Rx

Jerin Jacob (1):
  examples/performance-thread: fix build with clang 12.0.1

Jiawen Wu (3):
  net/txgbe: fix reading SFP module SFF-8472 data
  net/txgbe: fix to get interrupt status
  net/txgbe: fix packet statistics

Jie Wang (2):
  net/ice: fix queue config in DCF
  net/i40e: fix forward outer IPv6 VXLAN

Jim Harris (2):
  eal/linux: remove unused variable for socket memory
  test/compress-perf: remove unused variable

Joyce Kong (3):
  test/func_reentrancy: free memzones after test
  ethdev: fix typo in Rx queue setup API comment
  test/service: fix some comment

Julien Meunier (2):
  stack: fix reload head when pop fails
  net/ixgbe: fix queue release

Junxiao Shi (1):
  net/memif: fix chained mbuf determination

Kai Ji (1):
  test/crypto: fix max length for raw data path

Kalesh AP (5):
  net/bnxt: fix mbuf VLAN in scalar Rx
  net/bnxt: check FW capability for VLAN offloads
  net/bnxt: fix ring group free
  net/bnxt: fix double allocation of ring groups
  net/bnxt: fix function driver register/unregister

Kevin Traynor (2):
  bitrate: fix registration to match API description
  bitrate: fix calculation to match API description

Konstantin Ananyev (2):
  test/bpf: fix undefined behavior with clang
  test: fix ring PMD initialisation

Lance Richardson (1):
  net: fix checksum API documentation

Leyi Rong (1):
  net/ice: fix generic build on FreeBSD

Li Feng (1):
  vhost: add sanity check on inflight last index

Long Li (1):
  bus/vmbus: fix ring buffer mapping in secondary process

Maciej Szwed (1):
  interrupt: fix request notifier interrupt processing

Maxime Coquelin (3):
  app/testpmd: fix RSS key length
  app/testpmd: fix RSS type display
  net/mlx5: fix RSS RETA update

Michael Baum (4):
  net/mlx5: fix memory leak on context allocation failure
  common/mlx5: remove unreachable branch in UAR allocation
  common/mlx5: fix UAR allocation diagnostics messages
  net/mlx5: remove duplicated reference of Tx doorbell

Michal Krawczyk (3):
  net/ena: fix offload capabilities verification
  net/ena: fix per-queue offload capabilities
  net/ena: advertise scattered Rx capability

Min Hu (Connor) (1):
  net/hns3: fix mailbox communication with HW

Mohamad Noor Alim Hussin (1):
  raw/ifpga/base: fix linking with librt

Mohsin Kazmi (1):
  net: fix checksum offload for outer IPv4

Naga Harish K S V (1):
  eventdev/eth_rx: fix WRR buffer overrun

Narcisa Vasile (1):
  eal/windows: fix CPU cores counting

Nithin Dabilpuram (2):
  app/testpmd: fix check without outer checksum
  app/testpmd: fix dump of Tx offload flags

Olivier Matz (4):
  kvargs: fix comments style
  mbuf: fix reset on mbuf free
  test/mbuf: fix access to freed memory
  mem: fix dynamic hugepage mapping in container

Pallavi Kadam (2):
  bus/pci: fix unknown NUMA node value on Windows
  bus/pci: fix unknown NUMA node value on Windows

Przemyslaw Zegan (2):
  app/crypto-perf: fix AAD template copy overrun
  common/qat: fix queue pairs number

Qi Zhang (4):
  net/ice/base: fix typo in comment
  net/ice: fix RXDID default value in DCF
  net/ice: fix performance with writeback policy
  net/ice/base: calculate logical PF ID

Qiming Chen (17):
  net/ixgbe: fix Rx multicast statistics after reset
  net/pcap: fix resource leakage on port probe
  net/ixgbe: fix hash handle leak
  net/ixgbe: fix queue resource leak
  net/ixgbe: fix MAC resource leak
  net/ixgbe: fix mbuf leak
  net/i40e: fix mbuf leak
  net/i40e: fix device startup resource release
  net/iavf: fix mbuf leak
  net/i40e/base: fix resource leakage
  net/iavf: fix Rx queue buffer size alignment
  net/iavf: fix mbuf leak
  net/iavf: fix high CPU usage on frequent command
  net/iavf: fix Rx queue IRQ resource leak
  common/iavf: fix ARQ resource leak
  net/i40e: fix buffer size alignment
  net/i40evf: extend the polling times of vf reset

Radu Nicolau (1):
  examples/ipsec-secgw: move global array from header

Rebecca Troy (1):
  test/compress: fix buffer overflow

Robin Zhang (7):
  net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters
  net/i40e/base: fix PF reset
  net/i40e/base: fix update link data for X722
  net/i40e/base: fix AOC media type
  net/i40e/base: fix function name in comments
  net/i40e/base: fix potentially uninitialized variables
  net/i40e/base: fix using checksum before check

Ruifeng Wang (2):
  examples/service_cores: fix lcore count check
  net/i40e: fix risk in descriptor read in NEON Rx

Shijith Thotton (2):
  test/event_crypto: fix event crypto metadata write
  test/event: fix timer adapter creation test

Simei Su (1):
  net/ice: fix max entry number for ACL normal priority

Somnath Kotur (1):
  net/bnxt: fix crash after port stop/start

Stephen Hemminger (3):
  mbuf: fix typo in comment
  bpf: allow self-xor operation
  net/bnxt: fix firmware version query

Sunil Kumar Kori (1):
  app/testpmd: fix access to DSCP table entries

Tal Shnaiderman (2):
  net/mlx5: fix software parsing support query
  net/mlx5: fix tunneling support query

Thomas Monjalon (1):
  devtools: fix letter case check in commit title

Tudor Cornea (1):
  net/iavf: fix overflow in maximum packet length config

Viacheslav Galaktionov (2):
  net/sfc: free MAE lock once switch domain is assigned
  net/sfc: update comment about representor support

Viacheslav Ovsiienko (1):
  app/testpmd: fix hex string parser in flow commands

Vladimir Medvedkin (4):
  test/hash: fix buffer overflow with jhash
  hash: fix Doxygen comment of Toeplitz file
  lpm6: fix buffer overflow
  rib: fix IPv6 depth mask

William Tu (2):
  eal/windows: export version function
  doc: fix emulated device names in e1000 guide

Xuan Ding (2):
  net/virtio: fix indirect descriptor reconnection
  net/virtio: fix avail descriptor ID

Xueming Li (8):
  sched: get 64-bit greatest common divisor
  vdpa/mlx5: fix large VM memory region registration
  vdpa/mlx5: workaround FW first completion in start
  vdpa/mlx5: retry VAR allocation during vDPA restart
  common/mlx5: fix physical port name recognition
  eal: fix device iterator when no bus is selected
  net/mlx5: fix Altivec Rx
  net/mlx5: fix Rx queue memory allocation return value

Yogesh Jangra (1):
  pipeline: fix instruction label check

Yu Wenjun (1):
  net/ice: fix deadlock on flow query

Yunjian Wang (4):
  net/e1000: fix memzone leak on queue re-configure
  net/ice: fix memzone leak on queue re-configure
  net/i40e: fix memzone leak on queue re-configure
  net/ixgbe: fix memzone leak on queue re-configure

Yury Kylulin (1):
  net/i40e: support 25G AOC/ACC cables

Zhihong Peng (4):
  cmdline: free on exit
  net/virtio: fix check scatter on all Rx queues
  pipeline: fix build with ASan
  examples/performance-thread: fix build with ASan

Zhihong Wang (1):
  app/testpmd: fix Tx retry in flowgen engine

 .../comp_perf_test_cyclecount.c               |   2 -
 app/test-crypto-perf/cperf_test_vectors.c     |   4 +
 app/test-eventdev/test_perf_common.c          |   2 +-
 app/test-pmd/cmdline_flow.c                   |   5 +-
 app/test-pmd/cmdline_mtr.c                    |   6 +-
 app/test-pmd/config.c                         |  22 +-
 app/test-pmd/csumonly.c                       |   3 +-
 app/test-pmd/flowgen.c                        |   6 +-
 app/test-pmd/ieee1588fwd.c                    |   3 +-
 app/test-pmd/meson.build                      |  19 +-
 app/test-pmd/noisy_vnf.c                      |   4 +-
 app/test-pmd/parameters.c                     |   3 -
 app/test-pmd/testpmd.c                        |  46 ++-
 app/test-pmd/testpmd.h                        |   4 +-
 app/test-pmd/txonly.c                         |  70 +++-
 app/test-pmd/util.c                           |   6 +-
 app/test/sample_packet_forward.c              |  29 ++
 app/test/sample_packet_forward.h              |   3 +
 app/test/test.c                               |   1 -
 app/test/test_atomic.c                        |   2 +-
 app/test/test_bitratestats.c                  |  12 +-
 app/test/test_bpf.c                           |  31 +-
 app/test/test_cmdline_lib.c                   |   3 +-
 app/test/test_compressdev.c                   |   6 +-
 app/test/test_cryptodev.c                     |  32 +-
 app/test/test_event_crypto_adapter.c          |  21 +-
 app/test/test_event_timer_adapter.c           |   2 -
 app/test/test_func_reentrancy.c               |  35 +-
 app/test/test_hash.c                          |  35 +-
 app/test/test_latencystats.c                  |  14 +-
 app/test/test_mbuf.c                          | 113 ++++++-
 app/test/test_memory.c                        |   3 +-
 app/test/test_pdump.c                         |  12 +-
 app/test/test_service_cores.c                 |  10 +-
 config/meson.build                            |  13 +-
 config/ppc/meson.build                        |   8 +
 devtools/check-git-log.sh                     |   4 +-
 doc/guides/contributing/documentation.rst     |   4 +-
 doc/guides/freebsd_gsg/build_sample_apps.rst  |   2 +-
 doc/guides/linux_gsg/build_sample_apps.rst    |   2 +-
 doc/guides/linux_gsg/eal_args.include.rst     |   2 +-
 doc/guides/nics/e1000em.rst                   |   4 +-
 doc/guides/nics/features/bnxt.ini             |   3 +
 .../link_bonding_poll_mode_drv_lib.rst        |   2 +-
 doc/guides/prog_guide/lpm6_lib.rst            |   4 +-
 doc/guides/rel_notes/deprecation.rst          |   3 +
 drivers/bus/pci/windows/pci.c                 |   2 +
 drivers/bus/vmbus/linux/vmbus_bus.c           |   6 +-
 drivers/bus/vmbus/linux/vmbus_uio.c           |  99 +++---
 drivers/bus/vmbus/private.h                   |  15 +-
 drivers/bus/vmbus/vmbus_channel.c             |   4 +-
 drivers/bus/vmbus/vmbus_common_uio.c          |  52 ++-
 drivers/common/dpaax/caamflib/desc/pdcp.h     |   7 +-
 drivers/common/dpaax/dpaax_iova_table.h       |   8 +-
 drivers/common/iavf/iavf_adminq.c             |   6 +-
 drivers/common/mlx5/linux/mlx5_common_os.c    |  32 +-
 drivers/common/mlx5/linux/mlx5_nl.c           |   3 +
 drivers/common/mlx5/mlx5_common.c             |  26 +-
 drivers/common/mlx5/mlx5_common.h             |   2 +
 drivers/common/mlx5/mlx5_devx_cmds.c          |   9 +-
 .../qat/qat_adf/adf_transport_access_macros.h |   2 +-
 drivers/common/sfc_efx/efsys.h                |   4 +-
 .../crypto/octeontx2/otx2_cryptodev_mbox.c    |   2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      |   4 +-
 drivers/crypto/qat/qat_asym.c                 |  43 ++-
 drivers/net/af_xdp/rte_eth_af_xdp.c           |  19 +-
 drivers/net/axgbe/axgbe_i2c.c                 |   2 +
 drivers/net/bnx2x/bnx2x_ethdev.c              |   1 -
 drivers/net/bnxt/bnxt.h                       |   6 +-
 drivers/net/bnxt/bnxt_ethdev.c                |  30 +-
 drivers/net/bnxt/bnxt_hwrm.c                  |  34 +-
 drivers/net/bnxt/bnxt_hwrm.h                  |   2 +-
 drivers/net/bnxt/bnxt_ring.c                  |   6 +
 drivers/net/bnxt/bnxt_rxr.c                   |   8 +
 drivers/net/bnxt/bnxt_rxr.h                   |  10 +
 drivers/net/bnxt/bnxt_txq.c                   |   5 -
 drivers/net/bnxt/bnxt_txr.c                   |   3 +
 drivers/net/bonding/rte_eth_bond_8023ad.c     |  32 +-
 drivers/net/bonding/rte_eth_bond_api.c        |   6 +
 drivers/net/bonding/rte_eth_bond_pmd.c        |  49 +--
 drivers/net/dpaa/dpaa_ethdev.c                |   2 -
 drivers/net/e1000/em_ethdev.c                 |   1 -
 drivers/net/e1000/em_rxtx.c                   |   8 +-
 drivers/net/e1000/igb_ethdev.c                |   2 -
 drivers/net/e1000/igb_rxtx.c                  |   9 +-
 drivers/net/ena/ena_ethdev.c                  | 303 ++++++++++++++----
 drivers/net/ena/ena_ethdev.h                  |   5 +-
 drivers/net/enetc/enetc_ethdev.c              |   2 -
 drivers/net/enic/base/vnic_dev.c              |  15 +-
 drivers/net/enic/enic_ethdev.c                |   1 -
 drivers/net/enic/enic_vf_representor.c        |   3 +-
 drivers/net/fm10k/fm10k_rxtx_vec.c            |   6 +-
 drivers/net/hns3/hns3_cmd.h                   |   3 +-
 drivers/net/hns3/hns3_ethdev.c                | 107 ++++---
 drivers/net/hns3/hns3_ethdev_vf.c             |  19 +-
 drivers/net/hns3/hns3_flow.c                  |   8 +-
 drivers/net/hns3/hns3_mbx.c                   |   3 +
 drivers/net/hns3/hns3_mp.c                    |  46 +--
 drivers/net/hns3/hns3_mp.h                    |   9 +-
 drivers/net/hns3/hns3_rxtx.c                  |   6 +-
 drivers/net/i40e/base/i40e_adminq.c           |  12 +-
 drivers/net/i40e/base/i40e_adminq_cmd.h       |   6 +-
 drivers/net/i40e/base/i40e_common.c           |  36 ++-
 drivers/net/i40e/base/i40e_dcb.c              |   2 +-
 drivers/net/i40e/base/i40e_lan_hmc.c          |   2 +-
 drivers/net/i40e/base/i40e_nvm.c              |   7 +-
 drivers/net/i40e/base/i40e_type.h             |   8 +-
 drivers/net/i40e/i40e_ethdev.c                |  27 +-
 drivers/net/i40e/i40e_ethdev.h                |  10 +
 drivers/net/i40e/i40e_ethdev_vf.c             |   4 +-
 drivers/net/i40e/i40e_fdir.c                  |   3 -
 drivers/net/i40e/i40e_flow.c                  |   3 +
 drivers/net/i40e/i40e_rxtx.c                  |  13 +-
 drivers/net/i40e/i40e_rxtx.h                  |   2 +
 drivers/net/i40e/i40e_rxtx_vec_altivec.c      |  10 +-
 drivers/net/i40e/i40e_rxtx_vec_neon.c         |  18 +-
 drivers/net/i40e/i40e_rxtx_vec_sse.c          |   6 +-
 drivers/net/i40e/i40e_vf_representor.c        |   3 +-
 drivers/net/iavf/iavf.h                       |   2 +-
 drivers/net/iavf/iavf_ethdev.c                |  28 +-
 drivers/net/iavf/iavf_rxtx.c                  |  35 +-
 drivers/net/iavf/iavf_rxtx.h                  |   2 +-
 drivers/net/iavf/iavf_rxtx_vec_sse.c          |  12 +-
 drivers/net/iavf/iavf_vchnl.c                 |   6 +-
 drivers/net/ice/base/ice_common.c             |  21 +-
 drivers/net/ice/base/ice_flex_pipe.c          |   2 +-
 drivers/net/ice/base/ice_switch.c             |   4 +
 drivers/net/ice/base/ice_type.h               |   1 +
 drivers/net/ice/ice_acl_filter.c              |  37 ++-
 drivers/net/ice/ice_dcf.c                     |  25 +-
 drivers/net/ice/ice_dcf_ethdev.c              |  11 +-
 drivers/net/ice/ice_ethdev.c                  |  10 +-
 drivers/net/ice/ice_ethdev.h                  |   4 +-
 drivers/net/ice/ice_generic_flow.c            |  11 +-
 drivers/net/ice/ice_rxtx.c                    |  40 ++-
 drivers/net/ice/ice_rxtx.h                    |   4 +-
 drivers/net/ice/ice_rxtx_common_avx.h         | 213 ++++++++++++
 drivers/net/ice/ice_rxtx_vec_avx2.c           |   1 +
 drivers/net/ice/ice_rxtx_vec_avx512.c         |   1 +
 drivers/net/ice/ice_rxtx_vec_common.h         | 201 +-----------
 drivers/net/ice/ice_rxtx_vec_sse.c            |   6 +-
 drivers/net/ice/ice_switch_filter.c           | 187 ++++++++---
 drivers/net/ixgbe/ixgbe_ethdev.c              |  12 +-
 drivers/net/ixgbe/ixgbe_rxtx.c                |  10 +-
 drivers/net/ixgbe/ixgbe_rxtx.h                |   2 +
 drivers/net/ixgbe/ixgbe_rxtx_vec_common.h     |   5 +-
 drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c        |   6 +-
 drivers/net/liquidio/lio_ethdev.c             |   1 -
 drivers/net/memif/rte_eth_memif.c             |   9 +-
 drivers/net/mlx5/linux/mlx5_ethdev_os.c       |   3 +
 drivers/net/mlx5/linux/mlx5_os.c              |  40 ++-
 drivers/net/mlx5/linux/mlx5_os.h              |  27 ++
 drivers/net/mlx5/linux/mlx5_socket.c          |  12 +-
 drivers/net/mlx5/linux/mlx5_verbs.c           |   6 +-
 drivers/net/mlx5/mlx5.c                       |   9 +
 drivers/net/mlx5/mlx5.h                       |   8 +-
 drivers/net/mlx5/mlx5_devx.c                  |   8 +-
 drivers/net/mlx5/mlx5_flow.c                  |   3 +
 drivers/net/mlx5/mlx5_flow_dv.c               |  38 ++-
 drivers/net/mlx5/mlx5_rss.c                   |   2 +-
 drivers/net/mlx5/mlx5_rxq.c                   |   8 +-
 drivers/net/mlx5/mlx5_rxtx.h                  |   2 +-
 drivers/net/mlx5/mlx5_rxtx_vec.c              |   4 +-
 drivers/net/mlx5/mlx5_rxtx_vec_altivec.h      |   8 +-
 drivers/net/mlx5/mlx5_trigger.c               |   1 +
 drivers/net/mlx5/mlx5_txq.c                   |  54 ++--
 drivers/net/mvneta/mvneta_ethdev.c            |   1 -
 drivers/net/nfp/nfp_net_pmd.h                 |   4 +-
 drivers/net/octeontx/octeontx_ethdev.c        |   1 -
 drivers/net/octeontx/octeontx_rxtx.h          |  69 ++--
 drivers/net/octeontx2/otx2_ethdev_ops.c       |   8 +-
 drivers/net/pcap/rte_eth_pcap.c               |  30 ++
 drivers/net/pfe/pfe_ethdev.c                  |   2 -
 drivers/net/sfc/sfc_ef100_rx.c                |   2 +-
 drivers/net/sfc/sfc_ethdev.c                  |   1 -
 drivers/net/sfc/sfc_mae.c                     |   5 +-
 drivers/net/sfc/sfc_switch.c                  |   2 +-
 drivers/net/softnic/rte_eth_softnic_cli.c     |  26 +-
 drivers/net/txgbe/base/txgbe_phy.c            |  18 +-
 drivers/net/txgbe/base/txgbe_regs.h           |  49 +--
 drivers/net/txgbe/txgbe_ethdev.c              |  12 +-
 drivers/net/virtio/virtio_ethdev.c            | 110 +++++--
 drivers/net/virtio/virtio_pci.h               |   5 +
 drivers/net/virtio/virtio_rxtx.c              |  19 +-
 .../net/virtio/virtio_user/virtio_user_dev.c  |   2 +-
 drivers/net/virtio/virtqueue.c                |  14 +
 drivers/net/virtio/virtqueue.h                |  14 +-
 drivers/raw/ifpga/base/meson.build            |   2 +-
 drivers/vdpa/mlx5/mlx5_vdpa.c                 |  10 +-
 drivers/vdpa/mlx5/mlx5_vdpa_mem.c             |   6 +-
 drivers/vdpa/mlx5/mlx5_vdpa_virtq.c           |   4 +
 examples/fips_validation/main.c               |   9 +-
 examples/ipsec-secgw/flow.c                   |   2 +
 examples/ipsec-secgw/ipsec-secgw.c            |   2 +
 examples/ipsec-secgw/ipsec-secgw.h            |   2 +-
 examples/performance-thread/common/lthread.c  |   4 +-
 .../performance-thread/common/lthread_cond.c  |   6 +-
 .../performance-thread/common/lthread_mutex.c |   6 +-
 .../performance-thread/pthread_shim/main.c    |   2 +-
 examples/service_cores/main.c                 |   2 +-
 lib/librte_bitratestats/rte_bitrate.c         |   6 +-
 lib/librte_bpf/bpf_validate.c                 |   9 +-
 lib/librte_cmdline/cmdline_socket.c           |   1 +
 lib/librte_cryptodev/rte_crypto_sym.h         |   3 +-
 lib/librte_eal/common/eal_common_dev.c        |   2 +-
 lib/librte_eal/common/eal_common_options.c    |   2 +-
 lib/librte_eal/common/malloc_heap.c           |  20 ++
 lib/librte_eal/common/malloc_heap.h           |  11 -
 lib/librte_eal/common/meson.build             |  59 +---
 lib/librte_eal/freebsd/eal.c                  |  56 +++-
 lib/librte_eal/freebsd/eal_hugepage_info.c    |   4 +
 lib/librte_eal/freebsd/eal_thread.c           |   2 +
 lib/librte_eal/include/rte_vfio.h             |   6 +-
 lib/librte_eal/linux/eal.c                    |   2 -
 lib/librte_eal/linux/eal_dev.c                |   3 +
 lib/librte_eal/linux/eal_interrupts.c         |   9 +-
 lib/librte_eal/linux/eal_memalloc.c           |  13 +-
 lib/librte_eal/linux/eal_thread.c             |   2 +
 lib/librte_eal/ppc/include/rte_memcpy.h       |  15 +-
 lib/librte_eal/version.map                    |   1 +
 lib/librte_eal/windows/eal.c                  |  65 ++--
 lib/librte_eal/windows/eal_memalloc.c         |  15 +-
 lib/librte_eal/windows/eal_memory.c           |   6 +-
 lib/librte_eal/windows/eal_thread.c           |   2 +
 lib/librte_eal/windows/include/meson.build    |   1 -
 lib/librte_eal/windows/include/sched.h        |   2 +-
 lib/librte_eal/windows/meson.build            |  10 +
 lib/librte_eal/x86/include/rte_memcpy.h       |  80 ++---
 lib/librte_eal/x86/rte_cpuflags.c             |   8 +-
 lib/librte_ethdev/rte_ethdev.c                |  15 +-
 lib/librte_ethdev/rte_ethdev.h                |  37 ++-
 lib/librte_ethdev/rte_ethdev_pci.h            |  10 +
 .../rte_event_eth_rx_adapter.c                |   5 +
 lib/librte_hash/rte_thash.h                   |  12 +-
 lib/librte_kni/rte_kni.c                      |  13 +-
 lib/librte_kvargs/rte_kvargs.h                |   2 +-
 lib/librte_lpm/rte_lpm6.c                     |   4 +-
 lib/librte_mbuf/rte_mbuf.c                    |   4 +-
 lib/librte_mbuf/rte_mbuf.h                    |  10 +-
 lib/librte_mbuf/rte_mbuf_core.h               |  15 +-
 lib/librte_mbuf/rte_mbuf_dyn.c                |   4 +
 lib/librte_mempool/rte_mempool.h              |   7 +-
 lib/librte_net/rte_ether.h                    |   2 +-
 lib/librte_net/rte_ip.h                       |  33 +-
 lib/librte_net/rte_net.h                      |  15 +-
 lib/librte_pipeline/rte_swx_pipeline.c        |   6 +-
 lib/librte_rib/rte_rib6.c                     |   2 +-
 lib/librte_ring/rte_ring_c11_mem.h            |   2 +-
 lib/librte_ring/rte_ring_generic.h            |   2 +-
 lib/librte_sched/rte_sched_common.h           |  15 +-
 lib/librte_stack/rte_stack_lf_generic.h       |   4 +-
 lib/librte_telemetry/telemetry_json.h         |   5 +-
 lib/librte_vhost/socket.c                     | 109 ++++---
 lib/librte_vhost/vhost.c                      |   3 +
 lib/librte_vhost/vhost_user.c                 |   2 +
 usertools/dpdk-pmdinfo.py                     |   2 +-
 usertools/dpdk-telemetry.py                   |  16 +-
 257 files changed, 2819 insertions(+), 1434 deletions(-)
 create mode 100644 drivers/net/ice/ice_rxtx_common_avx.h

-- 
2.33.0


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

* [dpdk-stable] patch 'net/i40e: support 25G AOC/ACC cables' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'examples/performance-thread: fix build with clang 12.0.1' " Xueming Li
                   ` (251 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Yury Kylulin
  Cc: Luca Boccassi, Ashish Paul, Christian Ehrhardt, Luca Boccassi,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cd9f079d8799f40cf1739045bc7ff5429981cc09 Mon Sep 17 00:00:00 2001
From: Yury Kylulin <yury.kylulin@intel.com>
Date: Mon, 6 Sep 2021 10:17:44 +0200
Subject: [PATCH] net/i40e: support 25G AOC/ACC cables
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b1daa3461429e7674206a714c17adca65e9b44b4 ]

Enable additional PHY types (25G-AOC and 25G-ACC) for set PHY config
command.

Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1940957

Signed-off-by: Yury Kylulin <yury.kylulin@intel.com>
Tested-by: Ashish Paul <apaul@juniper.net>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Luca Boccassi <luca.boccassi@microsoft.com>
---
 drivers/net/i40e/i40e_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 0dc20de9a0..5e3b80a6b8 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2372,7 +2372,8 @@ i40e_phy_conf_link(struct i40e_hw *hw,
 	phy_conf.phy_type = is_up ? cpu_to_le32(phy_type_mask) : 0;
 	phy_conf.phy_type_ext = is_up ? (I40E_AQ_PHY_TYPE_EXT_25G_KR |
 		I40E_AQ_PHY_TYPE_EXT_25G_CR | I40E_AQ_PHY_TYPE_EXT_25G_SR |
-		I40E_AQ_PHY_TYPE_EXT_25G_LR) : 0;
+		I40E_AQ_PHY_TYPE_EXT_25G_LR | I40E_AQ_PHY_TYPE_EXT_25G_AOC |
+		I40E_AQ_PHY_TYPE_EXT_25G_ACC) : 0;
 	phy_conf.fec_config = phy_ab.fec_cfg_curr_mod_ext_info;
 	phy_conf.eee_capability = phy_ab.eee_capability;
 	phy_conf.eeer = phy_ab.eeer_val;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.172063822 +0800
+++ 0001-net-i40e-support-25G-AOC-ACC-cables.patch	2021-11-10 14:17:01.730747236 +0800
@@ -1 +1 @@
-From b1daa3461429e7674206a714c17adca65e9b44b4 Mon Sep 17 00:00:00 2001
+From cd9f079d8799f40cf1739045bc7ff5429981cc09 Mon Sep 17 00:00:00 2001
@@ -3 +3 @@
-Date: Tue, 13 Apr 2021 18:29:50 +0300
+Date: Mon, 6 Sep 2021 10:17:44 +0200
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b1daa3461429e7674206a714c17adca65e9b44b4 ]
@@ -8,0 +12,2 @@
+Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1940957
+
@@ -10,0 +16,2 @@
+Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
+Acked-by: Luca Boccassi <luca.boccassi@microsoft.com>
@@ -16 +23 @@
-index ea5d384283..e6206a7e51 100644
+index 0dc20de9a0..5e3b80a6b8 100644
@@ -19 +26 @@
-@@ -2307,7 +2307,8 @@ i40e_phy_conf_link(struct i40e_hw *hw,
+@@ -2372,7 +2372,8 @@ i40e_phy_conf_link(struct i40e_hw *hw,

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

* [dpdk-stable] patch 'examples/performance-thread: fix build with clang 12.0.1' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/i40e: support 25G AOC/ACC cables' has been " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'drivers/net: fix typo in vector Rx comment' " Xueming Li
                   ` (250 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Luca Boccassi, Ali Alnubani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d65672bac2ec7927684e16a8677983f1c4e9ac01 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerinj@marvell.com>
Date: Mon, 16 Aug 2021 18:49:14 +0530
Subject: [PATCH] examples/performance-thread: fix build with clang 12.0.1
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5e184c4cc7ca5633aaebf15f73882b8456d13fd7 ]

In clang 12.0.1 version, the use of pthread_yield() is deprecated,
use sched_yield() instead.

log:
    examples/performance-thread/pthread_shim/main.c:75:9: warning:
    'pthread_yield' is deprecated: pthread_yield is deprecated,
    use sched_yield instead [-Wdeprecated-declarations]

Bugzilla ID: 745
Fixes: 433ba6228f9a ("examples/performance-thread: add pthread_shim app")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
 examples/performance-thread/pthread_shim/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/performance-thread/pthread_shim/main.c b/examples/performance-thread/pthread_shim/main.c
index 241267fd9e..288c70c6cd 100644
--- a/examples/performance-thread/pthread_shim/main.c
+++ b/examples/performance-thread/pthread_shim/main.c
@@ -71,7 +71,7 @@ void *helloworld_pthread(void *arg)
 	print_count++;
 
 	/* yield thread to give opportunity for lock contention */
-	pthread_yield();
+	sched_yield();
 
 	/* retrieve arg from TLS */
 	uint64_t thread_no = (uint64_t) pthread_getspecific(key);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.222062262 +0800
+++ 0002-examples-performance-thread-fix-build-with-clang-12..patch	2021-11-10 14:17:01.730747236 +0800
@@ -1 +1 @@
-From 5e184c4cc7ca5633aaebf15f73882b8456d13fd7 Mon Sep 17 00:00:00 2001
+From d65672bac2ec7927684e16a8677983f1c4e9ac01 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5e184c4cc7ca5633aaebf15f73882b8456d13fd7 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 257de50692..7ce6cfb0c8 100644
+index 241267fd9e..288c70c6cd 100644
@@ -28 +30 @@
-@@ -72,7 +72,7 @@ void *helloworld_pthread(void *arg)
+@@ -71,7 +71,7 @@ void *helloworld_pthread(void *arg)

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

* [dpdk-stable] patch 'drivers/net: fix typo in vector Rx comment' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/i40e: support 25G AOC/ACC cables' has been " Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'examples/performance-thread: fix build with clang 12.0.1' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'drivers/net: fix vector Rx comments' " Xueming Li
                   ` (249 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Feifei Wang; +Cc: Luca Boccassi, Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 99e95a04c40e72d58fb62e1f82a2b7a0eaf4ba50 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Fri, 23 Jul 2021 11:10:46 +0800
Subject: [PATCH] drivers/net: fix typo in vector Rx comment
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 635a9373fa99158c69b3fb5b19315f7b9d4cdecd ]

In Rx vec path, for extracting and recording EOP bit, comment has
redundant "count" word, removing it.

Fixes: 7092be8437bd ("fm10k: add vector Rx")
Fixes: c3def6a8724c ("net/i40e: implement vector PMD for altivec")
Fixes: ae0eb310f253 ("net/i40e: implement vector PMD for ARM")
Fixes: 9ed94e5bb04e ("i40e: add vector Rx")
Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx")
Fixes: 1162f5a0ef31 ("net/iavf: support flexible Rx descriptor in SSE path")
Fixes: c68a52b8b38c ("net/ice: support vector SSE in Rx")
Fixes: cf4b4708a88a ("ixgbe: improve slow-path perf with vector scattered Rx")

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 drivers/net/fm10k/fm10k_rxtx_vec.c       | 2 +-
 drivers/net/i40e/i40e_rxtx_vec_altivec.c | 2 +-
 drivers/net/i40e/i40e_rxtx_vec_neon.c    | 2 +-
 drivers/net/i40e/i40e_rxtx_vec_sse.c     | 2 +-
 drivers/net/iavf/iavf_rxtx_vec_sse.c     | 4 ++--
 drivers/net/ice/ice_rxtx_vec_sse.c       | 2 +-
 drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c   | 2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c
index 6fcc939ad9..b3c31ff198 100644
--- a/drivers/net/fm10k/fm10k_rxtx_vec.c
+++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
@@ -544,7 +544,7 @@ fm10k_recv_raw_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 			/* and with mask to extract bits, flipping 1-0 */
 			__m128i eop_bits = _mm_andnot_si128(staterr, eop_check);
 			/* the staterr values are not in order, as the count
-			 * count of dd bits doesn't care. However, for end of
+			 * of dd bits doesn't care. However, for end of
 			 * packet tracking, we do care, so shuffle. This also
 			 * compresses the 32-bit values to 8-bit
 			 */
diff --git a/drivers/net/i40e/i40e_rxtx_vec_altivec.c b/drivers/net/i40e/i40e_rxtx_vec_altivec.c
index d3238bfb6a..0f03d5e0fa 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_altivec.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_altivec.c
@@ -398,7 +398,7 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 				(vector unsigned char)vec_nor(staterr, staterr),
 				(vector unsigned char)eop_check);
 			/* the staterr values are not in order, as the count
-			 * count of dd bits doesn't care. However, for end of
+			 * of dd bits doesn't care. However, for end of
 			 * packet tracking, we do care, so shuffle. This also
 			 * compresses the 32-bit values to 8-bit
 			 */
diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
index edb202a51a..278c523a8f 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
@@ -387,7 +387,7 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *__rte_restrict rxq,
 			eop_bits = vmvnq_u8(vreinterpretq_u8_u16(staterr));
 			eop_bits = vandq_u8(eop_bits, eop_check);
 			/* the staterr values are not in order, as the count
-			 * count of dd bits doesn't care. However, for end of
+			 * of dd bits doesn't care. However, for end of
 			 * packet tracking, we do care, so shuffle. This also
 			 * compresses the 32-bit values to 8-bit
 			 */
diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c
index 0bcb48e24e..e9b4258bbc 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_sse.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c
@@ -557,7 +557,7 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 			/* and with mask to extract bits, flipping 1-0 */
 			__m128i eop_bits = _mm_andnot_si128(staterr, eop_check);
 			/* the staterr values are not in order, as the count
-			 * count of dd bits doesn't care. However, for end of
+			 * of dd bits doesn't care. However, for end of
 			 * packet tracking, we do care, so shuffle. This also
 			 * compresses the 32-bit values to 8-bit
 			 */
diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c
index 75c77f9d32..52919182b6 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_sse.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c
@@ -590,7 +590,7 @@ _recv_raw_pkts_vec(struct iavf_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 			/* and with mask to extract bits, flipping 1-0 */
 			__m128i eop_bits = _mm_andnot_si128(staterr, eop_check);
 			/* the staterr values are not in order, as the count
-			 * count of dd bits doesn't care. However, for end of
+			 * of dd bits doesn't care. However, for end of
 			 * packet tracking, we do care, so shuffle. This also
 			 * compresses the 32-bit values to 8-bit
 			 */
@@ -884,7 +884,7 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq,
 			/* and with mask to extract bits, flipping 1-0 */
 			__m128i eop_bits = _mm_andnot_si128(staterr, eop_check);
 			/* the staterr values are not in order, as the count
-			 * count of dd bits doesn't care. However, for end of
+			 * of dd bits doesn't care. However, for end of
 			 * packet tracking, we do care, so shuffle. This also
 			 * compresses the 32-bit values to 8-bit
 			 */
diff --git a/drivers/net/ice/ice_rxtx_vec_sse.c b/drivers/net/ice/ice_rxtx_vec_sse.c
index eef21fa70c..fb0d1621a5 100644
--- a/drivers/net/ice/ice_rxtx_vec_sse.c
+++ b/drivers/net/ice/ice_rxtx_vec_sse.c
@@ -545,7 +545,7 @@ _ice_recv_raw_pkts_vec(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 			/* and with mask to extract bits, flipping 1-0 */
 			__m128i eop_bits = _mm_andnot_si128(staterr, eop_check);
 			/* the staterr values are not in order, as the count
-			 * count of dd bits doesn't care. However, for end of
+			 * of dd bits doesn't care. However, for end of
 			 * packet tracking, we do care, so shuffle. This also
 			 * compresses the 32-bit values to 8-bit
 			 */
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
index 52add17b5d..cbd907f2b9 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
@@ -540,7 +540,7 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 			/* and with mask to extract bits, flipping 1-0 */
 			__m128i eop_bits = _mm_andnot_si128(staterr, eop_check);
 			/* the staterr values are not in order, as the count
-			 * count of dd bits doesn't care. However, for end of
+			 * of dd bits doesn't care. However, for end of
 			 * packet tracking, we do care, so shuffle. This also
 			 * compresses the 32-bit values to 8-bit
 			 */
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.264447334 +0800
+++ 0003-drivers-net-fix-typo-in-vector-Rx-comment.patch	2021-11-10 14:17:01.734080543 +0800
@@ -1 +1 @@
-From 635a9373fa99158c69b3fb5b19315f7b9d4cdecd Mon Sep 17 00:00:00 2001
+From 99e95a04c40e72d58fb62e1f82a2b7a0eaf4ba50 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 635a9373fa99158c69b3fb5b19315f7b9d4cdecd ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index 39e3cdac1f..cae5322d48 100644
+index 6fcc939ad9..b3c31ff198 100644
@@ -45 +47 @@
-index 1ad74646d6..edaa462ac8 100644
+index d3238bfb6a..0f03d5e0fa 100644
@@ -58 +60 @@
-index 1f5539bda8..32336fdb80 100644
+index edb202a51a..278c523a8f 100644
@@ -71 +73 @@
-index bfa5aff48d..03a0320353 100644
+index 0bcb48e24e..e9b4258bbc 100644
@@ -84 +86 @@
-index bf87696fa4..b813d96ef4 100644
+index 75c77f9d32..52919182b6 100644
@@ -106 +108 @@
-index 673e44a243..5f7e13ee39 100644
+index eef21fa70c..fb0d1621a5 100644
@@ -119 +121 @@
-index 7610fd93db..3a3ef51172 100644
+index 52add17b5d..cbd907f2b9 100644

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

* [dpdk-stable] patch 'drivers/net: fix vector Rx comments' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (2 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'drivers/net: fix typo in vector Rx comment' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice/base: fix typo in comment' " Xueming Li
                   ` (248 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Feifei Wang; +Cc: Luca Boccassi, Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 39a30eb8841d7177a1a61bc4a432a79c9e5e86e6 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Fri, 23 Jul 2021 11:10:47 +0800
Subject: [PATCH] drivers/net: fix vector Rx comments
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4f76ac98b787dbc893d9aaae487f79e69cb962c4 ]

For the loop to process packets in Rx vector path, some notes for the
code are wrong, fix these errors.

Fixes: 7092be8437bd ("fm10k: add vector Rx")
Fixes: c3def6a8724c ("net/i40e: implement vector PMD for altivec")
Fixes: ae0eb310f253 ("net/i40e: implement vector PMD for ARM")
Fixes: 9ed94e5bb04e ("i40e: add vector Rx")
Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx")
Fixes: 1162f5a0ef31 ("net/iavf: support flexible Rx descriptor in SSE path")
Fixes: c68a52b8b38c ("net/ice: support vector SSE in Rx")
Fixes: cf4b4708a88a ("ixgbe: improve slow-path perf with vector scattered Rx")

Suggested-by: Ruifeng Wang <ruifeng.wang@arm.com>
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 drivers/net/fm10k/fm10k_rxtx_vec.c       | 4 ++--
 drivers/net/i40e/i40e_rxtx_vec_altivec.c | 8 ++++----
 drivers/net/i40e/i40e_rxtx_vec_neon.c    | 8 ++++----
 drivers/net/i40e/i40e_rxtx_vec_sse.c     | 4 ++--
 drivers/net/iavf/iavf_rxtx_vec_sse.c     | 8 ++++----
 drivers/net/ice/ice_rxtx_vec_sse.c       | 4 ++--
 drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c   | 4 ++--
 7 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c
index b3c31ff198..50e76b1083 100644
--- a/drivers/net/fm10k/fm10k_rxtx_vec.c
+++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
@@ -472,7 +472,7 @@ fm10k_recv_raw_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 		mbp1 = _mm_loadu_si128((__m128i *)&mbufp[pos]);
 
 		/* Read desc statuses backwards to avoid race condition */
-		/* A.1 load 4 pkts desc */
+		/* A.1 load desc[3] */
 		descs0[3] = _mm_loadu_si128((__m128i *)(rxdp + 3));
 		rte_compiler_barrier();
 
@@ -484,9 +484,9 @@ fm10k_recv_raw_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 		mbp2 = _mm_loadu_si128((__m128i *)&mbufp[pos+2]);
 #endif
 
+		/* A.1 load desc[2-0] */
 		descs0[2] = _mm_loadu_si128((__m128i *)(rxdp + 2));
 		rte_compiler_barrier();
-		/* B.1 load 2 mbuf point */
 		descs0[1] = _mm_loadu_si128((__m128i *)(rxdp + 1));
 		rte_compiler_barrier();
 		descs0[0] = _mm_loadu_si128((__m128i *)(rxdp));
diff --git a/drivers/net/i40e/i40e_rxtx_vec_altivec.c b/drivers/net/i40e/i40e_rxtx_vec_altivec.c
index 0f03d5e0fa..161870f505 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_altivec.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_altivec.c
@@ -281,22 +281,22 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 						  * in one XMM reg.
 						  */
 
-		/* B.1 load 1 mbuf point */
+		/* B.1 load 2 mbuf point */
 		mbp1 = *(vector unsigned long *)&sw_ring[pos];
 		/* Read desc statuses backwards to avoid race condition */
-		/* A.1 load 4 pkts desc */
+		/* A.1 load desc[3] */
 		descs[3] = *(vector unsigned long *)(rxdp + 3);
 		rte_compiler_barrier();
 
 		/* B.2 copy 2 mbuf point into rx_pkts  */
 		*(vector unsigned long *)&rx_pkts[pos] = mbp1;
 
-		/* B.1 load 1 mbuf point */
+		/* B.1 load 2 mbuf point */
 		mbp2 = *(vector unsigned long *)&sw_ring[pos + 2];
 
+		/* A.1 load desc[2-0] */
 		descs[2] = *(vector unsigned long *)(rxdp + 2);
 		rte_compiler_barrier();
-		/* B.1 load 2 mbuf point */
 		descs[1] = *(vector unsigned long *)(rxdp + 1);
 		rte_compiler_barrier();
 		descs[0] = *(vector unsigned long *)(rxdp);
diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
index 278c523a8f..0df315b162 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
@@ -280,20 +280,20 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *__rte_restrict rxq,
 
 		int32x4_t len_shl = {0, 0, 0, PKTLEN_SHIFT};
 
-		/* B.1 load 1 mbuf point */
+		/* B.1 load 2 mbuf point */
 		mbp1 = vld1q_u64((uint64_t *)&sw_ring[pos]);
 		/* Read desc statuses backwards to avoid race condition */
-		/* A.1 load 4 pkts desc */
+		/* A.1 load desc[3] */
 		descs[3] =  vld1q_u64((uint64_t *)(rxdp + 3));
 
 		/* B.2 copy 2 mbuf point into rx_pkts  */
 		vst1q_u64((uint64_t *)&rx_pkts[pos], mbp1);
 
-		/* B.1 load 1 mbuf point */
+		/* B.1 load 2 mbuf point */
 		mbp2 = vld1q_u64((uint64_t *)&sw_ring[pos + 2]);
 
+		/* A.1 load desc[2-0] */
 		descs[2] =  vld1q_u64((uint64_t *)(rxdp + 2));
-		/* B.1 load 2 mbuf point */
 		descs[1] =  vld1q_u64((uint64_t *)(rxdp + 1));
 		descs[0] =  vld1q_u64((uint64_t *)(rxdp));
 
diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c
index e9b4258bbc..8090a3a370 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_sse.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c
@@ -462,7 +462,7 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 		/* B.1 load 2 (64 bit) or 4 (32 bit) mbuf points */
 		mbp1 = _mm_loadu_si128((__m128i *)&sw_ring[pos]);
 		/* Read desc statuses backwards to avoid race condition */
-		/* A.1 load 4 pkts desc */
+		/* A.1 load desc[3] */
 		descs[3] = _mm_loadu_si128((__m128i *)(rxdp + 3));
 		rte_compiler_barrier();
 
@@ -474,9 +474,9 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 		mbp2 = _mm_loadu_si128((__m128i *)&sw_ring[pos+2]);
 #endif
 
+		/* A.1 load desc[2-0] */
 		descs[2] = _mm_loadu_si128((__m128i *)(rxdp + 2));
 		rte_compiler_barrier();
-		/* B.1 load 2 mbuf point */
 		descs[1] = _mm_loadu_si128((__m128i *)(rxdp + 1));
 		rte_compiler_barrier();
 		descs[0] = _mm_loadu_si128((__m128i *)(rxdp));
diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c
index 52919182b6..5d9a1bb809 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_sse.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c
@@ -494,7 +494,7 @@ _recv_raw_pkts_vec(struct iavf_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 		/* B.1 load 2 (64 bit) or 4 (32 bit) mbuf points */
 		mbp1 = _mm_loadu_si128((__m128i *)&sw_ring[pos]);
 		/* Read desc statuses backwards to avoid race condition */
-		/* A.1 load 4 pkts desc */
+		/* A.1 load desc[3] */
 		descs[3] = _mm_loadu_si128((__m128i *)(rxdp + 3));
 		rte_compiler_barrier();
 
@@ -506,9 +506,9 @@ _recv_raw_pkts_vec(struct iavf_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 		mbp2 = _mm_loadu_si128((__m128i *)&sw_ring[pos + 2]);
 #endif
 
+		/* A.1 load desc[2-0] */
 		descs[2] = _mm_loadu_si128((__m128i *)(rxdp + 2));
 		rte_compiler_barrier();
-		/* B.1 load 2 mbuf point */
 		descs[1] = _mm_loadu_si128((__m128i *)(rxdp + 1));
 		rte_compiler_barrier();
 		descs[0] = _mm_loadu_si128((__m128i *)(rxdp));
@@ -755,7 +755,7 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq,
 		/* B.1 load 2 (64 bit) or 4 (32 bit) mbuf points */
 		mbp1 = _mm_loadu_si128((__m128i *)&sw_ring[pos]);
 		/* Read desc statuses backwards to avoid race condition */
-		/* A.1 load 4 pkts desc */
+		/* A.1 load desc[3] */
 		descs[3] = _mm_loadu_si128((__m128i *)(rxdp + 3));
 		rte_compiler_barrier();
 
@@ -767,9 +767,9 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq,
 		mbp2 = _mm_loadu_si128((__m128i *)&sw_ring[pos + 2]);
 #endif
 
+		/* A.1 load desc[2-0] */
 		descs[2] = _mm_loadu_si128((__m128i *)(rxdp + 2));
 		rte_compiler_barrier();
-		/* B.1 load 2 mbuf point */
 		descs[1] = _mm_loadu_si128((__m128i *)(rxdp + 1));
 		rte_compiler_barrier();
 		descs[0] = _mm_loadu_si128((__m128i *)(rxdp));
diff --git a/drivers/net/ice/ice_rxtx_vec_sse.c b/drivers/net/ice/ice_rxtx_vec_sse.c
index fb0d1621a5..e624fd54b8 100644
--- a/drivers/net/ice/ice_rxtx_vec_sse.c
+++ b/drivers/net/ice/ice_rxtx_vec_sse.c
@@ -416,7 +416,7 @@ _ice_recv_raw_pkts_vec(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 		/* B.1 load 2 (64 bit) or 4 (32 bit) mbuf points */
 		mbp1 = _mm_loadu_si128((__m128i *)&sw_ring[pos]);
 		/* Read desc statuses backwards to avoid race condition */
-		/* A.1 load 4 pkts desc */
+		/* A.1 load desc[3] */
 		descs[3] = _mm_loadu_si128((__m128i *)(rxdp + 3));
 		rte_compiler_barrier();
 
@@ -428,9 +428,9 @@ _ice_recv_raw_pkts_vec(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 		mbp2 = _mm_loadu_si128((__m128i *)&sw_ring[pos + 2]);
 #endif
 
+		/* A.1 load desc[2-0] */
 		descs[2] = _mm_loadu_si128((__m128i *)(rxdp + 2));
 		rte_compiler_barrier();
-		/* B.1 load 2 mbuf point */
 		descs[1] = _mm_loadu_si128((__m128i *)(rxdp + 1));
 		rte_compiler_barrier();
 		descs[0] = _mm_loadu_si128((__m128i *)(rxdp));
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
index cbd907f2b9..d0377410d6 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
@@ -454,7 +454,7 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 		mbp1 = _mm_loadu_si128((__m128i *)&sw_ring[pos]);
 
 		/* Read desc statuses backwards to avoid race condition */
-		/* A.1 load 4 pkts desc */
+		/* A.1 load desc[3] */
 		descs[3] = _mm_loadu_si128((__m128i *)(rxdp + 3));
 		rte_compiler_barrier();
 
@@ -466,9 +466,9 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 		mbp2 = _mm_loadu_si128((__m128i *)&sw_ring[pos+2]);
 #endif
 
+		/* A.1 load desc[2-0] */
 		descs[2] = _mm_loadu_si128((__m128i *)(rxdp + 2));
 		rte_compiler_barrier();
-		/* B.1 load 2 mbuf point */
 		descs[1] = _mm_loadu_si128((__m128i *)(rxdp + 1));
 		rte_compiler_barrier();
 		descs[0] = _mm_loadu_si128((__m128i *)(rxdp));
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.311513117 +0800
+++ 0004-drivers-net-fix-vector-Rx-comments.patch	2021-11-10 14:17:01.737413849 +0800
@@ -1 +1 @@
-From 4f76ac98b787dbc893d9aaae487f79e69cb962c4 Mon Sep 17 00:00:00 2001
+From 39a30eb8841d7177a1a61bc4a432a79c9e5e86e6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4f76ac98b787dbc893d9aaae487f79e69cb962c4 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -33 +35 @@
-index cae5322d48..83af01dc2d 100644
+index b3c31ff198..50e76b1083 100644
@@ -57 +59 @@
-index edaa462ac8..b99323992f 100644
+index 0f03d5e0fa..161870f505 100644
@@ -88 +90 @@
-index 32336fdb80..fb624a4882 100644
+index 278c523a8f..0df315b162 100644
@@ -117 +119 @@
-index 03a0320353..b235502db5 100644
+index e9b4258bbc..8090a3a370 100644
@@ -141 +143 @@
-index b813d96ef4..ee1e905525 100644
+index 52919182b6..5d9a1bb809 100644
@@ -185 +187 @@
-index 5f7e13ee39..653bd28b41 100644
+index fb0d1621a5..e624fd54b8 100644
@@ -209 +211 @@
-index 3a3ef51172..1dea95e73b 100644
+index cbd907f2b9..d0377410d6 100644

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

* [dpdk-stable] patch 'net/ice/base: fix typo in comment' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (3 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'drivers/net: fix vector Rx comments' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice: fix max entry number for ACL normal priority' " Xueming Li
                   ` (247 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Luca Boccassi, Kevin Scott, Junfeng Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2cbc3c42d22b4db7b53859058f6db3298fd30886 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 10 Aug 2021 10:51:39 +0800
Subject: [PATCH] net/ice/base: fix typo in comment
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 34be38f024ee650be2ae445c18985641b63d138f ]

Correct spelling of word data instead of date.

Fixes: 453d087ccaff ("net/ice/base: add common functions")

Signed-off-by: Kevin Scott <kevin.c.scott@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
---
 drivers/net/ice/base/ice_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 304e55e210..be33ee252d 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -2913,7 +2913,7 @@ ice_phy_caps_equals_cfg(struct ice_aqc_get_phy_caps_data *phy_caps,
 /**
  * ice_copy_phy_caps_to_cfg - Copy PHY ability data to configuration data
  * @pi: port information structure
- * @caps: PHY ability structure to copy date from
+ * @caps: PHY ability structure to copy data from
  * @cfg: PHY configuration structure to copy data to
  *
  * Helper function to copy AQC PHY get ability data to PHY set configuration
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.357055892 +0800
+++ 0005-net-ice-base-fix-typo-in-comment.patch	2021-11-10 14:17:01.740747155 +0800
@@ -1 +1 @@
-From 34be38f024ee650be2ae445c18985641b63d138f Mon Sep 17 00:00:00 2001
+From 2cbc3c42d22b4db7b53859058f6db3298fd30886 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 34be38f024ee650be2ae445c18985641b63d138f ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 9c6649b6c5..641859f752 100644
+index 304e55e210..be33ee252d 100644
@@ -22 +24 @@
-@@ -3528,7 +3528,7 @@ ice_phy_caps_equals_cfg(struct ice_aqc_get_phy_caps_data *phy_caps,
+@@ -2913,7 +2913,7 @@ ice_phy_caps_equals_cfg(struct ice_aqc_get_phy_caps_data *phy_caps,

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

* [dpdk-stable] patch 'net/ice: fix max entry number for ACL normal priority' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (4 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice/base: fix typo in comment' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/txgbe: fix reading SFP module SFF-8472 data' " Xueming Li
                   ` (246 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Simei Su; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e2eae48793251ed86eda5176e7b4c9d3c4ad2b5b Mon Sep 17 00:00:00 2001
From: Simei Su <simei.su@intel.com>
Date: Wed, 28 Jul 2021 10:24:29 +0800
Subject: [PATCH] net/ice: fix max entry number for ACL normal priority
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4f72c21fdffa9074f0df9d5855522735ec61f4d7 ]

For ACL, there are three entry priorities: LOW, NORMAL, HIGH.
Low priority starts from the highest index, 25% of total entries;
Normal priority starts from the highest index, 50% of total entries;
High priority starts from the lowest index, 25% of total entries.

Each TCAM block has 512 entries of 40 bits. Currently, there is a
scenario in which multiple TCAM blocks are cascaded. It means the
total entries are 512. The default priority is NORMAL, so the max
entry is 256, not 512. This patch changes the max entry number for
NORMAL priority.

Fixes: 40d466fa9f76 ("net/ice: support ACL filter in DCF")

Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_acl_filter.c | 4 ++--
 drivers/net/ice/ice_ethdev.h     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ice/ice_acl_filter.c b/drivers/net/ice/ice_acl_filter.c
index f7dbe53574..95b235e470 100644
--- a/drivers/net/ice/ice_acl_filter.c
+++ b/drivers/net/ice/ice_acl_filter.c
@@ -430,7 +430,7 @@ ice_acl_hw_set_conf(struct ice_pf *pf, struct ice_fdir_fltr *input,
 	/* For IPV4_OTHER type, should add entry for all types.
 	 * For IPV4_UDP/TCP/SCTP type, only add entry for each.
 	 */
-	if (slot_id < MAX_ACL_ENTRIES) {
+	if (slot_id < MAX_ACL_NORMAL_ENTRIES) {
 		entry_id = ((uint64_t)flow_type << 32) | slot_id;
 		ret = ice_flow_add_entry(hw, blk, flow_type,
 					 entry_id, pf->main_vsi->idx,
@@ -444,7 +444,7 @@ ice_acl_hw_set_conf(struct ice_pf *pf, struct ice_fdir_fltr *input,
 		pf->acl.hw_entry_id[slot_id] = hw_entry;
 	} else {
 		PMD_DRV_LOG(ERR, "Exceed the maximum entry number(%d)"
-			    " HW supported!", MAX_ACL_ENTRIES);
+			    " HW supported!", MAX_ACL_NORMAL_ENTRIES);
 		return -1;
 	}
 
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index c1b432c1ef..cba2e46eff 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -50,7 +50,7 @@
 #define ICE_PKG_FILE_SEARCH_PATH_UPDATES "/lib/firmware/updates/intel/ice/ddp/"
 #define ICE_MAX_PKG_FILENAME_SIZE   256
 
-#define MAX_ACL_ENTRIES    512
+#define MAX_ACL_NORMAL_ENTRIES    256
 
 /**
  * vlan_id is a 12 bit number.
@@ -400,7 +400,7 @@ struct ice_acl_conf {
 struct ice_acl_info {
 	struct ice_acl_conf conf;
 	struct rte_bitmap *slots;
-	uint64_t hw_entry_id[MAX_ACL_ENTRIES];
+	uint64_t hw_entry_id[MAX_ACL_NORMAL_ENTRIES];
 };
 
 struct ice_pf {
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.402145540 +0800
+++ 0006-net-ice-fix-max-entry-number-for-ACL-normal-priority.patch	2021-11-10 14:17:01.740747155 +0800
@@ -1 +1 @@
-From 4f72c21fdffa9074f0df9d5855522735ec61f4d7 Mon Sep 17 00:00:00 2001
+From e2eae48793251ed86eda5176e7b4c9d3c4ad2b5b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4f72c21fdffa9074f0df9d5855522735ec61f4d7 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 33756099c6..0c15a7036c 100644
+index f7dbe53574..95b235e470 100644
@@ -50 +52 @@
-index edafdf168b..b4bf651c1c 100644
+index c1b432c1ef..cba2e46eff 100644
@@ -62 +64 @@
-@@ -408,7 +408,7 @@ struct ice_acl_conf {
+@@ -400,7 +400,7 @@ struct ice_acl_conf {

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

* [dpdk-stable] patch 'net/txgbe: fix reading SFP module SFF-8472 data' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (5 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice: fix max entry number for ACL normal priority' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/mlx5: fix mbuf replenishment check for zipped CQE' " Xueming Li
                   ` (245 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 05af857e4305c4d5533c44c458b92f15e9af4281 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Thu, 12 Aug 2021 10:00:19 +0800
Subject: [PATCH] net/txgbe: fix reading SFP module SFF-8472 data
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 00970f6398c871df52cfe3b87ebbe418616c9117 ]

Fix the I2C target address selection to read SFP module's SFF-8472 data.

Fixes: 8f09fb4642fa ("net/txgbe: add module identify")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_phy.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/drivers/net/txgbe/base/txgbe_phy.c b/drivers/net/txgbe/base/txgbe_phy.c
index bdd6bf780e..aa8037a36e 100644
--- a/drivers/net/txgbe/base/txgbe_phy.c
+++ b/drivers/net/txgbe/base/txgbe_phy.c
@@ -7,7 +7,7 @@
 #include "txgbe_mng.h"
 #include "txgbe_phy.h"
 
-static void txgbe_i2c_start(struct txgbe_hw *hw);
+static void txgbe_i2c_start(struct txgbe_hw *hw, u8 dev_addr);
 static void txgbe_i2c_stop(struct txgbe_hw *hw);
 
 /**
@@ -1223,11 +1223,9 @@ s32 txgbe_write_i2c_eeprom(struct txgbe_hw *hw, u8 byte_offset,
 s32 txgbe_read_i2c_byte_unlocked(struct txgbe_hw *hw, u8 byte_offset,
 					   u8 dev_addr, u8 *data)
 {
-	UNREFERENCED_PARAMETER(dev_addr);
-
 	DEBUGFUNC("txgbe_read_i2c_byte");
 
-	txgbe_i2c_start(hw);
+	txgbe_i2c_start(hw, dev_addr);
 
 	/* wait tx empty */
 	if (!po32m(hw, TXGBE_I2CICR, TXGBE_I2CICR_TXEMPTY,
@@ -1289,11 +1287,9 @@ s32 txgbe_read_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
 s32 txgbe_write_i2c_byte_unlocked(struct txgbe_hw *hw, u8 byte_offset,
 					    u8 dev_addr, u8 data)
 {
-	UNREFERENCED_PARAMETER(dev_addr);
-
 	DEBUGFUNC("txgbe_write_i2c_byte");
 
-	txgbe_i2c_start(hw);
+	txgbe_i2c_start(hw, dev_addr);
 
 	/* wait tx empty */
 	if (!po32m(hw, TXGBE_I2CICR, TXGBE_I2CICR_TXEMPTY,
@@ -1344,7 +1340,7 @@ s32 txgbe_write_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
  *
  *  Sets I2C start condition (High -> Low on SDA while SCL is High)
  **/
-static void txgbe_i2c_start(struct txgbe_hw *hw)
+static void txgbe_i2c_start(struct txgbe_hw *hw, u8 dev_addr)
 {
 	DEBUGFUNC("txgbe_i2c_start");
 
@@ -1355,9 +1351,9 @@ static void txgbe_i2c_start(struct txgbe_hw *hw)
 		TXGBE_I2CCON_SPEED(1) |
 		TXGBE_I2CCON_RESTART |
 		TXGBE_I2CCON_SDIA));
-	wr32(hw, TXGBE_I2CTAR, TXGBE_I2C_SLAVEADDR);
-	wr32(hw, TXGBE_I2CSSSCLHCNT, 600);
-	wr32(hw, TXGBE_I2CSSSCLLCNT, 600);
+	wr32(hw, TXGBE_I2CTAR, dev_addr >> 1);
+	wr32(hw, TXGBE_I2CSSSCLHCNT, 200);
+	wr32(hw, TXGBE_I2CSSSCLLCNT, 200);
 	wr32(hw, TXGBE_I2CRXTL, 0); /* 1byte for rx full signal */
 	wr32(hw, TXGBE_I2CTXTL, 4);
 	wr32(hw, TXGBE_I2CSCLTMOUT, 0xFFFFFF);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.444702146 +0800
+++ 0007-net-txgbe-fix-reading-SFP-module-SFF-8472-data.patch	2021-11-10 14:17:01.740747155 +0800
@@ -1 +1 @@
-From 00970f6398c871df52cfe3b87ebbe418616c9117 Mon Sep 17 00:00:00 2001
+From 05af857e4305c4d5533c44c458b92f15e9af4281 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 00970f6398c871df52cfe3b87ebbe418616c9117 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index 3e9f507212..2db87ae0c5 100644
+index bdd6bf780e..aa8037a36e 100644
@@ -20 +22 @@
-@@ -8,7 +8,7 @@
+@@ -7,7 +7,7 @@
@@ -27,3 +29,3 @@
- static s32 txgbe_handle_bp_flow(u32 link_mode, struct txgbe_hw *hw);
- static void txgbe_get_bp_ability(struct txgbe_backplane_ability *ability,
-@@ -1248,11 +1248,9 @@ s32 txgbe_write_i2c_eeprom(struct txgbe_hw *hw, u8 byte_offset,
+ 
+ /**
+@@ -1223,11 +1223,9 @@ s32 txgbe_write_i2c_eeprom(struct txgbe_hw *hw, u8 byte_offset,
@@ -42 +44 @@
-@@ -1314,11 +1312,9 @@ s32 txgbe_read_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
+@@ -1289,11 +1287,9 @@ s32 txgbe_read_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
@@ -55 +57 @@
-@@ -1369,7 +1365,7 @@ s32 txgbe_write_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
+@@ -1344,7 +1340,7 @@ s32 txgbe_write_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
@@ -64 +66 @@
-@@ -1380,9 +1376,9 @@ static void txgbe_i2c_start(struct txgbe_hw *hw)
+@@ -1355,9 +1351,9 @@ static void txgbe_i2c_start(struct txgbe_hw *hw)

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

* [dpdk-stable] patch 'net/mlx5: fix mbuf replenishment check for zipped CQE' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (6 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/txgbe: fix reading SFP module SFF-8472 data' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/mlx5: fix eCPRI matching' " Xueming Li
                   ` (244 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f50cec54fd7ac0ba16ac15580c1e60b501aeb53b Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Wed, 4 Aug 2021 09:23:16 +0300
Subject: [PATCH] net/mlx5: fix mbuf replenishment check for zipped CQE
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 828274b70ad10bc1ae54c4b4b446e7f42f181521 ]

A core dump is being generated with the following call stack:
0 _mm256_storeu_si256 (__A=..., __P=0x80)
1 rte_mov32 (src=0x2299c9140 "", dst=0x80)
2 rte_memcpy_aligned (n=60, src=0x2299c9140, dst=0x80)
3 rte_memcpy (n=60, src=0x2299c9140, dst=0x80)
4 mprq_buf_to_pkt (strd_cnt=1, strd_idx=0, buf=0x2299c8a00, len=60,
pkt=0x18345f0c0, rxq=0x18345ef40)
5 rxq_copy_mprq_mbuf_v (rxq=0x18345ef40, pkts=0x7f76e0ff6d18, pkts_n=5)
6 rxq_burst_mprq_v (rxq=0x18345ef40, pkts=0x7f76e0ff6d18, pkts_n=46,
err=0x7f76e0ff6a28, no_cq=0x7f76e0ff6a27)
7 mlx5_rx_burst_mprq_vec (dpdk_rxq=0x18345ef40, pkts=0x7f76e0ff6a88,
pkts_n=128)
8 rte_eth_rx_burst (nb_pkts=128, rx_pkts=0x7f76e0ff6a88,
queue_id=<optimized out>, port_id=<optimized out>)

This crash is caused by an attempt to copy previously uncompressed CQEs
into non-allocated mbufs. There is a check to make sure we only use
allocated mbufs in the rxq_burst_mprq_v() function, but it is done only
before the main processing loop. Leftovers of compressed CQEs session are
handled before that loop and may lead to the mbufs overflow as seen.

Move the check for replenished mbufs up to protect uncompressed CQEs
session leftovers from accessing non-allocated mbufs after the
mlx5_rx_mprq_replenish_bulk_mbuf() function is invoked.

Bugzilla ID: 746
Fixes: 0f20acbf5eda ("net/mlx5: implement vectorized MPRQ burst")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxtx_vec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c
index b8b555690e..1536a462dc 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec.c
+++ b/drivers/net/mlx5/mlx5_rxtx_vec.c
@@ -442,6 +442,8 @@ rxq_burst_mprq_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts,
 	rte_prefetch0(cq + 3);
 	pkts_n = RTE_MIN(pkts_n, MLX5_VPMD_RX_MAX_BURST);
 	mlx5_rx_mprq_replenish_bulk_mbuf(rxq);
+	/* Not to move past the allocated mbufs. */
+	pkts_n = RTE_MIN(pkts_n, rxq->elts_ci - rxq->rq_pi);
 	/* See if there're unreturned mbufs from compressed CQE. */
 	rcvd_pkt = rxq->decompressed;
 	if (rcvd_pkt > 0) {
@@ -457,8 +459,6 @@ rxq_burst_mprq_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts,
 	/* Not to cross queue end. */
 	pkts_n = RTE_MIN(pkts_n, elts_n - elts_idx);
 	pkts_n = RTE_MIN(pkts_n, q_n - cq_idx);
-	/* Not to move past the allocated mbufs. */
-	pkts_n = RTE_MIN(pkts_n, rxq->elts_ci - rxq->rq_pi);
 	if (!pkts_n) {
 		*no_cq = !cp_pkt;
 		return cp_pkt;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.487895876 +0800
+++ 0008-net-mlx5-fix-mbuf-replenishment-check-for-zipped-CQE.patch	2021-11-10 14:17:01.740747155 +0800
@@ -1 +1 @@
-From 828274b70ad10bc1ae54c4b4b446e7f42f181521 Mon Sep 17 00:00:00 2001
+From f50cec54fd7ac0ba16ac15580c1e60b501aeb53b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 828274b70ad10bc1ae54c4b4b446e7f42f181521 ]
@@ -33 +35,0 @@
-Cc: stable@dpdk.org
@@ -42 +44 @@
-index e1b6d5422a..ecd273e00a 100644
+index b8b555690e..1536a462dc 100644
@@ -45 +47 @@
-@@ -448,6 +448,8 @@ rxq_burst_mprq_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts,
+@@ -442,6 +442,8 @@ rxq_burst_mprq_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts,
@@ -54 +56 @@
-@@ -463,8 +465,6 @@ rxq_burst_mprq_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts,
+@@ -457,8 +459,6 @@ rxq_burst_mprq_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts,

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

* [dpdk-stable] patch 'net/mlx5: fix eCPRI matching' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (7 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/mlx5: fix mbuf replenishment check for zipped CQE' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/bnxt: update ring group after ring stop start' " Xueming Li
                   ` (243 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4ba7ab1ebd55722715dbd8aca29ec0c60a098b98 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Mon, 9 Aug 2021 17:26:46 +0300
Subject: [PATCH] net/mlx5: fix eCPRI matching
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 12d42b248c6a5eec17830b4163b0edaf5ec7bdb0 ]

When an ETH or VLAN flow item directly preceding ECPRI (i. e. a pattern
for eCPRI over Ethernet) did not specify the eCPRI protocol, matches
were not restricted to eCPRI traffic. For example, "eth / ecpri / end"
pattern behaved as "eth / end". Implicitly add Ethernet type condition,
so that "eth / ecpri / end" behaves as "eth type is 0xAEFE / end".

Fixes: daa38a8924a0 ("net/mlx5: add flow translation of eCPRI header")

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 1793683421..0b1a488edb 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7927,12 +7927,13 @@ flow_dv_translate_item_gtp(void *matcher, void *key,
  *   Flow matcher value.
  * @param[in] item
  *   Flow pattern to translate.
- * @param[in] samples
- *   Sample IDs to be used in the matching.
+ * @param[in] last_item
+ *   Last item flags.
  */
 static void
 flow_dv_translate_item_ecpri(struct rte_eth_dev *dev, void *matcher,
-			     void *key, const struct rte_flow_item *item)
+			     void *key, const struct rte_flow_item *item,
+			     uint64_t last_item)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 	const struct rte_flow_item_ecpri *ecpri_m = item->mask;
@@ -7945,6 +7946,22 @@ flow_dv_translate_item_ecpri(struct rte_eth_dev *dev, void *matcher,
 	void *dw_m;
 	void *dw_v;
 
+	/*
+	 * In case of eCPRI over Ethernet, if EtherType is not specified,
+	 * match on eCPRI EtherType implicitly.
+	 */
+	if (last_item & MLX5_FLOW_LAYER_OUTER_L2) {
+		void *hdrs_m, *hdrs_v, *l2m, *l2v;
+
+		hdrs_m = MLX5_ADDR_OF(fte_match_param, matcher, outer_headers);
+		hdrs_v = MLX5_ADDR_OF(fte_match_param, key, outer_headers);
+		l2m = MLX5_ADDR_OF(fte_match_set_lyr_2_4, hdrs_m, ethertype);
+		l2v = MLX5_ADDR_OF(fte_match_set_lyr_2_4, hdrs_v, ethertype);
+		if (*(uint16_t *)l2m == 0 && *(uint16_t *)l2v == 0) {
+			*(uint16_t *)l2m = UINT16_MAX;
+			*(uint16_t *)l2v = RTE_BE16(RTE_ETHER_TYPE_ECPRI);
+		}
+	}
 	if (!ecpri_v)
 		return;
 	if (!ecpri_m)
@@ -10603,7 +10620,8 @@ flow_dv_translate(struct rte_eth_dev *dev,
 			dev_flow->dv.value.size =
 					MLX5_ST_SZ_BYTES(fte_match_param);
 			flow_dv_translate_item_ecpri(dev, match_mask,
-						     match_value, items);
+						     match_value, items,
+						     last_item);
 			/* No other protocol should follow eCPRI layer. */
 			last_item = MLX5_FLOW_LAYER_ECPRI;
 			break;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.529371657 +0800
+++ 0009-net-mlx5-fix-eCPRI-matching.patch	2021-11-10 14:17:01.747413767 +0800
@@ -1 +1 @@
-From 12d42b248c6a5eec17830b4163b0edaf5ec7bdb0 Mon Sep 17 00:00:00 2001
+From 4ba7ab1ebd55722715dbd8aca29ec0c60a098b98 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 12d42b248c6a5eec17830b4163b0edaf5ec7bdb0 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 31d857030f..5bb6d89a3f 100644
+index 1793683421..0b1a488edb 100644
@@ -25 +27 @@
-@@ -9976,12 +9976,13 @@ flow_dv_translate_item_gtp_psc(void *matcher, void *key,
+@@ -7927,12 +7927,13 @@ flow_dv_translate_item_gtp(void *matcher, void *key,
@@ -42 +44 @@
-@@ -9994,6 +9995,22 @@ flow_dv_translate_item_ecpri(struct rte_eth_dev *dev, void *matcher,
+@@ -7945,6 +7946,22 @@ flow_dv_translate_item_ecpri(struct rte_eth_dev *dev, void *matcher,
@@ -65,3 +67,3 @@
-@@ -13474,7 +13491,8 @@ flow_dv_translate(struct rte_eth_dev *dev,
- 						"cannot create eCPRI parser");
- 			}
+@@ -10603,7 +10620,8 @@ flow_dv_translate(struct rte_eth_dev *dev,
+ 			dev_flow->dv.value.size =
+ 					MLX5_ST_SZ_BYTES(fte_match_param);

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

* [dpdk-stable] patch 'net/bnxt: update ring group after ring stop start' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (8 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/mlx5: fix eCPRI matching' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'app/testpmd: fix Tx retry in flowgen engine' " Xueming Li
                   ` (242 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Luca Boccassi, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 83ec79465d8d8a72d22234732e616f16f98a7b64 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Sun, 1 Aug 2021 21:44:30 -0700
Subject: [PATCH] net/bnxt: update ring group after ring stop start
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ed0ae3502fc91adbf6eebe7047da887353844230 ]

A Rx ring stop start sequence may result in the FW returning
a different set of Rx ring and AGG ring IDs. If the ring group
is not updated with the new IDs, the HW sees the host driver using
incorrect BD types for the Rx ring and AGG ring. This can cause
the chip to go into a bad state or encounter RE_flush issue
or leak mbufs in the HW.

Fix this by issuing a bnxt_hwrm_ring_grp_free() and an
bnxt_hwrm_ring_grp_alloc() to refresh the ring group information.

Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 3 +++
 drivers/net/bnxt/bnxt_ring.c | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 39778e38ef..d8b46f932a 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2576,6 +2576,9 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)
 	struct bnxt_ring *ring = rxr->rx_ring_struct;
 	struct bnxt_cp_ring_info *cpr = rxq->cp_ring;
 
+	if (BNXT_HAS_RING_GRPS(bp))
+		bnxt_hwrm_ring_grp_free(bp, queue_index);
+
 	bnxt_hwrm_ring_free(bp, ring,
 			    HWRM_RING_FREE_INPUT_RING_TYPE_RX);
 	if (BNXT_HAS_RING_GRPS(bp))
diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index 6834244e4c..4cfa818616 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -608,6 +608,12 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
 	if (rc)
 		goto err_out;
 
+	if (BNXT_HAS_RING_GRPS(bp)) {
+		rc = bnxt_hwrm_ring_grp_alloc(bp, queue_index);
+		if (rc)
+			goto err_out;
+	}
+
 	if (rxq->rx_started) {
 		if (bnxt_init_one_rx_ring(rxq)) {
 			PMD_DRV_LOG(ERR,
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.583326783 +0800
+++ 0010-net-bnxt-update-ring-group-after-ring-stop-start.patch	2021-11-10 14:17:01.750747073 +0800
@@ -1 +1 @@
-From ed0ae3502fc91adbf6eebe7047da887353844230 Mon Sep 17 00:00:00 2001
+From 83ec79465d8d8a72d22234732e616f16f98a7b64 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ed0ae3502fc91adbf6eebe7047da887353844230 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 73deb41f81..eb9de45cb9 100644
+index 39778e38ef..d8b46f932a 100644
@@ -30 +32 @@
-@@ -2717,6 +2717,9 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)
+@@ -2576,6 +2576,9 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)
@@ -38,2 +40,2 @@
- 			    HWRM_RING_FREE_INPUT_RING_TYPE_RX,
- 			    cpr->cp_ring_struct->fw_ring_id);
+ 			    HWRM_RING_FREE_INPUT_RING_TYPE_RX);
+ 	if (BNXT_HAS_RING_GRPS(bp))
@@ -41 +43 @@
-index b05c470766..957b175f1b 100644
+index 6834244e4c..4cfa818616 100644
@@ -44 +46 @@
-@@ -631,6 +631,12 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
+@@ -608,6 +608,12 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
@@ -56 +58 @@
- 			PMD_DRV_LOG(ERR, "bnxt_init_one_rx_ring failed!\n");
+ 			PMD_DRV_LOG(ERR,

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

* [dpdk-stable] patch 'app/testpmd: fix Tx retry in flowgen engine' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (9 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/bnxt: update ring group after ring stop start' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/bnxt: fix crash after port stop/start' " Xueming Li
                   ` (241 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Zhihong Wang; +Cc: Luca Boccassi, Xiaoyun Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d53332318f5138201e8ae30f405160145eb867ad Mon Sep 17 00:00:00 2001
From: Zhihong Wang <wangzhihong.wzh@bytedance.com>
Date: Fri, 13 Aug 2021 16:05:45 +0800
Subject: [PATCH] app/testpmd: fix Tx retry in flowgen engine
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ea275674a0c65dad334c8ab55ddd1d5a7e243af6 ]

Fix tx_pkt number in tx retry logic.

Fixes: bf56fce1fb45 ("app/testpmd: add retry option")

Signed-off-by: Zhihong Wang <wangzhihong.wzh@bytedance.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 app/test-pmd/flowgen.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index cabfc688ff..bb4bf85519 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -181,12 +181,12 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
 	/*
 	 * Retry if necessary
 	 */
-	if (unlikely(nb_tx < nb_rx) && fs->retry_enabled) {
+	if (unlikely(nb_tx < nb_pkt) && fs->retry_enabled) {
 		retry = 0;
-		while (nb_tx < nb_rx && retry++ < burst_tx_retry_num) {
+		while (nb_tx < nb_pkt && retry++ < burst_tx_retry_num) {
 			rte_delay_us(burst_tx_delay_time);
 			nb_tx += rte_eth_tx_burst(fs->tx_port, fs->tx_queue,
-					&pkts_burst[nb_tx], nb_rx - nb_tx);
+					&pkts_burst[nb_tx], nb_pkt - nb_tx);
 		}
 	}
 	fs->tx_packets += nb_tx;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.630682792 +0800
+++ 0011-app-testpmd-fix-Tx-retry-in-flowgen-engine.patch	2021-11-10 14:17:01.750747073 +0800
@@ -1 +1 @@
-From ea275674a0c65dad334c8ab55ddd1d5a7e243af6 Mon Sep 17 00:00:00 2001
+From d53332318f5138201e8ae30f405160145eb867ad Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ea275674a0c65dad334c8ab55ddd1d5a7e243af6 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 3bf6e1ce97..f2e6255c36 100644
+index cabfc688ff..bb4bf85519 100644
@@ -21 +23 @@
-@@ -192,12 +192,12 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
+@@ -181,12 +181,12 @@ pkt_burst_flow_gen(struct fwd_stream *fs)

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

* [dpdk-stable] patch 'net/bnxt: fix crash after port stop/start' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (10 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'app/testpmd: fix Tx retry in flowgen engine' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'app/testpmd: fix check without outer checksum' " Xueming Li
                   ` (240 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Luca Boccassi, Kalesh AP, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8f75f8b588670e687c5602f369a21244316fd344 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Mon, 23 Aug 2021 21:14:53 +0530
Subject: [PATCH] net/bnxt: fix crash after port stop/start
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 61cd4384fabf67d487a3ae85cff5babcdb41558f ]

On chips like Thor, port stop/start sequence could result in a crash
in the application. This is because of false detection of a bad
opaque in the Rx completion and the subsequent kicking-in of the ring
reset code to recover from the condition.
The root cause being that the port stop/start would result in the HW
starting with fresh values, while the driver internal tracker variable
`rx_next_cons` is still pointing to a stale value.
Fix this by resetting rx_next_cons to 0 in bnxt_init_one_rx_ring()

Fixes: 03c8f2fe111c ("net/bnxt: detect bad opaque in Rx completion")

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

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 41be74284b..655f09a9bf 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -1308,5 +1308,8 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
 	}
 	PMD_DRV_LOG(DEBUG, "TPA alloc Done!\n");
 
+	/* Explicitly reset this driver internal tracker on a ring init */
+	rxr->rx_next_cons = 0;
+
 	return 0;
 }
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.672364996 +0800
+++ 0012-net-bnxt-fix-crash-after-port-stop-start.patch	2021-11-10 14:17:01.754080379 +0800
@@ -1 +1 @@
-From 61cd4384fabf67d487a3ae85cff5babcdb41558f Mon Sep 17 00:00:00 2001
+From 8f75f8b588670e687c5602f369a21244316fd344 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 61cd4384fabf67d487a3ae85cff5babcdb41558f ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index aea71703d1..73fbdd17d1 100644
+index 41be74284b..655f09a9bf 100644
@@ -29 +31 @@
-@@ -1379,6 +1379,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
+@@ -1308,5 +1308,8 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
@@ -38 +39,0 @@
- 

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

* [dpdk-stable] patch 'app/testpmd: fix check without outer checksum' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (11 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/bnxt: fix crash after port stop/start' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'app/testpmd: fix dump of Tx offload flags' " Xueming Li
                   ` (239 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: Luca Boccassi, Xiaoyun Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3dc611ee158fda0bd0378a4a82207b38b187398d Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Mon, 16 Aug 2021 12:39:41 +0530
Subject: [PATCH] app/testpmd: fix check without outer checksum
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4219d7670e8535e7d4b43233866a587b015e3f43 ]

Donot use outer metadata when neither outer ip checksum nor
outer udp checksum is enabled. PMD's will ignore the
outer_l2_len and outer_l3_len in cases where none of
the outer checksum is enabled and hence only l2_len and
l3_len will be used to calculate the offsets for L2 or L3
header.

Fixes: 3c32113a1aac ("app/testpmd: fix IPv6 tunnel checksum")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 app/test-pmd/csumonly.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index b0a58e8573..aab59e0934 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -957,8 +957,7 @@ tunnel_update:
 			    (tx_offloads &
 			     DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) ||
 			    (tx_offloads &
-			     DEV_TX_OFFLOAD_OUTER_UDP_CKSUM) ||
-			    (tx_ol_flags & PKT_TX_OUTER_IPV6)) {
+			     DEV_TX_OFFLOAD_OUTER_UDP_CKSUM)) {
 				m->outer_l2_len = info.outer_l2_len;
 				m->outer_l3_len = info.outer_l3_len;
 				m->l2_len = info.l2_len;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.718926036 +0800
+++ 0013-app-testpmd-fix-check-without-outer-checksum.patch	2021-11-10 14:17:01.754080379 +0800
@@ -1 +1 @@
-From 4219d7670e8535e7d4b43233866a587b015e3f43 Mon Sep 17 00:00:00 2001
+From 3dc611ee158fda0bd0378a4a82207b38b187398d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4219d7670e8535e7d4b43233866a587b015e3f43 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 607c889359..38cc256533 100644
+index b0a58e8573..aab59e0934 100644
@@ -26 +28 @@
-@@ -961,8 +961,7 @@ tunnel_update:
+@@ -957,8 +957,7 @@ tunnel_update:

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

* [dpdk-stable] patch 'app/testpmd: fix dump of Tx offload flags' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (12 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'app/testpmd: fix check without outer checksum' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'crypto/octeontx2: fix unaligned access to device memory' " Xueming Li
                   ` (238 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Nithin Dabilpuram
  Cc: Luca Boccassi, Xiaoyun Li, Raslan Darawsheh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6e5dbe158642933be3be666308359a6f58e56571 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Mon, 16 Aug 2021 12:39:42 +0530
Subject: [PATCH] app/testpmd: fix dump of Tx offload flags
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit eeedef704c11bd74c367d62838700bdb8e5b573f ]

Fix verbose mode dump for Tx to dump tx offload flags instead of
Rx offload flags.

Fixes: d862c45b5955 ("app/testpmd: move dumping packets to a separate function")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Raslan Darawsheh <rasland@nvidia.com>
---
 app/test-pmd/util.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c
index a9e431a8b2..2682259678 100644
--- a/app/test-pmd/util.c
+++ b/app/test-pmd/util.c
@@ -274,7 +274,11 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
 			  " - %s queue=0x%x", is_rx ? "Receive" : "Send",
 			  (unsigned int) queue);
 		MKDUMPSTR(print_buf, buf_size, cur_len, "\n");
-		rte_get_rx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
+		if (is_rx)
+			rte_get_rx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
+		else
+			rte_get_tx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
+
 		MKDUMPSTR(print_buf, buf_size, cur_len,
 			  "  ol_flags: %s\n", buf);
 		if (rte_mbuf_check(mb, 1, &reason) < 0)
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.761982280 +0800
+++ 0014-app-testpmd-fix-dump-of-Tx-offload-flags.patch	2021-11-10 14:17:01.754080379 +0800
@@ -1 +1 @@
-From eeedef704c11bd74c367d62838700bdb8e5b573f Mon Sep 17 00:00:00 2001
+From 6e5dbe158642933be3be666308359a6f58e56571 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit eeedef704c11bd74c367d62838700bdb8e5b573f ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 5dd7157947..14a9a251fb 100644
+index a9e431a8b2..2682259678 100644
@@ -23 +25 @@
-@@ -275,7 +275,11 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
+@@ -274,7 +274,11 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],

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

* [dpdk-stable] patch 'crypto/octeontx2: fix unaligned access to device memory' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (13 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'app/testpmd: fix dump of Tx offload flags' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'eal/ppc: ignore GCC 10 stringop-overflow warnings' " Xueming Li
                   ` (237 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Danny Patel; +Cc: Luca Boccassi, Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e4509540bed8f2a21e17fe47ee90214db00ffecd Mon Sep 17 00:00:00 2001
From: Danny Patel <dannyp@marvell.com>
Date: Fri, 27 Aug 2021 11:03:58 +0530
Subject: [PATCH] crypto/octeontx2: fix unaligned access to device memory
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 05f157b8c5b469173712b0ab7daa91bbe52ec1df ]

Use otx2_mbox_memcpy() instead of memcpy() to prevent unaligned access.

Fixes: a0645ed0d6ef ("crypto/octeontx2: discover capabilities")

Signed-off-by: Danny Patel <dannyp@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 drivers/crypto/octeontx2/otx2_cryptodev_mbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_mbox.c b/drivers/crypto/octeontx2/otx2_cryptodev_mbox.c
index 75e610db5c..d762baf927 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev_mbox.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev_mbox.c
@@ -36,7 +36,7 @@ otx2_cpt_hardware_caps_get(const struct rte_cryptodev *dev,
 		return -EPIPE;
 	}
 
-	memcpy(hw_caps, rsp->eng_caps,
+	otx2_mbox_memcpy(hw_caps, rsp->eng_caps,
 		sizeof(union cpt_eng_caps) * CPT_MAX_ENG_TYPES);
 
 	return 0;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.803791067 +0800
+++ 0015-crypto-octeontx2-fix-unaligned-access-to-device-memo.patch	2021-11-10 14:17:01.754080379 +0800
@@ -1 +1 @@
-From 05f157b8c5b469173712b0ab7daa91bbe52ec1df Mon Sep 17 00:00:00 2001
+From e4509540bed8f2a21e17fe47ee90214db00ffecd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 05f157b8c5b469173712b0ab7daa91bbe52ec1df ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 812515fc1b..1a8edae7eb 100644
+index 75e610db5c..d762baf927 100644
@@ -21 +23,2 @@
-@@ -37,7 +37,7 @@ otx2_cpt_hardware_caps_get(const struct rte_cryptodev *dev,
+@@ -36,7 +36,7 @@ otx2_cpt_hardware_caps_get(const struct rte_cryptodev *dev,
+ 		return -EPIPE;
@@ -24 +26,0 @@
- 	vf->cpt_revision = rsp->cpt_revision;

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

* [dpdk-stable] patch 'eal/ppc: ignore GCC 10 stringop-overflow warnings' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (14 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'crypto/octeontx2: fix unaligned access to device memory' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'config/ppc: ignore GCC 11 psabi " Xueming Li
                   ` (236 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: David Christensen; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9102608a1cf447c8f3e8ccd9439fa94077cd4c97 Mon Sep 17 00:00:00 2001
From: David Christensen <drc@linux.vnet.ibm.com>
Date: Thu, 2 Sep 2021 15:15:14 -0700
Subject: [PATCH] eal/ppc: ignore GCC 10 stringop-overflow warnings
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c13e6177394365d4db1595ea038bd9c3de04d32f ]

Suppress gcc warning "warning: writing 16 bytes into a region of
size 0" for users of the POWER rte_memcpy() function.  Existing
rte_memcpy() code takes different code paths based on the actual
size of the move so the warning is already addressed. See also
commit b5b3ea803e47 ("eal/x86: ignore gcc 10 stringop-overflow warnings")

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
---
 lib/librte_eal/ppc/include/rte_memcpy.h | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/lib/librte_eal/ppc/include/rte_memcpy.h b/lib/librte_eal/ppc/include/rte_memcpy.h
index c2a1f356d5..6f388c0234 100644
--- a/lib/librte_eal/ppc/include/rte_memcpy.h
+++ b/lib/librte_eal/ppc/include/rte_memcpy.h
@@ -1,6 +1,6 @@
 /*
  * SPDX-License-Identifier: BSD-3-Clause
- * Copyright (C) IBM Corporation 2014.
+ * Copyright (C) IBM Corporation 2014,2021
  */
 
 #ifndef _RTE_MEMCPY_PPC_64_H_
@@ -18,11 +18,16 @@ extern "C" {
 
 #include "generic/rte_memcpy.h"
 
-#if (GCC_VERSION >= 90000 && GCC_VERSION < 90400)
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 90000)
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Warray-bounds"
 #endif
 
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 100000)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-overflow"
+#endif
+
 static inline void
 rte_mov16(uint8_t *dst, const uint8_t *src)
 {
@@ -198,7 +203,11 @@ rte_memcpy_func(void *dst, const void *src, size_t n)
 	return ret;
 }
 
-#if (GCC_VERSION >= 90000 && GCC_VERSION < 90400)
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 100000)
+#pragma GCC diagnostic pop
+#endif
+
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 90000)
 #pragma GCC diagnostic pop
 #endif
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.845231336 +0800
+++ 0016-eal-ppc-ignore-GCC-10-stringop-overflow-warnings.patch	2021-11-10 14:17:01.754080379 +0800
@@ -1 +1 @@
-From c13e6177394365d4db1595ea038bd9c3de04d32f Mon Sep 17 00:00:00 2001
+From 9102608a1cf447c8f3e8ccd9439fa94077cd4c97 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c13e6177394365d4db1595ea038bd9c3de04d32f ]
@@ -12,2 +14,0 @@
-Cc: stable@dpdk.org
-
@@ -16 +17 @@
- lib/eal/ppc/include/rte_memcpy.h | 15 ++++++++++++---
+ lib/librte_eal/ppc/include/rte_memcpy.h | 15 ++++++++++++---
@@ -19 +20 @@
-diff --git a/lib/eal/ppc/include/rte_memcpy.h b/lib/eal/ppc/include/rte_memcpy.h
+diff --git a/lib/librte_eal/ppc/include/rte_memcpy.h b/lib/librte_eal/ppc/include/rte_memcpy.h
@@ -21,2 +22,2 @@
---- a/lib/eal/ppc/include/rte_memcpy.h
-+++ b/lib/eal/ppc/include/rte_memcpy.h
+--- a/lib/librte_eal/ppc/include/rte_memcpy.h
++++ b/lib/librte_eal/ppc/include/rte_memcpy.h

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

* [dpdk-stable] patch 'config/ppc: ignore GCC 11 psabi warnings' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (15 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'eal/ppc: ignore GCC 10 stringop-overflow warnings' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'crypto/openssl: fix CCM processing 0 length source' " Xueming Li
                   ` (235 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: David Christensen; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c3672a36e6fdf7cc3402ea2ce3c475df0d645c2b Mon Sep 17 00:00:00 2001
From: David Christensen <drc@linux.vnet.ibm.com>
Date: Thu, 2 Sep 2021 16:53:26 -0700
Subject: [PATCH] config/ppc: ignore GCC 11 psabi warnings
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 394407f50c90ca3ce4b882aefb9e26eae4ba6bca ]

Suppress the gcc warning "note: the layout of aggregates containing
vectors with 4-byte alignment has changed in GCC 5" on POWER systems
by setting "-Wno-psabi".  Warning was originally added to gcc in
commit https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=9832651 to warn
of the vector alignment changes introduced in GCC 5.  Older gcc
versions forced vector alignment to 16 bytes due to requirements for
POWER 6 and earlier CPUs, but these restrictions don't apply to CPUs
supported by DPDK.

Bugzilla ID: 739

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
---
 config/ppc/meson.build | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/config/ppc/meson.build b/config/ppc/meson.build
index ed6ea07d24..bea72f86b5 100644
--- a/config/ppc/meson.build
+++ b/config/ppc/meson.build
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
+# Copyright(c) 2021 IBM Corporation
 
 if not dpdk_conf.get('RTE_ARCH_64')
 	error('Only 64-bit compiles are supported for this platform type')
@@ -17,6 +18,13 @@ if not power9_supported
 	dpdk_conf.set('RTE_MACHINE','power8')
 endif
 
+# Suppress the gcc warning "note: the layout of aggregates containing
+# vectors with 4-byte alignment has changed in GCC 5".
+if cc.get_id() == 'gcc' and cc.version().version_compare('>=10.0') and
+        cc.version().version_compare('<12.0') and cc.has_argument('-Wno-psabi')
+    add_project_arguments('-Wno-psabi', language: 'c')
+endif
+
 # Certain POWER9 systems can scale as high as 1536 LCORES, but setting such a
 # high value can waste memory, cause timeouts in time limited autotests, and is
 # unlikely to be used in many production situations.  Similarly, keeping the
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.886643807 +0800
+++ 0017-config-ppc-ignore-GCC-11-psabi-warnings.patch	2021-11-10 14:17:01.754080379 +0800
@@ -1 +1 @@
-From 394407f50c90ca3ce4b882aefb9e26eae4ba6bca Mon Sep 17 00:00:00 2001
+From c3672a36e6fdf7cc3402ea2ce3c475df0d645c2b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 394407f50c90ca3ce4b882aefb9e26eae4ba6bca ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index adf49e1f42..0b1948fc7c 100644
+index ed6ea07d24..bea72f86b5 100644
@@ -33 +35 @@
-     error('Only 64-bit compiles are supported for this platform type')
+ 	error('Only 64-bit compiles are supported for this platform type')
@@ -35 +37 @@
-     dpdk_conf.set('RTE_MACHINE','power8')
+ 	dpdk_conf.set('RTE_MACHINE','power8')

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

* [dpdk-stable] patch 'crypto/openssl: fix CCM processing 0 length source' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (16 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'config/ppc: ignore GCC 11 psabi " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'common/dpaax/caamflib: fix IV for short MAC-I in SNOW3G' " Xueming Li
                   ` (234 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Ciara Power; +Cc: Luca Boccassi, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 52ed92cfb6b9933746264d9bb696bfdbf4dc230c Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Mon, 23 Aug 2021 12:47:14 +0000
Subject: [PATCH] crypto/openssl: fix CCM processing 0 length source
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 589f5e033d0d8489e0d4bf2f54332febf483f764 ]

When given a source length 0 for CCM, the encryption and decryption
functions did not call the EVP_ENCRYPTUPDATE/EVP_DECRYPTUPDATE functions
with a src and dst, causing some FIPS validation failures for testcases
with PLen=0:

process_openssl_auth_encryption_ccm() line 1131:
Process openssl auth encryption ccm failed

Fixes: 1a4998dc4d94 ("crypto/openssl: support AES-CCM")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 7d3959f550..ca4265d2be 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1114,7 +1114,7 @@ process_openssl_auth_encryption_ccm(struct rte_mbuf *mbuf_src, int offset,
 		if (EVP_EncryptUpdate(ctx, NULL, &len, aad + 18, aadlen) <= 0)
 			goto process_auth_encryption_ccm_err;
 
-	if (srclen > 0)
+	if (srclen >= 0)
 		if (process_openssl_encryption_update(mbuf_src, offset, &dst,
 				srclen, ctx, 0))
 			goto process_auth_encryption_ccm_err;
@@ -1197,7 +1197,7 @@ process_openssl_auth_decryption_ccm(struct rte_mbuf *mbuf_src, int offset,
 		if (EVP_DecryptUpdate(ctx, NULL, &len, aad + 18, aadlen) <= 0)
 			goto process_auth_decryption_ccm_err;
 
-	if (srclen > 0)
+	if (srclen >= 0)
 		if (process_openssl_decryption_update(mbuf_src, offset, &dst,
 				srclen, ctx, 0))
 			return -EFAULT;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.928050624 +0800
+++ 0018-crypto-openssl-fix-CCM-processing-0-length-source.patch	2021-11-10 14:17:01.754080379 +0800
@@ -1 +1 @@
-From 589f5e033d0d8489e0d4bf2f54332febf483f764 Mon Sep 17 00:00:00 2001
+From 52ed92cfb6b9933746264d9bb696bfdbf4dc230c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 589f5e033d0d8489e0d4bf2f54332febf483f764 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 47004337d5..37b969b916 100644
+index 7d3959f550..ca4265d2be 100644

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

* [dpdk-stable] patch 'common/dpaax/caamflib: fix IV for short MAC-I in SNOW3G' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (17 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'crypto/openssl: fix CCM processing 0 length source' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/nfp: fix minimum descriptor sizes' " Xueming Li
                   ` (233 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Luca Boccassi, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1f83882dacc679ecc49453e8332f3b499f4a630f Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 8 Sep 2021 12:29:51 +0530
Subject: [PATCH] common/dpaax/caamflib: fix IV for short MAC-I in SNOW3G
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c0182d6b752e3fe320f8f8e3db6256cd21234d9a ]

The logic was incorrectly doing conditional swap. It need to
be bit swap always.

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

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

diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h
index f084cf1de0..51d40b5dd9 100644
--- a/drivers/common/dpaax/caamflib/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: BSD-3-Clause or GPL-2.0+
  * Copyright 2008-2013 Freescale Semiconductor, Inc.
- * Copyright 2019-2020 NXP
+ * Copyright 2019-2021 NXP
  */
 
 #ifndef __DESC_PDCP_H__
@@ -3710,9 +3710,10 @@ cnstr_shdsc_pdcp_short_mac(uint32_t *descbuf,
 		break;
 
 	case PDCP_AUTH_TYPE_SNOW:
+		/* IV calculation based on 3GPP specs. 36331, section:5.3.7.4 */
 		iv[0] = 0xFFFFFFFF;
-		iv[1] = swap ? swab32(0x04000000) : 0x04000000;
-		iv[2] = swap ? swab32(0xF8000000) : 0xF8000000;
+		iv[1] = swab32(0x04000000);
+		iv[2] = swab32(0xF8000000);
 
 		KEY(p, KEY2, authdata->key_enc_flags, authdata->key,
 		    authdata->keylen, INLINE_KEY(authdata));
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:02.970575592 +0800
+++ 0019-common-dpaax-caamflib-fix-IV-for-short-MAC-I-in-SNOW.patch	2021-11-10 14:17:01.757413685 +0800
@@ -1 +1 @@
-From c0182d6b752e3fe320f8f8e3db6256cd21234d9a Mon Sep 17 00:00:00 2001
+From 1f83882dacc679ecc49453e8332f3b499f4a630f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c0182d6b752e3fe320f8f8e3db6256cd21234d9a ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 5b3d846099..8e8daf5ba8 100644
+index f084cf1de0..51d40b5dd9 100644
@@ -30 +32 @@
-@@ -3715,9 +3715,10 @@ cnstr_shdsc_pdcp_short_mac(uint32_t *descbuf,
+@@ -3710,9 +3710,10 @@ cnstr_shdsc_pdcp_short_mac(uint32_t *descbuf,

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

* [dpdk-stable] patch 'net/nfp: fix minimum descriptor sizes' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (18 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'common/dpaax/caamflib: fix IV for short MAC-I in SNOW3G' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice: fix memzone leak after device init failure' " Xueming Li
                   ` (232 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Heinrich Kuhn; +Cc: Luca Boccassi, Simon Horman, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 877a05209a26c5543d1bf9a2bf8cb023e5d59b94 Mon Sep 17 00:00:00 2001
From: Heinrich Kuhn <heinrich.kuhn@corigine.com>
Date: Mon, 23 Aug 2021 09:59:21 +0200
Subject: [PATCH] net/nfp: fix minimum descriptor sizes
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 96289f2b80e5921a3da54650f382b6944d9b39df ]

The NFP4000/6000 supports a minimum of 256 Tx/Rx descriptors and not 64.
Before this patch when a DPDK application configured < 256 Tx
descriptors the hardware read/write pointers would be unmasked and not
wrapped at the expected size of the ring. The PMD logic to determine the
amount of free space in the Tx ring is incompatible with the unmasked
hwqueue pointers and this will result in the PMD not updating the
read pointer at all.The knock-on effect is that under high load the
PMD will potentially re-use a Tx descriptor before the hw has had a
chance to process that particular descriptor. This issue can manifest as
a DMA error when the hardware tries to perform a DMA with info from a
partially populated descriptor.

Fixes: defb9a5dd156 ("nfp: introduce driver initialization")

Signed-off-by: Heinrich Kuhn <heinrich.kuhn@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
---
 drivers/net/nfp/nfp_net_pmd.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h
index 1295c5959e..444c1b3773 100644
--- a/drivers/net/nfp/nfp_net_pmd.h
+++ b/drivers/net/nfp/nfp_net_pmd.h
@@ -28,10 +28,10 @@ struct nfp_net_adapter;
  * DPDK uses uint16_t variables for these values
  */
 #define NFP_NET_MAX_TX_DESC (32 * 1024)
-#define NFP_NET_MIN_TX_DESC 64
+#define NFP_NET_MIN_TX_DESC 256
 
 #define NFP_NET_MAX_RX_DESC (32 * 1024)
-#define NFP_NET_MIN_RX_DESC 64
+#define NFP_NET_MIN_RX_DESC 256
 
 /* Descriptor alignment */
 #define NFP_ALIGN_RING_DESC 128
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.014728008 +0800
+++ 0020-net-nfp-fix-minimum-descriptor-sizes.patch	2021-11-10 14:17:01.757413685 +0800
@@ -1 +1 @@
-From 96289f2b80e5921a3da54650f382b6944d9b39df Mon Sep 17 00:00:00 2001
+From 877a05209a26c5543d1bf9a2bf8cb023e5d59b94 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 96289f2b80e5921a3da54650f382b6944d9b39df ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
- drivers/net/nfp/nfp_rxtx.h | 4 ++--
+ drivers/net/nfp/nfp_net_pmd.h | 4 ++--
@@ -27,5 +29,5 @@
-diff --git a/drivers/net/nfp/nfp_rxtx.h b/drivers/net/nfp/nfp_rxtx.h
-index d2d0f3f175..b0a8bf81b0 100644
---- a/drivers/net/nfp/nfp_rxtx.h
-+++ b/drivers/net/nfp/nfp_rxtx.h
-@@ -30,10 +30,10 @@
+diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h
+index 1295c5959e..444c1b3773 100644
+--- a/drivers/net/nfp/nfp_net_pmd.h
++++ b/drivers/net/nfp/nfp_net_pmd.h
+@@ -28,10 +28,10 @@ struct nfp_net_adapter;

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

* [dpdk-stable] patch 'net/ice: fix memzone leak after device init failure' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (19 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/nfp: fix minimum descriptor sizes' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice: fix RXDID default value in DCF' " Xueming Li
                   ` (231 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Haiyue Wang; +Cc: Luca Boccassi, David Marchand, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 34a2e17afc46a0ac011f42293f61514430b247be Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Fri, 13 Aug 2021 14:21:54 +0800
Subject: [PATCH] net/ice: fix memzone leak after device init failure
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 96b25c496aadae16c548ea25c0267a73154dbd64 ]

When flow engine initialization or FXP resource reset failed, it needs
to free the memory zone and unregister the interrupt callback.

Bugzilla ID: 752
Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine")
Fixes: 7615a6895009 ("net/ice: rework for generic flow enabling")
Fixes: 7edc7158d771 ("net/ice: cleanup RSS/FDIR profile on device init")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c      | 10 ++++++++--
 drivers/net/ice/ice_fdir_filter.c |  2 ++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index c153c7ca78..02644deeed 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2258,20 +2258,26 @@ ice_dev_init(struct rte_eth_dev *dev)
 		ret = ice_flow_init(ad);
 		if (ret) {
 			PMD_INIT_LOG(ERR, "Failed to initialize flow");
-			return ret;
+			goto err_flow_init;
 		}
 	}
 
 	ret = ice_reset_fxp_resource(hw);
 	if (ret) {
 		PMD_INIT_LOG(ERR, "Failed to reset fxp resource");
-		return ret;
+		goto err_flow_init;
 	}
 
 	pf->supported_rxdid = ice_get_supported_rxdid(hw);
 
 	return 0;
 
+err_flow_init:
+	ice_flow_uninit(ad);
+	rte_intr_disable(intr_handle);
+	ice_pf_disable_irq0(hw);
+	rte_intr_callback_unregister(intr_handle,
+				     ice_interrupt_handler, dev);
 err_pf_setup:
 	ice_res_pool_destroy(&pf->msix_pool);
 err_msix_pool_init:
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 4a071254ce..bb720d1036 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -659,8 +659,10 @@ ice_fdir_teardown(struct ice_pf *pf)
 
 	ice_tx_queue_release(pf->fdir.txq);
 	pf->fdir.txq = NULL;
+	rte_eth_dma_zone_free(eth_dev, "fdir_tx_ring", ICE_FDIR_QUEUE_ID);
 	ice_rx_queue_release(pf->fdir.rxq);
 	pf->fdir.rxq = NULL;
+	rte_eth_dma_zone_free(eth_dev, "fdir_rx_ring", ICE_FDIR_QUEUE_ID);
 	ice_fdir_prof_rm_all(pf);
 	ice_fdir_prof_free(hw);
 	ice_release_vsi(vsi);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.056563545 +0800
+++ 0021-net-ice-fix-memzone-leak-after-device-init-failure.patch	2021-11-10 14:17:01.760746991 +0800
@@ -1 +1 @@
-From 96b25c496aadae16c548ea25c0267a73154dbd64 Mon Sep 17 00:00:00 2001
+From 34a2e17afc46a0ac011f42293f61514430b247be Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 96b25c496aadae16c548ea25c0267a73154dbd64 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index a4cd39c954..0683296584 100644
+index c153c7ca78..02644deeed 100644
@@ -27 +29 @@
-@@ -2139,20 +2139,26 @@ ice_dev_init(struct rte_eth_dev *dev)
+@@ -2258,20 +2258,26 @@ ice_dev_init(struct rte_eth_dev *dev)
@@ -57 +59 @@
-index 82adb1fc8b..7ba65b9b04 100644
+index 4a071254ce..bb720d1036 100644
@@ -60 +62 @@
-@@ -651,8 +651,10 @@ ice_fdir_teardown(struct ice_pf *pf)
+@@ -659,8 +659,10 @@ ice_fdir_teardown(struct ice_pf *pf)

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

* [dpdk-stable] patch 'net/ice: fix RXDID default value in DCF' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (20 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice: fix memzone leak after device init failure' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice: fix deadlock on flow query' " Xueming Li
                   ` (230 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Luca Boccassi, Zhimin Huang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e244e8c066d4a5473f546ea9e31ec221eb3118cd Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 17 Aug 2021 11:41:23 +0800
Subject: [PATCH] net/ice: fix RXDID default value in DCF
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit fb50aadcb3c0e137c8751d6c47faf75945df9577 ]

Since DPDK 20.11 the default rxdid is changed from 16 to 22, but the
DCF data path didn't change, the patch fix the gap.

Fixes: 12443386a0b0 ("net/ice: support flex Rx descriptor RxDID22")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Zhimin Huang <zhiminx.huang@intel.com>
---
 drivers/net/ice/ice_dcf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 294ddcd2e1..3925a51f12 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -828,7 +828,7 @@ ice_dcf_init_rss(struct ice_dcf_hw *hw)
 
 #define IAVF_RXDID_LEGACY_0 0
 #define IAVF_RXDID_LEGACY_1 1
-#define IAVF_RXDID_COMMS_GENERIC 16
+#define IAVF_RXDID_COMMS_OVS_1 22
 
 int
 ice_dcf_configure_queues(struct ice_dcf_hw *hw)
@@ -876,8 +876,8 @@ ice_dcf_configure_queues(struct ice_dcf_hw *hw)
 		if (hw->vf_res->vf_cap_flags &
 		    VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC &&
 		    hw->supported_rxdid &
-		    BIT(IAVF_RXDID_COMMS_GENERIC)) {
-			vc_qp->rxq.rxdid = IAVF_RXDID_COMMS_GENERIC;
+		    BIT(IAVF_RXDID_COMMS_OVS_1)) {
+			vc_qp->rxq.rxdid = IAVF_RXDID_COMMS_OVS_1;
 			PMD_DRV_LOG(NOTICE, "request RXDID == %d in "
 				    "Queue[%d]", vc_qp->rxq.rxdid, i);
 		} else {
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.103181160 +0800
+++ 0022-net-ice-fix-RXDID-default-value-in-DCF.patch	2021-11-10 14:17:01.760746991 +0800
@@ -1 +1 @@
-From fb50aadcb3c0e137c8751d6c47faf75945df9577 Mon Sep 17 00:00:00 2001
+From e244e8c066d4a5473f546ea9e31ec221eb3118cd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fb50aadcb3c0e137c8751d6c47faf75945df9577 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 4c2e0c7216..5b23cc90e0 100644
+index 294ddcd2e1..3925a51f12 100644
@@ -22 +24 @@
-@@ -847,7 +847,7 @@ ice_dcf_init_rss(struct ice_dcf_hw *hw)
+@@ -828,7 +828,7 @@ ice_dcf_init_rss(struct ice_dcf_hw *hw)
@@ -31 +33 @@
-@@ -895,8 +895,8 @@ ice_dcf_configure_queues(struct ice_dcf_hw *hw)
+@@ -876,8 +876,8 @@ ice_dcf_configure_queues(struct ice_dcf_hw *hw)

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

* [dpdk-stable] patch 'net/ice: fix deadlock on flow query' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (21 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice: fix RXDID default value in DCF' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice: fix queue config in DCF' " Xueming Li
                   ` (229 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Yu Wenjun; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7722837b520249b1374fa6f30b34db09b34f6ed7 Mon Sep 17 00:00:00 2001
From: Yu Wenjun <yuwenjun0x@163.com>
Date: Thu, 19 Aug 2021 20:10:02 +0800
Subject: [PATCH] net/ice: fix deadlock on flow query
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 22db014997c68928711e5b9e948ac3986ec1ed58 ]

Default case of the switch statement causes deadlock because it returns
without unlocking the 'flow_ops_lock' lock. Fixing it.

Fixes: 0d6ef740e411 ("net/ice: support flow ops thread safe")

Signed-off-by: Yu Wenjun <yuwenjun0x@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_generic_flow.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index 1429cbc3b6..15667c7252 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -2360,15 +2360,16 @@ ice_flow_query(struct rte_eth_dev *dev,
 			ret = flow->engine->query_count(ad, flow, count, error);
 			break;
 		default:
-			return rte_flow_error_set(error, ENOTSUP,
+			ret = rte_flow_error_set(error, ENOTSUP,
 					RTE_FLOW_ERROR_TYPE_ACTION,
 					actions,
 					"action not supported");
+			goto out;
 		}
 	}
 
+out:
 	rte_spinlock_unlock(&pf->flow_ops_lock);
-
 	return ret;
 }
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.145274924 +0800
+++ 0023-net-ice-fix-deadlock-on-flow-query.patch	2021-11-10 14:17:01.764080297 +0800
@@ -1 +1 @@
-From 22db014997c68928711e5b9e948ac3986ec1ed58 Mon Sep 17 00:00:00 2001
+From 7722837b520249b1374fa6f30b34db09b34f6ed7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 22db014997c68928711e5b9e948ac3986ec1ed58 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 66b5743abf..c2fa75f165 100644
+index 1429cbc3b6..15667c7252 100644
@@ -22 +24 @@
-@@ -2518,15 +2518,16 @@ ice_flow_query(struct rte_eth_dev *dev,
+@@ -2360,15 +2360,16 @@ ice_flow_query(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/ice: fix queue config in DCF' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (22 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice: fix deadlock on flow query' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/iavf: fix overflow in maximum packet length config' " Xueming Li
                   ` (228 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Jie Wang; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 073599bf922da392da2107290727108ca3d1534c Mon Sep 17 00:00:00 2001
From: Jie Wang <jie1x.wang@intel.com>
Date: Tue, 24 Aug 2021 15:13:17 +0000
Subject: [PATCH] net/ice: fix queue config in DCF
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 415363e2fc58ad89caf65d3d170b004751376f1a ]

When DCF configures rx_queues, it may cause the pointer of
rx_queues to go out of bounds.

This patch expands the scope of the judgment condition to
fix this issue.

Fixes: 4b0d391f0eab ("net/ice: add queue config in DCF")

Signed-off-by: Jie Wang <jie1x.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_dcf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 3925a51f12..6a24f4f36c 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -863,11 +863,11 @@ ice_dcf_configure_queues(struct ice_dcf_hw *hw)
 		}
 		vc_qp->rxq.vsi_id = hw->vsi_res->vsi_id;
 		vc_qp->rxq.queue_id = i;
-		vc_qp->rxq.max_pkt_size = rxq[i]->max_pkt_len;
 
 		if (i >= hw->eth_dev->data->nb_rx_queues)
 			continue;
 
+		vc_qp->rxq.max_pkt_size = rxq[i]->max_pkt_len;
 		vc_qp->rxq.ring_len = rxq[i]->nb_rx_desc;
 		vc_qp->rxq.dma_ring_addr = rxq[i]->rx_ring_dma;
 		vc_qp->rxq.databuffer_size = rxq[i]->rx_buf_len;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.187932589 +0800
+++ 0024-net-ice-fix-queue-config-in-DCF.patch	2021-11-10 14:17:01.764080297 +0800
@@ -1 +1 @@
-From 415363e2fc58ad89caf65d3d170b004751376f1a Mon Sep 17 00:00:00 2001
+From 073599bf922da392da2107290727108ca3d1534c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 415363e2fc58ad89caf65d3d170b004751376f1a ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 5b23cc90e0..ee3c85b90d 100644
+index 3925a51f12..6a24f4f36c 100644
@@ -25 +27 @@
-@@ -882,11 +882,11 @@ ice_dcf_configure_queues(struct ice_dcf_hw *hw)
+@@ -863,11 +863,11 @@ ice_dcf_configure_queues(struct ice_dcf_hw *hw)

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

* [dpdk-stable] patch 'net/iavf: fix overflow in maximum packet length config' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (23 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice: fix queue config in DCF' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ixgbe: fix Rx multicast statistics after reset' " Xueming Li
                   ` (227 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Tudor Cornea; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c660ad64aae2f2174d5160de227ec965b35c0eda Mon Sep 17 00:00:00 2001
From: Tudor Cornea <tudor.cornea@gmail.com>
Date: Thu, 5 Aug 2021 14:35:23 +0300
Subject: [PATCH] net/iavf: fix overflow in maximum packet length config
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7fe741821337f3cbeecac768b8ef3a16bf21c938 ]

The len variable, used in the computation of max_pkt_len could
overflow, if used to store the result of the following computation:

rxq->rx_buf_len * IAVF_MAX_CHAINED_RX_BUFFERS

Since, we could define the mbuf size to have a large value (i.e 13312),
and IAVF_MAX_CHAINED_RX_BUFFERS is defined as 5, the computation
mentioned above could potentially result in a value which might be
bigger than MAX_USHORT.

The result will be that Jumbo Frames will not work properly

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Signed-off-by: Tudor Cornea <tudor.cornea@gmail.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 9671c957d8..885b2a4bd0 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -408,13 +408,14 @@ iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq)
 {
 	struct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct rte_eth_dev_data *dev_data = dev->data;
-	uint16_t buf_size, max_pkt_len, len;
+	uint16_t buf_size, max_pkt_len;
 
 	buf_size = rte_pktmbuf_data_room_size(rxq->mp) - RTE_PKTMBUF_HEADROOM;
 
 	/* Calculate the maximum packet length allowed */
-	len = rxq->rx_buf_len * IAVF_MAX_CHAINED_RX_BUFFERS;
-	max_pkt_len = RTE_MIN(len, dev->data->dev_conf.rxmode.max_rx_pkt_len);
+	max_pkt_len = RTE_MIN((uint32_t)
+			rxq->rx_buf_len * IAVF_MAX_CHAINED_RX_BUFFERS,
+			dev->data->dev_conf.rxmode.max_rx_pkt_len);
 
 	/* Check if the jumbo frame and maximum packet length are set
 	 * correctly.
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.234998975 +0800
+++ 0025-net-iavf-fix-overflow-in-maximum-packet-length-confi.patch	2021-11-10 14:17:01.764080297 +0800
@@ -1 +1 @@
-From 7fe741821337f3cbeecac768b8ef3a16bf21c938 Mon Sep 17 00:00:00 2001
+From c660ad64aae2f2174d5160de227ec965b35c0eda Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7fe741821337f3cbeecac768b8ef3a16bf21c938 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 574cfe055e..dc5cbc22f5 100644
+index 9671c957d8..885b2a4bd0 100644
@@ -31 +33 @@
-@@ -574,13 +574,14 @@ iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq)
+@@ -408,13 +408,14 @@ iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq)

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

* [dpdk-stable] patch 'net/ixgbe: fix Rx multicast statistics after reset' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (24 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/iavf: fix overflow in maximum packet length config' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/bnxt: fix mbuf VLAN in scalar Rx' " Xueming Li
                   ` (226 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Qiming Chen; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9f02c498bf8f31e2dda1d2665ff0fe015265dfa6 Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Mon, 30 Aug 2021 11:31:57 +0800
Subject: [PATCH] net/ixgbe: fix Rx multicast statistics after reset
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8908691632a51a81d6ce27d3d12a8781842a7518 ]

In the implementation of the VF driver ixgbevf_update_stats to obtain
statistics, the multicast count hw_stats->vfmprc has been obtained,
but it is not cleared in the corresponding ixgbevf_dev_stats_reset
interface.

Fixes: abf7275bbaa2 ("ixgbe: move to drivers/net/")

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 61bcf80b47..bf0e850402 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3791,6 +3791,7 @@ ixgbevf_dev_stats_reset(struct rte_eth_dev *dev)
 	hw_stats->vfgorc = 0;
 	hw_stats->vfgptc = 0;
 	hw_stats->vfgotc = 0;
+	hw_stats->vfmprc = 0;
 
 	return 0;
 }
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.278987026 +0800
+++ 0026-net-ixgbe-fix-Rx-multicast-statistics-after-reset.patch	2021-11-10 14:17:01.767413603 +0800
@@ -1 +1 @@
-From 8908691632a51a81d6ce27d3d12a8781842a7518 Mon Sep 17 00:00:00 2001
+From 9f02c498bf8f31e2dda1d2665ff0fe015265dfa6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8908691632a51a81d6ce27d3d12a8781842a7518 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index b5371568b5..ccb01ed344 100644
+index 61bcf80b47..bf0e850402 100644
@@ -24 +26 @@
-@@ -3798,6 +3798,7 @@ ixgbevf_dev_stats_reset(struct rte_eth_dev *dev)
+@@ -3791,6 +3791,7 @@ ixgbevf_dev_stats_reset(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/bnxt: fix mbuf VLAN in scalar Rx' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (25 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ixgbe: fix Rx multicast statistics after reset' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/bnxt: check FW capability for VLAN offloads' " Xueming Li
                   ` (225 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Kalesh AP
  Cc: Luca Boccassi, Somnath Kotur, Lance Richardson, Ajit Khaparde,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 16f8bcc3d8dea84d2bf65f3d7d33d9690eb645cf Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Mon, 23 Aug 2021 13:42:12 +0530
Subject: [PATCH] net/bnxt: fix mbuf VLAN in scalar Rx
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 167978c1678fc5fd525e4e731de4c00093aee129 ]

In the scalar Rx path, for the VLAN packet, TCI is not saved in
the "mbuf->vlan_tci", however the STRIPPED offload flag is set
along with PKT_RX_VLAN flag.

Fixes: c1b33d40315f ("net/bnxt: use table based mbuf flags handling")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c |  2 ++
 drivers/net/bnxt/bnxt_rxr.h | 10 ++++++++++
 2 files changed, 12 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 655f09a9bf..6b3603d11f 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -891,6 +891,8 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 	}
 #endif
 
+	bnxt_set_vlan(rxcmp1, mbuf);
+
 	if (BNXT_TRUFLOW_EN(bp))
 		mark_id = bnxt_ulp_set_mark_in_mbuf(rxq->bp, rxcmp1, mbuf,
 						    &vfr_flag);
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index 46b284024e..0fd5920f0a 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -126,3 +126,13 @@ bnxt_cfa_code_dynfield(struct rte_mbuf *mbuf)
 #define BNXT_PTYPE_TBL_DIM	128
 extern uint32_t bnxt_ptype_table[BNXT_PTYPE_TBL_DIM];
 #endif
+static inline void bnxt_set_vlan(struct rx_pkt_cmpl_hi *rxcmp1,
+				 struct rte_mbuf *mbuf)
+{
+	uint32_t metadata = rte_le_to_cpu_32(rxcmp1->metadata);
+
+	mbuf->vlan_tci = metadata & (RX_PKT_CMPL_METADATA_VID_MASK |
+				     RX_PKT_CMPL_METADATA_DE |
+				     RX_PKT_CMPL_METADATA_PRI_MASK);
+}
+
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.326320246 +0800
+++ 0027-net-bnxt-fix-mbuf-VLAN-in-scalar-Rx.patch	2021-11-10 14:17:01.767413603 +0800
@@ -1 +1 @@
-From 167978c1678fc5fd525e4e731de4c00093aee129 Mon Sep 17 00:00:00 2001
+From 16f8bcc3d8dea84d2bf65f3d7d33d9690eb645cf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 167978c1678fc5fd525e4e731de4c00093aee129 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 73fbdd17d1..ccff80b944 100644
+index 655f09a9bf..6b3603d11f 100644
@@ -26,3 +28,3 @@
-@@ -962,6 +962,8 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
- 
- 	mbuf->packet_type = bnxt_parse_pkt_type(rxcmp, rxcmp1);
+@@ -891,6 +891,8 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
+ 	}
+ #endif
@@ -36 +38 @@
-index dc2b1b7b4f..59adb7242c 100644
+index 46b284024e..0fd5920f0a 100644
@@ -39,2 +41,2 @@
-@@ -185,6 +185,16 @@ bnxt_check_ptype_constants(void)
- 
+@@ -126,3 +126,13 @@ bnxt_cfa_code_dynfield(struct rte_mbuf *mbuf)
+ #define BNXT_PTYPE_TBL_DIM	128
@@ -42 +44 @@
- 
+ #endif
@@ -53,3 +54,0 @@
- /* Stingray2 specific code for RX completion parsing */
- #define RX_CMP_VLAN_VALID(rxcmp)        \
- 	(((struct rx_pkt_v2_cmpl *)rxcmp)->metadata1_payload_offset &	\

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

* [dpdk-stable] patch 'net/bnxt: check FW capability for VLAN offloads' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (26 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/bnxt: fix mbuf VLAN in scalar Rx' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/bnxt: fix ring group free' " Xueming Li
                   ` (224 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Kalesh AP
  Cc: Luca Boccassi, Somnath Kotur, Lance Richardson, Ajit Khaparde,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ddc5464088dc5090935ecbde16cdede63867b418 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Mon, 23 Aug 2021 13:42:13 +0530
Subject: [PATCH] net/bnxt: check FW capability for VLAN offloads
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit baedf29794aa7cf8527d6362af17dce5046b1f51 ]

VLAN offload capability may be disabled in the FW. The driver
should not attempt to override or utilize this feature in such
scenarios since it will not work as expected.

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

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        | 6 +++---
 drivers/net/bnxt/bnxt_ethdev.c | 4 ++++
 drivers/net/bnxt/bnxt_hwrm.c   | 9 +++++++++
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index f85409878c..c8c6dc4e83 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -567,8 +567,7 @@ struct bnxt_rep_info {
 	ETH_RSS_NONFRAG_IPV6_UDP |	\
 	ETH_RSS_LEVEL_MASK)
 
-#define BNXT_DEV_TX_OFFLOAD_SUPPORT (DEV_TX_OFFLOAD_VLAN_INSERT | \
-				     DEV_TX_OFFLOAD_IPV4_CKSUM | \
+#define BNXT_DEV_TX_OFFLOAD_SUPPORT (DEV_TX_OFFLOAD_IPV4_CKSUM | \
 				     DEV_TX_OFFLOAD_TCP_CKSUM | \
 				     DEV_TX_OFFLOAD_UDP_CKSUM | \
 				     DEV_TX_OFFLOAD_TCP_TSO | \
@@ -581,7 +580,6 @@ struct bnxt_rep_info {
 				     DEV_TX_OFFLOAD_MULTI_SEGS)
 
 #define BNXT_DEV_RX_OFFLOAD_SUPPORT (DEV_RX_OFFLOAD_VLAN_FILTER | \
-				     DEV_RX_OFFLOAD_VLAN_STRIP | \
 				     DEV_RX_OFFLOAD_IPV4_CKSUM | \
 				     DEV_RX_OFFLOAD_UDP_CKSUM | \
 				     DEV_RX_OFFLOAD_TCP_CKSUM | \
@@ -715,12 +713,14 @@ struct bnxt {
 #define BNXT_FW_CAP_ADV_FLOW_MGMT	BIT(5)
 #define BNXT_FW_CAP_ADV_FLOW_COUNTERS	BIT(6)
 #define BNXT_FW_CAP_LINK_ADMIN		BIT(7)
+#define BNXT_FW_CAP_VLAN_TX_INSERT	BIT(9)
 
 	pthread_mutex_t         flow_lock;
 
 	uint32_t		vnic_cap_flags;
 #define BNXT_VNIC_CAP_COS_CLASSIFY	BIT(0)
 #define BNXT_VNIC_CAP_OUTER_RSS		BIT(1)
+#define BNXT_VNIC_CAP_VLAN_RX_STRIP	BIT(3)
 	unsigned int		rx_nr_rings;
 	unsigned int		rx_cp_nr_rings;
 	unsigned int		rx_num_qs_per_vnic;
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 8afe72bd96..a563c2275f 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -980,9 +980,13 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
 	dev_info->rx_offload_capa = BNXT_DEV_RX_OFFLOAD_SUPPORT;
 	if (bp->flags & BNXT_FLAG_PTP_SUPPORTED)
 		dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_TIMESTAMP;
+	if (bp->vnic_cap_flags & BNXT_VNIC_CAP_VLAN_RX_STRIP)
+		dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_VLAN_STRIP;
 	dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
 	dev_info->tx_offload_capa = BNXT_DEV_TX_OFFLOAD_SUPPORT |
 				    dev_info->tx_queue_offload_capa;
+	if (bp->fw_cap & BNXT_FW_CAP_VLAN_TX_INSERT)
+		dev_info->tx_offload_capa |= DEV_TX_OFFLOAD_VLAN_INSERT;
 	dev_info->flow_type_rss_offloads = BNXT_ETH_RSS_SUPPORT;
 
 	dev_info->speed_capa = bnxt_get_speed_capabilities(bp);
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index d8b46f932a..7d9939d1af 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -826,6 +826,10 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
 	if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_LINK_ADMIN_STATUS_SUPPORTED)
 		bp->fw_cap |= BNXT_FW_CAP_LINK_ADMIN;
 
+	if (!(flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_VLAN_ACCELERATION_TX_DISABLED)) {
+		bp->fw_cap |= BNXT_FW_CAP_VLAN_TX_INSERT;
+		PMD_DRV_LOG(DEBUG, "VLAN acceleration for TX is enabled\n");
+	}
 unlock:
 	HWRM_UNLOCK();
 
@@ -883,6 +887,11 @@ int bnxt_hwrm_vnic_qcaps(struct bnxt *bp)
 	if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_OUTERMOST_RSS_CAP)
 		bp->vnic_cap_flags |= BNXT_VNIC_CAP_OUTER_RSS;
 
+
+	if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_VLAN_STRIP_CAP) {
+		bp->vnic_cap_flags |= BNXT_VNIC_CAP_VLAN_RX_STRIP;
+		PMD_DRV_LOG(DEBUG, "Rx VLAN strip capability enabled\n");
+	}
 	bp->max_tpa_v2 = rte_le_to_cpu_16(resp->max_aggs_supported);
 
 	HWRM_UNLOCK();
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.369223940 +0800
+++ 0028-net-bnxt-check-FW-capability-for-VLAN-offloads.patch	2021-11-10 14:17:01.774080215 +0800
@@ -1 +1 @@
-From baedf29794aa7cf8527d6362af17dce5046b1f51 Mon Sep 17 00:00:00 2001
+From ddc5464088dc5090935ecbde16cdede63867b418 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit baedf29794aa7cf8527d6362af17dce5046b1f51 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 494a1eff37..3ccc06c37c 100644
+index f85409878c..c8c6dc4e83 100644
@@ -27 +29 @@
-@@ -577,8 +577,7 @@ struct bnxt_rep_info {
+@@ -567,8 +567,7 @@ struct bnxt_rep_info {
@@ -37 +39 @@
-@@ -591,7 +590,6 @@ struct bnxt_rep_info {
+@@ -581,7 +580,6 @@ struct bnxt_rep_info {
@@ -45 +47,2 @@
-@@ -737,6 +735,7 @@ struct bnxt {
+@@ -715,12 +713,14 @@ struct bnxt {
+ #define BNXT_FW_CAP_ADV_FLOW_MGMT	BIT(5)
@@ -48 +50,0 @@
- #define BNXT_FW_CAP_TRUFLOW_EN		BIT(8)
@@ -50 +51,0 @@
- #define BNXT_TRUFLOW_EN(bp)	((bp)->fw_cap & BNXT_FW_CAP_TRUFLOW_EN)
@@ -53 +54,2 @@
-@@ -745,6 +744,7 @@ struct bnxt {
+ 
+ 	uint32_t		vnic_cap_flags;
@@ -56 +57,0 @@
- #define BNXT_VNIC_CAP_RX_CMPL_V2	BIT(2)
@@ -62 +63 @@
-index de34a2f0bb..e072771d14 100644
+index 8afe72bd96..a563c2275f 100644
@@ -65 +66 @@
-@@ -981,9 +981,13 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
+@@ -980,9 +980,13 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
@@ -80 +81 @@
-index f29d574235..02613bd00b 100644
+index d8b46f932a..7d9939d1af 100644
@@ -83 +84 @@
-@@ -941,6 +941,10 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
+@@ -826,6 +826,10 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
@@ -94,3 +95,3 @@
-@@ -1001,6 +1005,11 @@ int bnxt_hwrm_vnic_qcaps(struct bnxt *bp)
- 	if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RX_CMPL_V2_CAP)
- 		bp->vnic_cap_flags |= BNXT_VNIC_CAP_RX_CMPL_V2;
+@@ -883,6 +887,11 @@ int bnxt_hwrm_vnic_qcaps(struct bnxt *bp)
+ 	if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_OUTERMOST_RSS_CAP)
+ 		bp->vnic_cap_flags |= BNXT_VNIC_CAP_OUTER_RSS;
@@ -97,0 +99 @@
++
@@ -102 +103,0 @@
-+

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

* [dpdk-stable] patch 'net/bnxt: fix ring group free' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (27 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/bnxt: check FW capability for VLAN offloads' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/bnxt: fix double allocation of ring groups' " Xueming Li
                   ` (223 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Kalesh AP
  Cc: Luca Boccassi, Ajit Khaparde, Lance Richardson, Somnath Kotur,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8516f354566076ec8b8fd454cf29bf4175282871 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Mon, 30 Aug 2021 09:28:11 +0530
Subject: [PATCH] net/bnxt: fix ring group free
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8269a4e8af5fa7632578fc1f4fa7d44711440e4f ]

Added an invalid fw_grp_id check inside bnxt_hwrm_ring_grp_free().
This will prevent invalid fw_grp_id to be passed to the FW which can
result in an error.
This fixes the following failure in the "port stop" -> "port start"
sequence:

bnxt_hwrm_ring_grp_free(): error 2:0:00000000:0204
bnxt_hwrm_ring_grp_free(): error 2:0:00000000:0204

Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop")

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

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 7d9939d1af..d8ff3c7920 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1761,6 +1761,9 @@ int bnxt_hwrm_ring_grp_free(struct bnxt *bp, unsigned int idx)
 	struct hwrm_ring_grp_free_input req = {.req_type = 0 };
 	struct hwrm_ring_grp_free_output *resp = bp->hwrm_cmd_resp_addr;
 
+	if (bp->grp_info[idx].fw_grp_id == INVALID_HW_RING_ID)
+		return 0;
+
 	HWRM_PREP(&req, HWRM_RING_GRP_FREE, BNXT_USE_CHIMP_MB);
 
 	req.ring_group_id = rte_cpu_to_le_16(bp->grp_info[idx].fw_grp_id);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.419181691 +0800
+++ 0029-net-bnxt-fix-ring-group-free.patch	2021-11-10 14:17:01.774080215 +0800
@@ -1 +1 @@
-From 8269a4e8af5fa7632578fc1f4fa7d44711440e4f Mon Sep 17 00:00:00 2001
+From 8516f354566076ec8b8fd454cf29bf4175282871 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8269a4e8af5fa7632578fc1f4fa7d44711440e4f ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 02613bd00b..0e0e266589 100644
+index 7d9939d1af..d8ff3c7920 100644
@@ -30 +32 @@
-@@ -1897,6 +1897,9 @@ int bnxt_hwrm_ring_grp_free(struct bnxt *bp, unsigned int idx)
+@@ -1761,6 +1761,9 @@ int bnxt_hwrm_ring_grp_free(struct bnxt *bp, unsigned int idx)

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

* [dpdk-stable] patch 'net/bnxt: fix double allocation of ring groups' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (28 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/bnxt: fix ring group free' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/af_xdp: fix zero-copy Tx queue drain' " Xueming Li
                   ` (222 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Luca Boccassi, Ajit Khaparde, Lance Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fc300c1c4a2ec069fac7cc94f0960fe6c8174375 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 1 Sep 2021 09:30:01 +0530
Subject: [PATCH] net/bnxt: fix double allocation of ring groups
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 36a97cd23fc916ac475a0b827074b5645fff0cfe ]

After commit "d68249f88266", driver allocates ring groups in
bnxt_alloc_hwrm_rx_ring(). But during port start, driver invokes
bnxt_alloc_hwrm_rx_ring() followed by bnxt_alloc_all_hwrm_ring_grps().
This will cause the FW command failure in bnxt_alloc_all_hwrm_ring_grps()

To fix this, just don't create the ring group if it is already created.

Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index d8ff3c7920..50b41d82d3 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1737,6 +1737,10 @@ int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp, unsigned int idx)
 	struct hwrm_ring_grp_alloc_input req = {.req_type = 0 };
 	struct hwrm_ring_grp_alloc_output *resp = bp->hwrm_cmd_resp_addr;
 
+	/* Don't attempt to re-create the ring group if it is already created */
+	if (bp->grp_info[idx].fw_grp_id != INVALID_HW_RING_ID)
+		return 0;
+
 	HWRM_PREP(&req, HWRM_RING_GRP_ALLOC, BNXT_USE_CHIMP_MB);
 
 	req.cr = rte_cpu_to_le_16(bp->grp_info[idx].cp_fw_ring_id);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.464856411 +0800
+++ 0030-net-bnxt-fix-double-allocation-of-ring-groups.patch	2021-11-10 14:17:01.777413521 +0800
@@ -1 +1 @@
-From 36a97cd23fc916ac475a0b827074b5645fff0cfe Mon Sep 17 00:00:00 2001
+From fc300c1c4a2ec069fac7cc94f0960fe6c8174375 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 36a97cd23fc916ac475a0b827074b5645fff0cfe ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 0e0e266589..585cdeded8 100644
+index d8ff3c7920..50b41d82d3 100644
@@ -27 +29 @@
-@@ -1873,6 +1873,10 @@ int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp, unsigned int idx)
+@@ -1737,6 +1737,10 @@ int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp, unsigned int idx)

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

* [dpdk-stable] patch 'net/af_xdp: fix zero-copy Tx queue drain' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (29 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/bnxt: fix double allocation of ring groups' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'doc: fix bonding driver name' " Xueming Li
                   ` (221 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Baruch Siach; +Cc: Luca Boccassi, Ciara Loftus, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From af6efb8cb21cb6115a3fa20001f979f7beb6c9e9 Mon Sep 17 00:00:00 2001
From: Baruch Siach <baruch@tkos.co.il>
Date: Wed, 25 Aug 2021 13:05:44 +0300
Subject: [PATCH] net/af_xdp: fix zero-copy Tx queue drain
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0f2ffb49ce29351fad043377a6d2f144f3c52afb ]

Call xsk_ring_prod__submit() before kick_tx() so that the kernel
consumer sees the updated state of Tx ring. Otherwise, Tx packets are
stuck in the ring until the next call to af_xdp_tx_zc().

Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Acked-by: Ciara Loftus <ciara.loftus@intel.com>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 3885fb7c78..312e424359 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -490,7 +490,6 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 
 			if (!xsk_ring_prod__reserve(&txq->tx, 1, &idx_tx)) {
 				rte_pktmbuf_free(local_mbuf);
-				kick_tx(txq, cq);
 				goto out;
 			}
 
@@ -514,10 +513,9 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		tx_bytes += mbuf->pkt_len;
 	}
 
-	kick_tx(txq, cq);
-
 out:
 	xsk_ring_prod__submit(&txq->tx, count);
+	kick_tx(txq, cq);
 
 	txq->stats.tx_pkts += count;
 	txq->stats.tx_bytes += tx_bytes;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.510109335 +0800
+++ 0031-net-af_xdp-fix-zero-copy-Tx-queue-drain.patch	2021-11-10 14:17:01.777413521 +0800
@@ -1 +1 @@
-From 0f2ffb49ce29351fad043377a6d2f144f3c52afb Mon Sep 17 00:00:00 2001
+From af6efb8cb21cb6115a3fa20001f979f7beb6c9e9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0f2ffb49ce29351fad043377a6d2f144f3c52afb ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 74ffa45112..9bea0a895a 100644
+index 3885fb7c78..312e424359 100644
@@ -23 +25 @@
-@@ -527,7 +527,6 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -490,7 +490,6 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -31 +33 @@
-@@ -551,10 +550,9 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -514,10 +513,9 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)

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

* [dpdk-stable] patch 'doc: fix bonding driver name' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (30 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/af_xdp: fix zero-copy Tx queue drain' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/axgbe: fix unreleased lock in I2C transfer' " Xueming Li
                   ` (220 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Ben Magistro; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 19acac8cef91b751aa582650c8aa98a69f069db0 Mon Sep 17 00:00:00 2001
From: Ben Magistro <koncept1@gmail.com>
Date: Thu, 26 Aug 2021 23:10:44 +0000
Subject: [PATCH] doc: fix bonding driver name
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c4498cb315d5c6367dc3a9dccb21ffd233336d34 ]

The documentation for the bond driver lists the name as `net/bond`
however the driver should be `net/bonding`.

Fixes: 89c67ae2cba7 ("doc: remove references to make from prog guide")

Signed-off-by: Ben Magistro <koncept1@gmail.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst b/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst
index 30c56cd375..55ec06a46e 100644
--- a/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst
+++ b/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst
@@ -29,7 +29,7 @@ bonded device and its slave devices.
 
     The Link Bonding PMD Library is enabled by default in the build
     configuration, the library can be disabled using the meson option
-    "-Ddisable_drivers=net/bond".
+    "-Ddisable_drivers=net/bonding".
 
 
 Link Bonding Modes Overview
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.552464280 +0800
+++ 0032-doc-fix-bonding-driver-name.patch	2021-11-10 14:17:01.777413521 +0800
@@ -1 +1 @@
-From c4498cb315d5c6367dc3a9dccb21ffd233336d34 Mon Sep 17 00:00:00 2001
+From 19acac8cef91b751aa582650c8aa98a69f069db0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c4498cb315d5c6367dc3a9dccb21ffd233336d34 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/axgbe: fix unreleased lock in I2C transfer' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (31 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'doc: fix bonding driver name' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/pcap: fix resource leakage on port probe' " Xueming Li
                   ` (219 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Chengfeng Ye; +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a202064ef3f8953c8762fe39cc732646b2446845 Mon Sep 17 00:00:00 2001
From: Chengfeng Ye <cyeaa@connect.ust.hk>
Date: Thu, 26 Aug 2021 11:55:59 -0700
Subject: [PATCH] net/axgbe: fix unreleased lock in I2C transfer
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 30b4d95a29b1bf7e868d799952aa1fa1348d5e25 ]

The lock pdata->i2c_mutex is not released if the function return in
these two patched branches, which may lead to deadlock problem if
this lock is acquired again.

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

Signed-off-by: Chengfeng Ye <cyeaa@connect.ust.hk>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/axgbe/axgbe_i2c.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/axgbe/axgbe_i2c.c b/drivers/net/axgbe/axgbe_i2c.c
index ab3738a12e..a2798f484e 100644
--- a/drivers/net/axgbe/axgbe_i2c.c
+++ b/drivers/net/axgbe/axgbe_i2c.c
@@ -233,6 +233,7 @@ static int axgbe_i2c_xfer(struct axgbe_port *pdata, struct axgbe_i2c_op *op)
 	ret = axgbe_i2c_disable(pdata);
 	if (ret) {
 		PMD_DRV_LOG(ERR, "failed to disable i2c master\n");
+		pthread_mutex_unlock(&pdata->i2c_mutex);
 		return ret;
 	}
 
@@ -249,6 +250,7 @@ static int axgbe_i2c_xfer(struct axgbe_port *pdata, struct axgbe_i2c_op *op)
 	ret = axgbe_i2c_enable(pdata);
 	if (ret) {
 		PMD_DRV_LOG(ERR, "failed to enable i2c master\n");
+		pthread_mutex_unlock(&pdata->i2c_mutex);
 		return ret;
 	}
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.593810284 +0800
+++ 0033-net-axgbe-fix-unreleased-lock-in-I2C-transfer.patch	2021-11-10 14:17:01.780746827 +0800
@@ -1 +1 @@
-From 30b4d95a29b1bf7e868d799952aa1fa1348d5e25 Mon Sep 17 00:00:00 2001
+From a202064ef3f8953c8762fe39cc732646b2446845 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 30b4d95a29b1bf7e868d799952aa1fa1348d5e25 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/pcap: fix resource leakage on port probe' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (32 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/axgbe: fix unreleased lock in I2C transfer' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/hns3: fix queue flow action validation' " Xueming Li
                   ` (218 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Qiming Chen; +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6b6aacee7102439684c272bd1513eff6e70cdffd Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Mon, 30 Aug 2021 11:01:08 +0800
Subject: [PATCH] net/pcap: fix resource leakage on port probe
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit da0280b3a34c6f67f7e558fcc86c3110816fea28 ]

When the port is probed, if the eth_from_pcaps function fails, the
previously opened pcap resources are not released, causing resource
leakage.

The patch solves the problem of resource leakage caused by abnormal
branch exit during the port probe process.

Fixes: 4c173302c307 ("pcap: add new driver")

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/pcap/rte_eth_pcap.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index da4dfe799e..2e8ac55b72 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -1366,6 +1366,33 @@ eth_from_pcaps(struct rte_vdev_device *vdev,
 	return 0;
 }
 
+static void
+eth_release_pcaps(struct pmd_devargs *pcaps,
+		struct pmd_devargs *dumpers,
+		int single_iface)
+{
+	unsigned int i;
+
+	if (single_iface) {
+		if (pcaps->queue[0].pcap)
+			pcap_close(pcaps->queue[0].pcap);
+		return;
+	}
+
+	for (i = 0; i < dumpers->num_of_queue; i++) {
+		if (dumpers->queue[i].dumper)
+			pcap_dump_close(dumpers->queue[i].dumper);
+
+		if (dumpers->queue[i].pcap)
+			pcap_close(dumpers->queue[i].pcap);
+	}
+
+	for (i = 0; i < pcaps->num_of_queue; i++) {
+		if (pcaps->queue[i].pcap)
+			pcap_close(pcaps->queue[i].pcap);
+	}
+}
+
 static int
 pmd_pcap_probe(struct rte_vdev_device *dev)
 {
@@ -1586,6 +1613,9 @@ create_eth:
 free_kvlist:
 	rte_kvargs_free(kvlist);
 
+	if (ret < 0)
+		eth_release_pcaps(&pcaps, &dumpers, devargs_all.single_iface);
+
 	return ret;
 }
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.635612892 +0800
+++ 0034-net-pcap-fix-resource-leakage-on-port-probe.patch	2021-11-10 14:17:01.780746827 +0800
@@ -1 +1 @@
-From da0280b3a34c6f67f7e558fcc86c3110816fea28 Mon Sep 17 00:00:00 2001
+From 6b6aacee7102439684c272bd1513eff6e70cdffd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit da0280b3a34c6f67f7e558fcc86c3110816fea28 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
- drivers/net/pcap/pcap_ethdev.c | 30 ++++++++++++++++++++++++++++++
+ drivers/net/pcap/rte_eth_pcap.c | 30 ++++++++++++++++++++++++++++++
@@ -22,5 +24,5 @@
-diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
-index a8774b7a43..5c4cdbf873 100644
---- a/drivers/net/pcap/pcap_ethdev.c
-+++ b/drivers/net/pcap/pcap_ethdev.c
-@@ -1362,6 +1362,33 @@ eth_from_pcaps(struct rte_vdev_device *vdev,
+diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
+index da4dfe799e..2e8ac55b72 100644
+--- a/drivers/net/pcap/rte_eth_pcap.c
++++ b/drivers/net/pcap/rte_eth_pcap.c
+@@ -1366,6 +1366,33 @@ eth_from_pcaps(struct rte_vdev_device *vdev,
@@ -60 +62 @@
-@@ -1582,6 +1609,9 @@ create_eth:
+@@ -1586,6 +1613,9 @@ create_eth:

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

* [dpdk-stable] patch 'net/hns3: fix queue flow action validation' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (33 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/pcap: fix resource leakage on port probe' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/hns3: fix taskqueue pair reset command' " Xueming Li
                   ` (217 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0c355fecc0a6662a3fb9e97e56186e9565dd678b Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Mon, 30 Aug 2021 16:26:49 +0800
Subject: [PATCH] net/hns3: fix queue flow action validation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit aa3497d4450a603ca18ae4971a96e3890824d887 ]

The used_rx_queues only takes effect after device is started, and
its value is incorrect before the device is started. Therefore, it
is not suitable for flow action to use it to verify the queue index
before the device is started.

E.g. Enable dedicated queue in bonding device will configure a queue
flow action before start its slave devices. The above problem will
make this reasonable flow action configuration fail.

This patch use the nb_rx_queues from the configuration phase to
achieve verification.

Fixes: a951c1ed3ab5 ("net/hns3: support different numbers of Rx and Tx queues")
Fixes: f8e7fcbfd0b8 ("net/hns3: support flow action of queue region")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 70c45f6bc5..7f8dd91d11 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -275,10 +275,10 @@ hns3_handle_action_queue(struct rte_eth_dev *dev,
 	struct hns3_hw *hw = &hns->hw;
 
 	queue = (const struct rte_flow_action_queue *)action->conf;
-	if (queue->index >= hw->used_rx_queues) {
+	if (queue->index >= hw->data->nb_rx_queues) {
 		hns3_err(hw, "queue ID(%u) is greater than number of "
 			  "available queue (%u) in driver.",
-			  queue->index, hw->used_rx_queues);
+			  queue->index, hw->data->nb_rx_queues);
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
 					  action, "Invalid queue ID in PF");
@@ -308,8 +308,8 @@ hns3_handle_action_queue_region(struct rte_eth_dev *dev,
 
 	if ((!rte_is_power_of_2(conf->queue_num)) ||
 		conf->queue_num > hw->rss_size_max ||
-		conf->queue[0] >= hw->used_rx_queues ||
-		conf->queue[0] + conf->queue_num > hw->used_rx_queues) {
+		conf->queue[0] >= hw->data->nb_rx_queues ||
+		conf->queue[0] + conf->queue_num > hw->data->nb_rx_queues) {
 		return rte_flow_error_set(error, EINVAL,
 			RTE_FLOW_ERROR_TYPE_ACTION_CONF, action,
 			"Invalid start queue ID and queue num! the start queue "
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.677735225 +0800
+++ 0035-net-hns3-fix-queue-flow-action-validation.patch	2021-11-10 14:17:01.780746827 +0800
@@ -1 +1 @@
-From aa3497d4450a603ca18ae4971a96e3890824d887 Mon Sep 17 00:00:00 2001
+From 0c355fecc0a6662a3fb9e97e56186e9565dd678b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit aa3497d4450a603ca18ae4971a96e3890824d887 ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index fc77979c5f..841e0b9da3 100644
+index 70c45f6bc5..7f8dd91d11 100644

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

* [dpdk-stable] patch 'net/hns3: fix taskqueue pair reset command' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (34 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/hns3: fix queue flow action validation' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/sfc: set FDIR bit for flow mark in EF100 Rx' " Xueming Li
                   ` (216 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From dd8e8fcf1ff916a10ce263280a0f34470cd4ad10 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Mon, 30 Aug 2021 16:26:50 +0800
Subject: [PATCH] net/hns3: fix taskqueue pair reset command
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3fb0df3138e1f07dd3d79f80306c1d72eb4eaa77 ]

This new taskqueue pair reset command is used incorrectly, resulting in
the new command not taking effect.

This patch fixes the incorrect use.

Fixes: 6911e7c22c61 ("net/hns3: fix long task queue pairs reset time")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index ad9ead47cc..9bfa9eef8a 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -695,7 +695,7 @@ hns3_reset_rcb_cmd(struct hns3_hw *hw, uint8_t *reset_status)
 
 	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_CFG_RST_TRIGGER, false);
 	req = (struct hns3_reset_cmd *)desc.data;
-	hns3_set_bit(req->mac_func_reset, HNS3_CFG_RESET_RCB_B, 1);
+	hns3_set_bit(req->fun_reset_rcb, HNS3_CFG_RESET_RCB_B, 1);
 
 	/*
 	 * The start qid should be the global qid of the first tqp of the
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.721604893 +0800
+++ 0036-net-hns3-fix-taskqueue-pair-reset-command.patch	2021-11-10 14:17:01.784080133 +0800
@@ -1 +1 @@
-From 3fb0df3138e1f07dd3d79f80306c1d72eb4eaa77 Mon Sep 17 00:00:00 2001
+From dd8e8fcf1ff916a10ce263280a0f34470cd4ad10 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3fb0df3138e1f07dd3d79f80306c1d72eb4eaa77 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 0f222b37f9..481872e395 100644
+index ad9ead47cc..9bfa9eef8a 100644
@@ -24 +26 @@
-@@ -697,7 +697,7 @@ hns3_reset_rcb_cmd(struct hns3_hw *hw, uint8_t *reset_status)
+@@ -695,7 +695,7 @@ hns3_reset_rcb_cmd(struct hns3_hw *hw, uint8_t *reset_status)

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

* [dpdk-stable] patch 'net/sfc: set FDIR bit for flow mark in EF100 Rx' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (35 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/hns3: fix taskqueue pair reset command' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ixgbe: fix hash handle leak' " Xueming Li
                   ` (215 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Luca Boccassi, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ed49cafb257e1141fc6cf518e2ab5330bdd93fd8 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Mon, 30 Aug 2021 17:35:42 +0300
Subject: [PATCH] net/sfc: set FDIR bit for flow mark in EF100 Rx
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 142dd26a2fbd909f8d10ca25b1e698cd41a2667f ]

According to flow action MARK definition, PMDs must set both
PKT_RX_FDIR and PKT_RX_FDIR_ID if the packet contains a mark.

Fixes: 1aacc3d388d3 ("net/sfc: support user mark and flag Rx for EF100")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/sfc/sfc_ef100_rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_ef100_rx.c b/drivers/net/sfc/sfc_ef100_rx.c
index f5fa629f90..061077bcf4 100644
--- a/drivers/net/sfc/sfc_ef100_rx.c
+++ b/drivers/net/sfc/sfc_ef100_rx.c
@@ -413,7 +413,7 @@ sfc_ef100_rx_prefix_to_offloads(const struct sfc_ef100_rxq *rxq,
 		user_mark = EFX_OWORD_FIELD(rx_prefix[0],
 					    ESF_GZ_RX_PREFIX_USER_MARK);
 		if (user_mark != SFC_EF100_USER_MARK_INVALID) {
-			ol_flags |= PKT_RX_FDIR_ID;
+			ol_flags |= PKT_RX_FDIR | PKT_RX_FDIR_ID;
 			m->hash.fdir.hi = user_mark;
 		}
 	}
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.767510974 +0800
+++ 0037-net-sfc-set-FDIR-bit-for-flow-mark-in-EF100-Rx.patch	2021-11-10 14:17:01.784080133 +0800
@@ -1 +1 @@
-From 142dd26a2fbd909f8d10ca25b1e698cd41a2667f Mon Sep 17 00:00:00 2001
+From ed49cafb257e1141fc6cf518e2ab5330bdd93fd8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 142dd26a2fbd909f8d10ca25b1e698cd41a2667f ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index d4cb96881c..1bf04f565a 100644
+index f5fa629f90..061077bcf4 100644
@@ -22 +24 @@
-@@ -414,7 +414,7 @@ sfc_ef100_rx_prefix_to_offloads(const struct sfc_ef100_rxq *rxq,
+@@ -413,7 +413,7 @@ sfc_ef100_rx_prefix_to_offloads(const struct sfc_ef100_rxq *rxq,

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

* [dpdk-stable] patch 'net/ixgbe: fix hash handle leak' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (36 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/sfc: set FDIR bit for flow mark in EF100 Rx' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ixgbe: fix queue resource " Xueming Li
                   ` (214 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c1723e2d14001ac5b7aa0227e4aef911b4e0e9dd Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Tue, 31 Aug 2021 21:24:07 +0800
Subject: [PATCH] net/ixgbe: fix hash handle leak
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 03f83d6c5c9f9d30ef2cd7c2b0fe5d86935cd372 ]

In the ixgbe_fdir_filter_init and ixgbe_l2_tn_filter_init functions,
after the hash handle is created, the handle is not released in
subsequent abnormal branches.

Fixes: 080e3c0ee989 ("net/ixgbe: store flow director filter")
Fixes: d0c0c416ef1f ("net/ixgbe: store L2 tunnel filter")

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index bf0e850402..1af04357cc 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1393,6 +1393,7 @@ static int ixgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)
 	if (!fdir_info->hash_map) {
 		PMD_INIT_LOG(ERR,
 			     "Failed to allocate memory for fdir hash map!");
+		rte_hash_free(fdir_info->hash_handle);
 		return -ENOMEM;
 	}
 	fdir_info->mask_added = FALSE;
@@ -1429,6 +1430,7 @@ static int ixgbe_l2_tn_filter_init(struct rte_eth_dev *eth_dev)
 	if (!l2_tn_info->hash_map) {
 		PMD_INIT_LOG(ERR,
 			"Failed to allocate memory for L2 TN hash map!");
+		rte_hash_free(l2_tn_info->hash_handle);
 		return -ENOMEM;
 	}
 	l2_tn_info->e_tag_en = FALSE;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.809835755 +0800
+++ 0038-net-ixgbe-fix-hash-handle-leak.patch	2021-11-10 14:17:01.787413440 +0800
@@ -1 +1 @@
-From 03f83d6c5c9f9d30ef2cd7c2b0fe5d86935cd372 Mon Sep 17 00:00:00 2001
+From c1723e2d14001ac5b7aa0227e4aef911b4e0e9dd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 03f83d6c5c9f9d30ef2cd7c2b0fe5d86935cd372 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 3cd2a094ae..7b198d95c2 100644
+index bf0e850402..1af04357cc 100644

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

* [dpdk-stable] patch 'net/ixgbe: fix queue resource leak' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (37 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ixgbe: fix hash handle leak' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ixgbe: fix MAC " Xueming Li
                   ` (213 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Qiming Chen; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5787cc1187ee2bc760a6c240005b234a8d49c344 Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Tue, 31 Aug 2021 21:40:17 +0800
Subject: [PATCH] net/ixgbe: fix queue resource leak
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3a732dce93af3355854dbd0fbfbe26d8c8ec8982 ]

In the ixgbevf_dev_start function, after initializing the rxtx queue, if
an exception occurs in the subsequent function, the rxtx queue needs to
be released. The patch solves the problem of queue resource leakage.

Fixes: 0eb609239efd ("ixgbe: enable Rx queue interrupts for PF and VF")

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 1af04357cc..f15cc7d4ef 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -5360,8 +5360,10 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
 		 * now only one vector is used for Rx queue
 		 */
 		intr_vector = 1;
-		if (rte_intr_efd_enable(intr_handle, intr_vector))
+		if (rte_intr_efd_enable(intr_handle, intr_vector)) {
+			ixgbe_dev_clear_queues(dev);
 			return -1;
+		}
 	}
 
 	if (rte_intr_dp_is_en(intr_handle) && !intr_handle->intr_vec) {
@@ -5371,6 +5373,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
 		if (intr_handle->intr_vec == NULL) {
 			PMD_INIT_LOG(ERR, "Failed to allocate %d rx_queues"
 				     " intr_vec", dev->data->nb_rx_queues);
+			ixgbe_dev_clear_queues(dev);
 			return -ENOMEM;
 		}
 	}
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.857441182 +0800
+++ 0039-net-ixgbe-fix-queue-resource-leak.patch	2021-11-10 14:17:01.790746745 +0800
@@ -1 +1 @@
-From 3a732dce93af3355854dbd0fbfbe26d8c8ec8982 Mon Sep 17 00:00:00 2001
+From 5787cc1187ee2bc760a6c240005b234a8d49c344 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3a732dce93af3355854dbd0fbfbe26d8c8ec8982 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 7b198d95c2..3371a7df78 100644
+index 1af04357cc..f15cc7d4ef 100644
@@ -23 +25 @@
-@@ -5362,8 +5362,10 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
+@@ -5360,8 +5360,10 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
@@ -35 +37 @@
-@@ -5373,6 +5375,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
+@@ -5371,6 +5373,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/ixgbe: fix MAC resource leak' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (38 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ixgbe: fix queue resource " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ixgbe: fix mbuf " Xueming Li
                   ` (212 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Qiming Chen; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a1ebe4da329713217ef7fa82f179f82bbae1de87 Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Wed, 1 Sep 2021 15:12:07 +0800
Subject: [PATCH] net/ixgbe: fix MAC resource leak
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit cc8aaa258f31cf28776141e2e2f9c370bbb9ae55 ]

In the eth_ixgbevf_dev_init and eth_ixgbe_dev_init functions, memory is
allocated for the MAC address, and the address is stored in the
eth_dev->data->mac_addrs member variable. If the subsequent function is
abnormal, you need to use the rte_free function to release the MAC
address memory.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index f15cc7d4ef..969e31cdbf 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1218,6 +1218,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 		PMD_INIT_LOG(ERR,
 			     "Failed to allocate %d bytes needed to store MAC addresses",
 			     RTE_ETHER_ADDR_LEN * IXGBE_VMDQ_NUM_UC_MAC);
+		rte_free(eth_dev->data->mac_addrs);
+		eth_dev->data->mac_addrs = NULL;
 		return -ENOMEM;
 	}
 
@@ -1672,6 +1674,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
 
 	default:
 		PMD_INIT_LOG(ERR, "VF Initialization Failure: %d", diag);
+		rte_free(eth_dev->data->mac_addrs);
+		eth_dev->data->mac_addrs = NULL;
 		return -EIO;
 	}
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.903348317 +0800
+++ 0040-net-ixgbe-fix-MAC-resource-leak.patch	2021-11-10 14:17:01.794080052 +0800
@@ -1 +1 @@
-From cc8aaa258f31cf28776141e2e2f9c370bbb9ae55 Mon Sep 17 00:00:00 2001
+From a1ebe4da329713217ef7fa82f179f82bbae1de87 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cc8aaa258f31cf28776141e2e2f9c370bbb9ae55 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 3371a7df78..47693c0c47 100644
+index f15cc7d4ef..969e31cdbf 100644
@@ -34 +36 @@
-@@ -1667,6 +1669,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1672,6 +1674,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)

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

* [dpdk-stable] patch 'net/ixgbe: fix mbuf leak' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (39 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ixgbe: fix MAC " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice: fix performance with writeback policy' " Xueming Li
                   ` (211 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Qiming Chen; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d9958c190766e659e9f3d9b24d3331c147390096 Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Wed, 1 Sep 2021 15:22:37 +0800
Subject: [PATCH] net/ixgbe: fix mbuf leak
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d54b51efb6ef12b8cdfc7316316d99e2a762e1cd ]

A local test found that repeated port start and stop operations during
the continuous SSE vector bufflist receiving process will cause the mbuf
resource to run out. The final positioning is when the port is stopped,
the mbuf of the pkt_first_seg pointer is not released. Resources leak.
The patch scheme is to judge whether the pointer is empty when the port
is stopped, and release the corresponding mbuf if it is not empty.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 3b893b0df0..3d983d4db7 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2948,6 +2948,10 @@ ixgbe_reset_rx_queue(struct ixgbe_adapter *adapter, struct ixgbe_rx_queue *rxq)
 	rxq->rx_free_trigger = (uint16_t)(rxq->rx_free_thresh - 1);
 	rxq->rx_tail = 0;
 	rxq->nb_rx_hold = 0;
+
+	if (rxq->pkt_first_seg != NULL)
+		rte_pktmbuf_free(rxq->pkt_first_seg);
+
 	rxq->pkt_first_seg = NULL;
 	rxq->pkt_last_seg = NULL;
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.949497390 +0800
+++ 0041-net-ixgbe-fix-mbuf-leak.patch	2021-11-10 14:17:01.797413358 +0800
@@ -1 +1 @@
-From d54b51efb6ef12b8cdfc7316316d99e2a762e1cd Mon Sep 17 00:00:00 2001
+From d9958c190766e659e9f3d9b24d3331c147390096 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d54b51efb6ef12b8cdfc7316316d99e2a762e1cd ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index c814a28cb4..bfdfd5e755 100644
+index 3b893b0df0..3d983d4db7 100644
@@ -26 +28 @@
-@@ -2981,6 +2981,10 @@ ixgbe_reset_rx_queue(struct ixgbe_adapter *adapter, struct ixgbe_rx_queue *rxq)
+@@ -2948,6 +2948,10 @@ ixgbe_reset_rx_queue(struct ixgbe_adapter *adapter, struct ixgbe_rx_queue *rxq)

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

* [dpdk-stable] patch 'net/ice: fix performance with writeback policy' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (40 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ixgbe: fix mbuf " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'build: propagate Windows system dependencies to pkg-config' " Xueming Li
                   ` (210 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Luca Boccassi, Lijuan Tu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8404c8c99a31cd9d29761b3e29ba6f18d78746a6 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Sun, 29 Aug 2021 17:24:52 +0800
Subject: [PATCH] net/ice: fix performance with writeback policy
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit af167bcf174b59fa4776297e628a94143cf6a330 ]

Apply the same fix that for iavf to DCF
commit ead06572bd8f ("net/iavf: fix performance with writeback policy")

Fixes: 4b0d391f0eab ("net/ice: add queue config in DCF")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Lijuan Tu <lijuan.tu@intel.com>
---
 drivers/net/ice/ice_dcf_ethdev.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index 71f8a4b4cc..b523df47e1 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -166,10 +166,15 @@ ice_dcf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 		    VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) {
 			/* If WB_ON_ITR supports, enable it */
 			hw->msix_base = IAVF_RX_VEC_START;
+			/* Set the ITR for index zero, to 2us to make sure that
+			 * we leave time for aggregation to occur, but don't
+			 * increase latency dramatically.
+			 */
 			IAVF_WRITE_REG(&hw->avf,
 				       IAVF_VFINT_DYN_CTLN1(hw->msix_base - 1),
-				       IAVF_VFINT_DYN_CTLN1_ITR_INDX_MASK |
-				       IAVF_VFINT_DYN_CTLN1_WB_ON_ITR_MASK);
+				       (0 << IAVF_VFINT_DYN_CTLN1_ITR_INDX_SHIFT) |
+				       IAVF_VFINT_DYN_CTLN1_WB_ON_ITR_MASK |
+				       (2UL << IAVF_VFINT_DYN_CTLN1_INTERVAL_SHIFT));
 		} else {
 			/* If no WB_ON_ITR offload flags, need to set
 			 * interrupt for descriptor write back.
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.993573642 +0800
+++ 0042-net-ice-fix-performance-with-writeback-policy.patch	2021-11-10 14:17:01.797413358 +0800
@@ -1 +1 @@
-From af167bcf174b59fa4776297e628a94143cf6a330 Mon Sep 17 00:00:00 2001
+From 8404c8c99a31cd9d29761b3e29ba6f18d78746a6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit af167bcf174b59fa4776297e628a94143cf6a330 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 94c6a6e61c..f510bad381 100644
+index 71f8a4b4cc..b523df47e1 100644
@@ -22 +24 @@
-@@ -178,10 +178,15 @@ ice_dcf_config_rx_queues_irqs(struct rte_eth_dev *dev,
+@@ -166,10 +166,15 @@ ice_dcf_config_rx_queues_irqs(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'build: propagate Windows system dependencies to pkg-config' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (41 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice: fix performance with writeback policy' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'test/func_reentrancy: free memzones after test' " Xueming Li
                   ` (209 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Luca Boccassi, William Tu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 91f3769c3fa08e7aaaa2098ebb80757f8aa2cf8f Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Fri, 20 Aug 2021 02:14:46 +0300
Subject: [PATCH] build: propagate Windows system dependencies to pkg-config
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5ffa86a2b4167276212c7f666a8f96fa4f46d3b3 ]

Windows EAL depends on some system libraries. They were linked using
add_project_link_arguments('-l<LIB>'), which prevented meson from adding
them to Libs.private of pkg-config file. As a result, applications using
pkg-config to find DPDK hit link errors, for example:

    librte_eal.a(eal_windows_eal_debug.c.obj) : error LNK2019: unresolved
    external symbol __imp_SymInitialize referenced in function
    rte_dump_stack

Reference required libraries in EAL using ext_deps meson variable.
bus/pci and net/pcap depend on lib/eal and will pull them automatically.
Drop advapi32 dependency, as MinGW locates VirtualAlloc2() dynamically.

Fixes: 2a5d547a4a9b ("eal/windows: implement basic memory management")
Fixes: c91717eb75c8 ("eal/windows: support exit and panic")

Reported-by: William Tu <u9012063@gmail.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: William Tu <u9012063@gmail.com>
---
 config/meson.build                 | 13 ++-----------
 lib/librte_eal/windows/meson.build | 10 ++++++++++
 2 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index b2734fc0cf..d909d064c2 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -278,7 +278,8 @@ if is_freebsd
 endif
 
 if is_windows
-	# VirtualAlloc2() is available since Windows 10 / Server 2016.
+	# VirtualAlloc2() is available since Windows 10 / Server 2019.
+	# It's essential for EAL, so we don't support older versions.
 	add_project_arguments('-D_WIN32_WINNT=0x0A00', language: 'c')
 
 	# Use MinGW-w64 stdio, because DPDK assumes ANSI-compliant formatting.
@@ -286,16 +287,6 @@ if is_windows
 		add_project_arguments('-D__USE_MINGW_ANSI_STDIO', language: 'c')
 	endif
 
-	add_project_link_arguments('-lws2_32', language: 'c')
-
-	# Contrary to docs, VirtualAlloc2() is exported by mincore.lib
-	# in Windows SDK, while MinGW exports it by advapi32.a.
-	if is_ms_linker
-		add_project_link_arguments('-lmincore', language: 'c')
-	endif
-
-	add_project_link_arguments('-ladvapi32', '-lsetupapi', language: 'c')
-	add_project_link_arguments('-ldbghelp', language: 'c')
 endif
 
 if get_option('b_lto')
diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build
index 3b2faf29eb..557e3c04a5 100644
--- a/lib/librte_eal/windows/meson.build
+++ b/lib/librte_eal/windows/meson.build
@@ -22,3 +22,13 @@ sources += files(
 )
 
 dpdk_conf.set10('RTE_EAL_NUMA_AWARE_HUGEPAGES', true)
+
+ext_deps += [
+	cc.find_library('dbghelp'),
+	cc.find_library('setupapi'),
+	cc.find_library('ws2_32'),
+]
+if is_ms_linker
+	# Contrary to docs, VirtualAlloc2() is exported by mincore.lib.
+	ext_deps += cc.find_library('mincore')
+endif
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.034409827 +0800
+++ 0043-build-propagate-Windows-system-dependencies-to-pkg-c.patch	2021-11-10 14:17:01.797413358 +0800
@@ -1 +1 @@
-From 5ffa86a2b4167276212c7f666a8f96fa4f46d3b3 Mon Sep 17 00:00:00 2001
+From 91f3769c3fa08e7aaaa2098ebb80757f8aa2cf8f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5ffa86a2b4167276212c7f666a8f96fa4f46d3b3 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -27,3 +29,3 @@
- config/meson.build          | 14 ++------------
- lib/eal/windows/meson.build | 10 ++++++++++
- 2 files changed, 12 insertions(+), 12 deletions(-)
+ config/meson.build                 | 13 ++-----------
+ lib/librte_eal/windows/meson.build | 10 ++++++++++
+ 2 files changed, 12 insertions(+), 11 deletions(-)
@@ -32 +34 @@
-index 3b5966ec2f..0b8359404b 100644
+index b2734fc0cf..d909d064c2 100644
@@ -35 +37 @@
-@@ -340,7 +340,8 @@ if is_freebsd
+@@ -278,7 +278,8 @@ if is_freebsd
@@ -39,4 +41,4 @@
--    # VirtualAlloc2() is available since Windows 10 / Server 2016.
-+    # VirtualAlloc2() is available since Windows 10 / Server 2019.
-+    # It's essential for EAL, so we don't support older versions.
-     add_project_arguments('-D_WIN32_WINNT=0x0A00', language: 'c')
+-	# VirtualAlloc2() is available since Windows 10 / Server 2016.
++	# VirtualAlloc2() is available since Windows 10 / Server 2019.
++	# It's essential for EAL, so we don't support older versions.
+ 	add_project_arguments('-D_WIN32_WINNT=0x0A00', language: 'c')
@@ -44,7 +46,6 @@
-     # Use MinGW-w64 stdio, because DPDK assumes ANSI-compliant formatting.
-@@ -352,17 +353,6 @@ if is_windows
-     if cc.get_id() == 'clang'
-         add_project_arguments('-D_CRT_SECURE_NO_WARNINGS', language: 'c')
-     endif
--
--    add_project_link_arguments('-lws2_32', language: 'c')
+ 	# Use MinGW-w64 stdio, because DPDK assumes ANSI-compliant formatting.
+@@ -286,16 +287,6 @@ if is_windows
+ 		add_project_arguments('-D__USE_MINGW_ANSI_STDIO', language: 'c')
+ 	endif
+ 
+-	add_project_link_arguments('-lws2_32', language: 'c')
@@ -52,5 +53,5 @@
--    # Contrary to docs, VirtualAlloc2() is exported by mincore.lib
--    # in Windows SDK, while MinGW exports it by advapi32.a.
--    if is_ms_linker
--        add_project_link_arguments('-lmincore', language: 'c')
--    endif
+-	# Contrary to docs, VirtualAlloc2() is exported by mincore.lib
+-	# in Windows SDK, while MinGW exports it by advapi32.a.
+-	if is_ms_linker
+-		add_project_link_arguments('-lmincore', language: 'c')
+-	endif
@@ -58,2 +59,2 @@
--    add_project_link_arguments('-ladvapi32', '-lsetupapi', language: 'c')
--    add_project_link_arguments('-ldbghelp', language: 'c')
+-	add_project_link_arguments('-ladvapi32', '-lsetupapi', language: 'c')
+-	add_project_link_arguments('-ldbghelp', language: 'c')
@@ -63,5 +64,5 @@
-diff --git a/lib/eal/windows/meson.build b/lib/eal/windows/meson.build
-index fc12fefd0d..845e406ca1 100644
---- a/lib/eal/windows/meson.build
-+++ b/lib/eal/windows/meson.build
-@@ -24,3 +24,13 @@ sources += files(
+diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build
+index 3b2faf29eb..557e3c04a5 100644
+--- a/lib/librte_eal/windows/meson.build
++++ b/lib/librte_eal/windows/meson.build
+@@ -22,3 +22,13 @@ sources += files(
@@ -73,3 +74,3 @@
-+        cc.find_library('dbghelp'),
-+        cc.find_library('setupapi'),
-+        cc.find_library('ws2_32'),
++	cc.find_library('dbghelp'),
++	cc.find_library('setupapi'),
++	cc.find_library('ws2_32'),
@@ -78,2 +79,2 @@
-+        # Contrary to docs, VirtualAlloc2() is exported by mincore.lib.
-+        ext_deps += cc.find_library('mincore')
++	# Contrary to docs, VirtualAlloc2() is exported by mincore.lib.
++	ext_deps += cc.find_library('mincore')

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

* [dpdk-stable] patch 'test/func_reentrancy: free memzones after test' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (42 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'build: propagate Windows system dependencies to pkg-config' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'examples/service_cores: fix lcore count check' " Xueming Li
                   ` (208 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Joyce Kong
  Cc: Luca Boccassi, Ruifeng Wang, Feifei Wang, Olivier Matz,
	David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8192dfc388446d9f199f105c244898f1d5843a1e Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong@arm.com>
Date: Sun, 22 Aug 2021 21:57:40 -0500
Subject: [PATCH] test/func_reentrancy: free memzones after test
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d5559ac589953fa9f018aa581032e0f74bd49729 ]

Function reentrancy test limits maximum number of iterations
simultaneously, however it doesn't free the 'fr_test_once'
memzones after the fact, so introduce freeing 'fr_test_once'
in ring/mempool/hash/fbk/lpm_clean.

Meanwhile, add the missing free for test case on main thread.

Fixes: 104a92bd026f ("app: add reentrancy tests")
Fixes: 995eec619024 ("test: clean up memory for function reentrancy test")

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_func_reentrancy.c | 35 ++++++++++++++++++++++++---------
 1 file changed, 26 insertions(+), 9 deletions(-)

diff --git a/app/test/test_func_reentrancy.c b/app/test/test_func_reentrancy.c
index 231c99a9eb..838ab6f0f9 100644
--- a/app/test/test_func_reentrancy.c
+++ b/app/test/test_func_reentrancy.c
@@ -89,6 +89,10 @@ ring_clean(unsigned int lcore_id)
 	char ring_name[MAX_STRING_SIZE];
 	int i;
 
+	rp = rte_ring_lookup("fr_test_once");
+	if (rp != NULL)
+		rte_ring_free(rp);
+
 	for (i = 0; i < MAX_ITER_MULTI; i++) {
 		snprintf(ring_name, sizeof(ring_name),
 				"fr_test_%d_%d", lcore_id, i);
@@ -148,7 +152,10 @@ mempool_clean(unsigned int lcore_id)
 	char mempool_name[MAX_STRING_SIZE];
 	int i;
 
-	/* verify all ring created successful */
+	mp = rte_mempool_lookup("fr_test_once");
+	if (mp != NULL)
+		rte_mempool_free(mp);
+
 	for (i = 0; i < MAX_ITER_MULTI; i++) {
 		snprintf(mempool_name, sizeof(mempool_name), "fr_test_%d_%d",
 			 lcore_id, i);
@@ -208,6 +215,10 @@ hash_clean(unsigned lcore_id)
 	struct rte_hash *handle;
 	int i;
 
+	handle = rte_hash_find_existing("fr_test_once");
+	if (handle != NULL)
+		rte_hash_free(handle);
+
 	for (i = 0; i < MAX_ITER_MULTI; i++) {
 		snprintf(hash_name, sizeof(hash_name), "fr_test_%d_%d",  lcore_id, i);
 
@@ -272,6 +283,10 @@ fbk_clean(unsigned lcore_id)
 	struct rte_fbk_hash_table *handle;
 	int i;
 
+	handle = rte_fbk_hash_find_existing("fr_test_once");
+	if (handle != NULL)
+		rte_fbk_hash_free(handle);
+
 	for (i = 0; i < MAX_ITER_MULTI; i++) {
 		snprintf(fbk_name, sizeof(fbk_name), "fr_test_%d_%d",  lcore_id, i);
 
@@ -338,6 +353,10 @@ lpm_clean(unsigned int lcore_id)
 	struct rte_lpm *lpm;
 	int i;
 
+	lpm = rte_lpm_find_existing("fr_test_once");
+	if (lpm != NULL)
+		rte_lpm_free(lpm);
+
 	for (i = 0; i < MAX_LPM_ITER_TIMES; i++) {
 		snprintf(lpm_name, sizeof(lpm_name), "fr_test_%d_%d",  lcore_id, i);
 
@@ -418,11 +437,10 @@ struct test_case test_cases[] = {
 static int
 launch_test(struct test_case *pt_case)
 {
+	unsigned int lcore_id;
+	unsigned int cores;
+	unsigned int count;
 	int ret = 0;
-	unsigned lcore_id;
-	unsigned cores_save = rte_lcore_count();
-	unsigned cores = RTE_MIN(cores_save, MAX_LCORES);
-	unsigned count;
 
 	if (pt_case->func == NULL)
 		return -1;
@@ -430,6 +448,7 @@ launch_test(struct test_case *pt_case)
 	rte_atomic32_set(&obj_count, 0);
 	rte_atomic32_set(&synchro, 0);
 
+	cores = RTE_MIN(rte_lcore_count(), MAX_LCORES);
 	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		if (cores == 1)
 			break;
@@ -442,14 +461,12 @@ launch_test(struct test_case *pt_case)
 	if (pt_case->func(pt_case->arg) < 0)
 		ret = -1;
 
-	cores = cores_save;
 	RTE_LCORE_FOREACH_WORKER(lcore_id) {
-		if (cores == 1)
-			break;
-		cores--;
 		if (rte_eal_wait_lcore(lcore_id) < 0)
 			ret = -1;
+	}
 
+	RTE_LCORE_FOREACH(lcore_id) {
 		if (pt_case->clean != NULL)
 			pt_case->clean(lcore_id);
 	}
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.076286617 +0800
+++ 0044-test-func_reentrancy-free-memzones-after-test.patch	2021-11-10 14:17:01.797413358 +0800
@@ -1 +1 @@
-From d5559ac589953fa9f018aa581032e0f74bd49729 Mon Sep 17 00:00:00 2001
+From 8192dfc388446d9f199f105c244898f1d5843a1e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d5559ac589953fa9f018aa581032e0f74bd49729 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'examples/service_cores: fix lcore count check' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (43 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'test/func_reentrancy: free memzones after test' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'eal: fix memory leak when saving arguments' " Xueming Li
                   ` (207 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Luca Boccassi, Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 64c6120185910f01dcf36fe8f42f94c4aa7ad995 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Mon, 30 Aug 2021 16:04:12 +0800
Subject: [PATCH] examples/service_cores: fix lcore count check
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 328720c594f235aa44c78fe360e8e6f31b5e989f ]

The example has various profiles to run services on specified
number of lcores. Due to incorrect boundary condition, service
can be dispatched to a core that does not exist. This puts main
core into endless wait.

Max available number of service cores is all detected lcores
excluding main core.

Fixes: 7f6ee6aee717 ("examples/service_cores: check cores before run")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 examples/service_cores/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/service_cores/main.c b/examples/service_cores/main.c
index c5753cc52d..e0cb4f9acb 100644
--- a/examples/service_cores/main.c
+++ b/examples/service_cores/main.c
@@ -118,7 +118,7 @@ apply_profile(int profile_id)
 	struct profile *p = &profiles[profile_id];
 	const uint8_t core_off = 1;
 
-	if (p->num_cores > rte_lcore_count() + 1) {
+	if (p->num_cores > rte_lcore_count() - 1) {
 		printf("insufficent cores to run (%s)",
 			p->name);
 		return;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.118375010 +0800
+++ 0045-examples-service_cores-fix-lcore-count-check.patch	2021-11-10 14:17:01.797413358 +0800
@@ -1 +1 @@
-From 328720c594f235aa44c78fe360e8e6f31b5e989f Mon Sep 17 00:00:00 2001
+From 64c6120185910f01dcf36fe8f42f94c4aa7ad995 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 328720c594f235aa44c78fe360e8e6f31b5e989f ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 83915b9a53..9f52082254 100644
+index c5753cc52d..e0cb4f9acb 100644

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

* [dpdk-stable] patch 'eal: fix memory leak when saving arguments' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (44 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'examples/service_cores: fix lcore count check' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'ethdev: fix typo in Rx queue setup API comment' " Xueming Li
                   ` (206 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Conor Walsh
  Cc: Luca Boccassi, Zhihong Peng, Conor Fogarty, Bruce Richardson,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fcece17c517b90e30826955e4a6f6f54df2c0e90 Mon Sep 17 00:00:00 2001
From: Conor Walsh <conor.walsh@intel.com>
Date: Wed, 1 Sep 2021 09:38:47 +0000
Subject: [PATCH] eal: fix memory leak when saving arguments
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4777674c4428f528fa2890d8afab551f6dd54c24 ]

This patch fixes a memleak which was reported in Bugzilla within the
eal_save_args function. This was caused by the function mistakenly
adding -- to the eal args instead of breaking beforehand.

Bugzilla ID: 722
Fixes: 293c53d8b23c ("eal: add telemetry callbacks")

Reported-by: Zhihong Peng <zhihongx.peng@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Signed-off-by: Conor Fogarty <conor.fogarty@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/common/eal_common_options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index f8ab47435d..977ba21c51 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -228,9 +228,9 @@ eal_save_args(int argc, char **argv)
 		return -1;
 
 	for (i = 0; i < argc; i++) {
-		eal_args[i] = strdup(argv[i]);
 		if (strcmp(argv[i], "--") == 0)
 			break;
+		eal_args[i] = strdup(argv[i]);
 	}
 	eal_args[i++] = NULL; /* always finish with NULL */
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.159870986 +0800
+++ 0046-eal-fix-memory-leak-when-saving-arguments.patch	2021-11-10 14:17:01.797413358 +0800
@@ -1 +1 @@
-From 4777674c4428f528fa2890d8afab551f6dd54c24 Mon Sep 17 00:00:00 2001
+From fcece17c517b90e30826955e4a6f6f54df2c0e90 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4777674c4428f528fa2890d8afab551f6dd54c24 ]
@@ -18 +21 @@
- lib/eal/common/eal_common_options.c | 2 +-
+ lib/librte_eal/common/eal_common_options.c | 2 +-
@@ -21,5 +24,5 @@
-diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c
-index 6ecf5fd660..eaef57312f 100644
---- a/lib/eal/common/eal_common_options.c
-+++ b/lib/eal/common/eal_common_options.c
-@@ -223,9 +223,9 @@ eal_save_args(int argc, char **argv)
+diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
+index f8ab47435d..977ba21c51 100644
+--- a/lib/librte_eal/common/eal_common_options.c
++++ b/lib/librte_eal/common/eal_common_options.c
+@@ -228,9 +228,9 @@ eal_save_args(int argc, char **argv)

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

* [dpdk-stable] patch 'ethdev: fix typo in Rx queue setup API comment' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (45 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'eal: fix memory leak when saving arguments' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net: fix checksum offload for outer IPv4' " Xueming Li
                   ` (205 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Joyce Kong; +Cc: Luca Boccassi, Ruifeng Wang, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7e0a1eee89176ebfe9f009b7e6f69d5487e1c6fd Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong@arm.com>
Date: Sun, 5 Sep 2021 21:13:53 -0500
Subject: [PATCH] ethdev: fix typo in Rx queue setup API comment
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 97d7b92772603602fed376b6bcf50d55721c659e ]

Fix a typo that mb_pool was misspelt as mp_pool.

Fixes: 4ff702b5dfa9 ("ethdev: introduce Rx buffer split")

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_ethdev/rte_ethdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 3ec7e9a6b3..de577ca075 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -2155,7 +2155,7 @@ rte_eth_dev_is_removed(uint16_t port_id);
  *   The configuration structure also contains the pointer to the array
  *   of the receiving buffer segment descriptions, see rx_seg and rx_nseg
  *   fields, this extended configuration might be used by split offloads like
- *   RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT. If mp_pool is not NULL,
+ *   RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT. If mb_pool is not NULL,
  *   the extended configuration fields must be set to NULL and zero.
  * @param mb_pool
  *   The pointer to the memory pool from which to allocate *rte_mbuf* network
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.202628558 +0800
+++ 0047-ethdev-fix-typo-in-Rx-queue-setup-API-comment.patch	2021-11-10 14:17:01.800746663 +0800
@@ -1 +1 @@
-From 97d7b92772603602fed376b6bcf50d55721c659e Mon Sep 17 00:00:00 2001
+From 7e0a1eee89176ebfe9f009b7e6f69d5487e1c6fd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 97d7b92772603602fed376b6bcf50d55721c659e ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +17 @@
- lib/ethdev/rte_ethdev.h | 2 +-
+ lib/librte_ethdev/rte_ethdev.h | 2 +-
@@ -18,5 +20,5 @@
-diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
-index 1b9f383e3e..2925845517 100644
---- a/lib/ethdev/rte_ethdev.h
-+++ b/lib/ethdev/rte_ethdev.h
-@@ -2190,7 +2190,7 @@ rte_eth_dev_is_removed(uint16_t port_id);
+diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
+index 3ec7e9a6b3..de577ca075 100644
+--- a/lib/librte_ethdev/rte_ethdev.h
++++ b/lib/librte_ethdev/rte_ethdev.h
+@@ -2155,7 +2155,7 @@ rte_eth_dev_is_removed(uint16_t port_id);

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

* [dpdk-stable] patch 'net: fix checksum offload for outer IPv4' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (46 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'ethdev: fix typo in Rx queue setup API comment' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/virtio: fix mbuf count on Rx queue setup' " Xueming Li
                   ` (204 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Mohsin Kazmi; +Cc: Luca Boccassi, Qi Zhang, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8cbd4cec761f50557d0a0b174e4b1bbd1de58fd9 Mon Sep 17 00:00:00 2001
From: Mohsin Kazmi <mohsin.kazmi14@gmail.com>
Date: Tue, 7 Sep 2021 12:49:16 +0200
Subject: [PATCH] net: fix checksum offload for outer IPv4
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 818ce1132ab69c5bb34ede0120776f71969dc091 ]

Preparation of the headers for the hardware offload
misses the outer IPv4 checksum offload.
It results in bad checksum computed by hardware NIC.

This patch fixes the issue by setting the outer IPv4
checksum field to 0.

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

Signed-off-by: Mohsin Kazmi <mohsin.kazmi14@gmail.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_net/rte_net.h | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/lib/librte_net/rte_net.h b/lib/librte_net/rte_net.h
index 434435ffa2..42639bc154 100644
--- a/lib/librte_net/rte_net.h
+++ b/lib/librte_net/rte_net.h
@@ -125,11 +125,22 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
 	 * Mainly it is required to avoid fragmented headers check if
 	 * no offloads are requested.
 	 */
-	if (!(ol_flags & (PKT_TX_IP_CKSUM | PKT_TX_L4_MASK | PKT_TX_TCP_SEG)))
+	if (!(ol_flags & (PKT_TX_IP_CKSUM | PKT_TX_L4_MASK | PKT_TX_TCP_SEG |
+			  PKT_TX_OUTER_IP_CKSUM)))
 		return 0;
 
-	if (ol_flags & (PKT_TX_OUTER_IPV4 | PKT_TX_OUTER_IPV6))
+	if (ol_flags & (PKT_TX_OUTER_IPV4 | PKT_TX_OUTER_IPV6)) {
 		inner_l3_offset += m->outer_l2_len + m->outer_l3_len;
+		/*
+		 * prepare outer IPv4 header checksum by setting it to 0,
+		 * in order to be computed by hardware NICs.
+		 */
+		if (ol_flags & PKT_TX_OUTER_IP_CKSUM) {
+			ipv4_hdr = rte_pktmbuf_mtod_offset(m,
+					struct rte_ipv4_hdr *, m->outer_l2_len);
+			ipv4_hdr->hdr_checksum = 0;
+		}
+	}
 
 	/*
 	 * Check if headers are fragmented.
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.249069977 +0800
+++ 0048-net-fix-checksum-offload-for-outer-IPv4.patch	2021-11-10 14:17:01.804079970 +0800
@@ -1 +1 @@
-From 818ce1132ab69c5bb34ede0120776f71969dc091 Mon Sep 17 00:00:00 2001
+From 8cbd4cec761f50557d0a0b174e4b1bbd1de58fd9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 818ce1132ab69c5bb34ede0120776f71969dc091 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
- lib/net/rte_net.h | 15 +++++++++++++--
+ lib/librte_net/rte_net.h | 15 +++++++++++++--
@@ -23 +25 @@
-diff --git a/lib/net/rte_net.h b/lib/net/rte_net.h
+diff --git a/lib/librte_net/rte_net.h b/lib/librte_net/rte_net.h
@@ -25,2 +27,2 @@
---- a/lib/net/rte_net.h
-+++ b/lib/net/rte_net.h
+--- a/lib/librte_net/rte_net.h
++++ b/lib/librte_net/rte_net.h

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

* [dpdk-stable] patch 'net/virtio: fix mbuf count on Rx queue setup' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (47 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net: fix checksum offload for outer IPv4' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/virtio: fix split queue vectorized Rx' " Xueming Li
                   ` (203 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Ivan Ilchenko
  Cc: Luca Boccassi, Andrew Rybchenko, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 24ae55b075d60fe8e0f4196108238e35c0b49a8f Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Fri, 20 Aug 2021 15:47:20 +0300
Subject: [PATCH] net/virtio: fix mbuf count on Rx queue setup
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b8d0a27842dc2a90f1bf341d1e5cbf0dfbc7c4e5 ]

Rx queue setup finish function may report wrong number of
allocated mbufs in case of in-order feature. Fix the
function to not ignore allocation error and count only
successfully allocated number of buffers.

Fixes: e5f456a98d3c ("net/virtio: support in-order Rx and Tx")

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 6cfdfc63c2..b5b99d19f8 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -776,10 +776,11 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)
 				if (unlikely(error)) {
 					for (i = 0; i < free_cnt; i++)
 						rte_pktmbuf_free(pkts[i]);
+				} else {
+					nbufs += free_cnt;
 				}
 			}
 
-			nbufs += free_cnt;
 			vq_update_avail_idx(vq);
 		}
 	} else {
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.290749180 +0800
+++ 0049-net-virtio-fix-mbuf-count-on-Rx-queue-setup.patch	2021-11-10 14:17:01.804079970 +0800
@@ -1 +1 @@
-From b8d0a27842dc2a90f1bf341d1e5cbf0dfbc7c4e5 Mon Sep 17 00:00:00 2001
+From 24ae55b075d60fe8e0f4196108238e35c0b49a8f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b8d0a27842dc2a90f1bf341d1e5cbf0dfbc7c4e5 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index d0365ce4bf..8a48fba5cc 100644
+index 6cfdfc63c2..b5b99d19f8 100644
@@ -25 +27 @@
-@@ -768,10 +768,11 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)
+@@ -776,10 +776,11 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)

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

* [dpdk-stable] patch 'net/virtio: fix split queue vectorized Rx' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (48 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/virtio: fix mbuf count on Rx queue setup' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/virtio: avoid unneeded link interrupt configuration' " Xueming Li
                   ` (202 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Ivan Ilchenko
  Cc: Luca Boccassi, Andrew Rybchenko, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b95404765490eb484a534e7d01aea2c95d046fb9 Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Fri, 20 Aug 2021 15:47:52 +0300
Subject: [PATCH] net/virtio: fix split queue vectorized Rx
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c97e73779c3eb2f7c214a7300673e54b886223b6 ]

Descriptors number may be set less than queue size for split queue
vectorized Rx path. Pointers to mbufs for received packets are
obtained from SW ring, that is initially filled with them in the end
of queue setup in virtio_dev_rx_queue_setup_finish(). The begin of the
SW ring filled up to the size of descriptors number. At queue size
offset from the begin of the SW ring pointers to some fake mbuf are also
set for wrapping purpose. So the ring may contains the hole of invalid
pointers from descriptors number offset to queue size offset, and split
vectorized Rx routines could write to the invalid addresses since they
use the ring up to the queue size. Fix this by setting descriptors
number to queue size on Rx queue setup.

Fixes: fc3d66212fed ("virtio: add vector Rx")

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_rxtx.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index b5b99d19f8..7fb41f12af 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -711,8 +711,14 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	}
 	vq->vq_free_thresh = rx_free_thresh;
 
-	if (nb_desc == 0 || nb_desc > vq->vq_nentries)
+	/*
+	 * For split ring vectorized path descriptors number must be
+	 * equal to the ring size.
+	 */
+	if (nb_desc > vq->vq_nentries ||
+	    (!vtpci_packed_queue(hw) && hw->use_vec_rx)) {
 		nb_desc = vq->vq_nentries;
+	}
 	vq->vq_free_cnt = RTE_MIN(vq->vq_free_cnt, nb_desc);
 
 	rxvq = &vq->rxq;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.333221337 +0800
+++ 0050-net-virtio-fix-split-queue-vectorized-Rx.patch	2021-11-10 14:17:01.804079970 +0800
@@ -1 +1 @@
-From c97e73779c3eb2f7c214a7300673e54b886223b6 Mon Sep 17 00:00:00 2001
+From b95404765490eb484a534e7d01aea2c95d046fb9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c97e73779c3eb2f7c214a7300673e54b886223b6 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index 18f03c9fc9..97ed69596a 100644
+index b5b99d19f8..7fb41f12af 100644
@@ -32 +34 @@
-@@ -706,8 +706,14 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -711,8 +711,14 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
@@ -36 +38 @@
--	if (nb_desc > vq->vq_nentries)
+-	if (nb_desc == 0 || nb_desc > vq->vq_nentries)
@@ -42 +44 @@
-+	    (!virtio_with_packed_queue(hw) && hw->use_vec_rx)) {
++	    (!vtpci_packed_queue(hw) && hw->use_vec_rx)) {

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

* [dpdk-stable] patch 'net/virtio: avoid unneeded link interrupt configuration' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (49 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/virtio: fix split queue vectorized Rx' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/virtio-user: fix Rx interrupts with multi-queue' " Xueming Li
                   ` (201 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b00b073569dffc922323abb98fa845f716b6bf08 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 31 Aug 2021 17:54:10 +0200
Subject: [PATCH] net/virtio: avoid unneeded link interrupt configuration
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5be2325ecec83ab9dd5e25dde6112aed56f3e4f6 ]

There is no reason to re-register a interrupt handler for LSC if this
feature was not requested in the first place.
A simple use case is when asking for Rx interrupts without LSC interrupt.

Fixes: 26b683b4f7d0 ("net/virtio: setup Rx queue interrupts")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_ethdev.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 520f3fde54..cfdeb40160 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1713,13 +1713,15 @@ virtio_configure_intr(struct rte_eth_dev *dev)
 		}
 	}
 
-	/* Re-register callback to update max_intr */
-	rte_intr_callback_unregister(dev->intr_handle,
-				     virtio_interrupt_handler,
-				     dev);
-	rte_intr_callback_register(dev->intr_handle,
-				   virtio_interrupt_handler,
-				   dev);
+	if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
+		/* Re-register callback to update max_intr */
+		rte_intr_callback_unregister(dev->intr_handle,
+					     virtio_interrupt_handler,
+					     dev);
+		rte_intr_callback_register(dev->intr_handle,
+					   virtio_interrupt_handler,
+					   dev);
+	}
 
 	/* DO NOT try to remove this! This function will enable msix, or QEMU
 	 * will encounter SIGSEGV when DRIVER_OK is sent.
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.375595016 +0800
+++ 0051-net-virtio-avoid-unneeded-link-interrupt-configurati.patch	2021-11-10 14:17:01.804079970 +0800
@@ -1 +1 @@
-From 5be2325ecec83ab9dd5e25dde6112aed56f3e4f6 Mon Sep 17 00:00:00 2001
+From b00b073569dffc922323abb98fa845f716b6bf08 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5be2325ecec83ab9dd5e25dde6112aed56f3e4f6 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 9690eb4fb2..061d02f666 100644
+index 520f3fde54..cfdeb40160 100644
@@ -23 +25 @@
-@@ -1685,13 +1685,15 @@ virtio_configure_intr(struct rte_eth_dev *dev)
+@@ -1713,13 +1713,15 @@ virtio_configure_intr(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/virtio-user: fix Rx interrupts with multi-queue' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (50 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/virtio: avoid unneeded link interrupt configuration' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'vhost: fix crash on port deletion' " Xueming Li
                   ` (200 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From dd6e6e33c7cf046becb5a373f44228489cf01af2 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 31 Aug 2021 17:54:11 +0200
Subject: [PATCH] net/virtio-user: fix Rx interrupts with multi-queue
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 848e93d9001e74fdbcb31b7ac5cdc1991b9e3f03 ]

The callfds[] array stores eventfds sequentially for Rx and Tx vq.

Fixes: 3d4fb6fd2505 ("net/virtio-user: support Rx interrupt")

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

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index e93e1919ab..73f6fd7313 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -312,7 +312,7 @@ virtio_user_fill_intr_handle(struct virtio_user_dev *dev)
 	}
 
 	for (i = 0; i < dev->max_queue_pairs; ++i)
-		eth_dev->intr_handle->efds[i] = dev->callfds[i];
+		eth_dev->intr_handle->efds[i] = dev->callfds[2 * i];
 	eth_dev->intr_handle->nb_efd = dev->max_queue_pairs;
 	eth_dev->intr_handle->max_intr = dev->max_queue_pairs + 1;
 	eth_dev->intr_handle->type = RTE_INTR_HANDLE_VDEV;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.418669644 +0800
+++ 0052-net-virtio-user-fix-Rx-interrupts-with-multi-queue.patch	2021-11-10 14:17:01.804079970 +0800
@@ -1 +1 @@
-From 848e93d9001e74fdbcb31b7ac5cdc1991b9e3f03 Mon Sep 17 00:00:00 2001
+From dd6e6e33c7cf046becb5a373f44228489cf01af2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 848e93d9001e74fdbcb31b7ac5cdc1991b9e3f03 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 16c58710d7..89f8b2271f 100644
+index e93e1919ab..73f6fd7313 100644
@@ -21 +23 @@
-@@ -416,7 +416,7 @@ virtio_user_fill_intr_handle(struct virtio_user_dev *dev)
+@@ -312,7 +312,7 @@ virtio_user_fill_intr_handle(struct virtio_user_dev *dev)

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

* [dpdk-stable] patch 'vhost: fix crash on port deletion' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (51 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/virtio-user: fix Rx interrupts with multi-queue' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/virtio: fix repeated freeing of virtqueue' " Xueming Li
                   ` (199 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Gaoxiang Liu; +Cc: Luca Boccassi, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e543f89ba585ee382549616f9d88b6eeeee142e4 Mon Sep 17 00:00:00 2001
From: Gaoxiang Liu <liugaoxiang@huawei.com>
Date: Thu, 2 Sep 2021 23:45:53 +0800
Subject: [PATCH] vhost: fix crash on port deletion
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 451dc0fad83d07d194e688f52093c7e888d2e317 ]

The rte_vhost_driver_unregister() and vhost_user_read_cb()
can be called at the same time by 2 threads.
when memory of vsocket is freed in rte_vhost_driver_unregister(),
the invalid memory of vsocket is accessed in vhost_user_read_cb().
It's a bug of both mode for vhost as server or client.

E.g., vhostuser port is created as server.
Thread1 calls rte_vhost_driver_unregister().
Before the listen fd is deleted from poll waiting fds,
"vhost-events" thread then calls vhost_user_server_new_connection(),
then a new conn fd is added in fdset when trying to reconnect.
"vhost-events" thread then calls vhost_user_read_cb() and
accesses invalid memory of socket while thread1 frees the memory of
vsocket.

E.g., vhostuser port is created as client.
Thread1 calls rte_vhost_driver_unregister().
Before vsocket of reconn is deleted from reconn list,
"vhost_reconn" thread then calls vhost_user_add_connection()
then a new conn fd is added in fdset when trying to reconnect.
"vhost-events" thread then calls vhost_user_read_cb() and
accesses invalid memory of socket while thread1 frees the memory of
vsocket.

The fix is to move the "fdset_try_del" in front of free memory of conn,
then avoid the race condition.

The core trace is:
Program terminated with signal 11, Segmentation fault.

Fixes: 52d874dc6705 ("vhost: fix crash on closing in client mode")

Signed-off-by: Gaoxiang Liu <liugaoxiang@huawei.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/librte_vhost/socket.c | 107 +++++++++++++++++++-------------------
 1 file changed, 53 insertions(+), 54 deletions(-)

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 5d0d728d52..d6f9414c4d 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -1023,66 +1023,65 @@ again:
 
 	for (i = 0; i < vhost_user.vsocket_cnt; i++) {
 		struct vhost_user_socket *vsocket = vhost_user.vsockets[i];
+		if (strcmp(vsocket->path, path))
+			continue;
 
-		if (!strcmp(vsocket->path, path)) {
-			pthread_mutex_lock(&vsocket->conn_mutex);
-			for (conn = TAILQ_FIRST(&vsocket->conn_list);
-			     conn != NULL;
-			     conn = next) {
-				next = TAILQ_NEXT(conn, next);
-
-				/*
-				 * If r/wcb is executing, release vsocket's
-				 * conn_mutex and vhost_user's mutex locks, and
-				 * try again since the r/wcb may use the
-				 * conn_mutex and mutex locks.
-				 */
-				if (fdset_try_del(&vhost_user.fdset,
-						  conn->connfd) == -1) {
-					pthread_mutex_unlock(
-							&vsocket->conn_mutex);
-					pthread_mutex_unlock(&vhost_user.mutex);
-					goto again;
-				}
-
-				VHOST_LOG_CONFIG(INFO,
-					"free connfd = %d for device '%s'\n",
-					conn->connfd, path);
-				close(conn->connfd);
-				vhost_destroy_device(conn->vid);
-				TAILQ_REMOVE(&vsocket->conn_list, conn, next);
-				free(conn);
-			}
-			pthread_mutex_unlock(&vsocket->conn_mutex);
-
-			if (vsocket->is_server) {
-				/*
-				 * If r/wcb is executing, release vhost_user's
-				 * mutex lock, and try again since the r/wcb
-				 * may use the mutex lock.
-				 */
-				if (fdset_try_del(&vhost_user.fdset,
-						vsocket->socket_fd) == -1) {
-					pthread_mutex_unlock(&vhost_user.mutex);
-					goto again;
-				}
-
-				close(vsocket->socket_fd);
-				unlink(path);
-			} else if (vsocket->reconnect) {
-				vhost_user_remove_reconnect(vsocket);
+		if (vsocket->is_server) {
+			/*
+			 * If r/wcb is executing, release vhost_user's
+			 * mutex lock, and try again since the r/wcb
+			 * may use the mutex lock.
+			 */
+			if (fdset_try_del(&vhost_user.fdset, vsocket->socket_fd) == -1) {
+				pthread_mutex_unlock(&vhost_user.mutex);
+				goto again;
 			}
+		} else if (vsocket->reconnect) {
+			vhost_user_remove_reconnect(vsocket);
+		}
 
-			pthread_mutex_destroy(&vsocket->conn_mutex);
-			vhost_user_socket_mem_free(vsocket);
+		pthread_mutex_lock(&vsocket->conn_mutex);
+		for (conn = TAILQ_FIRST(&vsocket->conn_list);
+			 conn != NULL;
+			 conn = next) {
+			next = TAILQ_NEXT(conn, next);
 
-			count = --vhost_user.vsocket_cnt;
-			vhost_user.vsockets[i] = vhost_user.vsockets[count];
-			vhost_user.vsockets[count] = NULL;
-			pthread_mutex_unlock(&vhost_user.mutex);
+			/*
+			 * If r/wcb is executing, release vsocket's
+			 * conn_mutex and vhost_user's mutex locks, and
+			 * try again since the r/wcb may use the
+			 * conn_mutex and mutex locks.
+			 */
+			if (fdset_try_del(&vhost_user.fdset,
+					  conn->connfd) == -1) {
+				pthread_mutex_unlock(&vsocket->conn_mutex);
+				pthread_mutex_unlock(&vhost_user.mutex);
+				goto again;
+			}
 
-			return 0;
+			VHOST_LOG_CONFIG(INFO,
+				"free connfd = %d for device '%s'\n",
+				conn->connfd, path);
+			close(conn->connfd);
+			vhost_destroy_device(conn->vid);
+			TAILQ_REMOVE(&vsocket->conn_list, conn, next);
+			free(conn);
+		}
+		pthread_mutex_unlock(&vsocket->conn_mutex);
+
+		if (vsocket->is_server) {
+			close(vsocket->socket_fd);
+			unlink(path);
 		}
+
+		pthread_mutex_destroy(&vsocket->conn_mutex);
+		vhost_user_socket_mem_free(vsocket);
+
+		count = --vhost_user.vsocket_cnt;
+		vhost_user.vsockets[i] = vhost_user.vsockets[count];
+		vhost_user.vsockets[count] = NULL;
+		pthread_mutex_unlock(&vhost_user.mutex);
+		return 0;
 	}
 	pthread_mutex_unlock(&vhost_user.mutex);
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.460854189 +0800
+++ 0053-vhost-fix-crash-on-port-deletion.patch	2021-11-10 14:17:01.807413276 +0800
@@ -1 +1 @@
-From 451dc0fad83d07d194e688f52093c7e888d2e317 Mon Sep 17 00:00:00 2001
+From e543f89ba585ee382549616f9d88b6eeeee142e4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 451dc0fad83d07d194e688f52093c7e888d2e317 ]
@@ -37 +39,0 @@
-Cc: stable@dpdk.org
@@ -42 +44 @@
- lib/vhost/socket.c | 107 ++++++++++++++++++++++-----------------------
+ lib/librte_vhost/socket.c | 107 +++++++++++++++++++-------------------
@@ -45 +47 @@
-diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
+diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
@@ -47,2 +49,2 @@
---- a/lib/vhost/socket.c
-+++ b/lib/vhost/socket.c
+--- a/lib/librte_vhost/socket.c
++++ b/lib/librte_vhost/socket.c

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

* [dpdk-stable] patch 'net/virtio: fix repeated freeing of virtqueue' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (52 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'vhost: fix crash on port deletion' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:28 ` [dpdk-stable] patch 'vhost: log socket path on adding connection' " Xueming Li
                   ` (198 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Gaoxiang Liu; +Cc: Luca Boccassi, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e0d08d0c032eb3b1006cb147177fe3702c81c4f2 Mon Sep 17 00:00:00 2001
From: Gaoxiang Liu <liugaoxiang@huawei.com>
Date: Tue, 31 Aug 2021 22:39:51 +0800
Subject: [PATCH] net/virtio: fix repeated freeing of virtqueue
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5d903aee8ad0243320a23d0e1e7b34b96024e007 ]

When virtio_init_queue returns error, the memory of vq is freed.
But the value of hw->vqs[queue_idx] does not restore.
If virtio_init_queue returns error, the memory of vq is freed again
in virtio_free_queues.

Fixes: 69c80d4ef89b ("net/virtio: allocate queue at init stage")

Signed-off-by: Gaoxiang Liu <liugaoxiang@huawei.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index cfdeb40160..25f1b951f9 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -647,6 +647,7 @@ fail_q_alloc:
 	rte_memzone_free(hdr_mz);
 	rte_memzone_free(mz);
 	rte_free(vq);
+	hw->vqs[vtpci_queue_idx] = NULL;
 
 	return ret;
 }
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.502662683 +0800
+++ 0054-net-virtio-fix-repeated-freeing-of-virtqueue.patch	2021-11-10 14:17:01.807413276 +0800
@@ -1 +1 @@
-From 5d903aee8ad0243320a23d0e1e7b34b96024e007 Mon Sep 17 00:00:00 2001
+From e0d08d0c032eb3b1006cb147177fe3702c81c4f2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5d903aee8ad0243320a23d0e1e7b34b96024e007 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 061d02f666..51fa85b078 100644
+index cfdeb40160..25f1b951f9 100644
@@ -24 +26,2 @@
-@@ -632,6 +632,7 @@ free_mz:
+@@ -647,6 +647,7 @@ fail_q_alloc:
+ 	rte_memzone_free(hdr_mz);
@@ -26 +28,0 @@
- free_vq:
@@ -28 +30 @@
-+	hw->vqs[queue_idx] = NULL;
++	hw->vqs[vtpci_queue_idx] = NULL;

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

* [dpdk-stable] patch 'vhost: log socket path on adding connection' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (53 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'net/virtio: fix repeated freeing of virtqueue' " Xueming Li
@ 2021-11-10  6:28 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/virtio: fix device configure without jumbo Rx offload' " Xueming Li
                   ` (197 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:28 UTC (permalink / raw)
  To: Gaoxiang Liu; +Cc: Luca Boccassi, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From aafb232afb5115716500219bb5cdd884a4fe39e6 Mon Sep 17 00:00:00 2001
From: Gaoxiang Liu <liugaoxiang@huawei.com>
Date: Tue, 7 Sep 2021 08:51:27 +0800
Subject: [PATCH] vhost: log socket path on adding connection
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e53084d84b0f2ae67df8d785e8d79df530b21a50 ]

Add log print of socket path in vhost_user_add_connection.
It's useful when adding a mass of socket connections,
because the information of every connection is clearer.

Fixes: 8f972312b8f4 ("vhost: support vhost-user")

Signed-off-by: Gaoxiang Liu <liugaoxiang@huawei.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/librte_vhost/socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index d6f9414c4d..c6548608a3 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -243,7 +243,7 @@ vhost_user_add_connection(int fd, struct vhost_user_socket *vsocket)
 			dev->async_copy = 1;
 	}
 
-	VHOST_LOG_CONFIG(INFO, "new device, handle is %d\n", vid);
+	VHOST_LOG_CONFIG(INFO, "new device, handle is %d, path is %s\n", vid, vsocket->path);
 
 	if (vsocket->notify_ops->new_connection) {
 		ret = vsocket->notify_ops->new_connection(vid);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.545642285 +0800
+++ 0055-vhost-log-socket-path-on-adding-connection.patch	2021-11-10 14:17:01.807413276 +0800
@@ -1 +1 @@
-From e53084d84b0f2ae67df8d785e8d79df530b21a50 Mon Sep 17 00:00:00 2001
+From aafb232afb5115716500219bb5cdd884a4fe39e6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e53084d84b0f2ae67df8d785e8d79df530b21a50 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- lib/vhost/socket.c | 2 +-
+ lib/librte_vhost/socket.c | 2 +-
@@ -19 +21 @@
-diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
+diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
@@ -21,2 +23,2 @@
---- a/lib/vhost/socket.c
-+++ b/lib/vhost/socket.c
+--- a/lib/librte_vhost/socket.c
++++ b/lib/librte_vhost/socket.c

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

* [dpdk-stable] patch 'net/virtio: fix device configure without jumbo Rx offload' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (54 preceding siblings ...)
  2021-11-10  6:28 ` [dpdk-stable] patch 'vhost: log socket path on adding connection' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/octeontx2: fix MTU when PTP is enabled' " Xueming Li
                   ` (196 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Ivan Ilchenko
  Cc: Luca Boccassi, Andrew Rybchenko, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 92569f9804d1ea7ab44a916fae55aec220823349 Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Thu, 2 Sep 2021 17:39:39 +0300
Subject: [PATCH] net/virtio: fix device configure without jumbo Rx offload
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 580f3af31c99824bdd1cc331035096e34de5ca01 ]

Use max-pkt-len only if jumbo frames offload is requested
since otherwise this field isn't valid.

Fixes: 8b90e4358112 ("net/virtio: set offload flag for jumbo frames")
Fixes: 4e8169eb0d2d ("net/virtio: fix Rx scatter offload")

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_ethdev.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 25f1b951f9..7bbd483952 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2302,10 +2302,14 @@ virtio_dev_configure(struct rte_eth_dev *dev)
 			return ret;
 	}
 
-	if (rxmode->max_rx_pkt_len > hw->max_mtu + ether_hdr_len)
+	if ((rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) &&
+	    (rxmode->max_rx_pkt_len > hw->max_mtu + ether_hdr_len))
 		req_features &= ~(1ULL << VIRTIO_NET_F_MTU);
 
-	hw->max_rx_pkt_len = rxmode->max_rx_pkt_len;
+	if (rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME)
+		hw->max_rx_pkt_len = rxmode->max_rx_pkt_len;
+	else
+		hw->max_rx_pkt_len = ether_hdr_len + dev->data->mtu;
 
 	if (rx_offloads & (DEV_RX_OFFLOAD_UDP_CKSUM |
 			   DEV_RX_OFFLOAD_TCP_CKSUM))
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.587367188 +0800
+++ 0056-net-virtio-fix-device-configure-without-jumbo-Rx-off.patch	2021-11-10 14:17:01.807413276 +0800
@@ -1 +1 @@
-From 580f3af31c99824bdd1cc331035096e34de5ca01 Mon Sep 17 00:00:00 2001
+From 92569f9804d1ea7ab44a916fae55aec220823349 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 580f3af31c99824bdd1cc331035096e34de5ca01 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 51fa85b078..da1633d77e 100644
+index 25f1b951f9..7bbd483952 100644
@@ -24 +26 @@
-@@ -2103,10 +2103,14 @@ virtio_dev_configure(struct rte_eth_dev *dev)
+@@ -2302,10 +2302,14 @@ virtio_dev_configure(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/octeontx2: fix MTU when PTP is enabled' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (55 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/virtio: fix device configure without jumbo Rx offload' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/i40e: fix mbuf leak' " Xueming Li
                   ` (195 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Hanumanth Reddy Pothula; +Cc: Luca Boccassi, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c7afc9980446a742d86fbf758d635f7c4b96a03b Mon Sep 17 00:00:00 2001
From: Hanumanth Reddy Pothula <hpothula@marvell.com>
Date: Tue, 10 Aug 2021 12:51:00 +0530
Subject: [PATCH] net/octeontx2: fix MTU when PTP is enabled
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 07d15d4d84e89a2f7a56bec24225c8ff326a9cf8 ]

Update MTU value based on PTP enable status and reserve eight
bytes in TX path to accommodate VLAN tags.

If PTP is enabled maximum allowed MTU is 9200 otherwise it's 9208.

Fixes: b5dc3140448e ("net/octeontx2: support base PTP")

Signed-off-by: Hanumanth Reddy Pothula <hpothula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/net/octeontx2/otx2_ethdev_ops.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/octeontx2/otx2_ethdev_ops.c b/drivers/net/octeontx2/otx2_ethdev_ops.c
index f586e9ef59..99ddcb0170 100644
--- a/drivers/net/octeontx2/otx2_ethdev_ops.c
+++ b/drivers/net/octeontx2/otx2_ethdev_ops.c
@@ -17,7 +17,8 @@ otx2_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
 	struct nix_frs_cfg *req;
 	int rc;
 
-	frame_size += NIX_TIMESYNC_RX_OFFSET * otx2_ethdev_is_ptp_en(dev);
+	if (dev->configured && otx2_ethdev_is_ptp_en(dev))
+		frame_size += NIX_TIMESYNC_RX_OFFSET;
 
 	/* Check if MTU is within the allowed range */
 	if (frame_size < NIX_MIN_FRS || frame_size > NIX_MAX_FRS)
@@ -560,6 +561,11 @@ otx2_nix_info_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *devinfo)
 	devinfo->max_vfs = pci_dev->max_vfs;
 	devinfo->max_mtu = devinfo->max_rx_pktlen - NIX_L2_OVERHEAD;
 	devinfo->min_mtu = devinfo->min_rx_bufsize - NIX_L2_OVERHEAD;
+	if (dev->configured && otx2_ethdev_is_ptp_en(dev)) {
+		devinfo->max_mtu -=  NIX_TIMESYNC_RX_OFFSET;
+		devinfo->min_mtu -=  NIX_TIMESYNC_RX_OFFSET;
+		devinfo->max_rx_pktlen -= NIX_TIMESYNC_RX_OFFSET;
+	}
 
 	devinfo->rx_offload_capa = dev->rx_offload_capa;
 	devinfo->tx_offload_capa = dev->tx_offload_capa;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.630227413 +0800
+++ 0057-net-octeontx2-fix-MTU-when-PTP-is-enabled.patch	2021-11-10 14:17:01.807413276 +0800
@@ -1 +1 @@
-From 07d15d4d84e89a2f7a56bec24225c8ff326a9cf8 Mon Sep 17 00:00:00 2001
+From c7afc9980446a742d86fbf758d635f7c4b96a03b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 07d15d4d84e89a2f7a56bec24225c8ff326a9cf8 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 5a4501208e..552e6bd43d 100644
+index f586e9ef59..99ddcb0170 100644
@@ -34 +36 @@
-@@ -547,6 +548,11 @@ otx2_nix_info_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *devinfo)
+@@ -560,6 +561,11 @@ otx2_nix_info_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *devinfo)

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

* [dpdk-stable] patch 'net/i40e: fix mbuf leak' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (56 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/octeontx2: fix MTU when PTP is enabled' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/i40e: fix device startup resource release' " Xueming Li
                   ` (194 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 30fcdc4f505bc16ecfd36ab72f9980f33967c119 Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Mon, 23 Aug 2021 09:50:34 +0800
Subject: [PATCH] net/i40e: fix mbuf leak
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4b458675d3df13d1a35db959fe97a04a132788b2 ]

A local test found that repeated port start and stop operations during
the continuous SSE vector bufflist receiving process will cause the mbuf
resource to run out. The final positioning is when the port is stopped,
the mbuf of the pkt_first_seg pointer is not released. Resources leak.
The patch scheme is to judge whether the pointer is empty when the port
is stopped, and release the corresponding mbuf if it is not empty.

Fixes: 4861cde46116 ("i40e: new poll mode driver")

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 0e5293fc94..154f649b45 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2488,6 +2488,10 @@ i40e_reset_rx_queue(struct i40e_rx_queue *rxq)
 #endif /* RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC */
 	rxq->rx_tail = 0;
 	rxq->nb_rx_hold = 0;
+
+	if (rxq->pkt_first_seg != NULL)
+		rte_pktmbuf_free(rxq->pkt_first_seg);
+
 	rxq->pkt_first_seg = NULL;
 	rxq->pkt_last_seg = NULL;
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.673186500 +0800
+++ 0058-net-i40e-fix-mbuf-leak.patch	2021-11-10 14:17:01.810746582 +0800
@@ -1 +1 @@
-From 4b458675d3df13d1a35db959fe97a04a132788b2 Mon Sep 17 00:00:00 2001
+From 30fcdc4f505bc16ecfd36ab72f9980f33967c119 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4b458675d3df13d1a35db959fe97a04a132788b2 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 8329cbdd4e..3eb82578b0 100644
+index 0e5293fc94..154f649b45 100644
@@ -26 +28 @@
-@@ -2590,6 +2590,10 @@ i40e_reset_rx_queue(struct i40e_rx_queue *rxq)
+@@ -2488,6 +2488,10 @@ i40e_reset_rx_queue(struct i40e_rx_queue *rxq)

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

* [dpdk-stable] patch 'net/i40e: fix device startup resource release' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (57 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/i40e: fix mbuf leak' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/ice/base: fix PF ID for DCF' " Xueming Li
                   ` (193 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4fc96ab6c9d3d17054758a9c6ceaf3013043c75f Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Sat, 21 Aug 2021 17:44:35 +0800
Subject: [PATCH] net/i40e: fix device startup resource release
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit daf3332e11ed7ad6cc12e0aa69cbb8b602bc5685 ]

In the eth_i40e_dev_init function, the tunnel and ethertype hash table
resource release interface should be rte_hash_free instead of rte_free,
and the previously registered interrupt handling function also needs to
be removed from the interrupt list. The patch is amended to use the
correct interface to release the hash table resource and release the
interrupt handling function at the same time.

Fixes: 425c3325f0b0 ("net/i40e: store tunnel filter")
Fixes: 5c53c82c8174 ("net/i40e: store flow director filter")

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 5e3b80a6b8..a364338564 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1817,12 +1817,14 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
 	return 0;
 
 err_init_fdir_filter_list:
-	rte_free(pf->tunnel.hash_table);
+	rte_hash_free(pf->tunnel.hash_table);
 	rte_free(pf->tunnel.hash_map);
 err_init_tunnel_filter_list:
-	rte_free(pf->ethertype.hash_table);
+	rte_hash_free(pf->ethertype.hash_table);
 	rte_free(pf->ethertype.hash_map);
 err_init_ethtype_filter_list:
+	rte_intr_callback_unregister(intr_handle,
+		i40e_dev_interrupt_handler, dev);
 	rte_free(dev->data->mac_addrs);
 	dev->data->mac_addrs = NULL;
 err_mac_alloc:
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.720591875 +0800
+++ 0059-net-i40e-fix-device-startup-resource-release.patch	2021-11-10 14:17:01.817413194 +0800
@@ -1 +1 @@
-From daf3332e11ed7ad6cc12e0aa69cbb8b602bc5685 Mon Sep 17 00:00:00 2001
+From 4fc96ab6c9d3d17054758a9c6ceaf3013043c75f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit daf3332e11ed7ad6cc12e0aa69cbb8b602bc5685 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 7b230e2ed1..7a2a8281d2 100644
+index 5e3b80a6b8..a364338564 100644
@@ -27 +29 @@
-@@ -1760,12 +1760,14 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
+@@ -1817,12 +1817,14 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)

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

* [dpdk-stable] patch 'net/ice/base: fix PF ID for DCF' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (58 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/i40e: fix device startup resource release' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/iavf: fix mbuf leak' " Xueming Li
                   ` (192 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From af659df64ec34bbf534d7c6bb68ac15acf32b297 Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Mon, 13 Sep 2021 10:40:02 +0800
Subject: [PATCH] net/ice/base: fix PF ID for DCF
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f979702337c69c7b73a78a10cbfb700c74b3b508 ]

In original implementation, if DCF is created on PF1, the PF ID is
still 0, but not 1. Without the right PF ID, the ACL will not work.

This patch makes VF to get its parent's physical function ID.

Fixes: 0b02c9519432 ("net/ice: handle PF initialization by DCF")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index e6ea04183f..95400dd315 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -2936,6 +2936,10 @@ enum ice_status ice_get_initial_sw_cfg(struct ice_hw *hw)
 					ICE_AQC_GET_SW_CONF_RESP_TYPE_S);
 
 			switch (res_type) {
+			case ICE_AQC_GET_SW_CONF_RESP_VSI:
+				if (hw->dcf_enabled && !is_vf)
+					hw->pf_id = pf_vf_num;
+				break;
 			case ICE_AQC_GET_SW_CONF_RESP_PHYS_PORT:
 			case ICE_AQC_GET_SW_CONF_RESP_VIRT_PORT:
 				if (j == num_total_ports) {
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.768425534 +0800
+++ 0060-net-ice-base-fix-PF-ID-for-DCF.patch	2021-11-10 14:17:01.820746500 +0800
@@ -1 +1 @@
-From f979702337c69c7b73a78a10cbfb700c74b3b508 Mon Sep 17 00:00:00 2001
+From af659df64ec34bbf534d7c6bb68ac15acf32b297 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f979702337c69c7b73a78a10cbfb700c74b3b508 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 9179f66c20..93cd79e8ef 100644
+index e6ea04183f..95400dd315 100644
@@ -24 +26 @@
-@@ -3471,6 +3471,10 @@ enum ice_status ice_get_initial_sw_cfg(struct ice_hw *hw)
+@@ -2936,6 +2936,10 @@ enum ice_status ice_get_initial_sw_cfg(struct ice_hw *hw)

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

* [dpdk-stable] patch 'net/iavf: fix mbuf leak' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (59 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/ice/base: fix PF ID for DCF' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/i40e/base: fix resource leakage' " Xueming Li
                   ` (191 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 012f9cfceb42f1f6c7978dbab893844865590aac Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Sat, 11 Sep 2021 09:47:09 +0800
Subject: [PATCH] net/iavf: fix mbuf leak
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a38df1edd6324f922ca46a043e87b2489f7bc17e ]

A local test found that repeated port start and stop operations during
the continuous SSE vector bufflist receiving process will cause the mbuf
resource to run out. The final positioning is when the port is stopped,
the mbuf of the pkt_first_seg pointer is not released. Resources leak.
The patch scheme is to judge whether the pointer is empty when the port
is stopped, and release the corresponding mbuf if it is not empty.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index e1108af7a9..248e3df03b 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -192,6 +192,10 @@ reset_rx_queue(struct iavf_rx_queue *rxq)
 
 	rxq->rx_tail = 0;
 	rxq->nb_rx_hold = 0;
+
+	if (rxq->pkt_first_seg != NULL)
+		rte_pktmbuf_free(rxq->pkt_first_seg);
+
 	rxq->pkt_first_seg = NULL;
 	rxq->pkt_last_seg = NULL;
 	rxq->rxrearm_nb = 0;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.814584567 +0800
+++ 0061-net-iavf-fix-mbuf-leak.patch	2021-11-10 14:17:01.824079806 +0800
@@ -1 +1 @@
-From a38df1edd6324f922ca46a043e87b2489f7bc17e Mon Sep 17 00:00:00 2001
+From 012f9cfceb42f1f6c7978dbab893844865590aac Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a38df1edd6324f922ca46a043e87b2489f7bc17e ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index e33fe4576b..7240e70f9e 100644
+index e1108af7a9..248e3df03b 100644
@@ -26 +28 @@
-@@ -225,6 +225,10 @@ reset_rx_queue(struct iavf_rx_queue *rxq)
+@@ -192,6 +192,10 @@ reset_rx_queue(struct iavf_rx_queue *rxq)

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

* [dpdk-stable] patch 'net/i40e/base: fix resource leakage' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (60 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/iavf: fix mbuf leak' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/iavf: fix Rx queue buffer size alignment' " Xueming Li
                   ` (190 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 64734ba6e234485e337ac2a3684fdf937ec64d28 Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Sat, 21 Aug 2021 14:30:08 +0800
Subject: [PATCH] net/i40e/base: fix resource leakage
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 071eb26fb53914aafda4aa33356f65d2c7a2e4e0 ]

In the i40e_init_arq function, when the i40e_config_arq_regs function
returns from processing failure, the previously applied arq_bufs resource
is not released, which leads to leakage.
The patch is processed in the same way as the i40e_init_asq function,
maintaining a unified coding style.

Fixes: 49ea51605be4 ("net/i40e/base: gracefully clean the resources")

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_adminq.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index 0da45f03e4..235667d57a 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -468,7 +468,7 @@ enum i40e_status_code i40e_init_arq(struct i40e_hw *hw)
 	/* initialize base registers */
 	ret_code = i40e_config_arq_regs(hw);
 	if (ret_code != I40E_SUCCESS)
-		goto init_adminq_free_rings;
+		goto init_config_regs;
 
 	/* success! */
 	hw->aq.arq.count = hw->aq.num_arq_entries;
@@ -476,6 +476,10 @@ enum i40e_status_code i40e_init_arq(struct i40e_hw *hw)
 
 init_adminq_free_rings:
 	i40e_free_adminq_arq(hw);
+	return ret_code;
+
+init_config_regs:
+	i40e_free_arq_bufs(hw);
 
 init_adminq_exit:
 	return ret_code;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.855993663 +0800
+++ 0062-net-i40e-base-fix-resource-leakage.patch	2021-11-10 14:17:01.824079806 +0800
@@ -1 +1 @@
-From 071eb26fb53914aafda4aa33356f65d2c7a2e4e0 Mon Sep 17 00:00:00 2001
+From 64734ba6e234485e337ac2a3684fdf937ec64d28 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 071eb26fb53914aafda4aa33356f65d2c7a2e4e0 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/iavf: fix Rx queue buffer size alignment' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (61 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/i40e/base: fix resource leakage' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'doc: fix numbers power of 2 in LPM6 guide' " Xueming Li
                   ` (189 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 88719f1273a4bc3aada347a97dc87e8e1637f6ee Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Sat, 11 Sep 2021 10:07:56 +0800
Subject: [PATCH] net/iavf: fix Rx queue buffer size alignment
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c9c45beb1b97eed3fbf05095e376823fc58c9aa7 ]

The RTE_ALIGN macro is aligned upwards. If the buf_size variable is not
aligned with 1 << I40E_RXQ_CTX_DBUFF_SHIFT, the rx_buf_len is larger than
the actual mbuf memory after the operation. When receiving the packet, if
the packet is larger than the configured buf_size, it will cause a memory
stepping event.

The patch uses the RTE_ALIGN_FLOOR down alignment macro to correct the
problem.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 248e3df03b..b0e86f022b 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -560,7 +560,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	rxq->vsi = vsi;
 
 	len = rte_pktmbuf_data_room_size(rxq->mp) - RTE_PKTMBUF_HEADROOM;
-	rxq->rx_buf_len = RTE_ALIGN(len, (1 << IAVF_RXQ_CTX_DBUFF_SHIFT));
+	rxq->rx_buf_len = RTE_ALIGN_FLOOR(len, (1 << IAVF_RXQ_CTX_DBUFF_SHIFT));
 
 	/* Allocate the software ring. */
 	len = nb_desc + IAVF_RX_MAX_BURST;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.896631253 +0800
+++ 0063-net-iavf-fix-Rx-queue-buffer-size-alignment.patch	2021-11-10 14:17:01.824079806 +0800
@@ -1 +1 @@
-From c9c45beb1b97eed3fbf05095e376823fc58c9aa7 Mon Sep 17 00:00:00 2001
+From 88719f1273a4bc3aada347a97dc87e8e1637f6ee Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c9c45beb1b97eed3fbf05095e376823fc58c9aa7 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 7240e70f9e..6de8ad3fe3 100644
+index 248e3df03b..b0e86f022b 100644
@@ -28,2 +30,2 @@
-@@ -619,7 +619,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
- 		rxq->crc_len = 0;
+@@ -560,7 +560,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
+ 	rxq->vsi = vsi;

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

* [dpdk-stable] patch 'doc: fix numbers power of 2 in LPM6 guide' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (62 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/iavf: fix Rx queue buffer size alignment' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'bus/pci: fix unknown NUMA node value on Windows' " Xueming Li
                   ` (188 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Ben Pfaff; +Cc: Luca Boccassi, David Marchand, Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d593c0569e90e31b105cebf7444236279baf6ac5 Mon Sep 17 00:00:00 2001
From: Ben Pfaff <blp@ovn.org>
Date: Mon, 13 Sep 2021 11:46:43 -0700
Subject: [PATCH] doc: fix numbers power of 2 in LPM6 guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e0ad8d2bdafcd74eb960bf96507fed11cc97d58c ]

Fixes: fc1f2750a3ec ("doc: programmers guide")

Signed-off-by: Ben Pfaff <blp@ovn.org>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 doc/guides/prog_guide/lpm6_lib.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guides/prog_guide/lpm6_lib.rst b/doc/guides/prog_guide/lpm6_lib.rst
index d1aea91ca9..8425d14805 100644
--- a/doc/guides/prog_guide/lpm6_lib.rst
+++ b/doc/guides/prog_guide/lpm6_lib.rst
@@ -64,9 +64,9 @@ that are most commonly used in IPv6.
 
 The main data structure is built using the following elements:
 
-*   A table with 224 entries
+*   A table with 2^24 entries
 
-*   A number of tables, configurable by the user through the API, with 28 entries
+*   A number of tables, configurable by the user through the API, with 2^8 entries
 
 The first table, called tbl24, is indexed using the first 24 bits of the IP address be looked up,
 while the rest of the tables, called tbl8s,
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.938858967 +0800
+++ 0064-doc-fix-numbers-power-of-2-in-LPM6-guide.patch	2021-11-10 14:17:01.824079806 +0800
@@ -1 +1 @@
-From e0ad8d2bdafcd74eb960bf96507fed11cc97d58c Mon Sep 17 00:00:00 2001
+From d593c0569e90e31b105cebf7444236279baf6ac5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e0ad8d2bdafcd74eb960bf96507fed11cc97d58c ]
@@ -7 +9,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'bus/pci: fix unknown NUMA node value on Windows' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (63 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'doc: fix numbers power of 2 in LPM6 guide' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'sched: get 64-bit greatest common divisor' " Xueming Li
                   ` (187 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Pallavi Kadam; +Cc: Luca Boccassi, Vipin Varghese, Tal Shnaiderman, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2a5a4216585632e05be9ddfcd55bc7b9d98e7d39 Mon Sep 17 00:00:00 2001
From: Pallavi Kadam <pallavi.kadam@intel.com>
Date: Wed, 22 Sep 2021 14:19:06 -0700
Subject: [PATCH] bus/pci: fix unknown NUMA node value on Windows
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bf7cf1f947bd18aa1b9673ea4188a5802741d05a ]

On older CPUs, currently numa_node returns value only for socket 0.
Instead, application should be able to make correct decision and
also to keep consistent with the Linux code,
replace the return value to -1.

Fixes: ac7c98d04f2c ("bus/pci: ignore missing NUMA node on Windows")

Reported-by: Vipin Varghese <vipin.varghese@intel.com>
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
---
 drivers/bus/pci/windows/pci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
index ad9d65efd8..12a46ae370 100644
--- a/drivers/bus/pci/windows/pci.c
+++ b/drivers/bus/pci/windows/pci.c
@@ -5,6 +5,7 @@
 #include <rte_errno.h>
 #include <rte_log.h>
 #include <rte_eal.h>
+#include <rte_memory.h>
 
 #include "private.h"
 #include "pci_netuio.h"
@@ -240,7 +241,7 @@ get_device_resource_info(HDEVINFO dev_info,
 		DWORD error = GetLastError();
 		if (error == ERROR_NOT_FOUND) {
 			/* On older CPUs, NUMA is not bound to PCIe locality. */
-			dev->device.numa_node = 0;
+			dev->device.numa_node = SOCKET_ID_ANY;
 			return ERROR_SUCCESS;
 		}
 		RTE_LOG_WIN32_ERR("SetupDiGetDevicePropertyW"
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.979479110 +0800
+++ 0065-bus-pci-fix-unknown-NUMA-node-value-on-Windows.patch	2021-11-10 14:17:01.824079806 +0800
@@ -1 +1 @@
-From bf7cf1f947bd18aa1b9673ea4188a5802741d05a Mon Sep 17 00:00:00 2001
+From 2a5a4216585632e05be9ddfcd55bc7b9d98e7d39 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bf7cf1f947bd18aa1b9673ea4188a5802741d05a ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index d39a7748b8..343ef6f33b 100644
+index ad9d65efd8..12a46ae370 100644
@@ -33 +35 @@
-@@ -243,7 +244,7 @@ get_device_resource_info(HDEVINFO dev_info,
+@@ -240,7 +241,7 @@ get_device_resource_info(HDEVINFO dev_info,

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

* [dpdk-stable] patch 'sched: get 64-bit greatest common divisor' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (64 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'bus/pci: fix unknown NUMA node value on Windows' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'vdpa/mlx5: fix large VM memory region registration' " Xueming Li
                   ` (186 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Xueming Li; +Cc: Luca Boccassi, Kevin Traynor, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bb7f3bc24ba6023e9bd5782ac68bc433c3e7a005 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Thu, 23 Sep 2021 16:11:21 +0800
Subject: [PATCH] sched: get 64-bit greatest common divisor
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit eb5636e879a568a323cbed4c356162011e7312be ]

This patch adds new function that compute the greatest common
divisor of 64 bits, also changes the original 32 bits function
to call this new 64-bit version.

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
---
 lib/librte_sched/rte_sched_common.h | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/lib/librte_sched/rte_sched_common.h b/lib/librte_sched/rte_sched_common.h
index 96706df7bd..e4cbbd9077 100644
--- a/lib/librte_sched/rte_sched_common.h
+++ b/lib/librte_sched/rte_sched_common.h
@@ -51,10 +51,10 @@ rte_min_pos_4_u16(uint16_t *x)
  *    gcd(a, b) = gcd(b, a mod b)
  *
  */
-static inline uint32_t
-rte_get_gcd(uint32_t a, uint32_t b)
+static inline uint64_t
+rte_get_gcd64(uint64_t a, uint64_t b)
 {
-	uint32_t c;
+	uint64_t c;
 
 	if (a == 0)
 		return b;
@@ -76,6 +76,15 @@ rte_get_gcd(uint32_t a, uint32_t b)
 	return a;
 }
 
+/*
+ * 32-bit version of Greatest Common Divisor (GCD).
+ */
+static inline uint32_t
+rte_get_gcd(uint32_t a, uint32_t b)
+{
+	return rte_get_gcd64(a, b);
+}
+
 /*
  * Compute the Lowest Common Denominator (LCD) of two numbers.
  * This implementation computes GCD first:
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.019503122 +0800
+++ 0066-sched-get-64-bit-greatest-common-divisor.patch	2021-11-10 14:17:01.824079806 +0800
@@ -1 +1 @@
-From eb5636e879a568a323cbed4c356162011e7312be Mon Sep 17 00:00:00 2001
+From bb7f3bc24ba6023e9bd5782ac68bc433c3e7a005 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit eb5636e879a568a323cbed4c356162011e7312be ]
@@ -10,2 +12,0 @@
-Cc: stable@dpdk.org
-
@@ -15 +16 @@
- lib/sched/rte_sched_common.h | 15 ++++++++++++---
+ lib/librte_sched/rte_sched_common.h | 15 ++++++++++++---
@@ -18 +19 @@
-diff --git a/lib/sched/rte_sched_common.h b/lib/sched/rte_sched_common.h
+diff --git a/lib/librte_sched/rte_sched_common.h b/lib/librte_sched/rte_sched_common.h
@@ -20,2 +21,2 @@
---- a/lib/sched/rte_sched_common.h
-+++ b/lib/sched/rte_sched_common.h
+--- a/lib/librte_sched/rte_sched_common.h
++++ b/lib/librte_sched/rte_sched_common.h

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

* [dpdk-stable] patch 'vdpa/mlx5: fix large VM memory region registration' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (65 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'sched: get 64-bit greatest common divisor' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'stack: fix reload head when pop fails' " Xueming Li
                   ` (185 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Xueming Li; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6f7c9fde7173f84c2a245acac1b71bf941b217f8 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Thu, 23 Sep 2021 16:11:22 +0800
Subject: [PATCH] vdpa/mlx5: fix large VM memory region registration
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6e914454d5083046497bbd764ff5ae1547e8c6b1 ]

When VM size is larger than 4G (u32) and memory region is larger than 4G,
the 32-bit GCD function overflowed and returned wrong value
that resulted in memory registration failure.

This patch calls 64-bit GCD function to avoid overflow.

Fixes: cc07a42da250 ("vdpa/mlx5: prepare memory regions")

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Matan Azrad <matan@nvidia.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa_mem.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_mem.c b/drivers/vdpa/mlx5/mlx5_vdpa_mem.c
index f8861d5d26..c5ab652a6b 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_mem.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_mem.c
@@ -103,15 +103,15 @@ mlx5_vdpa_vhost_mem_regions_prepare(int vid, uint8_t *mode, uint64_t *mem_size,
 			size = mem->regions[i].guest_phys_addr -
 				(mem->regions[i - 1].guest_phys_addr +
 				 mem->regions[i - 1].size);
-			*gcd = rte_get_gcd(*gcd, size);
+			*gcd = rte_get_gcd64(*gcd, size);
 			klm_entries_num += KLM_NUM_MAX_ALIGN(size);
 		}
 		size = mem->regions[i].size;
-		*gcd = rte_get_gcd(*gcd, size);
+		*gcd = rte_get_gcd64(*gcd, size);
 		klm_entries_num += KLM_NUM_MAX_ALIGN(size);
 	}
 	if (*gcd > MLX5_MAX_KLM_BYTE_COUNT)
-		*gcd = rte_get_gcd(*gcd, MLX5_MAX_KLM_BYTE_COUNT);
+		*gcd = rte_get_gcd64(*gcd, MLX5_MAX_KLM_BYTE_COUNT);
 	if (!RTE_IS_POWER_OF_2(*gcd)) {
 		uint64_t candidate_gcd = rte_align64prevpow2(*gcd);
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.060201766 +0800
+++ 0067-vdpa-mlx5-fix-large-VM-memory-region-registration.patch	2021-11-10 14:17:01.824079806 +0800
@@ -1 +1 @@
-From 6e914454d5083046497bbd764ff5ae1547e8c6b1 Mon Sep 17 00:00:00 2001
+From 6f7c9fde7173f84c2a245acac1b71bf941b217f8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6e914454d5083046497bbd764ff5ae1547e8c6b1 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 59ce4e891c..a06681b494 100644
+index f8861d5d26..c5ab652a6b 100644

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

* [dpdk-stable] patch 'stack: fix reload head when pop fails' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (66 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'vdpa/mlx5: fix large VM memory region registration' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix parsing of flow queue' " Xueming Li
                   ` (184 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Julien Meunier; +Cc: Luca Boccassi, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e78d085e36db1df8a90bb3e87fdeca69bd4b85a4 Mon Sep 17 00:00:00 2001
From: Julien Meunier <julien.meunier@nokia.com>
Date: Tue, 21 Sep 2021 18:17:24 +0200
Subject: [PATCH] stack: fix reload head when pop fails
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6ded44bce4d3e5f4fce66f00ce0638ebc866911f ]

The previous commit 18effad9cfa7 ("stack: reload head when pop fails")
only changed C11 implementation, not generic implementation.

List head must be loaded right before continue (when failed to find the
new head). Without this, one thread might keep trying and failing to pop
items without ever loading the new correct head.

Fixes: 3340202f5954 ("stack: add lock-free implementation")

Signed-off-by: Julien Meunier <julien.meunier@nokia.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_stack/rte_stack_lf_generic.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/librte_stack/rte_stack_lf_generic.h b/lib/librte_stack/rte_stack_lf_generic.h
index 4850a05ee7..7fa29cedb2 100644
--- a/lib/librte_stack/rte_stack_lf_generic.h
+++ b/lib/librte_stack/rte_stack_lf_generic.h
@@ -128,8 +128,10 @@ __rte_stack_lf_pop_elems(struct rte_stack_lf_list *list,
 		/* If NULL was encountered, the list was modified while
 		 * traversing it. Retry.
 		 */
-		if (i != num)
+		if (i != num) {
+			old_head = list->head;
 			continue;
+		}
 
 		new_head.top = tmp;
 		new_head.cnt = old_head.cnt + 1;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.100432366 +0800
+++ 0068-stack-fix-reload-head-when-pop-fails.patch	2021-11-10 14:17:01.824079806 +0800
@@ -1 +1 @@
-From 6ded44bce4d3e5f4fce66f00ce0638ebc866911f Mon Sep 17 00:00:00 2001
+From e78d085e36db1df8a90bb3e87fdeca69bd4b85a4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6ded44bce4d3e5f4fce66f00ce0638ebc866911f ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
- lib/stack/rte_stack_lf_generic.h | 4 +++-
+ lib/librte_stack/rte_stack_lf_generic.h | 4 +++-
@@ -22 +24 @@
-diff --git a/lib/stack/rte_stack_lf_generic.h b/lib/stack/rte_stack_lf_generic.h
+diff --git a/lib/librte_stack/rte_stack_lf_generic.h b/lib/librte_stack/rte_stack_lf_generic.h
@@ -24,2 +26,2 @@
---- a/lib/stack/rte_stack_lf_generic.h
-+++ b/lib/stack/rte_stack_lf_generic.h
+--- a/lib/librte_stack/rte_stack_lf_generic.h
++++ b/lib/librte_stack/rte_stack_lf_generic.h

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

* [dpdk-stable] patch 'examples/ipsec-secgw: fix parsing of flow queue' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (67 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'stack: fix reload head when pop fails' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'test/compress: fix buffer overflow' " Xueming Li
                   ` (183 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Anoob Joseph; +Cc: Luca Boccassi, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8f07dfbc181609e27ea5f4eab74660b345277890 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Thu, 16 Sep 2021 11:37:51 +0530
Subject: [PATCH] examples/ipsec-secgw: fix parsing of flow queue
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8131b7eb5041d481c74318bff3cafa8905ac3558 ]

Documentation specifies that flow port & queue is provided as,

<...> port 0 queue 0

But code is expecting the same as,

<...> port 0 0

Fix the above to match documentation.

Fixes: 8e693616fcb2 ("examples/ipsec-secgw: enable flow based distribution")

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/ipsec-secgw/flow.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/examples/ipsec-secgw/flow.c b/examples/ipsec-secgw/flow.c
index 69f8405d15..1a1ec7861c 100644
--- a/examples/ipsec-secgw/flow.c
+++ b/examples/ipsec-secgw/flow.c
@@ -188,7 +188,9 @@ parse_flow_tokens(char **tokens, uint32_t n_tokens,
 				return;
 
 			rule->port = atoi(tokens[ti]);
+		}
 
+		if (strcmp(tokens[ti], "queue") == 0) {
 			INCREMENT_TOKEN_INDEX(ti, n_tokens, status);
 			if (status->status < 0)
 				return;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.140997234 +0800
+++ 0069-examples-ipsec-secgw-fix-parsing-of-flow-queue.patch	2021-11-10 14:17:01.827413112 +0800
@@ -1 +1 @@
-From 8131b7eb5041d481c74318bff3cafa8905ac3558 Mon Sep 17 00:00:00 2001
+From 8f07dfbc181609e27ea5f4eab74660b345277890 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8131b7eb5041d481c74318bff3cafa8905ac3558 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'test/compress: fix buffer overflow' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (68 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix parsing of flow queue' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/bonding: fix memory leak on closing device' " Xueming Li
                   ` (182 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Rebecca Troy; +Cc: Luca Boccassi, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 25533b38a694b9fee04712a766b56014f5c84161 Mon Sep 17 00:00:00 2001
From: Rebecca Troy <rebecca.troy@intel.com>
Date: Fri, 17 Sep 2021 15:12:07 +0000
Subject: [PATCH] test/compress: fix buffer overflow
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 96fe84f42a361382b89f462873edae7c1236c303 ]

Fixes stack buffer overflow bug in compressdev autotest, which
was caused by the use of buf_idx in the debug logs. Originally, buf_idx
was treated as an array instead of the reference of an integer.
This was fixed by replacing the use of buf_idx[priv_data->orig_idx] with
the variable i.

Fixes: 466a2c4bb5f4 ("test/compress: improve debug logs")
Fixes: 6bbc5a923625 ("test/compress: refactor unit tests")

Signed-off-by: Rebecca Troy <rebecca.troy@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 app/test/test_compressdev.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/app/test/test_compressdev.c b/app/test/test_compressdev.c
index 0571c17ecb..a1b9f06250 100644
--- a/app/test/test_compressdev.c
+++ b/app/test/test_compressdev.c
@@ -1411,7 +1411,6 @@ test_deflate_comp_finalize(const struct interim_data_params *int_data,
 	/* from int_data: */
 	unsigned int num_xforms = int_data->num_xforms;
 	struct rte_comp_xform **compress_xforms = int_data->compress_xforms;
-	uint16_t *buf_idx = int_data->buf_idx;
 	unsigned int num_bufs = int_data->num_bufs;
 
 	/* from test_priv_data: */
@@ -1442,7 +1441,7 @@ test_deflate_comp_finalize(const struct interim_data_params *int_data,
 
 		RTE_LOG(DEBUG, USER1, "Buffer %u compressed by %s from %u to"
 			" %u bytes (level = %d, huffman = %s)\n",
-			buf_idx[priv_data->orig_idx], engine,
+			i, engine,
 			ops_processed[i]->consumed, ops_processed[i]->produced,
 			compress_xform->level,
 			huffman_type_strings[huffman_type]);
@@ -1734,7 +1733,6 @@ test_deflate_decomp_finalize(const struct interim_data_params *int_data,
 	static unsigned int step;
 
 	/* from int_data: */
-	uint16_t *buf_idx = int_data->buf_idx;
 	unsigned int num_bufs = int_data->num_bufs;
 	const char * const *test_bufs = int_data->test_bufs;
 	struct rte_comp_xform **compress_xforms = int_data->compress_xforms;
@@ -1766,7 +1764,7 @@ test_deflate_decomp_finalize(const struct interim_data_params *int_data,
 			strlcpy(engine, "pmd", sizeof(engine));
 		RTE_LOG(DEBUG, USER1,
 			"Buffer %u decompressed by %s from %u to %u bytes\n",
-			buf_idx[priv_data->orig_idx], engine,
+			i, engine,
 			ops_processed[i]->consumed, ops_processed[i]->produced);
 		ops[i] = NULL;
 	}
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.181382630 +0800
+++ 0070-test-compress-fix-buffer-overflow.patch	2021-11-10 14:17:01.827413112 +0800
@@ -1 +1 @@
-From 96fe84f42a361382b89f462873edae7c1236c303 Mon Sep 17 00:00:00 2001
+From 25533b38a694b9fee04712a766b56014f5c84161 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 96fe84f42a361382b89f462873edae7c1236c303 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/bonding: fix memory leak on closing device' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (69 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'test/compress: fix buffer overflow' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/ice/base: calculate logical PF ID' " Xueming Li
                   ` (181 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8532dae4d660e197c618399a1350d658cbc8c38b Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Wed, 15 Sep 2021 13:08:02 +0800
Subject: [PATCH] net/bonding: fix memory leak on closing device
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ccf0f002d2ec5455102c0259f44535944aa4b154 ]

If the bond device was created by vdev mode, the kvlist was not free
after the bond device was closed.

This patch fixes it.

Fixes: 144dc4739975 ("net/bonding: fix leak on remove")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index a1d3703e96..baa01b17e5 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2152,6 +2152,9 @@ bond_ethdev_close(struct rte_eth_dev *dev)
 	 */
 	rte_mempool_free(internals->mode6.mempool);
 
+	if (internals->kvlist != NULL)
+		rte_kvargs_free(internals->kvlist);
+
 	return 0;
 }
 
@@ -3467,8 +3470,6 @@ bond_remove(struct rte_vdev_device *dev)
 		ret = bond_ethdev_stop(eth_dev);
 		bond_ethdev_close(eth_dev);
 	}
-	if (internals->kvlist != NULL)
-		rte_kvargs_free(internals->kvlist);
 	rte_eth_dev_release_port(eth_dev);
 
 	return ret;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.226143855 +0800
+++ 0071-net-bonding-fix-memory-leak-on-closing-device.patch	2021-11-10 14:17:01.830746418 +0800
@@ -1 +1 @@
-From ccf0f002d2ec5455102c0259f44535944aa4b154 Mon Sep 17 00:00:00 2001
+From 8532dae4d660e197c618399a1350d658cbc8c38b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ccf0f002d2ec5455102c0259f44535944aa4b154 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 8ed9e036f4..54987d96b3 100644
+index a1d3703e96..baa01b17e5 100644
@@ -24 +26 @@
-@@ -2159,6 +2159,9 @@ bond_ethdev_close(struct rte_eth_dev *dev)
+@@ -2152,6 +2152,9 @@ bond_ethdev_close(struct rte_eth_dev *dev)
@@ -34 +36 @@
-@@ -3471,8 +3474,6 @@ bond_remove(struct rte_vdev_device *dev)
+@@ -3467,8 +3470,6 @@ bond_remove(struct rte_vdev_device *dev)

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

* [dpdk-stable] patch 'net/ice/base: calculate logical PF ID' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (70 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/bonding: fix memory leak on closing device' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/iavf: fix mbuf leak' " Xueming Li
                   ` (180 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Luca Boccassi, Dan Nowlin, Junfeng Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 60974c7c2c2e6b18c0dccd7a8e235718ac55e5e2 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Thu, 16 Sep 2021 17:52:53 +0800
Subject: [PATCH] net/ice/base: calculate logical PF ID
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3affa0ef2d4b229d69eb3dc50cf0540b33fbebe2 ]

In some devices, the function numbers used are non-contiguous. For
example, some two port devices will report as functions 0 and 2.

When distributing RSS and FDIR masks, which are global resources across
the active devices, it is required to have a contiguous PF id, which can
be described as a logical PF id. In the case above, function 0 would
have a logical PF id of 0, and function 2 would have a logical PF id of
1.

Using logical PF id can properly describe which slice of resources can
be used by a particular PF.

Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
---
 drivers/net/ice/base/ice_common.c    | 19 +++++++++++++++++++
 drivers/net/ice/base/ice_flex_pipe.c |  2 +-
 drivers/net/ice/base/ice_type.h      |  1 +
 3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index be33ee252d..2b53f78512 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -2017,6 +2017,23 @@ ice_parse_func_caps(struct ice_hw *hw, struct ice_hw_func_caps *func_p,
 	ice_recalc_port_limited_caps(hw, &func_p->common_cap);
 }
 
+/**
+ * ice_func_id_to_logical_id - map from function id to logical pf id
+ * @active_function_bitmap: active function bitmap
+ * @pf_id: function number of device
+ */
+static int ice_func_id_to_logical_id(u32 active_function_bitmap, u8 pf_id)
+{
+	u8 logical_id = 0;
+	u8 i;
+
+	for (i = 0; i < pf_id; i++)
+		if (active_function_bitmap & BIT(i))
+			logical_id++;
+
+	return logical_id;
+}
+
 /**
  * ice_parse_valid_functions_cap - Parse ICE_AQC_CAPS_VALID_FUNCTIONS caps
  * @hw: pointer to the HW struct
@@ -2034,6 +2051,8 @@ ice_parse_valid_functions_cap(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p,
 	dev_p->num_funcs = ice_hweight32(number);
 	ice_debug(hw, ICE_DBG_INIT, "dev caps: num_funcs = %d\n",
 		  dev_p->num_funcs);
+
+	hw->logical_pf_id = ice_func_id_to_logical_id(number, hw->pf_id);
 }
 
 /**
diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index d74fecbf5b..42eda0b4b4 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -3125,7 +3125,7 @@ static void ice_init_prof_masks(struct ice_hw *hw, enum ice_block blk)
 	per_pf = ICE_PROF_MASK_COUNT / hw->dev_caps.num_funcs;
 
 	hw->blk[blk].masks.count = per_pf;
-	hw->blk[blk].masks.first = hw->pf_id * per_pf;
+	hw->blk[blk].masks.first = hw->logical_pf_id * per_pf;
 
 	ice_memset(hw->blk[blk].masks.masks, 0,
 		   sizeof(hw->blk[blk].masks.masks), ICE_NONDMA_MEM);
diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h
index 6b8d44f0b4..1aae9fe721 100644
--- a/drivers/net/ice/base/ice_type.h
+++ b/drivers/net/ice/base/ice_type.h
@@ -864,6 +864,7 @@ struct ice_hw {
 	u8 revision_id;
 
 	u8 pf_id;		/* device profile info */
+	u8 logical_pf_id;
 
 	u16 max_burst_size;	/* driver sets this value */
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.270966334 +0800
+++ 0072-net-ice-base-calculate-logical-PF-ID.patch	2021-11-10 14:17:01.834079724 +0800
@@ -1 +1 @@
-From 3affa0ef2d4b229d69eb3dc50cf0540b33fbebe2 Mon Sep 17 00:00:00 2001
+From 60974c7c2c2e6b18c0dccd7a8e235718ac55e5e2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3affa0ef2d4b229d69eb3dc50cf0540b33fbebe2 ]
@@ -18,2 +20,0 @@
-Cc: stable@dpdk.org
-
@@ -30 +31 @@
-index 641859f752..6004c95625 100644
+index be33ee252d..2b53f78512 100644
@@ -33 +34 @@
-@@ -2535,6 +2535,23 @@ ice_parse_func_caps(struct ice_hw *hw, struct ice_hw_func_caps *func_p,
+@@ -2017,6 +2017,23 @@ ice_parse_func_caps(struct ice_hw *hw, struct ice_hw_func_caps *func_p,
@@ -57 +58 @@
-@@ -2552,6 +2569,8 @@ ice_parse_valid_functions_cap(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p,
+@@ -2034,6 +2051,8 @@ ice_parse_valid_functions_cap(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p,
@@ -67 +68 @@
-index fd98b3837d..8a6fc8a9a5 100644
+index d74fecbf5b..42eda0b4b4 100644
@@ -70 +71 @@
-@@ -3432,7 +3432,7 @@ static void ice_init_prof_masks(struct ice_hw *hw, enum ice_block blk)
+@@ -3125,7 +3125,7 @@ static void ice_init_prof_masks(struct ice_hw *hw, enum ice_block blk)
@@ -80 +81 @@
-index 56ee628f10..b1e03b10ff 100644
+index 6b8d44f0b4..1aae9fe721 100644
@@ -83 +84 @@
-@@ -1132,6 +1132,7 @@ struct ice_hw {
+@@ -864,6 +864,7 @@ struct ice_hw {

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

* [dpdk-stable] patch 'net/iavf: fix mbuf leak' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (71 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/ice/base: calculate logical PF ID' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/octeontx: fix access to indirect buffers' " Xueming Li
                   ` (179 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 474bbafd6f2d216f7d7a2a09e2e98200597f20ad Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Thu, 16 Sep 2021 22:04:00 +0800
Subject: [PATCH] net/iavf: fix mbuf leak
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1028e5bc36b4dd4ae51580eb3e45410b6c82e153 ]

In the iavf_dev_rx_queue_start function, if the iavf_switch_queue
or iavf_switch_queue_lv function fails, the previously applied mbuf
is not released, resulting in leakage. The patch fixes the problem.

Fixes: 9cf9c02bf6ee ("net/iavf: add enable/disable queues for large VF")

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index b0e86f022b..b475aa0cc5 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -245,11 +245,15 @@ alloc_rxq_mbufs(struct iavf_rx_queue *rxq)
 	volatile union iavf_rx_desc *rxd;
 	struct rte_mbuf *mbuf = NULL;
 	uint64_t dma_addr;
-	uint16_t i;
+	uint16_t i, j;
 
 	for (i = 0; i < rxq->nb_rx_desc; i++) {
 		mbuf = rte_mbuf_raw_alloc(rxq->mp);
 		if (unlikely(!mbuf)) {
+			for (j = 0; j < i; j++) {
+				rte_pktmbuf_free_seg(rxq->sw_ring[j]);
+				rxq->sw_ring[j] = NULL;
+			}
 			PMD_DRV_LOG(ERR, "Failed to allocate mbuf for RX");
 			return -ENOMEM;
 		}
@@ -757,12 +761,14 @@ iavf_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	else
 		err = iavf_switch_queue_lv(adapter, rx_queue_id, true, true);
 
-	if (err)
+	if (err) {
+		release_rxq_mbufs(rxq);
 		PMD_DRV_LOG(ERR, "Failed to switch RX queue %u on",
 			    rx_queue_id);
-	else
+	} else {
 		dev->data->rx_queue_state[rx_queue_id] =
 			RTE_ETH_QUEUE_STATE_STARTED;
+	}
 
 	return err;
 }
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.321815673 +0800
+++ 0073-net-iavf-fix-mbuf-leak.patch	2021-11-10 14:17:01.837413030 +0800
@@ -1 +1 @@
-From 1028e5bc36b4dd4ae51580eb3e45410b6c82e153 Mon Sep 17 00:00:00 2001
+From 474bbafd6f2d216f7d7a2a09e2e98200597f20ad Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1028e5bc36b4dd4ae51580eb3e45410b6c82e153 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 6de8ad3fe3..87afc0b4cb 100644
+index b0e86f022b..b475aa0cc5 100644
@@ -23 +25 @@
-@@ -278,11 +278,15 @@ alloc_rxq_mbufs(struct iavf_rx_queue *rxq)
+@@ -245,11 +245,15 @@ alloc_rxq_mbufs(struct iavf_rx_queue *rxq)
@@ -40 +42 @@
-@@ -852,12 +856,14 @@ iavf_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -757,12 +761,14 @@ iavf_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)

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

* [dpdk-stable] patch 'net/octeontx: fix access to indirect buffers' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (72 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/iavf: fix mbuf leak' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/mlx5: fix memory leak on context allocation failure' " Xueming Li
                   ` (178 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Harman Kalra; +Cc: Luca Boccassi, David George, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4649ead943c2a16ced41cde27e9354eae57ded79 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Mon, 20 Sep 2021 20:19:25 +0530
Subject: [PATCH] net/octeontx: fix access to indirect buffers
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9eb5cb3b11cc97e8e0c61ee216bd586b4793335f ]

Issue has been observed where fields of indirect buffers are
accessed after being set free by the diver. Also fixing freeing
of direct buffers to correct aura.

Fixes: 5cbe184802aa ("net/octeontx: support fast mbuf free")

Signed-off-by: David George <david.george@sophos.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/net/octeontx/octeontx_rxtx.h | 69 ++++++++++++++++++----------
 1 file changed, 46 insertions(+), 23 deletions(-)

diff --git a/drivers/net/octeontx/octeontx_rxtx.h b/drivers/net/octeontx/octeontx_rxtx.h
index 7c24d8b4fd..dde0d6277b 100644
--- a/drivers/net/octeontx/octeontx_rxtx.h
+++ b/drivers/net/octeontx/octeontx_rxtx.h
@@ -161,7 +161,7 @@ ptype_table[PTYPE_SIZE][PTYPE_SIZE][PTYPE_SIZE] = {
 
 
 static __rte_always_inline uint64_t
-octeontx_pktmbuf_detach(struct rte_mbuf *m)
+octeontx_pktmbuf_detach(struct rte_mbuf *m, struct rte_mbuf **m_tofree)
 {
 	struct rte_mempool *mp = m->pool;
 	uint32_t mbuf_size, buf_len;
@@ -171,6 +171,8 @@ octeontx_pktmbuf_detach(struct rte_mbuf *m)
 
 	/* Update refcount of direct mbuf */
 	md = rte_mbuf_from_indirect(m);
+	/* The real data will be in the direct buffer, inform callers this */
+	*m_tofree = md;
 	refcount = rte_mbuf_refcnt_update(md, -1);
 
 	priv_size = rte_pktmbuf_priv_size(mp);
@@ -203,18 +205,18 @@ octeontx_pktmbuf_detach(struct rte_mbuf *m)
 }
 
 static __rte_always_inline uint64_t
-octeontx_prefree_seg(struct rte_mbuf *m)
+octeontx_prefree_seg(struct rte_mbuf *m, struct rte_mbuf **m_tofree)
 {
 	if (likely(rte_mbuf_refcnt_read(m) == 1)) {
 		if (!RTE_MBUF_DIRECT(m))
-			return octeontx_pktmbuf_detach(m);
+			return octeontx_pktmbuf_detach(m, m_tofree);
 
 		m->next = NULL;
 		m->nb_segs = 1;
 		return 0;
 	} else if (rte_mbuf_refcnt_update(m, -1) == 0) {
 		if (!RTE_MBUF_DIRECT(m))
-			return octeontx_pktmbuf_detach(m);
+			return octeontx_pktmbuf_detach(m, m_tofree);
 
 		rte_mbuf_refcnt_set(m, 1);
 		m->next = NULL;
@@ -315,6 +317,14 @@ __octeontx_xmit_prepare(struct rte_mbuf *tx_pkt, uint64_t *cmd_buf,
 			const uint16_t flag)
 {
 	uint16_t gaura_id, nb_desc = 0;
+	struct rte_mbuf *m_tofree;
+	rte_iova_t iova;
+	uint16_t data_len;
+
+	m_tofree = tx_pkt;
+
+	data_len = tx_pkt->data_len;
+	iova = rte_mbuf_data_iova(tx_pkt);
 
 	/* Setup PKO_SEND_HDR_S */
 	cmd_buf[nb_desc++] = tx_pkt->data_len & 0xffff;
@@ -329,22 +339,23 @@ __octeontx_xmit_prepare(struct rte_mbuf *tx_pkt, uint64_t *cmd_buf,
 	 * not, as SG_DESC[I] and SEND_HDR[II] are clear.
 	 */
 	if (flag & OCCTX_TX_OFFLOAD_MBUF_NOFF_F)
-		cmd_buf[0] |= (octeontx_prefree_seg(tx_pkt) <<
+		cmd_buf[0] |= (octeontx_prefree_seg(tx_pkt, &m_tofree) <<
 			       58);
 
 	/* Mark mempool object as "put" since it is freed by PKO */
 	if (!(cmd_buf[0] & (1ULL << 58)))
-		__mempool_check_cookies(tx_pkt->pool, (void **)&tx_pkt,
+		__mempool_check_cookies(m_tofree->pool, (void **)&m_tofree,
 					1, 0);
 	/* Get the gaura Id */
-	gaura_id = octeontx_fpa_bufpool_gaura((uintptr_t)tx_pkt->pool->pool_id);
+	gaura_id =
+		octeontx_fpa_bufpool_gaura((uintptr_t)m_tofree->pool->pool_id);
 
 	/* Setup PKO_SEND_BUFLINK_S */
 	cmd_buf[nb_desc++] = PKO_SEND_BUFLINK_SUBDC |
 		PKO_SEND_BUFLINK_LDTYPE(0x1ull) |
 		PKO_SEND_BUFLINK_GAUAR((long)gaura_id) |
-		tx_pkt->data_len;
-	cmd_buf[nb_desc++] = rte_mbuf_data_iova(tx_pkt);
+		data_len;
+	cmd_buf[nb_desc++] = iova;
 
 	return nb_desc;
 }
@@ -355,7 +366,9 @@ __octeontx_xmit_mseg_prepare(struct rte_mbuf *tx_pkt, uint64_t *cmd_buf,
 {
 	uint16_t nb_segs, nb_desc = 0;
 	uint16_t gaura_id, len = 0;
-	struct rte_mbuf *m_next = NULL;
+	struct rte_mbuf *m_next = NULL, *m_tofree;
+	rte_iova_t iova;
+	uint16_t data_len;
 
 	nb_segs = tx_pkt->nb_segs;
 	/* Setup PKO_SEND_HDR_S */
@@ -369,40 +382,50 @@ __octeontx_xmit_mseg_prepare(struct rte_mbuf *tx_pkt, uint64_t *cmd_buf,
 
 	do {
 		m_next = tx_pkt->next;
-		/* To handle case where mbufs belong to diff pools, like
-		 * fragmentation
+		/* Get TX parameters up front, octeontx_prefree_seg might change
+		 * them
 		 */
-		gaura_id = octeontx_fpa_bufpool_gaura((uintptr_t)
-						      tx_pkt->pool->pool_id);
+		m_tofree = tx_pkt;
+		data_len = tx_pkt->data_len;
+		iova = rte_mbuf_data_iova(tx_pkt);
 
 		/* Setup PKO_SEND_GATHER_S */
-		cmd_buf[nb_desc] = PKO_SEND_GATHER_SUBDC		 |
-				   PKO_SEND_GATHER_LDTYPE(0x1ull)	 |
-				   PKO_SEND_GATHER_GAUAR((long)gaura_id) |
-				   tx_pkt->data_len;
+		cmd_buf[nb_desc] = 0;
 
 		/* SG_DESC[I] bit controls if buffer is to be freed or
 		 * not, as SEND_HDR[DF] and SEND_HDR[II] are clear.
 		 */
 		if (flag & OCCTX_TX_OFFLOAD_MBUF_NOFF_F) {
 			cmd_buf[nb_desc] |=
-			     (octeontx_prefree_seg(tx_pkt) << 57);
+				(octeontx_prefree_seg(tx_pkt, &m_tofree) << 57);
 		}
 
+		/* To handle case where mbufs belong to diff pools, like
+		 * fragmentation
+		 */
+		gaura_id = octeontx_fpa_bufpool_gaura((uintptr_t)
+					m_tofree->pool->pool_id);
+
+		/* Setup PKO_SEND_GATHER_S */
+		cmd_buf[nb_desc] |= PKO_SEND_GATHER_SUBDC		 |
+				   PKO_SEND_GATHER_LDTYPE(0x1ull)	 |
+				   PKO_SEND_GATHER_GAUAR((long)gaura_id) |
+				   data_len;
+
 		/* Mark mempool object as "put" since it is freed by
 		 * PKO.
 		 */
 		if (!(cmd_buf[nb_desc] & (1ULL << 57))) {
 			tx_pkt->next = NULL;
-			__mempool_check_cookies(tx_pkt->pool,
-						(void **)&tx_pkt, 1, 0);
+			__mempool_check_cookies(m_tofree->pool,
+						(void **)&m_tofree, 1, 0);
 		}
 		nb_desc++;
 
-		cmd_buf[nb_desc++] = rte_mbuf_data_iova(tx_pkt);
+		cmd_buf[nb_desc++] = iova;
 
 		nb_segs--;
-		len += tx_pkt->data_len;
+		len += data_len;
 		tx_pkt = m_next;
 	} while (nb_segs);
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.365018094 +0800
+++ 0074-net-octeontx-fix-access-to-indirect-buffers.patch	2021-11-10 14:17:01.837413030 +0800
@@ -1 +1 @@
-From 9eb5cb3b11cc97e8e0c61ee216bd586b4793335f Mon Sep 17 00:00:00 2001
+From 4649ead943c2a16ced41cde27e9354eae57ded79 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9eb5cb3b11cc97e8e0c61ee216bd586b4793335f ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 2ed28ea563..e0723ac26a 100644
+index 7c24d8b4fd..dde0d6277b 100644

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

* [dpdk-stable] patch 'net/mlx5: fix memory leak on context allocation failure' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (73 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/octeontx: fix access to indirect buffers' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/mlx5: fix shared RSS destruction' " Xueming Li
                   ` (177 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Michael Baum; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5d3374aff1b527d7421339ec1c1017e82ee63400 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Sun, 12 Sep 2021 13:36:23 +0300
Subject: [PATCH] net/mlx5: fix memory leak on context allocation failure
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c76db6a4964e91a79d877a009d15d5c62507136a ]

In shared device context creation, there is a missing validation when
one of the btree memory allocation fails that will cause a memory leak.

This adds a proper check to clean resources in case of failure.

Fixes: 632f0f19056f ("net/mlx5: manage shared counters in three-level table")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index d6e780d50c..cb984debcc 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1021,6 +1021,8 @@ error:
 	MLX5_ASSERT(sh);
 	if (sh->cnt_id_tbl)
 		mlx5_l3t_destroy(sh->cnt_id_tbl);
+	if (sh->share_cache.cache.table)
+		mlx5_mr_btree_free(&sh->share_cache.cache);
 	if (sh->tis)
 		claim_zero(mlx5_devx_cmd_destroy(sh->tis));
 	if (sh->td)
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.406904962 +0800
+++ 0075-net-mlx5-fix-memory-leak-on-context-allocation-failu.patch	2021-11-10 14:17:01.837413030 +0800
@@ -1 +1 @@
-From c76db6a4964e91a79d877a009d15d5c62507136a Mon Sep 17 00:00:00 2001
+From 5d3374aff1b527d7421339ec1c1017e82ee63400 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c76db6a4964e91a79d877a009d15d5c62507136a ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index f84e061fe7..f0ec2d1279 100644
+index d6e780d50c..cb984debcc 100644
@@ -24 +26 @@
-@@ -1254,6 +1254,8 @@ error:
+@@ -1021,6 +1021,8 @@ error:

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

* [dpdk-stable] patch 'net/mlx5: fix shared RSS destruction' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (74 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/mlx5: fix memory leak on context allocation failure' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/memif: fix chained mbuf determination' " Xueming Li
                   ` (176 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 39f117c3b5eb3ee6e3fa7b0aff026222bcd191e3 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Wed, 1 Sep 2021 11:07:52 +0300
Subject: [PATCH] net/mlx5: fix shared RSS destruction
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f2f5879efb733460933dacf691887b22dfe9aa08 ]

Shared RSS resources were released before checking that the shared RSS
has no more references. If it had, the destruction was aborted, leaving
the shared RSS in an invalid state where it could no longer be used.
Move reference counter check before resource release.

Fixes: d2046c09aa64 ("net/mlx5: support shared action for RSS")

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 0b1a488edb..e8d4a006d4 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -11761,12 +11761,6 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev, uint32_t idx,
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
 					  "invalid shared action");
-	remaining = __flow_dv_action_rss_hrxqs_release(dev, shared_rss);
-	if (remaining)
-		return rte_flow_error_set(error, EBUSY,
-					  RTE_FLOW_ERROR_TYPE_ACTION,
-					  NULL,
-					  "shared rss hrxq has references");
 	if (!__atomic_compare_exchange_n(&shared_rss->refcnt, &old_refcnt,
 					 0, 0, __ATOMIC_ACQUIRE,
 					 __ATOMIC_RELAXED))
@@ -11774,6 +11768,12 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev, uint32_t idx,
 					  RTE_FLOW_ERROR_TYPE_ACTION,
 					  NULL,
 					  "shared rss has references");
+	remaining = __flow_dv_action_rss_hrxqs_release(dev, shared_rss);
+	if (remaining)
+		return rte_flow_error_set(error, EBUSY,
+					  RTE_FLOW_ERROR_TYPE_ACTION,
+					  NULL,
+					  "shared rss hrxq has references");
 	queue = shared_rss->ind_tbl->queues;
 	remaining = mlx5_ind_table_obj_release(dev, shared_rss->ind_tbl, true);
 	if (remaining)
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.450499949 +0800
+++ 0076-net-mlx5-fix-shared-RSS-destruction.patch	2021-11-10 14:17:01.844079642 +0800
@@ -1 +1 @@
-From f2f5879efb733460933dacf691887b22dfe9aa08 Mon Sep 17 00:00:00 2001
+From 39f117c3b5eb3ee6e3fa7b0aff026222bcd191e3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f2f5879efb733460933dacf691887b22dfe9aa08 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 626513ce56..15ca5cd2b4 100644
+index 0b1a488edb..e8d4a006d4 100644
@@ -24 +26 @@
-@@ -14761,12 +14761,6 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev, uint32_t idx,
+@@ -11761,12 +11761,6 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev, uint32_t idx,
@@ -37 +39 @@
-@@ -14774,6 +14768,12 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev, uint32_t idx,
+@@ -11774,6 +11768,12 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev, uint32_t idx,

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

* [dpdk-stable] patch 'net/memif: fix chained mbuf determination' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (75 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/mlx5: fix shared RSS destruction' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'kvargs: fix comments style' " Xueming Li
                   ` (175 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Junxiao Shi; +Cc: Luca Boccassi, Jakub Grajciar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From edfd68842c44515e006f83e1e4ee47f8260776b6 Mon Sep 17 00:00:00 2001
From: Junxiao Shi <git@mail1.yoursunny.com>
Date: Thu, 9 Sep 2021 14:42:06 +0000
Subject: [PATCH] net/memif: fix chained mbuf determination
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3e3f736e50fba910d1d484b9c763d884dff6688f ]

Previously, TX functions call rte_pktmbuf_is_contiguous to determine
whether an mbuf is chained. However, rte_pktmbuf_is_contiguous is
designed to work on the first mbuf of a packet only. In case a packet
contains three or more segment mbufs in a chain, it may cause truncated
packets or rte_mbuf_sanity_check panics.

This patch updates TX functions to determine chained mbufs using
mbuf_head->nb_segs field, which works in all cases. Moreover, it
maintains that the second cacheline is only accessed when chained mbuf
is actually present.

Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")
Fixes: 43b815d88188 ("net/memif: support zero-copy slave")

Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
---
 drivers/net/memif/rte_eth_memif.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 15284b3d2c..aded2ac134 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -199,6 +199,7 @@ memif_dev_info(struct rte_eth_dev *dev __rte_unused, struct rte_eth_dev_info *de
 	dev_info->max_rx_queues = ETH_MEMIF_MAX_NUM_Q_PAIRS;
 	dev_info->max_tx_queues = ETH_MEMIF_MAX_NUM_Q_PAIRS;
 	dev_info->min_rx_bufsize = 0;
+	dev_info->tx_offload_capa = DEV_TX_OFFLOAD_MULTI_SEGS;
 
 	return 0;
 }
@@ -566,7 +567,7 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		rte_eth_devices[mq->in_port].process_private;
 	memif_ring_t *ring = memif_get_ring_from_queue(proc_private, mq);
 	uint16_t slot, saved_slot, n_free, ring_size, mask, n_tx_pkts = 0;
-	uint16_t src_len, src_off, dst_len, dst_off, cp_len;
+	uint16_t src_len, src_off, dst_len, dst_off, cp_len, nb_segs;
 	memif_ring_type_t type = mq->type;
 	memif_desc_t *d0;
 	struct rte_mbuf *mbuf;
@@ -614,6 +615,7 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 
 	while (n_tx_pkts < nb_pkts && n_free) {
 		mbuf_head = *bufs++;
+		nb_segs = mbuf_head->nb_segs;
 		mbuf = mbuf_head;
 
 		saved_slot = slot;
@@ -657,7 +659,7 @@ next_in_chain:
 			d0->length = dst_off;
 		}
 
-		if (rte_pktmbuf_is_contiguous(mbuf) == 0) {
+		if (--nb_segs > 0) {
 			mbuf = mbuf->next;
 			goto next_in_chain;
 		}
@@ -694,6 +696,7 @@ memif_tx_one_zc(struct pmd_process_private *proc_private, struct memif_queue *mq
 		uint16_t slot, uint16_t n_free)
 {
 	memif_desc_t *d0;
+	uint16_t nb_segs = mbuf->nb_segs;
 	int used_slots = 1;
 
 next_in_chain:
@@ -714,7 +717,7 @@ next_in_chain:
 	d0->flags = 0;
 
 	/* check if buffer is chained */
-	if (rte_pktmbuf_is_contiguous(mbuf) == 0) {
+	if (--nb_segs > 0) {
 		if (n_free < 2)
 			return 0;
 		/* mark buffer as chained */
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.501718884 +0800
+++ 0077-net-memif-fix-chained-mbuf-determination.patch	2021-11-10 14:17:01.844079642 +0800
@@ -1 +1 @@
-From 3e3f736e50fba910d1d484b9c763d884dff6688f Mon Sep 17 00:00:00 2001
+From edfd68842c44515e006f83e1e4ee47f8260776b6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3e3f736e50fba910d1d484b9c763d884dff6688f ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index de6becd45e..fd9e877c3d 100644
+index 15284b3d2c..aded2ac134 100644
@@ -39 +41 @@
-@@ -567,7 +568,7 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -566,7 +567,7 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -48 +50 @@
-@@ -615,6 +616,7 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -614,6 +615,7 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -56 +58 @@
-@@ -659,7 +661,7 @@ next_in_chain:
+@@ -657,7 +659,7 @@ next_in_chain:
@@ -65 +67 @@
-@@ -696,6 +698,7 @@ memif_tx_one_zc(struct pmd_process_private *proc_private, struct memif_queue *mq
+@@ -694,6 +696,7 @@ memif_tx_one_zc(struct pmd_process_private *proc_private, struct memif_queue *mq
@@ -73 +75 @@
-@@ -716,7 +719,7 @@ next_in_chain:
+@@ -714,7 +717,7 @@ next_in_chain:

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

* [dpdk-stable] patch 'kvargs: fix comments style' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (76 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/memif: fix chained mbuf determination' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'bus/pci: fix unknown NUMA node value on Windows' " Xueming Li
                   ` (174 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Luca Boccassi, David Marchand, Ray Kinsella, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7b3cdb7c64913233b571b1649e188350fc94b5d3 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Wed, 29 Sep 2021 23:39:43 +0200
Subject: [PATCH] kvargs: fix comments style
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f0e18cb4a872d2f0cc4ba51557c837b81c8af024 ]

A '*' is missing at 2 places, add them.

Fixes: e1a00536c8ed ("kvargs: add a new library to parse key/value arguments")
Fixes: 3ab385063cb9 ("kvargs: add get by key")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
---
 lib/librte_kvargs/rte_kvargs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_kvargs/rte_kvargs.h b/lib/librte_kvargs/rte_kvargs.h
index eff598e08b..5b2e164287 100644
--- a/lib/librte_kvargs/rte_kvargs.h
+++ b/lib/librte_kvargs/rte_kvargs.h
@@ -145,7 +145,7 @@ int rte_kvargs_process(const struct rte_kvargs *kvlist,
  *   The rte_kvargs structure
  * @param key_match
  *   The key that should match, or NULL to count all associations
-
+ *
  * @return
  *   The number of entries
  */
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.540699899 +0800
+++ 0078-kvargs-fix-comments-style.patch	2021-11-10 14:17:01.844079642 +0800
@@ -1 +1 @@
-From f0e18cb4a872d2f0cc4ba51557c837b81c8af024 Mon Sep 17 00:00:00 2001
+From 7b3cdb7c64913233b571b1649e188350fc94b5d3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f0e18cb4a872d2f0cc4ba51557c837b81c8af024 ]
@@ -16,2 +19,2 @@
- lib/kvargs/rte_kvargs.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ lib/librte_kvargs/rte_kvargs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
@@ -19,14 +22,5 @@
-diff --git a/lib/kvargs/rte_kvargs.h b/lib/kvargs/rte_kvargs.h
-index 3c1754c3d9..359a9f5b09 100644
---- a/lib/kvargs/rte_kvargs.h
-+++ b/lib/kvargs/rte_kvargs.h
-@@ -125,7 +125,7 @@ void rte_kvargs_free(struct rte_kvargs *kvlist);
-  *   A list of rte_kvargs pair of 'key=value'.
-  * @param key
-  *   The matching key.
--
-+ *
-  * @return
-  *   NULL if no key matches the input,
-  *   a value associated with a matching key otherwise.
-@@ -190,7 +190,7 @@ int rte_kvargs_process(const struct rte_kvargs *kvlist,
+diff --git a/lib/librte_kvargs/rte_kvargs.h b/lib/librte_kvargs/rte_kvargs.h
+index eff598e08b..5b2e164287 100644
+--- a/lib/librte_kvargs/rte_kvargs.h
++++ b/lib/librte_kvargs/rte_kvargs.h
+@@ -145,7 +145,7 @@ int rte_kvargs_process(const struct rte_kvargs *kvlist,

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

* [dpdk-stable] patch 'bus/pci: fix unknown NUMA node value on Windows' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (77 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'kvargs: fix comments style' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'eal/windows: export version function' " Xueming Li
                   ` (173 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Pallavi Kadam; +Cc: Luca Boccassi, Vipin Varghese, Ranjit Menon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 196cda0e31b1ac4a41a525f186aa5506b3654237 Mon Sep 17 00:00:00 2001
From: Pallavi Kadam <pallavi.kadam@intel.com>
Date: Mon, 27 Sep 2021 11:43:22 -0700
Subject: [PATCH] bus/pci: fix unknown NUMA node value on Windows
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3c6e581025109926c166bbd2f7ea678f07c3bbce ]

Based on the rte_eth_dev_socket_id() documentation,
set the default numa_node to -1. When the API is unsuccessful,
set numa_node to 0.
This change more correctly resembles the Linux code.

Fixes: bf7cf1f947bd ("bus/pci: fix unknown NUMA node value on Windows")

Reported-by: Vipin Varghese <vipin.varghese@intel.com>
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
---
 drivers/bus/pci/windows/pci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
index 12a46ae370..4944c21f67 100644
--- a/drivers/bus/pci/windows/pci.c
+++ b/drivers/bus/pci/windows/pci.c
@@ -234,6 +234,7 @@ get_device_resource_info(HDEVINFO dev_info,
 	}
 
 	/* Get NUMA node using DEVPKEY_Device_Numa_Node */
+	dev->device.numa_node = SOCKET_ID_ANY;
 	res = SetupDiGetDevicePropertyW(dev_info, dev_info_data,
 		&DEVPKEY_Device_Numa_Node, &property_type,
 		(BYTE *)&numa_node, sizeof(numa_node), NULL, 0);
@@ -241,7 +242,7 @@ get_device_resource_info(HDEVINFO dev_info,
 		DWORD error = GetLastError();
 		if (error == ERROR_NOT_FOUND) {
 			/* On older CPUs, NUMA is not bound to PCIe locality. */
-			dev->device.numa_node = SOCKET_ID_ANY;
+			dev->device.numa_node = 0;
 			return ERROR_SUCCESS;
 		}
 		RTE_LOG_WIN32_ERR("SetupDiGetDevicePropertyW"
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.579301066 +0800
+++ 0079-bus-pci-fix-unknown-NUMA-node-value-on-Windows.patch	2021-11-10 14:17:01.844079642 +0800
@@ -1 +1 @@
-From 3c6e581025109926c166bbd2f7ea678f07c3bbce Mon Sep 17 00:00:00 2001
+From 196cda0e31b1ac4a41a525f186aa5506b3654237 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3c6e581025109926c166bbd2f7ea678f07c3bbce ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 343ef6f33b..644c452c76 100644
+index 12a46ae370..4944c21f67 100644
@@ -25 +27 @@
-@@ -237,6 +237,7 @@ get_device_resource_info(HDEVINFO dev_info,
+@@ -234,6 +234,7 @@ get_device_resource_info(HDEVINFO dev_info,
@@ -33 +35 @@
-@@ -244,7 +245,7 @@ get_device_resource_info(HDEVINFO dev_info,
+@@ -241,7 +242,7 @@ get_device_resource_info(HDEVINFO dev_info,

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

* [dpdk-stable] patch 'eal/windows: export version function' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (78 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'bus/pci: fix unknown NUMA node value on Windows' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'eal: remove Windows-specific list of common files' " Xueming Li
                   ` (172 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: William Tu; +Cc: Luca Boccassi, Dmitry Kozlyuk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8a43d7c5f437814d1c8f5d33353d96a9b989bc81 Mon Sep 17 00:00:00 2001
From: William Tu <u9012063@gmail.com>
Date: Thu, 5 Aug 2021 17:48:19 +0000
Subject: [PATCH] eal/windows: export version function
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit fe81e52a91d4b1beef15cfc152274498322446b4 ]

When OVS inits, it calls rte_version to get the DPDK's version.
The patch fixes the error below by exposing rte_version symbol.
libopenvswitch.a(dpdk.c.obj) : error LNK2019: unresolved external symbol
rte_version referenced in function dpdk_init

Fixes: 5b637a848195 ("eal: fix querying DPDK version at runtime")

Signed-off-by: William Tu <u9012063@gmail.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/librte_eal/version.map | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eal/version.map b/lib/librte_eal/version.map
index 1eeb5f3371..fe065a41d9 100644
--- a/lib/librte_eal/version.map
+++ b/lib/librte_eal/version.map
@@ -198,6 +198,7 @@ DPDK_21 {
 	rte_uuid_is_null;
 	rte_uuid_parse;
 	rte_uuid_unparse;
+	rte_version;
 	rte_vfio_clear_group;
 	rte_vfio_container_create;
 	rte_vfio_container_destroy;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.618873137 +0800
+++ 0080-eal-windows-export-version-function.patch	2021-11-10 14:17:01.844079642 +0800
@@ -1 +1 @@
-From fe81e52a91d4b1beef15cfc152274498322446b4 Mon Sep 17 00:00:00 2001
+From 8a43d7c5f437814d1c8f5d33353d96a9b989bc81 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fe81e52a91d4b1beef15cfc152274498322446b4 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +19,2 @@
- lib/eal/version.map | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ lib/librte_eal/version.map | 1 +
+ 1 file changed, 1 insertion(+)
@@ -20,9 +22,8 @@
-diff --git a/lib/eal/version.map b/lib/eal/version.map
-index b436359596..d800090db0 100644
---- a/lib/eal/version.map
-+++ b/lib/eal/version.map
-@@ -267,7 +267,7 @@ DPDK_22 {
- 	rte_uuid_is_null; # WINDOWS_NO_EXPORT
- 	rte_uuid_parse; # WINDOWS_NO_EXPORT
- 	rte_uuid_unparse; # WINDOWS_NO_EXPORT
--	rte_version; # WINDOWS_NO_EXPORT
+diff --git a/lib/librte_eal/version.map b/lib/librte_eal/version.map
+index 1eeb5f3371..fe065a41d9 100644
+--- a/lib/librte_eal/version.map
++++ b/lib/librte_eal/version.map
+@@ -198,6 +198,7 @@ DPDK_21 {
+ 	rte_uuid_is_null;
+ 	rte_uuid_parse;
+ 	rte_uuid_unparse;
@@ -30,3 +31,3 @@
- 	rte_vfio_clear_group; # WINDOWS_NO_EXPORT
- 	rte_vfio_container_create; # WINDOWS_NO_EXPORT
- 	rte_vfio_container_destroy; # WINDOWS_NO_EXPORT
+ 	rte_vfio_clear_group;
+ 	rte_vfio_container_create;
+ 	rte_vfio_container_destroy;

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

* [dpdk-stable] patch 'eal: remove Windows-specific list of common files' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (79 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'eal/windows: export version function' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'ring: fix Doxygen comment of internal function' " Xueming Li
                   ` (171 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Luca Boccassi, William Tu, Ranjit Menon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 51a9cd2327f3bc2f1d0535e140d94f2ae48ef3bd Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Sun, 29 Aug 2021 05:16:01 +0300
Subject: [PATCH] eal: remove Windows-specific list of common files
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit cf665406b1f834baf3436bb6e829b38efca55fd9 ]

The majority of common EAL sources that are built for all platforms were
listed separately for Windows and for other OS. It seems that developers
adding modules to EAL perceived this as if Windows supported
only a limited subset of modules and only added new ones into another.
Factor the truly common modules into a shared list,
then extend it with modules supported by different platforms.

When the two lists were created, UUID API implementation was removed
from Windows build (apparently by mistake), then excluded from the
export list for no reason other than not being built. Restore it.

Fixes: df3ff6be2b33 ("eal: simplify meson build of common directory")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: William Tu <u9012063@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
---
 lib/librte_eal/common/meson.build | 59 ++++++++-----------------------
 1 file changed, 15 insertions(+), 44 deletions(-)

diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build
index 39abf7a0a4..e7ea0fd388 100644
--- a/lib/librte_eal/common/meson.build
+++ b/lib/librte_eal/common/meson.build
@@ -5,51 +5,16 @@ includes += include_directories('.')
 
 cflags += [ '-DABI_VERSION="@0@"'.format(abi_version) ]
 
-if is_windows
-	sources += files(
-		'eal_common_bus.c',
-		'eal_common_class.c',
-		'eal_common_config.c',
-		'eal_common_debug.c',
-		'eal_common_dev.c',
-		'eal_common_devargs.c',
-		'eal_common_dynmem.c',
-		'eal_common_errno.c',
-		'eal_common_fbarray.c',
-		'eal_common_hexdump.c',
-		'eal_common_launch.c',
-		'eal_common_lcore.c',
-		'eal_common_log.c',
-		'eal_common_mcfg.c',
-		'eal_common_memalloc.c',
-		'eal_common_memory.c',
-		'eal_common_memzone.c',
-		'eal_common_options.c',
-		'eal_common_string_fns.c',
-		'eal_common_tailqs.c',
-		'eal_common_thread.c',
-		'eal_common_trace_points.c',
-		'malloc_elem.c',
-		'malloc_heap.c',
-		'rte_malloc.c',
-		'eal_common_timer.c',
-		'rte_service.c',
-	)
-	subdir_done()
-endif
-
 sources += files(
 	'eal_common_bus.c',
-	'eal_common_cpuflags.c',
 	'eal_common_class.c',
 	'eal_common_config.c',
 	'eal_common_debug.c',
-	'eal_common_devargs.c',
 	'eal_common_dev.c',
+	'eal_common_devargs.c',
 	'eal_common_errno.c',
 	'eal_common_fbarray.c',
 	'eal_common_hexdump.c',
-	'eal_common_hypervisor.c',
 	'eal_common_launch.c',
 	'eal_common_lcore.c',
 	'eal_common_log.c',
@@ -58,27 +23,33 @@ sources += files(
 	'eal_common_memory.c',
 	'eal_common_memzone.c',
 	'eal_common_options.c',
-	'eal_common_proc.c',
 	'eal_common_string_fns.c',
 	'eal_common_tailqs.c',
 	'eal_common_thread.c',
 	'eal_common_timer.c',
-	'eal_common_trace.c',
-	'eal_common_trace_ctf.c',
 	'eal_common_trace_points.c',
-	'eal_common_trace_utils.c',
 	'eal_common_uuid.c',
 	'hotplug_mp.c',
 	'malloc_elem.c',
 	'malloc_heap.c',
-	'malloc_mp.c',
-	'rte_keepalive.c',
 	'rte_malloc.c',
 	'rte_random.c',
 	'rte_reciprocal.c',
 	'rte_service.c',
 )
-
-if is_linux
+if is_linux or is_windows
 	sources += files('eal_common_dynmem.c')
 endif
+if not is_windows
+	sources += files(
+		'eal_common_cpuflags.c',
+		'eal_common_hypervisor.c',
+		'eal_common_proc.c',
+		'eal_common_trace.c',
+		'eal_common_trace_ctf.c',
+		'eal_common_trace_utils.c',
+		'hotplug_mp.c',
+		'malloc_mp.c',
+		'rte_keepalive.c',
+	)
+endif
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.658069403 +0800
+++ 0081-eal-remove-Windows-specific-list-of-common-files.patch	2021-11-10 14:17:01.844079642 +0800
@@ -1 +1 @@
-From cf665406b1f834baf3436bb6e829b38efca55fd9 Mon Sep 17 00:00:00 2001
+From 51a9cd2327f3bc2f1d0535e140d94f2ae48ef3bd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cf665406b1f834baf3436bb6e829b38efca55fd9 ]
@@ -23,9 +26,8 @@
- lib/eal/common/meson.build | 63 +++++++++-----------------------------
- lib/eal/version.map        |  8 ++---
- 2 files changed, 19 insertions(+), 52 deletions(-)
-
-diff --git a/lib/eal/common/meson.build b/lib/eal/common/meson.build
-index edfca77779..6d01b0f072 100644
---- a/lib/eal/common/meson.build
-+++ b/lib/eal/common/meson.build
-@@ -5,54 +5,16 @@ includes += include_directories('.')
+ lib/librte_eal/common/meson.build | 59 ++++++++-----------------------
+ 1 file changed, 15 insertions(+), 44 deletions(-)
+
+diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build
+index 39abf7a0a4..e7ea0fd388 100644
+--- a/lib/librte_eal/common/meson.build
++++ b/lib/librte_eal/common/meson.build
+@@ -5,51 +5,16 @@ includes += include_directories('.')
@@ -36,33 +38,30 @@
--    sources += files(
--            'eal_common_bus.c',
--            'eal_common_class.c',
--            'eal_common_config.c',
--            'eal_common_debug.c',
--            'eal_common_dev.c',
--            'eal_common_devargs.c',
--            'eal_common_dynmem.c',
--            'eal_common_errno.c',
--            'eal_common_fbarray.c',
--            'eal_common_hexdump.c',
--            'eal_common_launch.c',
--            'eal_common_lcore.c',
--            'eal_common_log.c',
--            'eal_common_mcfg.c',
--            'eal_common_memalloc.c',
--            'eal_common_memory.c',
--            'eal_common_memzone.c',
--            'eal_common_options.c',
--            'eal_common_string_fns.c',
--            'eal_common_tailqs.c',
--            'eal_common_thread.c',
--            'eal_common_trace_points.c',
--            'malloc_elem.c',
--            'malloc_heap.c',
--            'rte_malloc.c',
--            'eal_common_timer.c',
--            'rte_random.c',
--            'rte_reciprocal.c',
--            'rte_service.c',
--            'rte_version.c',
--    )
--    subdir_done()
+-	sources += files(
+-		'eal_common_bus.c',
+-		'eal_common_class.c',
+-		'eal_common_config.c',
+-		'eal_common_debug.c',
+-		'eal_common_dev.c',
+-		'eal_common_devargs.c',
+-		'eal_common_dynmem.c',
+-		'eal_common_errno.c',
+-		'eal_common_fbarray.c',
+-		'eal_common_hexdump.c',
+-		'eal_common_launch.c',
+-		'eal_common_lcore.c',
+-		'eal_common_log.c',
+-		'eal_common_mcfg.c',
+-		'eal_common_memalloc.c',
+-		'eal_common_memory.c',
+-		'eal_common_memzone.c',
+-		'eal_common_options.c',
+-		'eal_common_string_fns.c',
+-		'eal_common_tailqs.c',
+-		'eal_common_thread.c',
+-		'eal_common_trace_points.c',
+-		'malloc_elem.c',
+-		'malloc_heap.c',
+-		'rte_malloc.c',
+-		'eal_common_timer.c',
+-		'rte_service.c',
+-	)
+-	subdir_done()
@@ -72,39 +71,38 @@
-         'eal_common_bus.c',
--        'eal_common_cpuflags.c',
-         'eal_common_class.c',
-         'eal_common_config.c',
-         'eal_common_debug.c',
--        'eal_common_devargs.c',
-         'eal_common_dev.c',
-+        'eal_common_devargs.c',
-         'eal_common_errno.c',
-         'eal_common_fbarray.c',
-         'eal_common_hexdump.c',
--        'eal_common_hypervisor.c',
-         'eal_common_launch.c',
-         'eal_common_lcore.c',
-         'eal_common_log.c',
-@@ -61,28 +23,33 @@ sources += files(
-         'eal_common_memory.c',
-         'eal_common_memzone.c',
-         'eal_common_options.c',
--        'eal_common_proc.c',
-         'eal_common_string_fns.c',
-         'eal_common_tailqs.c',
-         'eal_common_thread.c',
-         'eal_common_timer.c',
--        'eal_common_trace.c',
--        'eal_common_trace_ctf.c',
-         'eal_common_trace_points.c',
--        'eal_common_trace_utils.c',
-         'eal_common_uuid.c',
--        'hotplug_mp.c',
-         'malloc_elem.c',
-         'malloc_heap.c',
--        'malloc_mp.c',
--        'rte_keepalive.c',
-         'rte_malloc.c',
-         'rte_random.c',
-         'rte_reciprocal.c',
-         'rte_service.c',
-         'rte_version.c',
+ 	'eal_common_bus.c',
+-	'eal_common_cpuflags.c',
+ 	'eal_common_class.c',
+ 	'eal_common_config.c',
+ 	'eal_common_debug.c',
+-	'eal_common_devargs.c',
+ 	'eal_common_dev.c',
++	'eal_common_devargs.c',
+ 	'eal_common_errno.c',
+ 	'eal_common_fbarray.c',
+ 	'eal_common_hexdump.c',
+-	'eal_common_hypervisor.c',
+ 	'eal_common_launch.c',
+ 	'eal_common_lcore.c',
+ 	'eal_common_log.c',
+@@ -58,27 +23,33 @@ sources += files(
+ 	'eal_common_memory.c',
+ 	'eal_common_memzone.c',
+ 	'eal_common_options.c',
+-	'eal_common_proc.c',
+ 	'eal_common_string_fns.c',
+ 	'eal_common_tailqs.c',
+ 	'eal_common_thread.c',
+ 	'eal_common_timer.c',
+-	'eal_common_trace.c',
+-	'eal_common_trace_ctf.c',
+ 	'eal_common_trace_points.c',
+-	'eal_common_trace_utils.c',
+ 	'eal_common_uuid.c',
+ 	'hotplug_mp.c',
+ 	'malloc_elem.c',
+ 	'malloc_heap.c',
+-	'malloc_mp.c',
+-	'rte_keepalive.c',
+ 	'rte_malloc.c',
+ 	'rte_random.c',
+ 	'rte_reciprocal.c',
+ 	'rte_service.c',
@@ -115 +113 @@
-     sources += files('eal_common_dynmem.c')
+ 	sources += files('eal_common_dynmem.c')
@@ -118,11 +116,11 @@
-+    sources += files(
-+            'eal_common_cpuflags.c',
-+            'eal_common_hypervisor.c',
-+            'eal_common_proc.c',
-+            'eal_common_trace.c',
-+            'eal_common_trace_ctf.c',
-+            'eal_common_trace_utils.c',
-+            'hotplug_mp.c',
-+            'malloc_mp.c',
-+            'rte_keepalive.c',
-+    )
++	sources += files(
++		'eal_common_cpuflags.c',
++		'eal_common_hypervisor.c',
++		'eal_common_proc.c',
++		'eal_common_trace.c',
++		'eal_common_trace_ctf.c',
++		'eal_common_trace_utils.c',
++		'hotplug_mp.c',
++		'malloc_mp.c',
++		'rte_keepalive.c',
++	)
@@ -130,19 +127,0 @@
-diff --git a/lib/eal/version.map b/lib/eal/version.map
-index d800090db0..1d916cd74e 100644
---- a/lib/eal/version.map
-+++ b/lib/eal/version.map
-@@ -263,10 +263,10 @@ DPDK_22 {
- 	rte_thread_get_affinity;
- 	rte_thread_set_affinity;
- 	rte_thread_setname;
--	rte_uuid_compare; # WINDOWS_NO_EXPORT
--	rte_uuid_is_null; # WINDOWS_NO_EXPORT
--	rte_uuid_parse; # WINDOWS_NO_EXPORT
--	rte_uuid_unparse; # WINDOWS_NO_EXPORT
-+	rte_uuid_compare;
-+	rte_uuid_is_null;
-+	rte_uuid_parse;
-+	rte_uuid_unparse;
- 	rte_version;
- 	rte_vfio_clear_group; # WINDOWS_NO_EXPORT
- 	rte_vfio_container_create; # WINDOWS_NO_EXPORT

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

* [dpdk-stable] patch 'ring: fix Doxygen comment of internal function' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (80 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'eal: remove Windows-specific list of common files' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'bitrate: fix registration to match API description' " Xueming Li
                   ` (170 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Cian Ferriter; +Cc: Luca Boccassi, Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1e697abcfd978d22c3b56c9b9a00ffb294718dbe Mon Sep 17 00:00:00 2001
From: Cian Ferriter <cian.ferriter@intel.com>
Date: Mon, 23 Aug 2021 18:28:44 +0100
Subject: [PATCH] ring: fix Doxygen comment of internal function
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0203a14c72da4ae726056a147cb6e51622c9c28e ]

Change "enqueue" to "dequeue" because the __rte_ring_move_cons_head()
function is updating the consumer head for dequeue.

Fixes: 0dfc98c507b1 ("ring: separate out head index manipulation")

Signed-off-by: Cian Ferriter <cian.ferriter@intel.com>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 lib/librte_ring/rte_ring_c11_mem.h | 2 +-
 lib/librte_ring/rte_ring_generic.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_ring/rte_ring_c11_mem.h b/lib/librte_ring/rte_ring_c11_mem.h
index 0fb73a3371..ae886532ee 100644
--- a/lib/librte_ring/rte_ring_c11_mem.h
+++ b/lib/librte_ring/rte_ring_c11_mem.h
@@ -111,7 +111,7 @@ __rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp,
  * @param is_sc
  *   Indicates whether multi-consumer path is needed or not
  * @param n
- *   The number of elements we will want to enqueue, i.e. how far should the
+ *   The number of elements we will want to dequeue, i.e. how far should the
  *   head be moved
  * @param behavior
  *   RTE_RING_QUEUE_FIXED:    Dequeue a fixed number of items from a ring
diff --git a/lib/librte_ring/rte_ring_generic.h b/lib/librte_ring/rte_ring_generic.h
index 953cdbbd5e..79ae4ecb14 100644
--- a/lib/librte_ring/rte_ring_generic.h
+++ b/lib/librte_ring/rte_ring_generic.h
@@ -107,7 +107,7 @@ __rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp,
  * @param is_sc
  *   Indicates whether multi-consumer path is needed or not
  * @param n
- *   The number of elements we will want to enqueue, i.e. how far should the
+ *   The number of elements we will want to dequeue, i.e. how far should the
  *   head be moved
  * @param behavior
  *   RTE_RING_QUEUE_FIXED:    Dequeue a fixed number of items from a ring
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.697840966 +0800
+++ 0082-ring-fix-Doxygen-comment-of-internal-function.patch	2021-11-10 14:17:01.844079642 +0800
@@ -1 +1 @@
-From 0203a14c72da4ae726056a147cb6e51622c9c28e Mon Sep 17 00:00:00 2001
+From 1e697abcfd978d22c3b56c9b9a00ffb294718dbe Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0203a14c72da4ae726056a147cb6e51622c9c28e ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +17,2 @@
- lib/ring/rte_ring_c11_pvt.h     | 2 +-
- lib/ring/rte_ring_generic_pvt.h | 2 +-
+ lib/librte_ring/rte_ring_c11_mem.h | 2 +-
+ lib/librte_ring/rte_ring_generic.h | 2 +-
@@ -19,4 +21,4 @@
-diff --git a/lib/ring/rte_ring_c11_pvt.h b/lib/ring/rte_ring_c11_pvt.h
-index 37e0b2afd6..f895950df4 100644
---- a/lib/ring/rte_ring_c11_pvt.h
-+++ b/lib/ring/rte_ring_c11_pvt.h
+diff --git a/lib/librte_ring/rte_ring_c11_mem.h b/lib/librte_ring/rte_ring_c11_mem.h
+index 0fb73a3371..ae886532ee 100644
+--- a/lib/librte_ring/rte_ring_c11_mem.h
++++ b/lib/librte_ring/rte_ring_c11_mem.h
@@ -32,5 +34,5 @@
-diff --git a/lib/ring/rte_ring_generic_pvt.h b/lib/ring/rte_ring_generic_pvt.h
-index c95ad7e12c..5acb6e59be 100644
---- a/lib/ring/rte_ring_generic_pvt.h
-+++ b/lib/ring/rte_ring_generic_pvt.h
-@@ -106,7 +106,7 @@ __rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp,
+diff --git a/lib/librte_ring/rte_ring_generic.h b/lib/librte_ring/rte_ring_generic.h
+index 953cdbbd5e..79ae4ecb14 100644
+--- a/lib/librte_ring/rte_ring_generic.h
++++ b/lib/librte_ring/rte_ring_generic.h
+@@ -107,7 +107,7 @@ __rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp,

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

* [dpdk-stable] patch 'bitrate: fix registration to match API description' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (81 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'ring: fix Doxygen comment of internal function' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'bitrate: fix calculation " Xueming Li
                   ` (169 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 102d6df14d5608223a6d354896780e9056fafc34 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Fri, 9 Jul 2021 16:19:36 +0100
Subject: [PATCH] bitrate: fix registration to match API description
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 06ae9f0f92cf3bb85549f66dc3dfa11011d7db0f ]

rte_stats_bitrate_reg() API states it returns 'Zero on success'.

However, the implementation directly returns the return of
rte_metrics_reg_names() which may be zero or positive on success,
with a positive value also indicating the index.

The user of rte_stats_bitrate_reg() should not care about the
index as it is stored in the opaque rte_stats_bitrates struct.

Change the implementation of rte_stats_bitrate_reg() to match
the API description by always returning zero on success.

Fixes: 2ad7ba9a6567 ("bitrate: add bitrate statistics library")

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
 lib/librte_bitratestats/rte_bitrate.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c
index 8fd9f47288..e23e38bc94 100644
--- a/lib/librte_bitratestats/rte_bitrate.c
+++ b/lib/librte_bitratestats/rte_bitrate.c
@@ -55,8 +55,10 @@ rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data)
 		return -EINVAL;
 
 	return_value = rte_metrics_reg_names(&names[0], RTE_DIM(names));
-	if (return_value >= 0)
+	if (return_value >= 0) {
 		bitrate_data->id_stats_set = return_value;
+		return 0;
+	}
 	return return_value;
 }
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.746374041 +0800
+++ 0083-bitrate-fix-registration-to-match-API-description.patch	2021-11-10 14:17:01.844079642 +0800
@@ -1 +1 @@
-From 06ae9f0f92cf3bb85549f66dc3dfa11011d7db0f Mon Sep 17 00:00:00 2001
+From 102d6df14d5608223a6d354896780e9056fafc34 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 06ae9f0f92cf3bb85549f66dc3dfa11011d7db0f ]
@@ -22 +25 @@
- lib/bitratestats/rte_bitrate.c | 4 +++-
+ lib/librte_bitratestats/rte_bitrate.c | 4 +++-
@@ -25 +28 @@
-diff --git a/lib/bitratestats/rte_bitrate.c b/lib/bitratestats/rte_bitrate.c
+diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c
@@ -27,2 +30,2 @@
---- a/lib/bitratestats/rte_bitrate.c
-+++ b/lib/bitratestats/rte_bitrate.c
+--- a/lib/librte_bitratestats/rte_bitrate.c
++++ b/lib/librte_bitratestats/rte_bitrate.c

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

* [dpdk-stable] patch 'bitrate: fix calculation to match API description' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (82 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'bitrate: fix registration to match API description' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'usertools: fix handling EOF for telemetry input pipe' " Xueming Li
                   ` (168 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 45f9d14e11cc844015f00bbcf782f9caf6644d9a Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Fri, 9 Jul 2021 16:19:37 +0100
Subject: [PATCH] bitrate: fix calculation to match API description
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bdd478eede455611245593edd43dc49a1d821449 ]

rte_stats_bitrate_calc() API states it returns 'Negative value on error'.

However, the implementation will return the error code from
rte_eth_stats_get() which may be non-zero on error.

Change the implementation of rte_stats_bitrate_calc() to match
the API description by always returning a negative value on error.

Fixes: 2ad7ba9a6567 ("bitrate: add bitrate statistics library")

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
 lib/librte_bitratestats/rte_bitrate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c
index e23e38bc94..1664e4863b 100644
--- a/lib/librte_bitratestats/rte_bitrate.c
+++ b/lib/librte_bitratestats/rte_bitrate.c
@@ -80,7 +80,7 @@ rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data,
 
 	ret_code = rte_eth_stats_get(port_id, &eth_stats);
 	if (ret_code != 0)
-		return ret_code;
+		return ret_code < 0 ? ret_code : -ret_code;
 
 	port_data = &bitrate_data->port_stats[port_id];
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.787203870 +0800
+++ 0084-bitrate-fix-calculation-to-match-API-description.patch	2021-11-10 14:17:01.844079642 +0800
@@ -1 +1 @@
-From bdd478eede455611245593edd43dc49a1d821449 Mon Sep 17 00:00:00 2001
+From 45f9d14e11cc844015f00bbcf782f9caf6644d9a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bdd478eede455611245593edd43dc49a1d821449 ]
@@ -18 +21 @@
- lib/bitratestats/rte_bitrate.c | 2 +-
+ lib/librte_bitratestats/rte_bitrate.c | 2 +-
@@ -21 +24 @@
-diff --git a/lib/bitratestats/rte_bitrate.c b/lib/bitratestats/rte_bitrate.c
+diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c
@@ -23,2 +26,2 @@
---- a/lib/bitratestats/rte_bitrate.c
-+++ b/lib/bitratestats/rte_bitrate.c
+--- a/lib/librte_bitratestats/rte_bitrate.c
++++ b/lib/librte_bitratestats/rte_bitrate.c

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

* [dpdk-stable] patch 'usertools: fix handling EOF for telemetry input pipe' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (83 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'bitrate: fix calculation " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'eal/freebsd: lock memory device to prevent conflicts' " Xueming Li
                   ` (167 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ad4051ca8f5fac9d1ad173ab8c4f7d24cc115258 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 13 Sep 2021 11:51:36 +0100
Subject: [PATCH] usertools: fix handling EOF for telemetry input pipe
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 744e9a87c582d687d5d20b61b7ee0835da421541 ]

To allow the script to take queries from input pipes e.g. "echo
/ethdev/stats,0 | dpdk-telemetry.py", we need to handle the case of EOF
correctly without crashing with an exception. Do this by using a
try-except block around the input handling.

Fixes: 6a2967c112a3 ("usertools: add new telemetry script")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 usertools/dpdk-telemetry.py | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/usertools/dpdk-telemetry.py b/usertools/dpdk-telemetry.py
index 181859658f..a71f1e9ff9 100755
--- a/usertools/dpdk-telemetry.py
+++ b/usertools/dpdk-telemetry.py
@@ -51,13 +51,17 @@ def handle_socket(path):
     CMDS = read_socket(sock, output_buf_len, False)["/"]
 
     # interactive prompt
-    text = input('--> ').strip()
-    while text != "quit":
-        if text.startswith('/'):
-            sock.send(text.encode())
-            read_socket(sock, output_buf_len)
+    try:
         text = input('--> ').strip()
-    sock.close()
+        while text != "quit":
+            if text.startswith('/'):
+                sock.send(text.encode())
+                read_socket(sock, output_buf_len)
+            text = input('--> ').strip()
+    except EOFError:
+        pass
+    finally:
+        sock.close()
 
 
 def readline_complete(text, state):
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.827601818 +0800
+++ 0085-usertools-fix-handling-EOF-for-telemetry-input-pipe.patch	2021-11-10 14:17:01.847412948 +0800
@@ -1 +1 @@
-From 744e9a87c582d687d5d20b61b7ee0835da421541 Mon Sep 17 00:00:00 2001
+From ad4051ca8f5fac9d1ad173ab8c4f7d24cc115258 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 744e9a87c582d687d5d20b61b7ee0835da421541 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index bdc617db18..7ebbb64fce 100755
+index 181859658f..a71f1e9ff9 100755
@@ -24 +26 @@
-@@ -69,13 +69,17 @@ def handle_socket(path):
+@@ -51,13 +51,17 @@ def handle_socket(path):

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

* [dpdk-stable] patch 'eal/freebsd: lock memory device to prevent conflicts' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (84 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'usertools: fix handling EOF for telemetry input pipe' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'test/mem: fix memory autotests on FreeBSD' " Xueming Li
                   ` (166 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 95934ebba9b415b9f234dbe7e65319395d1a7a24 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 13 Sep 2021 15:08:48 +0100
Subject: [PATCH] eal/freebsd: lock memory device to prevent conflicts
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 47a4f2650c71d9197231a95c5df8f89d0f65e882 ]

Only a single DPDK process on the system can be using the /dev/contigmem
mappings at a time, but this was never explicitly enforced, e.g. when
using --in-memory flag on two processes. To prevent possible conflict
issues, we lock the dev node when it's in use, preventing other DPDK
processes from starting up and causing problems for us.

Fixes: 764bf26873b9 ("add FreeBSD support")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/freebsd/eal_hugepage_info.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_eal/freebsd/eal_hugepage_info.c b/lib/librte_eal/freebsd/eal_hugepage_info.c
index 408f054f7a..9dbe375bd3 100644
--- a/lib/librte_eal/freebsd/eal_hugepage_info.c
+++ b/lib/librte_eal/freebsd/eal_hugepage_info.c
@@ -90,6 +90,10 @@ eal_hugepage_info_init(void)
 		RTE_LOG(ERR, EAL, "could not open "CONTIGMEM_DEV"\n");
 		return -1;
 	}
+	if (flock(fd, LOCK_EX | LOCK_NB) < 0) {
+		RTE_LOG(ERR, EAL, "could not lock memory. Is another DPDK process running?\n");
+		return -1;
+	}
 
 	if (buffer_size >= 1<<30)
 		RTE_LOG(INFO, EAL, "Contigmem driver has %d buffers, each of size %dGB\n",
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.868796238 +0800
+++ 0086-eal-freebsd-lock-memory-device-to-prevent-conflicts.patch	2021-11-10 14:17:01.847412948 +0800
@@ -1 +1 @@
-From 47a4f2650c71d9197231a95c5df8f89d0f65e882 Mon Sep 17 00:00:00 2001
+From 95934ebba9b415b9f234dbe7e65319395d1a7a24 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 47a4f2650c71d9197231a95c5df8f89d0f65e882 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
- lib/eal/freebsd/eal_hugepage_info.c | 4 ++++
+ lib/librte_eal/freebsd/eal_hugepage_info.c | 4 ++++
@@ -21 +23 @@
-diff --git a/lib/eal/freebsd/eal_hugepage_info.c b/lib/eal/freebsd/eal_hugepage_info.c
+diff --git a/lib/librte_eal/freebsd/eal_hugepage_info.c b/lib/librte_eal/freebsd/eal_hugepage_info.c
@@ -23,2 +25,2 @@
---- a/lib/eal/freebsd/eal_hugepage_info.c
-+++ b/lib/eal/freebsd/eal_hugepage_info.c
+--- a/lib/librte_eal/freebsd/eal_hugepage_info.c
++++ b/lib/librte_eal/freebsd/eal_hugepage_info.c

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

* [dpdk-stable] patch 'test/mem: fix memory autotests on FreeBSD' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (85 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'eal/freebsd: lock memory device to prevent conflicts' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'vhost: clean IOTLB cache on vring stop' " Xueming Li
                   ` (165 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, Brandon Lo, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 192d2f2dcd46753c888c987eeaa26677457fcea6 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 17 Sep 2021 16:09:17 +0100
Subject: [PATCH] test/mem: fix memory autotests on FreeBSD
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 086d426406bd3f6fac96a15bbd871c7fe714bc2d ]

The memory autotests were failing on FreeBSD, due to an incorrect errno
variable being checked for ENOTSUP. The test checked "errno" while the
DPDK API sets "rte_errno". Changing to check the right variable makes
the test behave properly.

Fixes: c3e35a0966b8 ("test/mem: check segment fd API")

Reported-by: Brandon Lo <blo@iol.unh.edu>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_memory.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index 7d5ae99bab..dbf6871e71 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -6,6 +6,7 @@
 #include <stdint.h>
 
 #include <rte_eal.h>
+#include <rte_errno.h>
 #include <rte_memory.h>
 #include <rte_common.h>
 #include <rte_memzone.h>
@@ -53,7 +54,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
 		/* ENOTSUP means segment is valid, but there is not support for
 		 * segment fd API (e.g. on FreeBSD).
 		 */
-		if (errno == ENOTSUP)
+		if (rte_errno == ENOTSUP)
 			return 1;
 		/* all other errors are treated as failures */
 		return -1;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.909401957 +0800
+++ 0087-test-mem-fix-memory-autotests-on-FreeBSD.patch	2021-11-10 14:17:01.847412948 +0800
@@ -1 +1 @@
-From 086d426406bd3f6fac96a15bbd871c7fe714bc2d Mon Sep 17 00:00:00 2001
+From 192d2f2dcd46753c888c987eeaa26677457fcea6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 086d426406bd3f6fac96a15bbd871c7fe714bc2d ]

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

* [dpdk-stable] patch 'vhost: clean IOTLB cache on vring stop' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (86 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'test/mem: fix memory autotests on FreeBSD' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/virtio: fix Tx cleanup functions to have same signature' " Xueming Li
                   ` (164 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Eugenio Pérez
  Cc: Luca Boccassi, Pei Zhang, Maxime Coquelin, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9786a89ed40dbbbdc5a2162a57b5a3937dc43fae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= <eperezma@redhat.com>
Date: Fri, 27 Aug 2021 18:12:31 +0200
Subject: [PATCH] vhost: clean IOTLB cache on vring stop
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e7cb7fdf5471d96edd586dd318511d8a892c41ca ]

Old IOVA cache entries are left when there is a change on virtio driver
in VM. In case that all these old entries have iova addresses lesser
than new iova entries, vhost code will need to iterate all the cache to
find the new ones. In case of just a new iova entry needed for the new
translations, this condition will last forever.

This has been observed in virtio-net to testpmd's vfio-pci driver
transition, reducing the performance from more than 10Mpps to less than
0.07Mpps if the hugepage address was higher than the networking
buffers. Since all new buffers are contained in this new gigantic page,
vhost needs to scan IOTLB_CACHE_SIZE - 1 for each translation at worst.

Fixes: 69c90e98f483 ("vhost: enable IOMMU support")

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Reported-by: Pei Zhang <pezhang@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/librte_vhost/vhost_user.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 8a2a3e9ab5..843bfbbfd9 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -2012,6 +2012,8 @@ vhost_user_get_vring_base(struct virtio_net **pdev,
 	msg->size = sizeof(msg->payload.state);
 	msg->fd_num = 0;
 
+	vhost_user_iotlb_flush_all(vq);
+
 	vring_invalidate(dev, vq);
 
 	return RTE_VHOST_MSG_RESULT_REPLY;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.949770386 +0800
+++ 0088-vhost-clean-IOTLB-cache-on-vring-stop.patch	2021-11-10 14:17:01.847412948 +0800
@@ -1 +1 @@
-From e7cb7fdf5471d96edd586dd318511d8a892c41ca Mon Sep 17 00:00:00 2001
+From 9786a89ed40dbbbdc5a2162a57b5a3937dc43fae Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e7cb7fdf5471d96edd586dd318511d8a892c41ca ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
- lib/vhost/vhost_user.c | 2 ++
+ lib/librte_vhost/vhost_user.c | 2 ++
@@ -32,5 +34,5 @@
-diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
-index 7b9f26b656..5a894ca0cc 100644
---- a/lib/vhost/vhost_user.c
-+++ b/lib/vhost/vhost_user.c
-@@ -2113,6 +2113,8 @@ vhost_user_get_vring_base(struct virtio_net **pdev,
+diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
+index 8a2a3e9ab5..843bfbbfd9 100644
+--- a/lib/librte_vhost/vhost_user.c
++++ b/lib/librte_vhost/vhost_user.c
+@@ -2012,6 +2012,8 @@ vhost_user_get_vring_base(struct virtio_net **pdev,

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

* [dpdk-stable] patch 'net/virtio: fix Tx cleanup functions to have same signature' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (87 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'vhost: clean IOTLB cache on vring stop' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/virtio: fix Tx completed mbuf leak on device stop' " Xueming Li
                   ` (163 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Ivan Ilchenko
  Cc: Luca Boccassi, Andrew Rybchenko, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0da178c94e72f8a8a9e5673e3d66929b68d398cf Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Wed, 15 Sep 2021 12:19:41 +0300
Subject: [PATCH] net/virtio: fix Tx cleanup functions to have same signature
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e2ca43a35ea60e6194a72d37c964d52827fcff71 ]

There is a family of cleanup from completed transmits functions.
Fix packed virtqueues cleanup functions to have the same signature
as split virtqueues have. This lets all functions of the family to
match the same callback prototype.

Fixes: 892dc798fa9c ("net/virtio: implement Tx path for packed queues")

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtqueue.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
index 42c4c9882f..c169518ec8 100644
--- a/drivers/net/virtio/virtqueue.h
+++ b/drivers/net/virtio/virtqueue.h
@@ -828,25 +828,26 @@ vq_ring_free_id_packed(struct virtqueue *vq, uint16_t id)
 }
 
 static void
-virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, int num)
+virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, uint16_t num)
 {
 	uint16_t used_idx, id, curr_id, free_cnt = 0;
 	uint16_t size = vq->vq_nentries;
 	struct vring_packed_desc *desc = vq->vq_packed.ring.desc;
 	struct vq_desc_extra *dxp;
+	int nb = num;
 
 	used_idx = vq->vq_used_cons_idx;
 	/* desc_is_used has a load-acquire or rte_io_rmb inside
 	 * and wait for used desc in virtqueue.
 	 */
-	while (num > 0 && desc_is_used(&desc[used_idx], vq)) {
+	while (nb > 0 && desc_is_used(&desc[used_idx], vq)) {
 		id = desc[used_idx].id;
 		do {
 			curr_id = used_idx;
 			dxp = &vq->vq_descx[used_idx];
 			used_idx += dxp->ndescs;
 			free_cnt += dxp->ndescs;
-			num -= dxp->ndescs;
+			nb -= dxp->ndescs;
 			if (used_idx >= size) {
 				used_idx -= size;
 				vq->vq_packed.used_wrap_counter ^= 1;
@@ -862,7 +863,7 @@ virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, int num)
 }
 
 static void
-virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, int num)
+virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, uint16_t num)
 {
 	uint16_t used_idx, id;
 	uint16_t size = vq->vq_nentries;
@@ -892,7 +893,7 @@ virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, int num)
 
 /* Cleanup from completed transmits. */
 static inline void
-virtio_xmit_cleanup_packed(struct virtqueue *vq, int num, int in_order)
+virtio_xmit_cleanup_packed(struct virtqueue *vq, uint16_t num, int in_order)
 {
 	if (in_order)
 		virtio_xmit_cleanup_inorder_packed(vq, num);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.991845129 +0800
+++ 0089-net-virtio-fix-Tx-cleanup-functions-to-have-same-sig.patch	2021-11-10 14:17:01.847412948 +0800
@@ -1 +1 @@
-From e2ca43a35ea60e6194a72d37c964d52827fcff71 Mon Sep 17 00:00:00 2001
+From 0da178c94e72f8a8a9e5673e3d66929b68d398cf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e2ca43a35ea60e6194a72d37c964d52827fcff71 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 03957b2bd0..d0c48ca415 100644
+index 42c4c9882f..c169518ec8 100644
@@ -25 +27 @@
-@@ -803,25 +803,26 @@ vq_ring_free_id_packed(struct virtqueue *vq, uint16_t id)
+@@ -828,25 +828,26 @@ vq_ring_free_id_packed(struct virtqueue *vq, uint16_t id)
@@ -55 +57 @@
-@@ -837,7 +838,7 @@ virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, int num)
+@@ -862,7 +863,7 @@ virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, int num)
@@ -64 +66 @@
-@@ -867,7 +868,7 @@ virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, int num)
+@@ -892,7 +893,7 @@ virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, int num)

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

* [dpdk-stable] patch 'net/virtio: fix Tx completed mbuf leak on device stop' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (88 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/virtio: fix Tx cleanup functions to have same signature' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/virtio: do not use PMD log type' " Xueming Li
                   ` (162 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Ivan Ilchenko
  Cc: Luca Boccassi, Andrew Rybchenko, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 758eb05f2b576e4bd2267dca6b3142247f98d963 Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Wed, 15 Sep 2021 12:19:42 +0300
Subject: [PATCH] net/virtio: fix Tx completed mbuf leak on device stop
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9de76dfb929807f6fbf0b7ceec4bc8274221ddde ]

Free Tx completed mbufs on device stop. Not completed Tx mbufs cannot be
freed since they are still in use.

Fixes: c1f86306a026 ("virtio: add new driver")

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_ethdev.c | 31 ++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 7bbd483952..ed20b1427e 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2590,6 +2590,35 @@ static void virtio_dev_free_mbufs(struct rte_eth_dev *dev)
 	PMD_INIT_LOG(DEBUG, "%d mbufs freed", mbuf_num);
 }
 
+static void
+virtio_tx_completed_cleanup(struct rte_eth_dev *dev)
+{
+	struct virtio_hw *hw = dev->data->dev_private;
+	struct virtqueue *vq;
+	uint32_t qidx;
+	void (*xmit_cleanup)(struct virtqueue *vq, uint16_t nb_used);
+
+	if (vtpci_packed_queue(hw)) {
+		if (hw->use_vec_tx)
+			xmit_cleanup = &virtio_xmit_cleanup_inorder_packed;
+		else if (vtpci_with_feature(hw, VIRTIO_F_IN_ORDER))
+			xmit_cleanup = &virtio_xmit_cleanup_inorder_packed;
+		else
+			xmit_cleanup = &virtio_xmit_cleanup_normal_packed;
+	} else {
+		if (hw->use_inorder_tx)
+			xmit_cleanup = &virtio_xmit_cleanup_inorder;
+		else
+			xmit_cleanup = &virtio_xmit_cleanup;
+	}
+
+	for (qidx = 0; qidx < hw->max_queue_pairs; qidx++) {
+		vq = hw->vqs[2 * qidx + VTNET_SQ_TQ_QUEUE_IDX];
+		if (vq != NULL)
+			xmit_cleanup(vq, virtqueue_nused(vq));
+	}
+}
+
 /*
  * Stop device: disable interrupt and mark link down
  */
@@ -2608,6 +2637,8 @@ virtio_dev_stop(struct rte_eth_dev *dev)
 		goto out_unlock;
 	hw->started = false;
 
+	virtio_tx_completed_cleanup(dev);
+
 	if (intr_conf->lsc || intr_conf->rxq) {
 		virtio_intr_disable(dev);
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.032792987 +0800
+++ 0090-net-virtio-fix-Tx-completed-mbuf-leak-on-device-stop.patch	2021-11-10 14:17:01.847412948 +0800
@@ -1 +1 @@
-From 9de76dfb929807f6fbf0b7ceec4bc8274221ddde Mon Sep 17 00:00:00 2001
+From 758eb05f2b576e4bd2267dca6b3142247f98d963 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9de76dfb929807f6fbf0b7ceec4bc8274221ddde ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index da1633d77e..3e3b42eaf6 100644
+index 7bbd483952..ed20b1427e 100644
@@ -23 +25 @@
-@@ -2401,6 +2401,35 @@ static void virtio_dev_free_mbufs(struct rte_eth_dev *dev)
+@@ -2590,6 +2590,35 @@ static void virtio_dev_free_mbufs(struct rte_eth_dev *dev)
@@ -32 +34 @@
-+	int qidx;
++	uint32_t qidx;
@@ -35 +37 @@
-+	if (virtio_with_packed_queue(hw)) {
++	if (vtpci_packed_queue(hw)) {
@@ -38 +40 @@
-+		else if (virtio_with_feature(hw, VIRTIO_F_IN_ORDER))
++		else if (vtpci_with_feature(hw, VIRTIO_F_IN_ORDER))
@@ -59 +61 @@
-@@ -2419,6 +2448,8 @@ virtio_dev_stop(struct rte_eth_dev *dev)
+@@ -2608,6 +2637,8 @@ virtio_dev_stop(struct rte_eth_dev *dev)
@@ -61 +63 @@
- 	hw->started = 0;
+ 	hw->started = false;

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

* [dpdk-stable] patch 'net/virtio: do not use PMD log type' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (89 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/virtio: fix Tx completed mbuf leak on device stop' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/iavf: fix high CPU usage on frequent command' " Xueming Li
                   ` (161 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 49a2b0ca693e364b05ab14d500382f0edb609719 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 16 Sep 2021 15:25:02 +0200
Subject: [PATCH] net/virtio: do not use PMD log type
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit db48aaa2340047e6fbadbe0db9a76ff712e86ec4 ]

Fixes: 1982462eadea ("net/virtio: add Rx free threshold setting")

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

diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 7fb41f12af..bb7f3a36d4 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -695,16 +695,16 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
 			RTE_MIN(vq->vq_nentries / 4, DEFAULT_RX_FREE_THRESH);
 
 	if (rx_free_thresh & 0x3) {
-		RTE_LOG(ERR, PMD, "rx_free_thresh must be multiples of four."
-			" (rx_free_thresh=%u port=%u queue=%u)\n",
+		PMD_INIT_LOG(ERR, "rx_free_thresh must be multiples of four."
+			" (rx_free_thresh=%u port=%u queue=%u)",
 			rx_free_thresh, dev->data->port_id, queue_idx);
 		return -EINVAL;
 	}
 
 	if (rx_free_thresh >= vq->vq_nentries) {
-		RTE_LOG(ERR, PMD, "rx_free_thresh must be less than the "
+		PMD_INIT_LOG(ERR, "rx_free_thresh must be less than the "
 			"number of RX entries (%u)."
-			" (rx_free_thresh=%u port=%u queue=%u)\n",
+			" (rx_free_thresh=%u port=%u queue=%u)",
 			vq->vq_nentries,
 			rx_free_thresh, dev->data->port_id, queue_idx);
 		return -EINVAL;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.076203488 +0800
+++ 0091-net-virtio-do-not-use-PMD-log-type.patch	2021-11-10 14:17:01.850746254 +0800
@@ -1 +1 @@
-From db48aaa2340047e6fbadbe0db9a76ff712e86ec4 Mon Sep 17 00:00:00 2001
+From 49a2b0ca693e364b05ab14d500382f0edb609719 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit db48aaa2340047e6fbadbe0db9a76ff712e86ec4 ]
@@ -7 +9,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
-index 501ca1582d..b9d7c8d18f 100644
+index 7fb41f12af..bb7f3a36d4 100644
@@ -19 +21 @@
-@@ -690,16 +690,16 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -695,16 +695,16 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/iavf: fix high CPU usage on frequent command' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (90 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/virtio: do not use PMD log type' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/ice: fix double free ACL flow entry' " Xueming Li
                   ` (160 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1900a185181403d1c08a72ef25cd80ea97df139c Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Sat, 11 Sep 2021 12:02:21 +0800
Subject: [PATCH] net/iavf: fix high CPU usage on frequent command
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit de5bef335eeac3a0b1e29eb2c5fabbcadb9549eb ]

There is currently a scenario test, which will continuously obtain port
statistics, causing the CPU usage to soar, which does not meet the
demand. After positioning analysis, it is found that the VF and PF
command interaction is completed through the iavf_execute_vf_cmd
function.
After the message is sent, it needs to wait for the interrupt thread to
obtain the response from the PF. For the data, the rte_delay_ms
interface is used here to wait, but the CPU will not be released during
the waiting period of this interface, which will cause the statistics to
keep occupying the CPU. This is also the root cause of the soaring CPU.

The command interaction should belong to the control plane, and there
will not be too high requirements for performance. It is recommended to
wait for the interface iavf_msec_delay to complete without taking up the
CPU time.

Fixes: 22b123a36d07 ("net/avf: initialize PMD")

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_vchnl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 1021108ff5..00f868b3c7 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -180,7 +180,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
 						   args->out_buffer);
 			if (result == IAVF_MSG_CMD)
 				break;
-			rte_delay_ms(ASQ_DELAY_MS);
+			iavf_msec_delay(ASQ_DELAY_MS);
 		} while (i++ < MAX_TRY_TIMES);
 		if (i >= MAX_TRY_TIMES ||
 		    vf->cmd_retval != VIRTCHNL_STATUS_SUCCESS) {
@@ -206,7 +206,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
 				err = -1;
 				break;
 			}
-			rte_delay_ms(ASQ_DELAY_MS);
+			iavf_msec_delay(ASQ_DELAY_MS);
 			/* If don't read msg or read sys event, continue */
 		} while (i++ < MAX_TRY_TIMES);
 		if (i >= MAX_TRY_TIMES ||
@@ -224,7 +224,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
 		do {
 			if (vf->pend_cmd == VIRTCHNL_OP_UNKNOWN)
 				break;
-			rte_delay_ms(ASQ_DELAY_MS);
+			iavf_msec_delay(ASQ_DELAY_MS);
 			/* If don't read msg or read sys event, continue */
 		} while (i++ < MAX_TRY_TIMES);
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.117468053 +0800
+++ 0092-net-iavf-fix-high-CPU-usage-on-frequent-command.patch	2021-11-10 14:17:01.850746254 +0800
@@ -1 +1 @@
-From de5bef335eeac3a0b1e29eb2c5fabbcadb9549eb Mon Sep 17 00:00:00 2001
+From 1900a185181403d1c08a72ef25cd80ea97df139c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit de5bef335eeac3a0b1e29eb2c5fabbcadb9549eb ]
@@ -23 +25,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index 050e5f7232..3275687927 100644
+index 1021108ff5..00f868b3c7 100644
@@ -35 +37 @@
-@@ -182,7 +182,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
+@@ -180,7 +180,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
@@ -44 +46 @@
-@@ -208,7 +208,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
+@@ -206,7 +206,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
@@ -53 +55 @@
-@@ -226,7 +226,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
+@@ -224,7 +224,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)

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

* [dpdk-stable] patch 'net/ice: fix double free ACL flow entry' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (91 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/iavf: fix high CPU usage on frequent command' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/iavf: fix Rx queue IRQ resource leak' " Xueming Li
                   ` (159 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Luca Boccassi, Simei Su, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cd90c7a5b2ed9bb585579e387b6832c219ccb1da Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Fri, 3 Sep 2021 18:04:11 +0800
Subject: [PATCH] net/ice: fix double free ACL flow entry
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e360df56477a0b5963a743d82f399efd468ec10c ]

If call ice_flow_rem_entry() directly without checking entry_id, may
cause an ACL flow entry to be freed more than once.

This patch tries to find entry_id first, then call ice_flow_rem_entry()
to avoid the defect.

Fixes: 40d466fa9f76 ("net/ice: support ACL filter in DCF")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Reviewed-by: Simei Su <simei.su@intel.com>
---
 drivers/net/ice/ice_acl_filter.c | 33 +++++++++++++++++++++-----------
 1 file changed, 22 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ice/ice_acl_filter.c b/drivers/net/ice/ice_acl_filter.c
index 95b235e470..7e44751d64 100644
--- a/drivers/net/ice/ice_acl_filter.c
+++ b/drivers/net/ice/ice_acl_filter.c
@@ -45,7 +45,7 @@ static struct ice_flow_parser ice_acl_parser;
 
 struct acl_rule {
 	enum ice_fltr_ptype flow_type;
-	uint32_t entry_id[4];
+	uint64_t entry_id[4];
 };
 
 static struct
@@ -440,7 +440,7 @@ ice_acl_hw_set_conf(struct ice_pf *pf, struct ice_fdir_fltr *input,
 			PMD_DRV_LOG(ERR, "Fail to add entry.");
 			return ret;
 		}
-		rule->entry_id[entry_idx] = slot_id;
+		rule->entry_id[entry_idx] = entry_id;
 		pf->acl.hw_entry_id[slot_id] = hw_entry;
 	} else {
 		PMD_DRV_LOG(ERR, "Exceed the maximum entry number(%d)"
@@ -451,18 +451,28 @@ ice_acl_hw_set_conf(struct ice_pf *pf, struct ice_fdir_fltr *input,
 	return 0;
 }
 
+static inline void
+ice_acl_del_entry(struct ice_hw *hw, uint64_t entry_id)
+{
+	uint64_t hw_entry;
+
+	hw_entry = ice_flow_find_entry(hw, ICE_BLK_ACL, entry_id);
+	ice_flow_rem_entry(hw, ICE_BLK_ACL, hw_entry);
+}
+
 static inline void
 ice_acl_hw_rem_conf(struct ice_pf *pf, struct acl_rule *rule, int32_t entry_idx)
 {
 	uint32_t slot_id;
 	int32_t i;
+	uint64_t entry_id;
 	struct ice_hw *hw = ICE_PF_TO_HW(pf);
 
 	for (i = 0; i < entry_idx; i++) {
-		slot_id = rule->entry_id[i];
+		entry_id = rule->entry_id[i];
+		slot_id = ICE_LO_DWORD(entry_id);
 		rte_bitmap_set(pf->acl.slots, slot_id);
-		ice_flow_rem_entry(hw, ICE_BLK_ACL,
-				   pf->acl.hw_entry_id[slot_id]);
+		ice_acl_del_entry(hw, entry_id);
 	}
 }
 
@@ -562,6 +572,7 @@ ice_acl_destroy_filter(struct ice_adapter *ad,
 {
 	struct acl_rule *rule = (struct acl_rule *)flow->rule;
 	uint32_t slot_id, i;
+	uint64_t entry_id;
 	struct ice_pf *pf = &ad->pf;
 	struct ice_hw *hw = ICE_PF_TO_HW(pf);
 	int ret = 0;
@@ -569,19 +580,19 @@ ice_acl_destroy_filter(struct ice_adapter *ad,
 	switch (rule->flow_type) {
 	case ICE_FLTR_PTYPE_NONF_IPV4_OTHER:
 		for (i = 0; i < 4; i++) {
-			slot_id = rule->entry_id[i];
+			entry_id = rule->entry_id[i];
+			slot_id = ICE_LO_DWORD(entry_id);
 			rte_bitmap_set(pf->acl.slots, slot_id);
-			ice_flow_rem_entry(hw, ICE_BLK_ACL,
-					   pf->acl.hw_entry_id[slot_id]);
+			ice_acl_del_entry(hw, entry_id);
 		}
 		break;
 	case ICE_FLTR_PTYPE_NONF_IPV4_UDP:
 	case ICE_FLTR_PTYPE_NONF_IPV4_TCP:
 	case ICE_FLTR_PTYPE_NONF_IPV4_SCTP:
-		slot_id = rule->entry_id[0];
+		entry_id = rule->entry_id[0];
+		slot_id = ICE_LO_DWORD(entry_id);
 		rte_bitmap_set(pf->acl.slots, slot_id);
-		ice_flow_rem_entry(hw, ICE_BLK_ACL,
-				   pf->acl.hw_entry_id[slot_id]);
+		ice_acl_del_entry(hw, entry_id);
 		break;
 	default:
 		rte_flow_error_set(error, EINVAL,
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.158587552 +0800
+++ 0093-net-ice-fix-double-free-ACL-flow-entry.patch	2021-11-10 14:17:01.850746254 +0800
@@ -1 +1 @@
-From e360df56477a0b5963a743d82f399efd468ec10c Mon Sep 17 00:00:00 2001
+From cd90c7a5b2ed9bb585579e387b6832c219ccb1da Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e360df56477a0b5963a743d82f399efd468ec10c ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 614bd44e23..8fe6f5aeb0 100644
+index 95b235e470..7e44751d64 100644

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

* [dpdk-stable] patch 'net/iavf: fix Rx queue IRQ resource leak' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (92 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/ice: fix double free ACL flow entry' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'common/iavf: fix ARQ " Xueming Li
                   ` (158 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From eca9795521b483007ed13c06affb580921cbab09 Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Fri, 10 Sep 2021 14:54:57 +0800
Subject: [PATCH] net/iavf: fix Rx queue IRQ resource leak
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ad5629de9a7ba367886c6619a1eeb56c36fd2748 ]

In the iavf_config_rx_queues_irqs function, the memory pointed to by the
intr_handle->intr_vec and qv_map addresses is not released in the
subsequent hook branch, resulting in resource leakage.

Fixes: f593944fc988 ("net/iavf: enable IRQ mapping configuration for large VF")

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 885b2a4bd0..6bc3108631 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -509,7 +509,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 	if (!qv_map) {
 		PMD_DRV_LOG(ERR, "Failed to allocate %d queue-vector map",
 				dev->data->nb_rx_queues);
-		return -1;
+		goto qv_map_alloc_err;
 	}
 
 	if (!dev->data->dev_conf.intr_conf.rxq ||
@@ -594,7 +594,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 	if (!vf->lv_enabled) {
 		if (iavf_config_irq_map(adapter)) {
 			PMD_DRV_LOG(ERR, "config interrupt mapping failed");
-			return -1;
+			goto config_irq_map_err;
 		}
 	} else {
 		uint16_t num_qv_maps = dev->data->nb_rx_queues;
@@ -604,7 +604,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 			if (iavf_config_irq_map_lv(adapter,
 					IAVF_IRQ_MAP_NUM_PER_BUF, index)) {
 				PMD_DRV_LOG(ERR, "config interrupt mapping for large VF failed");
-				return -1;
+				goto config_irq_map_err;
 			}
 			num_qv_maps -= IAVF_IRQ_MAP_NUM_PER_BUF;
 			index += IAVF_IRQ_MAP_NUM_PER_BUF;
@@ -612,10 +612,20 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 
 		if (iavf_config_irq_map_lv(adapter, num_qv_maps, index)) {
 			PMD_DRV_LOG(ERR, "config interrupt mapping for large VF failed");
-			return -1;
+			goto config_irq_map_err;
 		}
 	}
 	return 0;
+
+config_irq_map_err:
+	rte_free(vf->qv_map);
+	vf->qv_map = NULL;
+
+qv_map_alloc_err:
+	rte_free(intr_handle->intr_vec);
+	intr_handle->intr_vec = NULL;
+
+	return -1;
 }
 
 static int
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.199417331 +0800
+++ 0094-net-iavf-fix-Rx-queue-IRQ-resource-leak.patch	2021-11-10 14:17:01.850746254 +0800
@@ -1 +1 @@
-From ad5629de9a7ba367886c6619a1eeb56c36fd2748 Mon Sep 17 00:00:00 2001
+From eca9795521b483007ed13c06affb580921cbab09 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ad5629de9a7ba367886c6619a1eeb56c36fd2748 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index c004e72486..5a5a7f59e1 100644
+index 885b2a4bd0..6bc3108631 100644
@@ -23 +25 @@
-@@ -676,7 +676,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
+@@ -509,7 +509,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
@@ -32 +34 @@
-@@ -761,7 +761,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
+@@ -594,7 +594,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
@@ -41 +43 @@
-@@ -771,7 +771,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
+@@ -604,7 +604,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
@@ -50 +52 @@
-@@ -779,10 +779,20 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
+@@ -612,10 +612,20 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'common/iavf: fix ARQ resource leak' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (93 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/iavf: fix Rx queue IRQ resource leak' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/ice: retry getting VF VSI map after failure' " Xueming Li
                   ` (157 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Qiming Chen; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 90d7fd5b10ec48ae9cb0397d34043ce198c110f1 Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Fri, 10 Sep 2021 11:12:49 +0800
Subject: [PATCH] common/iavf: fix ARQ resource leak
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 395d41fbb1dd2faa21e143865ce12c195ec8194b ]

In the iavf_init_arq function, if an exception occurs in the
iavf_config_arq_regs function, and the previously applied ARQ (Admin
Receive Queue) bufs resource is released. This patch maintains the same
modification as the iavf_init_asq function to roll back resources.

Fixes: 87aca6d8d8a4 ("net/iavf/base: fix command buffer memory leak")

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/common/iavf/iavf_adminq.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/common/iavf/iavf_adminq.c b/drivers/common/iavf/iavf_adminq.c
index 8bae51a46a..8d03de0553 100644
--- a/drivers/common/iavf/iavf_adminq.c
+++ b/drivers/common/iavf/iavf_adminq.c
@@ -417,7 +417,7 @@ enum iavf_status iavf_init_arq(struct iavf_hw *hw)
 	/* initialize base registers */
 	ret_code = iavf_config_arq_regs(hw);
 	if (ret_code != IAVF_SUCCESS)
-		goto init_adminq_free_rings;
+		goto init_config_regs;
 
 	/* success! */
 	hw->aq.arq.count = hw->aq.num_arq_entries;
@@ -425,6 +425,10 @@ enum iavf_status iavf_init_arq(struct iavf_hw *hw)
 
 init_adminq_free_rings:
 	iavf_free_adminq_arq(hw);
+	return ret_code;
+
+init_config_regs:
+	iavf_free_arq_bufs(hw);
 
 init_adminq_exit:
 	return ret_code;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.242456542 +0800
+++ 0095-common-iavf-fix-ARQ-resource-leak.patch	2021-11-10 14:17:01.850746254 +0800
@@ -1 +1 @@
-From 395d41fbb1dd2faa21e143865ce12c195ec8194b Mon Sep 17 00:00:00 2001
+From 90d7fd5b10ec48ae9cb0397d34043ce198c110f1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 395d41fbb1dd2faa21e143865ce12c195ec8194b ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 0bf5af0cbe..9c36e8908e 100644
+index 8bae51a46a..8d03de0553 100644

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

* [dpdk-stable] patch 'net/ice: retry getting VF VSI map after failure' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (94 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'common/iavf: fix ARQ " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/bnxt: fix function driver register/unregister' " Xueming Li
                   ` (156 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c9eddf61f5d527436bb08c406bc7a29cddd00b25 Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Fri, 24 Sep 2021 16:08:20 +0800
Subject: [PATCH] net/ice: retry getting VF VSI map after failure
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b71573ec2fc239e814a3f329a7c88f4067e91eae ]

The request of getting VF VSI map request may fail when DCF is busy,
this patch adds retry mechanism to make it able to succeed.

Fixes: b09d34ac8584 ("net/ice: fix flow redirector")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ice/ice_dcf.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 6a24f4f36c..e371b3dc67 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -529,15 +529,26 @@ int
 ice_dcf_handle_vsi_update_event(struct ice_dcf_hw *hw)
 {
 	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(hw->eth_dev);
-	int err = 0;
+	int i = 0;
+	int err = -1;
 
 	rte_spinlock_lock(&hw->vc_cmd_send_lock);
 
 	rte_intr_disable(&pci_dev->intr_handle);
 	ice_dcf_disable_irq0(hw);
 
-	if (ice_dcf_get_vf_resource(hw) || ice_dcf_get_vf_vsi_map(hw) < 0)
-		err = -1;
+	for (;;) {
+		if (ice_dcf_get_vf_resource(hw) == 0 &&
+		    ice_dcf_get_vf_vsi_map(hw) >= 0) {
+			err = 0;
+			break;
+		}
+
+		if (++i >= ICE_DCF_ARQ_MAX_RETRIES)
+			break;
+
+		rte_delay_ms(ICE_DCF_ARQ_CHECK_TIME);
+	}
 
 	rte_intr_enable(&pci_dev->intr_handle);
 	ice_dcf_enable_irq0(hw);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.285199445 +0800
+++ 0096-net-ice-retry-getting-VF-VSI-map-after-failure.patch	2021-11-10 14:17:01.850746254 +0800
@@ -1 +1 @@
-From b71573ec2fc239e814a3f329a7c88f4067e91eae Mon Sep 17 00:00:00 2001
+From c9eddf61f5d527436bb08c406bc7a29cddd00b25 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b71573ec2fc239e814a3f329a7c88f4067e91eae ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 38e9a84698..c9c01a14e3 100644
+index 6a24f4f36c..e371b3dc67 100644
@@ -22 +24 @@
-@@ -534,15 +534,26 @@ int
+@@ -529,15 +529,26 @@ int

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

* [dpdk-stable] patch 'net/bnxt: fix function driver register/unregister' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (95 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/ice: retry getting VF VSI map after failure' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/bnxt: fix Tx queue startup state' " Xueming Li
                   ` (155 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Kalesh AP
  Cc: Luca Boccassi, Ajit Khaparde, Lance Richardson, Somnath Kotur,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ea39d70a5080365fd746c61532bdedc6599e0d94 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 22 Sep 2021 14:00:44 +0530
Subject: [PATCH] net/bnxt: fix function driver register/unregister
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 61ad5c1ac9de245e7d20a67375d56682c70bebde ]

1. Fix to use correct fields in the request structure of
   HWRM_FUNC_DRV_RGTR.
2. Remove the "flags" argument to bnxt_hwrm_func_driver_unregister()
   as it is not needed.

Fixes: beb3087f5056 ("net/bnxt: add driver register/unregister")

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

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index a563c2275f..3c0ab629c3 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -5792,7 +5792,7 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
 		bp->pf->vf_req_buf = NULL;
 	}
 
-	rc = bnxt_hwrm_func_driver_unregister(bp, 0);
+	rc = bnxt_hwrm_func_driver_unregister(bp);
 	bp->flags &= ~BNXT_FLAG_REGISTERED;
 	bnxt_free_ctx_mem(bp);
 	if (!reconfig_dev) {
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 50b41d82d3..a3800cf6b1 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -941,9 +941,9 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp)
 	HWRM_PREP(&req, HWRM_FUNC_DRV_RGTR, BNXT_USE_CHIMP_MB);
 	req.enables = rte_cpu_to_le_32(HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_VER |
 			HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_ASYNC_EVENT_FWD);
-	req.ver_maj = RTE_VER_YEAR;
-	req.ver_min = RTE_VER_MONTH;
-	req.ver_upd = RTE_VER_MINOR;
+	req.ver_maj_8b = RTE_VER_YEAR;
+	req.ver_min_8b = RTE_VER_MONTH;
+	req.ver_upd_8b = RTE_VER_MINOR;
 
 	if (BNXT_PF(bp)) {
 		req.enables |= rte_cpu_to_le_32(
@@ -1240,7 +1240,7 @@ error:
 	return rc;
 }
 
-int bnxt_hwrm_func_driver_unregister(struct bnxt *bp, uint32_t flags)
+int bnxt_hwrm_func_driver_unregister(struct bnxt *bp)
 {
 	int rc;
 	struct hwrm_func_drv_unrgtr_input req = {.req_type = 0 };
@@ -1250,7 +1250,6 @@ int bnxt_hwrm_func_driver_unregister(struct bnxt *bp, uint32_t flags)
 		return 0;
 
 	HWRM_PREP(&req, HWRM_FUNC_DRV_UNRGTR, BNXT_USE_CHIMP_MB);
-	req.flags = flags;
 
 	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
 
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 82010e675b..934a2056b8 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -141,7 +141,7 @@ int bnxt_hwrm_func_buf_unrgtr(struct bnxt *bp);
 int bnxt_hwrm_func_driver_register(struct bnxt *bp);
 int bnxt_hwrm_func_qcaps(struct bnxt *bp);
 int bnxt_hwrm_func_reset(struct bnxt *bp);
-int bnxt_hwrm_func_driver_unregister(struct bnxt *bp, uint32_t flags);
+int bnxt_hwrm_func_driver_unregister(struct bnxt *bp);
 int bnxt_hwrm_func_qstats(struct bnxt *bp, uint16_t fid,
 			  struct rte_eth_stats *stats,
 			  struct hwrm_func_qstats_output *func_qstats);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.327175471 +0800
+++ 0097-net-bnxt-fix-function-driver-register-unregister.patch	2021-11-10 14:17:01.857412867 +0800
@@ -1 +1 @@
-From 61ad5c1ac9de245e7d20a67375d56682c70bebde Mon Sep 17 00:00:00 2001
+From ea39d70a5080365fd746c61532bdedc6599e0d94 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 61ad5c1ac9de245e7d20a67375d56682c70bebde ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 097dd10de9..dc7dee1d2a 100644
+index a563c2275f..3c0ab629c3 100644
@@ -28 +30 @@
-@@ -6156,7 +6156,7 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
+@@ -5792,7 +5792,7 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
@@ -38 +40 @@
-index 585cdeded8..d4d8581af1 100644
+index 50b41d82d3..a3800cf6b1 100644
@@ -41 +43 @@
-@@ -1059,9 +1059,9 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp)
+@@ -941,9 +941,9 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp)
@@ -54 +56 @@
-@@ -1370,7 +1370,7 @@ error:
+@@ -1240,7 +1240,7 @@ error:
@@ -63 +65 @@
-@@ -1380,7 +1380,6 @@ int bnxt_hwrm_func_driver_unregister(struct bnxt *bp, uint32_t flags)
+@@ -1250,7 +1250,6 @@ int bnxt_hwrm_func_driver_unregister(struct bnxt *bp, uint32_t flags)
@@ -72 +74 @@
-index b311ff59c0..6dc23b93ac 100644
+index 82010e675b..934a2056b8 100644
@@ -75 +77 @@
-@@ -145,7 +145,7 @@ int bnxt_hwrm_func_buf_unrgtr(struct bnxt *bp);
+@@ -141,7 +141,7 @@ int bnxt_hwrm_func_buf_unrgtr(struct bnxt *bp);

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

* [dpdk-stable] patch 'net/bnxt: fix Tx queue startup state' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (96 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/bnxt: fix function driver register/unregister' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/bnxt: fix memzone free for Tx and Rx rings' " Xueming Li
                   ` (154 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Luca Boccassi, Lance Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f1c89a7eddcb815390761140a83539bb91a4ae72 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Fri, 17 Sep 2021 13:20:45 -0700
Subject: [PATCH] net/bnxt: fix Tx queue startup state
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0f22fe124bffcbfa15a8179b9cc835ae64b1a3fe ]

Default queue state of Tx queues on startup is not correct.
Fix this by setting the state when the port is started.

Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 10 ++++++++++
 drivers/net/bnxt/bnxt_txq.c    |  5 -----
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 3c0ab629c3..55034bccb5 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -805,6 +805,16 @@ skip_cosq_cfg:
 			goto err_out;
 	}
 
+	for (j = 0; j < bp->tx_nr_rings; j++) {
+		struct bnxt_tx_queue *txq = bp->tx_queues[j];
+
+		if (!txq->tx_deferred_start) {
+			bp->eth_dev->data->tx_queue_state[j] =
+				RTE_ETH_QUEUE_STATE_STARTED;
+			txq->tx_started = true;
+		}
+	}
+
 	rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, &bp->vnic_info[0], 0, NULL);
 	if (rc) {
 		PMD_DRV_LOG(ERR,
diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index 795056e457..6c5e6948a7 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -164,11 +164,6 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
 
 	eth_dev->data->tx_queues[queue_idx] = txq;
 
-	if (txq->tx_deferred_start)
-		txq->tx_started = false;
-	else
-		txq->tx_started = true;
-
 	return 0;
 err:
 	bnxt_tx_queue_release_op(txq);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.372807544 +0800
+++ 0098-net-bnxt-fix-Tx-queue-startup-state.patch	2021-11-10 14:17:01.860746172 +0800
@@ -1 +1 @@
-From 0f22fe124bffcbfa15a8179b9cc835ae64b1a3fe Mon Sep 17 00:00:00 2001
+From f1c89a7eddcb815390761140a83539bb91a4ae72 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0f22fe124bffcbfa15a8179b9cc835ae64b1a3fe ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index dc7dee1d2a..08537d8b87 100644
+index 3c0ab629c3..55034bccb5 100644
@@ -23,2 +25,2 @@
-@@ -814,6 +814,16 @@ skip_cosq_cfg:
- 		}
+@@ -805,6 +805,16 @@ skip_cosq_cfg:
+ 			goto err_out;
@@ -41 +43 @@
-index 830416af3d..3ffc334cff 100644
+index 795056e457..6c5e6948a7 100644
@@ -44 +46 @@
-@@ -166,11 +166,6 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -164,11 +164,6 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,

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

* [dpdk-stable] patch 'net/bnxt: fix memzone free for Tx and Rx rings' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (97 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/bnxt: fix Tx queue startup state' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/bnxt: fix tunnel port accounting' " Xueming Li
                   ` (153 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Luca Boccassi, Lance Richardson, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5b3f9bec58acdcb8b2bcd194ba529019f81cf811 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Mon, 20 Sep 2021 16:11:51 -0700
Subject: [PATCH] net/bnxt: fix memzone free for Tx and Rx rings
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 64a4d59df5d668e18762a80d360a1aa8a9e8d81d ]

The device cleanup logic was freeing most of the ring related memory,
but was not freeing up the memzone associated with the rings.
This patch fixes the issue.

Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code")
Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 3 +++
 drivers/net/bnxt/bnxt_txr.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 6b3603d11f..c1893bb940 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -1134,6 +1134,9 @@ void bnxt_free_rx_rings(struct bnxt *bp)
 		rte_free(rxq->cp_ring->cp_ring_struct);
 		rte_free(rxq->cp_ring);
 
+		rte_memzone_free(rxq->mz);
+		rxq->mz = NULL;
+
 		rte_free(rxq);
 		bp->rx_queues[i] = NULL;
 	}
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index ad78fa1bea..78d7329f2b 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -37,6 +37,9 @@ void bnxt_free_tx_rings(struct bnxt *bp)
 		rte_free(txq->cp_ring->cp_ring_struct);
 		rte_free(txq->cp_ring);
 
+		rte_memzone_free(txq->mz);
+		txq->mz = NULL;
+
 		rte_free(txq);
 		bp->tx_queues[i] = NULL;
 	}
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.415107018 +0800
+++ 0099-net-bnxt-fix-memzone-free-for-Tx-and-Rx-rings.patch	2021-11-10 14:17:01.860746172 +0800
@@ -1 +1 @@
-From 64a4d59df5d668e18762a80d360a1aa8a9e8d81d Mon Sep 17 00:00:00 2001
+From 5b3f9bec58acdcb8b2bcd194ba529019f81cf811 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 64a4d59df5d668e18762a80d360a1aa8a9e8d81d ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index a40fa50138..4c1ee4294e 100644
+index 6b3603d11f..c1893bb940 100644
@@ -26 +28 @@
-@@ -1207,6 +1207,9 @@ void bnxt_free_rx_rings(struct bnxt *bp)
+@@ -1134,6 +1134,9 @@ void bnxt_free_rx_rings(struct bnxt *bp)
@@ -37 +39 @@
-index 47824334ae..9e45ddd7a8 100644
+index ad78fa1bea..78d7329f2b 100644
@@ -40 +42 @@
-@@ -38,6 +38,9 @@ void bnxt_free_tx_rings(struct bnxt *bp)
+@@ -37,6 +37,9 @@ void bnxt_free_tx_rings(struct bnxt *bp)

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

* [dpdk-stable] patch 'net/bnxt: fix tunnel port accounting' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (98 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/bnxt: fix memzone free for Tx and Rx rings' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/mlx5: fix flow tables double release' " Xueming Li
                   ` (152 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Luca Boccassi, Lance Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 95cf6a360f53518035593218892362d7d3c402cd Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Fri, 24 Sep 2021 12:52:47 -0700
Subject: [PATCH] net/bnxt: fix tunnel port accounting
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3cb6659137feb7f3ce411c3e9b4cedf30ebdebe3 ]

Fix the tunnel port counting logic.
Currently we are incrementing the port count without checking
the if bnxt_hwrm_tunnel_dst_port_alloc would return success or failure.
Modify the logic to increment it only if the firmware returns success.

Fixes: 10d074b2022d ("net/bnxt: support tunneling")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 55034bccb5..e67e83ea7a 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2286,7 +2286,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
 		}
 		tunnel_type =
 			HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN;
-		bp->vxlan_port_cnt++;
 		break;
 	case RTE_TUNNEL_TYPE_GENEVE:
 		if (bp->geneve_port_cnt) {
@@ -2301,7 +2300,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
 		}
 		tunnel_type =
 			HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GENEVE;
-		bp->geneve_port_cnt++;
 		break;
 	default:
 		PMD_DRV_LOG(ERR, "Tunnel type is not supported\n");
@@ -2309,6 +2307,18 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
 	}
 	rc = bnxt_hwrm_tunnel_dst_port_alloc(bp, udp_tunnel->udp_port,
 					     tunnel_type);
+
+	if (rc != 0)
+		return rc;
+
+	if (tunnel_type ==
+	    HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN)
+		bp->vxlan_port_cnt++;
+
+	if (tunnel_type ==
+	    HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GENEVE)
+		bp->geneve_port_cnt++;
+
 	return rc;
 }
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.455855459 +0800
+++ 0100-net-bnxt-fix-tunnel-port-accounting.patch	2021-11-10 14:17:01.860746172 +0800
@@ -1 +1 @@
-From 3cb6659137feb7f3ce411c3e9b4cedf30ebdebe3 Mon Sep 17 00:00:00 2001
+From 95cf6a360f53518035593218892362d7d3c402cd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3cb6659137feb7f3ce411c3e9b4cedf30ebdebe3 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 857da91c9d..aa7e7fdc85 100644
+index 55034bccb5..e67e83ea7a 100644
@@ -24 +26 @@
-@@ -2369,7 +2369,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
+@@ -2286,7 +2286,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
@@ -32 +34 @@
-@@ -2384,7 +2383,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
+@@ -2301,7 +2300,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
@@ -40 +42 @@
-@@ -2392,6 +2390,18 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
+@@ -2309,6 +2307,18 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,

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

* [dpdk-stable] patch 'net/mlx5: fix flow tables double release' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (99 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/bnxt: fix tunnel port accounting' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'bus/vmbus: fix leak on device scan' " Xueming Li
                   ` (151 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3df90648847edefb376cc3cd8fcafd37d3c1d943 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Tue, 28 Sep 2021 07:08:51 +0300
Subject: [PATCH] net/mlx5: fix flow tables double release
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a6b57ff48708e659ad35aed499c32805de85d3cd ]

In the function mlx5_alloc_shared_dr(), there are various reasons
to result in a failure and error clean up process. While in the
caller of mlx5_dev_spawn(), once there is a error occurring after
the mlx5_alloc_shared_dr(), the mlx5_os_free_shared_dr() is called
to release all the resources.

To prevent a double release, the pointers of the resources should
be checked before the releasing and set to NULL after done.

In the mlx5_free_table_hash_list(), after the releasing, the pointer
was missed to set to NULL and a double release may cause a crash.

By setting the tables pointer to NULL as done for other resources,
the double release and crash could be solved.

Fixes: 54534725d2f3 ("net/mlx5: fix flow table hash list conversion")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index cb984debcc..48588d4cd5 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1130,6 +1130,7 @@ mlx5_free_table_hash_list(struct mlx5_priv *priv)
 	if (!sh->flow_tbls)
 		return;
 	mlx5_hlist_destroy(sh->flow_tbls);
+	sh->flow_tbls = NULL;
 }
 
 /**
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.499231911 +0800
+++ 0101-net-mlx5-fix-flow-tables-double-release.patch	2021-11-10 14:17:01.864079479 +0800
@@ -1 +1 @@
-From a6b57ff48708e659ad35aed499c32805de85d3cd Mon Sep 17 00:00:00 2001
+From 3df90648847edefb376cc3cd8fcafd37d3c1d943 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a6b57ff48708e659ad35aed499c32805de85d3cd ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -31 +33 @@
-index aa428366b3..45ccfe2784 100644
+index cb984debcc..48588d4cd5 100644
@@ -34 +36 @@
-@@ -1372,6 +1372,7 @@ mlx5_free_table_hash_list(struct mlx5_priv *priv)
+@@ -1130,6 +1130,7 @@ mlx5_free_table_hash_list(struct mlx5_priv *priv)

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

* [dpdk-stable] patch 'bus/vmbus: fix leak on device scan' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (100 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/mlx5: fix flow tables double release' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'test/latency: fix loop boundary' " Xueming Li
                   ` (150 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Long Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a00d38a2e164c755bfb96192c3da52cc7db4d935 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Sat, 2 Oct 2021 18:24:30 +0200
Subject: [PATCH] bus/vmbus: fix leak on device scan
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c6c865d7e2e47a3a1a65a091103cca056bb073ef ]

Caught running ASAN.
The device name was leaked on scan.
rte_device name field being a const, use a local pointer and release
in error path.

Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Long Li <longli@microsoft.com>
---
 drivers/bus/vmbus/linux/vmbus_bus.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/vmbus/linux/vmbus_bus.c b/drivers/bus/vmbus/linux/vmbus_bus.c
index 3c924eee14..68f6cc5742 100644
--- a/drivers/bus/vmbus/linux/vmbus_bus.c
+++ b/drivers/bus/vmbus/linux/vmbus_bus.c
@@ -236,13 +236,14 @@ vmbus_scan_one(const char *name)
 	char filename[PATH_MAX];
 	char dirname[PATH_MAX];
 	unsigned long tmp;
+	char *dev_name;
 
 	dev = calloc(1, sizeof(*dev));
 	if (dev == NULL)
 		return -1;
 
 	dev->device.bus = &rte_vmbus_bus.bus;
-	dev->device.name = strdup(name);
+	dev->device.name = dev_name = strdup(name);
 	if (!dev->device.name)
 		goto error;
 
@@ -261,6 +262,7 @@ vmbus_scan_one(const char *name)
 
 	/* skip non-network devices */
 	if (rte_uuid_compare(dev->class_id, vmbus_nic_uuid) != 0) {
+		free(dev_name);
 		free(dev);
 		return 0;
 	}
@@ -312,6 +314,7 @@ vmbus_scan_one(const char *name)
 		} else { /* already registered */
 			VMBUS_LOG(NOTICE,
 				"%s already registered", name);
+			free(dev_name);
 			free(dev);
 		}
 		return 0;
@@ -322,6 +325,7 @@ vmbus_scan_one(const char *name)
 error:
 	VMBUS_LOG(DEBUG, "failed");
 
+	free(dev_name);
 	free(dev);
 	return -1;
 }
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.540125205 +0800
+++ 0102-bus-vmbus-fix-leak-on-device-scan.patch	2021-11-10 14:17:01.864079479 +0800
@@ -1 +1 @@
-From c6c865d7e2e47a3a1a65a091103cca056bb073ef Mon Sep 17 00:00:00 2001
+From a00d38a2e164c755bfb96192c3da52cc7db4d935 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c6c865d7e2e47a3a1a65a091103cca056bb073ef ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'test/latency: fix loop boundary' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (101 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'bus/vmbus: fix leak on device scan' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'raw/ifpga/base: fix linking with librt' " Xueming Li
                   ` (149 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Reshma Pattan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1b8fac0312d57d969fec4334f8c18450a338fcb5 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Sat, 2 Oct 2021 18:24:31 +0200
Subject: [PATCH] test/latency: fix loop boundary
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit cb3dd14c77f4a44c204b7ac10898ecc33afeb9a0 ]

Caught running ASAN.

lat_stats_strings[] is an array containing NUM_STATS strings.

Fixes: 1e3676a06e4c ("test/latency: add unit tests for latencystats library")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
---
 app/test/test_latencystats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_latencystats.c b/app/test/test_latencystats.c
index 427339904d..724acbc315 100644
--- a/app/test/test_latencystats.c
+++ b/app/test/test_latencystats.c
@@ -80,7 +80,7 @@ static int test_latencystats_get_names(void)
 	/* Success Test: Valid names and size */
 	size = NUM_STATS;
 	ret = rte_latencystats_get_names(names, size);
-	for (i = 0; i <= NUM_STATS; i++) {
+	for (i = 0; i < NUM_STATS; i++) {
 		if (strcmp(lat_stats_strings[i].name, names[i].name) == 0)
 			printf(" %s\n", names[i].name);
 		else
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.579007732 +0800
+++ 0103-test-latency-fix-loop-boundary.patch	2021-11-10 14:17:01.864079479 +0800
@@ -1 +1 @@
-From cb3dd14c77f4a44c204b7ac10898ecc33afeb9a0 Mon Sep 17 00:00:00 2001
+From 1b8fac0312d57d969fec4334f8c18450a338fcb5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cb3dd14c77f4a44c204b7ac10898ecc33afeb9a0 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'raw/ifpga/base: fix linking with librt' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (102 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'test/latency: fix loop boundary' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'common/dpaax: fix physical address conversion' " Xueming Li
                   ` (148 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Mohamad Noor Alim Hussin
  Cc: Luca Boccassi, Tianfei Zhang, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a7bb99fc8602421e9ba3d527d2640b4e8ed25776 Mon Sep 17 00:00:00 2001
From: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
Date: Tue, 28 Sep 2021 12:36:10 +0800
Subject: [PATCH] raw/ifpga/base: fix linking with librt
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 829c5946b55f569e56df399b94ab51c473f6696e ]

Finding with "librt" keyword would give the output with
full path of librt such as
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/librt.so
instead of -lrt in libdpdk.pc pkg-config file.

Assume find_library() will prepend "lib", thus remove
"lib" from "librt" keyword. The output will shows
as -lrt.

This will cause an issue when compile DPDK app with
static library as the path of librt has been hard-coded
in the libdpdk.pc file.

Fixes: e41856b515ce ("raw/ifpga/base: enhance driver reliability in multi-process")

Signed-off-by: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/raw/ifpga/base/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/raw/ifpga/base/meson.build b/drivers/raw/ifpga/base/meson.build
index da2d6e33ca..949f7f1271 100644
--- a/drivers/raw/ifpga/base/meson.build
+++ b/drivers/raw/ifpga/base/meson.build
@@ -25,7 +25,7 @@ sources = [
 
 rtdep = dependency('librt', required: false)
 if not rtdep.found()
-	rtdep = cc.find_library('librt', required: false)
+	rtdep = cc.find_library('rt', required: false)
 endif
 if not rtdep.found()
 	build = false
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.618084008 +0800
+++ 0104-raw-ifpga-base-fix-linking-with-librt.patch	2021-11-10 14:17:01.864079479 +0800
@@ -1 +1 @@
-From 829c5946b55f569e56df399b94ab51c473f6696e Mon Sep 17 00:00:00 2001
+From a7bb99fc8602421e9ba3d527d2640b4e8ed25776 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 829c5946b55f569e56df399b94ab51c473f6696e ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index db602cee69..2de8e7ea22 100644
+index da2d6e33ca..949f7f1271 100644
@@ -33 +35 @@
-@@ -27,7 +27,7 @@ sources = [
+@@ -25,7 +25,7 @@ sources = [
@@ -37,2 +39,2 @@
--    rtdep = cc.find_library('librt', required: false)
-+    rtdep = cc.find_library('rt', required: false)
+-	rtdep = cc.find_library('librt', required: false)
++	rtdep = cc.find_library('rt', required: false)
@@ -41 +43 @@
-     build = false
+ 	build = false

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

* [dpdk-stable] patch 'common/dpaax: fix physical address conversion' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (103 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'raw/ifpga/base: fix linking with librt' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'ethdev: fix xstats by ID API documentation' " Xueming Li
                   ` (147 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Luca Boccassi, Nipun Gupta, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b4108eb62c345e0caf91e5d31180aef0b8131f06 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 6 Oct 2021 22:31:31 +0530
Subject: [PATCH] common/dpaax: fix physical address conversion
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c5e6bc12a319d4500d931ca84d4227e4d7495956 ]

If some of the VA entries of table are somehow not populated and are
NULL, it can add offset to NULL and return the invalid VA in PA to
VA conversion.

In this patch, adding a check if the VA entry has valid address only
then add offset and return VA.

Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/common/dpaax/dpaax_iova_table.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/common/dpaax/dpaax_iova_table.h b/drivers/common/dpaax/dpaax_iova_table.h
index 230fba8ba0..b1f2300c52 100644
--- a/drivers/common/dpaax/dpaax_iova_table.h
+++ b/drivers/common/dpaax/dpaax_iova_table.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2018 NXP
+ * Copyright 2018-2021 NXP
  */
 
 #ifndef _DPAAX_IOVA_TABLE_H_
@@ -101,6 +101,12 @@ dpaax_iova_table_get_va(phys_addr_t paddr) {
 
 		/* paddr > entry->start && paddr <= entry->(start+len) */
 		index = (paddr_align - entry[i].start)/DPAAX_MEM_SPLIT;
+		/* paddr is within range, but no vaddr entry ever written
+		 * at index
+		 */
+		if ((void *)(uintptr_t)entry[i].pages[index] == NULL)
+			return NULL;
+
 		vaddr = (void *)((uintptr_t)entry[i].pages[index] + offset);
 		break;
 	} while (1);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.656966517 +0800
+++ 0105-common-dpaax-fix-physical-address-conversion.patch	2021-11-10 14:17:01.864079479 +0800
@@ -1 +1 @@
-From c5e6bc12a319d4500d931ca84d4227e4d7495956 Mon Sep 17 00:00:00 2001
+From b4108eb62c345e0caf91e5d31180aef0b8131f06 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c5e6bc12a319d4500d931ca84d4227e4d7495956 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'ethdev: fix xstats by ID API documentation' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (104 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'common/dpaax: fix physical address conversion' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/e1000: fix memzone leak on queue re-configure' " Xueming Li
                   ` (146 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Ivan Ilchenko
  Cc: Luca Boccassi, Andrew Rybchenko, Andy Moreton, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8f825b3b132ba3f0f0a30ff8e6c135af3495320a Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Fri, 1 Oct 2021 12:07:19 +0300
Subject: [PATCH] ethdev: fix xstats by ID API documentation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bc5112ca599c1e565c0f2d3dc3de0f73381a8c05 ]

Document valid combinations of input arguments in accordance with
current implementation in ethdev.

Fixes: 79c913a42f0e ("ethdev: retrieve xstats by ID")

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_ethdev/rte_ethdev.h | 35 ++++++++++++++++++----------------
 1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index de577ca075..57a2edf363 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -2835,21 +2835,23 @@ int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
  * @param port_id
  *   The port identifier of the Ethernet device.
  * @param xstats_names
- *   An rte_eth_xstat_name array of at least *size* elements to
- *   be filled. If set to NULL, the function returns the required number
- *   of elements.
- * @param ids
- *   IDs array given by app to retrieve specific statistics
+ *   Array to be filled in with names of requested device statistics.
+ *   Must not be NULL if @p ids are specified (not NULL).
  * @param size
- *   The size of the xstats_names array (number of elements).
+ *   Number of elements in @p xstats_names array (if not NULL) and in
+ *   @p ids array (if not NULL). Must be 0 if both array pointers are NULL.
+ * @param ids
+ *   IDs array given by app to retrieve specific statistics. May be NULL to
+ *   retrieve names of all available statistics or, if @p xstats_names is
+ *   NULL as well, just the number of available statistics.
  * @return
  *   - A positive value lower or equal to size: success. The return value
  *     is the number of entries filled in the stats table.
- *   - A positive value higher than size: error, the given statistics table
+ *   - A positive value higher than size: success. The given statistics table
  *     is too small. The return value corresponds to the size that should
  *     be given to succeed. The entries in the table are not valid and
  *     shall not be used by the caller.
- *   - A negative value on error (invalid port id).
+ *   - A negative value on error.
  */
 int
 rte_eth_xstats_get_names_by_id(uint16_t port_id,
@@ -2862,22 +2864,23 @@ rte_eth_xstats_get_names_by_id(uint16_t port_id,
  * @param port_id
  *   The port identifier of the Ethernet device.
  * @param ids
- *   A pointer to an ids array passed by application. This tells which
- *   statistics values function should retrieve. This parameter
- *   can be set to NULL if size is 0. In this case function will retrieve
- *   all available statistics.
+ *   IDs array given by app to retrieve specific statistics. May be NULL to
+ *   retrieve all available statistics or, if @p values is NULL as well,
+ *   just the number of available statistics.
  * @param values
- *   A pointer to a table to be filled with device statistics values.
+ *   Array to be filled in with requested device statistics.
+ *   Must not be NULL if ids are specified (not NULL).
  * @param size
- *   The size of the ids array (number of elements).
+ *   Number of elements in @p values array (if not NULL) and in @p ids
+ *   array (if not NULL). Must be 0 if both array pointers are NULL.
  * @return
  *   - A positive value lower or equal to size: success. The return value
  *     is the number of entries filled in the stats table.
- *   - A positive value higher than size: error, the given statistics table
+ *   - A positive value higher than size: success: The given statistics table
  *     is too small. The return value corresponds to the size that should
  *     be given to succeed. The entries in the table are not valid and
  *     shall not be used by the caller.
- *   - A negative value on error (invalid port id).
+ *   - A negative value on error.
  */
 int rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids,
 			     uint64_t *values, unsigned int size);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.696319804 +0800
+++ 0106-ethdev-fix-xstats-by-ID-API-documentation.patch	2021-11-10 14:17:01.867412785 +0800
@@ -1 +1 @@
-From bc5112ca599c1e565c0f2d3dc3de0f73381a8c05 Mon Sep 17 00:00:00 2001
+From 8f825b3b132ba3f0f0a30ff8e6c135af3495320a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bc5112ca599c1e565c0f2d3dc3de0f73381a8c05 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
- lib/ethdev/rte_ethdev.h | 35 +++++++++++++++++++----------------
+ lib/librte_ethdev/rte_ethdev.h | 35 ++++++++++++++++++----------------
@@ -20,5 +22,5 @@
-diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
-index afdc53b674..2ad2bf2019 100644
---- a/lib/ethdev/rte_ethdev.h
-+++ b/lib/ethdev/rte_ethdev.h
-@@ -2896,21 +2896,23 @@ int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
+diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
+index de577ca075..57a2edf363 100644
+--- a/lib/librte_ethdev/rte_ethdev.h
++++ b/lib/librte_ethdev/rte_ethdev.h
+@@ -2835,21 +2835,23 @@ int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
@@ -56 +58 @@
-@@ -2923,22 +2925,23 @@ rte_eth_xstats_get_names_by_id(uint16_t port_id,
+@@ -2862,22 +2864,23 @@ rte_eth_xstats_get_names_by_id(uint16_t port_id,

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

* [dpdk-stable] patch 'net/e1000: fix memzone leak on queue re-configure' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (105 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'ethdev: fix xstats by ID API documentation' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/ice: " Xueming Li
                   ` (145 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b51d3a497044316f72fc87a1707ab2033a998ea4 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 22 Sep 2021 21:28:20 +0800
Subject: [PATCH] net/e1000: fix memzone leak on queue re-configure
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 09cbfa2da4268b4f789ffd34587365b51fa656b4 ]

Normally when closing the device the queue memzone should be
freed. But the memzone will be not freed, when device setup
ops like:

rte_eth_bond_slave_remove
-->__eth_bond_slave_remove_lock_free
---->slave_remove
------>rte_eth_dev_internal_reset
-------->rte_eth_dev_rx_queue_config
---------->eth_dev_rx_queue_config
------------>em_rx_queue_release
rte_eth_dev_close
-->eth_em_close
---->em_dev_free_queues
------>em_rx_queue_release
      (not been called due to nb_rx_queues and nb_tx_queues are 0)

And when queue number is changed to small size, the BIG memzone
queue index will be lost. This will lead to a memory leak. So we
should release the memzone when releasing queues.

Fixes: 460d1679586e ("drivers/net: delete HW rings while freeing queues")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/e1000/em_rxtx.c  | 8 ++++++--
 drivers/net/e1000/igb_rxtx.c | 9 +++++++--
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index 19e3bffd46..a7439c3aa7 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -104,6 +104,7 @@ struct em_rx_queue {
 	uint8_t             hthresh;    /**< Host threshold register. */
 	uint8_t             wthresh;    /**< Write-back threshold register. */
 	uint8_t             crc_len;    /**< 0 if CRC stripped, 4 otherwise. */
+	const struct rte_memzone *mz;
 };
 
 /**
@@ -173,6 +174,7 @@ struct em_tx_queue {
 	struct em_ctx_info ctx_cache;
 	/**< Hardware context history.*/
 	uint64_t	       offloads; /**< offloads of DEV_TX_OFFLOAD_* */
+	const struct rte_memzone *mz;
 };
 
 #if 1
@@ -1116,6 +1118,7 @@ em_tx_queue_release(struct em_tx_queue *txq)
 	if (txq != NULL) {
 		em_tx_queue_release_mbufs(txq);
 		rte_free(txq->sw_ring);
+		rte_memzone_free(txq->mz);
 		rte_free(txq);
 	}
 }
@@ -1286,6 +1289,7 @@ eth_em_tx_queue_setup(struct rte_eth_dev *dev,
 			RTE_CACHE_LINE_SIZE)) == NULL)
 		return -ENOMEM;
 
+	txq->mz = tz;
 	/* Allocate software ring */
 	if ((txq->sw_ring = rte_zmalloc("txq->sw_ring",
 			sizeof(txq->sw_ring[0]) * nb_desc,
@@ -1338,6 +1342,7 @@ em_rx_queue_release(struct em_rx_queue *rxq)
 	if (rxq != NULL) {
 		em_rx_queue_release_mbufs(rxq);
 		rte_free(rxq->sw_ring);
+		rte_memzone_free(rxq->mz);
 		rte_free(rxq);
 	}
 }
@@ -1452,6 +1457,7 @@ eth_em_rx_queue_setup(struct rte_eth_dev *dev,
 			RTE_CACHE_LINE_SIZE)) == NULL)
 		return -ENOMEM;
 
+	rxq->mz = rz;
 	/* Allocate software ring. */
 	if ((rxq->sw_ring = rte_zmalloc("rxq->sw_ring",
 			sizeof (rxq->sw_ring[0]) * nb_desc,
@@ -1611,14 +1617,12 @@ em_dev_free_queues(struct rte_eth_dev *dev)
 	for (i = 0; i < dev->data->nb_rx_queues; i++) {
 		eth_em_rx_queue_release(dev->data->rx_queues[i]);
 		dev->data->rx_queues[i] = NULL;
-		rte_eth_dma_zone_free(dev, "rx_ring", i);
 	}
 	dev->data->nb_rx_queues = 0;
 
 	for (i = 0; i < dev->data->nb_tx_queues; i++) {
 		eth_em_tx_queue_release(dev->data->tx_queues[i]);
 		dev->data->tx_queues[i] = NULL;
-		rte_eth_dma_zone_free(dev, "tx_ring", i);
 	}
 	dev->data->nb_tx_queues = 0;
 }
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 3bf13d1420..620281232e 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -112,6 +112,7 @@ struct igb_rx_queue {
 	uint8_t             drop_en;  /**< If not 0, set SRRCTL.Drop_En. */
 	uint32_t            flags;      /**< RX flags. */
 	uint64_t	    offloads;   /**< offloads of DEV_RX_OFFLOAD_* */
+	const struct rte_memzone *mz;
 };
 
 /**
@@ -186,6 +187,7 @@ struct igb_tx_queue {
 	struct igb_advctx_info ctx_cache[IGB_CTX_NUM];
 	/**< Hardware context history.*/
 	uint64_t	       offloads; /**< offloads of DEV_TX_OFFLOAD_* */
+	const struct rte_memzone *mz;
 };
 
 #if 1
@@ -1276,6 +1278,7 @@ igb_tx_queue_release(struct igb_tx_queue *txq)
 	if (txq != NULL) {
 		igb_tx_queue_release_mbufs(txq);
 		rte_free(txq->sw_ring);
+		rte_memzone_free(txq->mz);
 		rte_free(txq);
 	}
 }
@@ -1545,6 +1548,7 @@ eth_igb_tx_queue_setup(struct rte_eth_dev *dev,
 		return -ENOMEM;
 	}
 
+	txq->mz = tz;
 	txq->nb_tx_desc = nb_desc;
 	txq->pthresh = tx_conf->tx_thresh.pthresh;
 	txq->hthresh = tx_conf->tx_thresh.hthresh;
@@ -1601,6 +1605,7 @@ igb_rx_queue_release(struct igb_rx_queue *rxq)
 	if (rxq != NULL) {
 		igb_rx_queue_release_mbufs(rxq);
 		rte_free(rxq->sw_ring);
+		rte_memzone_free(rxq->mz);
 		rte_free(rxq);
 	}
 }
@@ -1746,6 +1751,8 @@ eth_igb_rx_queue_setup(struct rte_eth_dev *dev,
 		igb_rx_queue_release(rxq);
 		return -ENOMEM;
 	}
+
+	rxq->mz = rz;
 	rxq->rdt_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_RDT(rxq->reg_idx));
 	rxq->rdh_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_RDH(rxq->reg_idx));
 	rxq->rx_ring_phys_addr = rz->iova;
@@ -1885,14 +1892,12 @@ igb_dev_free_queues(struct rte_eth_dev *dev)
 	for (i = 0; i < dev->data->nb_rx_queues; i++) {
 		eth_igb_rx_queue_release(dev->data->rx_queues[i]);
 		dev->data->rx_queues[i] = NULL;
-		rte_eth_dma_zone_free(dev, "rx_ring", i);
 	}
 	dev->data->nb_rx_queues = 0;
 
 	for (i = 0; i < dev->data->nb_tx_queues; i++) {
 		eth_igb_tx_queue_release(dev->data->tx_queues[i]);
 		dev->data->tx_queues[i] = NULL;
-		rte_eth_dma_zone_free(dev, "tx_ring", i);
 	}
 	dev->data->nb_tx_queues = 0;
 }
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.740388092 +0800
+++ 0107-net-e1000-fix-memzone-leak-on-queue-re-configure.patch	2021-11-10 14:17:01.867412785 +0800
@@ -1 +1 @@
-From 09cbfa2da4268b4f789ffd34587365b51fa656b4 Mon Sep 17 00:00:00 2001
+From b51d3a497044316f72fc87a1707ab2033a998ea4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 09cbfa2da4268b4f789ffd34587365b51fa656b4 ]
@@ -28 +30,0 @@
-Cc: stable@dpdk.org
@@ -38 +40 @@
-index 00a8af6d39..8542a15320 100644
+index 19e3bffd46..a7439c3aa7 100644
@@ -91 +93 @@
- 		eth_em_rx_queue_release(dev, i);
+ 		eth_em_rx_queue_release(dev->data->rx_queues[i]);
@@ -98 +100 @@
- 		eth_em_tx_queue_release(dev, i);
+ 		eth_em_tx_queue_release(dev->data->tx_queues[i]);
@@ -105 +107 @@
-index d97ca1a011..8d64d7397a 100644
+index 3bf13d1420..620281232e 100644
@@ -159 +161 @@
- 		eth_igb_rx_queue_release(dev, i);
+ 		eth_igb_rx_queue_release(dev->data->rx_queues[i]);
@@ -166 +168 @@
- 		eth_igb_tx_queue_release(dev, i);
+ 		eth_igb_tx_queue_release(dev->data->tx_queues[i]);

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

* [dpdk-stable] patch 'net/ice: fix memzone leak on queue re-configure' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (106 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/e1000: fix memzone leak on queue re-configure' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/i40e: " Xueming Li
                   ` (144 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8b56d276440b7e97f35858362ae766ac4ac4a012 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 22 Sep 2021 21:28:36 +0800
Subject: [PATCH] net/ice: fix memzone leak on queue re-configure
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d3778bf39a1dd36181b11459ad3936501ca17f4d ]

Normally when closing the device the queue memzone should be
freed. But the memzone will be not freed, when device setup
ops like:

rte_eth_bond_slave_remove
-->__eth_bond_slave_remove_lock_free
---->slave_remove
------>rte_eth_dev_internal_reset
-------->rte_eth_dev_rx_queue_config
---------->eth_dev_rx_queue_config
------------>ice_rx_queue_release
rte_eth_dev_close
-->ice_dev_close
---->ice_free_queues
------>ice_rx_queue_release
      (not been called due to nb_rx_queues and nb_tx_queues are 0)

And when queue number is changed to small size, the BIG memzone
queue index will be lost. This will lead to a memory leak. So we
should release the memzone when releasing queues.

Fixes: 460d1679586e ("drivers/net: delete HW rings while freeing queues")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ice/ice_fdir_filter.c | 2 --
 drivers/net/ice/ice_rxtx.c        | 8 ++++++--
 drivers/net/ice/ice_rxtx.h        | 2 ++
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index bb720d1036..4a071254ce 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -659,10 +659,8 @@ ice_fdir_teardown(struct ice_pf *pf)
 
 	ice_tx_queue_release(pf->fdir.txq);
 	pf->fdir.txq = NULL;
-	rte_eth_dma_zone_free(eth_dev, "fdir_tx_ring", ICE_FDIR_QUEUE_ID);
 	ice_rx_queue_release(pf->fdir.rxq);
 	pf->fdir.rxq = NULL;
-	rte_eth_dma_zone_free(eth_dev, "fdir_rx_ring", ICE_FDIR_QUEUE_ID);
 	ice_fdir_prof_rm_all(pf);
 	ice_fdir_prof_free(hw);
 	ice_release_vsi(vsi);
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 8ac9411083..906fca15b0 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -1096,6 +1096,7 @@ ice_rx_queue_setup(struct rte_eth_dev *dev,
 		return -ENOMEM;
 	}
 
+	rxq->mz = rz;
 	/* Zero all the descriptors in the ring. */
 	memset(rz->addr, 0, ring_size);
 
@@ -1151,6 +1152,7 @@ ice_rx_queue_release(void *rxq)
 
 	q->rx_rel_mbufs(q);
 	rte_free(q->sw_ring);
+	rte_memzone_free(q->mz);
 	rte_free(q);
 }
 
@@ -1297,6 +1299,7 @@ ice_tx_queue_setup(struct rte_eth_dev *dev,
 		return -ENOMEM;
 	}
 
+	txq->mz = tz;
 	txq->nb_tx_desc = nb_desc;
 	txq->tx_rs_thresh = tx_rs_thresh;
 	txq->tx_free_thresh = tx_free_thresh;
@@ -1347,6 +1350,7 @@ ice_tx_queue_release(void *txq)
 
 	q->tx_rel_mbufs(q);
 	rte_free(q->sw_ring);
+	rte_memzone_free(q->mz);
 	rte_free(q);
 }
 
@@ -2037,7 +2041,6 @@ ice_free_queues(struct rte_eth_dev *dev)
 			continue;
 		ice_rx_queue_release(dev->data->rx_queues[i]);
 		dev->data->rx_queues[i] = NULL;
-		rte_eth_dma_zone_free(dev, "rx_ring", i);
 	}
 	dev->data->nb_rx_queues = 0;
 
@@ -2046,7 +2049,6 @@ ice_free_queues(struct rte_eth_dev *dev)
 			continue;
 		ice_tx_queue_release(dev->data->tx_queues[i]);
 		dev->data->tx_queues[i] = NULL;
-		rte_eth_dma_zone_free(dev, "tx_ring", i);
 	}
 	dev->data->nb_tx_queues = 0;
 }
@@ -2093,6 +2095,7 @@ ice_fdir_setup_tx_resources(struct ice_pf *pf)
 		return -ENOMEM;
 	}
 
+	txq->mz = tz;
 	txq->nb_tx_desc = ICE_FDIR_NUM_TX_DESC;
 	txq->queue_id = ICE_FDIR_QUEUE_ID;
 	txq->reg_idx = pf->fdir.fdir_vsi->base_queue;
@@ -2151,6 +2154,7 @@ ice_fdir_setup_rx_resources(struct ice_pf *pf)
 		return -ENOMEM;
 	}
 
+	rxq->mz = rz;
 	rxq->nb_rx_desc = ICE_FDIR_NUM_RX_DESC;
 	rxq->queue_id = ICE_FDIR_QUEUE_ID;
 	rxq->reg_idx = pf->fdir.fdir_vsi->base_queue;
diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h
index e9edb7bb29..4bea2bc2be 100644
--- a/drivers/net/ice/ice_rxtx.h
+++ b/drivers/net/ice/ice_rxtx.h
@@ -88,6 +88,7 @@ struct ice_rx_queue {
 	uint64_t xtr_ol_flag; /* Protocol extraction offload flag */
 	ice_rxd_to_pkt_fields_t rxd_to_pkt_fields; /* handle FlexiMD by RXDID */
 	ice_rx_release_mbufs_t rx_rel_mbufs;
+	const struct rte_memzone *mz;
 };
 
 struct ice_tx_entry {
@@ -132,6 +133,7 @@ struct ice_tx_queue {
 	bool tx_deferred_start; /* don't start this queue in dev start */
 	bool q_set; /* indicate if tx queue has been configured */
 	ice_tx_release_mbufs_t tx_rel_mbufs;
+	const struct rte_memzone *mz;
 };
 
 /* Offload features */
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.787205309 +0800
+++ 0108-net-ice-fix-memzone-leak-on-queue-re-configure.patch	2021-11-10 14:17:01.870746091 +0800
@@ -1 +1 @@
-From d3778bf39a1dd36181b11459ad3936501ca17f4d Mon Sep 17 00:00:00 2001
+From 8b56d276440b7e97f35858362ae766ac4ac4a012 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d3778bf39a1dd36181b11459ad3936501ca17f4d ]
@@ -28 +30,0 @@
-Cc: stable@dpdk.org
@@ -39 +41 @@
-index e0cca7cb3c..afc956e0a2 100644
+index bb720d1036..4a071254ce 100644
@@ -42 +44 @@
-@@ -651,10 +651,8 @@ ice_fdir_teardown(struct ice_pf *pf)
+@@ -659,10 +659,8 @@ ice_fdir_teardown(struct ice_pf *pf)
@@ -54 +56 @@
-index 3f9de55a42..7a2220daa4 100644
+index 8ac9411083..906fca15b0 100644
@@ -57 +59 @@
-@@ -1152,6 +1152,7 @@ ice_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -1096,6 +1096,7 @@ ice_rx_queue_setup(struct rte_eth_dev *dev,
@@ -65 +67 @@
-@@ -1207,6 +1208,7 @@ ice_rx_queue_release(void *rxq)
+@@ -1151,6 +1152,7 @@ ice_rx_queue_release(void *rxq)
@@ -73 +75 @@
-@@ -1353,6 +1355,7 @@ ice_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -1297,6 +1299,7 @@ ice_tx_queue_setup(struct rte_eth_dev *dev,
@@ -81 +83 @@
-@@ -1415,6 +1418,7 @@ ice_tx_queue_release(void *txq)
+@@ -1347,6 +1350,7 @@ ice_tx_queue_release(void *txq)
@@ -89 +91 @@
-@@ -2156,7 +2160,6 @@ ice_free_queues(struct rte_eth_dev *dev)
+@@ -2037,7 +2041,6 @@ ice_free_queues(struct rte_eth_dev *dev)
@@ -97 +99 @@
-@@ -2165,7 +2168,6 @@ ice_free_queues(struct rte_eth_dev *dev)
+@@ -2046,7 +2049,6 @@ ice_free_queues(struct rte_eth_dev *dev)
@@ -105 +107 @@
-@@ -2212,6 +2214,7 @@ ice_fdir_setup_tx_resources(struct ice_pf *pf)
+@@ -2093,6 +2095,7 @@ ice_fdir_setup_tx_resources(struct ice_pf *pf)
@@ -113 +115 @@
-@@ -2270,6 +2273,7 @@ ice_fdir_setup_rx_resources(struct ice_pf *pf)
+@@ -2151,6 +2154,7 @@ ice_fdir_setup_rx_resources(struct ice_pf *pf)
@@ -122 +124 @@
-index 0a38740f45..c5ec6b7d1a 100644
+index e9edb7bb29..4bea2bc2be 100644
@@ -125 +127,3 @@
-@@ -93,6 +93,7 @@ struct ice_rx_queue {
+@@ -88,6 +88,7 @@ struct ice_rx_queue {
+ 	uint64_t xtr_ol_flag; /* Protocol extraction offload flag */
+ 	ice_rxd_to_pkt_fields_t rxd_to_pkt_fields; /* handle FlexiMD by RXDID */
@@ -127,2 +130,0 @@
- 	uint64_t offloads;
- 	uint32_t time_high;
@@ -133 +135 @@
-@@ -137,6 +138,7 @@ struct ice_tx_queue {
+@@ -132,6 +133,7 @@ struct ice_tx_queue {

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

* [dpdk-stable] patch 'net/i40e: fix memzone leak on queue re-configure' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (107 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/ice: " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/ixgbe: " Xueming Li
                   ` (143 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4e60a45559807ed5b18caca0006f03c335f3b538 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 22 Sep 2021 21:29:36 +0800
Subject: [PATCH] net/i40e: fix memzone leak on queue re-configure
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e3188d5f9925d378be535bb48ccb5f26834605aa ]

Normally when closing the device the queue memzone should be
freed. But the memzone will be not freed, when device setup
ops like:

rte_eth_bond_slave_remove
-->__eth_bond_slave_remove_lock_free
---->slave_remove
------>rte_eth_dev_internal_reset
-------->rte_eth_dev_rx_queue_config
---------->eth_dev_rx_queue_config
------------>i40e_dev_rx_queue_release
rte_eth_dev_close
-->i40e_dev_close
---->i40e_dev_free_queues
------>i40e_dev_rx_queue_release
      (not been called due to nb_rx_queues and nb_tx_queues are 0)

And when queue number is changed to small size, the BIG memzone
queue index will be lost. This will lead to a memory leak. So we
should release the memzone when releasing queues.

Fixes: 460d1679586e ("drivers/net: delete HW rings while freeing queues")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/i40e/i40e_fdir.c | 3 ---
 drivers/net/i40e/i40e_rxtx.c | 8 ++++++--
 drivers/net/i40e/i40e_rxtx.h | 2 ++
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 05fdcef24f..6af71ed23d 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -283,7 +283,6 @@ i40e_fdir_teardown(struct i40e_pf *pf)
 {
 	struct i40e_hw *hw = I40E_PF_TO_HW(pf);
 	struct i40e_vsi *vsi;
-	struct rte_eth_dev *dev = &rte_eth_devices[pf->dev_data->port_id];
 
 	vsi = pf->fdir.fdir_vsi;
 	if (!vsi)
@@ -300,10 +299,8 @@ i40e_fdir_teardown(struct i40e_pf *pf)
 	if (err)
 		PMD_DRV_LOG(DEBUG, "Failed to do FDIR RX switch off");
 
-	rte_eth_dma_zone_free(dev, "fdir_rx_ring", pf->fdir.rxq->queue_id);
 	i40e_dev_rx_queue_release(pf->fdir.rxq);
 	pf->fdir.rxq = NULL;
-	rte_eth_dma_zone_free(dev, "fdir_tx_ring", pf->fdir.txq->queue_id);
 	i40e_dev_tx_queue_release(pf->fdir.txq);
 	pf->fdir.txq = NULL;
 	i40e_vsi_release(vsi);
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 154f649b45..d1659ef060 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -1932,6 +1932,7 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev *dev,
 		return -ENOMEM;
 	}
 
+	rxq->mz = rz;
 	/* Zero all the descriptors in the ring. */
 	memset(rz->addr, 0, ring_size);
 
@@ -2011,6 +2012,7 @@ i40e_dev_rx_queue_release(void *rxq)
 
 	i40e_rx_queue_release_mbufs(q);
 	rte_free(q->sw_ring);
+	rte_memzone_free(q->mz);
 	rte_free(q);
 }
 
@@ -2331,6 +2333,7 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev,
 		return -ENOMEM;
 	}
 
+	txq->mz = tz;
 	txq->nb_tx_desc = nb_desc;
 	txq->tx_rs_thresh = tx_rs_thresh;
 	txq->tx_free_thresh = tx_free_thresh;
@@ -2404,6 +2407,7 @@ i40e_dev_tx_queue_release(void *txq)
 
 	i40e_tx_queue_release_mbufs(q);
 	rte_free(q->sw_ring);
+	rte_memzone_free(q->mz);
 	rte_free(q);
 }
 
@@ -2941,7 +2945,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
 			continue;
 		i40e_dev_rx_queue_release(dev->data->rx_queues[i]);
 		dev->data->rx_queues[i] = NULL;
-		rte_eth_dma_zone_free(dev, "rx_ring", i);
 	}
 
 	for (i = 0; i < dev->data->nb_tx_queues; i++) {
@@ -2949,7 +2952,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
 			continue;
 		i40e_dev_tx_queue_release(dev->data->tx_queues[i]);
 		dev->data->tx_queues[i] = NULL;
-		rte_eth_dma_zone_free(dev, "tx_ring", i);
 	}
 }
 
@@ -2992,6 +2994,7 @@ i40e_fdir_setup_tx_resources(struct i40e_pf *pf)
 		return I40E_ERR_NO_MEMORY;
 	}
 
+	txq->mz = tz;
 	txq->nb_tx_desc = I40E_FDIR_NUM_TX_DESC;
 	txq->queue_id = I40E_FDIR_QUEUE_ID;
 	txq->reg_idx = pf->fdir.fdir_vsi->base_queue;
@@ -3050,6 +3053,7 @@ i40e_fdir_setup_rx_resources(struct i40e_pf *pf)
 		return I40E_ERR_NO_MEMORY;
 	}
 
+	rxq->mz = rz;
 	rxq->nb_rx_desc = I40E_FDIR_NUM_RX_DESC;
 	rxq->queue_id = I40E_FDIR_QUEUE_ID;
 	rxq->reg_idx = pf->fdir.fdir_vsi->base_queue;
diff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h
index 57d7b4160b..0671750779 100644
--- a/drivers/net/i40e/i40e_rxtx.h
+++ b/drivers/net/i40e/i40e_rxtx.h
@@ -121,6 +121,7 @@ struct i40e_rx_queue {
 	uint16_t rx_using_sse; /**<flag indicate the usage of vPMD for rx */
 	uint8_t dcb_tc;         /**< Traffic class of rx queue */
 	uint64_t offloads; /**< Rx offload flags of DEV_RX_OFFLOAD_* */
+	const struct rte_memzone *mz;
 };
 
 struct i40e_tx_entry {
@@ -162,6 +163,7 @@ struct i40e_tx_queue {
 	bool tx_deferred_start; /**< don't start this queue in dev start */
 	uint8_t dcb_tc;         /**< Traffic class of tx queue */
 	uint64_t offloads; /**< Tx offload flags of DEV_RX_OFFLOAD_* */
+	const struct rte_memzone *mz;
 };
 
 /** Offload features */
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.833106642 +0800
+++ 0109-net-i40e-fix-memzone-leak-on-queue-re-configure.patch	2021-11-10 14:17:01.874079397 +0800
@@ -1 +1 @@
-From e3188d5f9925d378be535bb48ccb5f26834605aa Mon Sep 17 00:00:00 2001
+From 4e60a45559807ed5b18caca0006f03c335f3b538 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e3188d5f9925d378be535bb48ccb5f26834605aa ]
@@ -28 +30,0 @@
-Cc: stable@dpdk.org
@@ -39 +41 @@
-index 105a6a657f..df2a5aaecc 100644
+index 05fdcef24f..6af71ed23d 100644
@@ -42 +44 @@
-@@ -284,7 +284,6 @@ i40e_fdir_teardown(struct i40e_pf *pf)
+@@ -283,7 +283,6 @@ i40e_fdir_teardown(struct i40e_pf *pf)
@@ -50 +52 @@
-@@ -301,10 +300,8 @@ i40e_fdir_teardown(struct i40e_pf *pf)
+@@ -300,10 +299,8 @@ i40e_fdir_teardown(struct i40e_pf *pf)
@@ -55 +57 @@
- 	i40e_rx_queue_release(pf->fdir.rxq);
+ 	i40e_dev_rx_queue_release(pf->fdir.rxq);
@@ -58 +60 @@
- 	i40e_tx_queue_release(pf->fdir.txq);
+ 	i40e_dev_tx_queue_release(pf->fdir.txq);
@@ -62 +64 @@
-index caab66e433..807e1a4133 100644
+index 154f649b45..d1659ef060 100644
@@ -65 +67 @@
-@@ -2024,6 +2024,7 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -1932,6 +1932,7 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev *dev,
@@ -73 +75 @@
-@@ -2115,6 +2116,7 @@ i40e_rx_queue_release(void *rxq)
+@@ -2011,6 +2012,7 @@ i40e_dev_rx_queue_release(void *rxq)
@@ -81 +83 @@
-@@ -2427,6 +2429,7 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -2331,6 +2333,7 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev,
@@ -89 +91 @@
-@@ -2500,6 +2503,7 @@ i40e_tx_queue_release(void *txq)
+@@ -2404,6 +2407,7 @@ i40e_dev_tx_queue_release(void *txq)
@@ -97 +99 @@
-@@ -3056,7 +3060,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
+@@ -2941,7 +2945,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
@@ -99 +101 @@
- 		i40e_rx_queue_release(dev->data->rx_queues[i]);
+ 		i40e_dev_rx_queue_release(dev->data->rx_queues[i]);
@@ -105 +107 @@
-@@ -3064,7 +3067,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
+@@ -2949,7 +2952,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
@@ -107 +109 @@
- 		i40e_tx_queue_release(dev->data->tx_queues[i]);
+ 		i40e_dev_tx_queue_release(dev->data->tx_queues[i]);
@@ -113 +115 @@
-@@ -3107,6 +3109,7 @@ i40e_fdir_setup_tx_resources(struct i40e_pf *pf)
+@@ -2992,6 +2994,7 @@ i40e_fdir_setup_tx_resources(struct i40e_pf *pf)
@@ -121 +123 @@
-@@ -3165,6 +3168,7 @@ i40e_fdir_setup_rx_resources(struct i40e_pf *pf)
+@@ -3050,6 +3053,7 @@ i40e_fdir_setup_rx_resources(struct i40e_pf *pf)
@@ -130 +132 @@
-index 8d6ab16b4f..5a99da1d3e 100644
+index 57d7b4160b..0671750779 100644
@@ -141 +143 @@
-@@ -166,6 +167,7 @@ struct i40e_tx_queue {
+@@ -162,6 +163,7 @@ struct i40e_tx_queue {

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

* [dpdk-stable] patch 'net/ixgbe: fix memzone leak on queue re-configure' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (108 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/i40e: " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/hns3: fix input parameters of MAC functions' " Xueming Li
                   ` (142 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2adcdc8cc791f517ada0cf99f9f7138d4cd4bbe5 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 22 Sep 2021 21:30:04 +0800
Subject: [PATCH] net/ixgbe: fix memzone leak on queue re-configure
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a4ae7f51d21af6f59d6ce1e1117de227b352a4cc ]

Normally when closing the device the queue memzone should be
freed. But the memzone will be not freed, when device setup
ops like:

rte_eth_bond_slave_remove
-->__eth_bond_slave_remove_lock_free
---->slave_remove
------>rte_eth_dev_internal_reset
-------->rte_eth_dev_rx_queue_config
---------->eth_dev_rx_queue_config
------------>ixgbe_dev_rx_queue_release
rte_eth_dev_close
-->ixgbe_dev_close
---->ixgbe_dev_free_queues
------>ixgbe_dev_rx_queue_release
      (not been called due to nb_rx_queues and nb_tx_queues are 0)

And when queue number is changed to small size, the BIG memzone
queue index will be lost. This will lead to a memory leak. So we
should release the memzone when releasing queues.

Fixes: 460d1679586e ("drivers/net: delete HW rings while freeing queues")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 6 ++++--
 drivers/net/ixgbe/ixgbe_rxtx.h | 2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 3d983d4db7..c0ab36ad86 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2449,6 +2449,7 @@ ixgbe_tx_queue_release(struct ixgbe_tx_queue *txq)
 	if (txq != NULL && txq->ops != NULL) {
 		txq->ops->release_mbufs(txq);
 		txq->ops->free_swring(txq);
+		rte_memzone_free(txq->mz);
 		rte_free(txq);
 	}
 }
@@ -2730,6 +2731,7 @@ ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
 		return -ENOMEM;
 	}
 
+	txq->mz = tz;
 	txq->nb_tx_desc = nb_desc;
 	txq->tx_rs_thresh = tx_rs_thresh;
 	txq->tx_free_thresh = tx_free_thresh;
@@ -2854,6 +2856,7 @@ ixgbe_rx_queue_release(struct ixgbe_rx_queue *rxq)
 		ixgbe_rx_queue_release_mbufs(rxq);
 		rte_free(rxq->sw_ring);
 		rte_free(rxq->sw_sc_ring);
+		rte_memzone_free(rxq->mz);
 		rte_free(rxq);
 	}
 }
@@ -3129,6 +3132,7 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
 		return -ENOMEM;
 	}
 
+	rxq->mz = rz;
 	/*
 	 * Zero init all the descriptors in the ring.
 	 */
@@ -3400,14 +3404,12 @@ ixgbe_dev_free_queues(struct rte_eth_dev *dev)
 	for (i = 0; i < dev->data->nb_rx_queues; i++) {
 		ixgbe_dev_rx_queue_release(dev->data->rx_queues[i]);
 		dev->data->rx_queues[i] = NULL;
-		rte_eth_dma_zone_free(dev, "rx_ring", i);
 	}
 	dev->data->nb_rx_queues = 0;
 
 	for (i = 0; i < dev->data->nb_tx_queues; i++) {
 		ixgbe_dev_tx_queue_release(dev->data->tx_queues[i]);
 		dev->data->tx_queues[i] = NULL;
-		rte_eth_dma_zone_free(dev, "tx_ring", i);
 	}
 	dev->data->nb_tx_queues = 0;
 }
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.h b/drivers/net/ixgbe/ixgbe_rxtx.h
index bcadaf79ce..d18cac29bf 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.h
+++ b/drivers/net/ixgbe/ixgbe_rxtx.h
@@ -138,6 +138,7 @@ struct ixgbe_rx_queue {
 	struct rte_mbuf fake_mbuf;
 	/** hold packets to return to application */
 	struct rte_mbuf *rx_stage[RTE_PMD_IXGBE_RX_MAX_BURST*2];
+	const struct rte_memzone *mz;
 };
 
 /**
@@ -236,6 +237,7 @@ struct ixgbe_tx_queue {
 	uint8_t		    using_ipsec;
 	/**< indicates that IPsec TX feature is in use */
 #endif
+	const struct rte_memzone *mz;
 };
 
 struct ixgbe_txq_ops {
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.879051789 +0800
+++ 0110-net-ixgbe-fix-memzone-leak-on-queue-re-configure.patch	2021-11-10 14:17:01.877412703 +0800
@@ -1 +1 @@
-From a4ae7f51d21af6f59d6ce1e1117de227b352a4cc Mon Sep 17 00:00:00 2001
+From 2adcdc8cc791f517ada0cf99f9f7138d4cd4bbe5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a4ae7f51d21af6f59d6ce1e1117de227b352a4cc ]
@@ -28 +30,0 @@
-Cc: stable@dpdk.org
@@ -38 +40 @@
-index 176daaff9d..349180e7c1 100644
+index 3d983d4db7..c0ab36ad86 100644
@@ -41 +43 @@
-@@ -2482,6 +2482,7 @@ ixgbe_tx_queue_release(struct ixgbe_tx_queue *txq)
+@@ -2449,6 +2449,7 @@ ixgbe_tx_queue_release(struct ixgbe_tx_queue *txq)
@@ -49 +51 @@
-@@ -2763,6 +2764,7 @@ ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -2730,6 +2731,7 @@ ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
@@ -57 +59 @@
-@@ -2887,6 +2889,7 @@ ixgbe_rx_queue_release(struct ixgbe_rx_queue *rxq)
+@@ -2854,6 +2856,7 @@ ixgbe_rx_queue_release(struct ixgbe_rx_queue *rxq)
@@ -65 +67 @@
-@@ -3162,6 +3165,7 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -3129,6 +3132,7 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
@@ -73 +75 @@
-@@ -3433,14 +3437,12 @@ ixgbe_dev_free_queues(struct rte_eth_dev *dev)
+@@ -3400,14 +3404,12 @@ ixgbe_dev_free_queues(struct rte_eth_dev *dev)
@@ -75 +77 @@
- 		ixgbe_dev_rx_queue_release(dev, i);
+ 		ixgbe_dev_rx_queue_release(dev->data->rx_queues[i]);
@@ -82 +84 @@
- 		ixgbe_dev_tx_queue_release(dev, i);
+ 		ixgbe_dev_tx_queue_release(dev->data->tx_queues[i]);
@@ -89 +91 @@
-index 476ef62cfd..a1764f2b08 100644
+index bcadaf79ce..d18cac29bf 100644

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

* [dpdk-stable] patch 'net/hns3: fix input parameters of MAC functions' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (109 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/ixgbe: " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'net: fix checksum API documentation' " Xueming Li
                   ` (141 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 288a450bb909e5e1acb8fc323cc555b3eb645f59 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 22 Sep 2021 11:41:52 +0800
Subject: [PATCH] net/hns3: fix input parameters of MAC functions
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 60a6b4a574cf3b9415c73c31173eb42deb5ca92b ]

When adding multicast and unicast MAC addresses, three descriptors and
one descriptor are required for querying or adding MAC VLAN table,
respectively. This patch uses the number of descriptors as input
parameter to complete this task to make the function more secure.

Fixes: 7d7f9f80bbfb ("net/hns3: support MAC address related operations")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_cmd.h    |  3 +-
 drivers/net/hns3/hns3_ethdev.c | 88 +++++++++++++++++++---------------
 2 files changed, 51 insertions(+), 40 deletions(-)

diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index 041f2fa789..0463acb215 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -812,7 +812,8 @@ enum hns3_mac_vlan_add_resp_code {
 	HNS3_ADD_MC_OVERFLOW,      /* ADD failed for MC overflow */
 };
 
-#define HNS3_MC_MAC_VLAN_ADD_DESC_NUM	3
+#define HNS3_MC_MAC_VLAN_OPS_DESC_NUM   3
+#define HNS3_UC_MAC_VLAN_OPS_DESC_NUM   1
 
 #define HNS3_MAC_VLAN_BIT0_EN_B		0
 #define HNS3_MAC_VLAN_BIT1_EN_B		1
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index abe31c841e..d318b9b7f7 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -1344,28 +1344,31 @@ hns3_get_mac_vlan_cmd_status(struct hns3_hw *hw, uint16_t cmdq_resp,
 static int
 hns3_lookup_mac_vlan_tbl(struct hns3_hw *hw,
 			 struct hns3_mac_vlan_tbl_entry_cmd *req,
-			 struct hns3_cmd_desc *desc, bool is_mc)
+			 struct hns3_cmd_desc *desc, uint8_t desc_num)
 {
 	uint8_t resp_code;
 	uint16_t retval;
 	int ret;
+	int i;
 
-	hns3_cmd_setup_basic_desc(&desc[0], HNS3_OPC_MAC_VLAN_ADD, true);
-	if (is_mc) {
-		desc[0].flag |= rte_cpu_to_le_16(HNS3_CMD_FLAG_NEXT);
-		memcpy(desc[0].data, req,
-			   sizeof(struct hns3_mac_vlan_tbl_entry_cmd));
-		hns3_cmd_setup_basic_desc(&desc[1], HNS3_OPC_MAC_VLAN_ADD,
-					  true);
-		desc[1].flag |= rte_cpu_to_le_16(HNS3_CMD_FLAG_NEXT);
-		hns3_cmd_setup_basic_desc(&desc[2], HNS3_OPC_MAC_VLAN_ADD,
+	if (desc_num == HNS3_MC_MAC_VLAN_OPS_DESC_NUM) {
+		for (i = 0; i < desc_num - 1; i++) {
+			hns3_cmd_setup_basic_desc(&desc[i],
+						  HNS3_OPC_MAC_VLAN_ADD, true);
+			desc[i].flag |= rte_cpu_to_le_16(HNS3_CMD_FLAG_NEXT);
+			if (i == 0)
+				memcpy(desc[i].data, req,
+				sizeof(struct hns3_mac_vlan_tbl_entry_cmd));
+		}
+		hns3_cmd_setup_basic_desc(&desc[i], HNS3_OPC_MAC_VLAN_ADD,
 					  true);
-		ret = hns3_cmd_send(hw, desc, HNS3_MC_MAC_VLAN_ADD_DESC_NUM);
 	} else {
+		hns3_cmd_setup_basic_desc(&desc[0], HNS3_OPC_MAC_VLAN_ADD,
+					  true);
 		memcpy(desc[0].data, req,
 		       sizeof(struct hns3_mac_vlan_tbl_entry_cmd));
-		ret = hns3_cmd_send(hw, desc, 1);
 	}
+	ret = hns3_cmd_send(hw, desc, desc_num);
 	if (ret) {
 		hns3_err(hw, "lookup mac addr failed for cmd_send, ret =%d.",
 			 ret);
@@ -1381,38 +1384,40 @@ hns3_lookup_mac_vlan_tbl(struct hns3_hw *hw,
 static int
 hns3_add_mac_vlan_tbl(struct hns3_hw *hw,
 		      struct hns3_mac_vlan_tbl_entry_cmd *req,
-		      struct hns3_cmd_desc *mc_desc)
+		      struct hns3_cmd_desc *desc, uint8_t desc_num)
 {
 	uint8_t resp_code;
 	uint16_t retval;
 	int cfg_status;
 	int ret;
+	int i;
 
-	if (mc_desc == NULL) {
-		struct hns3_cmd_desc desc;
-
-		hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_MAC_VLAN_ADD, false);
-		memcpy(desc.data, req,
+	if (desc_num == HNS3_UC_MAC_VLAN_OPS_DESC_NUM) {
+		hns3_cmd_setup_basic_desc(desc, HNS3_OPC_MAC_VLAN_ADD, false);
+		memcpy(desc->data, req,
 		       sizeof(struct hns3_mac_vlan_tbl_entry_cmd));
-		ret = hns3_cmd_send(hw, &desc, 1);
-		resp_code = (rte_le_to_cpu_32(desc.data[0]) >> 8) & 0xff;
-		retval = rte_le_to_cpu_16(desc.retval);
+		ret = hns3_cmd_send(hw, desc, desc_num);
+		resp_code = (rte_le_to_cpu_32(desc->data[0]) >> 8) & 0xff;
+		retval = rte_le_to_cpu_16(desc->retval);
 
 		cfg_status = hns3_get_mac_vlan_cmd_status(hw, retval, resp_code,
 							  HNS3_MAC_VLAN_ADD);
 	} else {
-		hns3_cmd_reuse_desc(&mc_desc[0], false);
-		mc_desc[0].flag |= rte_cpu_to_le_16(HNS3_CMD_FLAG_NEXT);
-		hns3_cmd_reuse_desc(&mc_desc[1], false);
-		mc_desc[1].flag |= rte_cpu_to_le_16(HNS3_CMD_FLAG_NEXT);
-		hns3_cmd_reuse_desc(&mc_desc[2], false);
-		mc_desc[2].flag &= rte_cpu_to_le_16(~HNS3_CMD_FLAG_NEXT);
-		memcpy(mc_desc[0].data, req,
+		for (i = 0; i < desc_num; i++) {
+			hns3_cmd_reuse_desc(&desc[i], false);
+			if (i == desc_num - 1)
+				desc[i].flag &=
+					rte_cpu_to_le_16(~HNS3_CMD_FLAG_NEXT);
+			else
+				desc[i].flag |=
+					rte_cpu_to_le_16(HNS3_CMD_FLAG_NEXT);
+		}
+		memcpy(desc[0].data, req,
 		       sizeof(struct hns3_mac_vlan_tbl_entry_cmd));
-		mc_desc[0].retval = 0;
-		ret = hns3_cmd_send(hw, mc_desc, HNS3_MC_MAC_VLAN_ADD_DESC_NUM);
-		resp_code = (rte_le_to_cpu_32(mc_desc[0].data[0]) >> 8) & 0xff;
-		retval = rte_le_to_cpu_16(mc_desc[0].retval);
+		desc[0].retval = 0;
+		ret = hns3_cmd_send(hw, desc, desc_num);
+		resp_code = (rte_le_to_cpu_32(desc[0].data[0]) >> 8) & 0xff;
+		retval = rte_le_to_cpu_16(desc[0].retval);
 
 		cfg_status = hns3_get_mac_vlan_cmd_status(hw, retval, resp_code,
 							  HNS3_MAC_VLAN_ADD);
@@ -1457,7 +1462,7 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
 	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
 	struct hns3_mac_vlan_tbl_entry_cmd req;
 	struct hns3_pf *pf = &hns->pf;
-	struct hns3_cmd_desc desc[3];
+	struct hns3_cmd_desc desc;
 	char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
 	uint16_t egress_port = 0;
 	uint8_t vf_id;
@@ -1491,10 +1496,12 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
 	 * it if the entry is inexistent. Repeated unicast entry
 	 * is not allowed in the mac vlan table.
 	 */
-	ret = hns3_lookup_mac_vlan_tbl(hw, &req, desc, false);
+	ret = hns3_lookup_mac_vlan_tbl(hw, &req, &desc,
+					HNS3_UC_MAC_VLAN_OPS_DESC_NUM);
 	if (ret == -ENOENT) {
 		if (!hns3_is_umv_space_full(hw)) {
-			ret = hns3_add_mac_vlan_tbl(hw, &req, NULL);
+			ret = hns3_add_mac_vlan_tbl(hw, &req, &desc,
+						HNS3_UC_MAC_VLAN_OPS_DESC_NUM);
 			if (!ret)
 				hns3_update_umv_space(hw, false);
 			return ret;
@@ -1799,8 +1806,8 @@ hns3_update_desc_vfid(struct hns3_cmd_desc *desc, uint8_t vfid, bool clr)
 static int
 hns3_add_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
 {
+	struct hns3_cmd_desc desc[HNS3_MC_MAC_VLAN_OPS_DESC_NUM];
 	struct hns3_mac_vlan_tbl_entry_cmd req;
-	struct hns3_cmd_desc desc[3];
 	char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
 	uint8_t vf_id;
 	int ret;
@@ -1817,7 +1824,8 @@ hns3_add_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
 	memset(&req, 0, sizeof(req));
 	hns3_set_bit(req.entry_type, HNS3_MAC_VLAN_BIT0_EN_B, 0);
 	hns3_prepare_mac_addr(&req, mac_addr->addr_bytes, true);
-	ret = hns3_lookup_mac_vlan_tbl(hw, &req, desc, true);
+	ret = hns3_lookup_mac_vlan_tbl(hw, &req, desc,
+					HNS3_MC_MAC_VLAN_OPS_DESC_NUM);
 	if (ret) {
 		/* This mac addr do not exist, add new entry for it */
 		memset(desc[0].data, 0, sizeof(desc[0].data));
@@ -1831,7 +1839,8 @@ hns3_add_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
 	 */
 	vf_id = HNS3_PF_FUNC_ID;
 	hns3_update_desc_vfid(desc, vf_id, false);
-	ret = hns3_add_mac_vlan_tbl(hw, &req, desc);
+	ret = hns3_add_mac_vlan_tbl(hw, &req, desc,
+					HNS3_MC_MAC_VLAN_OPS_DESC_NUM);
 	if (ret) {
 		if (ret == -ENOSPC)
 			hns3_err(hw, "mc mac vlan table is full");
@@ -1864,7 +1873,8 @@ hns3_remove_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
 	memset(&req, 0, sizeof(req));
 	hns3_set_bit(req.entry_type, HNS3_MAC_VLAN_BIT0_EN_B, 0);
 	hns3_prepare_mac_addr(&req, mac_addr->addr_bytes, true);
-	ret = hns3_lookup_mac_vlan_tbl(hw, &req, desc, true);
+	ret = hns3_lookup_mac_vlan_tbl(hw, &req, desc,
+					HNS3_MC_MAC_VLAN_OPS_DESC_NUM);
 	if (ret == 0) {
 		/*
 		 * This mac addr exist, remove this handle's VFID for it.
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.925876972 +0800
+++ 0111-net-hns3-fix-input-parameters-of-MAC-functions.patch	2021-11-10 14:17:01.880746009 +0800
@@ -1 +1 @@
-From 60a6b4a574cf3b9415c73c31173eb42deb5ca92b Mon Sep 17 00:00:00 2001
+From 288a450bb909e5e1acb8fc323cc555b3eb645f59 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 60a6b4a574cf3b9415c73c31173eb42deb5ca92b ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index a4683de0aa..81bc9e9d98 100644
+index 041f2fa789..0463acb215 100644
@@ -25 +27 @@
-@@ -923,7 +923,8 @@ enum hns3_mac_vlan_add_resp_code {
+@@ -812,7 +812,8 @@ enum hns3_mac_vlan_add_resp_code {
@@ -36 +38 @@
-index 5c8ac5754f..cabf73ffbc 100644
+index abe31c841e..d318b9b7f7 100644
@@ -39 +41 @@
-@@ -1427,28 +1427,31 @@ hns3_get_mac_vlan_cmd_status(struct hns3_hw *hw, uint16_t cmdq_resp,
+@@ -1344,28 +1344,31 @@ hns3_get_mac_vlan_cmd_status(struct hns3_hw *hw, uint16_t cmdq_resp,
@@ -83 +85 @@
-@@ -1464,38 +1467,40 @@ hns3_lookup_mac_vlan_tbl(struct hns3_hw *hw,
+@@ -1381,38 +1384,40 @@ hns3_lookup_mac_vlan_tbl(struct hns3_hw *hw,
@@ -144 +146 @@
-@@ -1540,7 +1545,7 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
+@@ -1457,7 +1462,7 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
@@ -153 +155 @@
-@@ -1574,10 +1579,12 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
+@@ -1491,10 +1496,12 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
@@ -168 +170 @@
-@@ -1867,8 +1874,8 @@ hns3_update_desc_vfid(struct hns3_cmd_desc *desc, uint8_t vfid, bool clr)
+@@ -1799,8 +1806,8 @@ hns3_update_desc_vfid(struct hns3_cmd_desc *desc, uint8_t vfid, bool clr)
@@ -178 +180 @@
-@@ -1885,7 +1892,8 @@ hns3_add_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
+@@ -1817,7 +1824,8 @@ hns3_add_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
@@ -188 +190 @@
-@@ -1899,7 +1907,8 @@ hns3_add_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
+@@ -1831,7 +1839,8 @@ hns3_add_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
@@ -198 +200 @@
-@@ -1932,7 +1941,8 @@ hns3_remove_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
+@@ -1864,7 +1873,8 @@ hns3_remove_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)

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

* [dpdk-stable] patch 'net: fix checksum API documentation' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (110 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net/hns3: fix input parameters of MAC functions' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'eal/windows: fix CPU cores counting' " Xueming Li
                   ` (140 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Luca Boccassi, Ferruh Yigit, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 449612955b72ef975de4babf525e3626e714d836 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Tue, 21 Sep 2021 10:59:24 -0400
Subject: [PATCH] net: fix checksum API documentation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit dc954ae73aab9aaf45b8d5ce42f4490773dd1fab ]

Minor corrections and improvements to documentation
for checksum APIs.

Fixes: 6006818cfb26 ("net: new checksum functions")
Fixes: 45a08ef55e44 ("net: introduce functions to verify L4 checksums")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_net/rte_ip.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
index b59c4d67a3..b188616ab8 100644
--- a/lib/librte_net/rte_ip.h
+++ b/lib/librte_net/rte_ip.h
@@ -444,15 +444,15 @@ rte_ipv6_phdr_cksum(const struct rte_ipv6_hdr *ipv6_hdr, uint64_t ol_flags)
 /**
  * Process the IPv6 UDP or TCP checksum.
  *
- * The IPv4 header should not contains options. The layer 4 checksum
- * must be set to 0 in the packet by the caller.
+ * The IPv6 header must not be followed by extension headers. The layer 4
+ * checksum must be set to 0 in the L4 header by the caller.
  *
  * @param ipv6_hdr
  *   The pointer to the contiguous IPv6 header.
  * @param l4_hdr
  *   The pointer to the beginning of the L4 header.
  * @return
- *   The complemented checksum to set in the IP packet.
+ *   The complemented checksum to set in the L4 header.
  */
 static inline uint16_t
 rte_ipv6_udptcp_cksum(const struct rte_ipv6_hdr *ipv6_hdr, const void *l4_hdr)
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.972957044 +0800
+++ 0112-net-fix-checksum-API-documentation.patch	2021-11-10 14:17:01.880746009 +0800
@@ -1 +1 @@
-From dc954ae73aab9aaf45b8d5ce42f4490773dd1fab Mon Sep 17 00:00:00 2001
+From 449612955b72ef975de4babf525e3626e714d836 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit dc954ae73aab9aaf45b8d5ce42f4490773dd1fab ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +19,2 @@
- lib/net/rte_ip.h | 13 ++++++-------
- 1 file changed, 6 insertions(+), 7 deletions(-)
+ lib/librte_net/rte_ip.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
@@ -20,32 +22,5 @@
-diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h
-index bbd8650962..b3d45e85db 100644
---- a/lib/net/rte_ip.h
-+++ b/lib/net/rte_ip.h
-@@ -372,15 +372,14 @@ __rte_ipv4_udptcp_cksum(const struct rte_ipv4_hdr *ipv4_hdr, const void *l4_hdr)
- /**
-  * Process the IPv4 UDP or TCP checksum.
-  *
-- * The IP and layer 4 checksum must be set to 0 in the packet by
-- * the caller.
-+ * The layer 4 checksum must be set to 0 in the L4 header by the caller.
-  *
-  * @param ipv4_hdr
-  *   The pointer to the contiguous IPv4 header.
-  * @param l4_hdr
-  *   The pointer to the beginning of the L4 header.
-  * @return
-- *   The complemented checksum to set in the IP packet.
-+ *   The complemented checksum to set in the L4 header.
-  */
- static inline uint16_t
- rte_ipv4_udptcp_cksum(const struct rte_ipv4_hdr *ipv4_hdr, const void *l4_hdr)
-@@ -489,7 +488,7 @@ rte_ipv6_phdr_cksum(const struct rte_ipv6_hdr *ipv6_hdr, uint64_t ol_flags)
- }
- 
- /**
-- * @internal Calculate the non-complemented IPv4 L4 checksum
-+ * @internal Calculate the non-complemented IPv6 L4 checksum
-  */
- static inline uint16_t
- __rte_ipv6_udptcp_cksum(const struct rte_ipv6_hdr *ipv6_hdr, const void *l4_hdr)
-@@ -510,15 +509,15 @@ __rte_ipv6_udptcp_cksum(const struct rte_ipv6_hdr *ipv6_hdr, const void *l4_hdr)
+diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
+index b59c4d67a3..b188616ab8 100644
+--- a/lib/librte_net/rte_ip.h
++++ b/lib/librte_net/rte_ip.h
+@@ -444,15 +444,15 @@ rte_ipv6_phdr_cksum(const struct rte_ipv6_hdr *ipv6_hdr, uint64_t ol_flags)

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

* [dpdk-stable] patch 'eal/windows: fix CPU cores counting' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (111 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'net: fix checksum API documentation' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'eal/windows: do not install virt2phys header' " Xueming Li
                   ` (139 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Narcisa Vasile; +Cc: Luca Boccassi, Dmitry Kozlyuk, Pallavi Kadam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 822f885986d147ff689f6b7c0ae55995bacbb12d Mon Sep 17 00:00:00 2001
From: Narcisa Vasile <navasile@microsoft.com>
Date: Wed, 18 Aug 2021 06:46:00 -0700
Subject: [PATCH] eal/windows: fix CPU cores counting
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 694c81721ef0a04432cd725642cfe74075a32f19 ]

On Windows, -l/--lcores EAL option was unable to process CPU sets
containing CPUs other than 0 and 1, because CPU_COUNT() macro
only checked these CPUs in the set. Fix CPU_COUNT() by enumerating
all possible CPU indices.

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

Signed-off-by: Narcisa Vasile <navasile@microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
---
 lib/librte_eal/windows/include/sched.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/windows/include/sched.h b/lib/librte_eal/windows/include/sched.h
index ff572b5dcb..bc31cc8465 100644
--- a/lib/librte_eal/windows/include/sched.h
+++ b/lib/librte_eal/windows/include/sched.h
@@ -49,7 +49,7 @@ count_cpu(rte_cpuset_t *s)
 	unsigned int _i;
 	int count = 0;
 
-	for (_i = 0; _i < _NUM_SETS(CPU_SETSIZE); _i++)
+	for (_i = 0; _i < CPU_SETSIZE; _i++)
 		if (CPU_ISSET(_i, s) != 0LL)
 			count++;
 	return count;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.014519227 +0800
+++ 0113-eal-windows-fix-CPU-cores-counting.patch	2021-11-10 14:17:01.880746009 +0800
@@ -1 +1 @@
-From 694c81721ef0a04432cd725642cfe74075a32f19 Mon Sep 17 00:00:00 2001
+From 822f885986d147ff689f6b7c0ae55995bacbb12d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 694c81721ef0a04432cd725642cfe74075a32f19 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
- lib/eal/windows/include/sched.h | 2 +-
+ lib/librte_eal/windows/include/sched.h | 2 +-
@@ -21 +23 @@
-diff --git a/lib/eal/windows/include/sched.h b/lib/eal/windows/include/sched.h
+diff --git a/lib/librte_eal/windows/include/sched.h b/lib/librte_eal/windows/include/sched.h
@@ -23,2 +25,2 @@
---- a/lib/eal/windows/include/sched.h
-+++ b/lib/eal/windows/include/sched.h
+--- a/lib/librte_eal/windows/include/sched.h
++++ b/lib/librte_eal/windows/include/sched.h

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

* [dpdk-stable] patch 'eal/windows: do not install virt2phys header' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (112 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'eal/windows: fix CPU cores counting' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:29 ` [dpdk-stable] patch 'examples/fips_validation: remove unused allocation' " Xueming Li
                   ` (138 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6d4f5a16392c75f31001d9e7b836011614e16710 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Fri, 1 Oct 2021 19:37:25 +0300
Subject: [PATCH] eal/windows: do not install virt2phys header
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d47dd941623c12bebd8a283ec440ac92faf235c0 ]

The header was not intended to be a public one.
DPDK users should use `rte_mem_virt2iova()` to translate addresses.
Other virt2phys users should use the header from the driver instead.

Fixes: 2a5d547a4a9b ("eal/windows: implement basic memory management")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/librte_eal/windows/include/meson.build | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/librte_eal/windows/include/meson.build b/lib/librte_eal/windows/include/meson.build
index b3534b025f..5fb1962ac7 100644
--- a/lib/librte_eal/windows/include/meson.build
+++ b/lib/librte_eal/windows/include/meson.build
@@ -5,6 +5,5 @@ includes += include_directories('.')
 
 headers += files(
         'rte_os.h',
-        'rte_virt2phys.h',
         'rte_windows.h',
 )
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.055968604 +0800
+++ 0114-eal-windows-do-not-install-virt2phys-header.patch	2021-11-10 14:17:01.880746009 +0800
@@ -1 +1 @@
-From d47dd941623c12bebd8a283ec440ac92faf235c0 Mon Sep 17 00:00:00 2001
+From 6d4f5a16392c75f31001d9e7b836011614e16710 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d47dd941623c12bebd8a283ec440ac92faf235c0 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -15 +17 @@
- lib/eal/windows/include/meson.build | 1 -
+ lib/librte_eal/windows/include/meson.build | 1 -
@@ -18 +20 @@
-diff --git a/lib/eal/windows/include/meson.build b/lib/eal/windows/include/meson.build
+diff --git a/lib/librte_eal/windows/include/meson.build b/lib/librte_eal/windows/include/meson.build
@@ -20,2 +22,2 @@
---- a/lib/eal/windows/include/meson.build
-+++ b/lib/eal/windows/include/meson.build
+--- a/lib/librte_eal/windows/include/meson.build
++++ b/lib/librte_eal/windows/include/meson.build

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

* [dpdk-stable] patch 'examples/fips_validation: remove unused allocation' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (113 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'eal/windows: do not install virt2phys header' " Xueming Li
@ 2021-11-10  6:29 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'examples/fips_validation: fix resetting pointer' " Xueming Li
                   ` (137 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:29 UTC (permalink / raw)
  To: Ciara Power; +Cc: Luca Boccassi, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1aab8371d34dce3a596ddb1792618c32653cf9f9 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Thu, 12 Aug 2021 14:24:34 +0000
Subject: [PATCH] examples/fips_validation: remove unused allocation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 25d392e1999b3d766f3a9f142372cc1220fa2c97 ]

The val.val pointer is allocated memory, however this memory is then
freed in get_writeback_data() without being used beforehand.
The pointer is then allocated memory again before use,
so the very first allocation is removed as it was unnecessary.

Fixes: f4797bae0050 ("examples/fips_validation: support plain SHA")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 examples/fips_validation/main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index a7259173ec..cb38d40b66 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -1617,7 +1617,6 @@ fips_mct_sha_test(void)
 	int ret;
 	uint32_t i, j;
 
-	val.val = rte_malloc(NULL, (MAX_DIGEST_SIZE*SHA_MD_BLOCK), 0);
 	for (i = 0; i < SHA_MD_BLOCK; i++)
 		md[i].val = rte_malloc(NULL, (MAX_DIGEST_SIZE*2), 0);
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.097433692 +0800
+++ 0115-examples-fips_validation-remove-unused-allocation.patch	2021-11-10 14:17:01.880746009 +0800
@@ -1 +1 @@
-From 25d392e1999b3d766f3a9f142372cc1220fa2c97 Mon Sep 17 00:00:00 2001
+From 1aab8371d34dce3a596ddb1792618c32653cf9f9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 25d392e1999b3d766f3a9f142372cc1220fa2c97 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index a8daad1f48..c0e68b8848 100644
+index a7259173ec..cb38d40b66 100644
@@ -24 +26 @@
-@@ -1632,7 +1632,6 @@ fips_mct_sha_test(void)
+@@ -1617,7 +1617,6 @@ fips_mct_sha_test(void)

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

* [dpdk-stable] patch 'examples/fips_validation: fix resetting pointer' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (114 preceding siblings ...)
  2021-11-10  6:29 ` [dpdk-stable] patch 'examples/fips_validation: remove unused allocation' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'test/event_crypto: fix event crypto metadata write' " Xueming Li
                   ` (136 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Ciara Power; +Cc: Luca Boccassi, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From de983dfa6d961e92bbdf0abdd415ed15abd6331a Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Thu, 12 Aug 2021 14:24:35 +0000
Subject: [PATCH] examples/fips_validation: fix resetting pointer
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 15bb59a5ebb7fdf4de18fdf11ba2f9b3a8ee9c32 ]

The env.digest memory was freed, but the pointer was not set to NULL
afterwards. This caused an "Invalid Memory" error, as the pointer tries
to free twice.

Fixes: 952e10cdad5e ("examples/fips_validation: support scatter gather list")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 examples/fips_validation/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index cb38d40b66..dee9272880 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -1828,8 +1828,10 @@ error_one_case:
 
 	fips_test_clear();
 
-	if (env.digest)
+	if (env.digest) {
 		rte_free(env.digest);
+		env.digest = NULL;
+	}
 	if (env.mbuf)
 		rte_pktmbuf_free(env.mbuf);
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.139566073 +0800
+++ 0116-examples-fips_validation-fix-resetting-pointer.patch	2021-11-10 14:17:01.880746009 +0800
@@ -1 +1 @@
-From 15bb59a5ebb7fdf4de18fdf11ba2f9b3a8ee9c32 Mon Sep 17 00:00:00 2001
+From de983dfa6d961e92bbdf0abdd415ed15abd6331a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 15bb59a5ebb7fdf4de18fdf11ba2f9b3a8ee9c32 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index c0e68b8848..b0de3d269a 100644
+index cb38d40b66..dee9272880 100644
@@ -23 +25 @@
-@@ -1843,8 +1843,10 @@ error_one_case:
+@@ -1828,8 +1828,10 @@ error_one_case:

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

* [dpdk-stable] patch 'test/event_crypto: fix event crypto metadata write' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (115 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'examples/fips_validation: fix resetting pointer' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'test/service: fix some comment' " Xueming Li
                   ` (135 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Shijith Thotton; +Cc: Luca Boccassi, Abhinandan Gujjar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cd24395f653ffd99abc1a5fc544e96a50708079e Mon Sep 17 00:00:00 2001
From: Shijith Thotton <sthotton@marvell.com>
Date: Mon, 27 Sep 2021 20:59:13 +0530
Subject: [PATCH] test/event_crypto: fix event crypto metadata write
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 67c8baecaee2ef312330102544b1f1e892a95502 ]

Using memcpy to update event crypto metadata fields (request/response)
will result in one overwriting the other. To avoid this, fields of each
structure should be updated one by one.

Fixes: 3c2c535ecfc0 ("test: add event crypto adapter auto-test")

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
 app/test/test_event_crypto_adapter.c | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index 71b58fcbb8..c7517e215c 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -208,10 +208,10 @@ test_op_forward_mode(uint8_t session_less)
 
 		if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) {
 			/* Fill in private user data information */
-			rte_memcpy(&m_data.response_info, &response_info,
-				sizeof(response_info));
-			rte_memcpy(&m_data.request_info, &request_info,
-				sizeof(request_info));
+			m_data.request_info.cdev_id = request_info.cdev_id;
+			m_data.request_info.queue_pair_id =
+				request_info.queue_pair_id;
+			m_data.response_info.event = response_info.event;
 			rte_cryptodev_sym_session_set_user_data(sess,
 						&m_data, sizeof(m_data));
 		}
@@ -227,10 +227,9 @@ test_op_forward_mode(uint8_t session_less)
 		uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH;
 		op->private_data_offset = len;
 		/* Fill in private data information */
-		rte_memcpy(&m_data.response_info, &response_info,
-			   sizeof(response_info));
-		rte_memcpy(&m_data.request_info, &request_info,
-			   sizeof(request_info));
+		m_data.request_info.cdev_id = request_info.cdev_id;
+		m_data.request_info.queue_pair_id = request_info.queue_pair_id;
+		m_data.response_info.event = response_info.event;
 		rte_memcpy((uint8_t *)op + len, &m_data, sizeof(m_data));
 	}
 
@@ -401,8 +400,7 @@ test_op_new_mode(uint8_t session_less)
 
 		if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) {
 			/* Fill in private user data information */
-			rte_memcpy(&m_data.response_info, &response_info,
-				   sizeof(m_data));
+			m_data.response_info.event = response_info.event;
 			rte_cryptodev_sym_session_set_user_data(sess,
 						&m_data, sizeof(m_data));
 		}
@@ -421,8 +419,7 @@ test_op_new_mode(uint8_t session_less)
 		uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH;
 		op->private_data_offset = len;
 		/* Fill in private data information */
-		rte_memcpy(&m_data.response_info, &response_info,
-			   sizeof(m_data));
+		m_data.response_info.event = response_info.event;
 		rte_memcpy((uint8_t *)op + len, &m_data, sizeof(m_data));
 	}
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.181933373 +0800
+++ 0117-test-event_crypto-fix-event-crypto-metadata-write.patch	2021-11-10 14:17:01.880746009 +0800
@@ -1 +1 @@
-From 67c8baecaee2ef312330102544b1f1e892a95502 Mon Sep 17 00:00:00 2001
+From cd24395f653ffd99abc1a5fc544e96a50708079e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 67c8baecaee2ef312330102544b1f1e892a95502 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 3ad20921e2..0c7ebe6981 100644
+index 71b58fcbb8..c7517e215c 100644
@@ -23 +25 @@
-@@ -212,10 +212,10 @@ test_op_forward_mode(uint8_t session_less)
+@@ -208,10 +208,10 @@ test_op_forward_mode(uint8_t session_less)
@@ -38 +40 @@
-@@ -231,10 +231,9 @@ test_op_forward_mode(uint8_t session_less)
+@@ -227,10 +227,9 @@ test_op_forward_mode(uint8_t session_less)
@@ -52 +54 @@
-@@ -405,8 +404,7 @@ test_op_new_mode(uint8_t session_less)
+@@ -401,8 +400,7 @@ test_op_new_mode(uint8_t session_less)
@@ -62 +64 @@
-@@ -425,8 +423,7 @@ test_op_new_mode(uint8_t session_less)
+@@ -421,8 +419,7 @@ test_op_new_mode(uint8_t session_less)

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

* [dpdk-stable] patch 'test/service: fix some comment' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (116 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'test/event_crypto: fix event crypto metadata write' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'test/service: fix race in attr check' " Xueming Li
                   ` (134 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Joyce Kong; +Cc: Luca Boccassi, Ruifeng Wang, Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3ee8970823038ab3abbc7bf478b627fc805aeea7 Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong@arm.com>
Date: Thu, 19 Aug 2021 01:11:25 -0500
Subject: [PATCH] test/service: fix some comment
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 79afbbfeea44f624242ad93c28072d73da631e1b ]

Change the inaccurate comment of 'set pass flag' to 'clear pass flag'
as the '*pass_test = 0' code actually implements clearing.

Fixes: f038a81e1c56 ("service: add unit tests")

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 app/test/test_service_cores.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c
index 37d7172d53..8b61dcfd30 100644
--- a/app/test/test_service_cores.c
+++ b/app/test/test_service_cores.c
@@ -66,7 +66,7 @@ static int32_t dummy_mt_unsafe_cb(void *args)
 		rte_delay_ms(250);
 		rte_atomic32_clear((rte_atomic32_t *)atomic_lock);
 	} else {
-		/* 2nd thread will fail to take lock, so set pass flag */
+		/* 2nd thread will fail to take lock, so clear pass flag */
 		*pass_test = 0;
 	}
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.226607023 +0800
+++ 0118-test-service-fix-some-comment.patch	2021-11-10 14:17:01.884079315 +0800
@@ -1 +1 @@
-From 79afbbfeea44f624242ad93c28072d73da631e1b Mon Sep 17 00:00:00 2001
+From 3ee8970823038ab3abbc7bf478b627fc805aeea7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 79afbbfeea44f624242ad93c28072d73da631e1b ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index ece104054e..8659a1526c 100644
+index 37d7172d53..8b61dcfd30 100644
@@ -23 +25 @@
-@@ -68,7 +68,7 @@ static int32_t dummy_mt_unsafe_cb(void *args)
+@@ -66,7 +66,7 @@ static int32_t dummy_mt_unsafe_cb(void *args)
@@ -25 +27 @@
- 		__atomic_store_n(lock, 0, __ATOMIC_RELAXED);
+ 		rte_atomic32_clear((rte_atomic32_t *)atomic_lock);

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

* [dpdk-stable] patch 'test/service: fix race in attr check' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (117 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'test/service: fix some comment' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'eal/x86: fix some CPU extended features definitions' " Xueming Li
                   ` (133 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Aaron Conole, Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cc7ded572d96e2438836ae07bba0473f9aa5f055 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 11 Oct 2021 16:54:30 +0200
Subject: [PATCH] test/service: fix race in attr check
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4a985f4e84c56fa6d562b4e920c4912203b95eb6 ]

The CI reported rare (and cryptic) failures like:

RTE>>service_autotest
 + ------------------------------------------------------- +
 + Test Suite : service core test suite
 + ------------------------------------------------------- +
 + TestCase [ 0] : unregister_all succeeded
 + TestCase [ 1] : service_name succeeded
 + TestCase [ 2] : service_get_by_name succeeded
Service dummy_service Summary
  dummy_service: stats 1	calls 0	cycles 0	avg: 0
Service dummy_service Summary
  dummy_service: stats 0	calls 0	cycles 0	avg: 0
 + TestCase [ 3] : service_dump succeeded
 + TestCase [ 4] : service_attr_get failed
 + TestCase [ 5] : service_lcore_attr_get succeeded
 + TestCase [ 6] : service_probe_capability succeeded
 + TestCase [ 7] : service_start_stop succeeded
 + TestCase [ 8] : service_lcore_add_del succeeded
 + TestCase [ 9] : service_lcore_start_stop succeeded
 + TestCase [10] : service_lcore_en_dis_able succeeded
 + TestCase [11] : service_mt_unsafe_poll succeeded
 + TestCase [12] : service_mt_safe_poll succeeded
perf test for MT Safe: 42.7 cycles per call
 + TestCase [13] : service_app_lcore_mt_safe succeeded
perf test for MT Unsafe: 73.3 cycles per call
 + TestCase [14] : service_app_lcore_mt_unsafe succeeded
 + TestCase [15] : service_may_be_active succeeded
 + TestCase [16] : service_active_two_cores succeeded
 + ------------------------------------------------------- +
 + Test Suite Summary : service core test suite
 + ------------------------------------------------------- +
 + Tests Total :       17
 + Tests Skipped :      0
 + Tests Executed :    17
 + Tests Unsupported:   0
 + Tests Passed :      16
 + Tests Failed :       1
 + ------------------------------------------------------- +
Test Failed
RTE>>
stderr:
EAL: Detected CPU lcores: 16
EAL: Detected NUMA nodes: 2
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/service_autotest/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: No available 1048576 kB hugepages reported
EAL: VFIO support initialized
EAL: Device 0000:03:00.0 is not NUMA-aware, defaulting socket to 0
APP: HPET is not enabled, using TSC as default timer
EAL: Test assert service_attr_get line 340 failed: attr_get() call didn't
 get call count (zero)

According to API, trying to stop a service lcore is not possible if this
lcore is the only one associated to a service.
Doing this will result in a -EBUSY return code from
rte_service_lcore_stop() which the service_attr_get subtest was not
checking.
This left the service lcore running, and a race existed with the main
lcore on checking the service attributes which triggered this CI
failure.

To fix this, dissociate the service lcore with current service.

Once fixed this first issue, a race still exists, because the
wait_slcore_inactive helper added in a previous fix was not
paired with a check that the service lcore _did_ stop.

Add missing check on rte_service_lcore_may_be_active.

Fixes: 4d55194d76a4 ("service: add attribute get function")
Fixes: 52bb6be259ff ("test/service: fix race condition on stopping lcore")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 app/test/test_service_cores.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c
index 8b61dcfd30..0aee8c04e3 100644
--- a/app/test/test_service_cores.c
+++ b/app/test/test_service_cores.c
@@ -314,10 +314,16 @@ service_attr_get(void)
 	TEST_ASSERT_EQUAL(1, cycles_gt_zero,
 			"attr_get() failed to get cycles (expected > zero)");
 
-	rte_service_lcore_stop(slcore_id);
+	TEST_ASSERT_EQUAL(0, rte_service_map_lcore_set(id, slcore_id, 0),
+			"Disabling valid service and core failed");
+	TEST_ASSERT_EQUAL(0, rte_service_lcore_stop(slcore_id),
+			"Failed to stop service lcore");
 
 	wait_slcore_inactive(slcore_id);
 
+	TEST_ASSERT_EQUAL(0, rte_service_lcore_may_be_active(slcore_id),
+			  "Service lcore not stopped after waiting.");
+
 	TEST_ASSERT_EQUAL(0, rte_service_attr_get(id, attr_calls, &attr_value),
 			"Valid attr_get() call didn't return success");
 	TEST_ASSERT_EQUAL(1, (attr_value > 0),
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.269361164 +0800
+++ 0119-test-service-fix-race-in-attr-check.patch	2021-11-10 14:17:01.884079315 +0800
@@ -1 +1 @@
-From 4a985f4e84c56fa6d562b4e920c4912203b95eb6 Mon Sep 17 00:00:00 2001
+From cc7ded572d96e2438836ae07bba0473f9aa5f055 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4a985f4e84c56fa6d562b4e920c4912203b95eb6 ]
@@ -79 +81,0 @@
-Cc: stable@dpdk.org
@@ -89 +91 @@
-index 8659a1526c..ced6ed0081 100644
+index 8b61dcfd30..0aee8c04e3 100644
@@ -92 +94 @@
-@@ -318,10 +318,16 @@ service_attr_get(void)
+@@ -314,10 +314,16 @@ service_attr_get(void)

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

* [dpdk-stable] patch 'eal/x86: fix some CPU extended features definitions' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (118 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'test/service: fix race in attr check' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'bus/vmbus: fix ring buffer mapping in secondary process' " Xueming Li
                   ` (132 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c41706bb6e702b4173116a3c29afaf52640a50d1 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 8 Oct 2021 14:07:14 +0200
Subject: [PATCH] eal/x86: fix some CPU extended features definitions
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit aae3037ab1e020f68fa9e662aab31321cffcdc31 ]

Caught while checking CPUID related stuff in OVS.

According to [1], for Structured Extended Feature Flags Enumeration Leaf
(EAX = 0x07H, ECX = 0):

- BMI1 is associated to EBX, bit 3 (was incorrectly 2),
- SMEP is associated to EBX, bit 7 (was incorrectly 6),
- BMI2 is associated to EBX, bit 8 (was incorrectly 7),
- ERMS is associated to EBX, bit 9 (was incorrectly 8),

1: https://software.intel.com/sites/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf

Fixes: af75078fece3 ("first public release")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/x86/rte_cpuflags.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/x86/rte_cpuflags.c b/lib/librte_eal/x86/rte_cpuflags.c
index a96312ff7f..2fc9e84666 100644
--- a/lib/librte_eal/x86/rte_cpuflags.c
+++ b/lib/librte_eal/x86/rte_cpuflags.c
@@ -100,12 +100,12 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(ENERGY_EFF, 0x00000006, 0, RTE_REG_ECX,  3)
 
 	FEAT_DEF(FSGSBASE, 0x00000007, 0, RTE_REG_EBX,  0)
-	FEAT_DEF(BMI1, 0x00000007, 0, RTE_REG_EBX,  2)
+	FEAT_DEF(BMI1, 0x00000007, 0, RTE_REG_EBX,  3)
 	FEAT_DEF(HLE, 0x00000007, 0, RTE_REG_EBX,  4)
 	FEAT_DEF(AVX2, 0x00000007, 0, RTE_REG_EBX,  5)
-	FEAT_DEF(SMEP, 0x00000007, 0, RTE_REG_EBX,  6)
-	FEAT_DEF(BMI2, 0x00000007, 0, RTE_REG_EBX,  7)
-	FEAT_DEF(ERMS, 0x00000007, 0, RTE_REG_EBX,  8)
+	FEAT_DEF(SMEP, 0x00000007, 0, RTE_REG_EBX,  7)
+	FEAT_DEF(BMI2, 0x00000007, 0, RTE_REG_EBX,  8)
+	FEAT_DEF(ERMS, 0x00000007, 0, RTE_REG_EBX,  9)
 	FEAT_DEF(INVPCID, 0x00000007, 0, RTE_REG_EBX, 10)
 	FEAT_DEF(RTM, 0x00000007, 0, RTE_REG_EBX, 11)
 	FEAT_DEF(AVX512F, 0x00000007, 0, RTE_REG_EBX, 16)
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.311515722 +0800
+++ 0120-eal-x86-fix-some-CPU-extended-features-definitions.patch	2021-11-10 14:17:01.884079315 +0800
@@ -1 +1 @@
-From aae3037ab1e020f68fa9e662aab31321cffcdc31 Mon Sep 17 00:00:00 2001
+From c41706bb6e702b4173116a3c29afaf52640a50d1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit aae3037ab1e020f68fa9e662aab31321cffcdc31 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
- lib/eal/x86/rte_cpuflags.c | 8 ++++----
+ lib/librte_eal/x86/rte_cpuflags.c | 8 ++++----
@@ -27,4 +29,4 @@
-diff --git a/lib/eal/x86/rte_cpuflags.c b/lib/eal/x86/rte_cpuflags.c
-index d339734a8c..378fc95396 100644
---- a/lib/eal/x86/rte_cpuflags.c
-+++ b/lib/eal/x86/rte_cpuflags.c
+diff --git a/lib/librte_eal/x86/rte_cpuflags.c b/lib/librte_eal/x86/rte_cpuflags.c
+index a96312ff7f..2fc9e84666 100644
+--- a/lib/librte_eal/x86/rte_cpuflags.c
++++ b/lib/librte_eal/x86/rte_cpuflags.c

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

* [dpdk-stable] patch 'bus/vmbus: fix ring buffer mapping in secondary process' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (119 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'eal/x86: fix some CPU extended features definitions' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'eal/freebsd: ignore in-memory option' " Xueming Li
                   ` (131 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Long Li; +Cc: Luca Boccassi, Jonathan Erb, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From be9717a4ccb476be8188ec94dd010aeb86d53a75 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Wed, 29 Sep 2021 13:46:10 -0700
Subject: [PATCH] bus/vmbus: fix ring buffer mapping in secondary process
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 70cdd92e041acd7a0aad295f639f435fbe688190 ]

The driver code had wrong assumption that all the addresses to ring buffers
in the secondary process are the same as those in the primary process. This
is not always correct as the channels could be mapped to different
addresses in the secondary process.

Fix this by keeping track of all the mapped addresses from the primary
process in the shared uio_res, and have second process map to the same
addresses.

Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")

Reported-by: Jonathan Erb <jonathan.erb@banduracyber.com>
Signed-off-by: Long Li <longli@microsoft.com>
Acked-by: Stephen Hemminger <sthemmin@microsoft.com>
---
 drivers/bus/vmbus/linux/vmbus_uio.c  | 99 +++++++++++++++-------------
 drivers/bus/vmbus/private.h          | 15 ++++-
 drivers/bus/vmbus/vmbus_channel.c    |  4 +-
 drivers/bus/vmbus/vmbus_common_uio.c | 52 +++++++++++----
 4 files changed, 107 insertions(+), 63 deletions(-)

diff --git a/drivers/bus/vmbus/linux/vmbus_uio.c b/drivers/bus/vmbus/linux/vmbus_uio.c
index 5dc0c47de6..fd64be93b0 100644
--- a/drivers/bus/vmbus/linux/vmbus_uio.c
+++ b/drivers/bus/vmbus/linux/vmbus_uio.c
@@ -11,6 +11,7 @@
 #include <sys/stat.h>
 #include <sys/mman.h>
 
+#include <rte_eal.h>
 #include <rte_log.h>
 #include <rte_bus.h>
 #include <rte_memory.h>
@@ -203,6 +204,37 @@ static int vmbus_uio_map_subchan(const struct rte_vmbus_device *dev,
 	struct stat sb;
 	void *mapaddr;
 	int fd;
+	struct mapped_vmbus_resource *uio_res;
+	int channel_idx;
+
+	uio_res = vmbus_uio_find_resource(dev);
+	if (!uio_res) {
+		VMBUS_LOG(ERR, "can not find resources for mapping subchan");
+		return -ENOMEM;
+	}
+
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+		if (uio_res->nb_subchannels >= UIO_MAX_SUBCHANNEL) {
+			VMBUS_LOG(ERR,
+				"exceeding max subchannels UIO_MAX_SUBCHANNEL(%d)",
+				UIO_MAX_SUBCHANNEL);
+			VMBUS_LOG(ERR, "Change UIO_MAX_SUBCHANNEL and recompile");
+			return -ENOMEM;
+		}
+	} else {
+		for (channel_idx = 0; channel_idx < uio_res->nb_subchannels;
+		     channel_idx++)
+			if (uio_res->subchannel_maps[channel_idx].relid ==
+					chan->relid)
+				break;
+		if (channel_idx == uio_res->nb_subchannels) {
+			VMBUS_LOG(ERR,
+				"couldn't find sub channel %d from shared mapping in primary",
+				chan->relid);
+			return -ENOMEM;
+		}
+		vmbus_map_addr = uio_res->subchannel_maps[channel_idx].addr;
+	}
 
 	snprintf(ring_path, sizeof(ring_path),
 		 "%s/%s/channels/%u/ring",
@@ -239,58 +271,33 @@ static int vmbus_uio_map_subchan(const struct rte_vmbus_device *dev,
 	if (mapaddr == MAP_FAILED)
 		return -EIO;
 
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+
+		/* Add this mapping to uio_res for use by secondary */
+		uio_res->subchannel_maps[uio_res->nb_subchannels].relid =
+			chan->relid;
+		uio_res->subchannel_maps[uio_res->nb_subchannels].addr =
+			mapaddr;
+		uio_res->subchannel_maps[uio_res->nb_subchannels].size =
+			file_size;
+		uio_res->nb_subchannels++;
+
+		vmbus_map_addr = RTE_PTR_ADD(mapaddr, file_size);
+	} else {
+		if (mapaddr != vmbus_map_addr) {
+			VMBUS_LOG(ERR, "failed to map channel %d to addr %p",
+					chan->relid, mapaddr);
+			vmbus_unmap_resource(mapaddr, file_size);
+			return -EIO;
+		}
+	}
+
 	*ring_size = file_size / 2;
 	*ring_buf = mapaddr;
 
-	vmbus_map_addr = RTE_PTR_ADD(mapaddr, file_size);
 	return 0;
 }
 
-int
-vmbus_uio_map_secondary_subchan(const struct rte_vmbus_device *dev,
-				const struct vmbus_channel *chan)
-{
-	const struct vmbus_br *br = &chan->txbr;
-	char ring_path[PATH_MAX];
-	void *mapaddr, *ring_buf;
-	uint32_t ring_size;
-	int fd;
-
-	snprintf(ring_path, sizeof(ring_path),
-		 "%s/%s/channels/%u/ring",
-		 SYSFS_VMBUS_DEVICES, dev->device.name,
-		 chan->relid);
-
-	ring_buf = br->vbr;
-	ring_size = br->dsize + sizeof(struct vmbus_bufring);
-	VMBUS_LOG(INFO, "secondary ring_buf %p size %u",
-		  ring_buf, ring_size);
-
-	fd = open(ring_path, O_RDWR);
-	if (fd < 0) {
-		VMBUS_LOG(ERR, "Cannot open %s: %s",
-			  ring_path, strerror(errno));
-		return -errno;
-	}
-
-	mapaddr = vmbus_map_resource(ring_buf, fd, 0, 2 * ring_size, 0);
-	close(fd);
-
-	if (mapaddr == ring_buf)
-		return 0;
-
-	if (mapaddr == MAP_FAILED)
-		VMBUS_LOG(ERR,
-			  "mmap subchan %u in secondary failed", chan->relid);
-	else {
-		VMBUS_LOG(ERR,
-			  "mmap subchan %u in secondary address mismatch",
-			  chan->relid);
-		vmbus_unmap_resource(mapaddr, 2 * ring_size);
-	}
-	return -1;
-}
-
 int vmbus_uio_map_rings(struct vmbus_channel *chan)
 {
 	const struct rte_vmbus_device *dev = chan->device;
diff --git a/drivers/bus/vmbus/private.h b/drivers/bus/vmbus/private.h
index f19b14e4a6..74ef948282 100644
--- a/drivers/bus/vmbus/private.h
+++ b/drivers/bus/vmbus/private.h
@@ -36,6 +36,13 @@ struct vmbus_map {
 	uint64_t size;	/* length */
 };
 
+#define UIO_MAX_SUBCHANNEL 128
+struct subchannel_map {
+	uint16_t relid;
+	void *addr;
+	uint64_t size;
+};
+
 /*
  * For multi-process we need to reproduce all vmbus mappings in secondary
  * processes, so save them in a tailq.
@@ -44,10 +51,14 @@ struct mapped_vmbus_resource {
 	TAILQ_ENTRY(mapped_vmbus_resource) next;
 
 	rte_uuid_t id;
+
 	int nb_maps;
-	struct vmbus_channel *primary;
 	struct vmbus_map maps[VMBUS_MAX_RESOURCE];
+
 	char path[PATH_MAX];
+
+	int nb_subchannels;
+	struct subchannel_map subchannel_maps[UIO_MAX_SUBCHANNEL];
 };
 
 TAILQ_HEAD(mapped_vmbus_res_list, mapped_vmbus_resource);
@@ -108,8 +119,6 @@ bool vmbus_uio_subchannels_supported(const struct rte_vmbus_device *dev,
 int vmbus_uio_get_subchan(struct vmbus_channel *primary,
 			  struct vmbus_channel **subchan);
 int vmbus_uio_map_rings(struct vmbus_channel *chan);
-int vmbus_uio_map_secondary_subchan(const struct rte_vmbus_device *dev,
-				    const struct vmbus_channel *chan);
 
 void vmbus_br_setup(struct vmbus_br *br, void *buf, unsigned int blen);
 
diff --git a/drivers/bus/vmbus/vmbus_channel.c b/drivers/bus/vmbus/vmbus_channel.c
index f67f1c438a..119b9b367e 100644
--- a/drivers/bus/vmbus/vmbus_channel.c
+++ b/drivers/bus/vmbus/vmbus_channel.c
@@ -351,10 +351,8 @@ int rte_vmbus_chan_open(struct rte_vmbus_device *device,
 
 	err = vmbus_chan_create(device, device->relid, 0,
 				device->monitor_id, new_chan);
-	if (!err) {
+	if (!err)
 		device->primary = *new_chan;
-		uio_res->primary = *new_chan;
-	}
 
 	return err;
 }
diff --git a/drivers/bus/vmbus/vmbus_common_uio.c b/drivers/bus/vmbus/vmbus_common_uio.c
index a689bf11b3..158e05c889 100644
--- a/drivers/bus/vmbus/vmbus_common_uio.c
+++ b/drivers/bus/vmbus/vmbus_common_uio.c
@@ -69,8 +69,10 @@ vmbus_uio_map_secondary(struct rte_vmbus_device *dev)
 					     fd, offset,
 					     uio_res->maps[i].size, 0);
 
-		if (mapaddr == uio_res->maps[i].addr)
+		if (mapaddr == uio_res->maps[i].addr) {
+			dev->resource[i].addr = mapaddr;
 			continue;	/* successful map */
+		}
 
 		if (mapaddr == MAP_FAILED)
 			VMBUS_LOG(ERR,
@@ -88,19 +90,39 @@ vmbus_uio_map_secondary(struct rte_vmbus_device *dev)
 	/* fd is not needed in secondary process, close it */
 	close(fd);
 
-	dev->primary = uio_res->primary;
-	if (!dev->primary) {
-		VMBUS_LOG(ERR, "missing primary channel");
-		return -1;
+	/* Create and map primary channel */
+	if (vmbus_chan_create(dev, dev->relid, 0,
+					dev->monitor_id, &dev->primary)) {
+		VMBUS_LOG(ERR, "cannot create primary channel");
+		goto failed_primary;
 	}
 
-	STAILQ_FOREACH(chan, &dev->primary->subchannel_list, next) {
-		if (vmbus_uio_map_secondary_subchan(dev, chan) != 0) {
-			VMBUS_LOG(ERR, "cannot map secondary subchan");
-			return -1;
+	/* Create and map sub channels */
+	for (i = 0; i < uio_res->nb_subchannels; i++) {
+		if (rte_vmbus_subchan_open(dev->primary, &chan)) {
+			VMBUS_LOG(ERR,
+				"failed to create subchannel at index %d", i);
+			goto failed_secondary;
 		}
 	}
+
 	return 0;
+
+failed_secondary:
+	while (!STAILQ_EMPTY(&dev->primary->subchannel_list)) {
+		chan = STAILQ_FIRST(&dev->primary->subchannel_list);
+		vmbus_unmap_resource(chan->txbr.vbr, chan->txbr.dsize * 2);
+		rte_vmbus_chan_close(chan);
+	}
+	rte_vmbus_chan_close(dev->primary);
+
+failed_primary:
+	for (i = 0; i != uio_res->nb_maps; i++) {
+		vmbus_unmap_resource(
+				uio_res->maps[i].addr, uio_res->maps[i].size);
+	}
+
+	return -1;
 }
 
 static int
@@ -188,6 +210,11 @@ vmbus_uio_unmap(struct mapped_vmbus_resource *uio_res)
 	if (uio_res == NULL)
 		return;
 
+	for (i = 0; i < uio_res->nb_subchannels; i++) {
+		vmbus_unmap_resource(uio_res->subchannel_maps[i].addr,
+				uio_res->subchannel_maps[i].size);
+	}
+
 	for (i = 0; i != uio_res->nb_maps; i++) {
 		vmbus_unmap_resource(uio_res->maps[i].addr,
 				     (size_t)uio_res->maps[i].size);
@@ -211,8 +238,11 @@ vmbus_uio_unmap_resource(struct rte_vmbus_device *dev)
 		return;
 
 	/* secondary processes - just free maps */
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return vmbus_uio_unmap(uio_res);
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+		vmbus_uio_unmap(uio_res);
+		rte_free(dev->primary);
+		return;
+	}
 
 	TAILQ_REMOVE(uio_res_list, uio_res, next);
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.352933455 +0800
+++ 0121-bus-vmbus-fix-ring-buffer-mapping-in-secondary-proce.patch	2021-11-10 14:17:01.884079315 +0800
@@ -1 +1 @@
-From 70cdd92e041acd7a0aad295f639f435fbe688190 Mon Sep 17 00:00:00 2001
+From be9717a4ccb476be8188ec94dd010aeb86d53a75 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 70cdd92e041acd7a0aad295f639f435fbe688190 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index b52ca5bf1d..70b0d098e0 100644
+index 5dc0c47de6..fd64be93b0 100644
@@ -159 +161 @@
-index 528d60a42f..1bca147e12 100644
+index f19b14e4a6..74ef948282 100644
@@ -162 +164 @@
-@@ -33,6 +33,13 @@ struct vmbus_map {
+@@ -36,6 +36,13 @@ struct vmbus_map {
@@ -176 +178 @@
-@@ -41,10 +48,14 @@ struct mapped_vmbus_resource {
+@@ -44,10 +51,14 @@ struct mapped_vmbus_resource {
@@ -192 +194 @@
-@@ -105,8 +116,6 @@ bool vmbus_uio_subchannels_supported(const struct rte_vmbus_device *dev,
+@@ -108,8 +119,6 @@ bool vmbus_uio_subchannels_supported(const struct rte_vmbus_device *dev,
@@ -218 +220 @@
-index 8582e32c1d..041712fe75 100644
+index a689bf11b3..158e05c889 100644

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

* [dpdk-stable] patch 'eal/freebsd: ignore in-memory option' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (120 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'bus/vmbus: fix ring buffer mapping in secondary process' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'telemetry: fix JSON output buffer length' " Xueming Li
                   ` (130 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 341804051a43c954a195b11163529eda40f27063 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 13 Sep 2021 15:34:24 +0100
Subject: [PATCH] eal/freebsd: ignore in-memory option
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0faa4cfc50275751a86ed17147175c78a36f0da2 ]

The in-memory option is not supported on FreeBSD so print a warning and
ignore the flag when it is specified for BSD apps. The lack of support
is due to the different way in which memory is managed on FreeBSD using
the contigmem driver rather than via a hugetlbfs filesystem.

Fixes: 14de8734c401 ("eal: add --in-memory option")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/freebsd/eal.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
index 77b42de416..d784437669 100644
--- a/lib/librte_eal/freebsd/eal.c
+++ b/lib/librte_eal/freebsd/eal.c
@@ -716,6 +716,10 @@ rte_eal_init(int argc, char **argv)
 
 	/* FreeBSD always uses legacy memory model */
 	internal_conf->legacy_mem = true;
+	if (internal_conf->in_memory) {
+		RTE_LOG(WARNING, EAL, "Warning: ignoring unsupported flag, '%s'\n", OPT_IN_MEMORY);
+		internal_conf->in_memory = false;
+	}
 
 	if (eal_plugins_init() < 0) {
 		rte_eal_init_alert("Cannot init plugins");
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.395501533 +0800
+++ 0122-eal-freebsd-ignore-in-memory-option.patch	2021-11-10 14:17:01.884079315 +0800
@@ -1 +1 @@
-From 0faa4cfc50275751a86ed17147175c78a36f0da2 Mon Sep 17 00:00:00 2001
+From 341804051a43c954a195b11163529eda40f27063 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0faa4cfc50275751a86ed17147175c78a36f0da2 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- lib/eal/freebsd/eal.c | 4 ++++
+ lib/librte_eal/freebsd/eal.c | 4 ++++
@@ -19,5 +21,5 @@
-diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c
-index 6cee5ae369..fb734012a4 100644
---- a/lib/eal/freebsd/eal.c
-+++ b/lib/eal/freebsd/eal.c
-@@ -718,6 +718,10 @@ rte_eal_init(int argc, char **argv)
+diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
+index 77b42de416..d784437669 100644
+--- a/lib/librte_eal/freebsd/eal.c
++++ b/lib/librte_eal/freebsd/eal.c
+@@ -716,6 +716,10 @@ rte_eal_init(int argc, char **argv)

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

* [dpdk-stable] patch 'telemetry: fix JSON output buffer length' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (121 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'eal/freebsd: ignore in-memory option' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'mbuf: fix typo in comment' " Xueming Li
                   ` (129 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: Luca Boccassi, Ciara Power, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From aa4a2ef3fee892f204a04bef2329e65775510f38 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Mon, 11 Oct 2021 16:24:43 +0530
Subject: [PATCH] telemetry: fix JSON output buffer length
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b76731683b048337d853cca4fa1530218b82aa40 ]

Earlier, JSON message length was limited to 1024 which would not
allow data more than this size. Removed this limitation by creating
output buffer based on requested data length.

Fixes: 52af6ccb2b39 ("telemetry: add utility functions for creating JSON")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
 lib/librte_telemetry/telemetry_json.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_telemetry/telemetry_json.h b/lib/librte_telemetry/telemetry_json.h
index ad270b9b30..f02a12f5b0 100644
--- a/lib/librte_telemetry/telemetry_json.h
+++ b/lib/librte_telemetry/telemetry_json.h
@@ -9,6 +9,7 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <rte_common.h>
+#include <rte_telemetry.h>
 
 /**
  * @file
@@ -23,13 +24,13 @@
  * @internal
  * Copies a value into a buffer if the buffer has enough available space.
  * Nothing written to buffer if an overflow ocurs.
- * This function is not for use for values larger than 1k.
+ * This function is not for use for values larger than given buffer length.
  */
 __rte_format_printf(3, 4)
 static inline int
 __json_snprintf(char *buf, const int len, const char *format, ...)
 {
-	char tmp[1024];
+	char tmp[len];
 	va_list ap;
 	int ret;
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.437541909 +0800
+++ 0123-telemetry-fix-JSON-output-buffer-length.patch	2021-11-10 14:17:01.884079315 +0800
@@ -1 +1 @@
-From b76731683b048337d853cca4fa1530218b82aa40 Mon Sep 17 00:00:00 2001
+From aa4a2ef3fee892f204a04bef2329e65775510f38 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b76731683b048337d853cca4fa1530218b82aa40 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- lib/telemetry/telemetry_json.h | 5 +++--
+ lib/librte_telemetry/telemetry_json.h | 5 +++--
@@ -19 +21 @@
-diff --git a/lib/telemetry/telemetry_json.h b/lib/telemetry/telemetry_json.h
+diff --git a/lib/librte_telemetry/telemetry_json.h b/lib/librte_telemetry/telemetry_json.h
@@ -21,2 +23,2 @@
---- a/lib/telemetry/telemetry_json.h
-+++ b/lib/telemetry/telemetry_json.h
+--- a/lib/librte_telemetry/telemetry_json.h
++++ b/lib/librte_telemetry/telemetry_json.h

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

* [dpdk-stable] patch 'mbuf: fix typo in comment' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (122 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'telemetry: fix JSON output buffer length' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'ip_frag: fix fragmenting IPv4 fragment' " Xueming Li
                   ` (128 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Luca Boccassi, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2bd66f32c915d16366be10ade4b3e51361e9fb59 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 1 Sep 2021 16:49:44 -0700
Subject: [PATCH] mbuf: fix typo in comment
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d75eed0fbe4b942bc6df2e2908a8b5c2c30c99aa ]

Misspelling of 'copied'

Fixes: c3a90c381daa ("mbuf: add a copy routine")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mbuf/rte_mbuf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index c4c9ebfaa0..3aece65e9d 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -1450,7 +1450,7 @@ rte_pktmbuf_clone(struct rte_mbuf *md, struct rte_mempool *mp);
  * set of mbufs. The private data are is not copied.
  *
  * @param m
- *   The packet mbuf to be copiedd.
+ *   The packet mbuf to be copied.
  * @param mp
  *   The mempool from which the "clone" mbufs are allocated.
  * @param offset
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.476346348 +0800
+++ 0124-mbuf-fix-typo-in-comment.patch	2021-11-10 14:17:01.887412621 +0800
@@ -1 +1 @@
-From d75eed0fbe4b942bc6df2e2908a8b5c2c30c99aa Mon Sep 17 00:00:00 2001
+From 2bd66f32c915d16366be10ade4b3e51361e9fb59 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d75eed0fbe4b942bc6df2e2908a8b5c2c30c99aa ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -14 +16 @@
- lib/mbuf/rte_mbuf.h | 2 +-
+ lib/librte_mbuf/rte_mbuf.h | 2 +-
@@ -17,5 +19,5 @@
-diff --git a/lib/mbuf/rte_mbuf.h b/lib/mbuf/rte_mbuf.h
-index a3bfc9fe9a..ec2f4bb188 100644
---- a/lib/mbuf/rte_mbuf.h
-+++ b/lib/mbuf/rte_mbuf.h
-@@ -1430,7 +1430,7 @@ rte_pktmbuf_clone(struct rte_mbuf *md, struct rte_mempool *mp);
+diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
+index c4c9ebfaa0..3aece65e9d 100644
+--- a/lib/librte_mbuf/rte_mbuf.h
++++ b/lib/librte_mbuf/rte_mbuf.h
+@@ -1450,7 +1450,7 @@ rte_pktmbuf_clone(struct rte_mbuf *md, struct rte_mempool *mp);

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

* [dpdk-stable] patch 'ip_frag: fix fragmenting IPv4 fragment' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (123 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'mbuf: fix typo in comment' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:57   ` Huichao Cai
  2021-11-10  6:30 ` [dpdk-stable] patch 'test/atomic: fix 128-bit atomic test with many cores' " Xueming Li
                   ` (127 subsequent siblings)
  252 siblings, 1 reply; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Huichao Cai; +Cc: Luca Boccassi, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8250620e98bcc548945a3879d861ad9d9ee542c3 Mon Sep 17 00:00:00 2001
From: Huichao Cai <chcchc88@163.com>
Date: Sat, 9 Oct 2021 15:27:04 +0800
Subject: [PATCH] ip_frag: fix fragmenting IPv4 fragment
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 567473433b7e63e12943be29926c13bd491bcca6 ]

Current implementation of rte_ipv4_fragment_packet() doesn’t take
into account offset and flag values of the given packet, but blindly
assumes they are always zero (original packet is not fragmented).
According to RFC791, fragment and flag values for new fragment
should take into account values provided in the original IPv4 packet.

Fixes: 4c38e5532a07 ("ip_frag: refactor IPv4 fragmentation into a proper library")

Signed-off-by: Huichao Cai <chcchc88@163.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_ip_frag/rte_ipv4_fragmentation.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/librte_ip_frag/rte_ipv4_fragmentation.c b/lib/librte_ip_frag/rte_ipv4_fragmentation.c
index 2e7739d027..fead5a985a 100644
--- a/lib/librte_ip_frag/rte_ipv4_fragmentation.c
+++ b/lib/librte_ip_frag/rte_ipv4_fragmentation.c
@@ -75,7 +75,7 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
 	uint32_t out_pkt_pos, in_seg_data_pos;
 	uint32_t more_in_segs;
 	uint16_t fragment_offset, flag_offset, frag_size, header_len;
-	uint16_t frag_bytes_remaining;
+	uint16_t frag_bytes_remaining, not_last_frag;
 
 	/*
 	 * Formal parameter checking.
@@ -116,7 +116,9 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
 	in_seg = pkt_in;
 	in_seg_data_pos = header_len;
 	out_pkt_pos = 0;
-	fragment_offset = 0;
+	fragment_offset = (uint16_t)((flag_offset &
+	    RTE_IPV4_HDR_OFFSET_MASK) << RTE_IPV4_HDR_FO_SHIFT);
+	not_last_frag = (uint16_t)(flag_offset & IPV4_HDR_MF_MASK);
 
 	more_in_segs = 1;
 	while (likely(more_in_segs)) {
@@ -186,7 +188,8 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
 
 		__fill_ipv4hdr_frag(out_hdr, in_hdr, header_len,
 		    (uint16_t)out_pkt->pkt_len,
-		    flag_offset, fragment_offset, more_in_segs);
+		    flag_offset, fragment_offset,
+		    not_last_frag || more_in_segs);
 
 		fragment_offset = (uint16_t)(fragment_offset +
 		    out_pkt->pkt_len - header_len);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.516214039 +0800
+++ 0125-ip_frag-fix-fragmenting-IPv4-fragment.patch	2021-11-10 14:17:01.887412621 +0800
@@ -1 +1 @@
-From 567473433b7e63e12943be29926c13bd491bcca6 Mon Sep 17 00:00:00 2001
+From 8250620e98bcc548945a3879d861ad9d9ee542c3 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 567473433b7e63e12943be29926c13bd491bcca6 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
- lib/ip_frag/rte_ipv4_fragmentation.c | 9 ++++++---
+ lib/librte_ip_frag/rte_ipv4_fragmentation.c | 9 ++++++---
@@ -24 +26 @@
-diff --git a/lib/ip_frag/rte_ipv4_fragmentation.c b/lib/ip_frag/rte_ipv4_fragmentation.c
+diff --git a/lib/librte_ip_frag/rte_ipv4_fragmentation.c b/lib/librte_ip_frag/rte_ipv4_fragmentation.c
@@ -26,2 +28,2 @@
---- a/lib/ip_frag/rte_ipv4_fragmentation.c
-+++ b/lib/ip_frag/rte_ipv4_fragmentation.c
+--- a/lib/librte_ip_frag/rte_ipv4_fragmentation.c
++++ b/lib/librte_ip_frag/rte_ipv4_fragmentation.c

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

* [dpdk-stable] patch 'test/atomic: fix 128-bit atomic test with many cores' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (124 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'ip_frag: fix fragmenting IPv4 fragment' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'mbuf: enforce no option for dynamic fields and flags' " Xueming Li
                   ` (126 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: David Christensen; +Cc: Luca Boccassi, Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0f93cfa12ee8255eed7ca9a92ecb56f886922d7a Mon Sep 17 00:00:00 2001
From: David Christensen <drc@linux.vnet.ibm.com>
Date: Wed, 8 Sep 2021 10:48:20 -0700
Subject: [PATCH] test/atomic: fix 128-bit atomic test with many cores
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 17a042376be17f6c615b93b189a53eaca1b8bd48 ]

When checking the results of the rte_atomic128_cmp_exchange() function,
current code compares the values of a uint32_t and a uint64_t variable.
If the number of lcores used by the test is large, or the value of the
iteration count N is increased, the variable size mismatch can cause a
false test failure.  Modify the comparison to compare uint64_t values.

Fixes: fa3253c534b1 ("test/atomic: add 128-bit atomic compare exchange test")

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Tested-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 app/test/test_atomic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_atomic.c b/app/test/test_atomic.c
index f10f555af8..ce0c259bd7 100644
--- a/app/test/test_atomic.c
+++ b/app/test/test_atomic.c
@@ -591,7 +591,7 @@ test_atomic(void)
 	rte_atomic32_clear(&synchro);
 
 	iterations = count128.val[0] - count128.val[1];
-	if (iterations != 4*N*(rte_lcore_count()-1)) {
+	if (iterations != (uint64_t)4*N*(rte_lcore_count()-1)) {
 		printf("128-bit compare and swap failed\n");
 		return -1;
 	}
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.555331570 +0800
+++ 0126-test-atomic-fix-128-bit-atomic-test-with-many-cores.patch	2021-11-10 14:17:01.887412621 +0800
@@ -1 +1 @@
-From 17a042376be17f6c615b93b189a53eaca1b8bd48 Mon Sep 17 00:00:00 2001
+From 0f93cfa12ee8255eed7ca9a92ecb56f886922d7a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 17a042376be17f6c615b93b189a53eaca1b8bd48 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'mbuf: enforce no option for dynamic fields and flags' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (125 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'test/atomic: fix 128-bit atomic test with many cores' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'mempool: deprecate unused physical page defines' " Xueming Li
                   ` (125 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: David Marchand
  Cc: Luca Boccassi, Stephen Hemminger, Andrew Rybchenko, Ray Kinsella,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c24b889037a2852b55fb03e90797afa7c2f5bafa Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 12 Oct 2021 21:39:57 +0200
Subject: [PATCH] mbuf: enforce no option for dynamic fields and flags
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e9123c467dbb471a2d41ea896423a81886ef89d7 ]

As stated in the API, dynamic field and flags should be created with no
additional flag (simply in the API for future changes).

Fix the dynamic flag register helper which was not enforcing it and add
unit tests.

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
---
 app/test/test_mbuf.c           | 18 ++++++++++++++++++
 lib/librte_mbuf/rte_mbuf_dyn.c |  4 ++++
 2 files changed, 22 insertions(+)

diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 5bb4786e5a..2bccaa03b1 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -2577,6 +2577,16 @@ test_mbuf_dyn(struct rte_mempool *pktmbuf_pool)
 		.align = 3,
 		.flags = 0,
 	};
+	const struct rte_mbuf_dynfield dynfield_fail_flag = {
+		.name = "test-dynfield",
+		.size = sizeof(uint8_t),
+		.align = __alignof__(uint8_t),
+		.flags = 1,
+	};
+	const struct rte_mbuf_dynflag dynflag_fail_flag = {
+		.name = "test-dynflag",
+		.flags = 1,
+	};
 	const struct rte_mbuf_dynflag dynflag = {
 		.name = "test-dynflag",
 		.flags = 0,
@@ -2638,6 +2648,14 @@ test_mbuf_dyn(struct rte_mempool *pktmbuf_pool)
 	if (ret != -1)
 		GOTO_FAIL("dynamic field creation should fail (not avail)");
 
+	ret = rte_mbuf_dynfield_register(&dynfield_fail_flag);
+	if (ret != -1)
+		GOTO_FAIL("dynamic field creation should fail (invalid flag)");
+
+	ret = rte_mbuf_dynflag_register(&dynflag_fail_flag);
+	if (ret != -1)
+		GOTO_FAIL("dynamic flag creation should fail (invalid flag)");
+
 	flag = rte_mbuf_dynflag_register(&dynflag);
 	if (flag == -1)
 		GOTO_FAIL("failed to register dynamic flag, flag=%d: %s",
diff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c
index ca46eb279e..d55e162a68 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.c
+++ b/lib/librte_mbuf/rte_mbuf_dyn.c
@@ -498,6 +498,10 @@ rte_mbuf_dynflag_register_bitnum(const struct rte_mbuf_dynflag *params,
 {
 	int ret;
 
+	if (params->flags != 0) {
+		rte_errno = EINVAL;
+		return -1;
+	}
 	if (req >= RTE_SIZEOF_FIELD(struct rte_mbuf, ol_flags) * CHAR_BIT &&
 			req != UINT_MAX) {
 		rte_errno = EINVAL;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.594619788 +0800
+++ 0127-mbuf-enforce-no-option-for-dynamic-fields-and-flags.patch	2021-11-10 14:17:01.887412621 +0800
@@ -1 +1 @@
-From e9123c467dbb471a2d41ea896423a81886ef89d7 Mon Sep 17 00:00:00 2001
+From c24b889037a2852b55fb03e90797afa7c2f5bafa Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e9123c467dbb471a2d41ea896423a81886ef89d7 ]
@@ -19,2 +22,2 @@
- app/test/test_mbuf.c    | 18 ++++++++++++++++++
- lib/mbuf/rte_mbuf_dyn.c |  4 ++++
+ app/test/test_mbuf.c           | 18 ++++++++++++++++++
+ lib/librte_mbuf/rte_mbuf_dyn.c |  4 ++++
@@ -24 +27 @@
-index 9a248dfaea..82777109dc 100644
+index 5bb4786e5a..2bccaa03b1 100644
@@ -59 +62 @@
-diff --git a/lib/mbuf/rte_mbuf_dyn.c b/lib/mbuf/rte_mbuf_dyn.c
+diff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c
@@ -61,2 +64,2 @@
---- a/lib/mbuf/rte_mbuf_dyn.c
-+++ b/lib/mbuf/rte_mbuf_dyn.c
+--- a/lib/librte_mbuf/rte_mbuf_dyn.c
++++ b/lib/librte_mbuf/rte_mbuf_dyn.c

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

* [dpdk-stable] patch 'mempool: deprecate unused physical page defines' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (126 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'mbuf: enforce no option for dynamic fields and flags' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'app/crypto-perf: fix AAD template copy overrun' " Xueming Li
                   ` (124 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Luca Boccassi, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f4860fc14a96f04d552b3580ac337a3cd23f00ae Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Date: Tue, 19 Oct 2021 20:40:22 +0300
Subject: [PATCH] mempool: deprecate unused physical page defines
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit fb11ae88165cdea37cc3b86f045ac0e899aa4e77 ]

MEMPOOL_PG_NUM_DEFAULT and MEMPOOL_PG_SHIFT_MAX are not used.

Fixes: fd943c764a63 ("mempool: deprecate xmem functions")

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 doc/guides/contributing/documentation.rst | 4 ++--
 doc/guides/rel_notes/deprecation.rst      | 3 +++
 lib/librte_mempool/rte_mempool.h          | 7 ++++---
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/doc/guides/contributing/documentation.rst b/doc/guides/contributing/documentation.rst
index 1e998fd214..7c76b32dbf 100644
--- a/doc/guides/contributing/documentation.rst
+++ b/doc/guides/contributing/documentation.rst
@@ -649,7 +649,7 @@ The following are some guidelines for use of Doxygen in the DPDK API documentati
      /**< Virtual address of the first mempool object. */
      uintptr_t   elt_va_end;
      /**< Virtual address of the <size + 1> mempool object. */
-     phys_addr_t elt_pa[MEMPOOL_PG_NUM_DEFAULT];
+     phys_addr_t elt_pa[1];
      /**< Array of physical page addresses for the mempool buffer. */
 
   This doesn't have an effect on the rendered documentation but it is confusing for the developer reading the code.
@@ -668,7 +668,7 @@ The following are some guidelines for use of Doxygen in the DPDK API documentati
      /** Virtual address of the <size + 1> mempool object. */
      uintptr_t   elt_va_end;
      /** Array of physical page addresses for the mempool buffer. */
-     phys_addr_t elt_pa[MEMPOOL_PG_NUM_DEFAULT];
+     phys_addr_t elt_pa[1];
 
 * Read the rendered section of the documentation that you have added for correctness, clarity and consistency
   with the surrounding text.
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index c0d7efaba8..cf11196748 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -40,6 +40,9 @@ Deprecation Notices
   ``__atomic_thread_fence`` must be used for patches that need to be merged in
   20.08 onwards. This change will not introduce any performance degradation.
 
+* mempool: The mempool API macros ``MEMPOOL_PG_*`` are deprecated and
+  will be removed in DPDK 22.11.
+
 * lib: will fix extending some enum/define breaking the ABI. There are multiple
   samples in DPDK that enum/define terminated with a ``.*MAX.*`` value which is
   used by iterators, and arrays holding these values are sized with this
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index c551cf733a..9c990a5593 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -112,10 +112,11 @@ struct rte_mempool_objsz {
 /* "MP_<name>" */
 #define	RTE_MEMPOOL_MZ_FORMAT	RTE_MEMPOOL_MZ_PREFIX "%s"
 
-#define	MEMPOOL_PG_SHIFT_MAX	(sizeof(uintptr_t) * CHAR_BIT - 1)
+#define	MEMPOOL_PG_SHIFT_MAX \
+	RTE_DEPRECATED(MEMPOOL_PG_SHIFT_MAX) (sizeof(uintptr_t) * CHAR_BIT - 1)
 
-/** Mempool over one chunk of physically continuous memory */
-#define	MEMPOOL_PG_NUM_DEFAULT	1
+/** Deprecated. Mempool over one chunk of physically continuous memory */
+#define	MEMPOOL_PG_NUM_DEFAULT	RTE_DEPRECATED(MEMPOOL_PG_NUM_DEFAULT) 1
 
 #ifndef RTE_MEMPOOL_ALIGN
 /**
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.635858274 +0800
+++ 0128-mempool-deprecate-unused-physical-page-defines.patch	2021-11-10 14:17:01.890745927 +0800
@@ -1 +1 @@
-From fb11ae88165cdea37cc3b86f045ac0e899aa4e77 Mon Sep 17 00:00:00 2001
+From f4860fc14a96f04d552b3580ac337a3cd23f00ae Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fb11ae88165cdea37cc3b86f045ac0e899aa4e77 ]
@@ -15,3 +18,2 @@
- doc/guides/rel_notes/release_21_11.rst    | 3 +++
- lib/mempool/rte_mempool.h                 | 7 ++++---
- 4 files changed, 12 insertions(+), 5 deletions(-)
+ lib/librte_mempool/rte_mempool.h          | 7 ++++---
+ 3 files changed, 9 insertions(+), 5 deletions(-)
@@ -20 +22 @@
-index 8cbd4a0f6f..7fcbb7fc43 100644
+index 1e998fd214..7c76b32dbf 100644
@@ -23 +25 @@
-@@ -705,7 +705,7 @@ The following are some guidelines for use of Doxygen in the DPDK API documentati
+@@ -649,7 +649,7 @@ The following are some guidelines for use of Doxygen in the DPDK API documentati
@@ -32 +34 @@
-@@ -724,7 +724,7 @@ The following are some guidelines for use of Doxygen in the DPDK API documentati
+@@ -668,7 +668,7 @@ The following are some guidelines for use of Doxygen in the DPDK API documentati
@@ -42 +44 @@
-index 0095d48084..c59dd5ca98 100644
+index c0d7efaba8..cf11196748 100644
@@ -45,17 +47,3 @@
-@@ -47,6 +47,9 @@ Deprecation Notices
-   deprecated and will be removed in DPDK 22.11. Use replacement macro
-   ``RTE_MEMPOOL_REGISTER_OPS()``.
- 
-+* mempool: The mempool API macros ``MEMPOOL_PG_*`` are deprecated and
-+  will be removed in DPDK 22.11.
-+
- * mbuf: The mbuf offload flags ``PKT_*`` will be renamed as ``RTE_MBUF_F_*``.
-   A compatibility layer will be kept until DPDK 22.11, except for the flags
-   that are already deprecated (``PKT_RX_L4_CKSUM_BAD``, ``PKT_RX_IP_CKSUM_BAD``,
-diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst
-index a8dd8031c0..bdaefd236d 100644
---- a/doc/guides/rel_notes/release_21_11.rst
-+++ b/doc/guides/rel_notes/release_21_11.rst
-@@ -239,6 +239,9 @@ API Changes
- * mempool: Macro to register mempool driver ``MEMPOOL_REGISTER_OPS()`` is
-   deprecated.  Use replacement ``RTE_MEMPOOL_REGISTER_OPS()``.
+@@ -40,6 +40,9 @@ Deprecation Notices
+   ``__atomic_thread_fence`` must be used for patches that need to be merged in
+   20.08 onwards. This change will not introduce any performance degradation.
@@ -66,8 +54,8 @@
- * net: Renamed ``s_addr`` and ``d_addr`` fields of ``rte_ether_hdr`` structure
-   to ``src_addr`` and ``dst_addr``, respectively.
- 
-diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h
-index 657233ce45..300dbdea4a 100644
---- a/lib/mempool/rte_mempool.h
-+++ b/lib/mempool/rte_mempool.h
-@@ -116,10 +116,11 @@ struct rte_mempool_objsz {
+ * lib: will fix extending some enum/define breaking the ABI. There are multiple
+   samples in DPDK that enum/define terminated with a ``.*MAX.*`` value which is
+   used by iterators, and arrays holding these values are sized with this
+diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
+index c551cf733a..9c990a5593 100644
+--- a/lib/librte_mempool/rte_mempool.h
++++ b/lib/librte_mempool/rte_mempool.h
+@@ -112,10 +112,11 @@ struct rte_mempool_objsz {

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

* [dpdk-stable] patch 'app/crypto-perf: fix AAD template copy overrun' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (127 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'mempool: deprecate unused physical page defines' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'cryptodev: fix multi-segment raw vector processing' " Xueming Li
                   ` (123 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Przemyslaw Zegan; +Cc: Luca Boccassi, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2c8268b307e45be2a6dc8137e55b5e8389a4ca89 Mon Sep 17 00:00:00 2001
From: Przemyslaw Zegan <przemyslawx.zegan@intel.com>
Date: Tue, 12 Oct 2021 12:56:11 +0000
Subject: [PATCH] app/crypto-perf: fix AAD template copy overrun
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 49c19c94dc67a3db2f8534a1e6ca253e1f08fff7 ]

This patch fixes a possible buffer overrun problem in crypto perf test.
Previously when user configured AAD size is over 12 bytes the copy
of template AAD will cause a buffer overrun.
The problem is fixed by only copy up to 12 bytes of AAD template.

Fixes: 8a5b494a7f99 ("app/test-crypto-perf: add AEAD parameters")

Signed-off-by: Przemyslaw Zegan <przemyslawx.zegan@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 app/test-crypto-perf/cperf_test_vectors.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app/test-crypto-perf/cperf_test_vectors.c b/app/test-crypto-perf/cperf_test_vectors.c
index 0af01ff911..167bf87bc4 100644
--- a/app/test-crypto-perf/cperf_test_vectors.c
+++ b/app/test-crypto-perf/cperf_test_vectors.c
@@ -554,6 +554,10 @@ cperf_test_vector_get_dummy(struct cperf_options *options)
 				rte_free(t_vec);
 				return NULL;
 			}
+
+			if (options->aead_aad_sz > sizeof(aad))
+				options->aead_aad_sz = sizeof(aad);
+
 			memcpy(t_vec->aad.data, aad, options->aead_aad_sz);
 			t_vec->aad.phys_addr = rte_malloc_virt2iova(t_vec->aad.data);
 			t_vec->aad.length = options->aead_aad_sz;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.678303986 +0800
+++ 0129-app-crypto-perf-fix-AAD-template-copy-overrun.patch	2021-11-10 14:17:01.890745927 +0800
@@ -1 +1 @@
-From 49c19c94dc67a3db2f8534a1e6ca253e1f08fff7 Mon Sep 17 00:00:00 2001
+From 2c8268b307e45be2a6dc8137e55b5e8389a4ca89 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 49c19c94dc67a3db2f8534a1e6ca253e1f08fff7 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 4bba405961..7da1a8fa2e 100644
+index 0af01ff911..167bf87bc4 100644
@@ -24 +26 @@
-@@ -590,6 +590,10 @@ cperf_test_vector_get_dummy(struct cperf_options *options)
+@@ -554,6 +554,10 @@ cperf_test_vector_get_dummy(struct cperf_options *options)

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

* [dpdk-stable] patch 'cryptodev: fix multi-segment raw vector processing' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (128 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'app/crypto-perf: fix AAD template copy overrun' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'test/bpf: fix undefined behavior with clang' " Xueming Li
                   ` (122 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Gagandeep Singh
  Cc: Luca Boccassi, Konstantin Ananyev, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3d67f2c1c3f1ea58d87fcccdb673f045d4f67082 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Thu, 14 Oct 2021 00:30:21 +0530
Subject: [PATCH] cryptodev: fix multi-segment raw vector processing
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8edcb68fd01b6a1e47549be389335cfef042ea05 ]

If no next segment available the “for” loop will fail and it still
returns i+1 i.e. 2, which is wrong as it has filled only 1 buffer.

Fixes: 7adf992fb9bf ("cryptodev: introduce CPU crypto API")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 lib/librte_cryptodev/rte_crypto_sym.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h
index 9d572ec057..406c5c7a5c 100644
--- a/lib/librte_cryptodev/rte_crypto_sym.h
+++ b/lib/librte_cryptodev/rte_crypto_sym.h
@@ -963,6 +963,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
 			/* whole requested data is completed */
 			vec[i].len = left;
 			left = 0;
+			i++;
 			break;
 		}
 
@@ -972,7 +973,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
 	}
 
 	RTE_ASSERT(left == 0);
-	return i + 1;
+	return i;
 }
 
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.723070176 +0800
+++ 0130-cryptodev-fix-multi-segment-raw-vector-processing.patch	2021-11-10 14:17:01.890745927 +0800
@@ -1 +1 @@
-From 8edcb68fd01b6a1e47549be389335cfef042ea05 Mon Sep 17 00:00:00 2001
+From 3d67f2c1c3f1ea58d87fcccdb673f045d4f67082 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8edcb68fd01b6a1e47549be389335cfef042ea05 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
- lib/cryptodev/rte_crypto_sym.h | 3 ++-
+ lib/librte_cryptodev/rte_crypto_sym.h | 3 ++-
@@ -22,5 +24,5 @@
-diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h
-index c907b1646d..daa090b978 100644
---- a/lib/cryptodev/rte_crypto_sym.h
-+++ b/lib/cryptodev/rte_crypto_sym.h
-@@ -990,6 +990,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
+diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h
+index 9d572ec057..406c5c7a5c 100644
+--- a/lib/librte_cryptodev/rte_crypto_sym.h
++++ b/lib/librte_cryptodev/rte_crypto_sym.h
+@@ -963,6 +963,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
@@ -34 +36 @@
-@@ -999,7 +1000,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
+@@ -972,7 +973,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,

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

* [dpdk-stable] patch 'test/bpf: fix undefined behavior with clang' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (129 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'cryptodev: fix multi-segment raw vector processing' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/af_xdp: disable secondary process support' " Xueming Li
                   ` (121 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Luca Boccassi, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9f78abfa183b2b85f21d55d9684aed32b4f6ac54 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Mon, 18 Oct 2021 14:40:52 +0100
Subject: [PATCH] test/bpf: fix undefined behavior with clang
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3ac2dffae88e8eb5c374b1fdd40d605014526510 ]

test_shift1_check() function fails with clang build.
The reason for that is that clang uses 64-bit shift instruction for
what expected to be 32-bit operation.
To be more specific, this C code:
r2 = (uint32_t)r2 >> r4;
With clang produces:
41a4eb:       48 d3 ef                shr    %cl,%rdi
In that particular case it is an allowed choice, as from one side
left-operand value is known to fit into 32 bits, from other side
according to 'C' standard:
"...if the value of the right operand is negative or is greater than
or equal to the width of the promoted left operand, the behavior is
undefined."
The problem is that on x86 behavior for 64-bit and 32-bit shift
operation might differ.
The fix avoids undefined behavior by making sure
that right operand will not exceed width of the promoted left operand.

Bugzilla ID: 811
Fixes: 9f8f9d91a701 ("test/bpf: introduce functional test")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/test/test_bpf.c | 31 +++++++++++++++++++++++--------
 1 file changed, 23 insertions(+), 8 deletions(-)

diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c
index 527c06b807..7002c6a734 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -59,6 +59,9 @@ struct dummy_mbuf {
 #define TEST_SHIFT_1	15
 #define TEST_SHIFT_2	33
 
+#define TEST_SHIFT32_MASK	(CHAR_BIT * sizeof(uint32_t) - 1)
+#define TEST_SHIFT64_MASK	(CHAR_BIT * sizeof(uint64_t) - 1)
+
 #define TEST_JCC_1	0
 #define TEST_JCC_2	-123
 #define TEST_JCC_3	5678
@@ -548,15 +551,25 @@ static const struct ebpf_insn test_shift1_prog[] = {
 		.off = offsetof(struct dummy_vect8, out[1].u64),
 	},
 	{
-		.code = (BPF_ALU | BPF_RSH | BPF_X),
-		.dst_reg = EBPF_REG_2,
-		.src_reg = EBPF_REG_4,
+		.code = (BPF_ALU | BPF_AND | BPF_K),
+		.dst_reg = EBPF_REG_4,
+		.imm = TEST_SHIFT64_MASK,
 	},
 	{
 		.code = (EBPF_ALU64 | BPF_LSH | BPF_X),
 		.dst_reg = EBPF_REG_3,
 		.src_reg = EBPF_REG_4,
 	},
+	{
+		.code = (BPF_ALU | BPF_AND | BPF_K),
+		.dst_reg = EBPF_REG_4,
+		.imm = TEST_SHIFT32_MASK,
+	},
+	{
+		.code = (BPF_ALU | BPF_RSH | BPF_X),
+		.dst_reg = EBPF_REG_2,
+		.src_reg = EBPF_REG_4,
+	},
 	{
 		.code = (BPF_STX | BPF_MEM | EBPF_DW),
 		.dst_reg = EBPF_REG_1,
@@ -590,7 +603,7 @@ static const struct ebpf_insn test_shift1_prog[] = {
 	{
 		.code = (BPF_ALU | BPF_AND | BPF_K),
 		.dst_reg = EBPF_REG_2,
-		.imm = sizeof(uint64_t) * CHAR_BIT - 1,
+		.imm = TEST_SHIFT64_MASK,
 	},
 	{
 		.code = (EBPF_ALU64 | EBPF_ARSH | BPF_X),
@@ -600,7 +613,7 @@ static const struct ebpf_insn test_shift1_prog[] = {
 	{
 		.code = (BPF_ALU | BPF_AND | BPF_K),
 		.dst_reg = EBPF_REG_2,
-		.imm = sizeof(uint32_t) * CHAR_BIT - 1,
+		.imm = TEST_SHIFT32_MASK,
 	},
 	{
 		.code = (BPF_ALU | BPF_LSH | BPF_X),
@@ -666,8 +679,10 @@ test_shift1_check(uint64_t rc, const void *arg)
 	dve.out[0].u64 = r2;
 	dve.out[1].u64 = r3;
 
-	r2 = (uint32_t)r2 >> r4;
+	r4 &= TEST_SHIFT64_MASK;
 	r3 <<= r4;
+	r4 &= TEST_SHIFT32_MASK;
+	r2 = (uint32_t)r2 >> r4;
 
 	dve.out[2].u64 = r2;
 	dve.out[3].u64 = r3;
@@ -676,9 +691,9 @@ test_shift1_check(uint64_t rc, const void *arg)
 	r3 = dvt->in[1].u64;
 	r4 = dvt->in[2].u32;
 
-	r2 &= sizeof(uint64_t) * CHAR_BIT - 1;
+	r2 &= TEST_SHIFT64_MASK;
 	r3 = (int64_t)r3 >> r2;
-	r2 &= sizeof(uint32_t) * CHAR_BIT - 1;
+	r2 &= TEST_SHIFT32_MASK;
 	r4 = (uint32_t)r4 << r2;
 
 	dve.out[4].u64 = r4;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.765826756 +0800
+++ 0131-test-bpf-fix-undefined-behavior-with-clang.patch	2021-11-10 14:17:01.894079233 +0800
@@ -1 +1 @@
-From 3ac2dffae88e8eb5c374b1fdd40d605014526510 Mon Sep 17 00:00:00 2001
+From 9f78abfa183b2b85f21d55d9684aed32b4f6ac54 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3ac2dffae88e8eb5c374b1fdd40d605014526510 ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org
@@ -36 +38 @@
-index 8118a1849b..7fcf92e716 100644
+index 527c06b807..7002c6a734 100644

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

* [dpdk-stable] patch 'net/af_xdp: disable secondary process support' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (130 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'test/bpf: fix undefined behavior with clang' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'app/testpmd: update forward engine beginning' " Xueming Li
                   ` (120 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: Luca Boccassi, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From effeb912ca7ac50e18db307f40e3bf1e35af8d19 Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Fri, 8 Oct 2021 07:50:20 +0000
Subject: [PATCH] net/af_xdp: disable secondary process support
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0668d829085c4e92a6a1117e2b7cb8653eff8038 ]

Since the AF_XDP PMD does not work for secondary processes as reported
in Bugzilla 805, check for the process type at the beginning of probe
and return ENOTSUP if the process type is secondary.

It is planned that secondary processes will be supported by the PMD in
full in a future release by using rte_mp_msg to pass the state to the
secondary process that it requires in order to work.

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

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

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 312e424359..3e2e621993 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -1597,16 +1597,11 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
 		rte_vdev_device_name(dev));
 
 	name = rte_vdev_device_name(dev);
-	if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
-		strlen(rte_vdev_device_args(dev)) == 0) {
-		eth_dev = rte_eth_dev_attach_secondary(name);
-		if (eth_dev == NULL) {
-			AF_XDP_LOG(ERR, "Failed to probe %s\n", name);
-			return -EINVAL;
-		}
-		eth_dev->dev_ops = &ops;
-		rte_eth_dev_probing_finish(eth_dev);
-		return 0;
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
+		AF_XDP_LOG(ERR, "Failed to probe %s. "
+				"AF_XDP PMD does not support secondary processes.\n",
+				name);
+		return -ENOTSUP;
 	}
 
 	kvlist = rte_kvargs_parse(rte_vdev_device_args(dev), valid_arguments);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.808782386 +0800
+++ 0132-net-af_xdp-disable-secondary-process-support.patch	2021-11-10 14:17:01.894079233 +0800
@@ -1 +1 @@
-From 0668d829085c4e92a6a1117e2b7cb8653eff8038 Mon Sep 17 00:00:00 2001
+From effeb912ca7ac50e18db307f40e3bf1e35af8d19 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0668d829085c4e92a6a1117e2b7cb8653eff8038 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -22,19 +24,3 @@
- doc/guides/rel_notes/release_21_11.rst |  4 ++++
- drivers/net/af_xdp/rte_eth_af_xdp.c    | 15 +++++----------
- 2 files changed, 9 insertions(+), 10 deletions(-)
-
-diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst
-index 30175246c7..48e0bb60a1 100644
---- a/doc/guides/rel_notes/release_21_11.rst
-+++ b/doc/guides/rel_notes/release_21_11.rst
-@@ -85,6 +85,10 @@ New Features
-   * Default VLAN strip behavior was changed. VLAN tag won't be stripped
-     unless ``DEV_RX_OFFLOAD_VLAN_STRIP`` offload is enabled.
- 
-+* **Updated AF_XDP PMD.**
-+
-+  * Disabled secondary process support.
-+
- * **Updated Broadcom bnxt PMD.**
- 
-   * Added flow offload support for Thor.
+ drivers/net/af_xdp/rte_eth_af_xdp.c | 15 +++++----------
+ 1 file changed, 5 insertions(+), 10 deletions(-)
+
@@ -42 +28 @@
-index a619dd218d..b362ccdcd3 100644
+index 312e424359..3e2e621993 100644
@@ -45 +31 @@
-@@ -1783,16 +1783,11 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
+@@ -1597,16 +1597,11 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)

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

* [dpdk-stable] patch 'app/testpmd: update forward engine beginning' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (131 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/af_xdp: disable secondary process support' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'app/testpmd: fix txonly forwarding' " Xueming Li
                   ` (119 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Luca Boccassi, Xiaoyun Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f8466ee10ff01f35dd4de5ad9b0df1eb59a91f82 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Thu, 23 Sep 2021 16:01:28 +0800
Subject: [PATCH] app/testpmd: update forward engine beginning
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a78040c990cb7beac2a7daac8f18646c54e2fd07 ]

For each forward engine, there may be some special conditions
must be met before the forwarding runs.

Adding checks for these conditions in configuring is not suitable,
because one condition may rely on multiple configurations, and the
conditions required by each forward engine is not general.

The best solution is each forward engine has a callback to check
whether these conditions are met, and then testpmd can call the
callback to determine whether the forwarding can be started.

There was a void callback 'port_fwd_begin' in forward engine,
it did some initialization for forwarding, this patch updates its
return value then we can add some checks in it to confirm whether
the forwarding can be started. In addition, this patch calls the
callback before the forwarding stats is reset and then launches the
forwarding engine.

Bugzilla ID: 797

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 app/test-pmd/ieee1588fwd.c |  3 ++-
 app/test-pmd/noisy_vnf.c   |  4 +++-
 app/test-pmd/testpmd.c     | 38 ++++++++++++++++++++++++++------------
 app/test-pmd/testpmd.h     |  2 +-
 app/test-pmd/txonly.c      |  3 ++-
 5 files changed, 34 insertions(+), 16 deletions(-)

diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index e3b98e3e0c..a949d24d5c 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -198,10 +198,11 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 	port_ieee1588_tx_timestamp_check(fs->rx_port);
 }
 
-static void
+static int
 port_ieee1588_fwd_begin(portid_t pi)
 {
 	rte_eth_timesync_enable(pi);
+	return 0;
 }
 
 static void
diff --git a/app/test-pmd/noisy_vnf.c b/app/test-pmd/noisy_vnf.c
index 382a4c2aae..e4434bea95 100644
--- a/app/test-pmd/noisy_vnf.c
+++ b/app/test-pmd/noisy_vnf.c
@@ -231,7 +231,7 @@ noisy_fwd_end(portid_t pi)
 	rte_free(noisy_cfg[pi]);
 }
 
-static void
+static int
 noisy_fwd_begin(portid_t pi)
 {
 	struct noisy_config *n;
@@ -273,6 +273,8 @@ noisy_fwd_begin(portid_t pi)
 		rte_exit(EXIT_FAILURE,
 			 "--noisy-lkup-memory-size must be > 0\n");
 	}
+
+	return 0;
 }
 
 struct fwd_engine noisy_vnf_engine = {
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 5288c04ab6..75714ff648 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2074,16 +2074,10 @@ run_one_txonly_burst_on_core(void *fwd_arg)
 static void
 launch_packet_forwarding(lcore_function_t *pkt_fwd_on_lcore)
 {
-	port_fwd_begin_t port_fwd_begin;
 	unsigned int i;
 	unsigned int lc_id;
 	int diag;
 
-	port_fwd_begin = cur_fwd_config.fwd_eng->port_fwd_begin;
-	if (port_fwd_begin != NULL) {
-		for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++)
-			(*port_fwd_begin)(fwd_ports_ids[i]);
-	}
 	for (i = 0; i < cur_fwd_config.nb_fwd_lcores; i++) {
 		lc_id = fwd_lcores_cpuids[i];
 		if ((interactive == 0) || (lc_id != rte_lcore_id())) {
@@ -2128,10 +2122,35 @@ start_packet_forwarding(int with_tx_first)
 		printf("Packet forwarding already started\n");
 		return;
 	}
-	test_done = 0;
 
 	fwd_config_setup();
 
+	port_fwd_begin = cur_fwd_config.fwd_eng->port_fwd_begin;
+	if (port_fwd_begin != NULL) {
+		for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {
+			if (port_fwd_begin(fwd_ports_ids[i])) {
+				fprintf(stderr,
+					"Packet forwarding is not ready\n");
+				return;
+			}
+		}
+	}
+
+	if (with_tx_first) {
+		port_fwd_begin = tx_only_engine.port_fwd_begin;
+		if (port_fwd_begin != NULL) {
+			for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {
+				if (port_fwd_begin(fwd_ports_ids[i])) {
+					fprintf(stderr,
+						"Packet forwarding is not ready\n");
+					return;
+				}
+			}
+		}
+	}
+
+	test_done = 0;
+
 	if(!no_flush_rx)
 		flush_fwd_rx_queues();
 
@@ -2140,11 +2159,6 @@ start_packet_forwarding(int with_tx_first)
 
 	fwd_stats_reset();
 	if (with_tx_first) {
-		port_fwd_begin = tx_only_engine.port_fwd_begin;
-		if (port_fwd_begin != NULL) {
-			for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++)
-				(*port_fwd_begin)(fwd_ports_ids[i]);
-		}
 		while (with_tx_first--) {
 			launch_packet_forwarding(
 					run_one_txonly_burst_on_core);
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 927ca587d3..b54958165a 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -266,7 +266,7 @@ struct fwd_lcore {
  *     Forwards packets unchanged on the same port.
  *     Check that sent IEEE1588 PTP packets are timestamped by the hardware.
  */
-typedef void (*port_fwd_begin_t)(portid_t pi);
+typedef int (*port_fwd_begin_t)(portid_t pi);
 typedef void (*port_fwd_end_t)(portid_t pi);
 typedef void (*packet_fwd_t)(struct fwd_stream *fs);
 
diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index d55ee7ca00..93d121fd57 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -423,7 +423,7 @@ pkt_burst_transmit(struct fwd_stream *fs)
 	get_end_cycles(fs, start_tsc);
 }
 
-static void
+static int
 tx_only_begin(portid_t pi)
 {
 	uint16_t pkt_data_len;
@@ -455,6 +455,7 @@ tx_only_begin(portid_t pi)
 		timestamp_init_req++;
 	/* Make sure all settings are visible on forwarding cores.*/
 	rte_wmb();
+	return 0;
 }
 
 struct fwd_engine tx_only_engine = {
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.851812489 +0800
+++ 0133-app-testpmd-update-forward-engine-beginning.patch	2021-11-10 14:17:01.897412539 +0800
@@ -1 +1 @@
-From a78040c990cb7beac2a7daac8f18646c54e2fd07 Mon Sep 17 00:00:00 2001
+From f8466ee10ff01f35dd4de5ad9b0df1eb59a91f82 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a78040c990cb7beac2a7daac8f18646c54e2fd07 ]
@@ -25 +27,0 @@
-Cc: stable@dpdk.org
@@ -30 +31,0 @@
- app/test-pmd/flowgen.c     |  3 ++-
@@ -36 +37 @@
- 6 files changed, 36 insertions(+), 17 deletions(-)
+ 5 files changed, 34 insertions(+), 16 deletions(-)
@@ -38,17 +38,0 @@
-diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
-index a96169e680..7ebed9fed3 100644
---- a/app/test-pmd/flowgen.c
-+++ b/app/test-pmd/flowgen.c
-@@ -201,10 +201,11 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
- 	get_end_cycles(fs, start_tsc);
- }
- 
--static void
-+static int
- flowgen_begin(portid_t pi)
- {
- 	printf("  number of flows for port %u: %d\n", pi, nb_flows_flowgen);
-+	return 0;
- }
- 
- struct fwd_engine flow_gen_engine = {
@@ -56 +40 @@
-index 9cf10c1c50..b85a4aa87b 100644
+index e3b98e3e0c..a949d24d5c 100644
@@ -95 +79 @@
-index 97ae52e17e..eec4f1b81d 100644
+index 5288c04ab6..75714ff648 100644
@@ -98 +82 @@
-@@ -2172,16 +2172,10 @@ run_one_txonly_burst_on_core(void *fwd_arg)
+@@ -2074,16 +2074,10 @@ run_one_txonly_burst_on_core(void *fwd_arg)
@@ -115,2 +99,2 @@
-@@ -2227,10 +2221,35 @@ start_packet_forwarding(int with_tx_first)
- 		fprintf(stderr, "Packet forwarding already started\n");
+@@ -2128,10 +2122,35 @@ start_packet_forwarding(int with_tx_first)
+ 		printf("Packet forwarding already started\n");
@@ -152 +136 @@
-@@ -2239,11 +2258,6 @@ start_packet_forwarding(int with_tx_first)
+@@ -2140,11 +2159,6 @@ start_packet_forwarding(int with_tx_first)
@@ -165 +149 @@
-index 5863b2f43f..e9d9db06ce 100644
+index 927ca587d3..b54958165a 100644
@@ -168 +152 @@
-@@ -268,7 +268,7 @@ struct fwd_lcore {
+@@ -266,7 +266,7 @@ struct fwd_lcore {
@@ -178 +162 @@
-index 40655801cc..6b3651f855 100644
+index d55ee7ca00..93d121fd57 100644
@@ -181 +165 @@
-@@ -435,7 +435,7 @@ pkt_burst_transmit(struct fwd_stream *fs)
+@@ -423,7 +423,7 @@ pkt_burst_transmit(struct fwd_stream *fs)
@@ -190 +174 @@
-@@ -467,6 +467,7 @@ tx_only_begin(portid_t pi)
+@@ -455,6 +455,7 @@ tx_only_begin(portid_t pi)

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

* [dpdk-stable] patch 'app/testpmd: fix txonly forwarding' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (132 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'app/testpmd: update forward engine beginning' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/bonding: fix dedicated queue mode in vector burst' " Xueming Li
                   ` (118 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Luca Boccassi, Xiaoyun Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4942dcf261c3e6cc21aadfe22a0689e5240e6ffd Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Thu, 23 Sep 2021 16:01:29 +0800
Subject: [PATCH] app/testpmd: fix txonly forwarding
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 02220e5305d72b70585f8798043409eb49d9f30c ]

When random number of Tx segments is enabled, because the actual
number of segments may be only one, the first segment of the Tx
packets must accommodate a complete being sending Eth/IP/UDP packet.

Besides, if multiple flow is enabled, the forwarding will update
the IP and UDP header, these headers shouldn't cross segments.
This also requires the first Tx segment can accommodate a complete
Eth/IP/UDP packet.

In addition, if time stamp is enabled, the forwarding needs more
Tx segment space for time stamp information.

This patch adds checks in beginning of forward engine to make sure
all above conditions are met.

Bugzilla ID: 797
Fixes: 79bec05b32b7 ("app/testpmd: add ability to split outgoing packets")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 app/test-pmd/txonly.c | 67 +++++++++++++++++++++++++++++++++++--------
 1 file changed, 55 insertions(+), 12 deletions(-)

diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index 93d121fd57..671ace3008 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -40,6 +40,13 @@
 
 #include "testpmd.h"
 
+struct tx_timestamp {
+	rte_be32_t signature;
+	rte_be16_t pkt_idx;
+	rte_be16_t queue_idx;
+	rte_be64_t ts;
+};
+
 /* use RFC863 Discard Protocol */
 uint16_t tx_udp_src_port = 9;
 uint16_t tx_udp_dst_port = 9;
@@ -257,12 +264,7 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
 
 	if (unlikely(timestamp_enable)) {
 		uint64_t skew = RTE_PER_LCORE(timestamp_qskew);
-		struct {
-			rte_be32_t signature;
-			rte_be16_t pkt_idx;
-			rte_be16_t queue_idx;
-			rte_be64_t ts;
-		} timestamp_mark;
+		struct tx_timestamp timestamp_mark;
 
 		if (unlikely(timestamp_init_req !=
 				RTE_PER_LCORE(timestamp_idone))) {
@@ -426,13 +428,23 @@ pkt_burst_transmit(struct fwd_stream *fs)
 static int
 tx_only_begin(portid_t pi)
 {
-	uint16_t pkt_data_len;
+	uint16_t pkt_hdr_len, pkt_data_len;
 	int dynf;
 
-	pkt_data_len = (uint16_t) (tx_pkt_length - (
-					sizeof(struct rte_ether_hdr) +
-					sizeof(struct rte_ipv4_hdr) +
-					sizeof(struct rte_udp_hdr)));
+	pkt_hdr_len = (uint16_t)(sizeof(struct rte_ether_hdr) +
+				 sizeof(struct rte_ipv4_hdr) +
+				 sizeof(struct rte_udp_hdr));
+	pkt_data_len = tx_pkt_length - pkt_hdr_len;
+
+	if ((tx_pkt_split == TX_PKT_SPLIT_RND || txonly_multi_flow) &&
+	    tx_pkt_seg_lengths[0] < pkt_hdr_len) {
+		TESTPMD_LOG(ERR,
+			    "Random segment number or multiple flow is enabled, "
+			    "but tx_pkt_seg_lengths[0] %u < %u (needed)\n",
+			    tx_pkt_seg_lengths[0], pkt_hdr_len);
+		return -EINVAL;
+	}
+
 	setup_pkt_udp_ip_headers(&pkt_ip_hdr, &pkt_udp_hdr, pkt_data_len);
 
 	timestamp_enable = false;
@@ -451,8 +463,39 @@ tx_only_begin(portid_t pi)
 			   timestamp_mask &&
 			   timestamp_off >= 0 &&
 			   !rte_eth_read_clock(pi, &timestamp_initial[pi]);
-	if (timestamp_enable)
+
+	if (timestamp_enable) {
+		pkt_hdr_len += sizeof(struct tx_timestamp);
+
+		if (tx_pkt_split == TX_PKT_SPLIT_RND) {
+			if (tx_pkt_seg_lengths[0] < pkt_hdr_len) {
+				TESTPMD_LOG(ERR,
+					    "Time stamp and random segment number are enabled, "
+					    "but tx_pkt_seg_lengths[0] %u < %u (needed)\n",
+					    tx_pkt_seg_lengths[0], pkt_hdr_len);
+				return -EINVAL;
+			}
+		} else {
+			uint16_t total = 0;
+			uint8_t i;
+
+			for (i = 0; i < tx_pkt_nb_segs; i++) {
+				total += tx_pkt_seg_lengths[i];
+				if (total >= pkt_hdr_len)
+					break;
+			}
+
+			if (total < pkt_hdr_len) {
+				TESTPMD_LOG(ERR,
+					    "Not enough Tx segment space for time stamp info, "
+					    "total %u < %u (needed)\n",
+					    total, pkt_hdr_len);
+				return -EINVAL;
+			}
+		}
 		timestamp_init_req++;
+	}
+
 	/* Make sure all settings are visible on forwarding cores.*/
 	rte_wmb();
 	return 0;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.898359572 +0800
+++ 0134-app-testpmd-fix-txonly-forwarding.patch	2021-11-10 14:17:01.897412539 +0800
@@ -1 +1 @@
-From 02220e5305d72b70585f8798043409eb49d9f30c Mon Sep 17 00:00:00 2001
+From 4942dcf261c3e6cc21aadfe22a0689e5240e6ffd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 02220e5305d72b70585f8798043409eb49d9f30c ]
@@ -23 +25,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index 6b3651f855..e45f8840c9 100644
+index 93d121fd57..671ace3008 100644
@@ -63 +65 @@
-@@ -438,13 +440,23 @@ pkt_burst_transmit(struct fwd_stream *fs)
+@@ -426,13 +428,23 @@ pkt_burst_transmit(struct fwd_stream *fs)
@@ -92 +94 @@
-@@ -463,8 +475,39 @@ tx_only_begin(portid_t pi)
+@@ -451,8 +463,39 @@ tx_only_begin(portid_t pi)

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

* [dpdk-stable] patch 'net/bonding: fix dedicated queue mode in vector burst' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (133 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'app/testpmd: fix txonly forwarding' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/bonding: fix RSS key length' " Xueming Li
                   ` (117 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 59556c7e7a6ed3021349a88a6758fec07190e73b Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Wed, 22 Sep 2021 15:09:12 +0800
Subject: [PATCH] net/bonding: fix dedicated queue mode in vector burst
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b8cfca26aed14354a6594d416a37881f494e2cfc ]

If the vector burst mode is selected, the dedicated queue mode will not
take effect on some PMDs because these PMDs may have some limitations
in vector burst mode. For example, the limit on burst size. Currently,
both hns3 and intel I40E require four alignments when receiving packets
in vector mode. As a result, they can't accept packets if burst size
below four. However, in dedicated queue mode, the burst size of periodic
packets processing is one.

This patch fixes the above problem by modifying the burst size to 32.
This approach also makes the packet processing of the dedicated queue
mode more reasonable. Currently, if multiple LACP protocol packets are
received in the hardware queue in a cycle, only one LACP packet will be
processed in this cycle, and the left packets will be processed in the
following cycle. After the modification, all the LACP packets will be
processed at one time, which seems more reasonable and closer to the
behavior of the bonding driver when the dedicated queue is not turned on.

Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 32 ++++++++++++++++-------
 1 file changed, 23 insertions(+), 9 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 128754f459..478c28afee 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -838,6 +838,27 @@ rx_machine_update(struct bond_dev_private *internals, uint16_t slave_id,
 		rx_machine(internals, slave_id, NULL);
 }
 
+static void
+bond_mode_8023ad_dedicated_rxq_process(struct bond_dev_private *internals,
+			uint16_t slave_id)
+{
+#define DEDICATED_QUEUE_BURST_SIZE 32
+	struct rte_mbuf *lacp_pkt[DEDICATED_QUEUE_BURST_SIZE];
+	uint16_t rx_count = rte_eth_rx_burst(slave_id,
+				internals->mode4.dedicated_queues.rx_qid,
+				lacp_pkt, DEDICATED_QUEUE_BURST_SIZE);
+
+	if (rx_count) {
+		uint16_t i;
+
+		for (i = 0; i < rx_count; i++)
+			bond_mode_8023ad_handle_slow_pkt(internals, slave_id,
+					lacp_pkt[i]);
+	} else {
+		rx_machine_update(internals, slave_id, NULL);
+	}
+}
+
 static void
 bond_mode_8023ad_periodic_cb(void *arg)
 {
@@ -926,15 +947,8 @@ bond_mode_8023ad_periodic_cb(void *arg)
 
 			rx_machine_update(internals, slave_id, lacp_pkt);
 		} else {
-			uint16_t rx_count = rte_eth_rx_burst(slave_id,
-					internals->mode4.dedicated_queues.rx_qid,
-					&lacp_pkt, 1);
-
-			if (rx_count == 1)
-				bond_mode_8023ad_handle_slow_pkt(internals,
-						slave_id, lacp_pkt);
-			else
-				rx_machine_update(internals, slave_id, NULL);
+			bond_mode_8023ad_dedicated_rxq_process(internals,
+					slave_id);
 		}
 
 		periodic_machine(internals, slave_id);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.940208311 +0800
+++ 0135-net-bonding-fix-dedicated-queue-mode-in-vector-burst.patch	2021-11-10 14:17:01.897412539 +0800
@@ -1 +1 @@
-From b8cfca26aed14354a6594d416a37881f494e2cfc Mon Sep 17 00:00:00 2001
+From 59556c7e7a6ed3021349a88a6758fec07190e73b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b8cfca26aed14354a6594d416a37881f494e2cfc ]
@@ -24 +26,0 @@
-Cc: stable@dpdk.org
@@ -33 +35 @@
-index 3558644232..2029955c10 100644
+index 128754f459..478c28afee 100644

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

* [dpdk-stable] patch 'net/bonding: fix RSS key length' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (134 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/bonding: fix dedicated queue mode in vector burst' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'app/testpmd: retain all original dev conf when config DCB' " Xueming Li
                   ` (116 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 709c5b655fe8e51cdca93ea063a58099c8996932 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Wed, 22 Sep 2021 15:09:13 +0800
Subject: [PATCH] net/bonding: fix RSS key length
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6b1a001ec54635d63ed3f91eaef5164abee7a089 ]

Currently the hash_key_size information has not been set. So, apps can
not get the key size from dev_info(), this make some problem.

e.g, in testpmd, the hash_key_size will be checked before configure
or get the hash key:
testpmd> show port 4 rss-hash
dev_info did not provide a valid hash key size
testpmd> show port 4 rss-hash key
dev_info did not provide a valid hash key size
testpmd> port config 4 rss-hash-key ipv4 (hash key)
dev_info did not provide a valid hash key size

In this patch, the meaning of rss_key_len has been modified. It only
indicated the length of the configured hash key before. Therefore,
its value depends on the user's configuration. This seems unreasonable.
And now, it indicates the minimum hash key length required by the
bonded device. Its value will be the shortest hash key among all slave
drivers.

Fixes: 734ce47f71e0 ("bonding: support RSS dynamic configuration")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_api.c |  6 ++++
 drivers/net/bonding/rte_eth_bond_pmd.c | 44 ++++++++++++++++----------
 2 files changed, 33 insertions(+), 17 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 44775f61e5..c751a1242d 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -290,6 +290,7 @@ eth_bond_slave_inherit_dev_info_rx_first(struct bond_dev_private *internals,
 	struct rte_eth_rxconf *rxconf_i = &internals->default_rxconf;
 
 	internals->reta_size = di->reta_size;
+	internals->rss_key_len = di->hash_key_size;
 
 	/* Inherit Rx offload capabilities from the first slave device */
 	internals->rx_offload_capa = di->rx_offload_capa;
@@ -385,6 +386,11 @@ eth_bond_slave_inherit_dev_info_rx_next(struct bond_dev_private *internals,
 	 */
 	if (internals->reta_size > di->reta_size)
 		internals->reta_size = di->reta_size;
+	if (internals->rss_key_len > di->hash_key_size) {
+		RTE_BOND_LOG(WARNING, "slave has different rss key size, "
+				"configuring rss may fail");
+		internals->rss_key_len = di->hash_key_size;
+	}
 
 	if (!internals->max_rx_pktlen &&
 	    di->max_rx_pktlen < internals->candidate_max_rx_pktlen)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index baa01b17e5..fb430be549 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1705,14 +1705,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
 
 	/* If RSS is enabled for bonding, try to enable it for slaves  */
 	if (bonded_eth_dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
-		if (internals->rss_key_len != 0) {
-			slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key_len =
+		/* rss_key won't be empty if RSS is configured in bonded dev */
+		slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key_len =
 					internals->rss_key_len;
-			slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key =
+		slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key =
 					internals->rss_key;
-		} else {
-			slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key = NULL;
-		}
 
 		slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf =
 				bonded_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf;
@@ -2244,6 +2241,7 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->flow_type_rss_offloads = internals->flow_type_rss_offloads;
 
 	dev_info->reta_size = internals->reta_size;
+	dev_info->hash_key_size = internals->rss_key_len;
 
 	return 0;
 }
@@ -3033,13 +3031,15 @@ bond_ethdev_rss_hash_update(struct rte_eth_dev *dev,
 	if (bond_rss_conf.rss_hf != 0)
 		dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf = bond_rss_conf.rss_hf;
 
-	if (bond_rss_conf.rss_key && bond_rss_conf.rss_key_len <
-			sizeof(internals->rss_key)) {
-		if (bond_rss_conf.rss_key_len == 0)
-			bond_rss_conf.rss_key_len = 40;
-		internals->rss_key_len = bond_rss_conf.rss_key_len;
+	if (bond_rss_conf.rss_key) {
+		if (bond_rss_conf.rss_key_len < internals->rss_key_len)
+			return -EINVAL;
+		else if (bond_rss_conf.rss_key_len > internals->rss_key_len)
+			RTE_BOND_LOG(WARNING, "rss_key will be truncated");
+
 		memcpy(internals->rss_key, bond_rss_conf.rss_key,
 				internals->rss_key_len);
+		bond_rss_conf.rss_key_len = internals->rss_key_len;
 	}
 
 	for (i = 0; i < internals->slave_count; i++) {
@@ -3502,14 +3502,24 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 	 * Fall back to default RSS key if the key is not specified
 	 */
 	if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS) {
-		if (dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key != NULL) {
-			internals->rss_key_len =
-				dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key_len;
-			memcpy(internals->rss_key,
-			       dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key,
+		struct rte_eth_rss_conf *rss_conf =
+			&dev->data->dev_conf.rx_adv_conf.rss_conf;
+		if (rss_conf->rss_key != NULL) {
+			if (internals->rss_key_len > rss_conf->rss_key_len) {
+				RTE_BOND_LOG(ERR, "Invalid rss key length(%u)",
+						rss_conf->rss_key_len);
+				return -EINVAL;
+			}
+
+			memcpy(internals->rss_key, rss_conf->rss_key,
 			       internals->rss_key_len);
 		} else {
-			internals->rss_key_len = sizeof(default_rss_key);
+			if (internals->rss_key_len > sizeof(default_rss_key)) {
+				RTE_BOND_LOG(ERR,
+				       "There is no suitable default hash key");
+				return -EINVAL;
+			}
+
 			memcpy(internals->rss_key, default_rss_key,
 			       internals->rss_key_len);
 		}
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.982241182 +0800
+++ 0136-net-bonding-fix-RSS-key-length.patch	2021-11-10 14:17:01.900745845 +0800
@@ -1 +1 @@
-From 6b1a001ec54635d63ed3f91eaef5164abee7a089 Mon Sep 17 00:00:00 2001
+From 709c5b655fe8e51cdca93ea063a58099c8996932 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6b1a001ec54635d63ed3f91eaef5164abee7a089 ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org
@@ -36 +38 @@
-index eb8d15d160..5140ef14c2 100644
+index 44775f61e5..c751a1242d 100644
@@ -60 +62 @@
-index 542c6633b5..4c604d6aec 100644
+index baa01b17e5..fb430be549 100644
@@ -63 +65 @@
-@@ -1701,14 +1701,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
+@@ -1705,14 +1705,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
@@ -81 +83 @@
-@@ -2251,6 +2248,7 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -2244,6 +2241,7 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -89 +91 @@
-@@ -3044,13 +3042,15 @@ bond_ethdev_rss_hash_update(struct rte_eth_dev *dev,
+@@ -3033,13 +3031,15 @@ bond_ethdev_rss_hash_update(struct rte_eth_dev *dev,
@@ -110 +112 @@
-@@ -3510,14 +3510,24 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
+@@ -3502,14 +3502,24 @@ bond_ethdev_configure(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'app/testpmd: retain all original dev conf when config DCB' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (135 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/bonding: fix RSS key length' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/sfc: free MAE lock once switch domain is assigned' " Xueming Li
                   ` (115 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, Xiaoyun Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 07c572ba8224a09e5a696cb7a0e4535c4d4a7579 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Mon, 11 Oct 2021 17:12:46 +0800
Subject: [PATCH] app/testpmd: retain all original dev conf when config DCB
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c1ba6c325c4c7c8e0f32d9e96bc25ab172a222ee ]

When configuring DCB, testpmd retains the rx_mode/tx_mode configuration in
rte_port->dev_conf. But some configurations, such as the link_speed, were
not saved if they were set before configuring DCB.

Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 app/test-pmd/testpmd.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 75714ff648..466df37a2a 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3574,10 +3574,8 @@ init_port_dcb_config(portid_t pid,
 
 	rte_port = &ports[pid];
 
-	memset(&port_conf, 0, sizeof(struct rte_eth_conf));
-
-	port_conf.rxmode = rte_port->dev_conf.rxmode;
-	port_conf.txmode = rte_port->dev_conf.txmode;
+	/* retain the original device configuration. */
+	memcpy(&port_conf, &rte_port->dev_conf, sizeof(struct rte_eth_conf));
 
 	/*set configuration of DCB in vt mode and DCB in non-vt mode*/
 	retval = get_eth_dcb_conf(pid, &port_conf, dcb_mode, num_tcs, pfc_en);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.026653589 +0800
+++ 0137-app-testpmd-retain-all-original-dev-conf-when-config.patch	2021-11-10 14:17:01.900745845 +0800
@@ -1 +1 @@
-From c1ba6c325c4c7c8e0f32d9e96bc25ab172a222ee Mon Sep 17 00:00:00 2001
+From 07c572ba8224a09e5a696cb7a0e4535c4d4a7579 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c1ba6c325c4c7c8e0f32d9e96bc25ab172a222ee ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index eec4f1b81d..12a0db8796 100644
+index 75714ff648..466df37a2a 100644
@@ -24,2 +26,2 @@
-@@ -3729,10 +3729,8 @@ init_port_dcb_config(portid_t pid,
- 	}
+@@ -3574,10 +3574,8 @@ init_port_dcb_config(portid_t pid,
+ 

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

* [dpdk-stable] patch 'net/sfc: free MAE lock once switch domain is assigned' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (136 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'app/testpmd: retain all original dev conf when config DCB' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/sfc: update comment about representor support' " Xueming Li
                   ` (114 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Viacheslav Galaktionov
  Cc: Luca Boccassi, Andrew Rybchenko, Andy Moreton, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From af0aaab086f605cee539c67ff80cea9785d2f850 Mon Sep 17 00:00:00 2001
From: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Date: Mon, 11 Oct 2021 17:48:46 +0300
Subject: [PATCH] net/sfc: free MAE lock once switch domain is assigned
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c7e64eea525241a383dc66c467358a9c91c5ed4a ]

If for some reason the hardware switch ID initialization function fails,
MAE lock is still held after the function finishes. This patch fixes that.

Fixes: 1e7fbdf0ba19 ("net/sfc: support concept of switch domains/ports")

Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 drivers/net/sfc/sfc_switch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_switch.c b/drivers/net/sfc/sfc_switch.c
index bdea2a2446..4aa9ab3060 100644
--- a/drivers/net/sfc/sfc_switch.c
+++ b/drivers/net/sfc/sfc_switch.c
@@ -214,9 +214,9 @@ fail_domain_alloc:
 
 fail_mem_alloc:
 	sfc_hw_switch_id_fini(sa, hw_switch_id);
-	rte_spinlock_unlock(&sfc_mae_switch.lock);
 
 fail_hw_switch_id_init:
+	rte_spinlock_unlock(&sfc_mae_switch.lock);
 	return rc;
 }
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.070479983 +0800
+++ 0138-net-sfc-free-MAE-lock-once-switch-domain-is-assigned.patch	2021-11-10 14:17:01.900745845 +0800
@@ -1 +1 @@
-From c7e64eea525241a383dc66c467358a9c91c5ed4a Mon Sep 17 00:00:00 2001
+From af0aaab086f605cee539c67ff80cea9785d2f850 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c7e64eea525241a383dc66c467358a9c91c5ed4a ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index c37cdf4a61..80c884a599 100644
+index bdea2a2446..4aa9ab3060 100644

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

* [dpdk-stable] patch 'net/sfc: update comment about representor support' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (137 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/sfc: free MAE lock once switch domain is assigned' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e: fix Rx packet statistics' " Xueming Li
                   ` (113 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Viacheslav Galaktionov
  Cc: Luca Boccassi, Andrew Rybchenko, Andy Moreton, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 65c0176f3ce8416d43939c19fc156f140562debe Mon Sep 17 00:00:00 2001
From: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Date: Mon, 11 Oct 2021 17:48:57 +0300
Subject: [PATCH] net/sfc: update comment about representor support
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e28938e6213ac7d550219db1c5db3b7c1409ebf2 ]

The representor support has been implemented to some extent, and the fact
that ethdev mport is equivalent to entity mport is by design.

Fixes: 1fb65e4dae8a ("net/sfc: support flow action port ID in transfer rules")

Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 drivers/net/sfc/sfc_mae.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index dc01257ace..02f189eca5 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -68,10 +68,7 @@ sfc_mae_attach(struct sfc_adapter *sa)
 	sfc_log_init(sa, "assign RTE switch port");
 	switch_port_request.type = SFC_MAE_SWITCH_PORT_INDEPENDENT;
 	switch_port_request.entity_mportp = &entity_mport;
-	/*
-	 * As of now, the driver does not support representors, so
-	 * RTE ethdev MPORT simply matches that of the entity.
-	 */
+	/* RTE ethdev MPORT matches that of the entity for independent ports. */
 	switch_port_request.ethdev_mportp = &entity_mport;
 	switch_port_request.ethdev_port_id = sas->port_id;
 	rc = sfc_mae_assign_switch_port(mae->switch_domain_id,
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.112112150 +0800
+++ 0139-net-sfc-update-comment-about-representor-support.patch	2021-11-10 14:17:01.904079151 +0800
@@ -1 +1 @@
-From e28938e6213ac7d550219db1c5db3b7c1409ebf2 Mon Sep 17 00:00:00 2001
+From 65c0176f3ce8416d43939c19fc156f140562debe Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e28938e6213ac7d550219db1c5db3b7c1409ebf2 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 7be77054ab..fa60c948ca 100644
+index dc01257ace..02f189eca5 100644
@@ -23 +25 @@
-@@ -228,10 +228,7 @@ sfc_mae_attach(struct sfc_adapter *sa)
+@@ -68,10 +68,7 @@ sfc_mae_attach(struct sfc_adapter *sa)

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

* [dpdk-stable] patch 'net/i40e: fix Rx packet statistics' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (138 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/sfc: update comment about representor support' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/ixgbe: fix queue release' " Xueming Li
                   ` (112 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b450a88df85f86e5e431aadaf9e7bd965fd18b76 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Thu, 30 Sep 2021 13:19:57 +0800
Subject: [PATCH] net/i40e: fix Rx packet statistics
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 39e4a2577fd05199f53182b7c8509aeed40dc07f ]

Some packets are discarded by the NIC because they are larger than
the MTU, these packets should be counted as "RX error" instead of
"RX packet", for example:

  pkt1 = Ether()/IP()/Raw('x' * 1400)
  pkt2 = Ether()/IP()/Raw('x' * 1500)

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

  Here the packet pkt2 has been discarded, but still was counted
  by "RX-packets"

The register 'GL_RXERR1' can count above discarded packets.
This patch adds reading and calculation of the 'GL_RXERR1' counter
when reporting DPDK statistics.

Fixes: f4a91c38b4ad ("i40e: add extended stats")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 16 +++++++++++++---
 drivers/net/i40e/i40e_ethdev.h | 10 ++++++++++
 2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index a364338564..f8c1035f8f 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -534,7 +534,7 @@ static const struct eth_dev_ops i40e_eth_dev_ops = {
 /* store statistics names and its offset in stats structure */
 struct rte_i40e_xstats_name_off {
 	char name[RTE_ETH_XSTATS_NAME_SIZE];
-	unsigned offset;
+	int offset;
 };
 
 static const struct rte_i40e_xstats_name_off rte_i40e_stats_strings[] = {
@@ -544,6 +544,8 @@ static const struct rte_i40e_xstats_name_off rte_i40e_stats_strings[] = {
 	{"rx_dropped_packets", offsetof(struct i40e_eth_stats, rx_discards)},
 	{"rx_unknown_protocol_packets", offsetof(struct i40e_eth_stats,
 		rx_unknown_protocol)},
+	{"rx_size_error_packets", offsetof(struct i40e_pf, rx_err1) -
+				  offsetof(struct i40e_pf, stats)},
 	{"tx_unicast_packets", offsetof(struct i40e_eth_stats, tx_unicast)},
 	{"tx_multicast_packets", offsetof(struct i40e_eth_stats, tx_multicast)},
 	{"tx_broadcast_packets", offsetof(struct i40e_eth_stats, tx_broadcast)},
@@ -3295,6 +3297,10 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
 			    pf->offset_loaded,
 			    &os->eth.rx_unknown_protocol,
 			    &ns->eth.rx_unknown_protocol);
+	i40e_stat_update_48(hw, I40E_GL_RXERR1_H(hw->pf_id + I40E_MAX_VF),
+			    I40E_GL_RXERR1_L(hw->pf_id + I40E_MAX_VF),
+			    pf->offset_loaded, &pf->rx_err1_offset,
+			    &pf->rx_err1);
 	i40e_stat_update_48_in_64(hw, I40E_GLPRT_GOTCH(hw->port),
 				  I40E_GLPRT_GOTCL(hw->port),
 				  pf->offset_loaded, &os->eth.tx_bytes,
@@ -3494,7 +3500,8 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	stats->ipackets = pf->main_vsi->eth_stats.rx_unicast +
 			pf->main_vsi->eth_stats.rx_multicast +
 			pf->main_vsi->eth_stats.rx_broadcast -
-			pf->main_vsi->eth_stats.rx_discards;
+			pf->main_vsi->eth_stats.rx_discards -
+			pf->rx_err1;
 	stats->opackets = ns->eth.tx_unicast +
 			ns->eth.tx_multicast +
 			ns->eth.tx_broadcast;
@@ -3508,7 +3515,8 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 			pf->main_vsi->eth_stats.rx_discards;
 	stats->ierrors  = ns->crc_errors +
 			ns->rx_length_errors + ns->rx_undersize +
-			ns->rx_oversize + ns->rx_fragments + ns->rx_jabber;
+			ns->rx_oversize + ns->rx_fragments + ns->rx_jabber +
+			pf->rx_err1;
 
 	if (pf->vfs) {
 		for (i = 0; i < pf->vf_num; i++) {
@@ -6289,6 +6297,8 @@ i40e_pf_setup(struct i40e_pf *pf)
 	memset(&pf->stats_offset, 0, sizeof(struct i40e_hw_port_stats));
 	memset(&pf->internal_stats, 0, sizeof(struct i40e_eth_stats));
 	memset(&pf->internal_stats_offset, 0, sizeof(struct i40e_eth_stats));
+	pf->rx_err1 = 0;
+	pf->rx_err1_offset = 0;
 
 	ret = i40e_pf_get_switch_config(pf);
 	if (ret != I40E_SUCCESS) {
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index d80316d2f7..f32d853071 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -17,6 +17,13 @@
 
 #include "base/i40e_register.h"
 
+/**
+ * _i=0...143,
+ * counters 0-127 are for the 128 VFs,
+ * counters 128-143 are for the 16 PFs
+ */
+#define I40E_GL_RXERR1_H(_i)	(0x00318004 + ((_i) * 8))
+
 #define I40E_VLAN_TAG_SIZE        4
 
 #define I40E_AQ_LEN               32
@@ -1114,6 +1121,9 @@ struct i40e_pf {
 
 	struct i40e_hw_port_stats stats_offset;
 	struct i40e_hw_port_stats stats;
+	u64 rx_err1;	/* rxerr1 */
+	u64 rx_err1_offset;
+
 	/* internal packet statistics, it should be excluded from the total */
 	struct i40e_eth_stats internal_stats_offset;
 	struct i40e_eth_stats internal_stats;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.155841416 +0800
+++ 0140-net-i40e-fix-Rx-packet-statistics.patch	2021-11-10 14:17:01.910745763 +0800
@@ -1 +1 @@
-From 39e4a2577fd05199f53182b7c8509aeed40dc07f Mon Sep 17 00:00:00 2001
+From b450a88df85f86e5e431aadaf9e7bd965fd18b76 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 39e4a2577fd05199f53182b7c8509aeed40dc07f ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org
@@ -36 +38 @@
-index a2e35ebcfe..0027563034 100644
+index a364338564..f8c1035f8f 100644
@@ -39 +41 @@
-@@ -520,7 +520,7 @@ static const struct eth_dev_ops i40e_eth_dev_ops = {
+@@ -534,7 +534,7 @@ static const struct eth_dev_ops i40e_eth_dev_ops = {
@@ -48 +50 @@
-@@ -530,6 +530,8 @@ static const struct rte_i40e_xstats_name_off rte_i40e_stats_strings[] = {
+@@ -544,6 +544,8 @@ static const struct rte_i40e_xstats_name_off rte_i40e_stats_strings[] = {
@@ -57 +59 @@
-@@ -3202,6 +3204,10 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
+@@ -3295,6 +3297,10 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
@@ -68 +70 @@
-@@ -3401,7 +3407,8 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -3494,7 +3500,8 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
@@ -78 +80 @@
-@@ -3415,7 +3422,8 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -3508,7 +3515,8 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
@@ -88 +90 @@
-@@ -6197,6 +6205,8 @@ i40e_pf_setup(struct i40e_pf *pf)
+@@ -6289,6 +6297,8 @@ i40e_pf_setup(struct i40e_pf *pf)
@@ -98 +100 @@
-index 8a68b363f9..1d57b9617e 100644
+index d80316d2f7..f32d853071 100644
@@ -101,3 +103,3 @@
-@@ -20,6 +20,13 @@
- #include "base/i40e_type.h"
- #include "base/virtchnl.h"
+@@ -17,6 +17,13 @@
+ 
+ #include "base/i40e_register.h"

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

* [dpdk-stable] patch 'net/ixgbe: fix queue release' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (139 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e: fix Rx packet statistics' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters' " Xueming Li
                   ` (111 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Julien Meunier; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d55700c3a0f711a2e374609b7b8319cdc1576509 Mon Sep 17 00:00:00 2001
From: Julien Meunier <julien.meunier@nokia.com>
Date: Tue, 28 Sep 2021 10:12:38 +0200
Subject: [PATCH] net/ixgbe: fix queue release
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6507e67af817183c69b684e81d820791eef18259 ]

On the vector implementation, during the tear-down, the mbufs not
drained in the RxQ and TxQ are freed based on an algorithm which
supposed that the number of descriptors is a power of 2 (max_desc).
Based on this hypothesis, this algorithm uses a bitmask in order to
detect an index overflow during the iteration, and to restart the loop
from 0.

However, there is no such power of 2 requirement in the ixgbe for the
number of descriptors in the RxQ / TxQ. The only requirement is to have
a number correctly aligned.

If a user requested to configure a number of descriptors which is not a
power of 2, as a consequence, during the tear-down, it was possible to
be in an infinite loop, and to never reach the exit loop condition.

By removing the bitmask and changing the loop method, we can avoid this
issue, and allow the user to configure a RxQ / TxQ which is not a power
of 2.

Fixes: c95584dc2b18 ("ixgbe: new vectorized functions for Rx/Tx")

Signed-off-by: Julien Meunier <julien.meunier@nokia.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h b/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h
index a97c27189b..e650feac82 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_common.h
@@ -152,7 +152,7 @@ _ixgbe_tx_queue_release_mbufs_vec(struct ixgbe_tx_queue *txq)
 	/* release the used mbufs in sw_ring */
 	for (i = txq->tx_next_dd - (txq->tx_rs_thresh - 1);
 	     i != txq->tx_tail;
-	     i = (i + 1) & max_desc) {
+	     i = (i + 1) % txq->nb_tx_desc) {
 		txe = &txq->sw_ring_v[i];
 		rte_pktmbuf_free_seg(txe->mbuf);
 	}
@@ -168,7 +168,6 @@ _ixgbe_tx_queue_release_mbufs_vec(struct ixgbe_tx_queue *txq)
 static inline void
 _ixgbe_rx_queue_release_mbufs_vec(struct ixgbe_rx_queue *rxq)
 {
-	const unsigned int mask = rxq->nb_rx_desc - 1;
 	unsigned int i;
 
 	if (rxq->sw_ring == NULL || rxq->rxrearm_nb >= rxq->nb_rx_desc)
@@ -183,7 +182,7 @@ _ixgbe_rx_queue_release_mbufs_vec(struct ixgbe_rx_queue *rxq)
 	} else {
 		for (i = rxq->rx_tail;
 		     i != rxq->rxrearm_start;
-		     i = (i + 1) & mask) {
+		     i = (i + 1) % rxq->nb_rx_desc) {
 			if (rxq->sw_ring[i].mbuf != NULL)
 				rte_pktmbuf_free_seg(rxq->sw_ring[i].mbuf);
 		}
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.207121592 +0800
+++ 0141-net-ixgbe-fix-queue-release.patch	2021-11-10 14:17:01.910745763 +0800
@@ -1 +1 @@
-From 6507e67af817183c69b684e81d820791eef18259 Mon Sep 17 00:00:00 2001
+From d55700c3a0f711a2e374609b7b8319cdc1576509 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6507e67af817183c69b684e81d820791eef18259 ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org
@@ -35 +37 @@
-index adba855ca3..005e60668a 100644
+index a97c27189b..e650feac82 100644

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

* [dpdk-stable] patch 'net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (140 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/ixgbe: fix queue release' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix PF reset' " Xueming Li
                   ` (110 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Robin Zhang; +Cc: Luca Boccassi, Dawid Lukwinski, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9eec8f0a542763987e9d988bc7f3637440984c1a Mon Sep 17 00:00:00 2001
From: Robin Zhang <robinx.zhang@intel.com>
Date: Sat, 9 Oct 2021 01:39:44 +0000
Subject: [PATCH] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit dafd6c6308d441af5a215dc25a7942973c3eda15 ]

Unlike other supported adapters, 2.5G and 5G use different PHY type
identifiers for reading/writing PHY settings and for reading link status.
This commit introduces separate PHY identifiers for these two operation
types.

Fixes: 988ed63c7441 ("net/i40e/base: add support for Carlsville device")

Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/base/i40e_adminq_cmd.h | 6 ++++--
 drivers/net/i40e/base/i40e_common.c     | 4 ++--
 drivers/net/i40e/base/i40e_type.h       | 8 ++------
 3 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 2ca41db5d3..4d80568050 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1947,8 +1947,10 @@ enum i40e_aq_phy_type {
 	I40E_PHY_TYPE_25GBASE_LR		= 0x22,
 	I40E_PHY_TYPE_25GBASE_AOC		= 0x23,
 	I40E_PHY_TYPE_25GBASE_ACC		= 0x24,
-	I40E_PHY_TYPE_2_5GBASE_T		= 0x30,
-	I40E_PHY_TYPE_5GBASE_T			= 0x31,
+	I40E_PHY_TYPE_2_5GBASE_T		= 0x26,
+	I40E_PHY_TYPE_5GBASE_T			= 0x27,
+	I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS	= 0x30,
+	I40E_PHY_TYPE_5GBASE_T_LINK_STATUS	= 0x31,
 	I40E_PHY_TYPE_MAX,
 	I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP	= 0xFD,
 	I40E_PHY_TYPE_EMPTY			= 0xFE,
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index e20bb9ac35..a13513d0b5 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1280,8 +1280,8 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 		break;
 	case I40E_PHY_TYPE_100BASE_TX:
 	case I40E_PHY_TYPE_1000BASE_T:
-	case I40E_PHY_TYPE_2_5GBASE_T:
-	case I40E_PHY_TYPE_5GBASE_T:
+	case I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS:
+	case I40E_PHY_TYPE_5GBASE_T_LINK_STATUS:
 	case I40E_PHY_TYPE_10GBASE_T:
 		media = I40E_MEDIA_TYPE_BASET;
 		break;
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index cf41345834..4674715ed7 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -329,12 +329,8 @@ struct i40e_phy_info {
 					     I40E_PHY_TYPE_OFFSET)
 #define I40E_CAP_PHY_TYPE_25GBASE_ACC BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC + \
 					     I40E_PHY_TYPE_OFFSET)
-/* Offset for 2.5G/5G PHY Types value to bit number conversion */
-#define I40E_PHY_TYPE_OFFSET2 (-10)
-#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T + \
-					     I40E_PHY_TYPE_OFFSET2)
-#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T + \
-					     I40E_PHY_TYPE_OFFSET2)
+#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T)
+#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T)
 #define I40E_HW_CAP_MAX_GPIO			30
 #define I40E_HW_CAP_MDIO_PORT_MODE_MDIO		0
 #define I40E_HW_CAP_MDIO_PORT_MODE_I2C		1
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.248115201 +0800
+++ 0142-net-i40e-base-fix-PHY-identifiers-for-2.5G-and-5G-ad.patch	2021-11-10 14:17:01.917412376 +0800
@@ -1 +1 @@
-From dafd6c6308d441af5a215dc25a7942973c3eda15 Mon Sep 17 00:00:00 2001
+From 9eec8f0a542763987e9d988bc7f3637440984c1a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit dafd6c6308d441af5a215dc25a7942973c3eda15 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index a96527f31c..af9dec1d7f 100644
+index 2ca41db5d3..4d80568050 100644
@@ -41 +43 @@
-index 32642f3e2b..ceedec68bf 100644
+index e20bb9ac35..a13513d0b5 100644
@@ -56 +58 @@
-index e5a3729183..0323887550 100644
+index cf41345834..4674715ed7 100644

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

* [dpdk-stable] patch 'net/i40e/base: fix PF reset' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (141 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix update link data for X722' " Xueming Li
                   ` (109 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Robin Zhang; +Cc: Luca Boccassi, Sylwester Dziedziuch, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6f1ed0141c1abc1c79a78c4afc405db59858e9ac Mon Sep 17 00:00:00 2001
From: Robin Zhang <robinx.zhang@intel.com>
Date: Sat, 9 Oct 2021 01:39:45 +0000
Subject: [PATCH] net/i40e/base: fix PF reset
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 25829b55b463f7bb0b69af0e63b19121a16d2a63 ]

PF has to delete all the filters during reset.
If it is fully loaded with filters then it is possible that it will take
more than 200 ms to finish the reset resulting in timeout during pf_reset
and PF reset failed, -15 error indication.

Increasing the timeout value for PF reset from 200 to 1000 to give PF
more time to finish reset if it is loaded with filters.

Fixes: 1e32378f0774 ("i40e/base: increase PF reset max loop limit")

Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index a13513d0b5..69ff2dce9e 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1341,7 +1341,7 @@ STATIC enum i40e_status_code i40e_poll_globr(struct i40e_hw *hw,
 	return I40E_ERR_RESET_FAILED;
 }
 
-#define I40E_PF_RESET_WAIT_COUNT	200
+#define I40E_PF_RESET_WAIT_COUNT	1000
 /**
  * i40e_pf_reset - Reset the PF
  * @hw: pointer to the hardware structure
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.295826088 +0800
+++ 0143-net-i40e-base-fix-PF-reset.patch	2021-11-10 14:17:01.920745681 +0800
@@ -1 +1 @@
-From 25829b55b463f7bb0b69af0e63b19121a16d2a63 Mon Sep 17 00:00:00 2001
+From 6f1ed0141c1abc1c79a78c4afc405db59858e9ac Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 25829b55b463f7bb0b69af0e63b19121a16d2a63 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index ceedec68bf..aa424e6010 100644
+index a13513d0b5..69ff2dce9e 100644

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

* [dpdk-stable] patch 'net/i40e/base: fix update link data for X722' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (142 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix PF reset' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix AOC media type' " Xueming Li
                   ` (108 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Robin Zhang; +Cc: Luca Boccassi, Jaroslaw Gawin, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7d5375f7d7f8e71ca1e95bdd8ea4a0292f835280 Mon Sep 17 00:00:00 2001
From: Robin Zhang <robinx.zhang@intel.com>
Date: Sat, 9 Oct 2021 01:39:46 +0000
Subject: [PATCH] net/i40e/base: fix update link data for X722
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 74bd4072996e64b0051d24d8d641554d225db196 ]

The X722 card has 'Link Type' information elsewhere than the X710.
Previously, for all cards, the 'Link Type' information was retrieved by
opcode 0x0607 and this value was wrong for all X722 cards.
Now this information for X722 only is taken by opcode 0x0600
(function: i40e_aq_get_phy_capabilities) instead of an opcode
0x0607 (function: i40e_aq_get_link_info).
All other parameters read by opcode 0x0607 unchanged.

Fixes: e6691b428eb1 ("i40e/base: fix PHY NVM interaction")
Fixes: 75c3de654ead ("net/i40e/base: fix long link down notification time")

Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 69ff2dce9e..9ae632c1b6 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2078,6 +2078,9 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
 	     hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)
 		hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;
 
+	/* 'Get Link Status' response data structure from X722 FW has
+	 * different format and does not contain this information
+	 */
 	if (hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE &&
 	    hw->mac.type != I40E_MAC_X722) {
 		__le32 tmp;
@@ -2948,10 +2951,13 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
 		return status;
 
 	/* extra checking needed to ensure link info to user is timely */
-	if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
-	    ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
-	     !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) {
-		status = i40e_aq_get_phy_capabilities(hw, false, false,
+	if (((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
+	     ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
+	      !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) ||
+		hw->mac.type == I40E_MAC_X722) {
+		status = i40e_aq_get_phy_capabilities(hw, false,
+						      hw->mac.type ==
+						      I40E_MAC_X722,
 						      &abilities, NULL);
 		if (status)
 			return status;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.341668100 +0800
+++ 0144-net-i40e-base-fix-update-link-data-for-X722.patch	2021-11-10 14:17:01.924078988 +0800
@@ -1 +1 @@
-From 74bd4072996e64b0051d24d8d641554d225db196 Mon Sep 17 00:00:00 2001
+From 7d5375f7d7f8e71ca1e95bdd8ea4a0292f835280 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 74bd4072996e64b0051d24d8d641554d225db196 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index aa424e6010..ef061a6b63 100644
+index 69ff2dce9e..9ae632c1b6 100644

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

* [dpdk-stable] patch 'net/i40e/base: fix AOC media type' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (143 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix update link data for X722' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix function name in comments' " Xueming Li
                   ` (107 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Robin Zhang; +Cc: Luca Boccassi, Dawid Lukwinski, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 88c923917d74ef01ab50e6c9a8ab389fdcd20895 Mon Sep 17 00:00:00 2001
From: Robin Zhang <robinx.zhang@intel.com>
Date: Sat, 9 Oct 2021 01:39:47 +0000
Subject: [PATCH] net/i40e/base: fix AOC media type
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6acdc4263c53078b562c94745ad158291299a31c ]

For Active Optical Cable (AOC) the correct media type is "Fibre",
not "Direct Attach Copper".

Fixes: d749d4d89969 ("i40e/base: add AOC PHY types")
Fixes: aa153cc89ff0 ("net/i40e/base: add new PHY types for 25G AOC and ACC")

Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 9ae632c1b6..657695c5d8 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1276,6 +1276,9 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 	case I40E_PHY_TYPE_40GBASE_LR4:
 	case I40E_PHY_TYPE_25GBASE_LR:
 	case I40E_PHY_TYPE_25GBASE_SR:
+	case I40E_PHY_TYPE_10GBASE_AOC:
+	case I40E_PHY_TYPE_25GBASE_AOC:
+	case I40E_PHY_TYPE_40GBASE_AOC:
 		media = I40E_MEDIA_TYPE_FIBER;
 		break;
 	case I40E_PHY_TYPE_100BASE_TX:
@@ -1290,10 +1293,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 	case I40E_PHY_TYPE_10GBASE_CR1:
 	case I40E_PHY_TYPE_40GBASE_CR4:
 	case I40E_PHY_TYPE_10GBASE_SFPP_CU:
-	case I40E_PHY_TYPE_40GBASE_AOC:
-	case I40E_PHY_TYPE_10GBASE_AOC:
 	case I40E_PHY_TYPE_25GBASE_CR:
-	case I40E_PHY_TYPE_25GBASE_AOC:
 	case I40E_PHY_TYPE_25GBASE_ACC:
 		media = I40E_MEDIA_TYPE_DA;
 		break;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.386913485 +0800
+++ 0145-net-i40e-base-fix-AOC-media-type.patch	2021-11-10 14:17:01.927412294 +0800
@@ -1 +1 @@
-From 6acdc4263c53078b562c94745ad158291299a31c Mon Sep 17 00:00:00 2001
+From 88c923917d74ef01ab50e6c9a8ab389fdcd20895 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6acdc4263c53078b562c94745ad158291299a31c ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index ef061a6b63..2ca6a13e79 100644
+index 9ae632c1b6..657695c5d8 100644

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

* [dpdk-stable] patch 'net/i40e/base: fix function name in comments' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (144 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix AOC media type' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix potentially uninitialized variables' " Xueming Li
                   ` (106 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Robin Zhang; +Cc: Luca Boccassi, Jesse Brandeburg, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 088b09d8daf2c7f2a2db6eacaf986d09bc81785a Mon Sep 17 00:00:00 2001
From: Robin Zhang <robinx.zhang@intel.com>
Date: Sat, 9 Oct 2021 01:39:49 +0000
Subject: [PATCH] net/i40e/base: fix function name in comments
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bd3c90715b1913b99b9857067fa76985b7fb9224 ]

Fix mismatched function name in comments.

Fixes: 8db9e2a1b232 ("i40e: base driver")
Fixes: 842ea1996335 ("i40e/base: save link module type")
Fixes: fd72a2284a89 ("i40e/base: support LED blinking with new PHY")
Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722")

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/base/i40e_common.c  | 10 +++++-----
 drivers/net/i40e/base/i40e_dcb.c     |  2 +-
 drivers/net/i40e/base/i40e_lan_hmc.c |  2 +-
 drivers/net/i40e/base/i40e_nvm.c     |  2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 657695c5d8..6376e685e4 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2677,7 +2677,7 @@ enum i40e_status_code i40e_aq_set_vsi_vlan_promisc(struct i40e_hw *hw,
 }
 
 /**
- * i40e_get_vsi_params - get VSI configuration info
+ * i40e_aq_get_vsi_params - get VSI configuration info
  * @hw: pointer to the hw struct
  * @vsi_ctx: pointer to a vsi context struct
  * @cmd_details: pointer to command details structure or NULL
@@ -2938,7 +2938,7 @@ enum i40e_status_code i40e_get_link_status(struct i40e_hw *hw, bool *link_up)
 }
 
 /**
- * i40e_updatelink_status - update status of the HW network link
+ * i40e_update_link_info - update status of the HW network link
  * @hw: pointer to the hw struct
  **/
 enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
@@ -4723,7 +4723,7 @@ enum i40e_status_code i40e_aq_del_udp_tunnel(struct i40e_hw *hw, u8 index,
 }
 
 /**
- * i40e_aq_get_switch_resource_alloc (0x0204)
+ * i40e_aq_get_switch_resource_alloc - command (0x0204) to get allocations
  * @hw: pointer to the hw struct
  * @num_entries: pointer to u8 to store the number of resource entries returned
  * @buf: pointer to a user supplied buffer.  This buffer must be large enough
@@ -6870,7 +6870,7 @@ u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num)
 }
 
 /**
- * i40e_blink_phy_led
+ * i40e_blink_phy_link_led
  * @hw: pointer to the HW structure
  * @time: time how long led will blinks in secs
  * @interval: gap between LED on and off in msecs
@@ -7717,7 +7717,7 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
 }
 
 /**
- * i40e_aq_opc_set_ns_proxy_table_entry
+ * i40e_aq_set_ns_proxy_table_entry
  * @hw: pointer to the HW structure
  * @ns_proxy_table_entry: pointer to NS table entry command struct
  * @cmd_details: pointer to command details
diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c
index 388af3d64d..46add19c9f 100644
--- a/drivers/net/i40e/base/i40e_dcb.c
+++ b/drivers/net/i40e/base/i40e_dcb.c
@@ -235,7 +235,7 @@ static void i40e_parse_ieee_app_tlv(struct i40e_lldp_org_tlv *tlv,
 }
 
 /**
- * i40e_parse_ieee_etsrec_tlv
+ * i40e_parse_ieee_tlv
  * @tlv: IEEE 802.1Qaz TLV
  * @dcbcfg: Local store to update ETS REC data
  *
diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c b/drivers/net/i40e/base/i40e_lan_hmc.c
index d3969396f0..d3bd683ff3 100644
--- a/drivers/net/i40e/base/i40e_lan_hmc.c
+++ b/drivers/net/i40e/base/i40e_lan_hmc.c
@@ -516,7 +516,7 @@ configure_lan_hmc_out:
 }
 
 /**
- * i40e_delete_hmc_object - remove hmc objects
+ * i40e_delete_lan_hmc_object - remove hmc objects
  * @hw: pointer to the HW structure
  * @info: pointer to i40e_hmc_delete_obj_info struct
  *
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 561ed21136..67e58cc195 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -7,7 +7,7 @@
 #include "i40e_prototype.h"
 
 /**
- * i40e_init_nvm_ops - Initialize NVM function pointers
+ * i40e_init_nvm - Initialize NVM function pointers
  * @hw: pointer to the HW structure
  *
  * Setup the function pointers and the NVM info structure. Should be called
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.432235668 +0800
+++ 0146-net-i40e-base-fix-function-name-in-comments.patch	2021-11-10 14:17:01.934078906 +0800
@@ -1 +1 @@
-From bd3c90715b1913b99b9857067fa76985b7fb9224 Mon Sep 17 00:00:00 2001
+From 088b09d8daf2c7f2a2db6eacaf986d09bc81785a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bd3c90715b1913b99b9857067fa76985b7fb9224 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 2ca6a13e79..baa51e1396 100644
+index 657695c5d8..6376e685e4 100644
@@ -46 +48 @@
-@@ -4830,7 +4830,7 @@ enum i40e_status_code i40e_aq_del_udp_tunnel(struct i40e_hw *hw, u8 index,
+@@ -4723,7 +4723,7 @@ enum i40e_status_code i40e_aq_del_udp_tunnel(struct i40e_hw *hw, u8 index,
@@ -55 +57 @@
-@@ -6977,7 +6977,7 @@ u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num)
+@@ -6870,7 +6870,7 @@ u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num)
@@ -64 +66 @@
-@@ -7824,7 +7824,7 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
+@@ -7717,7 +7717,7 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
@@ -74 +76 @@
-index 27b52bc365..8f9b7e823f 100644
+index 388af3d64d..46add19c9f 100644

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

* [dpdk-stable] patch 'net/i40e/base: fix potentially uninitialized variables' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (145 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix function name in comments' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix using checksum before check' " Xueming Li
                   ` (105 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Robin Zhang; +Cc: Luca Boccassi, Christopher Pau, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 50dcbcd809225687f2da84e11b60742fce7fef68 Mon Sep 17 00:00:00 2001
From: Robin Zhang <robinx.zhang@intel.com>
Date: Sat, 9 Oct 2021 01:39:50 +0000
Subject: [PATCH] net/i40e/base: fix potentially uninitialized variables
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bc99971d1021ecc85280b9b98e84c9b5f4ba008e ]

The status of i40e_read_nvm_word is not checked, so variables set
from this function could be used uninitialized. In this case, preserve
the existing flow that does not block initialization by initializing
these values from the start.

Fixes: 8d6c51fcd24b ("i40e/base: get OEM version")
Fixes: 2db70574247b ("net/i40e/base: limit PF/VF specific code to that driver only")

Signed-off-by: Christopher Pau <christopher.pau@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/base/i40e_adminq.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index 235667d57a..c63a38e900 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -652,8 +652,10 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
 {
 	struct i40e_adminq_info *aq = &hw->aq;
 	enum i40e_status_code ret_code;
-	u16 cfg_ptr, oem_hi, oem_lo;
-	u16 eetrack_lo, eetrack_hi;
+	u16 oem_hi = 0, oem_lo = 0;
+	u16 eetrack_hi = 0;
+	u16 eetrack_lo = 0;
+	u16 cfg_ptr = 0;
 	int retry = 0;
 
 	/* verify input for valid configuration */
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.479979630 +0800
+++ 0147-net-i40e-base-fix-potentially-uninitialized-variable.patch	2021-11-10 14:17:01.934078906 +0800
@@ -1 +1 @@
-From bc99971d1021ecc85280b9b98e84c9b5f4ba008e Mon Sep 17 00:00:00 2001
+From 50dcbcd809225687f2da84e11b60742fce7fef68 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bc99971d1021ecc85280b9b98e84c9b5f4ba008e ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 38d3429e5b..27c82d9b44 100644
+index 235667d57a..c63a38e900 100644

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

* [dpdk-stable] patch 'net/i40e/base: fix using checksum before check' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (146 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix potentially uninitialized variables' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/mlx5: fix software parsing support query' " Xueming Li
                   ` (104 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Robin Zhang; +Cc: Luca Boccassi, Christopher Pau, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ae2b2f46f532c26737476c22bf628190cab1eff4 Mon Sep 17 00:00:00 2001
From: Robin Zhang <robinx.zhang@intel.com>
Date: Sat, 9 Oct 2021 01:39:51 +0000
Subject: [PATCH] net/i40e/base: fix using checksum before check
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e59d949182767cdf8c7ee1b2637034f50a8487fb ]

The variable checksum from i40e_calc_nvm_checksum is used before return
value is checked. Fix this logic.

Fixes: 8db9e2a1b232 ("i40e: base driver")
Fixes: 3ed6c3246f43 ("i40e/base: handle AQ timeout when releasing NVM")

Signed-off-by: Christopher Pau <christopher.pau@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/base/i40e_nvm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 67e58cc195..f385042601 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -755,10 +755,11 @@ enum i40e_status_code i40e_update_nvm_checksum(struct i40e_hw *hw)
 	DEBUGFUNC("i40e_update_nvm_checksum");
 
 	ret_code = i40e_calc_nvm_checksum(hw, &checksum);
-	le_sum = CPU_TO_LE16(checksum);
-	if (ret_code == I40E_SUCCESS)
+	if (ret_code == I40E_SUCCESS) {
+		le_sum = CPU_TO_LE16(checksum);
 		ret_code = i40e_write_nvm_aq(hw, 0x00, I40E_SR_SW_CHECKSUM_WORD,
 					     1, &le_sum, true);
+	}
 
 	return ret_code;
 }
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.520872908 +0800
+++ 0148-net-i40e-base-fix-using-checksum-before-check.patch	2021-11-10 14:17:01.934078906 +0800
@@ -1 +1 @@
-From e59d949182767cdf8c7ee1b2637034f50a8487fb Mon Sep 17 00:00:00 2001
+From ae2b2f46f532c26737476c22bf628190cab1eff4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e59d949182767cdf8c7ee1b2637034f50a8487fb ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/mlx5: fix software parsing support query' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (147 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix using checksum before check' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/mlx5: fix tunneling " Xueming Li
                   ` (103 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Tal Shnaiderman; +Cc: Luca Boccassi, Matan Azrad, Idan Hackmon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 29a18f0f26e6d9597d415dba9d9b6f7960d23237 Mon Sep 17 00:00:00 2001
From: Tal Shnaiderman <talshn@nvidia.com>
Date: Tue, 12 Oct 2021 15:45:42 +0300
Subject: [PATCH] net/mlx5: fix software parsing support query
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit accf3cfce4cb531bb1d5aceb1c1c84cc36ae9175 ]

Currently, the PMD decides if the software parsing
offload can enable outer IPv4 checksum and tunneled
TSO support by checking config->hw_csum and config->tso
respectively.

This is incorrect, the right way is to check the following
flags returned by the mlx5dv_query_device function:

MLX5DV_SW_PARSING - check general swp support.
MLX5DV_SW_PARSING_CSUM - check swp checksum support.
MLX5DV_SW_PARSING_LSO - check swp LSO/TSO support.

The fix enables the offloads according to the correct
flags returned by the kernel.

Fixes: e46821e9fcdc ("net/mlx5: separate generic tunnel TSO from the standard one")

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Tested-by: Idan Hackmon <idanhac@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c |  3 ++-
 drivers/net/mlx5/linux/mlx5_os.h | 12 ++++++++++++
 drivers/net/mlx5/mlx5.h          |  2 +-
 drivers/net/mlx5/mlx5_txq.c      | 15 +++++++++------
 4 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 04700fcbeb..714feba36e 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -916,7 +916,8 @@ err_secondary:
 		swp = dv_attr.sw_parsing_caps.sw_parsing_offloads;
 	DRV_LOG(DEBUG, "SWP support: %u", swp);
 #endif
-	config->swp = !!swp;
+	config->swp = swp & (MLX5_SW_PARSING_CAP | MLX5_SW_PARSING_CSUM_CAP |
+		MLX5_SW_PARSING_TSO_CAP);
 #ifdef HAVE_IBV_DEVICE_STRIDING_RQ_SUPPORT
 	if (dv_attr.comp_mask & MLX5DV_CONTEXT_MASK_STRIDING_RQ) {
 		struct mlx5dv_striding_rq_caps mprq_caps =
diff --git a/drivers/net/mlx5/linux/mlx5_os.h b/drivers/net/mlx5/linux/mlx5_os.h
index 7dbacceabe..d9d464b5e3 100644
--- a/drivers/net/mlx5/linux/mlx5_os.h
+++ b/drivers/net/mlx5/linux/mlx5_os.h
@@ -19,4 +19,16 @@ enum {
 #define PCI_DRV_FLAGS  (RTE_PCI_DRV_INTR_LSC | \
 			RTE_PCI_DRV_INTR_RMV | \
 			RTE_PCI_DRV_PROBE_AGAIN)
+
+enum mlx5_sw_parsing_offloads {
+#ifdef HAVE_IBV_MLX5_MOD_SWP
+	MLX5_SW_PARSING_CAP      = MLX5DV_SW_PARSING,
+	MLX5_SW_PARSING_CSUM_CAP = MLX5DV_SW_PARSING_CSUM,
+	MLX5_SW_PARSING_TSO_CAP  = MLX5DV_SW_PARSING_LSO,
+#else
+	MLX5_SW_PARSING_CAP      = 0,
+	MLX5_SW_PARSING_CSUM_CAP = 0,
+	MLX5_SW_PARSING_TSO_CAP  = 0,
+#endif
+};
 #endif /* RTE_PMD_MLX5_OS_H_ */
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 69eda27a0f..9c8991aba6 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -218,7 +218,7 @@ struct mlx5_dev_config {
 	unsigned int dv_xmeta_en:2; /* Enable extensive flow metadata. */
 	unsigned int lacp_by_user:1;
 	/* Enable user to manage LACP traffic. */
-	unsigned int swp:1; /* Tx generic tunnel checksum and TSO offload. */
+	unsigned int swp:3; /* Tx generic tunnel checksum and TSO offload. */
 	unsigned int devx:1; /* Whether devx interface is available or not. */
 	unsigned int dest_tir:1; /* Whether advanced DR API is available. */
 	unsigned int reclaim_mode:2; /* Memory reclaim mode. */
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 9ec7b57f1c..1354cc9619 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -109,9 +109,9 @@ mlx5_get_tx_port_offloads(struct rte_eth_dev *dev)
 	if (config->tx_pp)
 		offloads |= DEV_TX_OFFLOAD_SEND_ON_TIMESTAMP;
 	if (config->swp) {
-		if (config->hw_csum)
+		if (config->swp & MLX5_SW_PARSING_CSUM_CAP)
 			offloads |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM;
-		if (config->tso)
+		if (config->swp & MLX5_SW_PARSING_TSO_CAP)
 			offloads |= (DEV_TX_OFFLOAD_IP_TNL_TSO |
 				     DEV_TX_OFFLOAD_UDP_TNL_TSO);
 	}
@@ -971,10 +971,13 @@ txq_set_params(struct mlx5_txq_ctrl *txq_ctrl)
 		txq_ctrl->txq.tso_en = 1;
 	}
 	txq_ctrl->txq.tunnel_en = config->tunnel_en | config->swp;
-	txq_ctrl->txq.swp_en = ((DEV_TX_OFFLOAD_IP_TNL_TSO |
-				 DEV_TX_OFFLOAD_UDP_TNL_TSO |
-				 DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) &
-				txq_ctrl->txq.offloads) && config->swp;
+	txq_ctrl->txq.swp_en = (((DEV_TX_OFFLOAD_IP_TNL_TSO |
+				  DEV_TX_OFFLOAD_UDP_TNL_TSO) &
+				  txq_ctrl->txq.offloads) && (config->swp &
+				  MLX5_SW_PARSING_TSO_CAP)) |
+				((DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM &
+				 txq_ctrl->txq.offloads) && (config->swp &
+				 MLX5_SW_PARSING_CSUM_CAP));
 }
 
 /**
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.562122974 +0800
+++ 0149-net-mlx5-fix-software-parsing-support-query.patch	2021-11-10 14:17:01.937412212 +0800
@@ -1 +1 @@
-From accf3cfce4cb531bb1d5aceb1c1c84cc36ae9175 Mon Sep 17 00:00:00 2001
+From 29a18f0f26e6d9597d415dba9d9b6f7960d23237 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit accf3cfce4cb531bb1d5aceb1c1c84cc36ae9175 ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -35 +37 @@
-index 0dcf5000e9..e08082ed70 100644
+index 04700fcbeb..714feba36e 100644
@@ -38 +40 @@
-@@ -1111,7 +1111,8 @@ err_secondary:
+@@ -916,7 +916,8 @@ err_secondary:
@@ -49 +51 @@
-index 2991d37df2..da036edb72 100644
+index 7dbacceabe..d9d464b5e3 100644
@@ -52,4 +54,4 @@
-@@ -21,4 +21,16 @@ enum {
- 
- int mlx5_auxiliary_get_ifindex(const char *sf_name);
- 
+@@ -19,4 +19,16 @@ enum {
+ #define PCI_DRV_FLAGS  (RTE_PCI_DRV_INTR_LSC | \
+ 			RTE_PCI_DRV_INTR_RMV | \
+ 			RTE_PCI_DRV_PROBE_AGAIN)
@@ -70 +72 @@
-index 6811b8bd35..d74ac19cf8 100644
+index 69eda27a0f..9c8991aba6 100644
@@ -73 +75 @@
-@@ -267,7 +267,7 @@ struct mlx5_dev_config {
+@@ -218,7 +218,7 @@ struct mlx5_dev_config {
@@ -83 +85 @@
-index 92fbdab568..eb26367827 100644
+index 9ec7b57f1c..1354cc9619 100644
@@ -86 +88 @@
-@@ -111,9 +111,9 @@ mlx5_get_tx_port_offloads(struct rte_eth_dev *dev)
+@@ -109,9 +109,9 @@ mlx5_get_tx_port_offloads(struct rte_eth_dev *dev)
@@ -98 +100 @@
-@@ -972,10 +972,13 @@ txq_set_params(struct mlx5_txq_ctrl *txq_ctrl)
+@@ -971,10 +971,13 @@ txq_set_params(struct mlx5_txq_ctrl *txq_ctrl)

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

* [dpdk-stable] patch 'net/mlx5: fix tunneling support query' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (148 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/mlx5: fix software parsing support query' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/enic: fix filter mode detection' " Xueming Li
                   ` (102 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Tal Shnaiderman; +Cc: Luca Boccassi, Matan Azrad, Idan Hackmon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3d8dfe94bdc766526f3d61b8900e8d7fd6a06ede Mon Sep 17 00:00:00 2001
From: Tal Shnaiderman <talshn@nvidia.com>
Date: Tue, 12 Oct 2021 15:45:45 +0300
Subject: [PATCH] net/mlx5: fix tunneling support query
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c1a320bf899e5ff8d3e3a4f291ee61c8a98a8bda ]

Currently, the PMD decides if the tunneling offload
can enable VXLAN/GRE/GENEVE tunneled TSO support by checking
config->tunnel_en (single bit) and config->tso.

This is incorrect, the right way is to check the following
flags returned by the mlx5dv_query_device function:

MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_VXLAN - if supported the offload
DEV_TX_OFFLOAD_VXLAN_TNL_TSO can be enabled.
MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GRE - if supported the offload
DEV_TX_OFFLOAD_GRE_TNL_TSO can be enabled.
MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GENEVE - if supported the offload
DEV_TX_OFFLOAD_GENEVE_TNL_TSO can be enabled.

The fix enables the offloads according to the correct
flags returned by the kernel.

Fixes: dbccb4cddcd2 ("net/mlx5: convert to new Tx offloads API")

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Tested-by: Idan Hackmon <idanhac@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 28 +++++++++++++++++-----------
 drivers/net/mlx5/linux/mlx5_os.h | 15 +++++++++++++++
 drivers/net/mlx5/mlx5.h          |  2 +-
 drivers/net/mlx5/mlx5_txq.c      | 24 +++++++++++++++++++-----
 4 files changed, 52 insertions(+), 17 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 714feba36e..cc4fa3dd97 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -755,7 +755,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 	int err = 0;
 	unsigned int hw_padding = 0;
 	unsigned int mps;
-	unsigned int tunnel_en = 0;
 	unsigned int mpls_en = 0;
 	unsigned int swp = 0;
 	unsigned int mprq = 0;
@@ -949,20 +948,27 @@ err_secondary:
 	config->cqe_comp = 1;
 #ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT
 	if (dv_attr.comp_mask & MLX5DV_CONTEXT_MASK_TUNNEL_OFFLOADS) {
-		tunnel_en = ((dv_attr.tunnel_offloads_caps &
-			      MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_VXLAN) &&
-			     (dv_attr.tunnel_offloads_caps &
-			      MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GRE) &&
-			     (dv_attr.tunnel_offloads_caps &
-			      MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GENEVE));
-	}
-	DRV_LOG(DEBUG, "tunnel offloading is %ssupported",
-		tunnel_en ? "" : "not ");
+		config->tunnel_en = dv_attr.tunnel_offloads_caps &
+			     (MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_VXLAN |
+			      MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GRE |
+			      MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GENEVE);
+	}
+	if (config->tunnel_en) {
+		DRV_LOG(DEBUG, "tunnel offloading is supported for %s%s%s",
+		config->tunnel_en &
+		MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_VXLAN ? "[VXLAN]" : "",
+		config->tunnel_en &
+		MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GRE ? "[GRE]" : "",
+		config->tunnel_en &
+		MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GENEVE ? "[GENEVE]" : ""
+		);
+	} else {
+		DRV_LOG(DEBUG, "tunnel offloading is not supported");
+	}
 #else
 	DRV_LOG(WARNING,
 		"tunnel offloading disabled due to old OFED/rdma-core version");
 #endif
-	config->tunnel_en = tunnel_en;
 #ifdef HAVE_IBV_DEVICE_MPLS_SUPPORT
 	mpls_en = ((dv_attr.tunnel_offloads_caps &
 		    MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_CW_MPLS_OVER_GRE) &&
diff --git a/drivers/net/mlx5/linux/mlx5_os.h b/drivers/net/mlx5/linux/mlx5_os.h
index d9d464b5e3..a524f71d2b 100644
--- a/drivers/net/mlx5/linux/mlx5_os.h
+++ b/drivers/net/mlx5/linux/mlx5_os.h
@@ -31,4 +31,19 @@ enum mlx5_sw_parsing_offloads {
 	MLX5_SW_PARSING_TSO_CAP  = 0,
 #endif
 };
+
+enum mlx5_tunnel_offloads {
+#ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT
+	MLX5_TUNNELED_OFFLOADS_VXLAN_CAP  =
+		MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_VXLAN,
+	MLX5_TUNNELED_OFFLOADS_GRE_CAP    =
+		MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GRE,
+	MLX5_TUNNELED_OFFLOADS_GENEVE_CAP =
+		MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GENEVE,
+#else
+	MLX5_TUNNELED_OFFLOADS_VXLAN_CAP  = 0,
+	MLX5_TUNNELED_OFFLOADS_GRE_CAP	  = 0,
+	MLX5_TUNNELED_OFFLOADS_GENEVE_CAP = 0,
+#endif
+};
 #endif /* RTE_PMD_MLX5_OS_H_ */
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 9c8991aba6..3d6d5bb923 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -202,7 +202,7 @@ struct mlx5_dev_config {
 	unsigned int hw_fcs_strip:1; /* FCS stripping is supported. */
 	unsigned int hw_padding:1; /* End alignment padding is supported. */
 	unsigned int vf:1; /* This is a VF. */
-	unsigned int tunnel_en:1;
+	unsigned int tunnel_en:3;
 	/* Whether tunnel stateless offloads are supported. */
 	unsigned int mpls_en:1; /* MPLS over GRE/UDP is enabled. */
 	unsigned int cqe_comp:1; /* CQE compression is enabled. */
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 1354cc9619..5f1a179df3 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -118,10 +118,17 @@ mlx5_get_tx_port_offloads(struct rte_eth_dev *dev)
 	if (config->tunnel_en) {
 		if (config->hw_csum)
 			offloads |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM;
-		if (config->tso)
-			offloads |= (DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
-				     DEV_TX_OFFLOAD_GRE_TNL_TSO |
-				     DEV_TX_OFFLOAD_GENEVE_TNL_TSO);
+		if (config->tso) {
+			if (config->tunnel_en &
+				MLX5_TUNNELED_OFFLOADS_VXLAN_CAP)
+				offloads |= DEV_TX_OFFLOAD_VXLAN_TNL_TSO;
+			if (config->tunnel_en &
+				MLX5_TUNNELED_OFFLOADS_GRE_CAP)
+				offloads |= DEV_TX_OFFLOAD_GRE_TNL_TSO;
+			if (config->tunnel_en &
+				MLX5_TUNNELED_OFFLOADS_GENEVE_CAP)
+				offloads |= DEV_TX_OFFLOAD_GENEVE_TNL_TSO;
+		}
 	}
 	return offloads;
 }
@@ -970,7 +977,14 @@ txq_set_params(struct mlx5_txq_ctrl *txq_ctrl)
 						    MLX5_MAX_TSO_HEADER);
 		txq_ctrl->txq.tso_en = 1;
 	}
-	txq_ctrl->txq.tunnel_en = config->tunnel_en | config->swp;
+	if (((DEV_TX_OFFLOAD_VXLAN_TNL_TSO & txq_ctrl->txq.offloads) &&
+	    (config->tunnel_en & MLX5_TUNNELED_OFFLOADS_VXLAN_CAP)) |
+	   ((DEV_TX_OFFLOAD_GRE_TNL_TSO & txq_ctrl->txq.offloads) &&
+	    (config->tunnel_en & MLX5_TUNNELED_OFFLOADS_GRE_CAP)) |
+	   ((DEV_TX_OFFLOAD_GENEVE_TNL_TSO & txq_ctrl->txq.offloads) &&
+	    (config->tunnel_en & MLX5_TUNNELED_OFFLOADS_GENEVE_CAP)) |
+	   (config->swp  & MLX5_SW_PARSING_TSO_CAP))
+		txq_ctrl->txq.tunnel_en = 1;
 	txq_ctrl->txq.swp_en = (((DEV_TX_OFFLOAD_IP_TNL_TSO |
 				  DEV_TX_OFFLOAD_UDP_TNL_TSO) &
 				  txq_ctrl->txq.offloads) && (config->swp &
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.606458859 +0800
+++ 0150-net-mlx5-fix-tunneling-support-query.patch	2021-11-10 14:17:01.937412212 +0800
@@ -1 +1 @@
-From c1a320bf899e5ff8d3e3a4f291ee61c8a98a8bda Mon Sep 17 00:00:00 2001
+From 3d8dfe94bdc766526f3d61b8900e8d7fd6a06ede Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c1a320bf899e5ff8d3e3a4f291ee61c8a98a8bda ]
@@ -24 +26,0 @@
-Cc: stable@dpdk.org
@@ -30,6 +32,5 @@
- drivers/net/mlx5/linux/mlx5_os.c   | 28 +++++++++++++++++-----------
- drivers/net/mlx5/linux/mlx5_os.h   | 15 +++++++++++++++
- drivers/net/mlx5/mlx5.h            |  2 +-
- drivers/net/mlx5/mlx5_txq.c        | 24 +++++++++++++++++++-----
- drivers/net/mlx5/windows/mlx5_os.h |  6 ++++++
- 5 files changed, 58 insertions(+), 17 deletions(-)
+ drivers/net/mlx5/linux/mlx5_os.c | 28 +++++++++++++++++-----------
+ drivers/net/mlx5/linux/mlx5_os.h | 15 +++++++++++++++
+ drivers/net/mlx5/mlx5.h          |  2 +-
+ drivers/net/mlx5/mlx5_txq.c      | 24 +++++++++++++++++++-----
+ 4 files changed, 52 insertions(+), 17 deletions(-)
@@ -38 +39 @@
-index e08082ed70..26a8d75b99 100644
+index 714feba36e..cc4fa3dd97 100644
@@ -41 +42 @@
-@@ -963,7 +963,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
+@@ -755,7 +755,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
@@ -49 +50 @@
-@@ -1144,20 +1143,27 @@ err_secondary:
+@@ -949,20 +948,27 @@ err_secondary:
@@ -88 +89 @@
-index da036edb72..80c70d713a 100644
+index d9d464b5e3..a524f71d2b 100644
@@ -91 +92 @@
-@@ -33,4 +33,19 @@ enum mlx5_sw_parsing_offloads {
+@@ -31,4 +31,19 @@ enum mlx5_sw_parsing_offloads {
@@ -112 +113 @@
-index 483bf35f85..6dde6210d1 100644
+index 9c8991aba6..3d6d5bb923 100644
@@ -115 +116,2 @@
-@@ -251,7 +251,7 @@ struct mlx5_dev_config {
+@@ -202,7 +202,7 @@ struct mlx5_dev_config {
+ 	unsigned int hw_fcs_strip:1; /* FCS stripping is supported. */
@@ -118 +119,0 @@
- 	unsigned int sf:1; /* This is a SF. */
@@ -125 +126 @@
-index eb26367827..1f92250f5e 100644
+index 1354cc9619..5f1a179df3 100644
@@ -128 +129 @@
-@@ -120,10 +120,17 @@ mlx5_get_tx_port_offloads(struct rte_eth_dev *dev)
+@@ -118,10 +118,17 @@ mlx5_get_tx_port_offloads(struct rte_eth_dev *dev)
@@ -148,3 +149,3 @@
- 	if (!config->mprq.enabled)
- 		offloads |= DEV_TX_OFFLOAD_MBUF_FAST_FREE;
-@@ -971,7 +978,14 @@ txq_set_params(struct mlx5_txq_ctrl *txq_ctrl)
+ 	return offloads;
+ }
+@@ -970,7 +977,14 @@ txq_set_params(struct mlx5_txq_ctrl *txq_ctrl)
@@ -166,15 +166,0 @@
-diff --git a/drivers/net/mlx5/windows/mlx5_os.h b/drivers/net/mlx5/windows/mlx5_os.h
-index 6de683357c..8b58265687 100644
---- a/drivers/net/mlx5/windows/mlx5_os.h
-+++ b/drivers/net/mlx5/windows/mlx5_os.h
-@@ -22,4 +22,10 @@ enum mlx5_sw_parsing_offloads {
- 	MLX5_SW_PARSING_TSO_CAP =  1 << 2,
- };
- 
-+enum mlx5_tunnel_offloads {
-+	MLX5_TUNNELED_OFFLOADS_VXLAN_CAP  = 1 << 0,
-+	MLX5_TUNNELED_OFFLOADS_GRE_CAP	  = 1 << 1,
-+	MLX5_TUNNELED_OFFLOADS_GENEVE_CAP = 1 << 2,
-+};
-+
- #endif /* RTE_PMD_MLX5_OS_H_ */

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

* [dpdk-stable] patch 'net/enic: fix filter mode detection' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (149 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/mlx5: fix tunneling " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/softnic: fix useless address check' " Xueming Li
                   ` (101 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: Luca Boccassi, John Daley, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 573ac2bfe0b3c08e90eee1bd782ffa1d76223d60 Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Tue, 12 Oct 2021 18:21:23 -0700
Subject: [PATCH] net/enic: fix filter mode detection
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit fb9274546120898933f225742d9e37530504e8f9 ]

vnic_dev_capable_filter_mode() currently fails when
CMD_CAPABILITY(CMD_ADD_FILTER) returns ERR_EPERM. In turn, this
failure causes the driver initialization to fail.

But, firmware may legitimately return ERR_EPERM. For example, VF vNIC
returns ERR_EPERM when it does not support filtering at all. So, treat
ERR_EPERM as "no filtering available" instead of an unexpected error.

Fixes: 322b355f2183 ("net/enic/base: bring NIC interface functions up to date")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/base/vnic_dev.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/net/enic/base/vnic_dev.c b/drivers/net/enic/base/vnic_dev.c
index 6f48ea51de..2a5ea93bfe 100644
--- a/drivers/net/enic/base/vnic_dev.c
+++ b/drivers/net/enic/base/vnic_dev.c
@@ -644,8 +644,8 @@ static int vnic_dev_flowman_enable(struct vnic_dev *vdev, uint32_t *mode,
 	return 1;
 }
 
-/*  Determine the "best" filtering mode VIC is capaible of. Returns one of 4
- *  value or 0 on error:
+/*  Determine the "best" filtering mode VIC is capable of. Returns one of 4
+ *  value or 0 if filtering is unavailble:
  *	FILTER_FLOWMAN- flowman api capable
  *	FILTER_DPDK_1- advanced filters availabile
  *	FILTER_USNIC_IP_FLAG - advanced filters but with the restriction that
@@ -680,6 +680,14 @@ int vnic_dev_capable_filter_mode(struct vnic_dev *vdev, uint32_t *mode,
 		args[0] = CMD_ADD_FILTER;
 		args[1] = 0;
 		err = vnic_dev_cmd_args(vdev, CMD_CAPABILITY, args, 2, 1000);
+		/*
+		 * ERR_EPERM may be returned if, for example, vNIC is
+		 * on a VF. It simply means no filtering is available
+		 */
+		if (err == -ERR_EPERM) {
+			*mode = 0;
+			return 0;
+		}
 		if (err)
 			return err;
 		max_level = args[1];
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.651494685 +0800
+++ 0151-net-enic-fix-filter-mode-detection.patch	2021-11-10 14:17:01.940745518 +0800
@@ -1 +1 @@
-From fb9274546120898933f225742d9e37530504e8f9 Mon Sep 17 00:00:00 2001
+From 573ac2bfe0b3c08e90eee1bd782ffa1d76223d60 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fb9274546120898933f225742d9e37530504e8f9 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index ab6e05739b..9c42595ced 100644
+index 6f48ea51de..2a5ea93bfe 100644

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

* [dpdk-stable] patch 'net/softnic: fix useless address check' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (150 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/enic: fix filter mode detection' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'app/testpmd: fix hex string parser in flow commands' " Xueming Li
                   ` (100 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Luca Boccassi, Jasvinder Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0f775b1258eff675d4f809a6470829d130b5b63d Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Mon, 4 Oct 2021 18:27:22 +0100
Subject: [PATCH] net/softnic: fix useless address check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 675a6c18746694a8e19a0256b16bd6b3e8dcbfd2 ]

Reported by "gcc (GCC) 12.0.0 20211003 (experimental)":

./drivers/net/softnic/rte_eth_softnic_cli.c:
	In function ‘tmgr_hierarchy_default’:
./drivers/net/softnic/rte_eth_softnic_cli.c:634:73:
	error: the comparison will always evaluate as ‘true’ for the
	address of ‘tc_valid’ will never be NULL [-Werror=address]
  634 | (&params->shared_shaper_id.tc_valid[0]) ? 1 : 0,
      |                                         ^

Fixing it by removing useless check.

Fixes: 1af2dc5111ce ("net/softnic: add command for default tmgr hierarchy")
Fixes: 5eb676d74fc8 ("net/softnic: add config flexibility to TM")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
 drivers/net/softnic/rte_eth_softnic_cli.c | 26 +++++++++++------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/net/softnic/rte_eth_softnic_cli.c b/drivers/net/softnic/rte_eth_softnic_cli.c
index 932ec15f49..b04e78c6e0 100644
--- a/drivers/net/softnic/rte_eth_softnic_cli.c
+++ b/drivers/net/softnic/rte_eth_softnic_cli.c
@@ -631,7 +631,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[0],
 			.shared_shaper_id = &shared_shaper_id[0],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[0]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[0]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -641,7 +641,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[1],
 			.shared_shaper_id = &shared_shaper_id[1],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[1]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[1]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -651,7 +651,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[2],
 			.shared_shaper_id = &shared_shaper_id[2],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[2]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[2]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -661,7 +661,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[3],
 			.shared_shaper_id = &shared_shaper_id[3],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[3]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[3]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -671,7 +671,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[4],
 			.shared_shaper_id = &shared_shaper_id[4],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[4]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[4]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -681,7 +681,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[5],
 			.shared_shaper_id = &shared_shaper_id[5],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[5]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[5]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -691,7 +691,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[6],
 			.shared_shaper_id = &shared_shaper_id[6],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[6]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[6]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -701,7 +701,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[7],
 			.shared_shaper_id = &shared_shaper_id[7],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[7]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[7]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -711,7 +711,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[8],
 			.shared_shaper_id = &shared_shaper_id[8],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[8]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[8]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -721,7 +721,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[9],
 			.shared_shaper_id = &shared_shaper_id[9],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[9]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[9]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -731,7 +731,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[10],
 			.shared_shaper_id = &shared_shaper_id[10],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[10]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[10]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -741,7 +741,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[11],
 			.shared_shaper_id = &shared_shaper_id[11],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[11]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[11]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
@@ -751,7 +751,7 @@ tmgr_hierarchy_default(struct pmd_internals *softnic,
 			.shaper_profile_id = params->shaper_profile_id.tc[12],
 			.shared_shaper_id = &shared_shaper_id[12],
 			.n_shared_shapers =
-				(&params->shared_shaper_id.tc_valid[12]) ? 1 : 0,
+				(params->shared_shaper_id.tc_valid[12]) ? 1 : 0,
 			.nonleaf = {
 				.n_sp_priorities = 1,
 			},
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.692159266 +0800
+++ 0152-net-softnic-fix-useless-address-check.patch	2021-11-10 14:17:01.940745518 +0800
@@ -1 +1 @@
-From 675a6c18746694a8e19a0256b16bd6b3e8dcbfd2 Mon Sep 17 00:00:00 2001
+From 0f775b1258eff675d4f809a6470829d130b5b63d Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 675a6c18746694a8e19a0256b16bd6b3e8dcbfd2 ]
@@ -23 +25,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/testpmd: fix hex string parser in flow commands' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (151 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/softnic: fix useless address check' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/txgbe: fix to get interrupt status' " Xueming Li
                   ` (99 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Luca Boccassi, Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c77bb52ed48e27e6846ab435d121ba32ac2364e9 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 13 Oct 2021 21:45:15 +0300
Subject: [PATCH] app/testpmd: fix hex string parser in flow commands
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a2b97fb7f5b11dcf5e810e13a0da1a0f111975e6 ]

The hexadecimal string parser does not check the target
field buffer size, buffer overflow happens and might
cause the application failure (segmentation fault
is observed usually).

Fixes: 169a9fed1f4c ("app/testpmd: fix hex string parser support for flow API")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 app/test-pmd/cmdline_flow.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index c67ac71505..bbf62be5ae 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -6479,10 +6479,13 @@ parse_hex(struct context *ctx, const struct token *token,
 		hexlen -= 2;
 	}
 	if (hexlen > length)
-		return -1;
+		goto error;
 	ret = parse_hex_string(str, hex_tmp, &hexlen);
 	if (ret < 0)
 		goto error;
+	/* Check the converted binary fits into data buffer. */
+	if (hexlen > size)
+		goto error;
 	/* Let parse_int() fill length information first. */
 	ret = snprintf(tmp, sizeof(tmp), "%u", hexlen);
 	if (ret < 0)
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.737101866 +0800
+++ 0153-app-testpmd-fix-hex-string-parser-in-flow-commands.patch	2021-11-10 14:17:01.947412130 +0800
@@ -1 +1 @@
-From a2b97fb7f5b11dcf5e810e13a0da1a0f111975e6 Mon Sep 17 00:00:00 2001
+From c77bb52ed48e27e6846ab435d121ba32ac2364e9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a2b97fb7f5b11dcf5e810e13a0da1a0f111975e6 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 6d9e3d5c42..a90822b660 100644
+index c67ac71505..bbf62be5ae 100644
@@ -24 +26 @@
-@@ -7381,10 +7381,13 @@ parse_hex(struct context *ctx, const struct token *token,
+@@ -6479,10 +6479,13 @@ parse_hex(struct context *ctx, const struct token *token,

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

* [dpdk-stable] patch 'net/txgbe: fix to get interrupt status' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (152 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'app/testpmd: fix hex string parser in flow commands' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'drivers/net: remove queue xstats auto-fill flag' " Xueming Li
                   ` (98 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d551929c9282544e0203138d84c9e45851266066 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 13 Oct 2021 10:45:19 +0800
Subject: [PATCH] net/txgbe: fix to get interrupt status
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ef6427a3f2868af08dc888031dcdf4eb41451b24 ]

It's necessary to set 1 on TXGBE_PX_INTA register to get interrupts
normally, when legacy interrupt mode is used.

Fixes: 2fc745e6b606 ("net/txgbe: add interrupt operation")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_regs.h |  1 +
 drivers/net/txgbe/txgbe_ethdev.c    | 12 +++++++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/net/txgbe/base/txgbe_regs.h b/drivers/net/txgbe/base/txgbe_regs.h
index 052609e3c1..83c219a6e2 100644
--- a/drivers/net/txgbe/base/txgbe_regs.h
+++ b/drivers/net/txgbe/base/txgbe_regs.h
@@ -1218,6 +1218,7 @@ enum txgbe_5tuple_protocol {
 #define TXGBE_IVARMISC                  0x0004FC
 #define   TXGBE_IVARMISC_VEC(v)         LS(v, 0, 0x7)
 #define   TXGBE_IVARMISC_VLD            MS(7, 0x1)
+#define TXGBE_PX_INTA			0x000110
 #define TXGBE_ICR(i)                    (0x000120 + (i) * 4) /* 0-1 */
 #define   TXGBE_ICR_MASK                MS(0, 0xFFFFFFFF)
 #define TXGBE_ICS(i)                    (0x000130 + (i) * 4) /* 0-1 */
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index d9cc7d236a..a3ed99bae3 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -102,7 +102,8 @@ static void txgbe_dev_link_status_print(struct rte_eth_dev *dev);
 static int txgbe_dev_lsc_interrupt_setup(struct rte_eth_dev *dev, uint8_t on);
 static int txgbe_dev_macsec_interrupt_setup(struct rte_eth_dev *dev);
 static int txgbe_dev_rxq_interrupt_setup(struct rte_eth_dev *dev);
-static int txgbe_dev_interrupt_get_status(struct rte_eth_dev *dev);
+static int txgbe_dev_interrupt_get_status(struct rte_eth_dev *dev,
+				      struct rte_intr_handle *handle);
 static int txgbe_dev_interrupt_action(struct rte_eth_dev *dev,
 				      struct rte_intr_handle *handle);
 static void txgbe_dev_interrupt_handler(void *param);
@@ -2669,12 +2670,17 @@ txgbe_dev_macsec_interrupt_setup(struct rte_eth_dev *dev)
  *  - On failure, a negative value.
  */
 static int
-txgbe_dev_interrupt_get_status(struct rte_eth_dev *dev)
+txgbe_dev_interrupt_get_status(struct rte_eth_dev *dev,
+				struct rte_intr_handle *intr_handle)
 {
 	uint32_t eicr;
 	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
 	struct txgbe_interrupt *intr = TXGBE_DEV_INTR(dev);
 
+	if (intr_handle->type != RTE_INTR_HANDLE_UIO &&
+			intr_handle->type != RTE_INTR_HANDLE_VFIO_MSIX)
+		wr32(hw, TXGBE_PX_INTA, 1);
+
 	/* clear all cause mask */
 	txgbe_disable_intr(hw);
 
@@ -2877,7 +2883,7 @@ txgbe_dev_interrupt_handler(void *param)
 {
 	struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
 
-	txgbe_dev_interrupt_get_status(dev);
+	txgbe_dev_interrupt_get_status(dev, dev->intr_handle);
 	txgbe_dev_interrupt_action(dev, dev->intr_handle);
 }
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.782784932 +0800
+++ 0154-net-txgbe-fix-to-get-interrupt-status.patch	2021-11-10 14:17:01.950745436 +0800
@@ -1 +1 @@
-From ef6427a3f2868af08dc888031dcdf4eb41451b24 Mon Sep 17 00:00:00 2001
+From d551929c9282544e0203138d84c9e45851266066 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ef6427a3f2868af08dc888031dcdf4eb41451b24 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 990589b013..48d9300a2e 100644
+index 052609e3c1..83c219a6e2 100644
@@ -22 +24 @@
-@@ -1219,6 +1219,7 @@ enum txgbe_5tuple_protocol {
+@@ -1218,6 +1218,7 @@ enum txgbe_5tuple_protocol {
@@ -31 +33 @@
-index b267da462b..ab972a3a35 100644
+index d9cc7d236a..a3ed99bae3 100644
@@ -34 +36,2 @@
-@@ -109,7 +109,8 @@ static int txgbe_dev_lsc_interrupt_setup(struct rte_eth_dev *dev, uint8_t on);
+@@ -102,7 +102,8 @@ static void txgbe_dev_link_status_print(struct rte_eth_dev *dev);
+ static int txgbe_dev_lsc_interrupt_setup(struct rte_eth_dev *dev, uint8_t on);
@@ -36 +38,0 @@
- static int txgbe_dev_misc_interrupt_setup(struct rte_eth_dev *dev);
@@ -44 +46 @@
-@@ -2938,12 +2939,17 @@ txgbe_dev_macsec_interrupt_setup(struct rte_eth_dev *dev)
+@@ -2669,12 +2670,17 @@ txgbe_dev_macsec_interrupt_setup(struct rte_eth_dev *dev)
@@ -63 +65 @@
-@@ -3165,7 +3171,7 @@ txgbe_dev_interrupt_handler(void *param)
+@@ -2877,7 +2883,7 @@ txgbe_dev_interrupt_handler(void *param)

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

* [dpdk-stable] patch 'drivers/net: remove queue xstats auto-fill flag' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (153 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/txgbe: fix to get interrupt status' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/ice: fix deadlock on flow redirect' " Xueming Li
                   ` (97 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 664213de5ec6ba2c8434014008dcf867946f9f05 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Date: Tue, 28 Sep 2021 19:48:54 +0300
Subject: [PATCH] drivers/net: remove queue xstats auto-fill flag
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 64c952ec78d35ab3a1a229f9e9901d6092c6189c ]

Some drivers do not provide per-queue statistics. So, there is no point
to have these misleading zeros in xstats.

Fixes: f30e69b41f94 ("ethdev: add device flag to bypass auto-filled queue xstats")

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/bnx2x/bnx2x_ethdev.c       | 1 -
 drivers/net/dpaa/dpaa_ethdev.c         | 2 --
 drivers/net/e1000/em_ethdev.c          | 1 -
 drivers/net/e1000/igb_ethdev.c         | 2 --
 drivers/net/enetc/enetc_ethdev.c       | 2 --
 drivers/net/enic/enic_ethdev.c         | 1 -
 drivers/net/enic/enic_vf_representor.c | 3 +--
 drivers/net/i40e/i40e_ethdev.c         | 1 -
 drivers/net/i40e/i40e_vf_representor.c | 3 +--
 drivers/net/iavf/iavf_ethdev.c         | 1 -
 drivers/net/ice/ice_dcf_ethdev.c       | 2 --
 drivers/net/liquidio/lio_ethdev.c      | 1 -
 drivers/net/mvneta/mvneta_ethdev.c     | 1 -
 drivers/net/octeontx/octeontx_ethdev.c | 1 -
 drivers/net/pfe/pfe_ethdev.c           | 2 --
 drivers/net/sfc/sfc_ethdev.c           | 1 -
 16 files changed, 2 insertions(+), 23 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index d35c75a2e2..28f8aaeb4d 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -648,7 +648,6 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
 	}
 
 	rte_eth_copy_pci_info(eth_dev, pci_dev);
-	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
 	sc->pcie_bus    = pci_dev->addr.bus;
 	sc->pcie_device = pci_dev->addr.devid;
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 824eb073ad..f8809fad00 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -2231,8 +2231,6 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv,
 	if (dpaa_drv->drv_flags & RTE_DPAA_DRV_INTR_LSC)
 		eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
 
-	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
-
 	/* Invoke PMD device initialization function */
 	diag = dpaa_dev_init(eth_dev);
 	if (diag == 0) {
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index b5244d06cf..8aa89c31c3 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -265,7 +265,6 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
 	}
 
 	rte_eth_copy_pci_info(eth_dev, pci_dev);
-	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
 	hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
 	hw->device_id = pci_dev->id.device_id;
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 681842f5ae..fd30d39e60 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -745,7 +745,6 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
 	}
 
 	rte_eth_copy_pci_info(eth_dev, pci_dev);
-	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
 	hw->hw_addr= (void *)pci_dev->mem_resource[0].addr;
 
@@ -940,7 +939,6 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
 
 	pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
 	rte_eth_copy_pci_info(eth_dev, pci_dev);
-	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
 	hw->device_id = pci_dev->id.device_id;
 	hw->vendor_id = pci_dev->id.vendor_id;
diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
index 4d2c9c0474..19769a78ff 100644
--- a/drivers/net/enetc/enetc_ethdev.c
+++ b/drivers/net/enetc/enetc_ethdev.c
@@ -885,8 +885,6 @@ enetc_dev_init(struct rte_eth_dev *eth_dev)
 	eth_dev->rx_pkt_burst = &enetc_recv_pkts;
 	eth_dev->tx_pkt_burst = &enetc_xmit_pkts;
 
-	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
-
 	/* Retrieving and storing the HW base address of device */
 	hw->hw.reg = (void *)pci_dev->mem_resource[0].addr;
 	hw->device_id = pci_dev->id.device_id;
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 9e59847f36..4ba76daf09 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -1266,7 +1266,6 @@ static int eth_enic_dev_init(struct rte_eth_dev *eth_dev,
 
 	pdev = RTE_ETH_DEV_TO_PCI(eth_dev);
 	rte_eth_copy_pci_info(eth_dev, pdev);
-	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 	enic->pdev = pdev;
 	addr = &pdev->addr;
 
diff --git a/drivers/net/enic/enic_vf_representor.c b/drivers/net/enic/enic_vf_representor.c
index c2c03c0281..984a754e35 100644
--- a/drivers/net/enic/enic_vf_representor.c
+++ b/drivers/net/enic/enic_vf_representor.c
@@ -672,8 +672,7 @@ int enic_vf_representor_init(struct rte_eth_dev *eth_dev, void *init_params)
 
 	eth_dev->device->driver = pf->rte_dev->device->driver;
 	eth_dev->dev_ops = &enic_vf_representor_dev_ops;
-	eth_dev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR |
-					RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+	eth_dev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR;
 	eth_dev->data->representor_id = vf->vf_id;
 	eth_dev->data->mac_addrs = rte_zmalloc("enic_mac_addr_vf",
 		sizeof(struct rte_ether_addr) *
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index f8c1035f8f..d2116910a0 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1507,7 +1507,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
 	intr_handle = &pci_dev->intr_handle;
 
 	rte_eth_copy_pci_info(dev, pci_dev);
-	dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
 	pf->adapter = I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	pf->dev_data = dev->data;
diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c
index 7ab4b19a42..5daa7ddcfd 100644
--- a/drivers/net/i40e/i40e_vf_representor.c
+++ b/drivers/net/i40e/i40e_vf_representor.c
@@ -511,8 +511,7 @@ i40e_vf_representor_init(struct rte_eth_dev *ethdev, void *init_params)
 		return -ENODEV;
 	}
 
-	ethdev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR |
-					RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+	ethdev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR;
 	ethdev->data->representor_id = representor->vf_id;
 
 	/* Setting the number queues allocated to the VF */
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 6bc3108631..7d676c0279 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1983,7 +1983,6 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
 		return 0;
 	}
 	rte_eth_copy_pci_info(eth_dev, pci_dev);
-	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
 	hw->vendor_id = pci_dev->id.vendor_id;
 	hw->device_id = pci_dev->id.device_id;
diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index b523df47e1..833ab7410c 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -912,8 +912,6 @@ ice_dcf_dev_init(struct rte_eth_dev *eth_dev)
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return 0;
 
-	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
-
 	adapter->real_hw.vc_event_msg_cb = ice_dcf_handle_pf_event_msg;
 	if (ice_dcf_init_hw(eth_dev, &adapter->real_hw) != 0) {
 		PMD_INIT_LOG(ERR, "Failed to init DCF hardware");
diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index eb0fdab45a..70b2c05c45 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -2094,7 +2094,6 @@ lio_eth_dev_init(struct rte_eth_dev *eth_dev)
 		return 0;
 
 	rte_eth_copy_pci_info(eth_dev, pdev);
-	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
 	if (pdev->mem_resource[0].addr) {
 		lio_dev->hw_addr = pdev->mem_resource[0].addr;
diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c
index 2cd73919ce..5a8c5aad29 100644
--- a/drivers/net/mvneta/mvneta_ethdev.c
+++ b/drivers/net/mvneta/mvneta_ethdev.c
@@ -840,7 +840,6 @@ mvneta_eth_dev_create(struct rte_vdev_device *vdev, const char *name)
 	eth_dev->rx_pkt_burst = mvneta_rx_pkt_burst;
 	mvneta_set_tx_function(eth_dev);
 	eth_dev->dev_ops = &mvneta_ops;
-	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
 	rte_eth_dev_probing_finish(eth_dev);
 	return 0;
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 5836dbe09e..be7a01f0eb 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -1374,7 +1374,6 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
 	data->promiscuous = 0;
 	data->all_multicast = 0;
 	data->scattered_rx = 0;
-	data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
 	/* Get maximum number of supported MAC entries */
 	max_entries = octeontx_bgx_port_mac_entries_get(nic->port_id);
diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index f5c271b3f0..6ef9ee0b6c 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -850,8 +850,6 @@ pfe_eth_init(struct rte_vdev_device *vdev, struct pfe *pfe, int id)
 	eth_dev->data->nb_rx_queues = 1;
 	eth_dev->data->nb_tx_queues = 1;
 
-	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
-
 	/* For link status, open the PFE CDEV; Error from this function
 	 * is silently ignored; In case of error, the link status will not
 	 * be available.
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index e6de2c30f7..7c2bf78da0 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -2212,7 +2212,6 @@ sfc_eth_dev_init(struct rte_eth_dev *dev)
 
 	/* Copy PCI device info to the dev->data */
 	rte_eth_copy_pci_info(dev, pci_dev);
-	dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 	dev->data->dev_flags |= RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE;
 
 	rc = sfc_kvargs_parse(sa);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.827675306 +0800
+++ 0155-drivers-net-remove-queue-xstats-auto-fill-flag.patch	2021-11-10 14:17:01.964078660 +0800
@@ -1 +1 @@
-From 64c952ec78d35ab3a1a229f9e9901d6092c6189c Mon Sep 17 00:00:00 2001
+From 664213de5ec6ba2c8434014008dcf867946f9f05 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 64c952ec78d35ab3a1a229f9e9901d6092c6189c ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -34 +36 @@
-index 463886f17a..8b0806016f 100644
+index d35c75a2e2..28f8aaeb4d 100644
@@ -46 +48 @@
-index c087ce6341..840257c607 100644
+index 824eb073ad..f8809fad00 100644
@@ -49 +51 @@
-@@ -2218,8 +2218,6 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv,
+@@ -2231,8 +2231,6 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv,
@@ -59 +61 @@
-index 9e157e4ffe..5a3af0da90 100644
+index b5244d06cf..8aa89c31c3 100644
@@ -62 +64 @@
-@@ -264,7 +264,6 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
+@@ -265,7 +265,6 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
@@ -71 +73 @@
-index 4152406610..194da6b5b3 100644
+index 681842f5ae..fd30d39e60 100644
@@ -74 +76 @@
-@@ -742,7 +742,6 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
+@@ -745,7 +745,6 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
@@ -82 +84 @@
-@@ -936,7 +935,6 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -940,7 +939,6 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
@@ -91 +93 @@
-index 246aff4672..784ed391b7 100644
+index 4d2c9c0474..19769a78ff 100644
@@ -94 +96 @@
-@@ -889,8 +889,6 @@ enetc_dev_init(struct rte_eth_dev *eth_dev)
+@@ -885,8 +885,6 @@ enetc_dev_init(struct rte_eth_dev *eth_dev)
@@ -104 +106 @@
-index b94332cc86..a1a53248f6 100644
+index 9e59847f36..4ba76daf09 100644
@@ -107 +109 @@
-@@ -1264,7 +1264,6 @@ static int eth_enic_dev_init(struct rte_eth_dev *eth_dev,
+@@ -1266,7 +1266,6 @@ static int eth_enic_dev_init(struct rte_eth_dev *eth_dev,
@@ -116 +118 @@
-index 1a4411844a..1ad6ad3dfb 100644
+index c2c03c0281..984a754e35 100644
@@ -119 +121 @@
-@@ -663,8 +663,7 @@ int enic_vf_representor_init(struct rte_eth_dev *eth_dev, void *init_params)
+@@ -672,8 +672,7 @@ int enic_vf_representor_init(struct rte_eth_dev *eth_dev, void *init_params)
@@ -127 +128,0 @@
- 	eth_dev->data->backer_port_id = pf->port_id;
@@ -128,0 +130 @@
+ 		sizeof(struct rte_ether_addr) *
@@ -130 +132 @@
-index 5037a55ca5..cd723f1b8f 100644
+index f8c1035f8f..d2116910a0 100644
@@ -133 +135 @@
-@@ -1443,7 +1443,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
+@@ -1507,7 +1507,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
@@ -142 +144 @@
-index d65b821a01..12d5a2e48a 100644
+index 7ab4b19a42..5daa7ddcfd 100644
@@ -153 +154,0 @@
- 	ethdev->data->backer_port_id = pf->dev_data->port_id;
@@ -154,0 +156 @@
+ 	/* Setting the number queues allocated to the VF */
@@ -156 +158 @@
-index 7e4d256122..18428049d8 100644
+index 6bc3108631..7d676c0279 100644
@@ -159 +161 @@
-@@ -2343,7 +2343,6 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1983,7 +1983,6 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
@@ -168 +170 @@
-index 91f6558742..f9be43741f 100644
+index b523df47e1..833ab7410c 100644
@@ -171 +173 @@
-@@ -1092,8 +1092,6 @@ ice_dcf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -912,8 +912,6 @@ ice_dcf_dev_init(struct rte_eth_dev *eth_dev)
@@ -181 +183 @@
-index dbdab188e9..41b3f63ac0 100644
+index eb0fdab45a..70b2c05c45 100644
@@ -184 +186 @@
-@@ -2098,7 +2098,6 @@ lio_eth_dev_init(struct rte_eth_dev *eth_dev)
+@@ -2094,7 +2094,6 @@ lio_eth_dev_init(struct rte_eth_dev *eth_dev)
@@ -193 +195 @@
-index f51bc2258f..90f2466369 100644
+index 2cd73919ce..5a8c5aad29 100644
@@ -205 +207 @@
-index 7c91494f0e..096b5f6ae3 100644
+index 5836dbe09e..be7a01f0eb 100644
@@ -208 +210 @@
-@@ -1372,7 +1372,6 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
+@@ -1374,7 +1374,6 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
@@ -217 +219 @@
-index 4c7f568bf4..d6a6944907 100644
+index f5c271b3f0..6ef9ee0b6c 100644
@@ -220 +222 @@
-@@ -836,8 +836,6 @@ pfe_eth_init(struct rte_vdev_device *vdev, struct pfe *pfe, int id)
+@@ -850,8 +850,6 @@ pfe_eth_init(struct rte_vdev_device *vdev, struct pfe *pfe, int id)
@@ -230 +232 @@
-index 919569445f..8ec56a9ed5 100644
+index e6de2c30f7..7c2bf78da0 100644
@@ -233 +235 @@
-@@ -2793,7 +2793,6 @@ sfc_eth_dev_init(struct rte_eth_dev *dev, void *init_params)
+@@ -2212,7 +2212,6 @@ sfc_eth_dev_init(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/ice: fix deadlock on flow redirect' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (154 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'drivers/net: remove queue xstats auto-fill flag' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'doc: fix emulated device names in e1000 guide' " Xueming Li
                   ` (96 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

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

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b68aeb48104a830f2d0d9e3bd14e16f56b3d2de1 Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Mon, 11 Oct 2021 15:38:49 +0800
Subject: [PATCH] net/ice: fix deadlock on flow redirect
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit cc2f82b96a64789cc72beeb775a3a3543b5f2064 ]

If flow redirect failed, the spinlock will not be unlocked.
This patch fixes it.

Fixes: bc9201388d56 ("net/ice: support flow redirect")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_generic_flow.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index 15667c7252..ca401c7703 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -2380,7 +2380,7 @@ ice_flow_redirect(struct ice_adapter *ad,
 	struct ice_pf *pf = &ad->pf;
 	struct rte_flow *p_flow;
 	void *temp;
-	int ret;
+	int ret = 0;
 
 	rte_spinlock_lock(&pf->flow_ops_lock);
 
@@ -2390,11 +2390,11 @@ ice_flow_redirect(struct ice_adapter *ad,
 		ret = p_flow->engine->redirect(ad, p_flow, rd);
 		if (ret) {
 			PMD_DRV_LOG(ERR, "Failed to redirect flows");
-			return ret;
+			break;
 		}
 	}
 
 	rte_spinlock_unlock(&pf->flow_ops_lock);
 
-	return 0;
+	return ret;
 }
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.889477538 +0800
+++ 0156-net-ice-fix-deadlock-on-flow-redirect.patch	2021-11-10 14:17:01.964078660 +0800
@@ -1 +1 @@
-From cc2f82b96a64789cc72beeb775a3a3543b5f2064 Mon Sep 17 00:00:00 2001
+From b68aeb48104a830f2d0d9e3bd14e16f56b3d2de1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cc2f82b96a64789cc72beeb775a3a3543b5f2064 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 3e6ed7005b..02f854666a 100644
+index 15667c7252..ca401c7703 100644
@@ -22 +24 @@
-@@ -2542,7 +2542,7 @@ ice_flow_redirect(struct ice_adapter *ad,
+@@ -2380,7 +2380,7 @@ ice_flow_redirect(struct ice_adapter *ad,
@@ -31 +33 @@
-@@ -2552,11 +2552,11 @@ ice_flow_redirect(struct ice_adapter *ad,
+@@ -2390,11 +2390,11 @@ ice_flow_redirect(struct ice_adapter *ad,

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

* [dpdk-stable] patch 'doc: fix emulated device names in e1000 guide' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (155 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/ice: fix deadlock on flow redirect' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net: fix aliasing in checksum computation' " Xueming Li
                   ` (95 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: William Tu; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

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

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

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

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2cc21f2431f4f68f81023e8f349c00f19f5003cd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2cc21f2431f4f68f81023e8f349c00f19f5003cd Mon Sep 17 00:00:00 2001
From: William Tu <u9012063@gmail.com>
Date: Mon, 11 Oct 2021 11:55:40 -0700
Subject: [PATCH] doc: fix emulated device names in e1000 guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d2e5ab2b42444cd7149823fbba29a1227fc2b5cb ]

The device name should be 82574L Gigabit Ethernet Controller.
The patch also remove a redundant "*".

Fixes: fc1f2750a3ec ("doc: programmers guide")

Signed-off-by: William Tu <u9012063@gmail.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 doc/guides/nics/e1000em.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/e1000em.rst b/doc/guides/nics/e1000em.rst
index b6a2534e36..63c0b1b337 100644
--- a/doc/guides/nics/e1000em.rst
+++ b/doc/guides/nics/e1000em.rst
@@ -8,9 +8,9 @@ The DPDK EM poll mode driver supports the following emulated devices:
 
 *   qemu-kvm emulated Intel® 82540EM Gigabit Ethernet Controller (qemu e1000 device)
 
-*   VMware* emulated Intel® 82545EM Gigabit Ethernet Controller
+*   VMware emulated Intel® 82545EM Gigabit Ethernet Controller
 
-*   VMware emulated Intel® 8274L Gigabit Ethernet Controller.
+*   VMware emulated Intel® 82574L Gigabit Ethernet Controller.
 
 Validated Hypervisors
 ---------------------
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.930068461 +0800
+++ 0157-doc-fix-emulated-device-names-in-e1000-guide.patch	2021-11-10 14:17:01.964078660 +0800
@@ -1 +1 @@
-From d2e5ab2b42444cd7149823fbba29a1227fc2b5cb Mon Sep 17 00:00:00 2001
+From 2cc21f2431f4f68f81023e8f349c00f19f5003cd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d2e5ab2b42444cd7149823fbba29a1227fc2b5cb ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 041c9a09a3..5e752a29e5 100644
+index b6a2534e36..63c0b1b337 100644

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net: fix aliasing in checksum computation' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (156 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'doc: fix emulated device names in e1000 guide' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/ena: fix offload capabilities verification' " Xueming Li
                   ` (94 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Georg Sauthoff
  Cc: Luca Boccassi, Morten Brørup, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/71d4385922a00ee9711471cbd54cf62eff45a664

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 71d4385922a00ee9711471cbd54cf62eff45a664 Mon Sep 17 00:00:00 2001
From: Georg Sauthoff <mail@gms.tf>
Date: Sun, 17 Oct 2021 22:37:18 +0200
Subject: [PATCH] net: fix aliasing in checksum computation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 24f1955d1ecd13a3c261a328c72932115732825e ]

That means a superfluous cast is removed and aliasing through a uint8_t
pointer is eliminated. NB: The C standard specifies that a unsigned char
pointer may alias while the C standard doesn't include such requirement
for uint8_t pointers.

Also simplified the loop since a modern C compiler can speed up (i.e.
auto-vectorize) it in a similar way. For example, GCC auto-vectorizes it
for Haswell using AVX registers while halving the number of instructions
in the generated code.

Fixes: 6006818cfb26 ("net: new checksum functions")
Fixes: e079655c41fb ("net: fix build with gcc 4.4.7 and strict aliasing")

Signed-off-by: Georg Sauthoff <mail@gms.tf>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_net/rte_ip.h | 27 ++++++++-------------------
 1 file changed, 8 insertions(+), 19 deletions(-)

diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
index b188616ab8..52ef3c8cc1 100644
--- a/lib/librte_net/rte_ip.h
+++ b/lib/librte_net/rte_ip.h
@@ -134,29 +134,18 @@ rte_ipv4_hdr_len(const struct rte_ipv4_hdr *ipv4_hdr)
 static inline uint32_t
 __rte_raw_cksum(const void *buf, size_t len, uint32_t sum)
 {
-	/* workaround gcc strict-aliasing warning */
-	uintptr_t ptr = (uintptr_t)buf;
+	/* extend strict-aliasing rules */
 	typedef uint16_t __attribute__((__may_alias__)) u16_p;
-	const u16_p *u16_buf = (const u16_p *)ptr;
-
-	while (len >= (sizeof(*u16_buf) * 4)) {
-		sum += u16_buf[0];
-		sum += u16_buf[1];
-		sum += u16_buf[2];
-		sum += u16_buf[3];
-		len -= sizeof(*u16_buf) * 4;
-		u16_buf += 4;
-	}
-	while (len >= sizeof(*u16_buf)) {
+	const u16_p *u16_buf = (const u16_p *)buf;
+	const u16_p *end = u16_buf + len / sizeof(*u16_buf);
+
+	for (; u16_buf != end; ++u16_buf)
 		sum += *u16_buf;
-		len -= sizeof(*u16_buf);
-		u16_buf += 1;
-	}
 
-	/* if length is in odd bytes */
-	if (len == 1) {
+	/* if length is odd, keeping it byte order independent */
+	if (unlikely(len % 2)) {
 		uint16_t left = 0;
-		*(uint8_t *)&left = *(const uint8_t *)u16_buf;
+		*(unsigned char *)&left = *(const unsigned char *)end;
 		sum += left;
 	}
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.969388054 +0800
+++ 0158-net-fix-aliasing-in-checksum-computation.patch	2021-11-10 14:17:01.964078660 +0800
@@ -1 +1 @@
-From 24f1955d1ecd13a3c261a328c72932115732825e Mon Sep 17 00:00:00 2001
+From 71d4385922a00ee9711471cbd54cf62eff45a664 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 24f1955d1ecd13a3c261a328c72932115732825e ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
- lib/net/rte_ip.h | 27 ++++++++-------------------
+ lib/librte_net/rte_ip.h | 27 ++++++++-------------------
@@ -30,5 +32,5 @@
-diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h
-index 0ef2430607..41d90ca1b9 100644
---- a/lib/net/rte_ip.h
-+++ b/lib/net/rte_ip.h
-@@ -154,29 +154,18 @@ rte_ipv4_hdr_len(const struct rte_ipv4_hdr *ipv4_hdr)
+diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
+index b188616ab8..52ef3c8cc1 100644
+--- a/lib/librte_net/rte_ip.h
++++ b/lib/librte_net/rte_ip.h
+@@ -134,29 +134,18 @@ rte_ipv4_hdr_len(const struct rte_ipv4_hdr *ipv4_hdr)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/ena: fix offload capabilities verification' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (157 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net: fix aliasing in checksum computation' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/ena: fix per-queue offload capabilities' " Xueming Li
                   ` (93 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: Luca Boccassi, Igor Chauskin, Shai Brandes, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ac43dc8cc4a9bc09da0f07b44627528936cf47a6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ac43dc8cc4a9bc09da0f07b44627528936cf47a6 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Tue, 19 Oct 2021 12:56:23 +0200
Subject: [PATCH] net/ena: fix offload capabilities verification
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e8c838fde93f48c2a7504570aae38c06e3189fa1 ]

ENA PMD has multiple checksum offload flags, which are more discrete
than the DPDK offload capabilities flags.
As the driver wasn't storing it's internal checksum offload capabilities
and was relying only on the DPDK capabilities, not all scenarios could
be properly covered (like when to prepare pseudo header checksum and
when not).

Moreover, the user could request offload capability, which isn't
supported by the HW and the PMD would quietly ignore the issue.

This commit reworks eth_ena_prep_pkts() function to perform additional
checks and to properly reflect the HW requirements. With the
RTE_LIBRTE_ETHDEV_DEBUG enabled, the function will do even more
verifications, to help the user find any issues with the mbuf
configuration.

Fixes: b3fc5a1ae10d ("net/ena: add Tx preparation")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shai Brandes <shaibran@amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 233 +++++++++++++++++++++++++++--------
 drivers/net/ena/ena_ethdev.h |   5 +-
 2 files changed, 185 insertions(+), 53 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 3f2c979f52..16ba729989 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -155,6 +155,23 @@ static const struct ena_stats ena_stats_rx_strings[] = {
 #define	ENA_TX_OFFLOAD_NOTSUP_MASK	\
 	(PKT_TX_OFFLOAD_MASK ^ ENA_TX_OFFLOAD_MASK)
 
+/** HW specific offloads capabilities. */
+/* IPv4 checksum offload. */
+#define ENA_L3_IPV4_CSUM		0x0001
+/* TCP/UDP checksum offload for IPv4 packets. */
+#define ENA_L4_IPV4_CSUM		0x0002
+/* TCP/UDP checksum offload for IPv4 packets with pseudo header checksum. */
+#define ENA_L4_IPV4_CSUM_PARTIAL	0x0004
+/* TCP/UDP checksum offload for IPv6 packets. */
+#define ENA_L4_IPV6_CSUM		0x0008
+/* TCP/UDP checksum offload for IPv6 packets with pseudo header checksum. */
+#define ENA_L4_IPV6_CSUM_PARTIAL	0x0010
+/* TSO support for IPv4 packets. */
+#define ENA_IPV4_TSO			0x0020
+
+/* Device supports setting RSS hash. */
+#define ENA_RX_RSS_HASH			0x0040
+
 static const struct rte_pci_id pci_id_ena_map[] = {
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_AMAZON, PCI_DEVICE_ID_ENA_VF) },
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_AMAZON, PCI_DEVICE_ID_ENA_VF_RSERV0) },
@@ -1746,6 +1763,50 @@ static uint32_t ena_calc_max_io_queue_num(struct ena_com_dev *ena_dev,
 	return max_num_io_queues;
 }
 
+static void
+ena_set_offloads(struct ena_offloads *offloads,
+		 struct ena_admin_feature_offload_desc *offload_desc)
+{
+	if (offload_desc->tx & ENA_ADMIN_FEATURE_OFFLOAD_DESC_TSO_IPV4_MASK)
+		offloads->tx_offloads |= ENA_IPV4_TSO;
+
+	/* Tx IPv4 checksum offloads */
+	if (offload_desc->tx &
+	    ENA_ADMIN_FEATURE_OFFLOAD_DESC_TX_L3_CSUM_IPV4_MASK)
+		offloads->tx_offloads |= ENA_L3_IPV4_CSUM;
+	if (offload_desc->tx &
+	    ENA_ADMIN_FEATURE_OFFLOAD_DESC_TX_L4_IPV4_CSUM_FULL_MASK)
+		offloads->tx_offloads |= ENA_L4_IPV4_CSUM;
+	if (offload_desc->tx &
+	    ENA_ADMIN_FEATURE_OFFLOAD_DESC_TX_L4_IPV4_CSUM_PART_MASK)
+		offloads->tx_offloads |= ENA_L4_IPV4_CSUM_PARTIAL;
+
+	/* Tx IPv6 checksum offloads */
+	if (offload_desc->tx &
+	    ENA_ADMIN_FEATURE_OFFLOAD_DESC_TX_L4_IPV6_CSUM_FULL_MASK)
+		offloads->tx_offloads |= ENA_L4_IPV6_CSUM;
+	if (offload_desc->tx &
+	     ENA_ADMIN_FEATURE_OFFLOAD_DESC_TX_L4_IPV6_CSUM_PART_MASK)
+		offloads->tx_offloads |= ENA_L4_IPV6_CSUM_PARTIAL;
+
+	/* Rx IPv4 checksum offloads */
+	if (offload_desc->rx_supported &
+	    ENA_ADMIN_FEATURE_OFFLOAD_DESC_RX_L3_CSUM_IPV4_MASK)
+		offloads->rx_offloads |= ENA_L3_IPV4_CSUM;
+	if (offload_desc->rx_supported &
+	    ENA_ADMIN_FEATURE_OFFLOAD_DESC_RX_L4_IPV4_CSUM_MASK)
+		offloads->rx_offloads |= ENA_L4_IPV4_CSUM;
+
+	/* Rx IPv6 checksum offloads */
+	if (offload_desc->rx_supported &
+	    ENA_ADMIN_FEATURE_OFFLOAD_DESC_RX_L4_IPV6_CSUM_MASK)
+		offloads->rx_offloads |= ENA_L4_IPV6_CSUM;
+
+	if (offload_desc->rx_supported &
+	    ENA_ADMIN_FEATURE_OFFLOAD_DESC_RX_HASH_MASK)
+		offloads->rx_offloads |= ENA_RX_RSS_HASH;
+}
+
 static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
 {
 	struct ena_calc_queue_size_ctx calc_queue_ctx = { 0 };
@@ -1868,14 +1929,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
 	/* Set max MTU for this device */
 	adapter->max_mtu = get_feat_ctx.dev_attr.max_mtu;
 
-	/* set device support for offloads */
-	adapter->offloads.tso4_supported = (get_feat_ctx.offload.tx &
-		ENA_ADMIN_FEATURE_OFFLOAD_DESC_TSO_IPV4_MASK) != 0;
-	adapter->offloads.tx_csum_supported = (get_feat_ctx.offload.tx &
-		ENA_ADMIN_FEATURE_OFFLOAD_DESC_TX_L4_IPV4_CSUM_PART_MASK) != 0;
-	adapter->offloads.rx_csum_supported =
-		(get_feat_ctx.offload.rx_supported &
-		ENA_ADMIN_FEATURE_OFFLOAD_DESC_RX_L4_IPV4_CSUM_MASK) != 0;
+	ena_set_offloads(&adapter->offloads, &get_feat_ctx.offload);
 
 	/* Copy MAC address and point DPDK to it */
 	eth_dev->data->mac_addrs = (struct rte_ether_addr *)adapter->mac_addr;
@@ -2024,25 +2078,29 @@ static int ena_infos_get(struct rte_eth_dev *dev,
 			ETH_LINK_SPEED_100G;
 
 	/* Set Tx & Rx features available for device */
-	if (adapter->offloads.tso4_supported)
+	if (adapter->offloads.tx_offloads & ENA_IPV4_TSO)
 		tx_feat	|= DEV_TX_OFFLOAD_TCP_TSO;
 
-	if (adapter->offloads.tx_csum_supported)
-		tx_feat |= DEV_TX_OFFLOAD_IPV4_CKSUM |
-			DEV_TX_OFFLOAD_UDP_CKSUM |
-			DEV_TX_OFFLOAD_TCP_CKSUM;
+	if (adapter->offloads.tx_offloads & ENA_L3_IPV4_CSUM)
+		tx_feat |= DEV_TX_OFFLOAD_IPV4_CKSUM;
+	if (adapter->offloads.tx_offloads &
+	    (ENA_L4_IPV4_CSUM_PARTIAL | ENA_L4_IPV4_CSUM |
+	     ENA_L4_IPV6_CSUM | ENA_L4_IPV6_CSUM_PARTIAL))
+		tx_feat |= DEV_TX_OFFLOAD_UDP_CKSUM | DEV_TX_OFFLOAD_TCP_CKSUM;
 
-	if (adapter->offloads.rx_csum_supported)
-		rx_feat |= DEV_RX_OFFLOAD_IPV4_CKSUM |
-			DEV_RX_OFFLOAD_UDP_CKSUM  |
-			DEV_RX_OFFLOAD_TCP_CKSUM;
+	if (adapter->offloads.rx_offloads & ENA_L3_IPV4_CSUM)
+		rx_feat |= DEV_RX_OFFLOAD_IPV4_CKSUM;
+	if (adapter->offloads.rx_offloads &
+	    (ENA_L4_IPV4_CSUM | ENA_L4_IPV6_CSUM))
+		rx_feat |= DEV_RX_OFFLOAD_UDP_CKSUM | DEV_RX_OFFLOAD_TCP_CKSUM;
 
 	rx_feat |= DEV_RX_OFFLOAD_JUMBO_FRAME;
 	tx_feat |= DEV_TX_OFFLOAD_MULTI_SEGS;
 
 	/* Inform framework about available features */
 	dev_info->rx_offload_capa = rx_feat;
-	dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_RSS_HASH;
+	if (adapter->offloads.rx_offloads & ENA_RX_RSS_HASH)
+		dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_RSS_HASH;
 	dev_info->rx_queue_offload_capa = rx_feat;
 	dev_info->tx_offload_capa = tx_feat;
 	dev_info->tx_queue_offload_capa = tx_feat;
@@ -2284,45 +2342,60 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 	uint32_t i;
 	struct rte_mbuf *m;
 	struct ena_ring *tx_ring = (struct ena_ring *)(tx_queue);
+	struct ena_adapter *adapter = tx_ring->adapter;
 	struct rte_ipv4_hdr *ip_hdr;
 	uint64_t ol_flags;
+	uint64_t l4_csum_flag;
+	uint64_t dev_offload_capa;
 	uint16_t frag_field;
+	bool need_pseudo_csum;
 
+	dev_offload_capa = adapter->offloads.tx_offloads;
 	for (i = 0; i != nb_pkts; i++) {
 		m = tx_pkts[i];
 		ol_flags = m->ol_flags;
 
-		if (!(ol_flags & PKT_TX_IPV4))
+		/* Check if any offload flag was set */
+		if (ol_flags == 0)
 			continue;
 
-		/* If there was not L2 header length specified, assume it is
-		 * length of the ethernet header.
-		 */
-		if (unlikely(m->l2_len == 0))
-			m->l2_len = sizeof(struct rte_ether_hdr);
-
-		ip_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv4_hdr *,
-						 m->l2_len);
-		frag_field = rte_be_to_cpu_16(ip_hdr->fragment_offset);
-
-		if ((frag_field & RTE_IPV4_HDR_DF_FLAG) != 0) {
-			m->packet_type |= RTE_PTYPE_L4_NONFRAG;
-
-			/* If IPv4 header has DF flag enabled and TSO support is
-			 * disabled, partial chcecksum should not be calculated.
-			 */
-			if (!tx_ring->adapter->offloads.tso4_supported)
-				continue;
-		}
-
-		if ((ol_flags & ENA_TX_OFFLOAD_NOTSUP_MASK) != 0 ||
-				(ol_flags & PKT_TX_L4_MASK) ==
-				PKT_TX_SCTP_CKSUM) {
+		l4_csum_flag = ol_flags & PKT_TX_L4_MASK;
+		/* SCTP checksum offload is not supported by the ENA. */
+		if ((ol_flags & ENA_TX_OFFLOAD_NOTSUP_MASK) ||
+		    l4_csum_flag == PKT_TX_SCTP_CKSUM) {
+			PMD_TX_LOG(DEBUG,
+				"mbuf[%" PRIu32 "] has unsupported offloads flags set: 0x%" PRIu64 "\n",
+				i, ol_flags);
 			rte_errno = ENOTSUP;
 			return i;
 		}
 
 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
+		/* Check if requested offload is also enabled for the queue */
+		if ((ol_flags & PKT_TX_IP_CKSUM &&
+		     !(tx_ring->offloads & DEV_TX_OFFLOAD_IPV4_CKSUM)) ||
+		    (l4_csum_flag == PKT_TX_TCP_CKSUM &&
+		     !(tx_ring->offloads & DEV_TX_OFFLOAD_TCP_CKSUM)) ||
+		    (l4_csum_flag == PKT_TX_UDP_CKSUM &&
+		     !(tx_ring->offloads & DEV_TX_OFFLOAD_UDP_CKSUM))) {
+			PMD_TX_LOG(DEBUG,
+				"mbuf[%" PRIu32 "]: requested offloads: %" PRIu16 " are not enabled for the queue[%u]\n",
+				i, m->nb_segs, tx_ring->id);
+			rte_errno = EINVAL;
+			return i;
+		}
+
+		/* The caller is obligated to set l2 and l3 len if any cksum
+		 * offload is enabled.
+		 */
+		if (unlikely(ol_flags & (PKT_TX_IP_CKSUM | PKT_TX_L4_MASK) &&
+		    (m->l2_len == 0 || m->l3_len == 0))) {
+			PMD_TX_LOG(DEBUG,
+				"mbuf[%" PRIu32 "]: l2_len or l3_len values are 0 while the offload was requested\n",
+				i);
+			rte_errno = EINVAL;
+			return i;
+		}
 		ret = rte_validate_tx_offload(m);
 		if (ret != 0) {
 			rte_errno = -ret;
@@ -2330,16 +2403,76 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 		}
 #endif
 
-		/* In case we are supposed to TSO and have DF not set (DF=0)
-		 * hardware must be provided with partial checksum, otherwise
-		 * it will take care of necessary calculations.
+		/* Verify HW support for requested offloads and determine if
+		 * pseudo header checksum is needed.
 		 */
+		need_pseudo_csum = false;
+		if (ol_flags & PKT_TX_IPV4) {
+			if (ol_flags & PKT_TX_IP_CKSUM &&
+			    !(dev_offload_capa & ENA_L3_IPV4_CSUM)) {
+				rte_errno = ENOTSUP;
+				return i;
+			}
 
-		ret = rte_net_intel_cksum_flags_prepare(m,
-			ol_flags & ~PKT_TX_TCP_SEG);
-		if (ret != 0) {
-			rte_errno = -ret;
-			return i;
+			if (ol_flags & PKT_TX_TCP_SEG &&
+			    !(dev_offload_capa & ENA_IPV4_TSO)) {
+				rte_errno = ENOTSUP;
+				return i;
+			}
+
+			/* Check HW capabilities and if pseudo csum is needed
+			 * for L4 offloads.
+			 */
+			if (l4_csum_flag != PKT_TX_L4_NO_CKSUM &&
+			    !(dev_offload_capa & ENA_L4_IPV4_CSUM)) {
+				if (dev_offload_capa &
+				    ENA_L4_IPV4_CSUM_PARTIAL) {
+					need_pseudo_csum = true;
+				} else {
+					rte_errno = ENOTSUP;
+					return i;
+				}
+			}
+
+			/* Parse the DF flag */
+			ip_hdr = rte_pktmbuf_mtod_offset(m,
+				struct rte_ipv4_hdr *, m->l2_len);
+			frag_field = rte_be_to_cpu_16(ip_hdr->fragment_offset);
+			if (frag_field & RTE_IPV4_HDR_DF_FLAG) {
+				m->packet_type |= RTE_PTYPE_L4_NONFRAG;
+			} else if (ol_flags & PKT_TX_TCP_SEG) {
+				/* In case we are supposed to TSO and have DF
+				 * not set (DF=0) hardware must be provided with
+				 * partial checksum.
+				 */
+				need_pseudo_csum = true;
+			}
+		} else if (ol_flags & PKT_TX_IPV6) {
+			/* There is no support for IPv6 TSO as for now. */
+			if (ol_flags & PKT_TX_TCP_SEG) {
+				rte_errno = ENOTSUP;
+				return i;
+			}
+
+			/* Check HW capabilities and if pseudo csum is needed */
+			if (l4_csum_flag != PKT_TX_L4_NO_CKSUM &&
+			    !(dev_offload_capa & ENA_L4_IPV6_CSUM)) {
+				if (dev_offload_capa &
+				    ENA_L4_IPV6_CSUM_PARTIAL) {
+					need_pseudo_csum = true;
+				} else {
+					rte_errno = ENOTSUP;
+					return i;
+				}
+			}
+		}
+
+		if (need_pseudo_csum) {
+			ret = rte_net_intel_cksum_flags_prepare(m, ol_flags);
+			if (ret != 0) {
+				rte_errno = -ret;
+				return i;
+			}
 		}
 	}
 
diff --git a/drivers/net/ena/ena_ethdev.h b/drivers/net/ena/ena_ethdev.h
index ae235897ee..1118cc5a06 100644
--- a/drivers/net/ena/ena_ethdev.h
+++ b/drivers/net/ena/ena_ethdev.h
@@ -202,9 +202,8 @@ struct ena_stats_eni {
 };
 
 struct ena_offloads {
-	bool tso4_supported;
-	bool tx_csum_supported;
-	bool rx_csum_supported;
+	uint32_t tx_offloads;
+	uint32_t rx_offloads;
 };
 
 /* board specific private data structure */
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.008695449 +0800
+++ 0159-net-ena-fix-offload-capabilities-verification.patch	2021-11-10 14:17:01.967411966 +0800
@@ -1 +1 @@
-From e8c838fde93f48c2a7504570aae38c06e3189fa1 Mon Sep 17 00:00:00 2001
+From ac43dc8cc4a9bc09da0f07b44627528936cf47a6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e8c838fde93f48c2a7504570aae38c06e3189fa1 ]
@@ -23 +25,0 @@
-Cc: stable@dpdk.org
@@ -29,3 +31,3 @@
- drivers/net/ena/ena_ethdev.c | 235 +++++++++++++++++++++++++++--------
- drivers/net/ena/ena_ethdev.h |   6 +-
- 2 files changed, 184 insertions(+), 57 deletions(-)
+ drivers/net/ena/ena_ethdev.c | 233 +++++++++++++++++++++++++++--------
+ drivers/net/ena/ena_ethdev.h |   5 +-
+ 2 files changed, 185 insertions(+), 53 deletions(-)
@@ -34 +36 @@
-index 3fde099ab4..197cb7ecd4 100644
+index 3f2c979f52..16ba729989 100644
@@ -37 +39 @@
-@@ -140,6 +140,23 @@ static const struct ena_stats ena_stats_rx_strings[] = {
+@@ -155,6 +155,23 @@ static const struct ena_stats ena_stats_rx_strings[] = {
@@ -61 +63 @@
-@@ -1612,6 +1629,50 @@ static uint32_t ena_calc_max_io_queue_num(struct ena_com_dev *ena_dev,
+@@ -1746,6 +1763,50 @@ static uint32_t ena_calc_max_io_queue_num(struct ena_com_dev *ena_dev,
@@ -112 +114 @@
-@@ -1733,17 +1794,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1868,14 +1929,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
@@ -124,3 +125,0 @@
--	adapter->offloads.rss_hash_supported =
--		(get_feat_ctx.offload.rx_supported &
--		ENA_ADMIN_FEATURE_OFFLOAD_DESC_RX_HASH_MASK) != 0;
@@ -131 +130 @@
-@@ -1903,24 +1954,27 @@ static int ena_infos_get(struct rte_eth_dev *dev,
+@@ -2024,25 +2078,29 @@ static int ena_infos_get(struct rte_eth_dev *dev,
@@ -159,0 +159 @@
+ 	rx_feat |= DEV_RX_OFFLOAD_JUMBO_FRAME;
@@ -164 +164 @@
--	if (adapter->offloads.rss_hash_supported)
+-	dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_RSS_HASH;
@@ -166 +166 @@
- 		dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_RSS_HASH;
++		dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_RSS_HASH;
@@ -169 +169,2 @@
-@@ -2173,45 +2227,60 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+ 	dev_info->tx_queue_offload_capa = tx_feat;
+@@ -2284,45 +2342,60 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -254 +255 @@
-@@ -2219,16 +2288,76 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -2330,16 +2403,76 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -340 +341 @@
-index 06ac8b06b5..26d425a893 100644
+index ae235897ee..1118cc5a06 100644
@@ -343 +344 @@
-@@ -223,10 +223,8 @@ struct ena_stats_eni {
+@@ -202,9 +202,8 @@ struct ena_stats_eni {
@@ -350 +350,0 @@
--	bool rss_hash_supported;

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/ena: fix per-queue offload capabilities' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (158 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/ena: fix offload capabilities verification' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/ena: advertise scattered Rx capability' " Xueming Li
                   ` (92 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: Luca Boccassi, Igor Chauskin, Shai Brandes, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8200e4d11e02341bfde65debcd4703038b3d1402

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8200e4d11e02341bfde65debcd4703038b3d1402 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Tue, 19 Oct 2021 12:56:25 +0200
Subject: [PATCH] net/ena: fix per-queue offload capabilities
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3a822d79c5da8ed65fd08a8188b9b7d4c35fe199 ]

As ENA currently doesn't support offloads which could be configured
per-queue, only per-port flags should be set.

In addition, to make the code cleaner, parsing appropriate offload
flags is encapsulated into helper functions, in a similar matter it's
done by the other PMDs.

[1] https://doc.dpdk.org/guides/prog_guide/
    poll_mode_drv.html?highlight=offloads#hardware-offload

Fixes: 7369f88f88c0 ("net/ena: convert to new Rx offloads API")
Fixes: 56b8b9b7e5d2 ("net/ena: convert to new Tx offloads API")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shai Brandes <shaibran@amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 90 ++++++++++++++++++++++++------------
 1 file changed, 60 insertions(+), 30 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 16ba729989..f4e26927a4 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -237,6 +237,10 @@ static int ena_queue_start(struct ena_ring *ring);
 static int ena_queue_start_all(struct rte_eth_dev *dev,
 			       enum ena_ring_type ring_type);
 static void ena_stats_restart(struct rte_eth_dev *dev);
+static uint64_t ena_get_rx_port_offloads(struct ena_adapter *adapter);
+static uint64_t ena_get_tx_port_offloads(struct ena_adapter *adapter);
+static uint64_t ena_get_rx_queue_offloads(struct ena_adapter *adapter);
+static uint64_t ena_get_tx_queue_offloads(struct ena_adapter *adapter);
 static int ena_infos_get(struct rte_eth_dev *dev,
 			 struct rte_eth_dev_info *dev_info);
 static int ena_rss_reta_update(struct rte_eth_dev *dev,
@@ -2053,12 +2057,63 @@ static void ena_init_rings(struct ena_adapter *adapter,
 	}
 }
 
+static uint64_t ena_get_rx_port_offloads(struct ena_adapter *adapter)
+{
+	uint64_t port_offloads = 0;
+
+	if (adapter->offloads.rx_offloads & ENA_L3_IPV4_CSUM)
+		port_offloads |= DEV_RX_OFFLOAD_IPV4_CKSUM;
+
+	if (adapter->offloads.rx_offloads &
+	    (ENA_L4_IPV4_CSUM | ENA_L4_IPV6_CSUM))
+		port_offloads |=
+			DEV_RX_OFFLOAD_UDP_CKSUM | DEV_RX_OFFLOAD_TCP_CKSUM;
+
+	if (adapter->offloads.rx_offloads & ENA_RX_RSS_HASH)
+		port_offloads |= DEV_RX_OFFLOAD_RSS_HASH;
+
+	return port_offloads;
+}
+
+static uint64_t ena_get_tx_port_offloads(struct ena_adapter *adapter)
+{
+	uint64_t port_offloads = 0;
+
+	if (adapter->offloads.tx_offloads & ENA_IPV4_TSO)
+		port_offloads |= DEV_TX_OFFLOAD_TCP_TSO;
+
+	if (adapter->offloads.tx_offloads & ENA_L3_IPV4_CSUM)
+		port_offloads |= DEV_TX_OFFLOAD_IPV4_CKSUM;
+	if (adapter->offloads.tx_offloads &
+	    (ENA_L4_IPV4_CSUM_PARTIAL | ENA_L4_IPV4_CSUM |
+	     ENA_L4_IPV6_CSUM | ENA_L4_IPV6_CSUM_PARTIAL))
+		port_offloads |=
+			DEV_TX_OFFLOAD_UDP_CKSUM | DEV_TX_OFFLOAD_TCP_CKSUM;
+
+	port_offloads |= DEV_TX_OFFLOAD_MULTI_SEGS;
+
+	return port_offloads;
+}
+
+static uint64_t ena_get_rx_queue_offloads(struct ena_adapter *adapter)
+{
+	RTE_SET_USED(adapter);
+
+	return 0;
+}
+
+static uint64_t ena_get_tx_queue_offloads(struct ena_adapter *adapter)
+{
+	RTE_SET_USED(adapter);
+
+	return 0;
+}
+
 static int ena_infos_get(struct rte_eth_dev *dev,
 			  struct rte_eth_dev_info *dev_info)
 {
 	struct ena_adapter *adapter;
 	struct ena_com_dev *ena_dev;
-	uint64_t rx_feat = 0, tx_feat = 0;
 
 	ena_assert_msg(dev->data != NULL, "Uninitialized device\n");
 	ena_assert_msg(dev->data->dev_private != NULL, "Uninitialized device\n");
@@ -2077,33 +2132,11 @@ static int ena_infos_get(struct rte_eth_dev *dev,
 			ETH_LINK_SPEED_50G  |
 			ETH_LINK_SPEED_100G;
 
-	/* Set Tx & Rx features available for device */
-	if (adapter->offloads.tx_offloads & ENA_IPV4_TSO)
-		tx_feat	|= DEV_TX_OFFLOAD_TCP_TSO;
-
-	if (adapter->offloads.tx_offloads & ENA_L3_IPV4_CSUM)
-		tx_feat |= DEV_TX_OFFLOAD_IPV4_CKSUM;
-	if (adapter->offloads.tx_offloads &
-	    (ENA_L4_IPV4_CSUM_PARTIAL | ENA_L4_IPV4_CSUM |
-	     ENA_L4_IPV6_CSUM | ENA_L4_IPV6_CSUM_PARTIAL))
-		tx_feat |= DEV_TX_OFFLOAD_UDP_CKSUM | DEV_TX_OFFLOAD_TCP_CKSUM;
-
-	if (adapter->offloads.rx_offloads & ENA_L3_IPV4_CSUM)
-		rx_feat |= DEV_RX_OFFLOAD_IPV4_CKSUM;
-	if (adapter->offloads.rx_offloads &
-	    (ENA_L4_IPV4_CSUM | ENA_L4_IPV6_CSUM))
-		rx_feat |= DEV_RX_OFFLOAD_UDP_CKSUM | DEV_RX_OFFLOAD_TCP_CKSUM;
-
-	rx_feat |= DEV_RX_OFFLOAD_JUMBO_FRAME;
-	tx_feat |= DEV_TX_OFFLOAD_MULTI_SEGS;
-
 	/* Inform framework about available features */
-	dev_info->rx_offload_capa = rx_feat;
-	if (adapter->offloads.rx_offloads & ENA_RX_RSS_HASH)
-		dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_RSS_HASH;
-	dev_info->rx_queue_offload_capa = rx_feat;
-	dev_info->tx_offload_capa = tx_feat;
-	dev_info->tx_queue_offload_capa = tx_feat;
+	dev_info->rx_offload_capa = ena_get_rx_port_offloads(adapter);
+	dev_info->tx_offload_capa = ena_get_tx_port_offloads(adapter);
+	dev_info->rx_queue_offload_capa = ena_get_rx_queue_offloads(adapter);
+	dev_info->tx_queue_offload_capa = ena_get_tx_queue_offloads(adapter);
 
 	dev_info->flow_type_rss_offloads = ETH_RSS_IP | ETH_RSS_TCP |
 					   ETH_RSS_UDP;
@@ -2116,9 +2149,6 @@ static int ena_infos_get(struct rte_eth_dev *dev,
 	dev_info->max_tx_queues = adapter->max_num_io_queues;
 	dev_info->reta_size = ENA_RX_RSS_TABLE_SIZE;
 
-	adapter->tx_supported_offloads = tx_feat;
-	adapter->rx_supported_offloads = rx_feat;
-
 	dev_info->rx_desc_lim.nb_max = adapter->max_rx_ring_size;
 	dev_info->rx_desc_lim.nb_min = ENA_MIN_RING_DESC;
 	dev_info->rx_desc_lim.nb_seg_max = RTE_MIN(ENA_PKT_MAX_BUFS,
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.051321564 +0800
+++ 0160-net-ena-fix-per-queue-offload-capabilities.patch	2021-11-10 14:17:01.967411966 +0800
@@ -1 +1 @@
-From 3a822d79c5da8ed65fd08a8188b9b7d4c35fe199 Mon Sep 17 00:00:00 2001
+From 8200e4d11e02341bfde65debcd4703038b3d1402 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3a822d79c5da8ed65fd08a8188b9b7d4c35fe199 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -24,2 +26,2 @@
- drivers/net/ena/ena_ethdev.c | 89 ++++++++++++++++++++++++------------
- 1 file changed, 60 insertions(+), 29 deletions(-)
+ drivers/net/ena/ena_ethdev.c | 90 ++++++++++++++++++++++++------------
+ 1 file changed, 60 insertions(+), 30 deletions(-)
@@ -28 +30 @@
-index fe9bac8888..655c53b525 100644
+index 16ba729989..f4e26927a4 100644
@@ -31 +33 @@
-@@ -223,6 +223,10 @@ static int ena_queue_start(struct rte_eth_dev *dev, struct ena_ring *ring);
+@@ -237,6 +237,10 @@ static int ena_queue_start(struct ena_ring *ring);
@@ -41,2 +43,2 @@
- static void ena_interrupt_handler_rte(void *cb_arg);
-@@ -1947,12 +1951,63 @@ static void ena_init_rings(struct ena_adapter *adapter,
+ static int ena_rss_reta_update(struct rte_eth_dev *dev,
+@@ -2053,12 +2057,63 @@ static void ena_init_rings(struct ena_adapter *adapter,
@@ -107 +109 @@
-@@ -1971,32 +2026,11 @@ static int ena_infos_get(struct rte_eth_dev *dev,
+@@ -2077,33 +2132,11 @@ static int ena_infos_get(struct rte_eth_dev *dev,
@@ -127,0 +130 @@
+-	rx_feat |= DEV_RX_OFFLOAD_JUMBO_FRAME;
@@ -142,3 +145,3 @@
- 	dev_info->flow_type_rss_offloads = ENA_ALL_RSS_HF;
- 	dev_info->hash_key_size = ENA_HASH_KEY_SIZE;
-@@ -2012,9 +2046,6 @@ static int ena_infos_get(struct rte_eth_dev *dev,
+ 	dev_info->flow_type_rss_offloads = ETH_RSS_IP | ETH_RSS_TCP |
+ 					   ETH_RSS_UDP;
+@@ -2116,9 +2149,6 @@ static int ena_infos_get(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/ena: advertise scattered Rx capability' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (159 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/ena: fix per-queue offload capabilities' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'app/testpmd: fix access to DSCP table entries' " Xueming Li
                   ` (91 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: Luca Boccassi, Igor Chauskin, Shai Brandes, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/62a0570fb5f3e3efbe60269a374585b99172345f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 62a0570fb5f3e3efbe60269a374585b99172345f Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Tue, 19 Oct 2021 12:56:26 +0200
Subject: [PATCH] net/ena: advertise scattered Rx capability
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e2a6d08bef489215ebb77b1d3033875ada757cfa ]

ENA can't be forced to always pass single descriptor for the Rx packet.
Even if the passed buffer size is big enough to hold the data, we can't
make assumption that the HW won't use extra descriptor because of
internal optimizations. This assumption may be true, but only for some
of the FW revisions, which may differ depending on the used AWS instance
type.

As the scattered Rx support on the Rx path already exists, the driver
just needs to announce DEV_RX_OFFLOAD_SCATTER capability by turning on
the rte_eth_dev_data::scattered_rx option.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shai Brandes <shaibran@amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index f4e26927a4..6d42846092 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2023,8 +2023,14 @@ static int ena_dev_configure(struct rte_eth_dev *dev)
 		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
 	dev->data->dev_conf.txmode.offloads |= DEV_TX_OFFLOAD_MULTI_SEGS;
 
+	/* Scattered Rx cannot be turned off in the HW, so this capability must
+	 * be forced.
+	 */
+	dev->data->scattered_rx = 1;
+
 	adapter->tx_selected_offloads = dev->data->dev_conf.txmode.offloads;
 	adapter->rx_selected_offloads = dev->data->dev_conf.rxmode.offloads;
+
 	return 0;
 }
 
@@ -2072,6 +2078,8 @@ static uint64_t ena_get_rx_port_offloads(struct ena_adapter *adapter)
 	if (adapter->offloads.rx_offloads & ENA_RX_RSS_HASH)
 		port_offloads |= DEV_RX_OFFLOAD_RSS_HASH;
 
+	port_offloads |= DEV_RX_OFFLOAD_SCATTER;
+
 	return port_offloads;
 }
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.092642538 +0800
+++ 0161-net-ena-advertise-scattered-Rx-capability.patch	2021-11-10 14:17:01.970745273 +0800
@@ -1 +1 @@
-From e2a6d08bef489215ebb77b1d3033875ada757cfa Mon Sep 17 00:00:00 2001
+From 62a0570fb5f3e3efbe60269a374585b99172345f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e2a6d08bef489215ebb77b1d3033875ada757cfa ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 655c53b525..94dbb3164e 100644
+index f4e26927a4..6d42846092 100644
@@ -31 +33 @@
-@@ -1917,8 +1917,14 @@ static int ena_dev_configure(struct rte_eth_dev *dev)
+@@ -2023,8 +2023,14 @@ static int ena_dev_configure(struct rte_eth_dev *dev)
@@ -46 +48 @@
-@@ -1966,6 +1972,8 @@ static uint64_t ena_get_rx_port_offloads(struct ena_adapter *adapter)
+@@ -2072,6 +2078,8 @@ static uint64_t ena_get_rx_port_offloads(struct ena_adapter *adapter)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix access to DSCP table entries' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (160 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/ena: advertise scattered Rx capability' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'app/testpmd: add tunnel types' " Xueming Li
                   ` (90 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Sunil Kumar Kori; +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/453cbd4bf4ca21246e25e12c3b9d3d9518bb7e9a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 453cbd4bf4ca21246e25e12c3b9d3d9518bb7e9a Mon Sep 17 00:00:00 2001
From: Sunil Kumar Kori <skori@marvell.com>
Date: Tue, 12 Oct 2021 14:03:17 +0530
Subject: [PATCH] app/testpmd: fix access to DSCP table entries
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b314a4a664266f691167c29de6bc5ce728346c02 ]

During parsing of DSCP entries, memory is allocated and assigned
to *dscp_table. Later on, same memory is accessed using
*dscp_table[i++].

Due to higher precedence for array subscript, dscp_table[i++] will
be executed first which actually does not point to the same memory
which was allocated previously for DSCP table entries.

Fixes: 459463ae6c26 ("app/testpmd: fix memory allocation for DSCP table")

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/cmdline_mtr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c
index 3982787d20..875a97788c 100644
--- a/app/test-pmd/cmdline_mtr.c
+++ b/app/test-pmd/cmdline_mtr.c
@@ -92,13 +92,13 @@ parse_dscp_table_entries(char *str, enum rte_color **dscp_table)
 	while (1) {
 		if (strcmp(token, "G") == 0 ||
 			strcmp(token, "g") == 0)
-			*dscp_table[i++] = RTE_COLOR_GREEN;
+			(*dscp_table)[i++] = RTE_COLOR_GREEN;
 		else if (strcmp(token, "Y") == 0 ||
 			strcmp(token, "y") == 0)
-			*dscp_table[i++] = RTE_COLOR_YELLOW;
+			(*dscp_table)[i++] = RTE_COLOR_YELLOW;
 		else if (strcmp(token, "R") == 0 ||
 			strcmp(token, "r") == 0)
-			*dscp_table[i++] = RTE_COLOR_RED;
+			(*dscp_table)[i++] = RTE_COLOR_RED;
 		else {
 			free(*dscp_table);
 			return -1;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.133465378 +0800
+++ 0162-app-testpmd-fix-access-to-DSCP-table-entries.patch	2021-11-10 14:17:01.970745273 +0800
@@ -1 +1 @@
-From b314a4a664266f691167c29de6bc5ce728346c02 Mon Sep 17 00:00:00 2001
+From 453cbd4bf4ca21246e25e12c3b9d3d9518bb7e9a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b314a4a664266f691167c29de6bc5ce728346c02 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index b5dcfdadcf..ad7ef6ad98 100644
+index 3982787d20..875a97788c 100644
@@ -27 +29 @@
-@@ -101,13 +101,13 @@ parse_dscp_table_entries(char *str, enum rte_color **dscp_table)
+@@ -92,13 +92,13 @@ parse_dscp_table_entries(char *str, enum rte_color **dscp_table)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'app/testpmd: add tunnel types' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (161 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'app/testpmd: fix access to DSCP table entries' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/mlx5: support more " Xueming Li
                   ` (89 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Eli Britstein; +Cc: Luca Boccassi, Gregory Etelson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/94d1b9ecfce815c0279cb943baefa7ea7e800b01

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 94d1b9ecfce815c0279cb943baefa7ea7e800b01 Mon Sep 17 00:00:00 2001
From: Eli Britstein <elibr@nvidia.com>
Date: Thu, 23 Sep 2021 11:43:00 +0300
Subject: [PATCH] app/testpmd: add tunnel types
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ad6a8a20cb6be078575c7dab579877ab51c3cb4b ]

Current testpmd implementation supports VXLAN only for tunnel offload.
Add GRE, NVGRE and GENEVE for tunnel offload flow matches.

For example:
testpmd> flow tunnel create 0 type vxlan
port 0: flow tunnel #1 type vxlan
testpmd> flow tunnel create 0 type nvgre
port 0: flow tunnel #2 type nvgre
testpmd> flow tunnel create 0 type gre
port 0: flow tunnel #3 type gre
testpmd> flow tunnel create 0 type geneve
port 0: flow tunnel #4 type geneve

Fixes: 1b9f274623b8 ("app/testpmd: add commands for tunnel offload")

Signed-off-by: Eli Britstein <elibr@nvidia.com>
Reviewed-by: Gregory Etelson <getelson@nvidia.com>
---
 app/test-pmd/config.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 4847c36481..11369ca2c2 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1473,6 +1473,15 @@ port_flow_tunnel_type(struct rte_flow_tunnel *tunnel)
 	case RTE_FLOW_ITEM_TYPE_VXLAN:
 		type = "vxlan";
 		break;
+	case RTE_FLOW_ITEM_TYPE_GRE:
+		type = "gre";
+		break;
+	case RTE_FLOW_ITEM_TYPE_NVGRE:
+		type = "nvgre";
+		break;
+	case RTE_FLOW_ITEM_TYPE_GENEVE:
+		type = "geneve";
+		break;
 	}
 
 	return type;
@@ -1533,6 +1542,12 @@ void port_flow_tunnel_create(portid_t port_id, const struct tunnel_ops *ops)
 
 	if (!strcmp(ops->type, "vxlan"))
 		type = RTE_FLOW_ITEM_TYPE_VXLAN;
+	else if (!strcmp(ops->type, "gre"))
+		type = RTE_FLOW_ITEM_TYPE_GRE;
+	else if (!strcmp(ops->type, "nvgre"))
+		type = RTE_FLOW_ITEM_TYPE_NVGRE;
+	else if (!strcmp(ops->type, "geneve"))
+		type = RTE_FLOW_ITEM_TYPE_GENEVE;
 	else {
 		printf("cannot offload \"%s\" tunnel type\n", ops->type);
 		return;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.173654598 +0800
+++ 0163-app-testpmd-add-tunnel-types.patch	2021-11-10 14:17:01.970745273 +0800
@@ -1 +1 @@
-From ad6a8a20cb6be078575c7dab579877ab51c3cb4b Mon Sep 17 00:00:00 2001
+From 94d1b9ecfce815c0279cb943baefa7ea7e800b01 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ad6a8a20cb6be078575c7dab579877ab51c3cb4b ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index bdcd826490..23aa334cda 100644
+index 4847c36481..11369ca2c2 100644
@@ -32 +34 @@
-@@ -1249,6 +1249,15 @@ port_flow_tunnel_type(struct rte_flow_tunnel *tunnel)
+@@ -1473,6 +1473,15 @@ port_flow_tunnel_type(struct rte_flow_tunnel *tunnel)
@@ -48 +50 @@
-@@ -1309,6 +1318,12 @@ void port_flow_tunnel_create(portid_t port_id, const struct tunnel_ops *ops)
+@@ -1533,6 +1542,12 @@ void port_flow_tunnel_create(portid_t port_id, const struct tunnel_ops *ops)
@@ -59,2 +61,2 @@
- 		fprintf(stderr, "cannot offload \"%s\" tunnel type\n",
- 			ops->type);
+ 		printf("cannot offload \"%s\" tunnel type\n", ops->type);
+ 		return;

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/mlx5: support more tunnel types' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (162 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'app/testpmd: add tunnel types' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/ice: fix generic build on FreeBSD' " Xueming Li
                   ` (88 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Eli Britstein; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/17739766e31c9c38ce6d018cfcf2580d8b4c33d2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 17739766e31c9c38ce6d018cfcf2580d8b4c33d2 Mon Sep 17 00:00:00 2001
From: Eli Britstein <elibr@nvidia.com>
Date: Thu, 23 Sep 2021 11:43:01 +0300
Subject: [PATCH] net/mlx5: support more tunnel types
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 292be511d2909c14db3c9ceaffa317f2beee67a0 ]

Accept RTE_FLOW_ITEM_TYPE_GRE, RTE_FLOW_ITEM_TYPE_NVGRE and
RTE_FLOW_ITEM_TYPE_GENEVE as valid tunnel types.

Fixes: 4ec6360de37d ("net/mlx5: implement tunnel offload")

Signed-off-by: Eli Britstein <elibr@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 75d172e06b..5f44af5fa6 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -7771,6 +7771,9 @@ mlx5_flow_tunnel_validate(struct rte_eth_dev *dev,
 		err_msg = "unsupported tunnel type";
 		goto out;
 	case RTE_FLOW_ITEM_TYPE_VXLAN:
+	case RTE_FLOW_ITEM_TYPE_GRE:
+	case RTE_FLOW_ITEM_TYPE_NVGRE:
+	case RTE_FLOW_ITEM_TYPE_GENEVE:
 		break;
 	}
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.222729848 +0800
+++ 0164-net-mlx5-support-more-tunnel-types.patch	2021-11-10 14:17:01.974078578 +0800
@@ -1 +1 @@
-From 292be511d2909c14db3c9ceaffa317f2beee67a0 Mon Sep 17 00:00:00 2001
+From 17739766e31c9c38ce6d018cfcf2580d8b4c33d2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 292be511d2909c14db3c9ceaffa317f2beee67a0 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index c914a7120c..6a03fc52d7 100644
+index 75d172e06b..5f44af5fa6 100644
@@ -22 +24 @@
-@@ -9123,6 +9123,9 @@ mlx5_flow_tunnel_validate(struct rte_eth_dev *dev,
+@@ -7771,6 +7771,9 @@ mlx5_flow_tunnel_validate(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/ice: fix generic build on FreeBSD' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (163 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/mlx5: support more " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e: fix risk in descriptor read in NEON Rx' " Xueming Li
                   ` (87 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Leyi Rong; +Cc: Luca Boccassi, Bruce Richardson, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/84a1e5c1369a24a3728ff3ff5b8f2a13a2c96e5a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 84a1e5c1369a24a3728ff3ff5b8f2a13a2c96e5a Mon Sep 17 00:00:00 2001
From: Leyi Rong <leyi.rong@intel.com>
Date: Tue, 19 Oct 2021 11:02:08 +0800
Subject: [PATCH] net/ice: fix generic build on FreeBSD
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0d989ff9ca515f80fbab2aad18cede501b759ff9 ]

The common header file for vectorization is included in multiple files,
and so must use macros for the current compilation unit, rather than the
compiler-capability flag set for the whole driver. With the current,
incorrect, macro, the AVX512 or AVX2 flags may be set when compiling up
SSE code, leading to compilation errors. Changing from "CC_AVX*_SUPPORT"
to the compiler-defined "__AVX*__" macros fixes this issue. In addition,
splitting AVX-specific code into the new ice_rxtx_common_avx.h header
file to avoid such bugs.

Bugzilla ID: 788
Fixes: a4e480de268e ("net/ice: optimize Tx by using AVX512")
Fixes: 20daa1c978b7 ("net/ice: fix crash in AVX512")

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/ice/ice_rxtx_common_avx.h | 213 ++++++++++++++++++++++++++
 drivers/net/ice/ice_rxtx_vec_avx2.c   |   1 +
 drivers/net/ice/ice_rxtx_vec_avx512.c |   1 +
 drivers/net/ice/ice_rxtx_vec_common.h | 201 +-----------------------
 4 files changed, 216 insertions(+), 200 deletions(-)
 create mode 100644 drivers/net/ice/ice_rxtx_common_avx.h

diff --git a/drivers/net/ice/ice_rxtx_common_avx.h b/drivers/net/ice/ice_rxtx_common_avx.h
new file mode 100644
index 0000000000..81e0db5dd3
--- /dev/null
+++ b/drivers/net/ice/ice_rxtx_common_avx.h
@@ -0,0 +1,213 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2019 Intel Corporation
+ */
+
+#ifndef _ICE_RXTX_COMMON_AVX_H_
+#define _ICE_RXTX_COMMON_AVX_H_
+
+#include "ice_rxtx.h"
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wcast-qual"
+#endif
+
+#ifdef __AVX2__
+static __rte_always_inline void
+ice_rxq_rearm_common(struct ice_rx_queue *rxq, __rte_unused bool avx512)
+{
+	int i;
+	uint16_t rx_id;
+	volatile union ice_rx_flex_desc *rxdp;
+	struct ice_rx_entry *rxep = &rxq->sw_ring[rxq->rxrearm_start];
+
+	rxdp = rxq->rx_ring + rxq->rxrearm_start;
+
+	/* Pull 'n' more MBUFs into the software ring */
+	if (rte_mempool_get_bulk(rxq->mp,
+				 (void *)rxep,
+				 ICE_RXQ_REARM_THRESH) < 0) {
+		if (rxq->rxrearm_nb + ICE_RXQ_REARM_THRESH >=
+		    rxq->nb_rx_desc) {
+			__m128i dma_addr0;
+
+			dma_addr0 = _mm_setzero_si128();
+			for (i = 0; i < ICE_DESCS_PER_LOOP; i++) {
+				rxep[i].mbuf = &rxq->fake_mbuf;
+				_mm_store_si128((__m128i *)&rxdp[i].read,
+						dma_addr0);
+			}
+		}
+		rte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed +=
+			ICE_RXQ_REARM_THRESH;
+		return;
+	}
+
+#ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC
+	struct rte_mbuf *mb0, *mb1;
+	__m128i dma_addr0, dma_addr1;
+	__m128i hdr_room = _mm_set_epi64x(RTE_PKTMBUF_HEADROOM,
+			RTE_PKTMBUF_HEADROOM);
+	/* Initialize the mbufs in vector, process 2 mbufs in one loop */
+	for (i = 0; i < ICE_RXQ_REARM_THRESH; i += 2, rxep += 2) {
+		__m128i vaddr0, vaddr1;
+
+		mb0 = rxep[0].mbuf;
+		mb1 = rxep[1].mbuf;
+
+		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
+				offsetof(struct rte_mbuf, buf_addr) + 8);
+		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
+		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
+
+		/* convert pa to dma_addr hdr/data */
+		dma_addr0 = _mm_unpackhi_epi64(vaddr0, vaddr0);
+		dma_addr1 = _mm_unpackhi_epi64(vaddr1, vaddr1);
+
+		/* add headroom to pa values */
+		dma_addr0 = _mm_add_epi64(dma_addr0, hdr_room);
+		dma_addr1 = _mm_add_epi64(dma_addr1, hdr_room);
+
+		/* flush desc with pa dma_addr */
+		_mm_store_si128((__m128i *)&rxdp++->read, dma_addr0);
+		_mm_store_si128((__m128i *)&rxdp++->read, dma_addr1);
+	}
+#else
+#ifdef __AVX512VL__
+	if (avx512) {
+		struct rte_mbuf *mb0, *mb1, *mb2, *mb3;
+		struct rte_mbuf *mb4, *mb5, *mb6, *mb7;
+		__m512i dma_addr0_3, dma_addr4_7;
+		__m512i hdr_room = _mm512_set1_epi64(RTE_PKTMBUF_HEADROOM);
+		/* Initialize the mbufs in vector, process 8 mbufs in one loop */
+		for (i = 0; i < ICE_RXQ_REARM_THRESH;
+				i += 8, rxep += 8, rxdp += 8) {
+			__m128i vaddr0, vaddr1, vaddr2, vaddr3;
+			__m128i vaddr4, vaddr5, vaddr6, vaddr7;
+			__m256i vaddr0_1, vaddr2_3;
+			__m256i vaddr4_5, vaddr6_7;
+			__m512i vaddr0_3, vaddr4_7;
+
+			mb0 = rxep[0].mbuf;
+			mb1 = rxep[1].mbuf;
+			mb2 = rxep[2].mbuf;
+			mb3 = rxep[3].mbuf;
+			mb4 = rxep[4].mbuf;
+			mb5 = rxep[5].mbuf;
+			mb6 = rxep[6].mbuf;
+			mb7 = rxep[7].mbuf;
+
+			/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+			RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
+					offsetof(struct rte_mbuf, buf_addr) + 8);
+			vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
+			vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
+			vaddr2 = _mm_loadu_si128((__m128i *)&mb2->buf_addr);
+			vaddr3 = _mm_loadu_si128((__m128i *)&mb3->buf_addr);
+			vaddr4 = _mm_loadu_si128((__m128i *)&mb4->buf_addr);
+			vaddr5 = _mm_loadu_si128((__m128i *)&mb5->buf_addr);
+			vaddr6 = _mm_loadu_si128((__m128i *)&mb6->buf_addr);
+			vaddr7 = _mm_loadu_si128((__m128i *)&mb7->buf_addr);
+
+			/**
+			 * merge 0 & 1, by casting 0 to 256-bit and inserting 1
+			 * into the high lanes. Similarly for 2 & 3, and so on.
+			 */
+			vaddr0_1 =
+				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr0),
+							vaddr1, 1);
+			vaddr2_3 =
+				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr2),
+							vaddr3, 1);
+			vaddr4_5 =
+				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr4),
+							vaddr5, 1);
+			vaddr6_7 =
+				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr6),
+							vaddr7, 1);
+			vaddr0_3 =
+				_mm512_inserti64x4(_mm512_castsi256_si512(vaddr0_1),
+						   vaddr2_3, 1);
+			vaddr4_7 =
+				_mm512_inserti64x4(_mm512_castsi256_si512(vaddr4_5),
+						   vaddr6_7, 1);
+
+			/* convert pa to dma_addr hdr/data */
+			dma_addr0_3 = _mm512_unpackhi_epi64(vaddr0_3, vaddr0_3);
+			dma_addr4_7 = _mm512_unpackhi_epi64(vaddr4_7, vaddr4_7);
+
+			/* add headroom to pa values */
+			dma_addr0_3 = _mm512_add_epi64(dma_addr0_3, hdr_room);
+			dma_addr4_7 = _mm512_add_epi64(dma_addr4_7, hdr_room);
+
+			/* flush desc with pa dma_addr */
+			_mm512_store_si512((__m512i *)&rxdp->read, dma_addr0_3);
+			_mm512_store_si512((__m512i *)&(rxdp + 4)->read, dma_addr4_7);
+		}
+	} else
+#endif /* __AVX512VL__ */
+	{
+		struct rte_mbuf *mb0, *mb1, *mb2, *mb3;
+		__m256i dma_addr0_1, dma_addr2_3;
+		__m256i hdr_room = _mm256_set1_epi64x(RTE_PKTMBUF_HEADROOM);
+		/* Initialize the mbufs in vector, process 4 mbufs in one loop */
+		for (i = 0; i < ICE_RXQ_REARM_THRESH;
+				i += 4, rxep += 4, rxdp += 4) {
+			__m128i vaddr0, vaddr1, vaddr2, vaddr3;
+			__m256i vaddr0_1, vaddr2_3;
+
+			mb0 = rxep[0].mbuf;
+			mb1 = rxep[1].mbuf;
+			mb2 = rxep[2].mbuf;
+			mb3 = rxep[3].mbuf;
+
+			/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+			RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
+					offsetof(struct rte_mbuf, buf_addr) + 8);
+			vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
+			vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
+			vaddr2 = _mm_loadu_si128((__m128i *)&mb2->buf_addr);
+			vaddr3 = _mm_loadu_si128((__m128i *)&mb3->buf_addr);
+
+			/**
+			 * merge 0 & 1, by casting 0 to 256-bit and inserting 1
+			 * into the high lanes. Similarly for 2 & 3
+			 */
+			vaddr0_1 =
+				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr0),
+							vaddr1, 1);
+			vaddr2_3 =
+				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr2),
+							vaddr3, 1);
+
+			/* convert pa to dma_addr hdr/data */
+			dma_addr0_1 = _mm256_unpackhi_epi64(vaddr0_1, vaddr0_1);
+			dma_addr2_3 = _mm256_unpackhi_epi64(vaddr2_3, vaddr2_3);
+
+			/* add headroom to pa values */
+			dma_addr0_1 = _mm256_add_epi64(dma_addr0_1, hdr_room);
+			dma_addr2_3 = _mm256_add_epi64(dma_addr2_3, hdr_room);
+
+			/* flush desc with pa dma_addr */
+			_mm256_store_si256((__m256i *)&rxdp->read, dma_addr0_1);
+			_mm256_store_si256((__m256i *)&(rxdp + 2)->read, dma_addr2_3);
+		}
+	}
+
+#endif
+
+	rxq->rxrearm_start += ICE_RXQ_REARM_THRESH;
+	if (rxq->rxrearm_start >= rxq->nb_rx_desc)
+		rxq->rxrearm_start = 0;
+
+	rxq->rxrearm_nb -= ICE_RXQ_REARM_THRESH;
+
+	rx_id = (uint16_t)((rxq->rxrearm_start == 0) ?
+			     (rxq->nb_rx_desc - 1) : (rxq->rxrearm_start - 1));
+
+	/* Update the tail pointer on the NIC */
+	ICE_PCI_REG_WC_WRITE(rxq->qrx_tail, rx_id);
+}
+#endif /* __AVX2__ */
+
+#endif /* _ICE_RXTX_COMMON_AVX_H_ */
diff --git a/drivers/net/ice/ice_rxtx_vec_avx2.c b/drivers/net/ice/ice_rxtx_vec_avx2.c
index ac2719fa15..581d3d348f 100644
--- a/drivers/net/ice/ice_rxtx_vec_avx2.c
+++ b/drivers/net/ice/ice_rxtx_vec_avx2.c
@@ -3,6 +3,7 @@
  */
 
 #include "ice_rxtx_vec_common.h"
+#include "ice_rxtx_common_avx.h"
 
 #include <x86intrin.h>
 
diff --git a/drivers/net/ice/ice_rxtx_vec_avx512.c b/drivers/net/ice/ice_rxtx_vec_avx512.c
index 719b7b8b38..2c0881a01e 100644
--- a/drivers/net/ice/ice_rxtx_vec_avx512.c
+++ b/drivers/net/ice/ice_rxtx_vec_avx512.c
@@ -3,6 +3,7 @@
  */
 
 #include "ice_rxtx_vec_common.h"
+#include "ice_rxtx_common_avx.h"
 
 #include <x86intrin.h>
 
diff --git a/drivers/net/ice/ice_rxtx_vec_common.h b/drivers/net/ice/ice_rxtx_vec_common.h
index 1d138aa899..bd2450ad5f 100644
--- a/drivers/net/ice/ice_rxtx_vec_common.h
+++ b/drivers/net/ice/ice_rxtx_vec_common.h
@@ -194,7 +194,7 @@ _ice_tx_queue_release_mbufs_vec(struct ice_tx_queue *txq)
 	 */
 	i = txq->tx_next_dd - txq->tx_rs_thresh + 1;
 
-#ifdef CC_AVX512_SUPPORT
+#ifdef __AVX512VL__
 	struct rte_eth_dev *dev = &rte_eth_devices[txq->vsi->adapter->pf.dev_data->port_id];
 
 	if (dev->tx_pkt_burst == ice_xmit_pkts_vec_avx512) {
@@ -322,203 +322,4 @@ ice_tx_vec_dev_check_default(struct rte_eth_dev *dev)
 	return 0;
 }
 
-#ifdef CC_AVX2_SUPPORT
-static __rte_always_inline void
-ice_rxq_rearm_common(struct ice_rx_queue *rxq, __rte_unused bool avx512)
-{
-	int i;
-	uint16_t rx_id;
-	volatile union ice_rx_flex_desc *rxdp;
-	struct ice_rx_entry *rxep = &rxq->sw_ring[rxq->rxrearm_start];
-
-	rxdp = rxq->rx_ring + rxq->rxrearm_start;
-
-	/* Pull 'n' more MBUFs into the software ring */
-	if (rte_mempool_get_bulk(rxq->mp,
-				 (void *)rxep,
-				 ICE_RXQ_REARM_THRESH) < 0) {
-		if (rxq->rxrearm_nb + ICE_RXQ_REARM_THRESH >=
-		    rxq->nb_rx_desc) {
-			__m128i dma_addr0;
-
-			dma_addr0 = _mm_setzero_si128();
-			for (i = 0; i < ICE_DESCS_PER_LOOP; i++) {
-				rxep[i].mbuf = &rxq->fake_mbuf;
-				_mm_store_si128((__m128i *)&rxdp[i].read,
-						dma_addr0);
-			}
-		}
-		rte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed +=
-			ICE_RXQ_REARM_THRESH;
-		return;
-	}
-
-#ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC
-	struct rte_mbuf *mb0, *mb1;
-	__m128i dma_addr0, dma_addr1;
-	__m128i hdr_room = _mm_set_epi64x(RTE_PKTMBUF_HEADROOM,
-			RTE_PKTMBUF_HEADROOM);
-	/* Initialize the mbufs in vector, process 2 mbufs in one loop */
-	for (i = 0; i < ICE_RXQ_REARM_THRESH; i += 2, rxep += 2) {
-		__m128i vaddr0, vaddr1;
-
-		mb0 = rxep[0].mbuf;
-		mb1 = rxep[1].mbuf;
-
-		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
-		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
-				offsetof(struct rte_mbuf, buf_addr) + 8);
-		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
-		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
-
-		/* convert pa to dma_addr hdr/data */
-		dma_addr0 = _mm_unpackhi_epi64(vaddr0, vaddr0);
-		dma_addr1 = _mm_unpackhi_epi64(vaddr1, vaddr1);
-
-		/* add headroom to pa values */
-		dma_addr0 = _mm_add_epi64(dma_addr0, hdr_room);
-		dma_addr1 = _mm_add_epi64(dma_addr1, hdr_room);
-
-		/* flush desc with pa dma_addr */
-		_mm_store_si128((__m128i *)&rxdp++->read, dma_addr0);
-		_mm_store_si128((__m128i *)&rxdp++->read, dma_addr1);
-	}
-#else
-#ifdef CC_AVX512_SUPPORT
-	if (avx512) {
-		struct rte_mbuf *mb0, *mb1, *mb2, *mb3;
-		struct rte_mbuf *mb4, *mb5, *mb6, *mb7;
-		__m512i dma_addr0_3, dma_addr4_7;
-		__m512i hdr_room = _mm512_set1_epi64(RTE_PKTMBUF_HEADROOM);
-		/* Initialize the mbufs in vector, process 8 mbufs in one loop */
-		for (i = 0; i < ICE_RXQ_REARM_THRESH;
-				i += 8, rxep += 8, rxdp += 8) {
-			__m128i vaddr0, vaddr1, vaddr2, vaddr3;
-			__m128i vaddr4, vaddr5, vaddr6, vaddr7;
-			__m256i vaddr0_1, vaddr2_3;
-			__m256i vaddr4_5, vaddr6_7;
-			__m512i vaddr0_3, vaddr4_7;
-
-			mb0 = rxep[0].mbuf;
-			mb1 = rxep[1].mbuf;
-			mb2 = rxep[2].mbuf;
-			mb3 = rxep[3].mbuf;
-			mb4 = rxep[4].mbuf;
-			mb5 = rxep[5].mbuf;
-			mb6 = rxep[6].mbuf;
-			mb7 = rxep[7].mbuf;
-
-			/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
-			RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
-					offsetof(struct rte_mbuf, buf_addr) + 8);
-			vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
-			vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
-			vaddr2 = _mm_loadu_si128((__m128i *)&mb2->buf_addr);
-			vaddr3 = _mm_loadu_si128((__m128i *)&mb3->buf_addr);
-			vaddr4 = _mm_loadu_si128((__m128i *)&mb4->buf_addr);
-			vaddr5 = _mm_loadu_si128((__m128i *)&mb5->buf_addr);
-			vaddr6 = _mm_loadu_si128((__m128i *)&mb6->buf_addr);
-			vaddr7 = _mm_loadu_si128((__m128i *)&mb7->buf_addr);
-
-			/**
-			 * merge 0 & 1, by casting 0 to 256-bit and inserting 1
-			 * into the high lanes. Similarly for 2 & 3, and so on.
-			 */
-			vaddr0_1 =
-				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr0),
-							vaddr1, 1);
-			vaddr2_3 =
-				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr2),
-							vaddr3, 1);
-			vaddr4_5 =
-				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr4),
-							vaddr5, 1);
-			vaddr6_7 =
-				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr6),
-							vaddr7, 1);
-			vaddr0_3 =
-				_mm512_inserti64x4(_mm512_castsi256_si512(vaddr0_1),
-							vaddr2_3, 1);
-			vaddr4_7 =
-				_mm512_inserti64x4(_mm512_castsi256_si512(vaddr4_5),
-							vaddr6_7, 1);
-
-			/* convert pa to dma_addr hdr/data */
-			dma_addr0_3 = _mm512_unpackhi_epi64(vaddr0_3, vaddr0_3);
-			dma_addr4_7 = _mm512_unpackhi_epi64(vaddr4_7, vaddr4_7);
-
-			/* add headroom to pa values */
-			dma_addr0_3 = _mm512_add_epi64(dma_addr0_3, hdr_room);
-			dma_addr4_7 = _mm512_add_epi64(dma_addr4_7, hdr_room);
-
-			/* flush desc with pa dma_addr */
-			_mm512_store_si512((__m512i *)&rxdp->read, dma_addr0_3);
-			_mm512_store_si512((__m512i *)&(rxdp + 4)->read, dma_addr4_7);
-		}
-	} else
-#endif
-	{
-		struct rte_mbuf *mb0, *mb1, *mb2, *mb3;
-		__m256i dma_addr0_1, dma_addr2_3;
-		__m256i hdr_room = _mm256_set1_epi64x(RTE_PKTMBUF_HEADROOM);
-		/* Initialize the mbufs in vector, process 4 mbufs in one loop */
-		for (i = 0; i < ICE_RXQ_REARM_THRESH;
-				i += 4, rxep += 4, rxdp += 4) {
-			__m128i vaddr0, vaddr1, vaddr2, vaddr3;
-			__m256i vaddr0_1, vaddr2_3;
-
-			mb0 = rxep[0].mbuf;
-			mb1 = rxep[1].mbuf;
-			mb2 = rxep[2].mbuf;
-			mb3 = rxep[3].mbuf;
-
-			/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
-			RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
-					offsetof(struct rte_mbuf, buf_addr) + 8);
-			vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
-			vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
-			vaddr2 = _mm_loadu_si128((__m128i *)&mb2->buf_addr);
-			vaddr3 = _mm_loadu_si128((__m128i *)&mb3->buf_addr);
-
-			/**
-			 * merge 0 & 1, by casting 0 to 256-bit and inserting 1
-			 * into the high lanes. Similarly for 2 & 3
-			 */
-			vaddr0_1 =
-				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr0),
-							vaddr1, 1);
-			vaddr2_3 =
-				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr2),
-							vaddr3, 1);
-
-			/* convert pa to dma_addr hdr/data */
-			dma_addr0_1 = _mm256_unpackhi_epi64(vaddr0_1, vaddr0_1);
-			dma_addr2_3 = _mm256_unpackhi_epi64(vaddr2_3, vaddr2_3);
-
-			/* add headroom to pa values */
-			dma_addr0_1 = _mm256_add_epi64(dma_addr0_1, hdr_room);
-			dma_addr2_3 = _mm256_add_epi64(dma_addr2_3, hdr_room);
-
-			/* flush desc with pa dma_addr */
-			_mm256_store_si256((__m256i *)&rxdp->read, dma_addr0_1);
-			_mm256_store_si256((__m256i *)&(rxdp + 2)->read, dma_addr2_3);
-		}
-	}
-
-#endif
-
-	rxq->rxrearm_start += ICE_RXQ_REARM_THRESH;
-	if (rxq->rxrearm_start >= rxq->nb_rx_desc)
-		rxq->rxrearm_start = 0;
-
-	rxq->rxrearm_nb -= ICE_RXQ_REARM_THRESH;
-
-	rx_id = (uint16_t)((rxq->rxrearm_start == 0) ?
-			     (rxq->nb_rx_desc - 1) : (rxq->rxrearm_start - 1));
-
-	/* Update the tail pointer on the NIC */
-	ICE_PCI_REG_WC_WRITE(rxq->qrx_tail, rx_id);
-}
-#endif
-
 #endif
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.271137982 +0800
+++ 0165-net-ice-fix-generic-build-on-FreeBSD.patch	2021-11-10 14:17:01.977411885 +0800
@@ -1 +1 @@
-From 0d989ff9ca515f80fbab2aad18cede501b759ff9 Mon Sep 17 00:00:00 2001
+From 84a1e5c1369a24a3728ff3ff5b8f2a13a2c96e5a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0d989ff9ca515f80fbab2aad18cede501b759ff9 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -251 +253 @@
-index 9725ac0180..490693bff2 100644
+index ac2719fa15..581d3d348f 100644
@@ -260 +262 @@
- #include <rte_vect.h>
+ #include <x86intrin.h>
@@ -263 +265 @@
-index 5bba9887d2..7efe7b50a2 100644
+index 719b7b8b38..2c0881a01e 100644
@@ -272 +274 @@
- #include <rte_vect.h>
+ #include <x86intrin.h>
@@ -275 +277 @@
-index 5b5250565e..f0f9926585 100644
+index 1d138aa899..bd2450ad5f 100644
@@ -286,3 +288,3 @@
- 	if (dev->tx_pkt_burst == ice_xmit_pkts_vec_avx512 ||
-@@ -355,205 +355,6 @@ ice_tx_vec_dev_check_default(struct rte_eth_dev *dev)
- 	return result;
+ 	if (dev->tx_pkt_burst == ice_xmit_pkts_vec_avx512) {
+@@ -322,203 +322,4 @@ ice_tx_vec_dev_check_default(struct rte_eth_dev *dev)
+ 	return 0;
@@ -490,3 +492 @@
- static inline void
- ice_txd_enable_offload(struct rte_mbuf *tx_pkt,
- 		       uint64_t *txd_hi)
+ #endif

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix risk in descriptor read in NEON Rx' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (164 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/ice: fix generic build on FreeBSD' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'ethdev: forbid closing started device' " Xueming Li
                   ` (86 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Luca Boccassi, Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/364b772782cfb891c250376d6ce020dc13a508d5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 364b772782cfb891c250376d6ce020dc13a508d5 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Wed, 15 Sep 2021 16:33:38 +0800
Subject: [PATCH] net/i40e: fix risk in descriptor read in NEON Rx
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 778602fe570a138224de94a38eca3ce2e344138c ]

Rx descriptor is 16B/32B in size. If the DD bit is set, it indicates
that the rest of the descriptor words have valid values. Hence, the
word containing DD bit must be read first before reading the rest of
the descriptor words.

In NEON vector PMD, vector load loads two contiguous 8B of
descriptor data into vector register. Given vector load ensures no
16B atomicity, read of the word that includes DD field could be
reordered after read of other words. In this case, some words could
contain invalid data.

Read barrier is added after read of qword1 that includes DD field.
And qword0 is reloaded to update vector register. This ensures
that the fetched data is correct.

Testpmd single core test on N1SDP/ThunderX2 showed no performance drop.

Fixes: ae0eb310f253 ("net/i40e: implement vector PMD for ARM")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 drivers/net/i40e/i40e_rxtx_vec_neon.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
index 0df315b162..67b88e64ec 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
@@ -297,6 +297,14 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *__rte_restrict rxq,
 		descs[1] =  vld1q_u64((uint64_t *)(rxdp + 1));
 		descs[0] =  vld1q_u64((uint64_t *)(rxdp));
 
+		/* Use acquire fence to order loads of descriptor qwords */
+		rte_atomic_thread_fence(__ATOMIC_ACQUIRE);
+		/* A.2 reload qword0 to make it ordered after qword1 load */
+		descs[3] = vld1q_lane_u64((uint64_t *)(rxdp + 3), descs[3], 0);
+		descs[2] = vld1q_lane_u64((uint64_t *)(rxdp + 2), descs[2], 0);
+		descs[1] = vld1q_lane_u64((uint64_t *)(rxdp + 1), descs[1], 0);
+		descs[0] = vld1q_lane_u64((uint64_t *)(rxdp), descs[0], 0);
+
 		/* B.2 copy 2 mbuf point into rx_pkts  */
 		vst1q_u64((uint64_t *)&rx_pkts[pos + 2], mbp2);
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.315002961 +0800
+++ 0166-net-i40e-fix-risk-in-descriptor-read-in-NEON-Rx.patch	2021-11-10 14:17:01.977411885 +0800
@@ -1 +1 @@
-From 778602fe570a138224de94a38eca3ce2e344138c Mon Sep 17 00:00:00 2001
+From 364b772782cfb891c250376d6ce020dc13a508d5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 778602fe570a138224de94a38eca3ce2e344138c ]
@@ -24 +26,0 @@
-Cc: stable@dpdk.org
@@ -33 +35 @@
-index b2683fda60..71191c7cc8 100644
+index 0df315b162..67b88e64ec 100644
@@ -36 +38 @@
-@@ -286,6 +286,14 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *__rte_restrict rxq,
+@@ -297,6 +297,14 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *__rte_restrict rxq,
@@ -48,3 +50,3 @@
- 		/* B.1 load 4 mbuf point */
- 		mbp1 = vld1q_u64((uint64_t *)&sw_ring[pos]);
- 		mbp2 = vld1q_u64((uint64_t *)&sw_ring[pos + 2]);
+ 		/* B.2 copy 2 mbuf point into rx_pkts  */
+ 		vst1q_u64((uint64_t *)&rx_pkts[pos + 2], mbp2);
+ 

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'ethdev: forbid closing started device' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (165 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e: fix risk in descriptor read in NEON Rx' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'test/hash: fix buffer overflow with jhash' " Xueming Li
                   ` (85 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Andrew Rybchenko
  Cc: Luca Boccassi, Thomas Monjalon, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/dabe1ce96409c54a646583310ab3c79bab07744f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From dabe1ce96409c54a646583310ab3c79bab07744f Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Date: Wed, 20 Oct 2021 16:15:40 +0300
Subject: [PATCH] ethdev: forbid closing started device
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit febc855b358e3579f0eb44c76c329b623f87a376 ]

Ethernet device must be stopped first before close in accordance
with the documentation.

Fixes: 980995f8cc56 ("ethdev: improve API comments of close and detach functions")

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 lib/librte_ethdev/rte_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 22fb0b96d7..9b695e1e1b 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -1814,6 +1814,12 @@ rte_eth_dev_close(uint16_t port_id)
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
 	dev = &rte_eth_devices[port_id];
 
+	if (dev->data->dev_started) {
+		RTE_ETHDEV_LOG(ERR, "Cannot close started device (port %u)\n",
+			       port_id);
+		return -EINVAL;
+	}
+
 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_close, -ENOTSUP);
 	*lasterr = (*dev->dev_ops->dev_close)(dev);
 	if (*lasterr != 0)
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.356791824 +0800
+++ 0167-ethdev-forbid-closing-started-device.patch	2021-11-10 14:17:01.980745191 +0800
@@ -1 +1 @@
-From febc855b358e3579f0eb44c76c329b623f87a376 Mon Sep 17 00:00:00 2001
+From dabe1ce96409c54a646583310ab3c79bab07744f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit febc855b358e3579f0eb44c76c329b623f87a376 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- lib/ethdev/rte_ethdev.c | 6 ++++++
+ lib/librte_ethdev/rte_ethdev.c | 6 ++++++
@@ -19,5 +21,5 @@
-diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
-index 3b8ef9ef22..f981e0226a 100644
---- a/lib/ethdev/rte_ethdev.c
-+++ b/lib/ethdev/rte_ethdev.c
-@@ -1893,6 +1893,12 @@ rte_eth_dev_close(uint16_t port_id)
+diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
+index 22fb0b96d7..9b695e1e1b 100644
+--- a/lib/librte_ethdev/rte_ethdev.c
++++ b/lib/librte_ethdev/rte_ethdev.c
+@@ -1814,6 +1814,12 @@ rte_eth_dev_close(uint16_t port_id)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'test/hash: fix buffer overflow with jhash' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (166 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'ethdev: forbid closing started device' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'mbuf: fix reset on mbuf free' " Xueming Li
                   ` (84 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: Luca Boccassi, Yipeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/936f56164e3e98ca53b1b4b26558e4919c6a37ce

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 936f56164e3e98ca53b1b4b26558e4919c6a37ce Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Thu, 14 Oct 2021 18:48:19 +0100
Subject: [PATCH] test/hash: fix buffer overflow with jhash
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e30ef3a3a032875cc4bc395dc13201a11b110f9f ]

This patch fixes buffer overflow reported by ASAN,
please reference https://bugs.dpdk.org/show_bug.cgi?id=818

Some tests for the rte_hash table use the rte_jhash_32b() as
the hash function. This hash function interprets the length
argument in units of 4 bytes.

This patch adds a wrapper function around rte_jhash_32b()
to reflect API differences regarding the length argument,
effectively dividing it by 4.

For some tests rte_jhash() is used with keys of length not
a multiple of 4 bytes. From the rte_jhash() documentation:
If input key is not aligned to four byte boundaries or a
multiple of four bytes in length, the memory region just
after may be read (but not used in the computation).

This patch increases the size of the proto field of the
flow_key struct up to uint32_t.

Bugzilla ID: 818
Fixes: af75078fece3 ("first public release")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
---
 app/test/test_hash.c | 35 ++++++++++++++++++++++++++---------
 1 file changed, 26 insertions(+), 9 deletions(-)

diff --git a/app/test/test_hash.c b/app/test/test_hash.c
index bd4d0cb722..b99e8de1db 100644
--- a/app/test/test_hash.c
+++ b/app/test/test_hash.c
@@ -74,13 +74,17 @@ static uint32_t hashtest_key_lens[] = {0, 2, 4, 5, 6, 7, 8, 10, 11, 15, 16, 21,
 	}								\
 } while (0)
 
-/* 5-tuple key type */
+/*
+ * 5-tuple key type.
+ * Should be packed to avoid holes with potentially
+ * undefined content in the middle.
+ */
 struct flow_key {
 	uint32_t ip_src;
 	uint32_t ip_dst;
 	uint16_t port_src;
 	uint16_t port_dst;
-	uint8_t proto;
+	uint32_t proto;
 } __rte_packed;
 
 /*
@@ -147,7 +151,7 @@ static struct flow_key keys[5] = { {
 /* Parameters used for hash table in unit test functions. Name set later. */
 static struct rte_hash_parameters ut_params = {
 	.entries = 64,
-	.key_len = sizeof(struct flow_key), /* 13 */
+	.key_len = sizeof(struct flow_key),
 	.hash_func = rte_jhash,
 	.hash_func_init_val = 0,
 	.socket_id = 0,
@@ -792,7 +796,7 @@ static int test_full_bucket(void)
 	struct rte_hash_parameters params_pseudo_hash = {
 		.name = "test4",
 		.entries = 64,
-		.key_len = sizeof(struct flow_key), /* 13 */
+		.key_len = sizeof(struct flow_key),
 		.hash_func = pseudo_hash,
 		.hash_func_init_val = 0,
 		.socket_id = 0,
@@ -895,7 +899,7 @@ static int test_extendable_bucket(void)
 	struct rte_hash_parameters params_pseudo_hash = {
 		.name = "test5",
 		.entries = 64,
-		.key_len = sizeof(struct flow_key), /* 13 */
+		.key_len = sizeof(struct flow_key),
 		.hash_func = pseudo_hash,
 		.hash_func_init_val = 0,
 		.socket_id = 0,
@@ -1606,6 +1610,17 @@ static struct rte_hash_parameters hash_params_ex = {
 	.socket_id = 0,
 };
 
+/*
+ * Wrapper function around rte_jhash_32b.
+ * It is required because rte_jhash_32b() accepts the length
+ * as size of 4-byte units.
+ */
+static inline uint32_t
+test_jhash_32b(const void *k, uint32_t length, uint32_t initval)
+{
+	return rte_jhash_32b(k, length >> 2, initval);
+}
+
 /*
  * add/delete key with jhash2
  */
@@ -1618,7 +1633,7 @@ test_hash_add_delete_jhash2(void)
 
 	hash_params_ex.name = "hash_test_jhash2";
 	hash_params_ex.key_len = 4;
-	hash_params_ex.hash_func = (rte_hash_function)rte_jhash_32b;
+	hash_params_ex.hash_func = (rte_hash_function)test_jhash_32b;
 
 	handle = rte_hash_create(&hash_params_ex);
 	if (handle == NULL) {
@@ -1657,7 +1672,7 @@ test_hash_add_delete_2_jhash2(void)
 
 	hash_params_ex.name = "hash_test_2_jhash2";
 	hash_params_ex.key_len = 8;
-	hash_params_ex.hash_func = (rte_hash_function)rte_jhash_32b;
+	hash_params_ex.hash_func = (rte_hash_function)test_jhash_32b;
 
 	handle = rte_hash_create(&hash_params_ex);
 	if (handle == NULL)
@@ -1915,7 +1930,7 @@ test_hash_rcu_qsbr_dq_mode(uint8_t ext_bkt)
 	struct rte_hash_parameters params_pseudo_hash = {
 		.name = "test_hash_rcu_qsbr_dq_mode",
 		.entries = total_entries,
-		.key_len = sizeof(struct flow_key), /* 13 */
+		.key_len = sizeof(struct flow_key),
 		.hash_func = pseudo_hash,
 		.hash_func_init_val = 0,
 		.socket_id = 0,
@@ -2085,7 +2100,7 @@ test_hash_rcu_qsbr_sync_mode(uint8_t ext_bkt)
 	struct rte_hash_parameters params_pseudo_hash = {
 		.name = "test_hash_rcu_qsbr_sync_mode",
 		.entries = total_entries,
-		.key_len = sizeof(struct flow_key), /* 13 */
+		.key_len = sizeof(struct flow_key),
 		.hash_func = pseudo_hash,
 		.hash_func_init_val = 0,
 		.socket_id = 0,
@@ -2180,6 +2195,8 @@ test_hash_rcu_qsbr_sync_mode(uint8_t ext_bkt)
 static int
 test_hash(void)
 {
+	RTE_BUILD_BUG_ON(sizeof(struct flow_key) % sizeof(uint32_t) != 0);
+
 	if (test_add_delete() < 0)
 		return -1;
 	if (test_hash_add_delete_jhash2() < 0)
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.402785798 +0800
+++ 0168-test-hash-fix-buffer-overflow-with-jhash.patch	2021-11-10 14:17:01.980745191 +0800
@@ -1 +1 @@
-From e30ef3a3a032875cc4bc395dc13201a11b110f9f Mon Sep 17 00:00:00 2001
+From 936f56164e3e98ca53b1b4b26558e4919c6a37ce Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e30ef3a3a032875cc4bc395dc13201a11b110f9f ]
@@ -28 +30,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'mbuf: fix reset on mbuf free' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (167 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'test/hash: fix buffer overflow with jhash' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'app/eventdev: fix terminal colour after control-c exit' " Xueming Li
                   ` (83 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Olivier Matz
  Cc: Luca Boccassi, Morten Brørup, Ajit Khaparde,
	Konstantin Ananyev, Ali Alnubani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/65c45e2fa2bd067fc721f63888fa1b7219d3eff1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 65c45e2fa2bd067fc721f63888fa1b7219d3eff1 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Wed, 29 Sep 2021 23:37:07 +0200
Subject: [PATCH] mbuf: fix reset on mbuf free
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit efc6f9104c80d39ec168d9559accdc7609274eca ]

m->nb_seg must be reset on mbuf free whatever the value of m->next,
because it can happen that m->nb_seg is != 1. For instance in this
case:

  m1 = rte_pktmbuf_alloc(mp);
  rte_pktmbuf_append(m1, 500);
  m2 = rte_pktmbuf_alloc(mp);
  rte_pktmbuf_append(m2, 500);
  rte_pktmbuf_chain(m1, m2);
  m0 = rte_pktmbuf_alloc(mp);
  rte_pktmbuf_append(m0, 500);
  rte_pktmbuf_chain(m0, m1);

As rte_pktmbuf_chain() does not reset nb_seg in the initial m1
segment (this is not required), after this code the mbuf chain
have 3 segments:
  - m0: next=m1, nb_seg=3
  - m1: next=m2, nb_seg=2
  - m2: next=NULL, nb_seg=1

Then split this chain between m1 and m2, it would result in 2 packets:
  - first packet
    - m0: next=m1, nb_seg=2
    - m1: next=NULL, nb_seg=2
  - second packet
    - m2: next=NULL, nb_seg=1

Freeing the first packet will not restore nb_seg=1 in the second
segment. This is an issue because it is expected that mbufs stored
in pool have their nb_seg field set to 1.

Fixes: 8f094a9ac5d7 ("mbuf: set mbuf fields while in pool")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
 app/test/test_mbuf.c            | 69 +++++++++++++++++++++++++++++++++
 lib/librte_mbuf/rte_mbuf.c      |  4 +-
 lib/librte_mbuf/rte_mbuf.h      |  8 ++--
 lib/librte_mbuf/rte_mbuf_core.h | 13 ++++++-
 4 files changed, 86 insertions(+), 8 deletions(-)

diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 2bccaa03b1..69a361c2f5 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -2702,6 +2702,70 @@ fail:
 	return -1;
 }
 
+/* check that m->nb_segs and m->next are reset on mbuf free */
+static int
+test_nb_segs_and_next_reset(void)
+{
+	struct rte_mbuf *m0 = NULL, *m1 = NULL, *m2 = NULL;
+	struct rte_mempool *pool = NULL;
+
+	pool = rte_pktmbuf_pool_create("test_mbuf_reset",
+			3, 0, 0, MBUF_DATA_SIZE, SOCKET_ID_ANY);
+	if (pool == NULL)
+		GOTO_FAIL("Failed to create mbuf pool");
+
+	/* alloc mbufs */
+	m0 = rte_pktmbuf_alloc(pool);
+	m1 = rte_pktmbuf_alloc(pool);
+	m2 = rte_pktmbuf_alloc(pool);
+	if (m0 == NULL || m1 == NULL || m2 == NULL)
+		GOTO_FAIL("Failed to allocate mbuf");
+
+	/* append data in all of them */
+	if (rte_pktmbuf_append(m0, 500) == NULL ||
+			rte_pktmbuf_append(m1, 500) == NULL ||
+			rte_pktmbuf_append(m2, 500) == NULL)
+		GOTO_FAIL("Failed to append data in mbuf");
+
+	/* chain them in one mbuf m0 */
+	rte_pktmbuf_chain(m1, m2);
+	rte_pktmbuf_chain(m0, m1);
+	if (m0->nb_segs != 3 || m0->next != m1 || m1->next != m2 ||
+			m2->next != NULL) {
+		m1 = m2 = NULL;
+		GOTO_FAIL("Failed to chain mbufs");
+	}
+
+	/* split m0 chain in two, between m1 and m2 */
+	m0->nb_segs = 2;
+	m1->next = NULL;
+	m2->nb_segs = 1;
+
+	/* free the 2 mbuf chains m0 and m2  */
+	rte_pktmbuf_free(m0);
+	rte_pktmbuf_free(m2);
+
+	/* realloc the 3 mbufs */
+	m0 = rte_mbuf_raw_alloc(pool);
+	m1 = rte_mbuf_raw_alloc(pool);
+	m2 = rte_mbuf_raw_alloc(pool);
+	if (m0 == NULL || m1 == NULL || m2 == NULL)
+		GOTO_FAIL("Failed to reallocate mbuf");
+
+	/* ensure that m->next and m->nb_segs are reset allocated mbufs */
+	if (m0->nb_segs != 1 || m0->next != NULL ||
+			m1->nb_segs != 1 || m1->next != NULL ||
+			m2->nb_segs != 1 || m2->next != NULL)
+		GOTO_FAIL("nb_segs or next was not reset properly");
+
+	return 0;
+
+fail:
+	if (pool != NULL)
+		rte_mempool_free(pool);
+	return -1;
+}
+
 static int
 test_mbuf(void)
 {
@@ -2892,6 +2956,11 @@ test_mbuf(void)
 		goto err;
 	}
 
+	/* test reset of m->nb_segs and m->next on mbuf free */
+	if (test_nb_segs_and_next_reset() < 0) {
+		printf("test_nb_segs_and_next_reset() failed\n");
+		goto err;
+	}
 
 	ret = 0;
 err:
diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
index 7d09ee2939..5f77840557 100644
--- a/lib/librte_mbuf/rte_mbuf.c
+++ b/lib/librte_mbuf/rte_mbuf.c
@@ -129,10 +129,10 @@ rte_pktmbuf_free_pinned_extmem(void *addr, void *opaque)
 
 	rte_mbuf_ext_refcnt_set(m->shinfo, 1);
 	m->ol_flags = EXT_ATTACHED_MBUF;
-	if (m->next != NULL) {
+	if (m->next != NULL)
 		m->next = NULL;
+	if (m->nb_segs != 1)
 		m->nb_segs = 1;
-	}
 	rte_mbuf_raw_free(m);
 }
 
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 3aece65e9d..bcd8b743a7 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -1340,10 +1340,10 @@ rte_pktmbuf_prefree_seg(struct rte_mbuf *m)
 				return NULL;
 		}
 
-		if (m->next != NULL) {
+		if (m->next != NULL)
 			m->next = NULL;
+		if (m->nb_segs != 1)
 			m->nb_segs = 1;
-		}
 
 		return m;
 
@@ -1357,10 +1357,10 @@ rte_pktmbuf_prefree_seg(struct rte_mbuf *m)
 				return NULL;
 		}
 
-		if (m->next != NULL) {
+		if (m->next != NULL)
 			m->next = NULL;
+		if (m->nb_segs != 1)
 			m->nb_segs = 1;
-		}
 		rte_mbuf_refcnt_set(m, 1);
 
 		return m;
diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h
index 9d1609336a..c26492cf45 100644
--- a/lib/librte_mbuf/rte_mbuf_core.h
+++ b/lib/librte_mbuf/rte_mbuf_core.h
@@ -496,7 +496,12 @@ struct rte_mbuf {
 	 * or non-atomic) is controlled by the RTE_MBUF_REFCNT_ATOMIC flag.
 	 */
 	uint16_t refcnt;
-	uint16_t nb_segs;         /**< Number of segments. */
+
+	/**
+	 * Number of segments. Only valid for the first segment of an mbuf
+	 * chain.
+	 */
+	uint16_t nb_segs;
 
 	/** Input port (16 bits to support more than 256 virtual ports).
 	 * The event eth Tx adapter uses this field to specify the output port.
@@ -592,7 +597,11 @@ struct rte_mbuf {
 	/* second cache line - fields only used in slow path or on TX */
 	RTE_MARKER cacheline1 __rte_cache_min_aligned;
 
-	struct rte_mbuf *next;    /**< Next segment of scattered packet. */
+	/**
+	 * Next segment of scattered packet. Must be NULL in the last segment or
+	 * in case of non-segmented packet.
+	 */
+	struct rte_mbuf *next;
 
 	/* fields to support TX offloads */
 	RTE_STD_C11
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.446549277 +0800
+++ 0169-mbuf-fix-reset-on-mbuf-free.patch	2021-11-10 14:17:01.984078497 +0800
@@ -1 +1 @@
-From efc6f9104c80d39ec168d9559accdc7609274eca Mon Sep 17 00:00:00 2001
+From 65c45e2fa2bd067fc721f63888fa1b7219d3eff1 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit efc6f9104c80d39ec168d9559accdc7609274eca ]
@@ -41 +43,0 @@
-Cc: stable@dpdk.org
@@ -49,4 +51,4 @@
- app/test/test_mbuf.c     | 69 ++++++++++++++++++++++++++++++++++++++++
- lib/mbuf/rte_mbuf.c      |  4 +--
- lib/mbuf/rte_mbuf.h      |  8 ++---
- lib/mbuf/rte_mbuf_core.h | 13 ++++++--
+ app/test/test_mbuf.c            | 69 +++++++++++++++++++++++++++++++++
+ lib/librte_mbuf/rte_mbuf.c      |  4 +-
+ lib/librte_mbuf/rte_mbuf.h      |  8 ++--
+ lib/librte_mbuf/rte_mbuf_core.h | 13 ++++++-
@@ -56 +58 @@
-index 82777109dc..3a7e67bf90 100644
+index 2bccaa03b1..69a361c2f5 100644
@@ -142,5 +144,5 @@
-diff --git a/lib/mbuf/rte_mbuf.c b/lib/mbuf/rte_mbuf.c
-index f7e3c1a187..f145cd800a 100644
---- a/lib/mbuf/rte_mbuf.c
-+++ b/lib/mbuf/rte_mbuf.c
-@@ -134,10 +134,10 @@ rte_pktmbuf_free_pinned_extmem(void *addr, void *opaque)
+diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
+index 7d09ee2939..5f77840557 100644
+--- a/lib/librte_mbuf/rte_mbuf.c
++++ b/lib/librte_mbuf/rte_mbuf.c
+@@ -129,10 +129,10 @@ rte_pktmbuf_free_pinned_extmem(void *addr, void *opaque)
@@ -159,5 +161,5 @@
-diff --git a/lib/mbuf/rte_mbuf.h b/lib/mbuf/rte_mbuf.h
-index ec2f4bb188..175093073e 100644
---- a/lib/mbuf/rte_mbuf.h
-+++ b/lib/mbuf/rte_mbuf.h
-@@ -1321,10 +1321,10 @@ rte_pktmbuf_prefree_seg(struct rte_mbuf *m)
+diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
+index 3aece65e9d..bcd8b743a7 100644
+--- a/lib/librte_mbuf/rte_mbuf.h
++++ b/lib/librte_mbuf/rte_mbuf.h
+@@ -1340,10 +1340,10 @@ rte_pktmbuf_prefree_seg(struct rte_mbuf *m)
@@ -176 +178 @@
-@@ -1338,10 +1338,10 @@ rte_pktmbuf_prefree_seg(struct rte_mbuf *m)
+@@ -1357,10 +1357,10 @@ rte_pktmbuf_prefree_seg(struct rte_mbuf *m)
@@ -189,5 +191,5 @@
-diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h
-index fdaaaf67f2..48607a0c12 100644
---- a/lib/mbuf/rte_mbuf_core.h
-+++ b/lib/mbuf/rte_mbuf_core.h
-@@ -502,7 +502,12 @@ struct rte_mbuf {
+diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h
+index 9d1609336a..c26492cf45 100644
+--- a/lib/librte_mbuf/rte_mbuf_core.h
++++ b/lib/librte_mbuf/rte_mbuf_core.h
+@@ -496,7 +496,12 @@ struct rte_mbuf {
@@ -207 +209 @@
-@@ -598,7 +603,11 @@ struct rte_mbuf {
+@@ -592,7 +597,11 @@ struct rte_mbuf {

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'app/eventdev: fix terminal colour after control-c exit' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (168 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'mbuf: fix reset on mbuf free' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'eventdev/eth_rx: fix WRR buffer overrun' " Xueming Li
                   ` (82 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Harry van Haaren; +Cc: Luca Boccassi, Pavan Nikhilesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2b7b5a82a0bda52cbf0ab45b3d456b10416bed1f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2b7b5a82a0bda52cbf0ab45b3d456b10416bed1f Mon Sep 17 00:00:00 2001
From: Harry van Haaren <harry.van.haaren@intel.com>
Date: Thu, 14 Oct 2021 09:54:44 +0000
Subject: [PATCH] app/eventdev: fix terminal colour after control-c exit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c0900d33443e0a9caca0727995d4ffb9587853bc ]

Before this commit, a Control^C exit of the test-eventdev application
would print the worker packet percentages, and leave the terminal with
a green colour despite the colour reset being issued after the newline.
By moving the colour reset command before the \n the issue is fixed.

Fixes: 6b1a14a83a06 ("app/eventdev: add packet distribution logs")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 app/test-eventdev/test_perf_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
index 2fe15ed447..fb3acc79ba 100644
--- a/app/test-eventdev/test_perf_common.c
+++ b/app/test-eventdev/test_perf_common.c
@@ -19,7 +19,7 @@ perf_test_result(struct evt_test *test, struct evt_options *opt)
 		total += t->worker[i].processed_pkts;
 	for (i = 0; i < t->nb_workers; i++)
 		printf("Worker %d packets: "CLGRN"%"PRIx64" "CLNRM"percentage:"
-				CLGRN" %3.2f\n"CLNRM, i,
+				CLGRN" %3.2f"CLNRM"\n", i,
 				t->worker[i].processed_pkts,
 				(((double)t->worker[i].processed_pkts)/total)
 				* 100);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.492029242 +0800
+++ 0170-app-eventdev-fix-terminal-colour-after-control-c-exi.patch	2021-11-10 14:17:01.984078497 +0800
@@ -1 +1 @@
-From c0900d33443e0a9caca0727995d4ffb9587853bc Mon Sep 17 00:00:00 2001
+From 2b7b5a82a0bda52cbf0ab45b3d456b10416bed1f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c0900d33443e0a9caca0727995d4ffb9587853bc ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 660d5a0364..97bad18a1f 100644
+index 2fe15ed447..fb3acc79ba 100644

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'eventdev/eth_rx: fix WRR buffer overrun' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (169 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'app/eventdev: fix terminal colour after control-c exit' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'bpf: allow self-xor operation' " Xueming Li
                   ` (81 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Naga Harish K S V; +Cc: Luca Boccassi, Jay Jayatheerthan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1d47c1198e1c7b982e5b5f13775bf1d628a5bfd1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1d47c1198e1c7b982e5b5f13775bf1d628a5bfd1 Mon Sep 17 00:00:00 2001
From: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Date: Mon, 18 Oct 2021 03:25:41 -0500
Subject: [PATCH] eventdev/eth_rx: fix WRR buffer overrun
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 81da8a5ff440eda60635c849c9e9b3d253838da9 ]

When a poll queue is removed from a rx_adapter instance, the WRR poll
array is recomputed. The wrr array length is reduced in this case. The
next wrr position to poll is stored in wrr_pos variable of rx_adapter
instance. This wrr_pos can become invalid in some cases after wrr is
recomputed. Using this variable to get the next queue and device pair
may leed to wrr buffer overruns.

Resetting the wrr_pos to zero after recomputation of wrr array fixes
the buffer overrun issue.

Fixes: 9c38b704d280 ("eventdev: add eth Rx adapter implementation")

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
---
 lib/librte_eventdev/rte_event_eth_rx_adapter.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
index 663b446c05..89213297db 100644
--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
@@ -2239,6 +2239,11 @@ rte_event_eth_rx_adapter_queue_del(uint8_t id, uint16_t eth_dev_id,
 		rx_adapter->eth_rx_poll = rx_poll;
 		rx_adapter->wrr_sched = rx_wrr;
 		rx_adapter->wrr_len = nb_wrr;
+		/*
+		 * reset next poll start position (wrr_pos) to avoid buffer
+		 * overrun when wrr_len is reduced in case of queue delete
+		 */
+		rx_adapter->wrr_pos = 0;
 		rx_adapter->num_intr_vec += num_intr_vec;
 
 		if (dev_info->nb_dev_queues == 0) {
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.533836359 +0800
+++ 0171-eventdev-eth_rx-fix-WRR-buffer-overrun.patch	2021-11-10 14:17:01.984078497 +0800
@@ -1 +1 @@
-From 81da8a5ff440eda60635c849c9e9b3d253838da9 Mon Sep 17 00:00:00 2001
+From 1d47c1198e1c7b982e5b5f13775bf1d628a5bfd1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 81da8a5ff440eda60635c849c9e9b3d253838da9 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
- lib/eventdev/rte_event_eth_rx_adapter.c | 5 +++++
+ lib/librte_eventdev/rte_event_eth_rx_adapter.c | 5 +++++
@@ -25,5 +27,5 @@
-diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
-index e570f2f085..f07dd4d822 100644
---- a/lib/eventdev/rte_event_eth_rx_adapter.c
-+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
-@@ -2739,6 +2739,11 @@ rte_event_eth_rx_adapter_queue_del(uint8_t id, uint16_t eth_dev_id,
+diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+index 663b446c05..89213297db 100644
+--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
++++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+@@ -2239,6 +2239,11 @@ rte_event_eth_rx_adapter_queue_del(uint8_t id, uint16_t eth_dev_id,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'bpf: allow self-xor operation' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (170 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'eventdev/eth_rx: fix WRR buffer overrun' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'devtools: fix letter case check in commit title' " Xueming Li
                   ` (80 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Luca Boccassi, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/97c39312a0e8972648e22b616fe1b3cbdde54ede

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 97c39312a0e8972648e22b616fe1b3cbdde54ede Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 20 Oct 2021 14:42:27 -0700
Subject: [PATCH] bpf: allow self-xor operation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 80da61198b6be66ab16964eb0944c79c0325c40e ]

Some BPF programs may use XOR of a register with itself
as a way to zero register in one instruction.
The BPF filter converter generates this in the prolog
to the generated code.

The BPF validator would not allow this because the value of
register was undefined. But after this operation it always zero.

Fixes: 8021917293d0 ("bpf: add extra validation for input BPF program")

Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_bpf/bpf_validate.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/librte_bpf/bpf_validate.c b/lib/librte_bpf/bpf_validate.c
index 7b1291b382..853279fee5 100644
--- a/lib/librte_bpf/bpf_validate.c
+++ b/lib/librte_bpf/bpf_validate.c
@@ -661,8 +661,15 @@ eval_alu(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
 
 	op = BPF_OP(ins->code);
 
+	/* Allow self-xor as way to zero register */
+	if (op == BPF_XOR && BPF_SRC(ins->code) == BPF_X &&
+	    ins->src_reg == ins->dst_reg) {
+		eval_fill_imm(&rs, UINT64_MAX, 0);
+		eval_fill_imm(rd, UINT64_MAX, 0);
+	}
+
 	err = eval_defined((op != EBPF_MOV) ? rd : NULL,
-			(op != BPF_NEG) ? &rs : NULL);
+			   (op != BPF_NEG) ? &rs : NULL);
 	if (err != NULL)
 		return err;
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.576681326 +0800
+++ 0172-bpf-allow-self-xor-operation.patch	2021-11-10 14:17:01.984078497 +0800
@@ -1 +1 @@
-From 80da61198b6be66ab16964eb0944c79c0325c40e Mon Sep 17 00:00:00 2001
+From 97c39312a0e8972648e22b616fe1b3cbdde54ede Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 80da61198b6be66ab16964eb0944c79c0325c40e ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
- lib/bpf/bpf_validate.c | 9 ++++++++-
+ lib/librte_bpf/bpf_validate.c | 9 ++++++++-
@@ -23 +25 @@
-diff --git a/lib/bpf/bpf_validate.c b/lib/bpf/bpf_validate.c
+diff --git a/lib/librte_bpf/bpf_validate.c b/lib/librte_bpf/bpf_validate.c
@@ -25,2 +27,2 @@
---- a/lib/bpf/bpf_validate.c
-+++ b/lib/bpf/bpf_validate.c
+--- a/lib/librte_bpf/bpf_validate.c
++++ b/lib/librte_bpf/bpf_validate.c

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'devtools: fix letter case check in commit title' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (171 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'bpf: allow self-xor operation' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:30 ` [dpdk-stable] patch 'cmdline: free on exit' " Xueming Li
                   ` (79 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/04cc709c6aa097552ed270314cd8d898a51dac6f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 04cc709c6aa097552ed270314cd8d898a51dac6f Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Mon, 18 Oct 2021 11:55:58 +0200
Subject: [PATCH] devtools: fix letter case check in commit title
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8b51fbc09e44ceaca0d32139bbc558d8cd5d06dd ]

The prefix (before the colon) of the title is lowercase.
The check of uppercase/lowercase in the commit title
was supposed to apply after the colon,
but some greps were not limited to the exact word.
So in the case of "test/dma: add basic dmadev instance tests",
the lowercase word "dmadev" was wrongly suggested to be uppercase.

The words of the dictionary must be filtered as whole word
with the grep option -w.

Fixes: d448efa259e9 ("devtools: export dictionary for commit title check")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 devtools/check-git-log.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh
index 9988bf863d..885d444b3d 100755
--- a/devtools/check-git-log.sh
+++ b/devtools/check-git-log.sh
@@ -111,12 +111,12 @@ IFS='
 '
 words="$selfdir/words-case.txt"
 for word in $(cat $words); do
-	bad=$(echo "$headlines" | grep -iw $word | grep -v $word)
+	bad=$(echo "$headlines" | grep -iw $word | grep -vw $word)
 	if [ "$word" = "Tx" ]; then
 		bad=$(echo $bad | grep -v 'OCTEON\ TX')
 	fi
 	for bad_line in $bad; do
-		bad_word=$(echo $bad_line | cut -d":" -f2 | grep -io $word)
+		bad_word=$(echo $bad_line | cut -d":" -f2 | grep -iwo $word)
 		[ -z "$bad_word" ] || { printf "Wrong headline case:\n\
 			\"$bad_line\": $bad_word --> $word\n" && failure=true;}
 	done
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.619241935 +0800
+++ 0173-devtools-fix-letter-case-check-in-commit-title.patch	2021-11-10 14:17:01.984078497 +0800
@@ -1 +1 @@
-From 8b51fbc09e44ceaca0d32139bbc558d8cd5d06dd Mon Sep 17 00:00:00 2001
+From 04cc709c6aa097552ed270314cd8d898a51dac6f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8b51fbc09e44ceaca0d32139bbc558d8cd5d06dd ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'cmdline: free on exit' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (172 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'devtools: fix letter case check in commit title' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  7:23   ` Peng, ZhihongX
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/mlx5: fix Rx queue resource cleanup' " Xueming Li
                   ` (78 subsequent siblings)
  252 siblings, 1 reply; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Zhihong Peng; +Cc: Luca Boccassi, Dmitry Kozlyuk, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f181839864ae7ba170519235a6da969a7df36a85

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f181839864ae7ba170519235a6da969a7df36a85 Mon Sep 17 00:00:00 2001
From: Zhihong Peng <zhihongx.peng@intel.com>
Date: Mon, 18 Oct 2021 21:58:50 +0800
Subject: [PATCH] cmdline: free on exit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6ad06203a587a8ce10392d9224e9fbdcb77b3d5c ]

Malloc cl in the cmdline_stdin_new function, so release in the
cmdline_stdin_exit function is logical, so that cl will not be
released alone.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
Reviewed-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Zhihong Peng <zhihongx.peng@intel.com>
---
 app/test/test.c                     | 1 -
 app/test/test_cmdline_lib.c         | 1 -
 lib/librte_cmdline/cmdline_socket.c | 1 +
 3 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/app/test/test.c b/app/test/test.c
index 864523ed61..f7d0946761 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -195,7 +195,6 @@ main(int argc, char **argv)
 
 		cmdline_interact(cl);
 		cmdline_stdin_exit(cl);
-		cmdline_free(cl);
 	}
 #endif
 	ret = 0;
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index d5a09b4541..6bcfa6511e 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -174,7 +174,6 @@ test_cmdline_socket_fns(void)
 	/* void functions */
 	cmdline_stdin_exit(NULL);
 
-	cmdline_free(cl);
 	return 0;
 error:
 	printf("Error: function accepted null parameter!\n");
diff --git a/lib/librte_cmdline/cmdline_socket.c b/lib/librte_cmdline/cmdline_socket.c
index 0fe1497008..f919537460 100644
--- a/lib/librte_cmdline/cmdline_socket.c
+++ b/lib/librte_cmdline/cmdline_socket.c
@@ -57,4 +57,5 @@ cmdline_stdin_exit(struct cmdline *cl)
 		return;
 
 	terminal_restore(cl);
+	cmdline_free(cl);
 }
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.660774437 +0800
+++ 0174-cmdline-free-on-exit.patch	2021-11-10 14:17:01.984078497 +0800
@@ -1 +1 @@
-From 6ad06203a587a8ce10392d9224e9fbdcb77b3d5c Mon Sep 17 00:00:00 2001
+From f181839864ae7ba170519235a6da969a7df36a85 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6ad06203a587a8ce10392d9224e9fbdcb77b3d5c ]
@@ -17,5 +20,4 @@
- app/test/test.c                        | 1 -
- app/test/test_cmdline_lib.c            | 1 -
- doc/guides/rel_notes/release_21_11.rst | 3 +++
- lib/cmdline/cmdline_socket.c           | 1 +
- 4 files changed, 4 insertions(+), 2 deletions(-)
+ app/test/test.c                     | 1 -
+ app/test/test_cmdline_lib.c         | 1 -
+ lib/librte_cmdline/cmdline_socket.c | 1 +
+ 3 files changed, 1 insertion(+), 2 deletions(-)
@@ -24 +26 @@
-index 173d202e47..5194131026 100644
+index 864523ed61..f7d0946761 100644
@@ -27 +29 @@
-@@ -233,7 +233,6 @@ main(int argc, char **argv)
+@@ -195,7 +195,6 @@ main(int argc, char **argv)
@@ -36 +38 @@
-index 054ebf5e9d..f238094b07 100644
+index d5a09b4541..6bcfa6511e 100644
@@ -39 +41 @@
-@@ -180,7 +180,6 @@ test_cmdline_socket_fns(void)
+@@ -174,7 +174,6 @@ test_cmdline_socket_fns(void)
@@ -47,19 +49,5 @@
-diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst
-index 9b1843eb09..450bcbb445 100644
---- a/doc/guides/rel_notes/release_21_11.rst
-+++ b/doc/guides/rel_notes/release_21_11.rst
-@@ -325,6 +325,9 @@ API Changes
-   removed. Its usages have been replaced by a new function
-   ``rte_kvargs_get_with_value()``.
- 
-+* cmdline: ``cmdline_stdin_exit()`` now frees the ``cmdline`` structure.
-+  Calls to ``cmdline_free()`` after it need to be deleted from applications.
-+
- * cmdline: Made ``cmdline`` structure definition hidden on Linux and FreeBSD.
- 
- * cmdline: Made ``rdline`` structure definition hidden. Functions are added
-diff --git a/lib/cmdline/cmdline_socket.c b/lib/cmdline/cmdline_socket.c
-index 998e8ade25..ebd5343754 100644
---- a/lib/cmdline/cmdline_socket.c
-+++ b/lib/cmdline/cmdline_socket.c
-@@ -53,4 +53,5 @@ cmdline_stdin_exit(struct cmdline *cl)
+diff --git a/lib/librte_cmdline/cmdline_socket.c b/lib/librte_cmdline/cmdline_socket.c
+index 0fe1497008..f919537460 100644
+--- a/lib/librte_cmdline/cmdline_socket.c
++++ b/lib/librte_cmdline/cmdline_socket.c
+@@ -57,4 +57,5 @@ cmdline_stdin_exit(struct cmdline *cl)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix Rx queue resource cleanup' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (173 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'cmdline: free on exit' " Xueming Li
@ 2021-11-10  6:30 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/mlx5: close tools socket with last device' " Xueming Li
                   ` (77 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:30 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9820d23a935266e158b02e125e81b388ff4161bb

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9820d23a935266e158b02e125e81b388ff4161bb Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Mon, 18 Oct 2021 20:24:56 +0300
Subject: [PATCH] net/mlx5: fix Rx queue resource cleanup
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9ec1ceab76a82bc7c95343ed99312893a66ce217 ]

mlx5_rxq_start() allocates rxq_ctrl->obj and frees it on failure,
but did not set it to NULL. Later mlx5_rxq_release() could not recognize
this object is already freed and attempted to release its resources,
resulting in a crash:

    Configuring Port 0 (socket 0)
    mlx5_common: Failed to create RQ using DevX
    mlx5_common: Can't create DevX RQ object.
    mlx5_net: Port 0 Rx queue 0 RQ creation failure.
    Segmentation fault

Set rxq_ctrl->obj to NULL after it is freed to skip resource release.

Fixes: 1260a87b2889 ("net/mlx5: share Rx control code")

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_trigger.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 33a98ee50c..98055efd50 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -180,6 +180,7 @@ mlx5_rxq_start(struct rte_eth_dev *dev)
 		ret = priv->obj_ops.rxq_obj_new(dev, i);
 		if (ret) {
 			mlx5_free(rxq_ctrl->obj);
+			rxq_ctrl->obj = NULL;
 			goto error;
 		}
 		DRV_LOG(DEBUG, "Port %u rxq %u updated with %p.",
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.703480734 +0800
+++ 0175-net-mlx5-fix-Rx-queue-resource-cleanup.patch	2021-11-10 14:17:01.987411803 +0800
@@ -1 +1 @@
-From 9ec1ceab76a82bc7c95343ed99312893a66ce217 Mon Sep 17 00:00:00 2001
+From 9820d23a935266e158b02e125e81b388ff4161bb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9ec1ceab76a82bc7c95343ed99312893a66ce217 ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index ca43bd51aa..dacf7ff272 100644
+index 33a98ee50c..98055efd50 100644
@@ -32 +34 @@
-@@ -230,6 +230,7 @@ mlx5_rxq_start(struct rte_eth_dev *dev)
+@@ -180,6 +180,7 @@ mlx5_rxq_start(struct rte_eth_dev *dev)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/mlx5: close tools socket with last device' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (174 preceding siblings ...)
  2021-11-10  6:30 ` [dpdk-stable] patch 'net/mlx5: fix Rx queue resource cleanup' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/virtio: fix check scatter on all Rx queues' " Xueming Li
                   ` (76 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Luca Boccassi, Harman Kalra, Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/315ca5d5358aa3089510df129d0c7f144714c4ba

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 315ca5d5358aa3089510df129d0c7f144714c4ba Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Thu, 14 Oct 2021 11:55:28 +0300
Subject: [PATCH] net/mlx5: close tools socket with last device
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ea823b2c511d6e4a4e51fa5e4aabc30e5a30cdb7 ]

MLX5 PMD exposes a socket for external tools to dump port state.
Socket events are listened using an interrupt source of EXT type.
The socket was closed and the interrupt callback was unregistered
at program exit, which is incorrect because DPDK could be already
shut down at this point. Move actions performed at program exit
to the moment the last MLX5 port is closed. The socket will be opened
again if later a new MLX5 device is plugged in and probed.
Also fix comments that were decisively talking
about secondary processes instead of external tools.

Fixes: e6cdc54cc0ef ("net/mlx5: add socket server for external tools")

Reported-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/net/mlx5/linux/mlx5_os.c     |  9 +++++++++
 drivers/net/mlx5/linux/mlx5_socket.c | 12 +++---------
 drivers/net/mlx5/mlx5.c              |  4 ++++
 drivers/net/mlx5/mlx5.h              |  2 ++
 4 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index cc4fa3dd97..e4bb26bc2b 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -2463,6 +2463,15 @@ mlx5_os_open_device(const struct mlx5_dev_spawn_data *spawn,
 	return err;
 }
 
+/**
+ * Cleanup resources when the last device is closed.
+ */
+void
+mlx5_os_net_cleanup(void)
+{
+	mlx5_pmd_socket_uninit();
+}
+
 /**
  * Install shared asynchronous device events handler.
  * This function is implemented to support event sharing
diff --git a/drivers/net/mlx5/linux/mlx5_socket.c b/drivers/net/mlx5/linux/mlx5_socket.c
index b1f41bc102..e60d1ec212 100644
--- a/drivers/net/mlx5/linux/mlx5_socket.c
+++ b/drivers/net/mlx5/linux/mlx5_socket.c
@@ -140,10 +140,7 @@ mlx5_pmd_interrupt_handler_uninstall(void)
 }
 
 /**
- * Initialise the socket to communicate with the secondary process
- *
- * @param[in] dev
- *   Pointer to Ethernet device.
+ * Initialise the socket to communicate with external tools.
  *
  * @return
  *   0 on success, a negative value otherwise.
@@ -160,10 +157,6 @@ mlx5_pmd_socket_init(void)
 	MLX5_ASSERT(rte_eal_process_type() == RTE_PROC_PRIMARY);
 	if (server_socket)
 		return 0;
-	/*
-	 * Initialize the socket to communicate with the secondary
-	 * process.
-	 */
 	ret = socket(AF_UNIX, SOCK_STREAM, 0);
 	if (ret < 0) {
 		DRV_LOG(WARNING, "Failed to open mlx5 socket: %s",
@@ -210,7 +203,8 @@ error:
 /**
  * Un-Initialize the pmd socket
  */
-RTE_FINI(mlx5_pmd_socket_uninit)
+void
+mlx5_pmd_socket_uninit(void)
 {
 	if (!server_socket)
 		return;
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 48588d4cd5..ef1308ffc1 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1079,6 +1079,10 @@ mlx5_free_shared_dev_ctx(struct mlx5_dev_ctx_shared *sh)
 	mlx5_mr_release_cache(&sh->share_cache);
 	/* Remove context from the global device list. */
 	LIST_REMOVE(sh, next);
+	/* Release resources on the last device removal. */
+	if (LIST_EMPTY(&mlx5_dev_ctx_list)) {
+		mlx5_os_net_cleanup();
+	}
 	pthread_mutex_unlock(&mlx5_dev_ctx_list_mutex);
 	/*
 	 *  Ensure there is no async event handler installed.
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 3d6d5bb923..7e984f8438 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -1261,6 +1261,7 @@ int mlx5_mp_os_req_queue_control(struct rte_eth_dev *dev, uint16_t queue_id,
 /* mlx5_socket.c */
 
 int mlx5_pmd_socket_init(void);
+void mlx5_pmd_socket_uninit(void);
 
 /* mlx5_flow_meter.c */
 
@@ -1298,6 +1299,7 @@ int mlx5_os_set_promisc(struct rte_eth_dev *dev, int enable);
 int mlx5_os_set_allmulti(struct rte_eth_dev *dev, int enable);
 int mlx5_os_set_nonblock_channel_fd(int fd);
 void mlx5_os_mac_addr_flush(struct rte_eth_dev *dev);
+void mlx5_os_net_cleanup(void);
 
 /* mlx5_txpp.c */
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.746918599 +0800
+++ 0176-net-mlx5-close-tools-socket-with-last-device.patch	2021-11-10 14:17:01.987411803 +0800
@@ -1 +1 @@
-From ea823b2c511d6e4a4e51fa5e4aabc30e5a30cdb7 Mon Sep 17 00:00:00 2001
+From 315ca5d5358aa3089510df129d0c7f144714c4ba Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ea823b2c511d6e4a4e51fa5e4aabc30e5a30cdb7 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
- drivers/net/mlx5/mlx5.c              |  6 ++++--
+ drivers/net/mlx5/mlx5.c              |  4 ++++
@@ -27,2 +29 @@
- drivers/net/mlx5/windows/mlx5_os.c   |  8 ++++++++
- 5 files changed, 26 insertions(+), 11 deletions(-)
+ 4 files changed, 18 insertions(+), 9 deletions(-)
@@ -31 +32 @@
-index 7de60ac3d7..0eff7930b4 100644
+index cc4fa3dd97..e4bb26bc2b 100644
@@ -34,2 +35,2 @@
-@@ -2666,6 +2666,15 @@ mlx5_os_net_probe(struct mlx5_common_device *cdev)
- 		return mlx5_os_auxiliary_probe(cdev);
+@@ -2463,6 +2463,15 @@ mlx5_os_open_device(const struct mlx5_dev_spawn_data *spawn,
+ 	return err;
@@ -51 +52 @@
-index 6356b66dc4..902b8ec934 100644
+index b1f41bc102..e60d1ec212 100644
@@ -54 +55 @@
-@@ -167,10 +167,7 @@ mlx5_pmd_interrupt_handler_uninstall(void)
+@@ -140,10 +140,7 @@ mlx5_pmd_interrupt_handler_uninstall(void)
@@ -66 +67 @@
-@@ -187,10 +184,6 @@ mlx5_pmd_socket_init(void)
+@@ -160,10 +157,6 @@ mlx5_pmd_socket_init(void)
@@ -77 +78 @@
-@@ -237,7 +230,8 @@ error:
+@@ -210,7 +203,8 @@ error:
@@ -88 +89 @@
-index 4a1b85b927..f827318fd0 100644
+index 48588d4cd5..ef1308ffc1 100644
@@ -91,2 +92,2 @@
-@@ -1363,9 +1363,11 @@ mlx5_free_shared_dev_ctx(struct mlx5_dev_ctx_shared *sh)
- 	}
+@@ -1079,6 +1079,10 @@ mlx5_free_shared_dev_ctx(struct mlx5_dev_ctx_shared *sh)
+ 	mlx5_mr_release_cache(&sh->share_cache);
@@ -95,2 +95,0 @@
--	/* Release flow workspaces objects on the last device. */
--	if (LIST_EMPTY(&mlx5_dev_ctx_list))
@@ -100 +98,0 @@
- 		mlx5_flow_os_release_workspace();
@@ -106 +104 @@
-index adef86d3ae..d8694d7a6b 100644
+index 3d6d5bb923..7e984f8438 100644
@@ -109 +107 @@
-@@ -1706,6 +1706,7 @@ int mlx5_mp_os_req_queue_control(struct rte_eth_dev *dev, uint16_t queue_id,
+@@ -1261,6 +1261,7 @@ int mlx5_mp_os_req_queue_control(struct rte_eth_dev *dev, uint16_t queue_id,
@@ -117 +115 @@
-@@ -1749,6 +1750,7 @@ int mlx5_os_set_promisc(struct rte_eth_dev *dev, int enable);
+@@ -1298,6 +1299,7 @@ int mlx5_os_set_promisc(struct rte_eth_dev *dev, int enable);
@@ -125,17 +122,0 @@
-diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c
-index 685babe0ae..fdf3b957c7 100644
---- a/drivers/net/mlx5/windows/mlx5_os.c
-+++ b/drivers/net/mlx5/windows/mlx5_os.c
-@@ -949,4 +949,12 @@ mlx5_os_net_probe(struct mlx5_common_device *cdev)
- 	return 0;
- }
- 
-+/**
-+ * Cleanup resources when the last device is closed.
-+ */
-+void
-+mlx5_os_net_cleanup(void)
-+{
-+}
-+
- const struct mlx5_flow_driver_ops mlx5_flow_verbs_drv_ops = {0};

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/virtio: fix check scatter on all Rx queues' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (175 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/mlx5: close tools socket with last device' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'vdpa/mlx5: workaround FW first completion in start' " Xueming Li
                   ` (75 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Zhihong Peng; +Cc: Luca Boccassi, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9e14b11f35b4c2c1bf699bcb3d10c47340132a1c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9e14b11f35b4c2c1bf699bcb3d10c47340132a1c Mon Sep 17 00:00:00 2001
From: Zhihong Peng <zhihongx.peng@intel.com>
Date: Fri, 8 Oct 2021 05:49:45 +0000
Subject: [PATCH] net/virtio: fix check scatter on all Rx queues
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 84cc857b5d9a344a1f04ec9f55417b58cd38e260 ]

This patch fixes the wrong way to obtain virtqueue.
The end of virtqueue cannot be judged based on whether
the array is NULL.

Fixes: 4e8169eb0d2d ("net/virtio: fix Rx scatter offload")

Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_ethdev.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index ed20b1427e..afa9fb591f 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -900,8 +900,11 @@ virtio_check_scatter_on_all_rx_queues(struct rte_eth_dev *dev,
 	if (hw->vqs == NULL)
 		return true;
 
-	for (qidx = 0; (vq = hw->vqs[2 * qidx + VTNET_SQ_RQ_QUEUE_IDX]) != NULL;
-	     qidx++) {
+	for (qidx = 0; qidx < hw->max_queue_pairs; qidx++) {
+		vq = hw->vqs[2 * qidx + VTNET_SQ_RQ_QUEUE_IDX];
+		if (vq == NULL)
+			continue;
+
 		rxvq = &vq->rxq;
 		if (rxvq->mpool == NULL)
 			continue;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.795391724 +0800
+++ 0177-net-virtio-fix-check-scatter-on-all-Rx-queues.patch	2021-11-10 14:17:01.990745109 +0800
@@ -1 +1 @@
-From 84cc857b5d9a344a1f04ec9f55417b58cd38e260 Mon Sep 17 00:00:00 2001
+From 9e14b11f35b4c2c1bf699bcb3d10c47340132a1c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 84cc857b5d9a344a1f04ec9f55417b58cd38e260 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 047d3f43a3..ddf0e26ab4 100644
+index ed20b1427e..afa9fb591f 100644
@@ -23 +25 @@
-@@ -882,8 +882,11 @@ virtio_check_scatter_on_all_rx_queues(struct rte_eth_dev *dev,
+@@ -900,8 +900,11 @@ virtio_check_scatter_on_all_rx_queues(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'vdpa/mlx5: workaround FW first completion in start' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (176 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/virtio: fix check scatter on all Rx queues' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'vdpa/mlx5: retry VAR allocation during vDPA restart' " Xueming Li
                   ` (74 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Xueming Li; +Cc: Luca Boccassi, Matan Azrad, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e1fe4bd76ff38a3b95dc5357b8675b4cdcb0f865

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e1fe4bd76ff38a3b95dc5357b8675b4cdcb0f865 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Fri, 15 Oct 2021 23:05:44 +0800
Subject: [PATCH] vdpa/mlx5: workaround FW first completion in start
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d38a53b175935066b7a7a9c1d632c5f92cea7f5d ]

After a vDPA application restart, Qemu restores VQ with used and
available index, new incoming packet triggers virtio driver to
handle buffers. Under heavy traffic, no available buffer for
firmware to receive new packets, no Rx interrupts generated,
driver is stuck on endless interrupt waiting.

As a firmware workaround, this patch sends a notification after
VQ setup to ask driver handling buffers and filling new buffers.

Fixes: bff735011078 ("vdpa/mlx5: prepare virtio queues")

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Matan Azrad <matan@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
index 472bda6c23..24a8705e24 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
@@ -4,6 +4,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <sys/mman.h>
+#include <sys/eventfd.h>
 
 #include <rte_malloc.h>
 #include <rte_errno.h>
@@ -364,6 +365,9 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index)
 		goto error;
 	}
 	virtq->stopped = false;
+	/* Initial notification to ask Qemu handling completed buffers. */
+	if (virtq->eqp.cq.callfd != -1)
+		eventfd_write(virtq->eqp.cq.callfd, (eventfd_t)1);
 	DRV_LOG(DEBUG, "vid %u virtq %u was created successfully.", priv->vid,
 		index);
 	return 0;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.838684968 +0800
+++ 0178-vdpa-mlx5-workaround-FW-first-completion-in-start.patch	2021-11-10 14:17:01.990745109 +0800
@@ -1 +1 @@
-From d38a53b175935066b7a7a9c1d632c5f92cea7f5d Mon Sep 17 00:00:00 2001
+From e1fe4bd76ff38a3b95dc5357b8675b4cdcb0f865 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d38a53b175935066b7a7a9c1d632c5f92cea7f5d ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index cfd50d92f5..c5b357a83b 100644
+index 472bda6c23..24a8705e24 100644
@@ -37 +39 @@
-@@ -367,6 +368,9 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index)
+@@ -364,6 +365,9 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'vdpa/mlx5: retry VAR allocation during vDPA restart' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (177 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'vdpa/mlx5: workaround FW first completion in start' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'vhost: add sanity check on inflight last index' " Xueming Li
                   ` (73 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Xueming Li; +Cc: Luca Boccassi, Matan Azrad, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5497fdbe2b4a9b452b42e7805b0ef7d8395ae86b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5497fdbe2b4a9b452b42e7805b0ef7d8395ae86b Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Fri, 15 Oct 2021 23:05:45 +0800
Subject: [PATCH] vdpa/mlx5: retry VAR allocation during vDPA restart
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8011a09adda4d99121bcc0fe34c98356559eb32f ]

VAR is the device memory space for the virtio queues doorbells,
Qemu could mmap it to directly to speed up doorbell push.

On a busy system, Qemu takes time to release VAR resources during driver
shutdown. If vdpa restarted quickly, the VAR allocation failed with
error 28 since the VAR is singleton resource per device.

This patch adds retry mechanism for VAR allocation.

Fixes: 4cae722c1b06 ("vdpa/mlx5: move virtual doorbell alloc to probe")

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Matan Azrad <matan@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
index 6029cfc3a8..38a93d041d 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
@@ -686,6 +686,7 @@ mlx5_vdpa_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	struct mlx5_vdpa_priv *priv = NULL;
 	struct ibv_context *ctx = NULL;
 	struct mlx5_hca_attr attr;
+	int retry;
 	int ret;
 
 	ibv = mlx5_vdpa_get_ib_device_match(&pci_dev->addr);
@@ -740,7 +741,14 @@ mlx5_vdpa_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 		priv->num_lag_ports = 1;
 	priv->ctx = ctx;
 	priv->pci_dev = pci_dev;
-	priv->var = mlx5_glue->dv_alloc_var(ctx, 0);
+	for (retry = 0; retry < 7; retry++) {
+		priv->var = mlx5_glue->dv_alloc_var(priv->ctx, 0);
+		if (priv->var != NULL)
+			break;
+		DRV_LOG(WARNING, "Failed to allocate VAR, retry %d.\n", retry);
+		/* Wait Qemu release VAR during vdpa restart, 0.1 sec based. */
+		usleep(100000U << retry);
+	}
 	if (!priv->var) {
 		DRV_LOG(ERR, "Failed to allocate VAR %u.\n", errno);
 		goto error;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.880726918 +0800
+++ 0179-vdpa-mlx5-retry-VAR-allocation-during-vDPA-restart.patch	2021-11-10 14:17:01.990745109 +0800
@@ -1 +1 @@
-From 8011a09adda4d99121bcc0fe34c98356559eb32f Mon Sep 17 00:00:00 2001
+From 5497fdbe2b4a9b452b42e7805b0ef7d8395ae86b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8011a09adda4d99121bcc0fe34c98356559eb32f ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 3971f2e335..9a6f64797b 100644
+index 6029cfc3a8..38a93d041d 100644
@@ -29,2 +31 @@
-@@ -506,6 +506,7 @@ mlx5_vdpa_dev_probe(struct mlx5_common_device *cdev)
- {
+@@ -686,6 +686,7 @@ mlx5_vdpa_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -32 +33,2 @@
- 	struct mlx5_hca_attr *attr = &cdev->config.hca_attr;
+ 	struct ibv_context *ctx = NULL;
+ 	struct mlx5_hca_attr attr;
@@ -33,0 +36 @@
+ 	int ret;
@@ -35,4 +38,2 @@
- 	if (!attr->vdpa.valid || !attr->vdpa.max_num_virtio_queues) {
- 		DRV_LOG(ERR, "Not enough capabilities to support vdpa, maybe "
-@@ -530,7 +531,14 @@ mlx5_vdpa_dev_probe(struct mlx5_common_device *cdev)
- 	if (attr->num_lag_ports == 0)
+ 	ibv = mlx5_vdpa_get_ib_device_match(&pci_dev->addr);
+@@ -740,7 +741,14 @@ mlx5_vdpa_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -40,2 +41,3 @@
- 	priv->cdev = cdev;
--	priv->var = mlx5_glue->dv_alloc_var(priv->cdev->ctx, 0);
+ 	priv->ctx = ctx;
+ 	priv->pci_dev = pci_dev;
+-	priv->var = mlx5_glue->dv_alloc_var(ctx, 0);
@@ -43 +45 @@
-+		priv->var = mlx5_glue->dv_alloc_var(priv->cdev->ctx, 0);
++		priv->var = mlx5_glue->dv_alloc_var(priv->ctx, 0);
@@ -51 +53 @@
- 		DRV_LOG(ERR, "Failed to allocate VAR %u.", errno);
+ 		DRV_LOG(ERR, "Failed to allocate VAR %u.\n", errno);

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'vhost: add sanity check on inflight last index' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (178 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'vdpa/mlx5: retry VAR allocation during vDPA restart' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10 10:54   ` Li Feng
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/virtio: fix indirect descriptor reconnection' " Xueming Li
                   ` (72 subsequent siblings)
  252 siblings, 1 reply; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Li Feng; +Cc: Luca Boccassi, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/022ab64a482d3e7a8627446d4acd52cfd084dd7d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 022ab64a482d3e7a8627446d4acd52cfd084dd7d Mon Sep 17 00:00:00 2001
From: Li Feng <fengli@smartx.com>
Date: Thu, 14 Oct 2021 20:40:08 +0800
Subject: [PATCH] vhost: add sanity check on inflight last index
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5a4fbe79e6d124141bd0a820c897287b15c559c4 ]

The index in rte_vhost_set_last_inflight_io_split is from
the frontend driver, check if it's in the virtqueue range.

Fixes: bb0c2de9602b ("vhost: add APIs to operate inflight ring")

Signed-off-by: Li Feng <fengli@smartx.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index b97dcf6b69..1a7c240492 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -1191,6 +1191,9 @@ rte_vhost_set_last_inflight_io_split(int vid, uint16_t vring_idx,
 	if (unlikely(!vq->inflight_split))
 		return -1;
 
+	if (unlikely(idx >= vq->size))
+		return -1;
+
 	vq->inflight_split->last_inflight_io = idx;
 	return 0;
 }
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.922847297 +0800
+++ 0180-vhost-add-sanity-check-on-inflight-last-index.patch	2021-11-10 14:17:01.990745109 +0800
@@ -1 +1 @@
-From 5a4fbe79e6d124141bd0a820c897287b15c559c4 Mon Sep 17 00:00:00 2001
+From 022ab64a482d3e7a8627446d4acd52cfd084dd7d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5a4fbe79e6d124141bd0a820c897287b15c559c4 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -15 +17 @@
- lib/vhost/vhost.c | 3 +++
+ lib/librte_vhost/vhost.c | 3 +++
@@ -18,5 +20,5 @@
-diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c
-index 9540522dac..3b674ac320 100644
---- a/lib/vhost/vhost.c
-+++ b/lib/vhost/vhost.c
-@@ -1226,6 +1226,9 @@ rte_vhost_set_last_inflight_io_split(int vid, uint16_t vring_idx,
+diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
+index b97dcf6b69..1a7c240492 100644
+--- a/lib/librte_vhost/vhost.c
++++ b/lib/librte_vhost/vhost.c
+@@ -1191,6 +1191,9 @@ rte_vhost_set_last_inflight_io_split(int vid, uint16_t vring_idx,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/virtio: fix indirect descriptor reconnection' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (179 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'vhost: add sanity check on inflight last index' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/virtio: fix avail descriptor ID' " Xueming Li
                   ` (71 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Xuan Ding; +Cc: Luca Boccassi, Yinan Wang, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d74c2896ad6d7fea73e3251bbabccd47c941ff42

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d74c2896ad6d7fea73e3251bbabccd47c941ff42 Mon Sep 17 00:00:00 2001
From: Xuan Ding <xuan.ding@intel.com>
Date: Wed, 13 Oct 2021 01:36:40 +0000
Subject: [PATCH] net/virtio: fix indirect descriptor reconnection
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 04bcc80204db16ca77d1dd11a6ea1773214cc755 ]

Add initialization for packed ring indirect descriptors
in reconnection path.

Fixes: 381f39ebb78a ("net/virtio: fix packed ring indirect descricptors
setup")

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtqueue.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c
index 2702e120ee..67eeb3701d 100644
--- a/drivers/net/virtio/virtqueue.c
+++ b/drivers/net/virtio/virtqueue.c
@@ -186,6 +186,8 @@ virtqueue_txvq_reset_packed(struct virtqueue *vq)
 	struct vq_desc_extra *dxp;
 	struct virtnet_tx *txvq;
 	uint16_t desc_idx;
+	struct virtio_tx_region *txr;
+	struct vring_packed_desc *start_dp;
 
 	vq->vq_used_cons_idx = 0;
 	vq->vq_desc_head_idx = 0;
@@ -198,6 +200,7 @@ virtqueue_txvq_reset_packed(struct virtqueue *vq)
 	vq->vq_packed.event_flags_shadow = 0;
 
 	txvq = &vq->txq;
+	txr = txvq->virtio_net_hdr_mz->addr;
 	memset(txvq->mz->addr, 0, txvq->mz->len);
 	memset(txvq->virtio_net_hdr_mz->addr, 0,
 		txvq->virtio_net_hdr_mz->len);
@@ -208,6 +211,17 @@ virtqueue_txvq_reset_packed(struct virtqueue *vq)
 			rte_pktmbuf_free(dxp->cookie);
 			dxp->cookie = NULL;
 		}
+
+		if (vtpci_with_feature(vq->hw, VIRTIO_RING_F_INDIRECT_DESC)) {
+			/* first indirect descriptor is always the tx header */
+			start_dp = txr[desc_idx].tx_packed_indir;
+			vring_desc_init_indirect_packed(start_dp,
+							RTE_DIM(txr[desc_idx].tx_packed_indir));
+			start_dp->addr = txvq->virtio_net_hdr_mem
+					 + desc_idx * sizeof(*txr)
+					 + offsetof(struct virtio_tx_region, tx_hdr);
+			start_dp->len = vq->hw->vtnet_hdr_size;
+		}
 	}
 
 	vring_desc_init_packed(vq, size);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.965434773 +0800
+++ 0181-net-virtio-fix-indirect-descriptor-reconnection.patch	2021-11-10 14:17:01.990745109 +0800
@@ -1 +1 @@
-From 04bcc80204db16ca77d1dd11a6ea1773214cc755 Mon Sep 17 00:00:00 2001
+From d74c2896ad6d7fea73e3251bbabccd47c941ff42 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 04bcc80204db16ca77d1dd11a6ea1773214cc755 ]
@@ -9,2 +12,2 @@
-Fixes: 381f39ebb78a ("net/virtio: fix packed ring indirect descricptors setup")
-Cc: stable@dpdk.org
+Fixes: 381f39ebb78a ("net/virtio: fix packed ring indirect descricptors
+setup")
@@ -20 +23 @@
-index 1f9af3c31b..65bf792eb0 100644
+index 2702e120ee..67eeb3701d 100644
@@ -45 +48 @@
-+		if (virtio_with_feature(vq->hw, VIRTIO_RING_F_INDIRECT_DESC)) {
++		if (vtpci_with_feature(vq->hw, VIRTIO_RING_F_INDIRECT_DESC)) {

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/virtio: fix avail descriptor ID' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (180 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/virtio: fix indirect descriptor reconnection' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'ethdev: fix PCI device release in secondary process' " Xueming Li
                   ` (70 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Xuan Ding; +Cc: Luca Boccassi, Yong Liu, Miao Li, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/96a4bd11ebd659a4ba78a3b724fa8793b59d679c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 96a4bd11ebd659a4ba78a3b724fa8793b59d679c Mon Sep 17 00:00:00 2001
From: Xuan Ding <xuan.ding@intel.com>
Date: Thu, 21 Oct 2021 14:25:40 +0000
Subject: [PATCH] net/virtio: fix avail descriptor ID
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ad6f01945a75dbdcacf26579d1bdf07d1f4b1e3d ]

Vhost will update desc’s Buffer ID advance to next used descriptor when
VIRTIO_F_IN_ORDER feature negotiated. When virtio reuses the descriptor,
the Buffer ID should be restored even VIRTQ_DESC_F_INDIRECT
feature negotiated.

Fixes: b473061b0e1d ("net/virtio: fix indirect descriptors in packed datapaths")

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Signed-off-by: Yong Liu <yong.liu@intel.com>
Signed-off-by: Miao Li <miao.li@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtqueue.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
index c169518ec8..b812c28829 100644
--- a/drivers/net/virtio/virtqueue.h
+++ b/drivers/net/virtio/virtqueue.h
@@ -735,6 +735,9 @@ virtqueue_enqueue_xmit_packed(struct virtnet_tx *txvq, struct rte_mbuf *cookie,
 			RTE_PTR_DIFF(&txr[idx].tx_packed_indir, txr);
 		start_dp[idx].len   = (seg_num + 1) *
 			sizeof(struct vring_packed_desc);
+		/* Packed descriptor id needs to be restored when inorder. */
+		if (in_order)
+			start_dp[idx].id = idx;
 		/* reset flags for indirect desc */
 		head_flags = VRING_DESC_F_INDIRECT;
 		head_flags |= vq->vq_packed.cached_flags;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.006482310 +0800
+++ 0182-net-virtio-fix-avail-descriptor-ID.patch	2021-11-10 14:17:01.990745109 +0800
@@ -1 +1 @@
-From ad6f01945a75dbdcacf26579d1bdf07d1f4b1e3d Mon Sep 17 00:00:00 2001
+From 96a4bd11ebd659a4ba78a3b724fa8793b59d679c Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ad6f01945a75dbdcacf26579d1bdf07d1f4b1e3d ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 4182939272..4f3dd31c10 100644
+index c169518ec8..b812c28829 100644
@@ -29 +31 @@
-@@ -732,6 +732,9 @@ virtqueue_enqueue_xmit_packed(struct virtnet_tx *txvq, struct rte_mbuf *cookie,
+@@ -735,6 +735,9 @@ virtqueue_enqueue_xmit_packed(struct virtnet_tx *txvq, struct rte_mbuf *cookie,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'ethdev: fix PCI device release in secondary process' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (181 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/virtio: fix avail descriptor ID' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'app/testpmd: fix packet burst spreading stats' " Xueming Li
                   ` (69 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/89980fc3cec1259a81bd3c3fb53624b24fa26046

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 89980fc3cec1259a81bd3c3fb53624b24fa26046 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 21 Oct 2021 10:24:21 +0800
Subject: [PATCH] ethdev: fix PCI device release in secondary process
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 17faaed85449b58b209150906d2ad2cbfd853150 ]

In secondary process, rte_eth_dev_close() doesn't clear eth_dev->data.
If calling rte_dev_remove() after rte_eth_dev_close(), in
rte_eth_dev_pci_generic_remove() function, the released eth device still
can be found by its name in shared memory. As a result, the eth device
will be released repeatedly. The state of the eth device is modified to
RTE_ETH_DEV_UNUSED after rte_eth_dev_close(). So this state can be used
to avoid this problem.

Fixes: dcd5c8112bc3 ("ethdev: add PCI driver helpers")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_ethdev/rte_ethdev_pci.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h
index bf715896ae..0eba781917 100644
--- a/lib/librte_ethdev/rte_ethdev_pci.h
+++ b/lib/librte_ethdev/rte_ethdev_pci.h
@@ -151,6 +151,16 @@ rte_eth_dev_pci_generic_remove(struct rte_pci_device *pci_dev,
 	if (!eth_dev)
 		return 0;
 
+	/*
+	 * 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 &&
+	    eth_dev->state == RTE_ETH_DEV_UNUSED)
+		return 0;
+
 	if (dev_uninit) {
 		ret = dev_uninit(eth_dev);
 		if (ret)
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.048414506 +0800
+++ 0183-ethdev-fix-PCI-device-release-in-secondary-process.patch	2021-11-10 14:17:01.990745109 +0800
@@ -1 +1 @@
-From 17faaed85449b58b209150906d2ad2cbfd853150 Mon Sep 17 00:00:00 2001
+From 89980fc3cec1259a81bd3c3fb53624b24fa26046 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 17faaed85449b58b209150906d2ad2cbfd853150 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
- lib/ethdev/ethdev_pci.h | 10 ++++++++++
+ lib/librte_ethdev/rte_ethdev_pci.h | 10 ++++++++++
@@ -23,4 +25,4 @@
-diff --git a/lib/ethdev/ethdev_pci.h b/lib/ethdev/ethdev_pci.h
-index 12015b6b87..59c5d7b40f 100644
---- a/lib/ethdev/ethdev_pci.h
-+++ b/lib/ethdev/ethdev_pci.h
+diff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h
+index bf715896ae..0eba781917 100644
+--- a/lib/librte_ethdev/rte_ethdev_pci.h
++++ b/lib/librte_ethdev/rte_ethdev_pci.h

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix packet burst spreading stats' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (182 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'ethdev: fix PCI device release in secondary process' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'test/event: fix timer adapter creation test' " Xueming Li
                   ` (68 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Eli Britstein; +Cc: Luca Boccassi, Matan Azrad, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/034da63e88bba2e1e765cb7ba2107a53213ca27c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 034da63e88bba2e1e765cb7ba2107a53213ca27c Mon Sep 17 00:00:00 2001
From: Eli Britstein <elibr@nvidia.com>
Date: Thu, 21 Oct 2021 16:20:02 +0300
Subject: [PATCH] app/testpmd: fix packet burst spreading stats
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6a8b64fd5e9e8f5572ea4d9de40a1cff23498246 ]

RX/TX functions (rte_eth_rx_burst/rte_eth_tx_burst) get 'nb_pkts'
argument, which specifies the maximum number to receive/transmit.
It can be 0..nb_pkts, meaning nb_pkts+1 options.
Testpmd can provide statistics of the burst sizes ('set
record-burst-stats on') by incrementing an array cell of index
<burst-size>. This array is mistakenly [MAX_PKT_BURST] size. Receiving
the maximum burst will cause out of bound write.
Enlarge the spread stats array by one cell to fix it.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Eli Britstein <elibr@nvidia.com>
Reviewed-by: Matan Azrad <matan@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/testpmd.c | 2 +-
 app/test-pmd/testpmd.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 466df37a2a..35a48e39cc 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1709,7 +1709,7 @@ pkt_burst_stats_display(const char *rx_tx, struct pkt_burst_stats *pbs)
 	pktnb_stats[0] = 0;
 
 	/* Find the next 2 burst sizes with highest occurrences. */
-	for (nb_pkt = 1; nb_pkt < MAX_PKT_BURST; nb_pkt++) {
+	for (nb_pkt = 1; nb_pkt < MAX_PKT_BURST + 1; nb_pkt++) {
 		nb_burst = pbs->pkt_burst_spread[nb_pkt];
 
 		if (nb_burst == 0)
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index b54958165a..43e49a8069 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -92,7 +92,7 @@ enum {
  * that are recorded for each forwarding stream.
  */
 struct pkt_burst_stats {
-	unsigned int pkt_burst_spread[MAX_PKT_BURST];
+	unsigned int pkt_burst_spread[MAX_PKT_BURST + 1];
 };
 
 /** Information for a given RSS type. */
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.089725948 +0800
+++ 0184-app-testpmd-fix-packet-burst-spreading-stats.patch	2021-11-10 14:17:01.994078415 +0800
@@ -1 +1 @@
-From 6a8b64fd5e9e8f5572ea4d9de40a1cff23498246 Mon Sep 17 00:00:00 2001
+From 034da63e88bba2e1e765cb7ba2107a53213ca27c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6a8b64fd5e9e8f5572ea4d9de40a1cff23498246 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 6d5bbc8240..2b835a27bc 100644
+index 466df37a2a..35a48e39cc 100644
@@ -30 +32 @@
-@@ -1879,7 +1879,7 @@ pkt_burst_stats_display(const char *rx_tx, struct pkt_burst_stats *pbs)
+@@ -1709,7 +1709,7 @@ pkt_burst_stats_display(const char *rx_tx, struct pkt_burst_stats *pbs)
@@ -40 +42 @@
-index bf3669134a..071e4e7d63 100644
+index b54958165a..43e49a8069 100644
@@ -43 +45 @@
-@@ -96,7 +96,7 @@ enum {
+@@ -92,7 +92,7 @@ enum {

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'test/event: fix timer adapter creation test' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (183 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'app/testpmd: fix packet burst spreading stats' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'pipeline: fix instruction label check' " Xueming Li
                   ` (67 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Shijith Thotton; +Cc: Luca Boccassi, Erik Gabriel Carrillo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9983e3af9d51b0e919466ff918560229b509f9cc

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9983e3af9d51b0e919466ff918560229b509f9cc Mon Sep 17 00:00:00 2001
From: Shijith Thotton <sthotton@marvell.com>
Date: Tue, 31 Aug 2021 01:42:59 +0530
Subject: [PATCH] test/event: fix timer adapter creation test
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e6cb7e70dfc58f21739fc67d91d1af49266e0b71 ]

Removed freeing of unallocated mempool in event timer adapter create
unit test.

Fixes: d1f3385d0076 ("test: add event timer adapter auto-test")

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
 app/test/test_event_timer_adapter.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/app/test/test_event_timer_adapter.c b/app/test/test_event_timer_adapter.c
index b536ddef40..efd86cad58 100644
--- a/app/test/test_event_timer_adapter.c
+++ b/app/test/test_event_timer_adapter.c
@@ -966,8 +966,6 @@ adapter_create(void)
 	TEST_ASSERT_SUCCESS(rte_event_timer_adapter_free(adapter),
 			"Failed to free adapter");
 
-	rte_mempool_free(eventdev_test_mempool);
-
 	return TEST_SUCCESS;
 }
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.134752350 +0800
+++ 0185-test-event-fix-timer-adapter-creation-test.patch	2021-11-10 14:17:01.994078415 +0800
@@ -1 +1 @@
-From e6cb7e70dfc58f21739fc67d91d1af49266e0b71 Mon Sep 17 00:00:00 2001
+From 9983e3af9d51b0e919466ff918560229b509f9cc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e6cb7e70dfc58f21739fc67d91d1af49266e0b71 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 121c2d93e8..12c00e678e 100644
+index b536ddef40..efd86cad58 100644
@@ -22 +24 @@
-@@ -1070,8 +1070,6 @@ adapter_create(void)
+@@ -966,8 +966,6 @@ adapter_create(void)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'pipeline: fix instruction label check' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (184 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'test/event: fix timer adapter creation test' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'usertools/pmdinfo: fix plugin auto scan' " Xueming Li
                   ` (66 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Yogesh Jangra; +Cc: Luca Boccassi, Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/073e6a7c0094bc6d706fb1890343b4fb20f30cf9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 073e6a7c0094bc6d706fb1890343b4fb20f30cf9 Mon Sep 17 00:00:00 2001
From: Yogesh Jangra <yogesh.jangra@intel.com>
Date: Wed, 20 Oct 2021 23:23:32 -0400
Subject: [PATCH] pipeline: fix instruction label check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 55095ccb7fdda113186e3191760a5cf0b0e8d28d ]

The instruction_data array was incorrectly indexed, which resulted in
the array index getting out of bounds and sometimes segfault.

Fixes: a1711f (“pipeline: add SWX Rx and extract instructions“)

Signed-off-by: Yogesh Jangra <yogesh.jangra@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 lib/librte_pipeline/rte_swx_pipeline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_pipeline/rte_swx_pipeline.c b/lib/librte_pipeline/rte_swx_pipeline.c
index e4fbf1b1be..4a96b77e28 100644
--- a/lib/librte_pipeline/rte_swx_pipeline.c
+++ b/lib/librte_pipeline/rte_swx_pipeline.c
@@ -5915,7 +5915,7 @@ instr_label_check(struct instruction_data *instruction_data,
 			continue;
 
 		for (j = i + 1; j < n_instructions; j++)
-			CHECK(strcmp(label, data[j].label), EINVAL);
+			CHECK(strcmp(label, instruction_data[j].label), EINVAL);
 	}
 
 	/* Get users for each instruction label. */
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.177275009 +0800
+++ 0186-pipeline-fix-instruction-label-check.patch	2021-11-10 14:17:01.997411721 +0800
@@ -1 +1 @@
-From 55095ccb7fdda113186e3191760a5cf0b0e8d28d Mon Sep 17 00:00:00 2001
+From 073e6a7c0094bc6d706fb1890343b4fb20f30cf9 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 55095ccb7fdda113186e3191760a5cf0b0e8d28d ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
- lib/pipeline/rte_swx_pipeline.c | 2 +-
+ lib/librte_pipeline/rte_swx_pipeline.c | 2 +-
@@ -21,5 +23,5 @@
-diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c
-index 1cd09a4b44..055056098d 100644
---- a/lib/pipeline/rte_swx_pipeline.c
-+++ b/lib/pipeline/rte_swx_pipeline.c
-@@ -5983,7 +5983,7 @@ instr_label_check(struct instruction_data *instruction_data,
+diff --git a/lib/librte_pipeline/rte_swx_pipeline.c b/lib/librte_pipeline/rte_swx_pipeline.c
+index e4fbf1b1be..4a96b77e28 100644
+--- a/lib/librte_pipeline/rte_swx_pipeline.c
++++ b/lib/librte_pipeline/rte_swx_pipeline.c
+@@ -5915,7 +5915,7 @@ instr_label_check(struct instruction_data *instruction_data,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'usertools/pmdinfo: fix plugin auto scan' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (185 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'pipeline: fix instruction label check' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'doc: fix default mempool option in guides' " Xueming Li
                   ` (65 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Robin Jarry, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5c18947b9eae7f2b7b95a587e469cad0d9e76faf

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5c18947b9eae7f2b7b95a587e469cad0d9e76faf Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 19 Oct 2021 14:52:30 +0200
Subject: [PATCH] usertools/pmdinfo: fix plugin auto scan
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4976250ea89a26122bb412f55fb10425c79e7da1 ]

Migration to argparse was incomplete.

$ dpdk-pmdinfo.py -p $(which dpdk-testpmd)
Traceback (most recent call last):
  File "/usr/bin/dpdk-pmdinfo.py", line 626, in <module>
    main()
  File "/usr/bin/dpdk-pmdinfo.py", line 596, in main
    exit(scan_for_autoload_pmds(args[0]))
TypeError: 'Namespace' object does not support indexing

Fixes: 81255f27c65c ("usertools: replace optparse with argparse")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Robin Jarry <robin.jarry@6wind.com>
---
 usertools/dpdk-pmdinfo.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py
index 3381aa616c..40ef5cec6c 100755
--- a/usertools/dpdk-pmdinfo.py
+++ b/usertools/dpdk-pmdinfo.py
@@ -593,7 +593,7 @@ def main(stream=None):
             exit(1)
 
     if args.pdir:
-        exit(scan_for_autoload_pmds(args[0]))
+        exit(scan_for_autoload_pmds(args.elf_file))
 
     ldlibpath = os.environ.get('LD_LIBRARY_PATH')
     if ldlibpath is None:
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.225844716 +0800
+++ 0187-usertools-pmdinfo-fix-plugin-auto-scan.patch	2021-11-10 14:17:01.997411721 +0800
@@ -1 +1 @@
-From 4976250ea89a26122bb412f55fb10425c79e7da1 Mon Sep 17 00:00:00 2001
+From 5c18947b9eae7f2b7b95a587e469cad0d9e76faf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4976250ea89a26122bb412f55fb10425c79e7da1 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'doc: fix default mempool option in guides' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (186 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'usertools/pmdinfo: fix plugin auto scan' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net: avoid cast-align warning in VLAN insert function' " Xueming Li
                   ` (64 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/53216fab00117bda888eb40538c8e90d66d104a2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 53216fab00117bda888eb40538c8e90d66d104a2 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 15 Oct 2021 10:39:41 +0200
Subject: [PATCH] doc: fix default mempool option in guides
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 65c2bbf41f2258fea8e1639a86598f48d8251756 ]

This option should be prefixed with -- for consistency with others.

Fixes: a103a97e7191 ("eal: allow user to override default mempool driver")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
---
 doc/guides/freebsd_gsg/build_sample_apps.rst | 2 +-
 doc/guides/linux_gsg/build_sample_apps.rst   | 2 +-
 doc/guides/linux_gsg/eal_args.include.rst    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/guides/freebsd_gsg/build_sample_apps.rst b/doc/guides/freebsd_gsg/build_sample_apps.rst
index 4fba671e4f..c87e982759 100644
--- a/doc/guides/freebsd_gsg/build_sample_apps.rst
+++ b/doc/guides/freebsd_gsg/build_sample_apps.rst
@@ -88,7 +88,7 @@ Other options, specific to Linux and are not supported under FreeBSD are as foll
 *   ``--huge-dir``:
     The directory where hugetlbfs is mounted.
 
-*   ``mbuf-pool-ops-name``:
+*   ``--mbuf-pool-ops-name``:
     Pool ops name for mbuf to use.
 
 *   ``--file-prefix``:
diff --git a/doc/guides/linux_gsg/build_sample_apps.rst b/doc/guides/linux_gsg/build_sample_apps.rst
index 78652549a7..396fcf08d7 100644
--- a/doc/guides/linux_gsg/build_sample_apps.rst
+++ b/doc/guides/linux_gsg/build_sample_apps.rst
@@ -82,7 +82,7 @@ The EAL options are as follows:
 * ``--huge-dir``:
   The directory where hugetlbfs is mounted.
 
-* ``mbuf-pool-ops-name``:
+* ``--mbuf-pool-ops-name``:
   Pool ops name for mbuf to use.
 
 * ``--file-prefix``:
diff --git a/doc/guides/linux_gsg/eal_args.include.rst b/doc/guides/linux_gsg/eal_args.include.rst
index 96baa4a9b0..3549a0cf56 100644
--- a/doc/guides/linux_gsg/eal_args.include.rst
+++ b/doc/guides/linux_gsg/eal_args.include.rst
@@ -199,7 +199,7 @@ Other options
 
     Display the version information on startup.
 
-*   ``mbuf-pool-ops-name``:
+*   ``--mbuf-pool-ops-name``:
 
     Pool ops name for mbuf to use.
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.268061377 +0800
+++ 0188-doc-fix-default-mempool-option-in-guides.patch	2021-11-10 14:17:02.000745027 +0800
@@ -1 +1 @@
-From 65c2bbf41f2258fea8e1639a86598f48d8251756 Mon Sep 17 00:00:00 2001
+From 53216fab00117bda888eb40538c8e90d66d104a2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 65c2bbf41f2258fea8e1639a86598f48d8251756 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -33 +35 @@
-index 709b301427..efd2dd23f1 100644
+index 78652549a7..396fcf08d7 100644

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net: avoid cast-align warning in VLAN insert function' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (187 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'doc: fix default mempool option in guides' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'mbuf: avoid cast-align warning in data offset macro' " Xueming Li
                   ` (63 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Eli Britstein; +Cc: Luca Boccassi, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7f401592f5b617e40a2e858556f9528855954657

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7f401592f5b617e40a2e858556f9528855954657 Mon Sep 17 00:00:00 2001
From: Eli Britstein <elibr@nvidia.com>
Date: Thu, 21 Oct 2021 11:51:30 +0300
Subject: [PATCH] net: avoid cast-align warning in VLAN insert function
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a3f8d05871887d257703f6f073da002b6c568519 ]

In rte_vlan_insert there is a casting of rte_pktmbuf_prepend returned
value to (struct rte_ether_hdr *), which causes cast-align warning when
using strict cast align flag with supporting gcc:
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
CFLAGS="-Wcast-align=strict" make V=1 -C examples/l2fwd clean static

In file included from main.c:35:
/dpdk/build/include/rte_ether.h:370:7: warning: cast increases required
alignment of target type [-Wcast-align]
  370 |  nh = (struct rte_ether_hdr *)
      |       ^

As the code assumes correct alignment, add first a (void *) casting, to
avoid the warning.

Fixes: c974021a5949 ("ether: add soft vlan encap/decap")

Signed-off-by: Eli Britstein <elibr@nvidia.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_net/rte_ether.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_net/rte_ether.h b/lib/librte_net/rte_ether.h
index 060b63fc9b..0baceb2c4a 100644
--- a/lib/librte_net/rte_ether.h
+++ b/lib/librte_net/rte_ether.h
@@ -358,7 +358,7 @@ static inline int rte_vlan_insert(struct rte_mbuf **m)
 		return -EINVAL;
 
 	oh = rte_pktmbuf_mtod(*m, struct rte_ether_hdr *);
-	nh = (struct rte_ether_hdr *)
+	nh = (struct rte_ether_hdr *)(void *)
 		rte_pktmbuf_prepend(*m, sizeof(struct rte_vlan_hdr));
 	if (nh == NULL)
 		return -ENOSPC;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.310208257 +0800
+++ 0189-net-avoid-cast-align-warning-in-VLAN-insert-function.patch	2021-11-10 14:17:02.000745027 +0800
@@ -1 +1 @@
-From a3f8d05871887d257703f6f073da002b6c568519 Mon Sep 17 00:00:00 2001
+From 7f401592f5b617e40a2e858556f9528855954657 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a3f8d05871887d257703f6f073da002b6c568519 ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
- lib/net/rte_ether.h | 2 +-
+ lib/librte_net/rte_ether.h | 2 +-
@@ -30,5 +32,5 @@
-diff --git a/lib/net/rte_ether.h b/lib/net/rte_ether.h
-index 2c7da55b6b..1a0dbf0d60 100644
---- a/lib/net/rte_ether.h
-+++ b/lib/net/rte_ether.h
-@@ -367,7 +367,7 @@ static inline int rte_vlan_insert(struct rte_mbuf **m)
+diff --git a/lib/librte_net/rte_ether.h b/lib/librte_net/rte_ether.h
+index 060b63fc9b..0baceb2c4a 100644
+--- a/lib/librte_net/rte_ether.h
++++ b/lib/librte_net/rte_ether.h
+@@ -358,7 +358,7 @@ static inline int rte_vlan_insert(struct rte_mbuf **m)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'mbuf: avoid cast-align warning in data offset macro' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (188 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net: avoid cast-align warning in VLAN insert function' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'eal/x86: avoid cast-align warning in memcpy functions' " Xueming Li
                   ` (62 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Eli Britstein; +Cc: Luca Boccassi, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/96b6eaffb8c6086988726995aacbb5246a661cec

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 96b6eaffb8c6086988726995aacbb5246a661cec Mon Sep 17 00:00:00 2001
From: Eli Britstein <elibr@nvidia.com>
Date: Thu, 21 Oct 2021 11:51:31 +0300
Subject: [PATCH] mbuf: avoid cast-align warning in data offset macro
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit da0333c8790b365c6aa8665888a20253c4166bfe ]

In rte_pktmbuf_mtod_offset macro, there is a casting from char * to type
't', which may cause cast-align warning when using strict cast align
flag with supporting gcc:
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
CFLAGS="-Wcast-align=strict" make V=1 -C examples/l2fwd clean static

main.c: In function 'l2fwd_mac_updating':
/dpdk/build/include/rte_mbuf_core.h:719:3: warning: cast increases
required alignment of target type [-Wcast-align]
  719 |  ((t)((char *)(m)->buf_addr + (m)->data_off + (o)))
      |   ^
/dpdk/build/include/rte_mbuf_core.h:733:32: note: in expansion of macro
'rte_pktmbuf_mtod_offset'
  733 | #define rte_pktmbuf_mtod(m, t) rte_pktmbuf_mtod_offset(m, t, 0)
      |                                ^~~~~~~~~~~~~~~~~~~~~~~

As the code assumes correct alignment, add first a (void *) casting, to
avoid the warning.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Eli Britstein <elibr@nvidia.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mbuf/rte_mbuf_core.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h
index c26492cf45..93a58d8cd7 100644
--- a/lib/librte_mbuf/rte_mbuf_core.h
+++ b/lib/librte_mbuf/rte_mbuf_core.h
@@ -719,7 +719,7 @@ struct rte_mbuf_ext_shared_info {
  *   The type to cast the result into.
  */
 #define rte_pktmbuf_mtod_offset(m, t, o)	\
-	((t)((char *)(m)->buf_addr + (m)->data_off + (o)))
+	((t)(void *)((char *)(m)->buf_addr + (m)->data_off + (o)))
 
 /**
  * A macro that points to the start of the data in the mbuf.
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.351487051 +0800
+++ 0190-mbuf-avoid-cast-align-warning-in-data-offset-macro.patch	2021-11-10 14:17:02.000745027 +0800
@@ -1 +1 @@
-From da0333c8790b365c6aa8665888a20253c4166bfe Mon Sep 17 00:00:00 2001
+From 96b6eaffb8c6086988726995aacbb5246a661cec Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit da0333c8790b365c6aa8665888a20253c4166bfe ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org
@@ -31 +33 @@
- lib/mbuf/rte_mbuf_core.h | 2 +-
+ lib/librte_mbuf/rte_mbuf_core.h | 2 +-
@@ -34,5 +36,5 @@
-diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h
-index 117a72a134..321a419c71 100644
---- a/lib/mbuf/rte_mbuf_core.h
-+++ b/lib/mbuf/rte_mbuf_core.h
-@@ -823,7 +823,7 @@ struct rte_mbuf_ext_shared_info {
+diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h
+index c26492cf45..93a58d8cd7 100644
+--- a/lib/librte_mbuf/rte_mbuf_core.h
++++ b/lib/librte_mbuf/rte_mbuf_core.h
+@@ -719,7 +719,7 @@ struct rte_mbuf_ext_shared_info {

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'eal/x86: avoid cast-align warning in memcpy functions' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (189 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'mbuf: avoid cast-align warning in data offset macro' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'eal: reset lcore task callback and argument' " Xueming Li
                   ` (61 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Eli Britstein; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/67b3975bee2274fa273eb0a0ae5dd757eb85198b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 67b3975bee2274fa273eb0a0ae5dd757eb85198b Mon Sep 17 00:00:00 2001
From: Eli Britstein <elibr@nvidia.com>
Date: Thu, 21 Oct 2021 11:51:32 +0300
Subject: [PATCH] eal/x86: avoid cast-align warning in memcpy functions
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6de430b7079e8f7c29f9c18869393f74f8dffcb6 ]

Functions and macros in x86 rte_memcpy.h may cause cast-align warnings,
when using strict cast align flag with supporting gcc:
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
CFLAGS="-Wcast-align=strict" make V=1 -C examples/l2fwd clean static

For example:
In file included from main.c:24:
/dpdk/build/include/rte_memcpy.h: In function 'rte_mov16':
/dpdk/build/include/rte_memcpy.h:306:25: warning: cast increases
required alignment of target type [-Wcast-align]
  306 |  xmm0 = _mm_loadu_si128((const __m128i *)src);
      |                         ^

As the code assumes correct alignment, add first a (void *) or (const
void *) castings, to avoid the warnings.

Fixes: 9484092baad3 ("eal/x86: optimize memcpy for AVX512 platforms")

Signed-off-by: Eli Britstein <elibr@nvidia.com>
---
 lib/librte_eal/x86/include/rte_memcpy.h | 80 ++++++++++++++-----------
 1 file changed, 44 insertions(+), 36 deletions(-)

diff --git a/lib/librte_eal/x86/include/rte_memcpy.h b/lib/librte_eal/x86/include/rte_memcpy.h
index 79f381dd9b..1b6c6e585f 100644
--- a/lib/librte_eal/x86/include/rte_memcpy.h
+++ b/lib/librte_eal/x86/include/rte_memcpy.h
@@ -303,8 +303,8 @@ rte_mov16(uint8_t *dst, const uint8_t *src)
 {
 	__m128i xmm0;
 
-	xmm0 = _mm_loadu_si128((const __m128i *)src);
-	_mm_storeu_si128((__m128i *)dst, xmm0);
+	xmm0 = _mm_loadu_si128((const __m128i *)(const void *)src);
+	_mm_storeu_si128((__m128i *)(void *)dst, xmm0);
 }
 
 /**
@@ -316,8 +316,8 @@ rte_mov32(uint8_t *dst, const uint8_t *src)
 {
 	__m256i ymm0;
 
-	ymm0 = _mm256_loadu_si256((const __m256i *)src);
-	_mm256_storeu_si256((__m256i *)dst, ymm0);
+	ymm0 = _mm256_loadu_si256((const __m256i *)(const void *)src);
+	_mm256_storeu_si256((__m256i *)(void *)dst, ymm0);
 }
 
 /**
@@ -354,16 +354,24 @@ rte_mov128blocks(uint8_t *dst, const uint8_t *src, size_t n)
 	__m256i ymm0, ymm1, ymm2, ymm3;
 
 	while (n >= 128) {
-		ymm0 = _mm256_loadu_si256((const __m256i *)((const uint8_t *)src + 0 * 32));
+		ymm0 = _mm256_loadu_si256((const __m256i *)(const void *)
+					  ((const uint8_t *)src + 0 * 32));
 		n -= 128;
-		ymm1 = _mm256_loadu_si256((const __m256i *)((const uint8_t *)src + 1 * 32));
-		ymm2 = _mm256_loadu_si256((const __m256i *)((const uint8_t *)src + 2 * 32));
-		ymm3 = _mm256_loadu_si256((const __m256i *)((const uint8_t *)src + 3 * 32));
+		ymm1 = _mm256_loadu_si256((const __m256i *)(const void *)
+					  ((const uint8_t *)src + 1 * 32));
+		ymm2 = _mm256_loadu_si256((const __m256i *)(const void *)
+					  ((const uint8_t *)src + 2 * 32));
+		ymm3 = _mm256_loadu_si256((const __m256i *)(const void *)
+					  ((const uint8_t *)src + 3 * 32));
 		src = (const uint8_t *)src + 128;
-		_mm256_storeu_si256((__m256i *)((uint8_t *)dst + 0 * 32), ymm0);
-		_mm256_storeu_si256((__m256i *)((uint8_t *)dst + 1 * 32), ymm1);
-		_mm256_storeu_si256((__m256i *)((uint8_t *)dst + 2 * 32), ymm2);
-		_mm256_storeu_si256((__m256i *)((uint8_t *)dst + 3 * 32), ymm3);
+		_mm256_storeu_si256((__m256i *)(void *)
+				    ((uint8_t *)dst + 0 * 32), ymm0);
+		_mm256_storeu_si256((__m256i *)(void *)
+				    ((uint8_t *)dst + 1 * 32), ymm1);
+		_mm256_storeu_si256((__m256i *)(void *)
+				    ((uint8_t *)dst + 2 * 32), ymm2);
+		_mm256_storeu_si256((__m256i *)(void *)
+				    ((uint8_t *)dst + 3 * 32), ymm3);
 		dst = (uint8_t *)dst + 128;
 	}
 }
@@ -496,8 +504,8 @@ rte_mov16(uint8_t *dst, const uint8_t *src)
 {
 	__m128i xmm0;
 
-	xmm0 = _mm_loadu_si128((const __m128i *)(const __m128i *)src);
-	_mm_storeu_si128((__m128i *)dst, xmm0);
+	xmm0 = _mm_loadu_si128((const __m128i *)(const void *)src);
+	_mm_storeu_si128((__m128i *)(void *)dst, xmm0);
 }
 
 /**
@@ -581,25 +589,25 @@ rte_mov256(uint8_t *dst, const uint8_t *src)
 __extension__ ({                                                                                            \
     size_t tmp;                                                                                                \
     while (len >= 128 + 16 - offset) {                                                                      \
-        xmm0 = _mm_loadu_si128((const __m128i *)((const uint8_t *)src - offset + 0 * 16));                  \
+        xmm0 = _mm_loadu_si128((const __m128i *)(const void *)((const uint8_t *)src - offset + 0 * 16));                  \
         len -= 128;                                                                                         \
-        xmm1 = _mm_loadu_si128((const __m128i *)((const uint8_t *)src - offset + 1 * 16));                  \
-        xmm2 = _mm_loadu_si128((const __m128i *)((const uint8_t *)src - offset + 2 * 16));                  \
-        xmm3 = _mm_loadu_si128((const __m128i *)((const uint8_t *)src - offset + 3 * 16));                  \
-        xmm4 = _mm_loadu_si128((const __m128i *)((const uint8_t *)src - offset + 4 * 16));                  \
-        xmm5 = _mm_loadu_si128((const __m128i *)((const uint8_t *)src - offset + 5 * 16));                  \
-        xmm6 = _mm_loadu_si128((const __m128i *)((const uint8_t *)src - offset + 6 * 16));                  \
-        xmm7 = _mm_loadu_si128((const __m128i *)((const uint8_t *)src - offset + 7 * 16));                  \
-        xmm8 = _mm_loadu_si128((const __m128i *)((const uint8_t *)src - offset + 8 * 16));                  \
+        xmm1 = _mm_loadu_si128((const __m128i *)(const void *)((const uint8_t *)src - offset + 1 * 16));                  \
+        xmm2 = _mm_loadu_si128((const __m128i *)(const void *)((const uint8_t *)src - offset + 2 * 16));                  \
+        xmm3 = _mm_loadu_si128((const __m128i *)(const void *)((const uint8_t *)src - offset + 3 * 16));                  \
+        xmm4 = _mm_loadu_si128((const __m128i *)(const void *)((const uint8_t *)src - offset + 4 * 16));                  \
+        xmm5 = _mm_loadu_si128((const __m128i *)(const void *)((const uint8_t *)src - offset + 5 * 16));                  \
+        xmm6 = _mm_loadu_si128((const __m128i *)(const void *)((const uint8_t *)src - offset + 6 * 16));                  \
+        xmm7 = _mm_loadu_si128((const __m128i *)(const void *)((const uint8_t *)src - offset + 7 * 16));                  \
+        xmm8 = _mm_loadu_si128((const __m128i *)(const void *)((const uint8_t *)src - offset + 8 * 16));                  \
         src = (const uint8_t *)src + 128;                                                                   \
-        _mm_storeu_si128((__m128i *)((uint8_t *)dst + 0 * 16), _mm_alignr_epi8(xmm1, xmm0, offset));        \
-        _mm_storeu_si128((__m128i *)((uint8_t *)dst + 1 * 16), _mm_alignr_epi8(xmm2, xmm1, offset));        \
-        _mm_storeu_si128((__m128i *)((uint8_t *)dst + 2 * 16), _mm_alignr_epi8(xmm3, xmm2, offset));        \
-        _mm_storeu_si128((__m128i *)((uint8_t *)dst + 3 * 16), _mm_alignr_epi8(xmm4, xmm3, offset));        \
-        _mm_storeu_si128((__m128i *)((uint8_t *)dst + 4 * 16), _mm_alignr_epi8(xmm5, xmm4, offset));        \
-        _mm_storeu_si128((__m128i *)((uint8_t *)dst + 5 * 16), _mm_alignr_epi8(xmm6, xmm5, offset));        \
-        _mm_storeu_si128((__m128i *)((uint8_t *)dst + 6 * 16), _mm_alignr_epi8(xmm7, xmm6, offset));        \
-        _mm_storeu_si128((__m128i *)((uint8_t *)dst + 7 * 16), _mm_alignr_epi8(xmm8, xmm7, offset));        \
+        _mm_storeu_si128((__m128i *)(void *)((uint8_t *)dst + 0 * 16), _mm_alignr_epi8(xmm1, xmm0, offset));        \
+        _mm_storeu_si128((__m128i *)(void *)((uint8_t *)dst + 1 * 16), _mm_alignr_epi8(xmm2, xmm1, offset));        \
+        _mm_storeu_si128((__m128i *)(void *)((uint8_t *)dst + 2 * 16), _mm_alignr_epi8(xmm3, xmm2, offset));        \
+        _mm_storeu_si128((__m128i *)(void *)((uint8_t *)dst + 3 * 16), _mm_alignr_epi8(xmm4, xmm3, offset));        \
+        _mm_storeu_si128((__m128i *)(void *)((uint8_t *)dst + 4 * 16), _mm_alignr_epi8(xmm5, xmm4, offset));        \
+        _mm_storeu_si128((__m128i *)(void *)((uint8_t *)dst + 5 * 16), _mm_alignr_epi8(xmm6, xmm5, offset));        \
+        _mm_storeu_si128((__m128i *)(void *)((uint8_t *)dst + 6 * 16), _mm_alignr_epi8(xmm7, xmm6, offset));        \
+        _mm_storeu_si128((__m128i *)(void *)((uint8_t *)dst + 7 * 16), _mm_alignr_epi8(xmm8, xmm7, offset));        \
         dst = (uint8_t *)dst + 128;                                                                         \
     }                                                                                                       \
     tmp = len;                                                                                              \
@@ -609,13 +617,13 @@ __extension__ ({
     dst = (uint8_t *)dst + tmp;                                                                             \
     if (len >= 32 + 16 - offset) {                                                                          \
         while (len >= 32 + 16 - offset) {                                                                   \
-            xmm0 = _mm_loadu_si128((const __m128i *)((const uint8_t *)src - offset + 0 * 16));              \
+            xmm0 = _mm_loadu_si128((const __m128i *)(const void *)((const uint8_t *)src - offset + 0 * 16));              \
             len -= 32;                                                                                      \
-            xmm1 = _mm_loadu_si128((const __m128i *)((const uint8_t *)src - offset + 1 * 16));              \
-            xmm2 = _mm_loadu_si128((const __m128i *)((const uint8_t *)src - offset + 2 * 16));              \
+            xmm1 = _mm_loadu_si128((const __m128i *)(const void *)((const uint8_t *)src - offset + 1 * 16));              \
+            xmm2 = _mm_loadu_si128((const __m128i *)(const void *)((const uint8_t *)src - offset + 2 * 16));              \
             src = (const uint8_t *)src + 32;                                                                \
-            _mm_storeu_si128((__m128i *)((uint8_t *)dst + 0 * 16), _mm_alignr_epi8(xmm1, xmm0, offset));    \
-            _mm_storeu_si128((__m128i *)((uint8_t *)dst + 1 * 16), _mm_alignr_epi8(xmm2, xmm1, offset));    \
+            _mm_storeu_si128((__m128i *)(void *)((uint8_t *)dst + 0 * 16), _mm_alignr_epi8(xmm1, xmm0, offset));    \
+            _mm_storeu_si128((__m128i *)(void *)((uint8_t *)dst + 1 * 16), _mm_alignr_epi8(xmm2, xmm1, offset));    \
             dst = (uint8_t *)dst + 32;                                                                      \
         }                                                                                                   \
         tmp = len;                                                                                          \
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.393384738 +0800
+++ 0191-eal-x86-avoid-cast-align-warning-in-memcpy-functions.patch	2021-11-10 14:17:02.000745027 +0800
@@ -1 +1 @@
-From 6de430b7079e8f7c29f9c18869393f74f8dffcb6 Mon Sep 17 00:00:00 2001
+From 67b3975bee2274fa273eb0a0ae5dd757eb85198b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6de430b7079e8f7c29f9c18869393f74f8dffcb6 ]
@@ -23 +25,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
- lib/eal/x86/include/rte_memcpy.h | 80 ++++++++++++++++++--------------
+ lib/librte_eal/x86/include/rte_memcpy.h | 80 ++++++++++++++-----------
@@ -30 +32 @@
-diff --git a/lib/eal/x86/include/rte_memcpy.h b/lib/eal/x86/include/rte_memcpy.h
+diff --git a/lib/librte_eal/x86/include/rte_memcpy.h b/lib/librte_eal/x86/include/rte_memcpy.h
@@ -32,2 +34,2 @@
---- a/lib/eal/x86/include/rte_memcpy.h
-+++ b/lib/eal/x86/include/rte_memcpy.h
+--- a/lib/librte_eal/x86/include/rte_memcpy.h
++++ b/lib/librte_eal/x86/include/rte_memcpy.h

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'eal: reset lcore task callback and argument' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (190 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'eal/x86: avoid cast-align warning in memcpy functions' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'hash: fix Doxygen comment of Toeplitz file' " Xueming Li
                   ` (60 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Honnappa Nagarahalli
  Cc: Luca Boccassi, Ruifeng Wang, Feifei Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6c7884c1caced1127482c07596f113253bada945

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6c7884c1caced1127482c07596f113253bada945 Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Sun, 24 Oct 2021 23:52:34 -0500
Subject: [PATCH] eal: reset lcore task callback and argument
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 33969e9c61385fc397f1934324e231ece9750404 ]

In the rte_eal_remote_launch function, the lcore function
pointer is checked for NULL. However, the pointer is never
reset to NULL. Reset the lcore function pointer and argument
after the worker has completed executing the lcore function.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Feifei Wang <feifei.wang2@arm.com>
---
 lib/librte_eal/freebsd/eal_thread.c | 2 ++
 lib/librte_eal/linux/eal_thread.c   | 2 ++
 lib/librte_eal/windows/eal_thread.c | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/lib/librte_eal/freebsd/eal_thread.c b/lib/librte_eal/freebsd/eal_thread.c
index 1dce9b04f2..bbc3a8e985 100644
--- a/lib/librte_eal/freebsd/eal_thread.c
+++ b/lib/librte_eal/freebsd/eal_thread.c
@@ -126,6 +126,8 @@ eal_thread_loop(__rte_unused void *arg)
 		fct_arg = lcore_config[lcore_id].arg;
 		ret = lcore_config[lcore_id].f(fct_arg);
 		lcore_config[lcore_id].ret = ret;
+		lcore_config[lcore_id].f = NULL;
+		lcore_config[lcore_id].arg = NULL;
 		rte_wmb();
 		lcore_config[lcore_id].state = FINISHED;
 	}
diff --git a/lib/librte_eal/linux/eal_thread.c b/lib/librte_eal/linux/eal_thread.c
index 83c2034b93..8f3c0dafd6 100644
--- a/lib/librte_eal/linux/eal_thread.c
+++ b/lib/librte_eal/linux/eal_thread.c
@@ -126,6 +126,8 @@ eal_thread_loop(__rte_unused void *arg)
 		fct_arg = lcore_config[lcore_id].arg;
 		ret = lcore_config[lcore_id].f(fct_arg);
 		lcore_config[lcore_id].ret = ret;
+		lcore_config[lcore_id].f = NULL;
+		lcore_config[lcore_id].arg = NULL;
 		rte_wmb();
 
 		/* when a service core returns, it should go directly to WAIT
diff --git a/lib/librte_eal/windows/eal_thread.c b/lib/librte_eal/windows/eal_thread.c
index 9c3f6d69fd..df1df5d02c 100644
--- a/lib/librte_eal/windows/eal_thread.c
+++ b/lib/librte_eal/windows/eal_thread.c
@@ -110,6 +110,8 @@ eal_thread_loop(void *arg __rte_unused)
 		fct_arg = lcore_config[lcore_id].arg;
 		ret = lcore_config[lcore_id].f(fct_arg);
 		lcore_config[lcore_id].ret = ret;
+		lcore_config[lcore_id].f = NULL;
+		lcore_config[lcore_id].arg = NULL;
 		rte_wmb();
 
 		/* when a service core returns, it should go directly to WAIT
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.435509806 +0800
+++ 0192-eal-reset-lcore-task-callback-and-argument.patch	2021-11-10 14:17:02.000745027 +0800
@@ -1 +1 @@
-From 33969e9c61385fc397f1934324e231ece9750404 Mon Sep 17 00:00:00 2001
+From 6c7884c1caced1127482c07596f113253bada945 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 33969e9c61385fc397f1934324e231ece9750404 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -18,3 +20,3 @@
- lib/eal/freebsd/eal_thread.c | 2 ++
- lib/eal/linux/eal_thread.c   | 2 ++
- lib/eal/windows/eal_thread.c | 2 ++
+ lib/librte_eal/freebsd/eal_thread.c | 2 ++
+ lib/librte_eal/linux/eal_thread.c   | 2 ++
+ lib/librte_eal/windows/eal_thread.c | 2 ++
@@ -23 +25 @@
-diff --git a/lib/eal/freebsd/eal_thread.c b/lib/eal/freebsd/eal_thread.c
+diff --git a/lib/librte_eal/freebsd/eal_thread.c b/lib/librte_eal/freebsd/eal_thread.c
@@ -25,2 +27,2 @@
---- a/lib/eal/freebsd/eal_thread.c
-+++ b/lib/eal/freebsd/eal_thread.c
+--- a/lib/librte_eal/freebsd/eal_thread.c
++++ b/lib/librte_eal/freebsd/eal_thread.c
@@ -36 +38 @@
-diff --git a/lib/eal/linux/eal_thread.c b/lib/eal/linux/eal_thread.c
+diff --git a/lib/librte_eal/linux/eal_thread.c b/lib/librte_eal/linux/eal_thread.c
@@ -38,2 +40,2 @@
---- a/lib/eal/linux/eal_thread.c
-+++ b/lib/eal/linux/eal_thread.c
+--- a/lib/librte_eal/linux/eal_thread.c
++++ b/lib/librte_eal/linux/eal_thread.c
@@ -49 +51 @@
-diff --git a/lib/eal/windows/eal_thread.c b/lib/eal/windows/eal_thread.c
+diff --git a/lib/librte_eal/windows/eal_thread.c b/lib/librte_eal/windows/eal_thread.c
@@ -51,2 +53,2 @@
---- a/lib/eal/windows/eal_thread.c
-+++ b/lib/eal/windows/eal_thread.c
+--- a/lib/librte_eal/windows/eal_thread.c
++++ b/lib/librte_eal/windows/eal_thread.c

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'hash: fix Doxygen comment of Toeplitz file' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (191 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'eal: reset lcore task callback and argument' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'lpm6: fix buffer overflow' " Xueming Li
                   ` (59 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: Luca Boccassi, John McNamara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/337f87c3bf3772785ed381b14f9a4f7765a3c7ab

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 337f87c3bf3772785ed381b14f9a4f7765a3c7ab Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Mon, 6 Sep 2021 17:02:43 +0100
Subject: [PATCH] hash: fix Doxygen comment of Toeplitz file
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 45523f494c7b14a9d1066e3def78e9e6e0fd8418 ]

Fixes: 7574c3ef7428 ("hash: add toeplitz algorithm used by RSS")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 lib/librte_hash/rte_thash.h | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/lib/librte_hash/rte_thash.h b/lib/librte_hash/rte_thash.h
index 061efa2ae1..c9f1e2c392 100644
--- a/lib/librte_hash/rte_thash.h
+++ b/lib/librte_hash/rte_thash.h
@@ -8,20 +8,16 @@
 /**
  * @file
  *
- * toeplitz hash functions.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
  * Software implementation of the Toeplitz hash function used by RSS.
  * Can be used either for packet distribution on single queue NIC
  * or for simulating of RSS computation on specific NIC (for example
  * after GRE header decapsulating)
  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <stdint.h>
 #include <rte_byteorder.h>
 #include <rte_config.h>
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.477681300 +0800
+++ 0193-hash-fix-Doxygen-comment-of-Toeplitz-file.patch	2021-11-10 14:17:02.000745027 +0800
@@ -1 +1 @@
-From 45523f494c7b14a9d1066e3def78e9e6e0fd8418 Mon Sep 17 00:00:00 2001
+From 337f87c3bf3772785ed381b14f9a4f7765a3c7ab Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 45523f494c7b14a9d1066e3def78e9e6e0fd8418 ]
@@ -7 +9,0 @@
-Cc: stable@dpdk.org
@@ -12 +14 @@
- lib/hash/rte_thash.h | 12 ++++--------
+ lib/librte_hash/rte_thash.h | 12 ++++--------
@@ -15,5 +17,5 @@
-diff --git a/lib/hash/rte_thash.h b/lib/hash/rte_thash.h
-index 76109fcdb0..a26fe56bf4 100644
---- a/lib/hash/rte_thash.h
-+++ b/lib/hash/rte_thash.h
-@@ -9,20 +9,16 @@
+diff --git a/lib/librte_hash/rte_thash.h b/lib/librte_hash/rte_thash.h
+index 061efa2ae1..c9f1e2c392 100644
+--- a/lib/librte_hash/rte_thash.h
++++ b/lib/librte_hash/rte_thash.h
+@@ -8,20 +8,16 @@

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'lpm6: fix buffer overflow' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (192 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'hash: fix Doxygen comment of Toeplitz file' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'rib: fix IPv6 depth mask' " Xueming Li
                   ` (58 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: Luca Boccassi, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d7d89ada026b295b577d0e93c55c383609825ff9
the

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d7d89ada026b295b577d0e93c55c383609825ff9 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Thu, 21 Oct 2021 18:15:49 +0100
Subject: [PATCH] lpm6: fix buffer overflow
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b16ac536573869ba3afd724947bfa9abbd477f86 ]

This patch fixes buffer overflow reported by ASAN,
please reference https://bugs.dpdk.org/show_bug.cgi?id=819

The rte_lpm6 keeps routing information for control plane purpose
inside the rte_hash table which uses rte_jhash() as a hash function.
From the rte_jhash() documentation: If input key is not aligned to
four byte boundaries or a multiple of four bytes in length,
the memory region just after may be read (but not used in the
computation).
rte_lpm6 uses 17 bytes keys consisting of IPv6 address (16 bytes) +
depth (1 byte).

This patch increases the size of the depth field up to uint32_t
and sets the alignment to 4 bytes.

Bugzilla ID: 819
Fixes: 86b3b21952a8 ("lpm6: store rules in hash table")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_lpm/rte_lpm6.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c
index 37baabb26d..73768fc956 100644
--- a/lib/librte_lpm/rte_lpm6.c
+++ b/lib/librte_lpm/rte_lpm6.c
@@ -80,7 +80,7 @@ struct rte_lpm6_rule {
 /** Rules tbl entry key. */
 struct rte_lpm6_rule_key {
 	uint8_t ip[RTE_LPM6_IPV6_ADDR_SIZE]; /**< Rule IP address. */
-	uint8_t depth; /**< Rule depth. */
+	uint32_t depth; /**< Rule depth. */
 };
 
 /* Header of tbl8 */
@@ -259,6 +259,8 @@ rte_lpm6_create(const char *name, int socket_id,
 	lpm_list = RTE_TAILQ_CAST(rte_lpm6_tailq.head, rte_lpm6_list);
 
 	RTE_BUILD_BUG_ON(sizeof(struct rte_lpm6_tbl_entry) != sizeof(uint32_t));
+	RTE_BUILD_BUG_ON(sizeof(struct rte_lpm6_rule_key) %
+		sizeof(uint32_t) != 0);
 
 	/* Check user arguments. */
 	if ((name == NULL) || (socket_id < -1) || (config == NULL) ||
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.519219201 +0800
+++ 0194-lpm6-fix-buffer-overflow.patch	2021-11-10 14:17:02.000745027 +0800
@@ -1 +1 @@
-From b16ac536573869ba3afd724947bfa9abbd477f86 Mon Sep 17 00:00:00 2001
+From d7d89ada026b295b577d0e93c55c383609825ff9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b16ac536573869ba3afd724947bfa9abbd477f86 ]
@@ -23 +25,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
- lib/lpm/rte_lpm6.c | 4 +++-
+ lib/librte_lpm/rte_lpm6.c | 4 +++-
@@ -31 +33 @@
-diff --git a/lib/lpm/rte_lpm6.c b/lib/lpm/rte_lpm6.c
+diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c
@@ -33,2 +35,2 @@
---- a/lib/lpm/rte_lpm6.c
-+++ b/lib/lpm/rte_lpm6.c
+--- a/lib/librte_lpm/rte_lpm6.c
++++ b/lib/librte_lpm/rte_lpm6.c

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'rib: fix IPv6 depth mask' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (193 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'lpm6: fix buffer overflow' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'eal/windows: fix IOVA mode detection and handling' " Xueming Li
                   ` (57 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8d7d90985b8ea7f56eb15ee6454c2d409b9a6add

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8d7d90985b8ea7f56eb15ee6454c2d409b9a6add Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Mon, 6 Sep 2021 16:54:32 +0100
Subject: [PATCH] rib: fix IPv6 depth mask
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 97e2ae4c58f9c8741ae920415e4c3952373ecb51 ]

Fixes: 03b8372a9a73 ("rib: fix max depth IPv6 lookup")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/librte_rib/rte_rib6.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_rib/rte_rib6.c b/lib/librte_rib/rte_rib6.c
index 96424e9c9f..b00c7fbf5a 100644
--- a/lib/librte_rib/rte_rib6.c
+++ b/lib/librte_rib/rte_rib6.c
@@ -88,7 +88,7 @@ get_dir(const uint8_t ip[RTE_RIB6_IPV6_ADDR_SIZE], uint8_t depth)
 	 * is incremented in blocks of 8 (1 byte). This means the last
 	 * 3 bits are irrelevant to what the index of ip should be.
 	 */
-	index = (depth & (UINT8_MAX - 1)) / CHAR_BIT;
+	index = (depth & INT8_MAX) / CHAR_BIT;
 
 	/*
 	 * msk is the bitmask used to extract the bit used to decide the
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.561067618 +0800
+++ 0195-rib-fix-IPv6-depth-mask.patch	2021-11-10 14:17:02.004078333 +0800
@@ -1 +1 @@
-From 97e2ae4c58f9c8741ae920415e4c3952373ecb51 Mon Sep 17 00:00:00 2001
+From 8d7d90985b8ea7f56eb15ee6454c2d409b9a6add Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 97e2ae4c58f9c8741ae920415e4c3952373ecb51 ]
@@ -7 +9,0 @@
-Cc: stable@dpdk.org
@@ -11 +13 @@
- lib/rib/rte_rib6.c | 2 +-
+ lib/librte_rib/rte_rib6.c | 2 +-
@@ -14 +16 @@
-diff --git a/lib/rib/rte_rib6.c b/lib/rib/rte_rib6.c
+diff --git a/lib/librte_rib/rte_rib6.c b/lib/librte_rib/rte_rib6.c
@@ -16,2 +18,2 @@
---- a/lib/rib/rte_rib6.c
-+++ b/lib/rib/rte_rib6.c
+--- a/lib/librte_rib/rte_rib6.c
++++ b/lib/librte_rib/rte_rib6.c

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'eal/windows: fix IOVA mode detection and handling' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (194 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'rib: fix IPv6 depth mask' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'common/mlx5: fix physical port name recognition' " Xueming Li
                   ` (56 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Luca Boccassi, Tal Shnaiderman, Pallavi Kadam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6ddd5388c2713f9a451450d3dd83d41dec81e700

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6ddd5388c2713f9a451450d3dd83d41dec81e700 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Mon, 25 Oct 2021 15:20:52 +0300
Subject: [PATCH] eal/windows: fix IOVA mode detection and handling
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0c8fc83a71f37107ad0b205b2a176fde9188390e ]

Windows EAL did not detect IOVA mode and worked incorrectly
if physical addresses could not be obtained
(if virt2phys driver was missing or inaccessible).
In this case, rte_mem_virt2iova() reported RTE_BAD_IOVA for any address.
Inability to obtain IOVA, be it PA or VA, should cause a failure
for the DPDK allocator, but it was hidden by the implementation,
so allocations did not fail when they should.
The mode when DPDK cannot obtain PA but can work is IOVA-as-VA mode.
However, rte_eal_iova_mode() always returned RTE_IOVA_DC
(while it should only ever return RTE_IOVA_PA or RTE_IOVA_VA),
because IOVA mode detection was not implemented.

Implement IOVA mode detection:
1. Always allow to force --iova-mode=va.
2. Allow to force --iova-mode=pa only if virt2phys is available.
3. If no mode is forced and virt2phys is available,
   select the mode according to bus requests, default to PA.
4. If no mode is forced but virt2phys is unavailable, default to VA.
Fix rte_mem_virt2iova() by returning VA when using IOVA-as-VA.
Fix rte_eal_iova_mode() by returning the selected mode.

Fixes: 2a5d547a4a9b ("eal/windows: implement basic memory management")

Reported-by: Tal Shnaiderman <talshn@nvidia.com>
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
---
 lib/librte_eal/windows/eal.c          | 63 +++++++++++++++++++--------
 lib/librte_eal/windows/eal_memalloc.c | 15 +++----
 lib/librte_eal/windows/eal_memory.c   |  6 +--
 3 files changed, 51 insertions(+), 33 deletions(-)

diff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c
index 5b6d13481a..abe4c4038d 100644
--- a/lib/librte_eal/windows/eal.c
+++ b/lib/librte_eal/windows/eal.c
@@ -269,6 +269,8 @@ rte_eal_init(int argc, char **argv)
 	const struct rte_config *config = rte_eal_get_configuration();
 	struct internal_config *internal_conf =
 		eal_get_internal_configuration();
+	bool has_phys_addr;
+	enum rte_iova_mode iova_mode;
 	int ret;
 
 	rte_eal_log_init(NULL, 0);
@@ -315,18 +317,59 @@ rte_eal_init(int argc, char **argv)
 			internal_conf->memory = MEMSIZE_IF_NO_HUGE_PAGE;
 	}
 
+	if (rte_eal_intr_init() < 0) {
+		rte_eal_init_alert("Cannot init interrupt-handling thread");
+		return -1;
+	}
+
+	if (rte_eal_timer_init() < 0) {
+		rte_eal_init_alert("Cannot init TSC timer");
+		rte_errno = EFAULT;
+		return -1;
+	}
+
+	bscan = rte_bus_scan();
+	if (bscan < 0) {
+		rte_eal_init_alert("Cannot scan the buses");
+		rte_errno = ENODEV;
+		return -1;
+	}
+
 	if (eal_mem_win32api_init() < 0) {
 		rte_eal_init_alert("Cannot access Win32 memory management");
 		rte_errno = ENOTSUP;
 		return -1;
 	}
 
+	has_phys_addr = true;
 	if (eal_mem_virt2iova_init() < 0) {
 		/* Non-fatal error if physical addresses are not required. */
-		RTE_LOG(WARNING, EAL, "Cannot access virt2phys driver, "
+		RTE_LOG(DEBUG, EAL, "Cannot access virt2phys driver, "
 			"PA will not be available\n");
+		has_phys_addr = false;
 	}
 
+	iova_mode = internal_conf->iova_mode;
+	if (iova_mode == RTE_IOVA_PA && !has_phys_addr) {
+		rte_eal_init_alert("Cannot use IOVA as 'PA' since physical addresses are not available");
+		rte_errno = EINVAL;
+		return -1;
+	}
+	if (iova_mode == RTE_IOVA_DC) {
+		RTE_LOG(DEBUG, EAL, "Specific IOVA mode is not requested, autodetecting\n");
+		if (has_phys_addr) {
+			RTE_LOG(DEBUG, EAL, "Selecting IOVA mode according to bus requests\n");
+			iova_mode = rte_bus_get_iommu_class();
+			if (iova_mode == RTE_IOVA_DC)
+				iova_mode = RTE_IOVA_PA;
+		} else {
+			iova_mode = RTE_IOVA_VA;
+		}
+	}
+	RTE_LOG(DEBUG, EAL, "Selected IOVA mode '%s'\n",
+		iova_mode == RTE_IOVA_PA ? "PA" : "VA");
+	rte_eal_get_configuration()->iova_mode = iova_mode;
+
 	if (rte_eal_memzone_init() < 0) {
 		rte_eal_init_alert("Cannot init memzone");
 		rte_errno = ENODEV;
@@ -351,27 +394,9 @@ rte_eal_init(int argc, char **argv)
 		return -1;
 	}
 
-	if (rte_eal_intr_init() < 0) {
-		rte_eal_init_alert("Cannot init interrupt-handling thread");
-		return -1;
-	}
-
-	if (rte_eal_timer_init() < 0) {
-		rte_eal_init_alert("Cannot init TSC timer");
-		rte_errno = EFAULT;
-		return -1;
-	}
-
 	__rte_thread_init(config->main_lcore,
 		&lcore_config[config->main_lcore].cpuset);
 
-	bscan = rte_bus_scan();
-	if (bscan < 0) {
-		rte_eal_init_alert("Cannot init PCI");
-		rte_errno = ENODEV;
-		return -1;
-	}
-
 	RTE_LCORE_FOREACH_WORKER(i) {
 
 		/*
diff --git a/lib/librte_eal/windows/eal_memalloc.c b/lib/librte_eal/windows/eal_memalloc.c
index d8cae3ebc1..d1e49f0be8 100644
--- a/lib/librte_eal/windows/eal_memalloc.c
+++ b/lib/librte_eal/windows/eal_memalloc.c
@@ -100,16 +100,11 @@ alloc_seg(struct rte_memseg *ms, void *requested_addr, int socket_id,
 	 */
 	*(volatile int *)addr = *(volatile int *)addr;
 
-	/* Only try to obtain IOVA if it's available, so that applications
-	 * that do not need IOVA can use this allocator.
-	 */
-	if (rte_eal_using_phys_addrs()) {
-		iova = rte_mem_virt2iova(addr);
-		if (iova == RTE_BAD_IOVA) {
-			RTE_LOG(DEBUG, EAL,
-				"Cannot get IOVA of allocated segment\n");
-			goto error;
-		}
+	iova = rte_mem_virt2iova(addr);
+	if (iova == RTE_BAD_IOVA) {
+		RTE_LOG(DEBUG, EAL,
+			"Cannot get IOVA of allocated segment\n");
+		goto error;
 	}
 
 	/* Only "Ex" function can handle hugepages. */
diff --git a/lib/librte_eal/windows/eal_memory.c b/lib/librte_eal/windows/eal_memory.c
index 71741fc07e..2fd37d9708 100644
--- a/lib/librte_eal/windows/eal_memory.c
+++ b/lib/librte_eal/windows/eal_memory.c
@@ -225,19 +225,17 @@ rte_mem_virt2phy(const void *virt)
 	return phys.QuadPart;
 }
 
-/* Windows currently only supports IOVA as PA. */
 rte_iova_t
 rte_mem_virt2iova(const void *virt)
 {
 	phys_addr_t phys;
 
-	if (virt2phys_device == INVALID_HANDLE_VALUE)
-		return RTE_BAD_IOVA;
+	if (rte_eal_iova_mode() == RTE_IOVA_VA)
+		return (rte_iova_t)virt;
 
 	phys = rte_mem_virt2phy(virt);
 	if (phys == RTE_BAD_PHYS_ADDR)
 		return RTE_BAD_IOVA;
-
 	return (rte_iova_t)phys;
 }
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.602349960 +0800
+++ 0196-eal-windows-fix-IOVA-mode-detection-and-handling.patch	2021-11-10 14:17:02.004078333 +0800
@@ -1 +1 @@
-From 0c8fc83a71f37107ad0b205b2a176fde9188390e Mon Sep 17 00:00:00 2001
+From 6ddd5388c2713f9a451450d3dd83d41dec81e700 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0c8fc83a71f37107ad0b205b2a176fde9188390e ]
@@ -28 +30,0 @@
-Cc: stable@dpdk.org
@@ -35,3 +37,3 @@
- lib/eal/windows/eal.c          | 63 ++++++++++++++++++++++++----------
- lib/eal/windows/eal_memalloc.c | 15 +++-----
- lib/eal/windows/eal_memory.c   |  6 ++--
+ lib/librte_eal/windows/eal.c          | 63 +++++++++++++++++++--------
+ lib/librte_eal/windows/eal_memalloc.c | 15 +++----
+ lib/librte_eal/windows/eal_memory.c   |  6 +--
@@ -40,5 +42,5 @@
-diff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c
-index 3d8c520412..f7ce1b6671 100644
---- a/lib/eal/windows/eal.c
-+++ b/lib/eal/windows/eal.c
-@@ -276,6 +276,8 @@ rte_eal_init(int argc, char **argv)
+diff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c
+index 5b6d13481a..abe4c4038d 100644
+--- a/lib/librte_eal/windows/eal.c
++++ b/lib/librte_eal/windows/eal.c
+@@ -269,6 +269,8 @@ rte_eal_init(int argc, char **argv)
@@ -52,2 +54,2 @@
- 	eal_log_init(NULL, 0);
-@@ -322,18 +324,59 @@ rte_eal_init(int argc, char **argv)
+ 	rte_eal_log_init(NULL, 0);
+@@ -315,18 +317,59 @@ rte_eal_init(int argc, char **argv)
@@ -114 +116 @@
-@@ -358,27 +401,9 @@ rte_eal_init(int argc, char **argv)
+@@ -351,27 +394,9 @@ rte_eal_init(int argc, char **argv)
@@ -142,5 +144,5 @@
-diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c
-index 4459d59b1a..55d6dcc71c 100644
---- a/lib/eal/windows/eal_memalloc.c
-+++ b/lib/eal/windows/eal_memalloc.c
-@@ -99,16 +99,11 @@ alloc_seg(struct rte_memseg *ms, void *requested_addr, int socket_id,
+diff --git a/lib/librte_eal/windows/eal_memalloc.c b/lib/librte_eal/windows/eal_memalloc.c
+index d8cae3ebc1..d1e49f0be8 100644
+--- a/lib/librte_eal/windows/eal_memalloc.c
++++ b/lib/librte_eal/windows/eal_memalloc.c
+@@ -100,16 +100,11 @@ alloc_seg(struct rte_memseg *ms, void *requested_addr, int socket_id,
@@ -168 +170 @@
-diff --git a/lib/eal/windows/eal_memory.c b/lib/eal/windows/eal_memory.c
+diff --git a/lib/librte_eal/windows/eal_memory.c b/lib/librte_eal/windows/eal_memory.c
@@ -170,2 +172,2 @@
---- a/lib/eal/windows/eal_memory.c
-+++ b/lib/eal/windows/eal_memory.c
+--- a/lib/librte_eal/windows/eal_memory.c
++++ b/lib/librte_eal/windows/eal_memory.c

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'common/mlx5: fix physical port name recognition' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (195 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'eal/windows: fix IOVA mode detection and handling' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/i40e: fix buffer size alignment' " Xueming Li
                   ` (55 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Xueming Li; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c4e68962efd30f3b4722bf4ad055d592141db69d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c4e68962efd30f3b4722bf4ad055d592141db69d Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Wed, 3 Nov 2021 11:18:36 +0200
Subject: [PATCH] common/mlx5: fix physical port name recognition
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 59df97f1a832a0edfd7f77ffbe5149e553e860b5 ]

While device probing mlx5 PMD get the physical port name
and checks against the set of patterns. If there is no
any pattern match, the driver assumes the port belongs
to PF device, this behaviour provides compatibility with
legacy kernel drivers (before and early SR-IOV support).

The newer kernels added the PCI subfunction support and
representor names with pattern like pf0sf1. This pattern
was not recognized by PMD and the first found subfunction
representor was considered as master device.

This patch supports representor name parsing for SF,
and SF representors are just ignored by PMD (as there is
no support for SF in 20.11-LTS release).

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/common/mlx5/linux/mlx5_common_os.c | 32 +++++++++++++++-------
 drivers/common/mlx5/linux/mlx5_nl.c        |  3 ++
 drivers/common/mlx5/mlx5_common.h          |  2 ++
 drivers/net/mlx5/linux/mlx5_ethdev_os.c    |  3 ++
 4 files changed, 30 insertions(+), 10 deletions(-)

diff --git a/drivers/common/mlx5/linux/mlx5_common_os.c b/drivers/common/mlx5/linux/mlx5_common_os.c
index 0edd78ea6d..5cf9576921 100644
--- a/drivers/common/mlx5/linux/mlx5_common_os.c
+++ b/drivers/common/mlx5/linux/mlx5_common_os.c
@@ -97,22 +97,34 @@ void
 mlx5_translate_port_name(const char *port_name_in,
 			 struct mlx5_switch_info *port_info_out)
 {
-	char pf_c1, pf_c2, vf_c1, vf_c2, eol;
+	char ctrl = 0, pf_c1, pf_c2, vf_c1, vf_c2, eol;
 	char *end;
 	int sc_items;
 
-	/*
-	 * Check for port-name as a string of the form pf0vf0
-	 * (support kernel ver >= 5.0 or OFED ver >= 4.6).
-	 */
+	sc_items = sscanf(port_name_in, "%c%d",
+			  &ctrl, &port_info_out->ctrl_num);
+	if (sc_items == 2 && ctrl == 'c') {
+		port_name_in++; /* 'c' */
+		port_name_in += snprintf(NULL, 0, "%d",
+					  port_info_out->ctrl_num);
+	}
+	/* Check for port-name as a string of the form pf0vf0 or pf0sf0 */
 	sc_items = sscanf(port_name_in, "%c%c%d%c%c%d%c",
 			  &pf_c1, &pf_c2, &port_info_out->pf_num,
 			  &vf_c1, &vf_c2, &port_info_out->port_name, &eol);
-	if (sc_items == 6 &&
-	    pf_c1 == 'p' && pf_c2 == 'f' &&
-	    vf_c1 == 'v' && vf_c2 == 'f') {
-		port_info_out->name_type = MLX5_PHYS_PORT_NAME_TYPE_PFVF;
-		return;
+	if (sc_items == 6 && pf_c1 == 'p' && pf_c2 == 'f') {
+		if (vf_c1 == 'v' && vf_c2 == 'f') {
+			/* Kernel ver >= 5.0 or OFED ver >= 4.6 */
+			port_info_out->name_type =
+					MLX5_PHYS_PORT_NAME_TYPE_PFVF;
+			return;
+		}
+		if (vf_c1 == 's' && vf_c2 == 'f') {
+			/* Kernel ver >= 5.11 or OFED ver >= 5.1 */
+			port_info_out->name_type =
+					MLX5_PHYS_PORT_NAME_TYPE_PFSF;
+			return;
+		}
 	}
 	/*
 	 * Check for port-name as a string of the form p0
diff --git a/drivers/common/mlx5/linux/mlx5_nl.c b/drivers/common/mlx5/linux/mlx5_nl.c
index 1f765dca07..145e354b2c 100644
--- a/drivers/common/mlx5/linux/mlx5_nl.c
+++ b/drivers/common/mlx5/linux/mlx5_nl.c
@@ -789,6 +789,7 @@ mlx5_nl_mac_addr_sync(int nlsk_fd, unsigned int iface_idx,
 	int i;
 	int ret;
 
+	memset(macs, 0, n * sizeof(macs[0]));
 	ret = mlx5_nl_mac_addr_list(nlsk_fd, iface_idx, &macs, &macs_n);
 	if (ret)
 		return;
@@ -1201,6 +1202,8 @@ mlx5_nl_check_switch_info(bool num_vf_set,
 	case MLX5_PHYS_PORT_NAME_TYPE_PFHPF:
 		/* Fallthrough */
 	case MLX5_PHYS_PORT_NAME_TYPE_PFVF:
+		/* Fallthrough */
+	case MLX5_PHYS_PORT_NAME_TYPE_PFSF:
 		/* New representors naming schema. */
 		switch_info->representor = 1;
 		break;
diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h
index a484b74b9c..4c75addd08 100644
--- a/drivers/common/mlx5/mlx5_common.h
+++ b/drivers/common/mlx5/mlx5_common.h
@@ -153,6 +153,7 @@ enum mlx5_nl_phys_port_name_type {
 	MLX5_PHYS_PORT_NAME_TYPE_UPLINK, /* p0, kernel ver >= 5.0 */
 	MLX5_PHYS_PORT_NAME_TYPE_PFVF, /* pf0vf0, kernel ver >= 5.0 */
 	MLX5_PHYS_PORT_NAME_TYPE_PFHPF, /* pf0, kernel ver >= 5.7, HPF rep */
+	MLX5_PHYS_PORT_NAME_TYPE_PFSF, /* pf0sf0, kernel ver >= 5.0 */
 	MLX5_PHYS_PORT_NAME_TYPE_UNKNOWN, /* Unrecognized. */
 };
 
@@ -161,6 +162,7 @@ struct mlx5_switch_info {
 	uint32_t master:1; /**< Master device. */
 	uint32_t representor:1; /**< Representor device. */
 	enum mlx5_nl_phys_port_name_type name_type; /** < Port name type. */
+	int32_t ctrl_num; /**< Controller number (valid for c#pf#vf# format). */
 	int32_t pf_num; /**< PF number (valid for pfxvfx format only). */
 	int32_t port_name; /**< Representor port name. */
 	uint64_t switch_id; /**< Switch identifier. */
diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index f641cb936e..08b51b7dc8 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -1013,6 +1013,9 @@ mlx5_sysfs_check_switch_info(bool device_dir,
 		/* New representors naming schema. */
 		switch_info->representor = 1;
 		break;
+	default:
+		switch_info->master = device_dir;
+		break;
 	}
 }
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.644954958 +0800
+++ 0197-common-mlx5-fix-physical-port-name-recognition.patch	2021-11-10 14:17:02.007411639 +0800
@@ -1 +1 @@
-From 59df97f1a832a0edfd7f77ffbe5149e553e860b5 Mon Sep 17 00:00:00 2001
+From c4e68962efd30f3b4722bf4ad055d592141db69d Mon Sep 17 00:00:00 2001
@@ -3,14 +3,20 @@
-Date: Sun, 28 Mar 2021 13:48:07 +0000
-Subject: [PATCH] common/mlx5: support sub-function representor parsing
-
-This patch supports representor name parsing for SF.
-In sysfs, representor name stored under "phys_port_name" sysfs key,
-similar to VF representor, switch port name of SF representor is
-"pf<x>sf<y>".
-
-For netlink message, net SF type is supported.
-
-Examples:
-
-pf0sf1
-pf0sf[0-3]
+Date: Wed, 3 Nov 2021 11:18:36 +0200
+Subject: [PATCH] common/mlx5: fix physical port name recognition
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 59df97f1a832a0edfd7f77ffbe5149e553e860b5 ]
+
+While device probing mlx5 PMD get the physical port name
+and checks against the set of patterns. If there is no
+any pattern match, the driver assumes the port belongs
+to PF device, this behaviour provides compatibility with
+legacy kernel drivers (before and early SR-IOV support).
+
+The newer kernels added the PCI subfunction support and
+representor names with pattern like pf0sf1. This pattern
+was not recognized by PMD and the first found subfunction
+representor was considered as master device.
+
+This patch supports representor name parsing for SF,
+and SF representors are just ignored by PMD (as there is
+no support for SF in 20.11-LTS release).
@@ -77 +83 @@
-index ef7a521379..752c57b33d 100644
+index 1f765dca07..145e354b2c 100644
@@ -80 +86 @@
-@@ -746,6 +746,7 @@ mlx5_nl_mac_addr_sync(int nlsk_fd, unsigned int iface_idx,
+@@ -789,6 +789,7 @@ mlx5_nl_mac_addr_sync(int nlsk_fd, unsigned int iface_idx,
@@ -88 +94 @@
-@@ -1158,6 +1159,8 @@ mlx5_nl_check_switch_info(bool num_vf_set,
+@@ -1201,6 +1202,8 @@ mlx5_nl_check_switch_info(bool num_vf_set,
@@ -98 +104 @@
-index 5028a05b49..8eda6749b4 100644
+index a484b74b9c..4c75addd08 100644
@@ -101 +107 @@
-@@ -151,6 +151,7 @@ enum mlx5_nl_phys_port_name_type {
+@@ -153,6 +153,7 @@ enum mlx5_nl_phys_port_name_type {
@@ -109 +115 @@
-@@ -159,6 +160,7 @@ struct mlx5_switch_info {
+@@ -161,6 +162,7 @@ struct mlx5_switch_info {
@@ -118 +124 @@
-index 0e8de9439e..cb692b22f2 100644
+index f641cb936e..08b51b7dc8 100644

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix buffer size alignment' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (196 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'common/mlx5: fix physical port name recognition' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/i40evf: extend the polling times of vf reset' " Xueming Li
                   ` (54 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Qiming Chen; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4fc3c6504068afa28824113b0872f50e8ac4209a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4fc3c6504068afa28824113b0872f50e8ac4209a Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Mon, 6 Sep 2021 15:00:14 +0800
Subject: [PATCH] net/i40e: fix buffer size alignment
Cc: Xueming Li <xuemingl@nvidia.com>

The RTE_ALIGN macro is aligned upwards. If the buf_size variable is not
aligned with 1 << I40E_RXQ_CTX_DBUFF_SHIFT, the rx_buf_len is larger than
the actual mbuf memory after the operation. When receiving the packet, if
the packet is larger than the configured buf_size, it will cause a memory
stepping event.

The patch uses the RTE_ALIGN_FLOOR down alignment macro to correct the
problem.

Fixes: c1715402df8f ("i40evf: fix jumbo frame support")
Cc: stable@dpdk.org

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 625981048a..a753a402c3 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1879,7 +1879,7 @@ i40evf_rxq_init(struct rte_eth_dev *dev, struct i40e_rx_queue *rxq)
 					RTE_PKTMBUF_HEADROOM);
 	rxq->hs_mode = i40e_header_split_none;
 	rxq->rx_hdr_len = 0;
-	rxq->rx_buf_len = RTE_ALIGN(buf_size, (1 << I40E_RXQ_CTX_DBUFF_SHIFT));
+	rxq->rx_buf_len = RTE_ALIGN_FLOOR(buf_size, (1 << I40E_RXQ_CTX_DBUFF_SHIFT));
 	len = rxq->rx_buf_len * I40E_MAX_CHAINED_RX_BUFFERS;
 	rxq->max_pkt_len = RTE_MIN(len,
 		dev_data->dev_conf.rxmode.max_rx_pkt_len);
-- 
2.33.0


^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/i40evf: extend the polling times of vf reset' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (197 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/i40e: fix buffer size alignment' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'test: fix ring PMD initialisation' " Xueming Li
                   ` (53 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Qiming Chen; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e1d6c484817b651444011bda6b3881a6b60a9408

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e1d6c484817b651444011bda6b3881a6b60a9408 Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei@163.com>
Date: Thu, 9 Sep 2021 17:13:20 +0800
Subject: [PATCH] net/i40evf: extend the polling times of vf reset
Cc: Xueming Li <xuemingl@nvidia.com>

In the embedded RTOS environment, the x722 controller Ethernet card of
the d2146nt chip, the vfio user mode driver takes over 8 vf ports in
turn, but i40evf_check_vf_reset_done will probably fail.

The version matching is no problem, and there is no
substantial progress. Learning from the implementation
of the i40evf kernel driver locally, after modifying the polling time
from 1 second to 5s, the repeated restart process took over the start
port test, and it was found that this probability was reduced to an
order of magnitude acceptable to the user.

The patch cannot fundamentally solve the failure problem, but it greatly
slows down the probability of the problem. The modification is based on the
i40evf kernel driver.

Fixes: 4861cde46116 ("i40e: new poll mode driver")

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index a753a402c3..f55db699c1 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -42,7 +42,7 @@
 /* busy wait delay in msec */
 #define I40EVF_BUSY_WAIT_DELAY 10
 #define I40EVF_BUSY_WAIT_COUNT 50
-#define MAX_RESET_WAIT_CNT     20
+#define MAX_RESET_WAIT_CNT     100
 
 #define I40EVF_ALARM_INTERVAL 50000 /* us */
 
-- 
2.33.0


^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'test: fix ring PMD initialisation' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (198 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/i40evf: extend the polling times of vf reset' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'pipeline: fix build with ASan' " Xueming Li
                   ` (52 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Luca Boccassi, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e9f391e952889dc47ebe53a005ee8ff55725cf31

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e9f391e952889dc47ebe53a005ee8ff55725cf31 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Tue, 26 Oct 2021 12:19:43 +0100
Subject: [PATCH] test: fix ring PMD initialisation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b66412f24f17fcba5a248888bf4b3c1f5d6880de ]

(bitratestats_autotest|latencystats_autotest|pdump_autotest) tests
generate a log of error messages like that:

test_packet_forward() line 104: Error sending packet to port 0
Send pkts Failed

These tests use of app/test/sample_packet_forward.* code.
This code creates a portid from a ring, but doesn't properly
configure/start it.
The fix adds code to configure/start given port before usage.

Fixes: 7a0935239b9e ("ethdev: make fast-path functions to use new flat array")
Fixes: a52966cd48fd ("test: add helpers using ring PMD Rx/Tx")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: David Marchand <david.marchand@redhat.com>
---
 app/test/sample_packet_forward.c | 29 +++++++++++++++++++++++++++++
 app/test/sample_packet_forward.h |  3 +++
 app/test/test_bitratestats.c     | 12 +++++++++++-
 app/test/test_latencystats.c     | 12 +++++++++++-
 app/test/test_pdump.c            | 12 ++++++++++--
 5 files changed, 64 insertions(+), 4 deletions(-)

diff --git a/app/test/sample_packet_forward.c b/app/test/sample_packet_forward.c
index 61384b3d9b..aa897274d8 100644
--- a/app/test/sample_packet_forward.c
+++ b/app/test/sample_packet_forward.c
@@ -15,6 +15,35 @@
 
 #include "sample_packet_forward.h"
 
+/*
+ * heper function: configure and start test device
+ */
+int
+test_dev_start(uint16_t port, struct rte_mempool *mp)
+{
+	int32_t rc;
+	struct rte_eth_conf pconf;
+
+	memset(&pconf, 0, sizeof(pconf));
+
+	rc =  rte_eth_dev_configure(port, NUM_QUEUES, NUM_QUEUES, &pconf);
+	if (rc != 0)
+		return rc;
+
+	rc = rte_eth_rx_queue_setup(port, 0, RING_SIZE, SOCKET_ID_ANY,
+		NULL, mp);
+	if (rc != 0)
+		return rc;
+
+	rc = rte_eth_tx_queue_setup(port, 0, RING_SIZE, SOCKET_ID_ANY,
+		NULL);
+	if (rc != 0)
+		return rc;
+
+	rc = rte_eth_dev_start(port);
+	return rc;
+}
+
 /* Sample test to create virtual rings and tx,rx portid from rings */
 int
 test_ring_setup(struct rte_ring **ring, uint16_t *portid)
diff --git a/app/test/sample_packet_forward.h b/app/test/sample_packet_forward.h
index 6789217de3..af0b1d9924 100644
--- a/app/test/sample_packet_forward.h
+++ b/app/test/sample_packet_forward.h
@@ -21,6 +21,9 @@ struct rte_ring;
 /* Sample test to create virtual rings and tx,rx portid from rings */
 int test_ring_setup(struct rte_ring **ring, uint16_t *portid);
 
+/* configure and start device created by test_ring_setup */
+int test_dev_start(uint16_t port, struct rte_mempool *mp);
+
 /* Sample test to free the virtual rings */
 void test_ring_free(struct rte_ring *rxtx);
 
diff --git a/app/test/test_bitratestats.c b/app/test/test_bitratestats.c
index f4a92c9be6..1ff540f4c4 100644
--- a/app/test/test_bitratestats.c
+++ b/app/test/test_bitratestats.c
@@ -11,6 +11,7 @@
 #include <rte_memzone.h>
 #include <rte_metrics.h>
 #include <rte_bitrate.h>
+#include <rte_ethdev.h>
 
 #include "sample_packet_forward.h"
 #include "test.h"
@@ -159,12 +160,21 @@ test_bit_packet_forward(void)
 		printf("allocate mbuf pool Failed\n");
 		return TEST_FAILED;
 	}
+	ret = test_dev_start(portid, mp);
+	if (ret < 0) {
+		printf("test_dev_start(%hu, %p) failed, error code: %d\n",
+			portid, mp, ret);
+		return TEST_FAILED;
+	}
+
 	ret = test_packet_forward(pbuf, portid, QUEUE_ID);
 	if (ret < 0)
 		printf("send pkts Failed\n");
+
+	rte_eth_dev_stop(portid);
 	test_put_mbuf_to_pool(mp, pbuf);
 
-	return TEST_SUCCESS;
+	return (ret >= 0) ? TEST_SUCCESS : TEST_FAILED;
 }
 
 static int
diff --git a/app/test/test_latencystats.c b/app/test/test_latencystats.c
index 724acbc315..db06c7d5c7 100644
--- a/app/test/test_latencystats.c
+++ b/app/test/test_latencystats.c
@@ -6,6 +6,7 @@
 #include <stdint.h>
 #include <string.h>
 
+#include <rte_ethdev.h>
 #include <rte_latencystats.h>
 #include "rte_lcore.h"
 #include "rte_metrics.h"
@@ -158,12 +159,21 @@ static int test_latency_packet_forward(void)
 		printf("allocate mbuf pool Failed\n");
 		return TEST_FAILED;
 	}
+	ret = test_dev_start(portid, mp);
+	if (ret < 0) {
+		printf("test_dev_start(%hu, %p) failed, error code: %d\n",
+			portid, mp, ret);
+		return TEST_FAILED;
+	}
+
 	ret = test_packet_forward(pbuf, portid, QUEUE_ID);
 	if (ret < 0)
 		printf("send pkts Failed\n");
+
+	rte_eth_dev_stop(portid);
 	test_put_mbuf_to_pool(mp, pbuf);
 
-	return TEST_SUCCESS;
+	return (ret >= 0) ? TEST_SUCCESS : TEST_FAILED;
 }
 
 static struct
diff --git a/app/test/test_pdump.c b/app/test/test_pdump.c
index 21fcc1bc4c..03b26dd26d 100644
--- a/app/test/test_pdump.c
+++ b/app/test/test_pdump.c
@@ -147,11 +147,19 @@ send_pkts(void *empty)
 	ret = test_get_mbuf_from_pool(&mp, pbuf, poolname);
 	if (ret < 0)
 		printf("get_mbuf_from_pool failed\n");
-	do {
+
+	ret = test_dev_start(portid, mp);
+	if (ret < 0)
+		printf("test_dev_start(%hu, %p) failed, error code: %d\n",
+			portid, mp, ret);
+
+	while (ret >= 0 && flag_for_send_pkts) {
 		ret = test_packet_forward(pbuf, portid, QUEUE_ID);
 		if (ret < 0)
 			printf("send pkts Failed\n");
-	} while (flag_for_send_pkts);
+	};
+
+	rte_eth_dev_stop(portid);
 	test_put_mbuf_to_pool(mp, pbuf);
 	return empty;
 }
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.770243814 +0800
+++ 0200-test-fix-ring-PMD-initialisation.patch	2021-11-10 14:17:02.010744945 +0800
@@ -1 +1 @@
-From b66412f24f17fcba5a248888bf4b3c1f5d6880de Mon Sep 17 00:00:00 2001
+From e9f391e952889dc47ebe53a005ee8ff55725cf31 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b66412f24f17fcba5a248888bf4b3c1f5d6880de ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -157 +159 @@
-index b49fcfb3f1..ea03056b47 100644
+index 21fcc1bc4c..03b26dd26d 100644

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'pipeline: fix build with ASan' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (199 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'test: fix ring PMD initialisation' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  7:27   ` Peng, ZhihongX
  2021-11-10  6:31 ` [dpdk-stable] patch 'examples/performance-thread: " Xueming Li
                   ` (51 subsequent siblings)
  252 siblings, 1 reply; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Zhihong Peng; +Cc: Luca Boccassi, Xueqin Lin, Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e7dd7a6c07e28be8f4319a6b3623d9810e4c4ced

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e7dd7a6c07e28be8f4319a6b3623d9810e4c4ced Mon Sep 17 00:00:00 2001
From: Zhihong Peng <zhihongx.peng@intel.com>
Date: Wed, 20 Oct 2021 15:46:42 +0800
Subject: [PATCH] pipeline: fix build with ASan
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 84f5ac9418ea9995975b30fa4ea57018f9618fc1 ]

Code changes to avoid the following build error:
"Control reaches end of non-void function".

Signed-off-by: Xueqin Lin <xueqin.lin@intel.com>
Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 lib/librte_pipeline/rte_swx_pipeline.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_pipeline/rte_swx_pipeline.c b/lib/librte_pipeline/rte_swx_pipeline.c
index 4a96b77e28..923fa8b769 100644
--- a/lib/librte_pipeline/rte_swx_pipeline.c
+++ b/lib/librte_pipeline/rte_swx_pipeline.c
@@ -3240,7 +3240,7 @@ instr_extern_translate(struct rte_swx_pipeline *p,
 		return 0;
 	}
 
-	CHECK(0, EINVAL);
+	return -EINVAL;
 }
 
 static inline void
@@ -5869,7 +5869,7 @@ instr_translate(struct rte_swx_pipeline *p,
 					      instr,
 					      data);
 
-	CHECK(0, EINVAL);
+	return -EINVAL;
 }
 
 static struct instruction_data *
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.811450551 +0800
+++ 0201-pipeline-fix-build-with-ASan.patch	2021-11-10 14:17:02.014078251 +0800
@@ -1 +1 @@
-From 84f5ac9418ea9995975b30fa4ea57018f9618fc1 Mon Sep 17 00:00:00 2001
+From e7dd7a6c07e28be8f4319a6b3623d9810e4c4ced Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 84f5ac9418ea9995975b30fa4ea57018f9618fc1 ]
@@ -13 +16 @@
- lib/pipeline/rte_swx_pipeline.c | 4 ++--
+ lib/librte_pipeline/rte_swx_pipeline.c | 4 ++--
@@ -16,5 +19,5 @@
-diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c
-index 5e089fb72b..1afaffefd4 100644
---- a/lib/pipeline/rte_swx_pipeline.c
-+++ b/lib/pipeline/rte_swx_pipeline.c
-@@ -4642,7 +4642,7 @@ instr_meter_translate(struct rte_swx_pipeline *p,
+diff --git a/lib/librte_pipeline/rte_swx_pipeline.c b/lib/librte_pipeline/rte_swx_pipeline.c
+index 4a96b77e28..923fa8b769 100644
+--- a/lib/librte_pipeline/rte_swx_pipeline.c
++++ b/lib/librte_pipeline/rte_swx_pipeline.c
+@@ -3240,7 +3240,7 @@ instr_extern_translate(struct rte_swx_pipeline *p,
@@ -29 +32 @@
-@@ -5937,7 +5937,7 @@ instr_translate(struct rte_swx_pipeline *p,
+@@ -5869,7 +5869,7 @@ instr_translate(struct rte_swx_pipeline *p,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'examples/performance-thread: fix build with ASan' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (200 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'pipeline: fix build with ASan' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  7:27   ` Peng, ZhihongX
  2021-11-10  6:31 ` [dpdk-stable] patch 'eal/freebsd: fix IOVA mode selection' " Xueming Li
                   ` (50 subsequent siblings)
  252 siblings, 1 reply; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Zhihong Peng; +Cc: Luca Boccassi, Xueqin Lin, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4b98552d4d3ca54ebc58014b4163e1164e2e4342

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4b98552d4d3ca54ebc58014b4163e1164e2e4342 Mon Sep 17 00:00:00 2001
From: Zhihong Peng <zhihongx.peng@intel.com>
Date: Wed, 20 Oct 2021 15:46:43 +0800
Subject: [PATCH] examples/performance-thread: fix build with ASan
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4d2d1258151657d69b0be5d118956b7e809f9d47 ]

Code changes to avoid the following build error:
"strncpy specified bound XX equals destination size".

Signed-off-by: Xueqin Lin <xueqin.lin@intel.com>
Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/performance-thread/common/lthread.c       | 4 ++--
 examples/performance-thread/common/lthread_cond.c  | 6 +++---
 examples/performance-thread/common/lthread_mutex.c | 6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/examples/performance-thread/common/lthread.c b/examples/performance-thread/common/lthread.c
index 3f1f48db43..190e5874b1 100644
--- a/examples/performance-thread/common/lthread.c
+++ b/examples/performance-thread/common/lthread.c
@@ -20,6 +20,7 @@
 #include <sys/mman.h>
 
 #include <rte_log.h>
+#include <rte_string_fns.h>
 #include <ctx.h>
 #include <stack.h>
 
@@ -463,6 +464,5 @@ void lthread_set_funcname(const char *f)
 {
 	struct lthread *lt = THIS_LTHREAD;
 
-	strncpy(lt->funcname, f, sizeof(lt->funcname));
-	lt->funcname[sizeof(lt->funcname)-1] = 0;
+	strlcpy(lt->funcname, f, sizeof(lt->funcname));
 }
diff --git a/examples/performance-thread/common/lthread_cond.c b/examples/performance-thread/common/lthread_cond.c
index cdcc7a7b5a..e7be17089a 100644
--- a/examples/performance-thread/common/lthread_cond.c
+++ b/examples/performance-thread/common/lthread_cond.c
@@ -20,6 +20,7 @@
 
 #include <rte_log.h>
 #include <rte_common.h>
+#include <rte_string_fns.h>
 
 #include "lthread_api.h"
 #include "lthread_diag_api.h"
@@ -57,10 +58,9 @@ lthread_cond_init(char *name, struct lthread_cond **cond,
 	}
 
 	if (name == NULL)
-		strncpy(c->name, "no name", sizeof(c->name));
+		strlcpy(c->name, "no name", sizeof(c->name));
 	else
-		strncpy(c->name, name, sizeof(c->name));
-	c->name[sizeof(c->name)-1] = 0;
+		strlcpy(c->name, name, sizeof(c->name));
 
 	c->root_sched = THIS_SCHED;
 
diff --git a/examples/performance-thread/common/lthread_mutex.c b/examples/performance-thread/common/lthread_mutex.c
index 01da6cad4f..709ab9f553 100644
--- a/examples/performance-thread/common/lthread_mutex.c
+++ b/examples/performance-thread/common/lthread_mutex.c
@@ -19,6 +19,7 @@
 #include <rte_log.h>
 #include <rte_spinlock.h>
 #include <rte_common.h>
+#include <rte_string_fns.h>
 
 #include "lthread_api.h"
 #include "lthread_int.h"
@@ -52,10 +53,9 @@ lthread_mutex_init(char *name, struct lthread_mutex **mutex,
 	}
 
 	if (name == NULL)
-		strncpy(m->name, "no name", sizeof(m->name));
+		strlcpy(m->name, "no name", sizeof(m->name));
 	else
-		strncpy(m->name, name, sizeof(m->name));
-	m->name[sizeof(m->name)-1] = 0;
+		strlcpy(m->name, name, sizeof(m->name));
 
 	m->root_sched = THIS_SCHED;
 	m->owner = NULL;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.858279926 +0800
+++ 0202-examples-performance-thread-fix-build-with-ASan.patch	2021-11-10 14:17:02.014078251 +0800
@@ -1 +1 @@
-From 4d2d1258151657d69b0be5d118956b7e809f9d47 Mon Sep 17 00:00:00 2001
+From 4b98552d4d3ca54ebc58014b4163e1164e2e4342 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4d2d1258151657d69b0be5d118956b7e809f9d47 ]
@@ -19 +22 @@
-index 98123f34f8..009374a8c3 100644
+index 3f1f48db43..190e5874b1 100644
@@ -30 +33 @@
-@@ -465,6 +466,5 @@ void lthread_set_funcname(const char *f)
+@@ -463,6 +464,5 @@ void lthread_set_funcname(const char *f)
@@ -64 +67 @@
-index 061fc5c19a..f3ec7c1c60 100644
+index 01da6cad4f..709ab9f553 100644

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'eal/freebsd: fix IOVA mode selection' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (201 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'examples/performance-thread: " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'test/cmdline: fix memory leak' " Xueming Li
                   ` (49 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Luca Boccassi, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b36c2e6dbc7d554a7dda5c4d90dca4ebd3d0890e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b36c2e6dbc7d554a7dda5c4d90dca4ebd3d0890e Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Tue, 2 Nov 2021 12:08:15 +0200
Subject: [PATCH] eal/freebsd: fix IOVA mode selection
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9790fc2149b7dc727526a13ff2bbeab09577aaef ]

FreeBSD EAL selected IOVA mode PA even in --no-huge mode
where PA are not available. Memory zones were created with IOVA
equal to RTE_BAD_IOVA with no indication this field is not usable.

Change IOVA mode detection:
1. Always allow to force --iova-mode=va.
2. In --no-huge mode, disallow forcing --iova-mode=pa, and select VA.
3. Otherwise select IOVA mode according to bus requests, default to PA.
In case contigmem is inaccessible, memory initialization will fail
with a message indicating the cause.

Fixes: c2361bab70c5 ("eal: compute IOVA mode based on PA availability")

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/freebsd/eal.c | 37 ++++++++++++++++++++++++------------
 1 file changed, 25 insertions(+), 12 deletions(-)

diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
index d784437669..957273a9bb 100644
--- a/lib/librte_eal/freebsd/eal.c
+++ b/lib/librte_eal/freebsd/eal.c
@@ -675,6 +675,8 @@ rte_eal_init(int argc, char **argv)
 	const struct rte_config *config = rte_eal_get_configuration();
 	struct internal_config *internal_conf =
 		eal_get_internal_configuration();
+	bool has_phys_addr;
+	enum rte_iova_mode iova_mode;
 
 	/* checks if the machine is adequate */
 	if (!rte_cpu_is_supported()) {
@@ -775,19 +777,30 @@ rte_eal_init(int argc, char **argv)
 		return -1;
 	}
 
-	/* if no EAL option "--iova-mode=<pa|va>", use bus IOVA scheme */
-	if (internal_conf->iova_mode == RTE_IOVA_DC) {
-		/* autodetect the IOVA mapping mode (default is RTE_IOVA_PA) */
-		enum rte_iova_mode iova_mode = rte_bus_get_iommu_class();
-
-		if (iova_mode == RTE_IOVA_DC)
-			iova_mode = RTE_IOVA_PA;
-		rte_eal_get_configuration()->iova_mode = iova_mode;
-	} else {
-		rte_eal_get_configuration()->iova_mode =
-			internal_conf->iova_mode;
+	/*
+	 * PA are only available for hugepages via contigmem.
+	 * If contigmem is inaccessible, rte_eal_hugepage_init() will fail
+	 * with a message describing the cause.
+	 */
+	has_phys_addr = internal_conf->no_hugetlbfs == 0;
+	iova_mode = internal_conf->iova_mode;
+	if (iova_mode == RTE_IOVA_PA && !has_phys_addr) {
+		rte_eal_init_alert("Cannot use IOVA as 'PA' since physical addresses are not available");
+		rte_errno = EINVAL;
+		return -1;
 	}
-
+	if (iova_mode == RTE_IOVA_DC) {
+		RTE_LOG(DEBUG, EAL, "Specific IOVA mode is not requested, autodetecting\n");
+		if (has_phys_addr) {
+			RTE_LOG(DEBUG, EAL, "Selecting IOVA mode according to bus requests\n");
+			iova_mode = rte_bus_get_iommu_class();
+			if (iova_mode == RTE_IOVA_DC)
+				iova_mode = RTE_IOVA_PA;
+		} else {
+			iova_mode = RTE_IOVA_VA;
+		}
+	}
+	rte_eal_get_configuration()->iova_mode = iova_mode;
 	RTE_LOG(INFO, EAL, "Selected IOVA mode '%s'\n",
 		rte_eal_iova_mode() == RTE_IOVA_PA ? "PA" : "VA");
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.899340120 +0800
+++ 0203-eal-freebsd-fix-IOVA-mode-selection.patch	2021-11-10 14:17:02.014078251 +0800
@@ -1 +1 @@
-From 9790fc2149b7dc727526a13ff2bbeab09577aaef Mon Sep 17 00:00:00 2001
+From b36c2e6dbc7d554a7dda5c4d90dca4ebd3d0890e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9790fc2149b7dc727526a13ff2bbeab09577aaef ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
- lib/eal/freebsd/eal.c | 37 +++++++++++++++++++++++++------------
+ lib/librte_eal/freebsd/eal.c | 37 ++++++++++++++++++++++++------------
@@ -26,5 +28,5 @@
-diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c
-index 9935356ed4..2c2baaa691 100644
---- a/lib/eal/freebsd/eal.c
-+++ b/lib/eal/freebsd/eal.c
-@@ -677,6 +677,8 @@ rte_eal_init(int argc, char **argv)
+diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
+index d784437669..957273a9bb 100644
+--- a/lib/librte_eal/freebsd/eal.c
++++ b/lib/librte_eal/freebsd/eal.c
+@@ -675,6 +675,8 @@ rte_eal_init(int argc, char **argv)
@@ -39 +41 @@
-@@ -777,19 +779,30 @@ rte_eal_init(int argc, char **argv)
+@@ -775,19 +777,30 @@ rte_eal_init(int argc, char **argv)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'test/cmdline: fix memory leak' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (202 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'eal/freebsd: fix IOVA mode selection' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'test/mbuf: fix access to freed memory' " Xueming Li
                   ` (48 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e8a4c7a8d07eb7ec0a3e543ce99c8a1d09b8ac2a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e8a4c7a8d07eb7ec0a3e543ce99c8a1d09b8ac2a Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 29 Oct 2021 13:23:15 +0200
Subject: [PATCH] test/cmdline: fix memory leak
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 86e361cdeb495c70a154f25cd47fd6581c9aff89 ]

Previous change wrongly removed cmdline_free().

Fixes: 6ad06203a587 ("cmdline: free on exit")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 app/test/test_cmdline_lib.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index 6bcfa6511e..94c9ce04b4 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -170,6 +170,8 @@ test_cmdline_socket_fns(void)
 		printf("Error: failed to open /dev/null for reading!");
 		return -1;
 	}
+	cmdline_free(cl);
+	cl = NULL;
 
 	/* void functions */
 	cmdline_stdin_exit(NULL);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.940494564 +0800
+++ 0204-test-cmdline-fix-memory-leak.patch	2021-11-10 14:17:02.014078251 +0800
@@ -1 +1 @@
-From 86e361cdeb495c70a154f25cd47fd6581c9aff89 Mon Sep 17 00:00:00 2001
+From e8a4c7a8d07eb7ec0a3e543ce99c8a1d09b8ac2a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 86e361cdeb495c70a154f25cd47fd6581c9aff89 ]
@@ -17 +20 @@
-index f238094b07..f50ccdb599 100644
+index 6bcfa6511e..94c9ce04b4 100644
@@ -20 +23 @@
-@@ -176,6 +176,8 @@ test_cmdline_socket_fns(void)
+@@ -170,6 +170,8 @@ test_cmdline_socket_fns(void)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'test/mbuf: fix access to freed memory' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (203 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'test/cmdline: fix memory leak' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'eal: fix device iterator when no bus is selected' " Xueming Li
                   ` (47 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Luca Boccassi, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/91ec527f27d1988bc88678ca37e16e7f5b988799

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 91ec527f27d1988bc88678ca37e16e7f5b988799 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Fri, 29 Oct 2021 14:15:44 +0200
Subject: [PATCH] test/mbuf: fix access to freed memory
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7dc627426e534c3b04e4f872343e1899df26471e ]

Seen by ASan.

In the external buffer mbuf test, we check that the buffer is freed
by checking that its refcount is 0.
This is not a valid condition, because it accesses to an already
freed area.

Fix this by setting a boolean flag in the callback when rte_free()
is actually called, and check this flag instead.

Bugzilla ID: 867
Fixes: 7b295dceea07 ("test/mbuf: add unit test cases")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_mbuf.c | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 69a361c2f5..a6c11dd5b1 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -2305,16 +2305,16 @@ fail:
 
 /* Define a free call back function to be used for external buffer */
 static void
-ext_buf_free_callback_fn(void *addr __rte_unused, void *opaque)
+ext_buf_free_callback_fn(void *addr, void *opaque)
 {
-	void *ext_buf_addr = opaque;
+	bool *freed = opaque;
 
-	if (ext_buf_addr == NULL) {
+	if (addr == NULL) {
 		printf("External buffer address is invalid\n");
 		return;
 	}
-	rte_free(ext_buf_addr);
-	ext_buf_addr = NULL;
+	rte_free(addr);
+	*freed = true;
 	printf("External buffer freed via callback\n");
 }
 
@@ -2338,6 +2338,7 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
 	void *ext_buf_addr = NULL;
 	uint16_t buf_len = EXT_BUF_TEST_DATA_LEN +
 				sizeof(struct rte_mbuf_ext_shared_info);
+	bool freed = false;
 
 	/* alloc a mbuf */
 	m = rte_pktmbuf_alloc(pktmbuf_pool);
@@ -2353,7 +2354,7 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
 		GOTO_FAIL("%s: External buffer allocation failed\n", __func__);
 
 	ret_shinfo = rte_pktmbuf_ext_shinfo_init_helper(ext_buf_addr, &buf_len,
-		ext_buf_free_callback_fn, ext_buf_addr);
+		ext_buf_free_callback_fn, &freed);
 	if (ret_shinfo == NULL)
 		GOTO_FAIL("%s: Shared info initialization failed!\n", __func__);
 
@@ -2386,26 +2387,35 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
 
 	if (rte_mbuf_ext_refcnt_read(ret_shinfo) != 2)
 		GOTO_FAIL("%s: Invalid ext_buf ref_cnt\n", __func__);
+	if (freed)
+		GOTO_FAIL("%s: extbuf should not be freed\n", __func__);
 
 	/* test to manually update ext_buf_ref_cnt from 2 to 3*/
 	rte_mbuf_ext_refcnt_update(ret_shinfo, 1);
 	if (rte_mbuf_ext_refcnt_read(ret_shinfo) != 3)
 		GOTO_FAIL("%s: Update ext_buf ref_cnt failed\n", __func__);
+	if (freed)
+		GOTO_FAIL("%s: extbuf should not be freed\n", __func__);
 
 	/* reset the ext_refcnt before freeing the external buffer */
 	rte_mbuf_ext_refcnt_set(ret_shinfo, 2);
 	if (rte_mbuf_ext_refcnt_read(ret_shinfo) != 2)
 		GOTO_FAIL("%s: set ext_buf ref_cnt failed\n", __func__);
+	if (freed)
+		GOTO_FAIL("%s: extbuf should not be freed\n", __func__);
 
 	/* detach the external buffer from mbufs */
 	rte_pktmbuf_detach_extbuf(m);
 	/* check if ref cnt is decremented */
 	if (rte_mbuf_ext_refcnt_read(ret_shinfo) != 1)
 		GOTO_FAIL("%s: Invalid ext_buf ref_cnt\n", __func__);
+	if (freed)
+		GOTO_FAIL("%s: extbuf should not be freed\n", __func__);
 
 	rte_pktmbuf_detach_extbuf(clone);
-	if (rte_mbuf_ext_refcnt_read(ret_shinfo) != 0)
-		GOTO_FAIL("%s: Invalid ext_buf ref_cnt\n", __func__);
+	if (!freed)
+		GOTO_FAIL("%s: extbuf should be freed\n", __func__);
+	freed = false;
 
 	rte_pktmbuf_free(m);
 	m = NULL;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:10.980846666 +0800
+++ 0205-test-mbuf-fix-access-to-freed-memory.patch	2021-11-10 14:17:02.014078251 +0800
@@ -1 +1 @@
-From 7dc627426e534c3b04e4f872343e1899df26471e Mon Sep 17 00:00:00 2001
+From 91ec527f27d1988bc88678ca37e16e7f5b988799 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7dc627426e534c3b04e4f872343e1899df26471e ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 94d1cdde37..f93bcef8a9 100644
+index 69a361c2f5..a6c11dd5b1 100644
@@ -31 +33 @@
-@@ -2307,16 +2307,16 @@ fail:
+@@ -2305,16 +2305,16 @@ fail:
@@ -53 +55 @@
-@@ -2340,6 +2340,7 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
+@@ -2338,6 +2338,7 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
@@ -61 +63 @@
-@@ -2355,7 +2356,7 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
+@@ -2353,7 +2354,7 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
@@ -70 +72 @@
-@@ -2388,26 +2389,35 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
+@@ -2386,26 +2387,35 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'eal: fix device iterator when no bus is selected' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (204 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'test/mbuf: fix access to freed memory' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'eal/linux: remove unused variable for socket memory' " Xueming Li
                   ` (46 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Xueming Li; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d02f2de893f028899690957a8883aea4889c9983

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d02f2de893f028899690957a8883aea4889c9983 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Wed, 27 Oct 2021 16:22:21 +0800
Subject: [PATCH] eal: fix device iterator when no bus is selected
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit fc382022c6adcde57eb30e58186198275ad493d7 ]

Devargs used in device iterator initialization wasn't set to zero, random
data like bus string lead to invalid address access.

This patch initializes devargs.

Bugzilla ID: 862
Fixes: c99a2d4c6b7f ("eal: implement device iteration initialization")

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
---
 lib/librte_eal/common/eal_common_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
index 8a3bd3100a..3358f1328a 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -575,7 +575,7 @@ int
 rte_dev_iterator_init(struct rte_dev_iterator *it,
 		      const char *dev_str)
 {
-	struct rte_devargs devargs;
+	struct rte_devargs devargs = { .bus = NULL };
 	struct rte_class *cls = NULL;
 	struct rte_bus *bus = NULL;
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.022832241 +0800
+++ 0206-eal-fix-device-iterator-when-no-bus-is-selected.patch	2021-11-10 14:17:02.017411557 +0800
@@ -1 +1 @@
-From fc382022c6adcde57eb30e58186198275ad493d7 Mon Sep 17 00:00:00 2001
+From d02f2de893f028899690957a8883aea4889c9983 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fc382022c6adcde57eb30e58186198275ad493d7 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
- lib/eal/common/eal_common_dev.c | 2 +-
+ lib/librte_eal/common/eal_common_dev.c | 2 +-
@@ -20,5 +22,5 @@
-diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
-index 148a23830a..e1e9976d8d 100644
---- a/lib/eal/common/eal_common_dev.c
-+++ b/lib/eal/common/eal_common_dev.c
-@@ -573,7 +573,7 @@ int
+diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
+index 8a3bd3100a..3358f1328a 100644
+--- a/lib/librte_eal/common/eal_common_dev.c
++++ b/lib/librte_eal/common/eal_common_dev.c
+@@ -575,7 +575,7 @@ int

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'eal/linux: remove unused variable for socket memory' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (205 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'eal: fix device iterator when no bus is selected' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'eal/linux: fix uevent message parsing' " Xueming Li
                   ` (45 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Jim Harris; +Cc: Luca Boccassi, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/30e6ba6bc4bff4abac8b790767f126387ca83f6b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 30e6ba6bc4bff4abac8b790767f126387ca83f6b Mon Sep 17 00:00:00 2001
From: Jim Harris <james.r.harris@intel.com>
Date: Fri, 29 Oct 2021 17:14:10 +0000
Subject: [PATCH] eal/linux: remove unused variable for socket memory
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 628bac7df18904c7083c8ad04669c69688f352de ]

clang-13 rightfully complains that the total_mem variable in
eal_parse_socket_arg is set but not used, since the final
accumulated total_mem result isn't used anywhere.
So just remove the total_mem variable.

Fixes: 0a703f0f36c1 ("eal/linux: fix parsing zero socket memory and limits")

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/linux/eal.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c
index 2ccbad7b08..814572ccbd 100644
--- a/lib/librte_eal/linux/eal.c
+++ b/lib/librte_eal/linux/eal.c
@@ -561,7 +561,6 @@ eal_parse_socket_arg(char *strval, volatile uint64_t *socket_arg)
 	char * arg[RTE_MAX_NUMA_NODES];
 	char *end;
 	int arg_num, i, len;
-	uint64_t total_mem = 0;
 
 	len = strnlen(strval, SOCKET_MEM_STRLEN);
 	if (len == SOCKET_MEM_STRLEN) {
@@ -593,7 +592,6 @@ eal_parse_socket_arg(char *strval, volatile uint64_t *socket_arg)
 				(arg[i][0] == '\0') || (end == NULL) || (*end != '\0'))
 			return -1;
 		val <<= 20;
-		total_mem += val;
 		socket_arg[i] = val;
 	}
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.063314885 +0800
+++ 0207-eal-linux-remove-unused-variable-for-socket-memory.patch	2021-11-10 14:17:02.017411557 +0800
@@ -1 +1 @@
-From 628bac7df18904c7083c8ad04669c69688f352de Mon Sep 17 00:00:00 2001
+From 30e6ba6bc4bff4abac8b790767f126387ca83f6b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 628bac7df18904c7083c8ad04669c69688f352de ]
@@ -16 +19 @@
- lib/eal/linux/eal.c | 2 --
+ lib/librte_eal/linux/eal.c | 2 --
@@ -19,5 +22,5 @@
-diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
-index 81fdebc6a0..60b4924838 100644
---- a/lib/eal/linux/eal.c
-+++ b/lib/eal/linux/eal.c
-@@ -562,7 +562,6 @@ eal_parse_socket_arg(char *strval, volatile uint64_t *socket_arg)
+diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c
+index 2ccbad7b08..814572ccbd 100644
+--- a/lib/librte_eal/linux/eal.c
++++ b/lib/librte_eal/linux/eal.c
+@@ -561,7 +561,6 @@ eal_parse_socket_arg(char *strval, volatile uint64_t *socket_arg)
@@ -31 +34 @@
-@@ -594,7 +593,6 @@ eal_parse_socket_arg(char *strval, volatile uint64_t *socket_arg)
+@@ -593,7 +592,6 @@ eal_parse_socket_arg(char *strval, volatile uint64_t *socket_arg)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'eal/linux: fix uevent message parsing' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (206 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'eal/linux: remove unused variable for socket memory' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'malloc: fix allocation with unknown socket ID' " Xueming Li
                   ` (44 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Yan Xia, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3c1d9e3840a22f606b40fa8972d62cd848ffdbac

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3c1d9e3840a22f606b40fa8972d62cd848ffdbac Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 2 Nov 2021 19:40:20 +0100
Subject: [PATCH] eal/linux: fix uevent message parsing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4847122aab5ced55b3c656e8ee425e90c6eb5904 ]

Caught with ASan:
==9727==ERROR: AddressSanitizer: stack-buffer-overflow on address
  0x7f0daa2fc0d0 at pc 0x7f0daeefacb2 bp 0x7f0daa2fadd0 sp 0x7f0daa2fa578
READ of size 1 at 0x7f0daa2fc0d0 thread T1
    #0 0x7f0daeefacb1  (/lib64/libasan.so.5+0xbacb1)
    #1 0x115eba1 in dev_uev_parse ../lib/eal/linux/eal_dev.c:167
    #2 0x115f281 in dev_uev_handler ../lib/eal/linux/eal_dev.c:248
    #3 0x1169b91 in eal_intr_process_interrupts
  ../lib/eal/linux/eal_interrupts.c:1026
    #4 0x116a3a2 in eal_intr_handle_interrupts
  ../lib/eal/linux/eal_interrupts.c:1100
    #5 0x116a7f0 in eal_intr_thread_main
  ../lib/eal/linux/eal_interrupts.c:1172
    #6 0x112640a in ctrl_thread_init
  ../lib/eal/common/eal_common_thread.c:202
    #7 0x7f0dade27159 in start_thread (/lib64/libpthread.so.0+0x8159)
    #8 0x7f0dadb58f72 in clone (/lib64/libc.so.6+0xfcf72)

Address 0x7f0daa2fc0d0 is located in stack of thread T1 at offset 4192
  in frame
    #0 0x115f0c9 in dev_uev_handler ../lib/eal/linux/eal_dev.c:226

  This frame has 2 object(s):
    [32, 48) 'uevent'
    [96, 4192) 'buf' <== Memory access at offset 4192 overflows this
  variable
HINT: this may be a false positive if your program uses some custom
  stack unwind mechanism or swapcontext
      (longjmp and C++ exceptions *are* supported)
Thread T1 created by T0 here:
    #0 0x7f0daee92ea3 in __interceptor_pthread_create
  (/lib64/libasan.so.5+0x52ea3)
    #1 0x1126542 in rte_ctrl_thread_create
  ../lib/eal/common/eal_common_thread.c:228
    #2 0x116a8b5 in rte_eal_intr_init
  ../lib/eal/linux/eal_interrupts.c:1200
    #3 0x1159dd1 in rte_eal_init ../lib/eal/linux/eal.c:1044
    #4 0x7a22f8 in main ../app/test-pmd/testpmd.c:4105
    #5 0x7f0dada7f802 in __libc_start_main (/lib64/libc.so.6+0x23802)

Bugzilla ID: 792
Fixes: 0d0f478d0483 ("eal/linux: add uevent parse and process")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Yan Xia <yanx.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_eal/linux/eal_dev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_eal/linux/eal_dev.c b/lib/librte_eal/linux/eal_dev.c
index 5c0e752b2d..ae0021e7b5 100644
--- a/lib/librte_eal/linux/eal_dev.c
+++ b/lib/librte_eal/linux/eal_dev.c
@@ -157,6 +157,9 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
 				break;
 			buf++;
 		}
+		if (i >= length)
+			break;
+
 		/**
 		 * check device uevent from kernel side, no need to check
 		 * uevent from udev.
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.104421332 +0800
+++ 0208-eal-linux-fix-uevent-message-parsing.patch	2021-11-10 14:17:02.017411557 +0800
@@ -1 +1 @@
-From 4847122aab5ced55b3c656e8ee425e90c6eb5904 Mon Sep 17 00:00:00 2001
+From 3c1d9e3840a22f606b40fa8972d62cd848ffdbac Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4847122aab5ced55b3c656e8ee425e90c6eb5904 ]
@@ -48 +50,0 @@
-Cc: stable@dpdk.org
@@ -54 +56 @@
- lib/eal/linux/eal_dev.c | 3 +++
+ lib/librte_eal/linux/eal_dev.c | 3 +++
@@ -57,5 +59,5 @@
-diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c
-index 06820a3666..6aaeffb4e9 100644
---- a/lib/eal/linux/eal_dev.c
-+++ b/lib/eal/linux/eal_dev.c
-@@ -160,6 +160,9 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
+diff --git a/lib/librte_eal/linux/eal_dev.c b/lib/librte_eal/linux/eal_dev.c
+index 5c0e752b2d..ae0021e7b5 100644
+--- a/lib/librte_eal/linux/eal_dev.c
++++ b/lib/librte_eal/linux/eal_dev.c
+@@ -157,6 +157,9 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'malloc: fix allocation with unknown socket ID' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (207 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'eal/linux: fix uevent message parsing' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'mem: fix dynamic hugepage mapping in container' " Xueming Li
                   ` (43 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Ilyes Ben Hamouda
  Cc: Luca Boccassi, Olivier Matz, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3f1ba3396e6701e20eb4b2eead4ca4c36629e5fb

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3f1ba3396e6701e20eb4b2eead4ca4c36629e5fb Mon Sep 17 00:00:00 2001
From: Ilyes Ben Hamouda <ilyes.ben_hamouda@6wind.com>
Date: Fri, 29 Oct 2021 11:49:29 +0200
Subject: [PATCH] malloc: fix allocation with unknown socket ID
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 770d41bf33090462319c765c86a4c1979dc2a148 ]

When using rte_malloc() from a thread which is not bound to a numa
socket (the typical case is a control thread, but it can also happen
on a dataplane thread if its cpu affinity is on cores attached to
several sockets), the used heap is the one from numa socket 0, which
may not have available memory.

Fix this by selecting the first socket which has available memory.

Note: malloc_get_numa_socket() is only used from one .c file, so move
it there, and remove the inline keyword.

Fixes: b94580d6887e ("malloc: avoid unknown socket id")

Signed-off-by: Ilyes Ben Hamouda <ilyes.ben_hamouda@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/common/malloc_heap.c | 20 ++++++++++++++++++++
 lib/librte_eal/common/malloc_heap.h | 11 -----------
 2 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c
index 5a09247a65..350ff97ee0 100644
--- a/lib/librte_eal/common/malloc_heap.c
+++ b/lib/librte_eal/common/malloc_heap.c
@@ -693,6 +693,26 @@ alloc_unlock:
 	return ret;
 }
 
+static unsigned int
+malloc_get_numa_socket(void)
+{
+	const struct internal_config *conf = eal_get_internal_configuration();
+	unsigned int socket_id = rte_socket_id();
+	unsigned int idx;
+
+	if (socket_id != (unsigned int)SOCKET_ID_ANY)
+		return socket_id;
+
+	/* for control threads, return first socket where memory is available */
+	for (idx = 0; idx < rte_socket_count(); idx++) {
+		socket_id = rte_socket_id_by_idx(idx);
+		if (conf->socket_mem[socket_id] != 0)
+			return socket_id;
+	}
+
+	return rte_socket_id_by_idx(0);
+}
+
 void *
 malloc_heap_alloc(const char *type, size_t size, int socket_arg,
 		unsigned int flags, size_t align, size_t bound, bool contig)
diff --git a/lib/librte_eal/common/malloc_heap.h b/lib/librte_eal/common/malloc_heap.h
index 772736b53f..dfd57e6a56 100644
--- a/lib/librte_eal/common/malloc_heap.h
+++ b/lib/librte_eal/common/malloc_heap.h
@@ -37,17 +37,6 @@ struct malloc_heap {
 extern "C" {
 #endif
 
-static inline unsigned
-malloc_get_numa_socket(void)
-{
-	unsigned socket_id = rte_socket_id();
-
-	if (socket_id == (unsigned)SOCKET_ID_ANY)
-		return 0;
-
-	return socket_id;
-}
-
 void *
 malloc_heap_alloc(const char *type, size_t size, int socket, unsigned int flags,
 		size_t align, size_t bound, bool contig);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.145362466 +0800
+++ 0209-malloc-fix-allocation-with-unknown-socket-ID.patch	2021-11-10 14:17:02.017411557 +0800
@@ -1 +1 @@
-From 770d41bf33090462319c765c86a4c1979dc2a148 Mon Sep 17 00:00:00 2001
+From 3f1ba3396e6701e20eb4b2eead4ca4c36629e5fb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 770d41bf33090462319c765c86a4c1979dc2a148 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -24,2 +26,2 @@
- lib/eal/common/malloc_heap.c | 20 ++++++++++++++++++++
- lib/eal/common/malloc_heap.h | 11 -----------
+ lib/librte_eal/common/malloc_heap.c | 20 ++++++++++++++++++++
+ lib/librte_eal/common/malloc_heap.h | 11 -----------
@@ -28,5 +30,5 @@
-diff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/malloc_heap.c
-index 775d6789df..55aad2711b 100644
---- a/lib/eal/common/malloc_heap.c
-+++ b/lib/eal/common/malloc_heap.c
-@@ -699,6 +699,26 @@ alloc_unlock:
+diff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c
+index 5a09247a65..350ff97ee0 100644
+--- a/lib/librte_eal/common/malloc_heap.c
++++ b/lib/librte_eal/common/malloc_heap.c
+@@ -693,6 +693,26 @@ alloc_unlock:
@@ -59,7 +61,7 @@
-diff --git a/lib/eal/common/malloc_heap.h b/lib/eal/common/malloc_heap.h
-index 3a6ec6ecf0..3a29d024b4 100644
---- a/lib/eal/common/malloc_heap.h
-+++ b/lib/eal/common/malloc_heap.h
-@@ -33,17 +33,6 @@ struct malloc_heap {
- 	char name[RTE_HEAP_NAME_MAX_LEN];
- } __rte_cache_aligned;
+diff --git a/lib/librte_eal/common/malloc_heap.h b/lib/librte_eal/common/malloc_heap.h
+index 772736b53f..dfd57e6a56 100644
+--- a/lib/librte_eal/common/malloc_heap.h
++++ b/lib/librte_eal/common/malloc_heap.h
+@@ -37,17 +37,6 @@ struct malloc_heap {
+ extern "C" {
+ #endif

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'mem: fix dynamic hugepage mapping in container' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (208 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'malloc: fix allocation with unknown socket ID' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/ice: fix function pointer in multi-process' " Xueming Li
                   ` (42 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Luca Boccassi, Maxime Coquelin, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/94d2d9eefada4056cc3f3ccf51f7391f4e8f014b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 94d2d9eefada4056cc3f3ccf51f7391f4e8f014b Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Fri, 29 Oct 2021 11:53:10 +0200
Subject: [PATCH] mem: fix dynamic hugepage mapping in container
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9bffc92850e8524474eebe2d559d09bdf3f0b96b ]

Since its introduction in 2018, the SIGBUS handler was never registered,
and all related functions were unused.

A SIGBUS can be received by the application when accessing to hugepages
even if mmap() was successful, This happens especially when running
inside containers when there is not enough hugepages. In this case, we
need to recover. A similar scheme can be found in eal_memory.c.

Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/linux/eal_memalloc.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/linux/eal_memalloc.c b/lib/librte_eal/linux/eal_memalloc.c
index c590d60430..fa73468285 100644
--- a/lib/librte_eal/linux/eal_memalloc.c
+++ b/lib/librte_eal/linux/eal_memalloc.c
@@ -107,7 +107,7 @@ static struct rte_memseg_list local_memsegs[RTE_MAX_MEMSEG_LISTS];
 
 static sigjmp_buf huge_jmpenv;
 
-static void __rte_unused huge_sigbus_handler(int signo __rte_unused)
+static void huge_sigbus_handler(int signo __rte_unused)
 {
 	siglongjmp(huge_jmpenv, 1);
 }
@@ -116,7 +116,7 @@ static void __rte_unused huge_sigbus_handler(int signo __rte_unused)
  * non-static local variable in the stack frame calling sigsetjmp might be
  * clobbered by a call to longjmp.
  */
-static int __rte_unused huge_wrap_sigsetjmp(void)
+static int huge_wrap_sigsetjmp(void)
 {
 	return sigsetjmp(huge_jmpenv, 1);
 }
@@ -124,7 +124,7 @@ static int __rte_unused huge_wrap_sigsetjmp(void)
 static struct sigaction huge_action_old;
 static int huge_need_recover;
 
-static void __rte_unused
+static void
 huge_register_sigbus(void)
 {
 	sigset_t mask;
@@ -139,7 +139,7 @@ huge_register_sigbus(void)
 	huge_need_recover = !sigaction(SIGBUS, &action, &huge_action_old);
 }
 
-static void __rte_unused
+static void
 huge_recover_sigbus(void)
 {
 	if (huge_need_recover) {
@@ -576,6 +576,8 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
 		mmap_flags = MAP_SHARED | MAP_POPULATE | MAP_FIXED;
 	}
 
+	huge_register_sigbus();
+
 	/*
 	 * map the segment, and populate page tables, the kernel fills
 	 * this segment with zeros if it's a new page.
@@ -651,6 +653,8 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
 				__func__);
 #endif
 
+	huge_recover_sigbus();
+
 	ms->addr = addr;
 	ms->hugepage_sz = alloc_sz;
 	ms->len = alloc_sz;
@@ -664,6 +668,7 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
 mapped:
 	munmap(addr, alloc_sz);
 unmapped:
+	huge_recover_sigbus();
 	flags = EAL_RESERVE_FORCE_ADDRESS;
 	new_addr = eal_get_virtual_area(addr, &alloc_sz, alloc_sz, 0, flags);
 	if (new_addr != addr) {
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.186584202 +0800
+++ 0210-mem-fix-dynamic-hugepage-mapping-in-container.patch	2021-11-10 14:17:02.020744864 +0800
@@ -1 +1 @@
-From 9bffc92850e8524474eebe2d559d09bdf3f0b96b Mon Sep 17 00:00:00 2001
+From 94d2d9eefada4056cc3f3ccf51f7391f4e8f014b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9bffc92850e8524474eebe2d559d09bdf3f0b96b ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
- lib/eal/linux/eal_memalloc.c | 13 +++++++++----
+ lib/librte_eal/linux/eal_memalloc.c | 13 +++++++++----
@@ -24,4 +26,4 @@
-diff --git a/lib/eal/linux/eal_memalloc.c b/lib/eal/linux/eal_memalloc.c
-index 0ec8542283..337f2bc739 100644
---- a/lib/eal/linux/eal_memalloc.c
-+++ b/lib/eal/linux/eal_memalloc.c
+diff --git a/lib/librte_eal/linux/eal_memalloc.c b/lib/librte_eal/linux/eal_memalloc.c
+index c590d60430..fa73468285 100644
+--- a/lib/librte_eal/linux/eal_memalloc.c
++++ b/lib/librte_eal/linux/eal_memalloc.c

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/ice: fix function pointer in multi-process' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (209 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'mem: fix dynamic hugepage mapping in container' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/iavf: fix shared data " Xueming Li
                   ` (41 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/62ad28d888e291d10a59c4218bc4d2deeeb96c5a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 62ad28d888e291d10a59c4218bc4d2deeeb96c5a Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Tue, 26 Oct 2021 09:55:42 +0800
Subject: [PATCH] net/ice: fix function pointer in multi-process
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 20b631efe785819eb77aabbf500b3352e5731bdb ]

This patch uses the index value to call the function, instead of the
function pointer assignment to save the selection of Receive Flex
Descriptor profile ID.

Otherwise the secondary process will run with wrong function address
from primary process.

Fixes: 7a340b0b4e03 ("net/ice: refactor Rx FlexiMD handling")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ice/ice_rxtx.c | 32 ++++++++++++++++++--------------
 drivers/net/ice/ice_rxtx.h |  2 +-
 2 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 906fca15b0..e16ec5be64 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -170,51 +170,55 @@ ice_rxd_to_pkt_fields_by_comms_aux_v2(struct ice_rx_queue *rxq,
 #endif
 }
 
+static const ice_rxd_to_pkt_fields_t rxd_to_pkt_fields_ops[] = {
+	[ICE_RXDID_COMMS_AUX_VLAN] = ice_rxd_to_pkt_fields_by_comms_aux_v1,
+	[ICE_RXDID_COMMS_AUX_IPV4] = ice_rxd_to_pkt_fields_by_comms_aux_v1,
+	[ICE_RXDID_COMMS_AUX_IPV6] = ice_rxd_to_pkt_fields_by_comms_aux_v1,
+	[ICE_RXDID_COMMS_AUX_IPV6_FLOW] = ice_rxd_to_pkt_fields_by_comms_aux_v1,
+	[ICE_RXDID_COMMS_AUX_TCP] = ice_rxd_to_pkt_fields_by_comms_aux_v1,
+	[ICE_RXDID_COMMS_AUX_IP_OFFSET] = ice_rxd_to_pkt_fields_by_comms_aux_v2,
+	[ICE_RXDID_COMMS_GENERIC] = ice_rxd_to_pkt_fields_by_comms_generic,
+	[ICE_RXDID_COMMS_OVS] = ice_rxd_to_pkt_fields_by_comms_ovs,
+};
+
 void
 ice_select_rxd_to_pkt_fields_handler(struct ice_rx_queue *rxq, uint32_t rxdid)
 {
+	rxq->rxdid = rxdid;
+
 	switch (rxdid) {
 	case ICE_RXDID_COMMS_AUX_VLAN:
 		rxq->xtr_ol_flag = rte_net_ice_dynflag_proto_xtr_vlan_mask;
-		rxq->rxd_to_pkt_fields = ice_rxd_to_pkt_fields_by_comms_aux_v1;
 		break;
 
 	case ICE_RXDID_COMMS_AUX_IPV4:
 		rxq->xtr_ol_flag = rte_net_ice_dynflag_proto_xtr_ipv4_mask;
-		rxq->rxd_to_pkt_fields = ice_rxd_to_pkt_fields_by_comms_aux_v1;
 		break;
 
 	case ICE_RXDID_COMMS_AUX_IPV6:
 		rxq->xtr_ol_flag = rte_net_ice_dynflag_proto_xtr_ipv6_mask;
-		rxq->rxd_to_pkt_fields = ice_rxd_to_pkt_fields_by_comms_aux_v1;
 		break;
 
 	case ICE_RXDID_COMMS_AUX_IPV6_FLOW:
 		rxq->xtr_ol_flag = rte_net_ice_dynflag_proto_xtr_ipv6_flow_mask;
-		rxq->rxd_to_pkt_fields = ice_rxd_to_pkt_fields_by_comms_aux_v1;
 		break;
 
 	case ICE_RXDID_COMMS_AUX_TCP:
 		rxq->xtr_ol_flag = rte_net_ice_dynflag_proto_xtr_tcp_mask;
-		rxq->rxd_to_pkt_fields = ice_rxd_to_pkt_fields_by_comms_aux_v1;
 		break;
 
 	case ICE_RXDID_COMMS_AUX_IP_OFFSET:
 		rxq->xtr_ol_flag = rte_net_ice_dynflag_proto_xtr_ip_offset_mask;
-		rxq->rxd_to_pkt_fields = ice_rxd_to_pkt_fields_by_comms_aux_v2;
 		break;
 
 	case ICE_RXDID_COMMS_GENERIC:
-		rxq->rxd_to_pkt_fields = ice_rxd_to_pkt_fields_by_comms_generic;
-		break;
-
+		/* fallthrough */
 	case ICE_RXDID_COMMS_OVS:
-		rxq->rxd_to_pkt_fields = ice_rxd_to_pkt_fields_by_comms_ovs;
 		break;
 
 	default:
 		/* update this according to the RXDID for PROTO_XTR_NONE */
-		rxq->rxd_to_pkt_fields = ice_rxd_to_pkt_fields_by_comms_ovs;
+		rxq->rxdid = ICE_RXDID_COMMS_OVS;
 		break;
 	}
 
@@ -1552,7 +1556,7 @@ ice_rx_scan_hw_ring(struct ice_rx_queue *rxq)
 			mb->packet_type = ptype_tbl[ICE_RX_FLEX_DESC_PTYPE_M &
 				rte_le_to_cpu_16(rxdp[j].wb.ptype_flex_flags0)];
 			ice_rxd_to_vlan_tci(mb, &rxdp[j]);
-			rxq->rxd_to_pkt_fields(rxq, mb, &rxdp[j]);
+			rxd_to_pkt_fields_ops[rxq->rxdid](rxq, mb, &rxdp[j]);
 
 			mb->ol_flags |= pkt_flags;
 		}
@@ -1845,7 +1849,7 @@ ice_recv_scattered_pkts(void *rx_queue,
 		first_seg->packet_type = ptype_tbl[ICE_RX_FLEX_DESC_PTYPE_M &
 			rte_le_to_cpu_16(rxd.wb.ptype_flex_flags0)];
 		ice_rxd_to_vlan_tci(first_seg, &rxd);
-		rxq->rxd_to_pkt_fields(rxq, first_seg, &rxd);
+		rxd_to_pkt_fields_ops[rxq->rxdid](rxq, first_seg, &rxd);
 		pkt_flags = ice_rxd_error_to_pkt_flags(rx_stat_err0);
 		first_seg->ol_flags |= pkt_flags;
 		/* Prefetch data of first segment, if configured to do so. */
@@ -2247,7 +2251,7 @@ ice_recv_pkts(void *rx_queue,
 		rxm->packet_type = ptype_tbl[ICE_RX_FLEX_DESC_PTYPE_M &
 			rte_le_to_cpu_16(rxd.wb.ptype_flex_flags0)];
 		ice_rxd_to_vlan_tci(rxm, &rxd);
-		rxq->rxd_to_pkt_fields(rxq, rxm, &rxd);
+		rxd_to_pkt_fields_ops[rxq->rxdid](rxq, rxm, &rxd);
 		pkt_flags = ice_rxd_error_to_pkt_flags(rx_stat_err0);
 		rxm->ol_flags |= pkt_flags;
 		/* copy old mbuf to rx_pkts */
diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h
index 4bea2bc2be..a74c4b3492 100644
--- a/drivers/net/ice/ice_rxtx.h
+++ b/drivers/net/ice/ice_rxtx.h
@@ -86,7 +86,7 @@ struct ice_rx_queue {
 	bool rx_deferred_start; /* don't start this queue in dev start */
 	uint8_t proto_xtr; /* Protocol extraction from flexible descriptor */
 	uint64_t xtr_ol_flag; /* Protocol extraction offload flag */
-	ice_rxd_to_pkt_fields_t rxd_to_pkt_fields; /* handle FlexiMD by RXDID */
+	uint32_t rxdid; /* Receive Flex Descriptor profile ID */
 	ice_rx_release_mbufs_t rx_rel_mbufs;
 	const struct rte_memzone *mz;
 };
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.228558485 +0800
+++ 0211-net-ice-fix-function-pointer-in-multi-process.patch	2021-11-10 14:17:02.020744864 +0800
@@ -1 +1 @@
-From 20b631efe785819eb77aabbf500b3352e5731bdb Mon Sep 17 00:00:00 2001
+From 62ad28d888e291d10a59c4218bc4d2deeeb96c5a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 20b631efe785819eb77aabbf500b3352e5731bdb ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index e7217661dd..c3cad2fbbb 100644
+index 906fca15b0..e16ec5be64 100644
@@ -27 +29 @@
-@@ -204,51 +204,55 @@ ice_rxd_to_pkt_fields_by_comms_aux_v2(struct ice_rx_queue *rxq,
+@@ -170,51 +170,55 @@ ice_rxd_to_pkt_fields_by_comms_aux_v2(struct ice_rx_queue *rxq,
@@ -94 +96 @@
-@@ -1608,7 +1612,7 @@ ice_rx_scan_hw_ring(struct ice_rx_queue *rxq)
+@@ -1552,7 +1556,7 @@ ice_rx_scan_hw_ring(struct ice_rx_queue *rxq)
@@ -100,4 +102,4 @@
- #ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC
- 			if (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) {
- 				ts_ns = ice_tstamp_convert_32b_64b(hw,
-@@ -1925,7 +1929,7 @@ ice_recv_scattered_pkts(void *rx_queue,
+ 
+ 			mb->ol_flags |= pkt_flags;
+ 		}
+@@ -1845,7 +1849,7 @@ ice_recv_scattered_pkts(void *rx_queue,
@@ -110,3 +112,3 @@
- #ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC
- 		if (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) {
-@@ -2356,7 +2360,7 @@ ice_recv_pkts(void *rx_queue,
+ 		first_seg->ol_flags |= pkt_flags;
+ 		/* Prefetch data of first segment, if configured to do so. */
+@@ -2247,7 +2251,7 @@ ice_recv_pkts(void *rx_queue,
@@ -119,2 +121,2 @@
- #ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC
- 		if (rxq->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) {
+ 		rxm->ol_flags |= pkt_flags;
+ 		/* copy old mbuf to rx_pkts */
@@ -122 +124 @@
-index e1c644fb63..146dc1f95d 100644
+index 4bea2bc2be..a74c4b3492 100644
@@ -125 +127 @@
-@@ -89,7 +89,7 @@ struct ice_rx_queue {
+@@ -86,7 +86,7 @@ struct ice_rx_queue {
@@ -132,2 +134,2 @@
- 	uint64_t offloads;
- 	uint32_t time_high;
+ 	const struct rte_memzone *mz;
+ };

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/iavf: fix shared data in multi-process' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (210 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/ice: fix function pointer in multi-process' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'doc: update NIC feature matrix for bnxt' " Xueming Li
                   ` (40 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/762161e2091ccae7c3ff637427398ac59c201e30

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 762161e2091ccae7c3ff637427398ac59c201e30 Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Wed, 27 Oct 2021 16:28:39 +0800
Subject: [PATCH] net/iavf: fix shared data in multi-process
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 627b3c5a39eb5c5461bdf0f0013817c34be98944 ]

The shared pointer is initialized to a static local array defined in the
primary process and it shall not be accessed in the secondary process.

This patch copies the local data to shared data, to avoid data access
violation.

Fixes: 040b44551f77 ("net/iavf: unify Rx packet type table")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf.h        |  2 +-
 drivers/net/iavf/iavf_ethdev.c |  2 +-
 drivers/net/iavf/iavf_rxtx.c   | 17 ++++++++++++++---
 drivers/net/iavf/iavf_rxtx.h   |  2 +-
 4 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index a8b0649745..09bf7f850e 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -201,7 +201,7 @@ struct iavf_adapter {
 	/* For vector PMD */
 	bool rx_vec_allowed;
 	bool tx_vec_allowed;
-	const uint32_t *ptype_tbl;
+	uint32_t ptype_tbl[IAVF_MAX_PKT_TYPE] __rte_cache_min_aligned;
 	bool stopped;
 	uint16_t fdir_ref_cnt;
 	struct iavf_devargs devargs;
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 7d676c0279..0d026ab56f 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2002,7 +2002,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
 	}
 
 	/* set default ptype table */
-	adapter->ptype_tbl = iavf_get_default_ptype_table();
+	iavf_set_default_ptype_table(eth_dev);
 
 	/* copy mac addr */
 	eth_dev->data->mac_addrs = rte_zmalloc(
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index b475aa0cc5..555551008b 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2680,8 +2680,8 @@ iavf_dev_tx_desc_status(void *tx_queue, uint16_t offset)
 	return RTE_ETH_TX_DESC_FULL;
 }
 
-const uint32_t *
-iavf_get_default_ptype_table(void)
+static inline uint32_t
+iavf_get_default_ptype(uint16_t ptype)
 {
 	static const uint32_t ptype_tbl[IAVF_MAX_PKT_TYPE]
 		__rte_cache_aligned = {
@@ -3216,5 +3216,16 @@ iavf_get_default_ptype_table(void)
 		/* All others reserved */
 	};
 
-	return ptype_tbl;
+	return ptype_tbl[ptype];
+}
+
+void __rte_cold
+iavf_set_default_ptype_table(struct rte_eth_dev *dev)
+{
+	struct iavf_adapter *ad =
+		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
+	int i;
+
+	for (i = 0; i < IAVF_MAX_PKT_TYPE; i++)
+		ad->ptype_tbl[i] = iavf_get_default_ptype(i);
 }
diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h
index 6bf6a44b77..2eb214373c 100644
--- a/drivers/net/iavf/iavf_rxtx.h
+++ b/drivers/net/iavf/iavf_rxtx.h
@@ -484,7 +484,7 @@ int iavf_txq_vec_setup_avx512(struct iavf_tx_queue *txq);
 
 uint8_t iavf_proto_xtr_type_to_rxdid(uint8_t xtr_type);
 
-const uint32_t *iavf_get_default_ptype_table(void);
+void iavf_set_default_ptype_table(struct rte_eth_dev *dev);
 
 static inline
 void iavf_dump_rx_descriptor(struct iavf_rx_queue *rxq,
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.273130913 +0800
+++ 0212-net-iavf-fix-shared-data-in-multi-process.patch	2021-11-10 14:17:02.024078169 +0800
@@ -1 +1 @@
-From 627b3c5a39eb5c5461bdf0f0013817c34be98944 Mon Sep 17 00:00:00 2001
+From 762161e2091ccae7c3ff637427398ac59c201e30 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 627b3c5a39eb5c5461bdf0f0013817c34be98944 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 12f541f539..8f795f2bed 100644
+index a8b0649745..09bf7f850e 100644
@@ -28 +30 @@
-@@ -265,7 +265,7 @@ struct iavf_adapter {
+@@ -201,7 +201,7 @@ struct iavf_adapter {
@@ -38 +40 @@
-index f892306f18..7a151975dc 100644
+index 7d676c0279..0d026ab56f 100644
@@ -41 +43 @@
-@@ -2332,7 +2332,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -2002,7 +2002,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
@@ -51 +53 @@
-index 52d919ca1b..a8ad7a0977 100644
+index b475aa0cc5..555551008b 100644
@@ -54 +56 @@
-@@ -2885,8 +2885,8 @@ iavf_dev_tx_desc_status(void *tx_queue, uint16_t offset)
+@@ -2680,8 +2680,8 @@ iavf_dev_tx_desc_status(void *tx_queue, uint16_t offset)
@@ -65 +67 @@
-@@ -3465,5 +3465,16 @@ iavf_get_default_ptype_table(void)
+@@ -3216,5 +3216,16 @@ iavf_get_default_ptype_table(void)
@@ -84 +86 @@
-index 84351011f1..6d1429081d 100644
+index 6bf6a44b77..2eb214373c 100644
@@ -87 +89 @@
-@@ -519,7 +519,7 @@ int iavf_txq_vec_setup_avx512(struct iavf_tx_queue *txq);
+@@ -484,7 +484,7 @@ int iavf_txq_vec_setup_avx512(struct iavf_tx_queue *txq);

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'doc: update NIC feature matrix for bnxt' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (211 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/iavf: fix shared data " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'app/testpmd: fix RSS key length' " Xueming Li
                   ` (39 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/cb077b9160f6653c38ee9d76e82f511c6464b9c6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cb077b9160f6653c38ee9d76e82f511c6464b9c6 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Wed, 27 Oct 2021 10:26:19 -0700
Subject: [PATCH] doc: update NIC feature matrix for bnxt
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0e7bdac71d9a48761c3c59c444457479cef6546f ]

Support for runtime Rx/Tx queue setup and inner RSS is not updated.
Update feature matrix for bnxt PMD.

Fixes: 7ed45b1a7c0f ("net/bnxt: support RSS hash selection")
Fixes: 0105ea1296c9 ("net/bnxt: support runtime queue setup")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 doc/guides/nics/features/bnxt.ini | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/guides/nics/features/bnxt.ini b/doc/guides/nics/features/bnxt.ini
index f8a7fd9a1f..fd1c262267 100644
--- a/doc/guides/nics/features/bnxt.ini
+++ b/doc/guides/nics/features/bnxt.ini
@@ -10,6 +10,8 @@ Link status event    = Y
 Rx interrupt         = Y
 Fast mbuf free       = Y
 Queue start/stop     = Y
+Runtime Rx queue setup = Y
+Runtime Tx queue setup = Y
 Burst mode info      = Y
 MTU update           = Y
 Jumbo frame          = Y
@@ -23,6 +25,7 @@ Multicast MAC filter = Y
 RSS hash             = Y
 RSS key update       = Y
 RSS reta update      = Y
+Inner RSS            = Y
 VMDq                 = Y
 SR-IOV               = Y
 VLAN filter          = Y
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.317086866 +0800
+++ 0213-doc-update-NIC-feature-matrix-for-bnxt.patch	2021-11-10 14:17:02.024078169 +0800
@@ -1 +1 @@
-From 0e7bdac71d9a48761c3c59c444457479cef6546f Mon Sep 17 00:00:00 2001
+From cb077b9160f6653c38ee9d76e82f511c6464b9c6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0e7bdac71d9a48761c3c59c444457479cef6546f ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 93aa98aede..afb5414b49 100644
+index f8a7fd9a1f..fd1c262267 100644
@@ -30,2 +32,2 @@
- Scattered Rx         = Y
-@@ -22,6 +24,7 @@ Multicast MAC filter = Y
+ Jumbo frame          = Y
+@@ -23,6 +25,7 @@ Multicast MAC filter = Y

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix RSS key length' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (212 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'doc: update NIC feature matrix for bnxt' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'app/testpmd: fix RSS type display' " Xueming Li
                   ` (38 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Luca Boccassi, Xiaoyun Li, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/cce7ff86137d29f54991b8627a69890f59f5a1e0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cce7ff86137d29f54991b8627a69890f59f5a1e0 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Wed, 27 Oct 2021 16:22:10 +0200
Subject: [PATCH] app/testpmd: fix RSS key length
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8e1d0547d6ed6a28c5c80c832f7b259518b89735 ]

port_rss_hash_key_update() initializes rss_conf with the
RSS key configuration provided  by the user, but it calls
rte_eth_dev_rss_hash_conf_get() before calling
rte_eth_dev_rss_hash_update(), which overrides the parsed
RSS config.

While the RSS key value is set again after, this is not
the case of the key length. It could cause out of bounds
access if the key length parsed is smaller than the one
read from rte_eth_dev_rss_hash_conf_get().

This patch restores the key length before the
rte_eth_dev_rss_hash_update() call to ensure the RSS key
value/length pair is consistent.

Fixes: 8205e241b2b0 ("app/testpmd: add missing type to RSS hash commands")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 app/test-pmd/config.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 11369ca2c2..d4ec4cec80 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2988,7 +2988,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
 	unsigned int i;
 
 	rss_conf.rss_key = NULL;
-	rss_conf.rss_key_len = hash_key_len;
+	rss_conf.rss_key_len = 0;
 	rss_conf.rss_hf = 0;
 	for (i = 0; rss_type_table[i].str; i++) {
 		if (!strcmp(rss_type_table[i].str, rss_type))
@@ -2997,6 +2997,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
 	diag = rte_eth_dev_rss_hash_conf_get(port_id, &rss_conf);
 	if (diag == 0) {
 		rss_conf.rss_key = hash_key;
+		rss_conf.rss_key_len = hash_key_len;
 		diag = rte_eth_dev_rss_hash_update(port_id, &rss_conf);
 	}
 	if (diag == 0)
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.357297365 +0800
+++ 0214-app-testpmd-fix-RSS-key-length.patch	2021-11-10 14:17:02.027411476 +0800
@@ -1 +1 @@
-From 8e1d0547d6ed6a28c5c80c832f7b259518b89735 Mon Sep 17 00:00:00 2001
+From cce7ff86137d29f54991b8627a69890f59f5a1e0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8e1d0547d6ed6a28c5c80c832f7b259518b89735 ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index 3b97164302..dde6cdcff1 100644
+index 11369ca2c2..d4ec4cec80 100644
@@ -35 +37 @@
-@@ -3042,7 +3042,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
+@@ -2988,7 +2988,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
@@ -44 +46 @@
-@@ -3051,6 +3051,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
+@@ -2997,6 +2997,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix RSS type display' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (213 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'app/testpmd: fix RSS key length' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/mlx5: fix RSS RETA update' " Xueming Li
                   ` (37 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Luca Boccassi, Xiaoyun Li, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c2f64b86fff634ea4571f3d7fc2561293a0214f7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c2f64b86fff634ea4571f3d7fc2561293a0214f7 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Wed, 27 Oct 2021 16:22:11 +0200
Subject: [PATCH] app/testpmd: fix RSS type display
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 88232b54eed87d80782aae2c0c7a3db5089e61cc ]

This patch fixes the display of the RSS hash types
configured in the port, which displayed "all" even
if only a single type was configured

Fixes: 3c90743dd3b9 ("app/testpmd: support more types for flow RSS")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 app/test-pmd/config.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index d4ec4cec80..29c5f37222 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2967,7 +2967,9 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
 	}
 	printf("RSS functions:\n ");
 	for (i = 0; rss_type_table[i].str; i++) {
-		if (rss_hf & rss_type_table[i].rss_type)
+		if (rss_type_table[i].rss_type == 0)
+			continue;
+		if ((rss_hf & rss_type_table[i].rss_type) == rss_type_table[i].rss_type)
 			printf("%s ", rss_type_table[i].str);
 	}
 	printf("\n");
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.400449451 +0800
+++ 0215-app-testpmd-fix-RSS-type-display.patch	2021-11-10 14:17:02.027411476 +0800
@@ -1 +1 @@
-From 88232b54eed87d80782aae2c0c7a3db5089e61cc Mon Sep 17 00:00:00 2001
+From c2f64b86fff634ea4571f3d7fc2561293a0214f7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 88232b54eed87d80782aae2c0c7a3db5089e61cc ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index dde6cdcff1..5dfc8a15da 100644
+index d4ec4cec80..29c5f37222 100644
@@ -24 +26 @@
-@@ -3021,7 +3021,9 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
+@@ -2967,7 +2967,9 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix RSS RETA update' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (214 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'app/testpmd: fix RSS type display' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/virtio: fix link update in speed feature' " Xueming Li
                   ` (36 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5e6ca029a2360b7b20f2b28df64a5bf8046f779e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5e6ca029a2360b7b20f2b28df64a5bf8046f779e Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Wed, 27 Oct 2021 16:22:12 +0200
Subject: [PATCH] net/mlx5: fix RSS RETA update
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5aeb7fab59fef7b9cb01ec58ef32d1068923b6d3 ]

This patch fixes RETA updating for entries above 64.
Without that, these entries are never updated as
calculated mask value will always be 0.

Fixes: 634efbc2c8c0 ("mlx5: support RETA query and update")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c
index 845cebe2e8..0aa3b4ed98 100644
--- a/drivers/net/mlx5/mlx5_rss.c
+++ b/drivers/net/mlx5/mlx5_rss.c
@@ -210,7 +210,7 @@ mlx5_dev_rss_reta_update(struct rte_eth_dev *dev,
 	for (idx = 0, i = 0; (i != reta_size); ++i) {
 		idx = i / RTE_RETA_GROUP_SIZE;
 		pos = i % RTE_RETA_GROUP_SIZE;
-		if (((reta_conf[idx].mask >> i) & 0x1) == 0)
+		if (((reta_conf[idx].mask >> pos) & 0x1) == 0)
 			continue;
 		MLX5_ASSERT(reta_conf[idx].reta[pos] < priv->rxqs_n);
 		(*priv->reta_idx)[i] = reta_conf[idx].reta[pos];
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.443627602 +0800
+++ 0216-net-mlx5-fix-RSS-RETA-update.patch	2021-11-10 14:17:02.027411476 +0800
@@ -1 +1 @@
-From 5aeb7fab59fef7b9cb01ec58ef32d1068923b6d3 Mon Sep 17 00:00:00 2001
+From 5e6ca029a2360b7b20f2b28df64a5bf8046f779e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5aeb7fab59fef7b9cb01ec58ef32d1068923b6d3 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index a4f690039e..a04e22398d 100644
+index 845cebe2e8..0aa3b4ed98 100644
@@ -23 +25 @@
-@@ -211,7 +211,7 @@ mlx5_dev_rss_reta_update(struct rte_eth_dev *dev,
+@@ -210,7 +210,7 @@ mlx5_dev_rss_reta_update(struct rte_eth_dev *dev,
@@ -25,2 +27,2 @@
- 		idx = i / RTE_ETH_RETA_GROUP_SIZE;
- 		pos = i % RTE_ETH_RETA_GROUP_SIZE;
+ 		idx = i / RTE_RETA_GROUP_SIZE;
+ 		pos = i % RTE_RETA_GROUP_SIZE;

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/virtio: fix link update in speed feature' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (215 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/mlx5: fix RSS RETA update' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/hns3: fix mailbox communication with HW' " Xueming Li
                   ` (35 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Ivan Ilchenko
  Cc: Luca Boccassi, Andrew Rybchenko, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/33dcf11cc953ddf9add582cc9f4356474657940f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 33dcf11cc953ddf9add582cc9f4356474657940f Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Fri, 22 Oct 2021 16:17:54 +0300
Subject: [PATCH] net/virtio: fix link update in speed feature
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3c3c54cfa6b38b48e9b817653fde32631aec024d ]

Link update callback reports speed/duplex based on data
filled on device initialization. This is wrong in case of
VIRTIO_NET_F_SPEED_DUPLEX is negotiated since link could
be down at this time. Fix this function to actually
update the HW data in this case with respect to the fact
that specifying speed via devarg is a highest priority.

Fixes: 1357b4b36246 ("net/virtio: support Virtio link speed feature")

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_ethdev.c | 47 +++++++++++++++++++++---------
 drivers/net/virtio/virtio_pci.h    |  5 ++++
 2 files changed, 39 insertions(+), 13 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index afa9fb591f..be6a687d54 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1745,6 +1745,32 @@ virtio_configure_intr(struct rte_eth_dev *dev)
 
 	return 0;
 }
+
+static void
+virtio_get_speed_duplex(struct rte_eth_dev *eth_dev,
+			struct rte_eth_link *link)
+{
+	struct virtio_hw *hw = eth_dev->data->dev_private;
+	struct virtio_net_config *config;
+	struct virtio_net_config local_config;
+
+	config = &local_config;
+	vtpci_read_dev_config(hw,
+		offsetof(struct virtio_net_config, speed),
+		&config->speed, sizeof(config->speed));
+	vtpci_read_dev_config(hw,
+		offsetof(struct virtio_net_config, duplex),
+		&config->duplex, sizeof(config->duplex));
+	hw->speed = config->speed;
+	hw->duplex = config->duplex;
+	if (link != NULL) {
+		link->link_duplex = hw->duplex;
+		link->link_speed  = hw->speed;
+	}
+	PMD_INIT_LOG(DEBUG, "link speed = %d, duplex = %d",
+		     hw->speed, hw->duplex);
+}
+
 #define DUPLEX_UNKNOWN   0xff
 /* reset device and renegotiate features if needed */
 static int
@@ -1803,19 +1829,10 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 		     hw->mac_addr[0], hw->mac_addr[1], hw->mac_addr[2],
 		     hw->mac_addr[3], hw->mac_addr[4], hw->mac_addr[5]);
 
-	if (hw->speed == ETH_SPEED_NUM_UNKNOWN) {
-		if (vtpci_with_feature(hw, VIRTIO_NET_F_SPEED_DUPLEX)) {
-			config = &local_config;
-			vtpci_read_dev_config(hw,
-				offsetof(struct virtio_net_config, speed),
-				&config->speed, sizeof(config->speed));
-			vtpci_read_dev_config(hw,
-				offsetof(struct virtio_net_config, duplex),
-				&config->duplex, sizeof(config->duplex));
-			hw->speed = config->speed;
-			hw->duplex = config->duplex;
-		}
-	}
+	hw->get_speed_via_feat = hw->speed == ETH_SPEED_NUM_UNKNOWN &&
+			     vtpci_with_feature(hw, VIRTIO_NET_F_SPEED_DUPLEX);
+	if (hw->get_speed_via_feat)
+		virtio_get_speed_duplex(eth_dev, NULL);
 	if (hw->duplex == DUPLEX_UNKNOWN)
 		hw->duplex = ETH_LINK_FULL_DUPLEX;
 	PMD_INIT_LOG(DEBUG, "link speed = %d, duplex = %d",
@@ -2688,11 +2705,15 @@ virtio_dev_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complet
 				     dev->data->port_id);
 		} else {
 			link.link_status = ETH_LINK_UP;
+			if (hw->get_speed_via_feat)
+				virtio_get_speed_duplex(dev, &link);
 			PMD_INIT_LOG(DEBUG, "Port %d is up",
 				     dev->data->port_id);
 		}
 	} else {
 		link.link_status = ETH_LINK_UP;
+		if (hw->get_speed_via_feat)
+			virtio_get_speed_duplex(dev, &link);
 	}
 
 	return rte_eth_linkstatus_set(dev, &link);
diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h
index f56d3e8bb7..a1696bce1a 100644
--- a/drivers/net/virtio/virtio_pci.h
+++ b/drivers/net/virtio/virtio_pci.h
@@ -264,6 +264,11 @@ struct virtio_hw {
 	bool        has_rx_offload;
 	uint16_t    port_id;
 	uint8_t     mac_addr[RTE_ETHER_ADDR_LEN];
+	/*
+	 * Speed is specified via 'speed' devarg or
+	 * negotiated via VIRTIO_NET_F_SPEED_DUPLEX
+	 */
+	bool get_speed_via_feat;
 	uint32_t    notify_off_multiplier;
 	uint32_t    speed;  /* link speed in MB */
 	uint8_t     duplex;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.484346588 +0800
+++ 0217-net-virtio-fix-link-update-in-speed-feature.patch	2021-11-10 14:17:02.030744782 +0800
@@ -1 +1 @@
-From 3c3c54cfa6b38b48e9b817653fde32631aec024d Mon Sep 17 00:00:00 2001
+From 33dcf11cc953ddf9add582cc9f4356474657940f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3c3c54cfa6b38b48e9b817653fde32631aec024d ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -20,3 +22,3 @@
- drivers/net/virtio/virtio.h        |  5 ++++
- drivers/net/virtio/virtio_ethdev.c | 46 +++++++++++++++++++++---------
- 2 files changed, 38 insertions(+), 13 deletions(-)
+ drivers/net/virtio/virtio_ethdev.c | 47 +++++++++++++++++++++---------
+ drivers/net/virtio/virtio_pci.h    |  5 ++++
+ 2 files changed, 39 insertions(+), 13 deletions(-)
@@ -24,16 +25,0 @@
-diff --git a/drivers/net/virtio/virtio.h b/drivers/net/virtio/virtio.h
-index 9a2ab2caea..5c8f71a44d 100644
---- a/drivers/net/virtio/virtio.h
-+++ b/drivers/net/virtio/virtio.h
-@@ -203,6 +203,11 @@ struct virtio_hw {
- 	uint8_t opened;
- 	uint16_t port_id;
- 	uint8_t mac_addr[RTE_ETHER_ADDR_LEN];
-+	/*
-+	 * Speed is specified via 'speed' devarg or
-+	 * negotiated via VIRTIO_NET_F_SPEED_DUPLEX
-+	 */
-+	bool get_speed_via_feat;
- 	uint32_t speed;  /* link speed in MB */
- 	uint8_t duplex;
- 	uint8_t intr_lsc;
@@ -41 +27 @@
-index 4570bec057..c2588369b2 100644
+index afa9fb591f..be6a687d54 100644
@@ -44 +30,2 @@
-@@ -1843,6 +1843,31 @@ virtio_configure_intr(struct rte_eth_dev *dev)
+@@ -1745,6 +1745,32 @@ virtio_configure_intr(struct rte_eth_dev *dev)
+ 
@@ -47 +34 @@
- 
++
@@ -57 +44 @@
-+	virtio_read_dev_config(hw,
++	vtpci_read_dev_config(hw,
@@ -60 +47 @@
-+	virtio_read_dev_config(hw,
++	vtpci_read_dev_config(hw,
@@ -73,4 +60,4 @@
- static uint64_t
- ethdev_to_virtio_rss_offloads(uint64_t ethdev_hash_types)
- {
-@@ -2225,19 +2250,10 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
+ #define DUPLEX_UNKNOWN   0xff
+ /* reset device and renegotiate features if needed */
+ static int
+@@ -1803,19 +1829,10 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
@@ -80,2 +67,2 @@
--	if (hw->speed == RTE_ETH_SPEED_NUM_UNKNOWN) {
--		if (virtio_with_feature(hw, VIRTIO_NET_F_SPEED_DUPLEX)) {
+-	if (hw->speed == ETH_SPEED_NUM_UNKNOWN) {
+-		if (vtpci_with_feature(hw, VIRTIO_NET_F_SPEED_DUPLEX)) {
@@ -83 +70 @@
--			virtio_read_dev_config(hw,
+-			vtpci_read_dev_config(hw,
@@ -86 +73 @@
--			virtio_read_dev_config(hw,
+-			vtpci_read_dev_config(hw,
@@ -93,2 +80,2 @@
-+	hw->get_speed_via_feat = hw->speed == RTE_ETH_SPEED_NUM_UNKNOWN &&
-+			     virtio_with_feature(hw, VIRTIO_NET_F_SPEED_DUPLEX);
++	hw->get_speed_via_feat = hw->speed == ETH_SPEED_NUM_UNKNOWN &&
++			     vtpci_with_feature(hw, VIRTIO_NET_F_SPEED_DUPLEX);
@@ -98 +85 @@
- 		hw->duplex = RTE_ETH_LINK_FULL_DUPLEX;
+ 		hw->duplex = ETH_LINK_FULL_DUPLEX;
@@ -100 +87 @@
-@@ -2964,11 +2980,15 @@ virtio_dev_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complet
+@@ -2688,11 +2705,15 @@ virtio_dev_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complet
@@ -103 +90 @@
- 			link.link_status = RTE_ETH_LINK_UP;
+ 			link.link_status = ETH_LINK_UP;
@@ -110 +97 @@
- 		link.link_status = RTE_ETH_LINK_UP;
+ 		link.link_status = ETH_LINK_UP;
@@ -115,0 +103,16 @@
+diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h
+index f56d3e8bb7..a1696bce1a 100644
+--- a/drivers/net/virtio/virtio_pci.h
++++ b/drivers/net/virtio/virtio_pci.h
+@@ -264,6 +264,11 @@ struct virtio_hw {
+ 	bool        has_rx_offload;
+ 	uint16_t    port_id;
+ 	uint8_t     mac_addr[RTE_ETHER_ADDR_LEN];
++	/*
++	 * Speed is specified via 'speed' devarg or
++	 * negotiated via VIRTIO_NET_F_SPEED_DUPLEX
++	 */
++	bool get_speed_via_feat;
+ 	uint32_t    notify_off_multiplier;
+ 	uint32_t    speed;  /* link speed in MB */
+ 	uint8_t     duplex;

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix mailbox communication with HW' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (216 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/virtio: fix link update in speed feature' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/i40e: fix 32-bit build' " Xueming Li
                   ` (34 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c87b5347403bd33eb0f6ea98f0795956bc0326a3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c87b5347403bd33eb0f6ea98f0795956bc0326a3 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Thu, 28 Oct 2021 19:52:30 +0800
Subject: [PATCH] net/hns3: fix mailbox communication with HW
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 599ef84add7ed02537ff43a8e8a36f42b36e107e ]

Mailbox is the communication mechanism between SW and HW. There exist
two approaches for SW to recognize mailbox message from HW. One way is
using match_id, the other is to compare the message code. The two
approaches are independent and used in different scenarios.

But for the second approach, "next_to_use" should be updated and written
to HW register. If it not done, HW do not know the position SW steps,
then, the communication between SW and HW will turn to be failed.

Fixes: dbbbad23e380 ("net/hns3: fix VF handling LSC event in secondary process")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_mbx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index f8d83c313d..9d245610c9 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -441,6 +441,9 @@ hns3_handle_mbx_msg_out_intr(struct hns3_hw *hw)
 scan_next:
 		next_to_use = (next_to_use + 1) % hw->cmq.crq.desc_num;
 	}
+
+	crq->next_to_use = next_to_use;
+	hns3_write_dev(hw, HNS3_CMDQ_RX_HEAD_REG, crq->next_to_use);
 }
 
 void
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.526904965 +0800
+++ 0218-net-hns3-fix-mailbox-communication-with-HW.patch	2021-11-10 14:17:02.030744782 +0800
@@ -1 +1 @@
-From 599ef84add7ed02537ff43a8e8a36f42b36e107e Mon Sep 17 00:00:00 2001
+From c87b5347403bd33eb0f6ea98f0795956bc0326a3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 599ef84add7ed02537ff43a8e8a36f42b36e107e ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index a47622b8a6..245652e2ed 100644
+index f8d83c313d..9d245610c9 100644
@@ -27 +29 @@
-@@ -435,6 +435,9 @@ hns3_handle_mbx_msg_out_intr(struct hns3_hw *hw)
+@@ -441,6 +441,9 @@ hns3_handle_mbx_msg_out_intr(struct hns3_hw *hw)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix 32-bit build' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (217 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/hns3: fix mailbox communication with HW' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/bnxt: fix firmware version query' " Xueming Li
                   ` (33 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c5135ae62291badcb81a06345881fb6fc3e37404

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c5135ae62291badcb81a06345881fb6fc3e37404 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Fri, 29 Oct 2021 11:37:01 +0100
Subject: [PATCH] net/i40e: fix 32-bit build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d01201829b88fe823e0b99cd13a65e1711cd8973 ]

Got error with: gcc 11.2.1 "cc (GCC) 11.2.1 20210728 (Red Hat 11.2.1-1)"

Build error:
In function ‘i40e_flow_parse_fdir_pattern’,
    inlined from ‘i40e_flow_parse_fdir_filter’
    at ../drivers/net/i40e/i40e_flow.c:3274:8:
../drivers/net/i40e/i40e_flow.c:3052:69:
    error: writing 1 byte into a region of size 0
    [-Werror=stringop-overflow=]
 3052 |                         filter->input.flow_ext.flexbytes[j] =
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
 3053 |                                 raw_spec->pattern[i];
      |                                 ~~~~~~~~~~~~~~~~~~~~
In file included from ../drivers/net/i40e/i40e_flow.c:25:
  ../drivers/net/i40e/i40e_flow.c:
  In function ‘i40e_flow_parse_fdir_filter’:
  ../drivers/net/i40e/i40e_ethdev.h:638:17:
  note: at offset 16 into destination object ‘flexbytes’ of size 16
  638 |         uint8_t flexbytes[RTE_ETH_FDIR_MAX_FLEXLEN];
      |                 ^~~~~~~~~

Fixing by adding range checks.

Fixes: 6ced3dd72f5f ("net/i40e: support flexible payload parsing for FDIR")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 70c5c72326..0086a5f443 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -3049,6 +3049,9 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 
 			for (i = 0; i < raw_spec->length; i++) {
 				j = i + next_dst_off;
+				if (j >= RTE_ETH_FDIR_MAX_FLEXLEN ||
+						j >= I40E_FDIR_MAX_FLEX_LEN)
+					break;
 				filter->input.flow_ext.flexbytes[j] =
 					raw_spec->pattern[i];
 				filter->input.flow_ext.flex_mask[j] =
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.567401141 +0800
+++ 0219-net-i40e-fix-32-bit-build.patch	2021-11-10 14:17:02.034078088 +0800
@@ -1 +1 @@
-From d01201829b88fe823e0b99cd13a65e1711cd8973 Mon Sep 17 00:00:00 2001
+From c5135ae62291badcb81a06345881fb6fc3e37404 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d01201829b88fe823e0b99cd13a65e1711cd8973 ]
@@ -33 +35,0 @@
-Cc: stable@dpdk.org
@@ -42 +44 @@
-index 9acaa18751..c9676caab5 100644
+index 70c5c72326..0086a5f443 100644

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/bnxt: fix firmware version query' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (218 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/i40e: fix 32-bit build' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/enic: avoid error message when no advanced filtering' " Xueming Li
                   ` (32 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Luca Boccassi, Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7ab05235227ed50335a0a4972bcb5c7e2a2cb47c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7ab05235227ed50335a0a4972bcb5c7e2a2cb47c Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 2 Nov 2021 14:27:44 -0700
Subject: [PATCH] net/bnxt: fix firmware version query
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 211262d925268a3f5ac1c6a5a6610762b5ca5f5a ]

UBSan testing revealed undefined shift here.

The firmware returns the version in bytes; and shifting a 8 bit
quantity here can lead to undefined behaviour or truncation.
The fix is to promote the bytes to 32 bit before shifting.

Bugzilla ID: 838
Fixes: 9a891c1764ea ("net/bnxt: update HWRM to version 1.9.2")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index a3800cf6b1..b78e099a5e 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1138,9 +1138,9 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
 		resp->hwrm_intf_upd_8b, resp->hwrm_fw_maj_8b,
 		resp->hwrm_fw_min_8b, resp->hwrm_fw_bld_8b,
 		resp->hwrm_fw_rsvd_8b);
-	bp->fw_ver = (resp->hwrm_fw_maj_8b << 24) |
-		     (resp->hwrm_fw_min_8b << 16) |
-		     (resp->hwrm_fw_bld_8b << 8) |
+	bp->fw_ver = ((uint32_t)resp->hwrm_fw_maj_8b << 24) |
+		     ((uint32_t)resp->hwrm_fw_min_8b << 16) |
+		     ((uint32_t)resp->hwrm_fw_bld_8b << 8) |
 		     resp->hwrm_fw_rsvd_8b;
 	PMD_DRV_LOG(INFO, "Driver HWRM version: %d.%d.%d\n",
 		HWRM_VERSION_MAJOR, HWRM_VERSION_MINOR, HWRM_VERSION_UPDATE);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.610562375 +0800
+++ 0220-net-bnxt-fix-firmware-version-query.patch	2021-11-10 14:17:02.037411394 +0800
@@ -1 +1 @@
-From 211262d925268a3f5ac1c6a5a6610762b5ca5f5a Mon Sep 17 00:00:00 2001
+From 7ab05235227ed50335a0a4972bcb5c7e2a2cb47c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 211262d925268a3f5ac1c6a5a6610762b5ca5f5a ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 55dcb1dd6a..3fefd558d8 100644
+index a3800cf6b1..b78e099a5e 100644
@@ -27 +29 @@
-@@ -1260,9 +1260,9 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
+@@ -1138,9 +1138,9 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/enic: avoid error message when no advanced filtering' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (219 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/bnxt: fix firmware version query' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/ice: save rule on switch filter creation' " Xueming Li
                   ` (31 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: Luca Boccassi, John Daley, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6fe384f69d95fbdbe1c98ffaf8f87cc78cf90b87

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6fe384f69d95fbdbe1c98ffaf8f87cc78cf90b87 Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Mon, 25 Oct 2021 17:04:18 -0700
Subject: [PATCH] net/enic: avoid error message when no advanced filtering
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit af397b3c93f82b0803c0890874d7ee3b5127522d ]

Probing the availability of Flow Manager API may print the following
error log.

PMD: rte_enic_pmd: Devcmd 88 failed with error code -1

The error indicates a flow manager operation failed and happens when
advanced filtering is disabled on vNIC. It is harmless but confusing
to the user. Since advanced filtering is a prerequisite, check first
if it is available and avoid the error message altogether.

Fixes: ea7768b5bba8 ("net/enic: add flow implementation based on Flow Manager API")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/base/vnic_dev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/enic/base/vnic_dev.c b/drivers/net/enic/base/vnic_dev.c
index 2a5ea93bfe..8a82b7f491 100644
--- a/drivers/net/enic/base/vnic_dev.c
+++ b/drivers/net/enic/base/vnic_dev.c
@@ -594,6 +594,9 @@ static int vnic_dev_flowman_enable(struct vnic_dev *vdev, uint32_t *mode,
 	uint64_t ops;
 	static uint32_t instance;
 
+	/* Advanced filtering is a prerequisite */
+	if (!vnic_dev_capable_adv_filters(vdev))
+		return 0;
 	/* flowman devcmd available? */
 	if (!vnic_dev_capable(vdev, CMD_FLOW_MANAGER_OP))
 		return 0;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.654327856 +0800
+++ 0221-net-enic-avoid-error-message-when-no-advanced-filter.patch	2021-11-10 14:17:02.037411394 +0800
@@ -1 +1 @@
-From af397b3c93f82b0803c0890874d7ee3b5127522d Mon Sep 17 00:00:00 2001
+From 6fe384f69d95fbdbe1c98ffaf8f87cc78cf90b87 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit af397b3c93f82b0803c0890874d7ee3b5127522d ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 9c42595ced..00d7782e6e 100644
+index 2a5ea93bfe..8a82b7f491 100644

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/ice: save rule on switch filter creation' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (220 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/enic: avoid error message when no advanced filtering' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/ice: fix flow redirect' " Xueming Li
                   ` (30 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/11c0e8ab51af1409f5d9208446a8749edd19deec

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 11c0e8ab51af1409f5d9208446a8749edd19deec Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Thu, 4 Nov 2021 16:45:34 +0800
Subject: [PATCH] net/ice: save rule on switch filter creation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9fda31c3229ca6e036cae80392578ed6e5a51119 ]

The VSI number, lookup elements and rule information for creating switch
filter are abandoned when switch filter is created in original
implementation.

This patch saved the abandoned data in RTE flow, it is for future
use on replay when handling exception at flow redirect.

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_switch_filter.c | 79 +++++++++++++++++++++--------
 1 file changed, 59 insertions(+), 20 deletions(-)

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index c383cade65..1ee6e9715e 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -142,6 +142,28 @@ static struct ice_flow_parser ice_switch_dist_parser_comms;
 static struct ice_flow_parser ice_switch_perm_parser_os;
 static struct ice_flow_parser ice_switch_perm_parser_comms;
 
+enum ice_sw_fltr_status {
+	ICE_SW_FLTR_ADDED,
+	ICE_SW_FLTR_RMV_FAILED_ON_RIDRECT,
+	ICE_SW_FLTR_ADD_FAILED_ON_RIDRECT,
+};
+
+struct ice_switch_filter_conf {
+	enum ice_sw_fltr_status fltr_status;
+
+	struct ice_rule_query_data sw_query_data;
+
+	/*
+	 * The lookup elements and rule info are saved here when filter creation
+	 * succeeds.
+	 */
+	uint16_t vsi_num;
+	uint16_t lkups_num;
+	struct ice_adv_lkup_elem *lkups;
+	struct ice_adv_rule_info rule_info;
+};
+
+
 static struct
 ice_pattern_match_item ice_switch_pattern_dist_os[] = {
 	{pattern_ethertype,
@@ -396,7 +418,7 @@ ice_switch_create(struct ice_adapter *ad,
 	struct ice_pf *pf = &ad->pf;
 	struct ice_hw *hw = ICE_PF_TO_HW(pf);
 	struct ice_rule_query_data rule_added = {0};
-	struct ice_rule_query_data *filter_ptr;
+	struct ice_switch_filter_conf *filter_conf_ptr;
 	struct ice_adv_lkup_elem *list =
 		((struct sw_meta *)meta)->list;
 	uint16_t lkups_cnt =
@@ -418,18 +440,26 @@ ice_switch_create(struct ice_adapter *ad,
 	}
 	ret = ice_add_adv_rule(hw, list, lkups_cnt, rule_info, &rule_added);
 	if (!ret) {
-		filter_ptr = rte_zmalloc("ice_switch_filter",
-			sizeof(struct ice_rule_query_data), 0);
-		if (!filter_ptr) {
+		filter_conf_ptr = rte_zmalloc("ice_switch_filter",
+			sizeof(struct ice_switch_filter_conf), 0);
+		if (!filter_conf_ptr) {
 			rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 				   "No memory for ice_switch_filter");
 			goto error;
 		}
-		flow->rule = filter_ptr;
-		rte_memcpy(filter_ptr,
-			&rule_added,
-			sizeof(struct ice_rule_query_data));
+
+		filter_conf_ptr->sw_query_data = rule_added;
+
+		filter_conf_ptr->vsi_num =
+			ice_get_hw_vsi_num(hw, rule_info->sw_act.vsi_handle);
+		filter_conf_ptr->lkups = list;
+		filter_conf_ptr->lkups_num = lkups_cnt;
+		filter_conf_ptr->rule_info = *rule_info;
+
+		filter_conf_ptr->fltr_status = ICE_SW_FLTR_ADDED;
+
+		flow->rule = filter_conf_ptr;
 	} else {
 		rte_flow_error_set(error, EINVAL,
 			RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
@@ -437,7 +467,6 @@ ice_switch_create(struct ice_adapter *ad,
 		goto error;
 	}
 
-	rte_free(list);
 	rte_free(meta);
 	return 0;
 
@@ -448,6 +477,18 @@ error:
 	return -rte_errno;
 }
 
+static inline void
+ice_switch_filter_rule_free(struct rte_flow *flow)
+{
+	struct ice_switch_filter_conf *filter_conf_ptr =
+		(struct ice_switch_filter_conf *)flow->rule;
+
+	if (filter_conf_ptr)
+		rte_free(filter_conf_ptr->lkups);
+
+	rte_free(filter_conf_ptr);
+}
+
 static int
 ice_switch_destroy(struct ice_adapter *ad,
 		struct rte_flow *flow,
@@ -455,20 +496,24 @@ ice_switch_destroy(struct ice_adapter *ad,
 {
 	struct ice_hw *hw = &ad->hw;
 	int ret;
-	struct ice_rule_query_data *filter_ptr;
+	struct ice_switch_filter_conf *filter_conf_ptr;
 
-	filter_ptr = (struct ice_rule_query_data *)
+	filter_conf_ptr = (struct ice_switch_filter_conf *)
 		flow->rule;
 
-	if (!filter_ptr) {
+	if (!filter_conf_ptr ||
+	    filter_conf_ptr->fltr_status == ICE_SW_FLTR_ADD_FAILED_ON_RIDRECT) {
 		rte_flow_error_set(error, EINVAL,
 			RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 			"no such flow"
 			" create by switch filter");
+
+		ice_switch_filter_rule_free(flow);
+
 		return -rte_errno;
 	}
 
-	ret = ice_rem_adv_rule_by_id(hw, filter_ptr);
+	ret = ice_rem_adv_rule_by_id(hw, &filter_conf_ptr->sw_query_data);
 	if (ret) {
 		rte_flow_error_set(error, EINVAL,
 			RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
@@ -476,16 +521,10 @@ ice_switch_destroy(struct ice_adapter *ad,
 		return -rte_errno;
 	}
 
-	rte_free(filter_ptr);
+	ice_switch_filter_rule_free(flow);
 	return ret;
 }
 
-static void
-ice_switch_filter_rule_free(struct rte_flow *flow)
-{
-	rte_free(flow->rule);
-}
-
 static uint64_t
 ice_switch_inset_get(const struct rte_flow_item pattern[],
 		struct rte_flow_error *error,
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.695480832 +0800
+++ 0222-net-ice-save-rule-on-switch-filter-creation.patch	2021-11-10 14:17:02.037411394 +0800
@@ -1 +1 @@
-From 9fda31c3229ca6e036cae80392578ed6e5a51119 Mon Sep 17 00:00:00 2001
+From 11c0e8ab51af1409f5d9208446a8749edd19deec Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9fda31c3229ca6e036cae80392578ed6e5a51119 ]
@@ -13,2 +15,0 @@
-Cc: stable@dpdk.org
-
@@ -18,2 +19,2 @@
- drivers/net/ice/ice_switch_filter.c | 78 +++++++++++++++++++++--------
- 1 file changed, 58 insertions(+), 20 deletions(-)
+ drivers/net/ice/ice_switch_filter.c | 79 +++++++++++++++++++++--------
+ 1 file changed, 59 insertions(+), 20 deletions(-)
@@ -22 +23 @@
-index 6b0c1bff1e..d5add64c53 100644
+index c383cade65..1ee6e9715e 100644
@@ -25,3 +26,3 @@
-@@ -180,6 +180,27 @@ struct sw_meta {
- 	struct ice_adv_rule_info rule_info;
- };
+@@ -142,6 +142,28 @@ static struct ice_flow_parser ice_switch_dist_parser_comms;
+ static struct ice_flow_parser ice_switch_perm_parser_os;
+ static struct ice_flow_parser ice_switch_perm_parser_comms;
@@ -50,4 +51,5 @@
- static struct ice_flow_parser ice_switch_dist_parser;
- static struct ice_flow_parser ice_switch_perm_parser;
- 
-@@ -359,7 +380,7 @@ ice_switch_create(struct ice_adapter *ad,
++
+ static struct
+ ice_pattern_match_item ice_switch_pattern_dist_os[] = {
+ 	{pattern_ethertype,
+@@ -396,7 +418,7 @@ ice_switch_create(struct ice_adapter *ad,
@@ -62 +64 @@
-@@ -381,18 +402,26 @@ ice_switch_create(struct ice_adapter *ad,
+@@ -418,18 +440,26 @@ ice_switch_create(struct ice_adapter *ad,
@@ -96 +98 @@
-@@ -400,7 +429,6 @@ ice_switch_create(struct ice_adapter *ad,
+@@ -437,7 +467,6 @@ ice_switch_create(struct ice_adapter *ad,
@@ -104 +106 @@
-@@ -411,6 +439,18 @@ error:
+@@ -448,6 +477,18 @@ error:
@@ -123 +125 @@
-@@ -418,20 +458,24 @@ ice_switch_destroy(struct ice_adapter *ad,
+@@ -455,20 +496,24 @@ ice_switch_destroy(struct ice_adapter *ad,
@@ -152 +154 @@
-@@ -439,16 +483,10 @@ ice_switch_destroy(struct ice_adapter *ad,
+@@ -476,16 +521,10 @@ ice_switch_destroy(struct ice_adapter *ad,
@@ -167,2 +169,2 @@
- static bool
- ice_switch_parse_pattern(const struct rte_flow_item pattern[],
+ static uint64_t
+ ice_switch_inset_get(const struct rte_flow_item pattern[],

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/ice: fix flow redirect' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (221 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/ice: save rule on switch filter creation' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/hns3: fix secondary process reference count' " Xueming Li
                   ` (29 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8b84cd582d1fa026e0ade33e62b4b0e40467c14f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8b84cd582d1fa026e0ade33e62b4b0e40467c14f Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Thu, 4 Nov 2021 16:45:35 +0800
Subject: [PATCH] net/ice: fix flow redirect
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3378e71244b2b2a1a14f94ece735352b5c34dd99 ]

It's possible that a switch rule can't be redirect successfully due
to kernel driver is busy to handle an ongoing VF reset, so the
redirect action need to be deferred into next redirect request which
is promised by kernel driver after VF reset done.

This patch uses the saved flow rule's data to replay switch rule
remove/add during next flow redirect.

Fixes: 397b4b3c5095 ("net/ice: enable flow redirect on switch")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_switch_filter.c | 108 ++++++++++++++++++++--------
 1 file changed, 78 insertions(+), 30 deletions(-)

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 1ee6e9715e..f41a57acf4 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -1814,8 +1814,12 @@ ice_switch_redirect(struct ice_adapter *ad,
 		    struct rte_flow *flow,
 		    struct ice_flow_redirect *rd)
 {
-	struct ice_rule_query_data *rdata = flow->rule;
+	struct ice_rule_query_data *rdata;
+	struct ice_switch_filter_conf *filter_conf_ptr =
+		(struct ice_switch_filter_conf *)flow->rule;
+	struct ice_rule_query_data added_rdata = { 0 };
 	struct ice_adv_fltr_mgmt_list_entry *list_itr;
+	struct ice_adv_lkup_elem *lkups_ref = NULL;
 	struct ice_adv_lkup_elem *lkups_dp = NULL;
 	struct LIST_HEAD_TYPE *list_head;
 	struct ice_adv_rule_info rinfo;
@@ -1824,6 +1828,8 @@ ice_switch_redirect(struct ice_adapter *ad,
 	uint16_t lkups_cnt;
 	int ret;
 
+	rdata = &filter_conf_ptr->sw_query_data;
+
 	if (rdata->vsi_handle != rd->vsi_handle)
 		return 0;
 
@@ -1834,56 +1840,98 @@ ice_switch_redirect(struct ice_adapter *ad,
 	if (rd->type != ICE_FLOW_REDIRECT_VSI)
 		return -ENOTSUP;
 
-	list_head = &sw->recp_list[rdata->rid].filt_rules;
-	LIST_FOR_EACH_ENTRY(list_itr, list_head, ice_adv_fltr_mgmt_list_entry,
-			    list_entry) {
-		rinfo = list_itr->rule_info;
-		if ((rinfo.fltr_rule_id == rdata->rule_id &&
-		    rinfo.sw_act.fltr_act == ICE_FWD_TO_VSI &&
-		    rinfo.sw_act.vsi_handle == rd->vsi_handle) ||
-		    (rinfo.fltr_rule_id == rdata->rule_id &&
-		    rinfo.sw_act.fltr_act == ICE_FWD_TO_VSI_LIST)){
-			lkups_cnt = list_itr->lkups_cnt;
-			lkups_dp = (struct ice_adv_lkup_elem *)
-				ice_memdup(hw, list_itr->lkups,
-					   sizeof(*list_itr->lkups) *
-					   lkups_cnt, ICE_NONDMA_TO_NONDMA);
-
-			if (!lkups_dp) {
-				PMD_DRV_LOG(ERR, "Failed to allocate memory.");
-				return -EINVAL;
-			}
+	switch (filter_conf_ptr->fltr_status) {
+	case ICE_SW_FLTR_ADDED:
+		list_head = &sw->recp_list[rdata->rid].filt_rules;
+		LIST_FOR_EACH_ENTRY(list_itr, list_head,
+				    ice_adv_fltr_mgmt_list_entry,
+				    list_entry) {
+			rinfo = list_itr->rule_info;
+			if ((rinfo.fltr_rule_id == rdata->rule_id &&
+			    rinfo.sw_act.fltr_act == ICE_FWD_TO_VSI &&
+			    rinfo.sw_act.vsi_handle == rd->vsi_handle) ||
+			    (rinfo.fltr_rule_id == rdata->rule_id &&
+			    rinfo.sw_act.fltr_act == ICE_FWD_TO_VSI_LIST)){
+				lkups_cnt = list_itr->lkups_cnt;
+
+				lkups_dp = (struct ice_adv_lkup_elem *)
+					ice_memdup(hw, list_itr->lkups,
+						   sizeof(*list_itr->lkups) *
+						   lkups_cnt,
+						   ICE_NONDMA_TO_NONDMA);
+				if (!lkups_dp) {
+					PMD_DRV_LOG(ERR,
+						    "Failed to allocate memory.");
+					return -EINVAL;
+				}
+				lkups_ref = lkups_dp;
 
-			if (rinfo.sw_act.fltr_act == ICE_FWD_TO_VSI_LIST) {
-				rinfo.sw_act.vsi_handle = rd->vsi_handle;
-				rinfo.sw_act.fltr_act = ICE_FWD_TO_VSI;
+				if (rinfo.sw_act.fltr_act ==
+				    ICE_FWD_TO_VSI_LIST) {
+					rinfo.sw_act.vsi_handle =
+						rd->vsi_handle;
+					rinfo.sw_act.fltr_act = ICE_FWD_TO_VSI;
+				}
+				break;
 			}
-			break;
 		}
-	}
 
-	if (!lkups_dp)
+		if (!lkups_ref)
+			return -EINVAL;
+
+		goto rmv_rule;
+	case ICE_SW_FLTR_RMV_FAILED_ON_RIDRECT:
+		/* Recover VSI context */
+		hw->vsi_ctx[rd->vsi_handle]->vsi_num = filter_conf_ptr->vsi_num;
+		rinfo = filter_conf_ptr->rule_info;
+		lkups_cnt = filter_conf_ptr->lkups_num;
+		lkups_ref = filter_conf_ptr->lkups;
+
+		if (rinfo.sw_act.fltr_act == ICE_FWD_TO_VSI_LIST) {
+			rinfo.sw_act.vsi_handle = rd->vsi_handle;
+			rinfo.sw_act.fltr_act = ICE_FWD_TO_VSI;
+		}
+
+		goto rmv_rule;
+	case ICE_SW_FLTR_ADD_FAILED_ON_RIDRECT:
+		rinfo = filter_conf_ptr->rule_info;
+		lkups_cnt = filter_conf_ptr->lkups_num;
+		lkups_ref = filter_conf_ptr->lkups;
+
+		goto add_rule;
+	default:
 		return -EINVAL;
+	}
 
+rmv_rule:
 	/* Remove the old rule */
-	ret = ice_rem_adv_rule(hw, list_itr->lkups,
-			       lkups_cnt, &rinfo);
+	ret = ice_rem_adv_rule(hw, lkups_ref, lkups_cnt, &rinfo);
 	if (ret) {
 		PMD_DRV_LOG(ERR, "Failed to delete the old rule %d",
 			    rdata->rule_id);
+		filter_conf_ptr->fltr_status =
+			ICE_SW_FLTR_RMV_FAILED_ON_RIDRECT;
 		ret = -EINVAL;
 		goto out;
 	}
 
+add_rule:
 	/* Update VSI context */
 	hw->vsi_ctx[rd->vsi_handle]->vsi_num = rd->new_vsi_num;
 
 	/* Replay the rule */
-	ret = ice_add_adv_rule(hw, lkups_dp, lkups_cnt,
-			       &rinfo, rdata);
+	ret = ice_add_adv_rule(hw, lkups_ref, lkups_cnt,
+			       &rinfo, &added_rdata);
 	if (ret) {
 		PMD_DRV_LOG(ERR, "Failed to replay the rule");
+		filter_conf_ptr->fltr_status =
+			ICE_SW_FLTR_ADD_FAILED_ON_RIDRECT;
 		ret = -EINVAL;
+	} else {
+		filter_conf_ptr->sw_query_data = added_rdata;
+		/* Save VSI number for failure recover */
+		filter_conf_ptr->vsi_num = rd->new_vsi_num;
+		filter_conf_ptr->fltr_status = ICE_SW_FLTR_ADDED;
 	}
 
 out:
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.739156171 +0800
+++ 0223-net-ice-fix-flow-redirect.patch	2021-11-10 14:17:02.040744700 +0800
@@ -1 +1 @@
-From 3378e71244b2b2a1a14f94ece735352b5c34dd99 Mon Sep 17 00:00:00 2001
+From 8b84cd582d1fa026e0ade33e62b4b0e40467c14f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3378e71244b2b2a1a14f94ece735352b5c34dd99 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index d5add64c53..ed29c00d77 100644
+index 1ee6e9715e..f41a57acf4 100644
@@ -27 +29 @@
-@@ -1926,8 +1926,12 @@ ice_switch_redirect(struct ice_adapter *ad,
+@@ -1814,8 +1814,12 @@ ice_switch_redirect(struct ice_adapter *ad,
@@ -41 +43 @@
-@@ -1936,6 +1940,8 @@ ice_switch_redirect(struct ice_adapter *ad,
+@@ -1824,6 +1828,8 @@ ice_switch_redirect(struct ice_adapter *ad,
@@ -50 +52 @@
-@@ -1946,56 +1952,98 @@ ice_switch_redirect(struct ice_adapter *ad,
+@@ -1834,56 +1840,98 @@ ice_switch_redirect(struct ice_adapter *ad,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix secondary process reference count' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (222 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/ice: fix flow redirect' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/hns3: fix multi-process action register and unregister' " Xueming Li
                   ` (28 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0718b6168476e30ebccc8ed73c1984b0615043ef

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0718b6168476e30ebccc8ed73c1984b0615043ef Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 2 Nov 2021 09:38:26 +0800
Subject: [PATCH] net/hns3: fix secondary process reference count
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 323263717774df318d8a6e64ac8bfe546e03b8f6 ]

The "secondary_cnt" will be increased when a secondary process
initialized. But the value of this variable is not decreased when the
secondary process exits, which causes the primary process senses that
the secondary process still exists. As a result, the primary process
fails to send messages to the secondary process after the secondary
process exits.

Fixes: 23d4b61fee5d ("net/hns3: support multiple process")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 11 +++++++----
 drivers/net/hns3/hns3_ethdev_vf.c | 11 +++++++----
 drivers/net/hns3/hns3_mp.c        |  4 +++-
 3 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index d318b9b7f7..8049573444 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5199,8 +5199,10 @@ hns3_dev_close(struct rte_eth_dev *eth_dev)
 	struct hns3_hw *hw = &hns->hw;
 	int ret = 0;
 
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+		__atomic_fetch_sub(&hw->secondary_cnt, 1, __ATOMIC_RELAXED);
 		return 0;
+	}
 
 	if (hw->adapter_state == HNS3_NIC_STARTED)
 		ret = hns3_dev_stop(eth_dev);
@@ -6287,8 +6289,7 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
 				     "process, ret = %d", ret);
 			goto err_mp_init_secondary;
 		}
-
-		hw->secondary_cnt++;
+		__atomic_fetch_add(&hw->secondary_cnt, 1, __ATOMIC_RELAXED);
 		return 0;
 	}
 
@@ -6387,8 +6388,10 @@ hns3_dev_uninit(struct rte_eth_dev *eth_dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+		__atomic_fetch_sub(&hw->secondary_cnt, 1, __ATOMIC_RELAXED);
 		return 0;
+	}
 
 	if (hw->adapter_state < HNS3_NIC_CLOSING)
 		hns3_dev_close(eth_dev);
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 086828180b..0f8ffe0c32 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1991,8 +1991,10 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
 	struct hns3_hw *hw = &hns->hw;
 	int ret = 0;
 
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+		__atomic_fetch_sub(&hw->secondary_cnt, 1, __ATOMIC_RELAXED);
 		return 0;
+	}
 
 	if (hw->adapter_state == HNS3_NIC_STARTED)
 		ret = hns3vf_dev_stop(eth_dev);
@@ -2764,8 +2766,7 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
 					  "process, ret = %d", ret);
 			goto err_mp_init_secondary;
 		}
-
-		hw->secondary_cnt++;
+		__atomic_fetch_add(&hw->secondary_cnt, 1, __ATOMIC_RELAXED);
 		return 0;
 	}
 
@@ -2863,8 +2864,10 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+		__atomic_fetch_sub(&hw->secondary_cnt, 1, __ATOMIC_RELAXED);
 		return 0;
+	}
 
 	if (hw->adapter_state < HNS3_NIC_CLOSING)
 		hns3vf_dev_close(eth_dev);
diff --git a/drivers/net/hns3/hns3_mp.c b/drivers/net/hns3/hns3_mp.c
index 2a7654d272..32046b7612 100644
--- a/drivers/net/hns3/hns3_mp.c
+++ b/drivers/net/hns3/hns3_mp.c
@@ -130,9 +130,11 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum hns3_mp_req_type type)
 	int ret;
 	int i;
 
-	if (rte_eal_process_type() == RTE_PROC_SECONDARY || !hw->secondary_cnt)
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY ||
+		__atomic_load_n(&hw->secondary_cnt, __ATOMIC_RELAXED) == 0)
 		return;
 	if (type != HNS3_MP_REQ_START_RXTX && type != HNS3_MP_REQ_STOP_RXTX) {
+
 		hns3_err(hw, "port %u unknown request (req_type %d)",
 			 dev->data->port_id, type);
 		return;
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.781254694 +0800
+++ 0224-net-hns3-fix-secondary-process-reference-count.patch	2021-11-10 14:17:02.044078006 +0800
@@ -1 +1 @@
-From 323263717774df318d8a6e64ac8bfe546e03b8f6 Mon Sep 17 00:00:00 2001
+From 0718b6168476e30ebccc8ed73c1984b0615043ef Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 323263717774df318d8a6e64ac8bfe546e03b8f6 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -19,2 +21,2 @@
- drivers/net/hns3/hns3_ethdev.c    | 10 +++++++---
- drivers/net/hns3/hns3_ethdev_vf.c | 10 +++++++---
+ drivers/net/hns3/hns3_ethdev.c    | 11 +++++++----
+ drivers/net/hns3/hns3_ethdev_vf.c | 11 +++++++----
@@ -22 +24 @@
- 3 files changed, 17 insertions(+), 7 deletions(-)
+ 3 files changed, 17 insertions(+), 9 deletions(-)
@@ -25 +27 @@
-index 03447c8d4a..dafaf31f65 100644
+index d318b9b7f7..8049573444 100644
@@ -28 +30 @@
-@@ -5850,8 +5850,10 @@ hns3_dev_close(struct rte_eth_dev *eth_dev)
+@@ -5199,8 +5199,10 @@ hns3_dev_close(struct rte_eth_dev *eth_dev)
@@ -40 +42 @@
-@@ -7377,7 +7379,7 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
+@@ -6287,8 +6289,7 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
@@ -43,0 +46 @@
+-
@@ -46 +48,0 @@
- 		hns3_tx_push_init(eth_dev);
@@ -49 +51,2 @@
-@@ -7480,8 +7482,10 @@ hns3_dev_uninit(struct rte_eth_dev *eth_dev)
+ 
+@@ -6387,8 +6388,10 @@ hns3_dev_uninit(struct rte_eth_dev *eth_dev)
@@ -62 +65 @@
-index 4a0d73fc29..41d61a8160 100644
+index 086828180b..0f8ffe0c32 100644
@@ -65 +68 @@
-@@ -1893,8 +1893,10 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
+@@ -1991,8 +1991,10 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
@@ -77 +80 @@
-@@ -2685,7 +2687,7 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -2764,8 +2766,7 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
@@ -80,0 +84 @@
+-
@@ -83 +86,0 @@
- 		hns3_tx_push_init(eth_dev);
@@ -86 +89,2 @@
-@@ -2787,8 +2789,10 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)
+ 
+@@ -2863,8 +2864,10 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)
@@ -99 +103 @@
-index cd514ac29c..c28598a53a 100644
+index 2a7654d272..32046b7612 100644
@@ -102 +106 @@
-@@ -150,8 +150,10 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum hns3_mp_req_type type)
+@@ -130,9 +130,11 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum hns3_mp_req_type type)
@@ -109,0 +114 @@
+ 	if (type != HNS3_MP_REQ_START_RXTX && type != HNS3_MP_REQ_STOP_RXTX) {
@@ -111 +115,0 @@
- 	if (!mp_req_type_is_valid(type)) {
@@ -113,0 +118 @@
+ 		return;

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix multi-process action register and unregister' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (223 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/hns3: fix secondary process reference count' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/hns3: unregister MP action on close for secondary' " Xueming Li
                   ` (27 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0209698523dc297d278394e2945f797ad1195f8b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0209698523dc297d278394e2945f797ad1195f8b Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 2 Nov 2021 09:38:27 +0800
Subject: [PATCH] net/hns3: fix multi-process action register and unregister
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 841f8693536f9410fd51d385e1090d35cfe59914 ]

The multi-process has the following problems:
1) After a port in primary process is closed, the mp action of the
   process is unregistered. Which will cause that other device in the
   primary process cannot respond to requests from secondary processes.
2) Because variable "hns3_inited" is set to true without returning an
   initial value, the mp action cannot be registered again after it is
   unregistered.
3) The mp action of primary and secondary process need to be registered
   only once regardless of port numbers in the process. That's what
   variable "hns3_inited" does. But the variable is difficult to
   understand.

This patch adds a hns3_process_local_data structure to resolve above
problems.

Fixes: 9570b1fdbdad ("net/hns3: check multi-process action register result")
Fixes: 23d4b61fee5d ("net/hns3: support multiple process")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    |  2 ++
 drivers/net/hns3/hns3_ethdev_vf.c |  2 ++
 drivers/net/hns3/hns3_mp.c        | 37 ++++++++++++++++++-------------
 drivers/net/hns3/hns3_mp.h        |  7 ++++++
 4 files changed, 33 insertions(+), 15 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 8049573444..46dfbe5d69 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6290,6 +6290,7 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
 			goto err_mp_init_secondary;
 		}
 		__atomic_fetch_add(&hw->secondary_cnt, 1, __ATOMIC_RELAXED);
+		process_data.eth_dev_cnt++;
 		return 0;
 	}
 
@@ -6302,6 +6303,7 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
 			     ret);
 		goto err_mp_init_primary;
 	}
+	process_data.eth_dev_cnt++;
 
 	hw->adapter_state = HNS3_NIC_UNINITIALIZED;
 	hns->is_vf = false;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 0f8ffe0c32..87859c45a4 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -2767,6 +2767,7 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
 			goto err_mp_init_secondary;
 		}
 		__atomic_fetch_add(&hw->secondary_cnt, 1, __ATOMIC_RELAXED);
+		process_data.eth_dev_cnt++;
 		return 0;
 	}
 
@@ -2779,6 +2780,7 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
 			     ret);
 		goto err_mp_init_primary;
 	}
+	process_data.eth_dev_cnt++;
 
 	hw->adapter_state = HNS3_NIC_UNINITIALIZED;
 	hns->is_vf = true;
diff --git a/drivers/net/hns3/hns3_mp.c b/drivers/net/hns3/hns3_mp.c
index 32046b7612..6461ded2d2 100644
--- a/drivers/net/hns3/hns3_mp.c
+++ b/drivers/net/hns3/hns3_mp.c
@@ -12,7 +12,8 @@
 #include "hns3_rxtx.h"
 #include "hns3_mp.h"
 
-static bool hns3_inited;
+/* local data for primary or secondary process. */
+struct hns3_process_local_data process_data;
 
 /*
  * Initialize IPC message.
@@ -198,14 +199,15 @@ int hns3_mp_init_primary(void)
 {
 	int ret;
 
-	if (!hns3_inited) {
-		/* primary is allowed to not support IPC */
-		ret = rte_mp_action_register(HNS3_MP_NAME, mp_primary_handle);
-		if (ret && rte_errno != ENOTSUP)
-			return ret;
+	if (process_data.init_done)
+		return 0;
 
-		hns3_inited = true;
-	}
+	/* primary is allowed to not support IPC */
+	ret = rte_mp_action_register(HNS3_MP_NAME, mp_primary_handle);
+	if (ret && rte_errno != ENOTSUP)
+		return ret;
+
+	process_data.init_done = true;
 
 	return 0;
 }
@@ -215,8 +217,12 @@ int hns3_mp_init_primary(void)
  */
 void hns3_mp_uninit_primary(void)
 {
-	if (hns3_inited)
+	process_data.eth_dev_cnt--;
+
+	if (process_data.eth_dev_cnt == 0) {
 		rte_mp_action_unregister(HNS3_MP_NAME);
+		process_data.init_done = false;
+	}
 }
 
 /*
@@ -226,13 +232,14 @@ int hns3_mp_init_secondary(void)
 {
 	int ret;
 
-	if (!hns3_inited) {
-		ret = rte_mp_action_register(HNS3_MP_NAME, mp_secondary_handle);
-		if (ret)
-			return ret;
+	if (process_data.init_done)
+		return 0;
 
-		hns3_inited = true;
-	}
+	ret = rte_mp_action_register(HNS3_MP_NAME, mp_secondary_handle);
+	if (ret)
+		return ret;
+
+	process_data.init_done = true;
 
 	return 0;
 }
diff --git a/drivers/net/hns3/hns3_mp.h b/drivers/net/hns3/hns3_mp.h
index 1a73598dc4..758ffa70ac 100644
--- a/drivers/net/hns3/hns3_mp.h
+++ b/drivers/net/hns3/hns3_mp.h
@@ -5,6 +5,13 @@
 #ifndef _HNS3_MP_H_
 #define _HNS3_MP_H_
 
+/* Local data for primary or secondary process. */
+struct hns3_process_local_data {
+	bool init_done; /* Process action register completed flag. */
+	int eth_dev_cnt; /* Ethdev count under the current process. */
+};
+extern struct hns3_process_local_data process_data;
+
 void hns3_mp_req_start_rxtx(struct rte_eth_dev *dev);
 void hns3_mp_req_stop_rxtx(struct rte_eth_dev *dev);
 int hns3_mp_init_primary(void);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.828273101 +0800
+++ 0225-net-hns3-fix-multi-process-action-register-and-unreg.patch	2021-11-10 14:17:02.047411312 +0800
@@ -1 +1 @@
-From 841f8693536f9410fd51d385e1090d35cfe59914 Mon Sep 17 00:00:00 2001
+From 0209698523dc297d278394e2945f797ad1195f8b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 841f8693536f9410fd51d385e1090d35cfe59914 ]
@@ -34 +37 @@
-index dafaf31f65..874854da61 100644
+index 8049573444..46dfbe5d69 100644
@@ -37 +40 @@
-@@ -7380,6 +7380,7 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
+@@ -6290,6 +6290,7 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
@@ -42 +44,0 @@
- 		hns3_tx_push_init(eth_dev);
@@ -45 +47,2 @@
-@@ -7391,6 +7392,7 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
+ 
+@@ -6302,6 +6303,7 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
@@ -54 +57 @@
-index 41d61a8160..91acd1f5dd 100644
+index 0f8ffe0c32..87859c45a4 100644
@@ -57 +60 @@
-@@ -2688,6 +2688,7 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -2767,6 +2767,7 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
@@ -62 +64,0 @@
- 		hns3_tx_push_init(eth_dev);
@@ -65 +67,2 @@
-@@ -2699,6 +2700,7 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
+ 
+@@ -2779,6 +2780,7 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
@@ -74 +77 @@
-index c28598a53a..1a79d249b8 100644
+index 32046b7612..6461ded2d2 100644
@@ -87 +90 @@
-@@ -230,14 +231,15 @@ int hns3_mp_init_primary(void)
+@@ -198,14 +199,15 @@ int hns3_mp_init_primary(void)
@@ -110 +113 @@
-@@ -247,8 +249,12 @@ int hns3_mp_init_primary(void)
+@@ -215,8 +217,12 @@ int hns3_mp_init_primary(void)
@@ -124 +127 @@
-@@ -258,13 +264,14 @@ int hns3_mp_init_secondary(void)
+@@ -226,13 +232,14 @@ int hns3_mp_init_secondary(void)
@@ -146 +149 @@
-index e0e4aeaf6c..b49532f985 100644
+index 1a73598dc4..758ffa70ac 100644
@@ -162 +165 @@
- void hns3_mp_req_start_tx(struct rte_eth_dev *dev);
+ int hns3_mp_init_primary(void);

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/hns3: unregister MP action on close for secondary' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (224 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/hns3: fix multi-process action register and unregister' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/txgbe: fix packet statistics' " Xueming Li
                   ` (26 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/04633406305865d907991c45507bbc4b64397cea

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 04633406305865d907991c45507bbc4b64397cea Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 2 Nov 2021 09:38:28 +0800
Subject: [PATCH] net/hns3: unregister MP action on close for secondary
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 443242212baeb67d298c54cc927553c92aa29bec ]

This patch fixes lack of unregistering MP action for secondary process
when PMD is closed.

Fixes: 9570b1fdbdad ("net/hns3: check multi-process action register result")
Fixes: 23d4b61fee5d ("net/hns3: support multiple process")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 6 ++++--
 drivers/net/hns3/hns3_ethdev_vf.c | 6 ++++--
 drivers/net/hns3/hns3_mp.c        | 5 +----
 drivers/net/hns3/hns3_mp.h        | 2 +-
 4 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 46dfbe5d69..0cce6e6561 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5201,6 +5201,7 @@ hns3_dev_close(struct rte_eth_dev *eth_dev)
 
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
 		__atomic_fetch_sub(&hw->secondary_cnt, 1, __ATOMIC_RELAXED);
+		hns3_mp_uninit();
 		return 0;
 	}
 
@@ -5217,7 +5218,7 @@ hns3_dev_close(struct rte_eth_dev *eth_dev)
 	hns3_uninit_pf(eth_dev);
 	hns3_free_all_queues(eth_dev);
 	rte_free(hw->reset.wait_data);
-	hns3_mp_uninit_primary();
+	hns3_mp_uninit();
 	hns3_warn(hw, "Close port %u finished", hw->data->port_id);
 
 	return ret;
@@ -6371,7 +6372,7 @@ err_init_pf:
 	rte_free(hw->reset.wait_data);
 
 err_init_reset:
-	hns3_mp_uninit_primary();
+	hns3_mp_uninit();
 
 err_mp_init_primary:
 err_mp_init_secondary:
@@ -6392,6 +6393,7 @@ hns3_dev_uninit(struct rte_eth_dev *eth_dev)
 
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
 		__atomic_fetch_sub(&hw->secondary_cnt, 1, __ATOMIC_RELAXED);
+		hns3_mp_uninit();
 		return 0;
 	}
 
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 87859c45a4..b47b0b2bf9 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1993,6 +1993,7 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
 
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
 		__atomic_fetch_sub(&hw->secondary_cnt, 1, __ATOMIC_RELAXED);
+		hns3_mp_uninit();
 		return 0;
 	}
 
@@ -2008,7 +2009,7 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
 	hns3vf_uninit_vf(eth_dev);
 	hns3_free_all_queues(eth_dev);
 	rte_free(hw->reset.wait_data);
-	hns3_mp_uninit_primary();
+	hns3_mp_uninit();
 	hns3_warn(hw, "Close port %u finished", hw->data->port_id);
 
 	return ret;
@@ -2846,7 +2847,7 @@ err_init_vf:
 	rte_free(hw->reset.wait_data);
 
 err_init_reset:
-	hns3_mp_uninit_primary();
+	hns3_mp_uninit();
 
 err_mp_init_primary:
 err_mp_init_secondary:
@@ -2868,6 +2869,7 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)
 
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
 		__atomic_fetch_sub(&hw->secondary_cnt, 1, __ATOMIC_RELAXED);
+		hns3_mp_uninit();
 		return 0;
 	}
 
diff --git a/drivers/net/hns3/hns3_mp.c b/drivers/net/hns3/hns3_mp.c
index 6461ded2d2..8d7fb93065 100644
--- a/drivers/net/hns3/hns3_mp.c
+++ b/drivers/net/hns3/hns3_mp.c
@@ -212,10 +212,7 @@ int hns3_mp_init_primary(void)
 	return 0;
 }
 
-/*
- * Un-initialize by primary process.
- */
-void hns3_mp_uninit_primary(void)
+void hns3_mp_uninit(void)
 {
 	process_data.eth_dev_cnt--;
 
diff --git a/drivers/net/hns3/hns3_mp.h b/drivers/net/hns3/hns3_mp.h
index 758ffa70ac..94c0c957e0 100644
--- a/drivers/net/hns3/hns3_mp.h
+++ b/drivers/net/hns3/hns3_mp.h
@@ -15,7 +15,7 @@ extern struct hns3_process_local_data process_data;
 void hns3_mp_req_start_rxtx(struct rte_eth_dev *dev);
 void hns3_mp_req_stop_rxtx(struct rte_eth_dev *dev);
 int hns3_mp_init_primary(void);
-void hns3_mp_uninit_primary(void);
+void hns3_mp_uninit(void);
 int hns3_mp_init_secondary(void);
 
 #endif /* _HNS3_MP_H_ */
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.874678014 +0800
+++ 0226-net-hns3-unregister-MP-action-on-close-for-secondary.patch	2021-11-10 14:17:02.050744618 +0800
@@ -1 +1 @@
-From 443242212baeb67d298c54cc927553c92aa29bec Mon Sep 17 00:00:00 2001
+From 04633406305865d907991c45507bbc4b64397cea Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 443242212baeb67d298c54cc927553c92aa29bec ]
@@ -22 +25 @@
-index 874854da61..88abbb84ea 100644
+index 46dfbe5d69..0cce6e6561 100644
@@ -25 +28 @@
-@@ -5852,6 +5852,7 @@ hns3_dev_close(struct rte_eth_dev *eth_dev)
+@@ -5201,6 +5201,7 @@ hns3_dev_close(struct rte_eth_dev *eth_dev)
@@ -33 +36 @@
-@@ -5868,7 +5869,7 @@ hns3_dev_close(struct rte_eth_dev *eth_dev)
+@@ -5217,7 +5218,7 @@ hns3_dev_close(struct rte_eth_dev *eth_dev)
@@ -42 +45 @@
-@@ -7463,7 +7464,7 @@ err_init_pf:
+@@ -6371,7 +6372,7 @@ err_init_pf:
@@ -51 +54 @@
-@@ -7486,6 +7487,7 @@ hns3_dev_uninit(struct rte_eth_dev *eth_dev)
+@@ -6392,6 +6393,7 @@ hns3_dev_uninit(struct rte_eth_dev *eth_dev)
@@ -60 +63 @@
-index 91acd1f5dd..f7f615bf72 100644
+index 87859c45a4..b47b0b2bf9 100644
@@ -63 +66 @@
-@@ -1895,6 +1895,7 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
+@@ -1993,6 +1993,7 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
@@ -71 +74 @@
-@@ -1910,7 +1911,7 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
+@@ -2008,7 +2009,7 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
@@ -80 +83 @@
-@@ -2769,7 +2770,7 @@ err_init_vf:
+@@ -2846,7 +2847,7 @@ err_init_vf:
@@ -89 +92 @@
-@@ -2793,6 +2794,7 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)
+@@ -2868,6 +2869,7 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)
@@ -98 +101 @@
-index 1a79d249b8..6d33bf49cd 100644
+index 6461ded2d2..8d7fb93065 100644
@@ -101 +104 @@
-@@ -244,10 +244,7 @@ int hns3_mp_init_primary(void)
+@@ -212,10 +212,7 @@ int hns3_mp_init_primary(void)
@@ -114 +117 @@
-index b49532f985..5738ab74a5 100644
+index 758ffa70ac..94c0c957e0 100644
@@ -117,3 +120,3 @@
-@@ -18,7 +18,7 @@ void hns3_mp_req_start_tx(struct rte_eth_dev *dev);
- void hns3_mp_req_stop_tx(struct rte_eth_dev *dev);
- 
+@@ -15,7 +15,7 @@ extern struct hns3_process_local_data process_data;
+ void hns3_mp_req_start_rxtx(struct rte_eth_dev *dev);
+ void hns3_mp_req_stop_rxtx(struct rte_eth_dev *dev);

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/txgbe: fix packet statistics' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (225 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/hns3: unregister MP action on close for secondary' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'test/crypto: fix max length for raw data path' " Xueming Li
                   ` (25 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/caefd6b5c0afab8ac02b7ce1b653bed4232bb464

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From caefd6b5c0afab8ac02b7ce1b653bed4232bb464 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 2 Nov 2021 16:10:25 +0800
Subject: [PATCH] net/txgbe: fix packet statistics
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3d4f43ea310e44ffc2b89b2306ea40707c290147 ]

Fix specific length packet statistics caused by wrong register
addresses.

Fixes: 24a4c76aff4d ("net/txgbe: add error types and registers")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_regs.h | 48 ++++++++++++++---------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/drivers/net/txgbe/base/txgbe_regs.h b/drivers/net/txgbe/base/txgbe_regs.h
index 83c219a6e2..3314975935 100644
--- a/drivers/net/txgbe/base/txgbe_regs.h
+++ b/drivers/net/txgbe/base/txgbe_regs.h
@@ -1071,30 +1071,30 @@ enum txgbe_5tuple_protocol {
 #define TXGBE_MACRXERRCRCH           0x01192C
 #define TXGBE_MACRXERRLENL           0x011978
 #define TXGBE_MACRXERRLENH           0x01197C
-#define TXGBE_MACRX1TO64L            0x001940
-#define TXGBE_MACRX1TO64H            0x001944
-#define TXGBE_MACRX65TO127L          0x001948
-#define TXGBE_MACRX65TO127H          0x00194C
-#define TXGBE_MACRX128TO255L         0x001950
-#define TXGBE_MACRX128TO255H         0x001954
-#define TXGBE_MACRX256TO511L         0x001958
-#define TXGBE_MACRX256TO511H         0x00195C
-#define TXGBE_MACRX512TO1023L        0x001960
-#define TXGBE_MACRX512TO1023H        0x001964
-#define TXGBE_MACRX1024TOMAXL        0x001968
-#define TXGBE_MACRX1024TOMAXH        0x00196C
-#define TXGBE_MACTX1TO64L            0x001834
-#define TXGBE_MACTX1TO64H            0x001838
-#define TXGBE_MACTX65TO127L          0x00183C
-#define TXGBE_MACTX65TO127H          0x001840
-#define TXGBE_MACTX128TO255L         0x001844
-#define TXGBE_MACTX128TO255H         0x001848
-#define TXGBE_MACTX256TO511L         0x00184C
-#define TXGBE_MACTX256TO511H         0x001850
-#define TXGBE_MACTX512TO1023L        0x001854
-#define TXGBE_MACTX512TO1023H        0x001858
-#define TXGBE_MACTX1024TOMAXL        0x00185C
-#define TXGBE_MACTX1024TOMAXH        0x001860
+#define TXGBE_MACRX1TO64L            0x011940
+#define TXGBE_MACRX1TO64H            0x011944
+#define TXGBE_MACRX65TO127L          0x011948
+#define TXGBE_MACRX65TO127H          0x01194C
+#define TXGBE_MACRX128TO255L         0x011950
+#define TXGBE_MACRX128TO255H         0x011954
+#define TXGBE_MACRX256TO511L         0x011958
+#define TXGBE_MACRX256TO511H         0x01195C
+#define TXGBE_MACRX512TO1023L        0x011960
+#define TXGBE_MACRX512TO1023H        0x011964
+#define TXGBE_MACRX1024TOMAXL        0x011968
+#define TXGBE_MACRX1024TOMAXH        0x01196C
+#define TXGBE_MACTX1TO64L            0x011834
+#define TXGBE_MACTX1TO64H            0x011838
+#define TXGBE_MACTX65TO127L          0x01183C
+#define TXGBE_MACTX65TO127H          0x011840
+#define TXGBE_MACTX128TO255L         0x011844
+#define TXGBE_MACTX128TO255H         0x011848
+#define TXGBE_MACTX256TO511L         0x01184C
+#define TXGBE_MACTX256TO511H         0x011850
+#define TXGBE_MACTX512TO1023L        0x011854
+#define TXGBE_MACTX512TO1023H        0x011858
+#define TXGBE_MACTX1024TOMAXL        0x01185C
+#define TXGBE_MACTX1024TOMAXH        0x011860
 
 #define TXGBE_MACRXUNDERSIZE         0x011938
 #define TXGBE_MACRXOVERSIZE          0x01193C
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.919468798 +0800
+++ 0227-net-txgbe-fix-packet-statistics.patch	2021-11-10 14:17:02.054077924 +0800
@@ -1 +1 @@
-From 3d4f43ea310e44ffc2b89b2306ea40707c290147 Mon Sep 17 00:00:00 2001
+From caefd6b5c0afab8ac02b7ce1b653bed4232bb464 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3d4f43ea310e44ffc2b89b2306ea40707c290147 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 48d9300a2e..144047ba62 100644
+index 83c219a6e2..3314975935 100644
@@ -21 +23 @@
-@@ -1072,30 +1072,30 @@ enum txgbe_5tuple_protocol {
+@@ -1071,30 +1071,30 @@ enum txgbe_5tuple_protocol {

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'test/crypto: fix max length for raw data path' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (226 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'net/txgbe: fix packet statistics' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'crypto/qat: fix status in RSA decryption' " Xueming Li
                   ` (24 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Kai Ji; +Cc: Luca Boccassi, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1ce38454223d075dc9ad3ca64b18e337db92e07f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1ce38454223d075dc9ad3ca64b18e337db92e07f Mon Sep 17 00:00:00 2001
From: Kai Ji <kai.ji@intel.com>
Date: Fri, 8 Oct 2021 12:33:45 +0100
Subject: [PATCH] test/crypto: fix max length for raw data path
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6d4c594e46529b6243f851b3a5e682b88829f3b3 ]

Update the calculation of the max length needed when converting mbuf to
data vec in partial digest test case. This update make sure the enough
vec buffers are allocated for the appended digest in sgl op for raw
datapath api.

Fixes: 4868f6591c6f ("test/crypto: add cases for raw datapath API")

Signed-off-by: Kai Ji <kai.ji@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test/test_cryptodev.c | 32 +++++++++++++++++++++++++++++---
 1 file changed, 29 insertions(+), 3 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index dd2b035b77..4772eea30c 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -178,6 +178,10 @@ post_process_raw_dp_op(void *user_data,	uint32_t index __rte_unused,
 			RTE_CRYPTO_OP_STATUS_ERROR;
 }
 
+static struct crypto_testsuite_params testsuite_params = { NULL };
+struct crypto_testsuite_params *p_testsuite_params = &testsuite_params;
+static struct crypto_unittest_params unittest_params;
+
 void
 process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
 		struct rte_crypto_op *op, uint8_t is_cipher, uint8_t is_auth,
@@ -192,6 +196,7 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
 	struct rte_crypto_sgl sgl;
 	uint32_t max_len;
 	union rte_cryptodev_session_ctx sess;
+	uint64_t auth_end_iova;
 	uint32_t count = 0;
 	struct rte_crypto_raw_dp_ctx *ctx;
 	uint32_t cipher_offset = 0, cipher_len = 0, auth_offset = 0,
@@ -201,6 +206,8 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
 	int ctx_service_size;
 	int32_t status = 0;
 	int enqueue_status, dequeue_status;
+	struct crypto_unittest_params *ut_params = &unittest_params;
+	int is_sgl = sop->m_src->nb_segs > 1;
 
 	ctx_service_size = rte_cryptodev_get_raw_dp_ctx_size(dev_id);
 	if (ctx_service_size < 0) {
@@ -266,6 +273,28 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
 		digest.va = (void *)sop->auth.digest.data;
 		digest.iova = sop->auth.digest.phys_addr;
 
+		if (is_sgl) {
+			uint32_t remaining_off = auth_offset + auth_len;
+			struct rte_mbuf *sgl_buf = sop->m_src;
+
+			while (remaining_off >= rte_pktmbuf_data_len(sgl_buf)
+					&& sgl_buf->next != NULL) {
+				remaining_off -= rte_pktmbuf_data_len(sgl_buf);
+				sgl_buf = sgl_buf->next;
+			}
+
+			auth_end_iova = (uint64_t)rte_pktmbuf_iova_offset(
+				sgl_buf, remaining_off);
+		} else {
+			auth_end_iova = rte_pktmbuf_iova(op->sym->m_src) +
+							 auth_offset + auth_len;
+		}
+		/* Then check if digest-encrypted conditions are met */
+		if ((auth_offset + auth_len < cipher_offset + cipher_len) &&
+				(digest.iova == auth_end_iova) && is_sgl)
+			max_len = RTE_MAX(max_len, auth_offset + auth_len +
+				ut_params->auth_xform.auth.digest_length);
+
 	} else if (is_cipher) {
 		cipher_offset = sop->cipher.data.offset;
 		cipher_len = sop->cipher.data.length;
@@ -488,9 +517,6 @@ process_crypto_request(uint8_t dev_id, struct rte_crypto_op *op)
 	return op;
 }
 
-static struct crypto_testsuite_params testsuite_params = { NULL };
-static struct crypto_unittest_params unittest_params;
-
 static int
 testsuite_setup(void)
 {
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.958440160 +0800
+++ 0228-test-crypto-fix-max-length-for-raw-data-path.patch	2021-11-10 14:17:02.060744536 +0800
@@ -1 +1 @@
-From 6d4c594e46529b6243f851b3a5e682b88829f3b3 Mon Sep 17 00:00:00 2001
+From 1ce38454223d075dc9ad3ca64b18e337db92e07f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6d4c594e46529b6243f851b3a5e682b88829f3b3 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +19,2 @@
- app/test/test_cryptodev.c | 33 +++++++++++++++++++++++++++++----
- 1 file changed, 29 insertions(+), 4 deletions(-)
+ app/test/test_cryptodev.c | 32 +++++++++++++++++++++++++++++---
+ 1 file changed, 29 insertions(+), 3 deletions(-)
@@ -21 +23 @@
-index 814a0b401d..f5f82abbd7 100644
+index dd2b035b77..4772eea30c 100644
@@ -24 +26 @@
-@@ -179,6 +179,10 @@ post_process_raw_dp_op(void *user_data,	uint32_t index __rte_unused,
+@@ -178,6 +178,10 @@ post_process_raw_dp_op(void *user_data,	uint32_t index __rte_unused,
@@ -35,2 +37,2 @@
-@@ -193,6 +197,7 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
- 	struct rte_crypto_sgl sgl, dest_sgl;
+@@ -192,6 +196,7 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
+ 	struct rte_crypto_sgl sgl;
@@ -43 +45 @@
-@@ -202,6 +207,8 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
+@@ -201,6 +206,8 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
@@ -52 +54 @@
-@@ -267,6 +274,28 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
+@@ -266,6 +273,28 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
@@ -81 +83 @@
-@@ -503,10 +532,6 @@ process_crypto_request(uint8_t dev_id, struct rte_crypto_op *op)
+@@ -488,9 +517,6 @@ process_crypto_request(uint8_t dev_id, struct rte_crypto_op *op)
@@ -86 +87,0 @@
--struct crypto_testsuite_params *p_testsuite_params = &testsuite_params;

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'crypto/qat: fix status in RSA decryption' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (227 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'test/crypto: fix max length for raw data path' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'crypto/qat: fix uncleared cookies after operation' " Xueming Li
                   ` (23 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Arek Kusztal; +Cc: Luca Boccassi, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d87c1f105f03c7f584915b451a59ad4c2c91a270

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d87c1f105f03c7f584915b451a59ad4c2c91a270 Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Thu, 21 Oct 2021 11:05:43 +0100
Subject: [PATCH] crypto/qat: fix status in RSA decryption
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0a9e63940337f9de9d07080b63160b5e89ea1425 ]

This commit fixes not set crypto op status when decrypting
with RSA algorithm.

Fixes: e2c5f4ea994c ("crypto/qat: support RSA in asym")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 drivers/crypto/qat/qat_asym.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/qat/qat_asym.c
index 85973812a8..983c639d68 100644
--- a/drivers/crypto/qat/qat_asym.c
+++ b/drivers/crypto/qat/qat_asym.c
@@ -629,6 +629,8 @@ static void qat_asym_collect_response(struct rte_crypto_op *rx_op,
 					rte_memcpy(rsa_result,
 						cookie->output_array[0],
 						alg_size_in_bytes);
+					rx_op->status =
+						RTE_CRYPTO_OP_STATUS_SUCCESS;
 					break;
 				default:
 					QAT_LOG(ERR, "Padding not supported");
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.005898549 +0800
+++ 0229-crypto-qat-fix-status-in-RSA-decryption.patch	2021-11-10 14:17:02.060744536 +0800
@@ -1 +1 @@
-From 0a9e63940337f9de9d07080b63160b5e89ea1425 Mon Sep 17 00:00:00 2001
+From d87c1f105f03c7f584915b451a59ad4c2c91a270 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0a9e63940337f9de9d07080b63160b5e89ea1425 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'crypto/qat: fix uncleared cookies after operation' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (228 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'crypto/qat: fix status in RSA decryption' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'examples/fips_validation: fix device start' " Xueming Li
                   ` (22 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Arek Kusztal; +Cc: Luca Boccassi, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7982968fd4ffb1a32ca4e90a8f7c8fc10226a930

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7982968fd4ffb1a32ca4e90a8f7c8fc10226a930 Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Thu, 21 Oct 2021 11:06:01 +0100
Subject: [PATCH] crypto/qat: fix uncleared cookies after operation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 867ba300f915291629c33b2eadf6a98564c622a0 ]

This commit fixes uncleared cookies issue when using
RSA algorithm.

Fixes: e2c5f4ea994c ("crypto/qat: support RSA in asym")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 drivers/crypto/qat/qat_asym.c | 41 +++++++++++++++++++++++++----------
 1 file changed, 29 insertions(+), 12 deletions(-)

diff --git a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/qat/qat_asym.c
index 983c639d68..f893508030 100644
--- a/drivers/crypto/qat/qat_asym.c
+++ b/drivers/crypto/qat/qat_asym.c
@@ -65,27 +65,45 @@ static size_t max_of(int n, ...)
 }
 
 static void qat_clear_arrays(struct qat_asym_op_cookie *cookie,
-		int in_count, int out_count, int in_size, int out_size)
+		int in_count, int out_count, int alg_size)
 {
 	int i;
 
 	for (i = 0; i < in_count; i++)
-		memset(cookie->input_array[i], 0x0, in_size);
+		memset(cookie->input_array[i], 0x0, alg_size);
 	for (i = 0; i < out_count; i++)
-		memset(cookie->output_array[i], 0x0, out_size);
+		memset(cookie->output_array[i], 0x0, alg_size);
+}
+
+static void qat_clear_arrays_crt(struct qat_asym_op_cookie *cookie,
+		int alg_size)
+{
+	int i;
+
+	memset(cookie->input_array[0], 0x0, alg_size);
+	for (i = 1; i < QAT_ASYM_RSA_QT_NUM_IN_PARAMS; i++)
+		memset(cookie->input_array[i], 0x0, alg_size / 2);
+	for (i = 0; i < QAT_ASYM_RSA_NUM_OUT_PARAMS; i++)
+		memset(cookie->output_array[i], 0x0, alg_size);
 }
 
 static void qat_clear_arrays_by_alg(struct qat_asym_op_cookie *cookie,
-		enum rte_crypto_asym_xform_type alg, int in_size, int out_size)
+		struct rte_crypto_asym_xform *xform, int alg_size)
 {
-	if (alg == RTE_CRYPTO_ASYM_XFORM_MODEX)
+	if (xform->xform_type == RTE_CRYPTO_ASYM_XFORM_MODEX)
 		qat_clear_arrays(cookie, QAT_ASYM_MODEXP_NUM_IN_PARAMS,
-				QAT_ASYM_MODEXP_NUM_OUT_PARAMS, in_size,
-				out_size);
-	else if (alg == RTE_CRYPTO_ASYM_XFORM_MODINV)
+				QAT_ASYM_MODEXP_NUM_OUT_PARAMS, alg_size);
+	else if (xform->xform_type == RTE_CRYPTO_ASYM_XFORM_MODINV)
 		qat_clear_arrays(cookie, QAT_ASYM_MODINV_NUM_IN_PARAMS,
-				QAT_ASYM_MODINV_NUM_OUT_PARAMS, in_size,
-				out_size);
+				QAT_ASYM_MODINV_NUM_OUT_PARAMS, alg_size);
+	else if (xform->xform_type == RTE_CRYPTO_ASYM_XFORM_RSA) {
+		if (xform->rsa.key_type == RTE_RSA_KET_TYPE_QT)
+			qat_clear_arrays_crt(cookie, alg_size);
+		else {
+			qat_clear_arrays(cookie, QAT_ASYM_RSA_NUM_IN_PARAMS,
+				QAT_ASYM_RSA_NUM_OUT_PARAMS, alg_size);
+		}
+	}
 }
 
 static int qat_asym_check_nonzero(rte_crypto_param n)
@@ -657,8 +675,7 @@ static void qat_asym_collect_response(struct rte_crypto_op *rx_op,
 			}
 		}
 	}
-	qat_clear_arrays_by_alg(cookie, xform->xform_type, alg_size_in_bytes,
-			alg_size_in_bytes);
+	qat_clear_arrays_by_alg(cookie, xform, alg_size_in_bytes);
 }
 
 void
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.045415529 +0800
+++ 0230-crypto-qat-fix-uncleared-cookies-after-operation.patch	2021-11-10 14:17:02.060744536 +0800
@@ -1 +1 @@
-From 867ba300f915291629c33b2eadf6a98564c622a0 Mon Sep 17 00:00:00 2001
+From 7982968fd4ffb1a32ca4e90a8f7c8fc10226a930 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 867ba300f915291629c33b2eadf6a98564c622a0 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'examples/fips_validation: fix device start' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (229 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'crypto/qat: fix uncleared cookies after operation' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'test/compress-perf: remove unused variable' " Xueming Li
                   ` (21 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Fan Zhang; +Cc: Luca Boccassi, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/50b00472f9163d78ee2cd527c30b4ef3d98a4430

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 50b00472f9163d78ee2cd527c30b4ef3d98a4430 Mon Sep 17 00:00:00 2001
From: Fan Zhang <roy.fan.zhang@intel.com>
Date: Thu, 28 Oct 2021 11:22:00 +0100
Subject: [PATCH] examples/fips_validation: fix device start
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3b2311cc096810dae761578cf526a95fc56cfc85 ]

This patch fixes the missing device start for fips validation
sample app.

Bugzilla ID: 842
Fixes: 261bbff75e34 ("examples: use separate crypto session mempools")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/fips_validation/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index dee9272880..7f4beef94c 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -128,6 +128,10 @@ cryptodev_fips_validate_app_int(void)
 	if (ret < 0)
 		goto error_exit;
 
+	ret = rte_cryptodev_start(env.dev_id);
+	if (ret < 0)
+		goto error_exit;
+
 	return 0;
 
 error_exit:
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.085580085 +0800
+++ 0231-examples-fips_validation-fix-device-start.patch	2021-11-10 14:17:02.064077842 +0800
@@ -1 +1 @@
-From 3b2311cc096810dae761578cf526a95fc56cfc85 Mon Sep 17 00:00:00 2001
+From 50b00472f9163d78ee2cd527c30b4ef3d98a4430 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3b2311cc096810dae761578cf526a95fc56cfc85 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index b0de3d269a..dc40bffe7d 100644
+index dee9272880..7f4beef94c 100644
@@ -23 +25 @@
-@@ -134,6 +134,10 @@ cryptodev_fips_validate_app_int(void)
+@@ -128,6 +128,10 @@ cryptodev_fips_validate_app_int(void)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'test/compress-perf: remove unused variable' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (230 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'examples/fips_validation: fix device start' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'examples/ipsec-secgw: move global array from header' " Xueming Li
                   ` (20 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Jim Harris; +Cc: Luca Boccassi, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/046835a080e15ccfba08a2f69264da9862732420

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 046835a080e15ccfba08a2f69264da9862732420 Mon Sep 17 00:00:00 2001
From: Jim Harris <james.r.harris@intel.com>
Date: Fri, 29 Oct 2021 17:16:22 +0000
Subject: [PATCH] test/compress-perf: remove unused variable
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1345c5baae35d16b20126704c8636c476c4f32eb ]

clang-13 rightfully complains that the total_deq_ops
variable in cperf_cyclecount_op_setup is set but not
used, since the final accumulated total_deq_ops
results isn't used anywhere. So just remove the
total_deq_ops variable.

Fixes: 2695db95a147 ("test/compress: add cycle-count mode to perf tool")

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/test-compress-perf/comp_perf_test_cyclecount.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/app/test-compress-perf/comp_perf_test_cyclecount.c b/app/test-compress-perf/comp_perf_test_cyclecount.c
index 55559a7d5a..c875ddbdac 100644
--- a/app/test-compress-perf/comp_perf_test_cyclecount.c
+++ b/app/test-compress-perf/comp_perf_test_cyclecount.c
@@ -76,7 +76,6 @@ cperf_cyclecount_op_setup(struct rte_comp_op **ops,
 
 	for (iter = 0; iter < num_iter; iter++) {
 		uint32_t remaining_ops = mem->total_bufs;
-		uint32_t total_deq_ops = 0;
 		uint32_t total_enq_ops = 0;
 		uint16_t num_enq = 0;
 		uint16_t num_deq = 0;
@@ -136,7 +135,6 @@ cperf_cyclecount_op_setup(struct rte_comp_op **ops,
 			/* instead of the real dequeue operation */
 			num_deq = num_ops;
 
-			total_deq_ops += num_deq;
 			rte_mempool_put_bulk(mem->op_pool,
 					     (void **)ops, num_deq);
 		}
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.126585122 +0800
+++ 0232-test-compress-perf-remove-unused-variable.patch	2021-11-10 14:17:02.064077842 +0800
@@ -1 +1 @@
-From 1345c5baae35d16b20126704c8636c476c4f32eb Mon Sep 17 00:00:00 2001
+From 046835a080e15ccfba08a2f69264da9862732420 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1345c5baae35d16b20126704c8636c476c4f32eb ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'examples/ipsec-secgw: move global array from header' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (231 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'test/compress-perf: remove unused variable' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'common/qat: fix queue pairs number' " Xueming Li
                   ` (19 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Luca Boccassi, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/eb0d669844b89a68f81af34c1f04def4f2e210d0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From eb0d669844b89a68f81af34c1f04def4f2e210d0 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Wed, 3 Nov 2021 11:56:18 +0000
Subject: [PATCH] examples/ipsec-secgw: move global array from header
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6f1d5c0b8e535822f44175fd548eadb1c08f8fa7 ]

When STATS_INTERVAL is set to a non-zero value the
core_statistics array will be defined in multiple
compilation units and this can trigger a linker error
on particular environments. In order to fix this the
core_statistics definition was moved out of the header file.

Fixes: 1329602b6c8f ("examples/ipsec-secgw: add per-core packet statistics")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 2 ++
 examples/ipsec-secgw/ipsec-secgw.h | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 1efcb5e635..4cd3ecb99d 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -292,6 +292,8 @@ adjust_ipv6_pktlen(struct rte_mbuf *m, const struct rte_ipv6_hdr *iph,
 
 #if (STATS_INTERVAL > 0)
 
+struct ipsec_core_statistics core_statistics[RTE_MAX_LCORE];
+
 /* Print out statistics on packet distribution */
 static void
 print_stats_cb(__rte_unused void *param)
diff --git a/examples/ipsec-secgw/ipsec-secgw.h b/examples/ipsec-secgw/ipsec-secgw.h
index f2281e73cf..7e094ed495 100644
--- a/examples/ipsec-secgw/ipsec-secgw.h
+++ b/examples/ipsec-secgw/ipsec-secgw.h
@@ -90,7 +90,7 @@ struct ipsec_core_statistics {
 	uint64_t burst_rx;
 } __rte_cache_aligned;
 
-struct ipsec_core_statistics core_statistics[RTE_MAX_LCORE];
+extern struct ipsec_core_statistics core_statistics[RTE_MAX_LCORE];
 #endif /* STATS_INTERVAL */
 
 extern struct ethaddr_info ethaddr_tbl[RTE_MAX_ETHPORTS];
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.166802192 +0800
+++ 0233-examples-ipsec-secgw-move-global-array-from-header.patch	2021-11-10 14:17:02.064077842 +0800
@@ -1 +1 @@
-From 6f1d5c0b8e535822f44175fd548eadb1c08f8fa7 Mon Sep 17 00:00:00 2001
+From eb0d669844b89a68f81af34c1f04def4f2e210d0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6f1d5c0b8e535822f44175fd548eadb1c08f8fa7 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 5fcf424efe..ea8e3bcb87 100644
+index 1efcb5e635..4cd3ecb99d 100644
@@ -26 +28 @@
-@@ -291,6 +291,8 @@ adjust_ipv6_pktlen(struct rte_mbuf *m, const struct rte_ipv6_hdr *iph,
+@@ -292,6 +292,8 @@ adjust_ipv6_pktlen(struct rte_mbuf *m, const struct rte_ipv6_hdr *iph,
@@ -36 +38 @@
-index 96e22de45e..f9be303c28 100644
+index f2281e73cf..7e094ed495 100644
@@ -39 +41 @@
-@@ -93,7 +93,7 @@ struct ipsec_core_statistics {
+@@ -90,7 +90,7 @@ struct ipsec_core_statistics {

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'common/qat: fix queue pairs number' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (232 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'examples/ipsec-secgw: move global array from header' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:31 ` [dpdk-stable] patch 'common/mlx5: fix flex parser DevX creation routine' " Xueming Li
                   ` (18 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Przemyslaw Zegan; +Cc: Luca Boccassi, Arek Kusztal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/78d2c61c972dd0c6e8ab9ae1726dd5a31ff693af

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 78d2c61c972dd0c6e8ab9ae1726dd5a31ff693af Mon Sep 17 00:00:00 2001
From: Przemyslaw Zegan <przemyslawx.zegan@intel.com>
Date: Wed, 3 Nov 2021 15:08:23 +0000
Subject: [PATCH] common/qat: fix queue pairs number
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4badfb0205f786b56cc25784787cbe566c0ad640 ]

This patch fixes incorrect number of queue pairs.

Fixes: 4c0d2ee23c39 ("crypto/qat: remove incorrect usage of bundle number")

Signed-off-by: Przemyslaw Zegan <przemyslawx.zegan@intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 drivers/common/qat/qat_adf/adf_transport_access_macros.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/qat/qat_adf/adf_transport_access_macros.h b/drivers/common/qat/qat_adf/adf_transport_access_macros.h
index 504ffb7236..044974c360 100644
--- a/drivers/common/qat/qat_adf/adf_transport_access_macros.h
+++ b/drivers/common/qat/qat_adf/adf_transport_access_macros.h
@@ -53,7 +53,7 @@
 #define ADF_DEFAULT_RING_SIZE ADF_RING_SIZE_16K
 
 /* Maximum number of qps on a device for any service type */
-#define ADF_MAX_QPS_ON_ANY_SERVICE	2
+#define ADF_MAX_QPS_ON_ANY_SERVICE	4
 #define ADF_RING_DIR_TX			0
 #define ADF_RING_DIR_RX			1
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.209840681 +0800
+++ 0234-common-qat-fix-queue-pairs-number.patch	2021-11-10 14:17:02.067411148 +0800
@@ -1 +1 @@
-From 4badfb0205f786b56cc25784787cbe566c0ad640 Mon Sep 17 00:00:00 2001
+From 78d2c61c972dd0c6e8ab9ae1726dd5a31ff693af Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4badfb0205f786b56cc25784787cbe566c0ad640 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index f98bbb5001..a6d403fac3 100644
+index 504ffb7236..044974c360 100644
@@ -21,2 +23,2 @@
-@@ -55,7 +55,7 @@
- #define ADF_ARB_RINGSRVARBEN_OFFSET 0x19C
+@@ -53,7 +53,7 @@
+ #define ADF_DEFAULT_RING_SIZE ADF_RING_SIZE_16K

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'common/mlx5: fix flex parser DevX creation routine' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (233 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'common/qat: fix queue pairs number' " Xueming Li
@ 2021-11-10  6:31 ` Xueming Li
  2021-11-10  6:32 ` [dpdk-stable] patch 'net/mlx5: fix Altivec Rx' " Xueming Li
                   ` (17 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:31 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/496a57699cecbb156cfbe917f42ebf089756f3ee

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 496a57699cecbb156cfbe917f42ebf089756f3ee Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Tue, 2 Nov 2021 10:53:40 +0200
Subject: [PATCH] common/mlx5: fix flex parser DevX creation routine
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b28025baf3de556dc8092111404846b32ff7c51d ]

Add missing modify_field_select, next_header_field_size
field values setting.

Fixes: 38119ebe01d6 ("common/mlx5: add DevX command for flex parsers")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index ee1a3ddbaf..450595ee70 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -518,10 +518,9 @@ mlx5_devx_cmd_query_parse_samples(struct mlx5_devx_obj *flex_obj,
 	return ret;
 }
 
-
 struct mlx5_devx_obj *
 mlx5_devx_cmd_create_flex_parser(void *ctx,
-			      struct mlx5_devx_graph_node_attr *data)
+				 struct mlx5_devx_graph_node_attr *data)
 {
 	uint32_t in[MLX5_ST_SZ_DW(create_flex_parser_in)] = {0};
 	uint32_t out[MLX5_ST_SZ_DW(general_obj_out_cmd_hdr)] = {0};
@@ -545,12 +544,18 @@ mlx5_devx_cmd_create_flex_parser(void *ctx,
 		 MLX5_GENERAL_OBJ_TYPE_FLEX_PARSE_GRAPH);
 	MLX5_SET(parse_graph_flex, flex, header_length_mode,
 		 data->header_length_mode);
+	MLX5_SET64(parse_graph_flex, flex, modify_field_select,
+		   data->modify_field_select);
 	MLX5_SET(parse_graph_flex, flex, header_length_base_value,
 		 data->header_length_base_value);
 	MLX5_SET(parse_graph_flex, flex, header_length_field_offset,
 		 data->header_length_field_offset);
 	MLX5_SET(parse_graph_flex, flex, header_length_field_shift,
 		 data->header_length_field_shift);
+	MLX5_SET(parse_graph_flex, flex, next_header_field_offset,
+		 data->next_header_field_offset);
+	MLX5_SET(parse_graph_flex, flex, next_header_field_size,
+		 data->next_header_field_size);
 	MLX5_SET(parse_graph_flex, flex, header_length_field_mask,
 		 data->header_length_field_mask);
 	for (i = 0; i < MLX5_GRAPH_NODE_SAMPLE_NUM; i++) {
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.250907214 +0800
+++ 0235-common-mlx5-fix-flex-parser-DevX-creation-routine.patch	2021-11-10 14:17:02.067411148 +0800
@@ -1 +1 @@
-From b28025baf3de556dc8092111404846b32ff7c51d Mon Sep 17 00:00:00 2001
+From 496a57699cecbb156cfbe917f42ebf089756f3ee Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b28025baf3de556dc8092111404846b32ff7c51d ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 9b5a3b181a..0c03c20b25 100644
+index ee1a3ddbaf..450595ee70 100644
@@ -22 +24 @@
-@@ -620,10 +620,9 @@ mlx5_devx_cmd_query_parse_samples(struct mlx5_devx_obj *flex_obj,
+@@ -518,10 +518,9 @@ mlx5_devx_cmd_query_parse_samples(struct mlx5_devx_obj *flex_obj,
@@ -34 +36 @@
-@@ -647,12 +646,18 @@ mlx5_devx_cmd_create_flex_parser(void *ctx,
+@@ -545,12 +544,18 @@ mlx5_devx_cmd_create_flex_parser(void *ctx,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix Altivec Rx' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (234 preceding siblings ...)
  2021-11-10  6:31 ` [dpdk-stable] patch 'common/mlx5: fix flex parser DevX creation routine' " Xueming Li
@ 2021-11-10  6:32 ` Xueming Li
  2021-11-10  6:32 ` [dpdk-stable] patch 'net/mlx5: fix Rx queue memory allocation return value' " Xueming Li
                   ` (16 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:32 UTC (permalink / raw)
  To: Xueming Li; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/22f7bcd2d8dff141861b539d4a6597d3b61f8006

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 22f7bcd2d8dff141861b539d4a6597d3b61f8006 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Thu, 4 Nov 2021 20:33:08 +0800
Subject: [PATCH] net/mlx5: fix Altivec Rx
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 68fa62924de4fed4c241db9b7fcb58e66f62a2f9 ]

This patch fixes stale field reference.

Fixes: a18ac6113331 ("net/mlx5: add metadata support to Rx datapath")

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxtx_vec_altivec.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
index 171dcb411e..2a338dbf5a 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
@@ -974,10 +974,10 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 			(vector unsigned short)cqe_tmp1, cqe_sel_mask1);
 		cqe_tmp2 = (vector unsigned char)(vector unsigned long){
 			*(__rte_aligned(8) unsigned long *)
-			&cq[pos + p3].rsvd3[9], 0LL};
+			&cq[pos + p3].rsvd4[2], 0LL};
 		cqe_tmp1 = (vector unsigned char)(vector unsigned long){
 			*(__rte_aligned(8) unsigned long *)
-			&cq[pos + p2].rsvd3[9], 0LL};
+			&cq[pos + p2].rsvd4[2], 0LL};
 		cqes[3] = (vector unsigned char)
 			vec_sel((vector unsigned short)cqes[3],
 			(vector unsigned short)cqe_tmp2,
@@ -1037,10 +1037,10 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 			(vector unsigned short)cqe_tmp1, cqe_sel_mask1);
 		cqe_tmp2 = (vector unsigned char)(vector unsigned long){
 			*(__rte_aligned(8) unsigned long *)
-			&cq[pos + p1].rsvd3[9], 0LL};
+			&cq[pos + p1].rsvd4[2], 0LL};
 		cqe_tmp1 = (vector unsigned char)(vector unsigned long){
 			*(__rte_aligned(8) unsigned long *)
-			&cq[pos].rsvd3[9], 0LL};
+			&cq[pos].rsvd4[2], 0LL};
 		cqes[1] = (vector unsigned char)
 			vec_sel((vector unsigned short)cqes[1],
 			(vector unsigned short)cqe_tmp2, cqe_sel_mask2);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.291950954 +0800
+++ 0236-net-mlx5-fix-Altivec-Rx.patch	2021-11-10 14:17:02.067411148 +0800
@@ -1 +1 @@
-From 68fa62924de4fed4c241db9b7fcb58e66f62a2f9 Mon Sep 17 00:00:00 2001
+From 22f7bcd2d8dff141861b539d4a6597d3b61f8006 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 68fa62924de4fed4c241db9b7fcb58e66f62a2f9 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index bcf487c34e..1d00c1c43d 100644
+index 171dcb411e..2a338dbf5a 100644

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix Rx queue memory allocation return value' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (235 preceding siblings ...)
  2021-11-10  6:32 ` [dpdk-stable] patch 'net/mlx5: fix Altivec Rx' " Xueming Li
@ 2021-11-10  6:32 ` Xueming Li
  2021-11-10  6:32 ` [dpdk-stable] patch 'net/i40e: fix forward outer IPv6 VXLAN' " Xueming Li
                   ` (15 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:32 UTC (permalink / raw)
  To: Xueming Li; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2d734fb867e06e6622ae632eda8d2d6c16bd0ff9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2d734fb867e06e6622ae632eda8d2d6c16bd0ff9 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Thu, 4 Nov 2021 20:33:11 +0800
Subject: [PATCH] net/mlx5: fix Rx queue memory allocation return value
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit fdb67b84a52970ae06b54464a449b6f503f5a7ab ]

If error happened during Rx queue mbuf allocation, boolean value
returned. From description, return value should be error number.

This patch returns negative error number.

Fixes: 0f20acbf5eda ("net/mlx5: implement vectorized MPRQ burst")

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index b5268df57d..ed38c1eea0 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -198,7 +198,7 @@ error:
  *   Pointer to RX queue structure.
  *
  * @return
- *   0 on success, errno value on failure.
+ *   0 on success, negative errno value on failure.
  */
 static int
 rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl)
@@ -289,7 +289,7 @@ error:
  *   Pointer to RX queue structure.
  *
  * @return
- *   0 on success, errno value on failure.
+ *   0 on success, negative errno value on failure.
  */
 int
 rxq_alloc_elts(struct mlx5_rxq_ctrl *rxq_ctrl)
@@ -302,7 +302,9 @@ rxq_alloc_elts(struct mlx5_rxq_ctrl *rxq_ctrl)
 	 */
 	if (mlx5_rxq_mprq_enabled(&rxq_ctrl->rxq))
 		ret = rxq_alloc_elts_mprq(rxq_ctrl);
-	return (ret || rxq_alloc_elts_sprq(rxq_ctrl));
+	if (ret == 0)
+		ret = rxq_alloc_elts_sprq(rxq_ctrl);
+	return ret;
 }
 
 /**
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.332042781 +0800
+++ 0237-net-mlx5-fix-Rx-queue-memory-allocation-return-value.patch	2021-11-10 14:17:02.070744455 +0800
@@ -1 +1 @@
-From fdb67b84a52970ae06b54464a449b6f503f5a7ab Mon Sep 17 00:00:00 2001
+From 2d734fb867e06e6622ae632eda8d2d6c16bd0ff9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fdb67b84a52970ae06b54464a449b6f503f5a7ab ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 9220bb2c15..4567b43c1b 100644
+index b5268df57d..ed38c1eea0 100644
@@ -24 +26 @@
-@@ -129,7 +129,7 @@ error:
+@@ -198,7 +198,7 @@ error:
@@ -33 +35 @@
-@@ -220,7 +220,7 @@ error:
+@@ -289,7 +289,7 @@ error:
@@ -42 +44 @@
-@@ -233,7 +233,9 @@ rxq_alloc_elts(struct mlx5_rxq_ctrl *rxq_ctrl)
+@@ -302,7 +302,9 @@ rxq_alloc_elts(struct mlx5_rxq_ctrl *rxq_ctrl)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix forward outer IPv6 VXLAN' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (236 preceding siblings ...)
  2021-11-10  6:32 ` [dpdk-stable] patch 'net/mlx5: fix Rx queue memory allocation return value' " Xueming Li
@ 2021-11-10  6:32 ` Xueming Li
  2021-11-10  6:32 ` [dpdk-stable] patch 'ethdev: fix crash on owner delete' " Xueming Li
                   ` (14 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:32 UTC (permalink / raw)
  To: Jie Wang; +Cc: Luca Boccassi, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/137c9ce9929eef28f83e50650ee8b0ff4a49e3f4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 137c9ce9929eef28f83e50650ee8b0ff4a49e3f4 Mon Sep 17 00:00:00 2001
From: Jie Wang <jie1x.wang@intel.com>
Date: Fri, 5 Nov 2021 11:37:05 +0800
Subject: [PATCH] net/i40e: fix forward outer IPv6 VXLAN
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8cc79a1636cda2e9d6ba4cfd1cf16cf2a782ae1b ]

Testpmd forwards packets in checksum mode that it need to calculate
the checksum of each layer's protocol. Then it will fill flags and
header length into mbuf.

In process_outer_cksums, HW calculates the outer checksum if
tx_offloads contains outer UDP checksum otherwise SW calculates
the outer checksum.

When tx_offloads contains outer UDP checksum or outer IPv4 checksum,
mbuf will be filled with correct header length.

This patch added outer UDP checksum in tx_offload_capa and
I40E_TX_OFFLOAD_MASK, when we set csum hw outer-udp on that the
engine can forward outer IPv6 VXLAN packets.

Fixes: 7497d3e2f777 ("net/i40e: convert to new Tx offloads API")

Signed-off-by: Jie Wang <jie1x.wang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 1 +
 drivers/net/i40e/i40e_rxtx.c   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index d2116910a0..a195281795 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3842,6 +3842,7 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_TX_OFFLOAD_IPIP_TNL_TSO |
 		DEV_TX_OFFLOAD_GENEVE_TNL_TSO |
 		DEV_TX_OFFLOAD_MULTI_SEGS |
+		DEV_TX_OFFLOAD_OUTER_UDP_CKSUM |
 		dev_info->tx_queue_offload_capa;
 	dev_info->dev_capa =
 		RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP |
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index d1659ef060..02389905ce 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -67,6 +67,7 @@
 		PKT_TX_QINQ_PKT |       \
 		PKT_TX_VLAN_PKT |	\
 		PKT_TX_TUNNEL_MASK |	\
+		PKT_TX_OUTER_UDP_CKSUM |	\
 		I40E_TX_IEEE1588_TMST)
 
 #define I40E_TX_OFFLOAD_NOTSUP_MASK \
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.372690449 +0800
+++ 0238-net-i40e-fix-forward-outer-IPv6-VXLAN.patch	2021-11-10 14:17:02.077411067 +0800
@@ -1 +1 @@
-From 8cc79a1636cda2e9d6ba4cfd1cf16cf2a782ae1b Mon Sep 17 00:00:00 2001
+From 137c9ce9929eef28f83e50650ee8b0ff4a49e3f4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8cc79a1636cda2e9d6ba4cfd1cf16cf2a782ae1b ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index 9ea5f303ff..344cbd25d3 100644
+index d2116910a0..a195281795 100644
@@ -35,5 +37,5 @@
-@@ -3746,6 +3746,7 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
- 		RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |
- 		RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO |
- 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |
-+		RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM |
+@@ -3842,6 +3842,7 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+ 		DEV_TX_OFFLOAD_IPIP_TNL_TSO |
+ 		DEV_TX_OFFLOAD_GENEVE_TNL_TSO |
+ 		DEV_TX_OFFLOAD_MULTI_SEGS |
++		DEV_TX_OFFLOAD_OUTER_UDP_CKSUM |
@@ -44 +46 @@
-index 6ccb598677..41fe3bf481 100644
+index d1659ef060..02389905ce 100644
@@ -47,5 +49,5 @@
-@@ -65,6 +65,7 @@
- 		RTE_MBUF_F_TX_QINQ |       \
- 		RTE_MBUF_F_TX_VLAN |	\
- 		RTE_MBUF_F_TX_TUNNEL_MASK |	\
-+		RTE_MBUF_F_TX_OUTER_UDP_CKSUM |	\
+@@ -67,6 +67,7 @@
+ 		PKT_TX_QINQ_PKT |       \
+ 		PKT_TX_VLAN_PKT |	\
+ 		PKT_TX_TUNNEL_MASK |	\
++		PKT_TX_OUTER_UDP_CKSUM |	\

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'ethdev: fix crash on owner delete' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (237 preceding siblings ...)
  2021-11-10  6:32 ` [dpdk-stable] patch 'net/i40e: fix forward outer IPv6 VXLAN' " Xueming Li
@ 2021-11-10  6:32 ` Xueming Li
  2021-11-10  6:32 ` [dpdk-stable] patch 'common/sfc_efx: fix debug compilation control' " Xueming Li
                   ` (13 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:32 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Luca Boccassi, Chenbo Xia, Thomas Monjalon, Andrew Rybchenko,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ffe143c3a8ee84139231095668462f5051d38a79

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ffe143c3a8ee84139231095668462f5051d38a79 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 4 Nov 2021 11:04:21 +0000
Subject: [PATCH] ethdev: fix crash on owner delete
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b7ade5d31a747fc044a9816b38814b47a6e1b201 ]

'eth_dev->data' can be null before ethdev allocated. The API walks
through all eth devices, at least for some data can be null.

Adding 'eth_dev->data' null check before accessing it.

Fixes: 33c73aae32e4 ("ethdev: allow ownership operations on unused port")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/librte_ethdev/rte_ethdev.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 9b695e1e1b..dd5ce4eb1a 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -718,10 +718,13 @@ rte_eth_dev_owner_delete(const uint64_t owner_id)
 	rte_spinlock_lock(&eth_dev_shared_data->ownership_lock);
 
 	if (eth_is_valid_owner_id(owner_id)) {
-		for (port_id = 0; port_id < RTE_MAX_ETHPORTS; port_id++)
-			if (rte_eth_devices[port_id].data->owner.id == owner_id)
-				memset(&rte_eth_devices[port_id].data->owner, 0,
+		for (port_id = 0; port_id < RTE_MAX_ETHPORTS; port_id++) {
+			struct rte_eth_dev_data *data =
+				rte_eth_devices[port_id].data;
+			if (data != NULL && data->owner.id == owner_id)
+				memset(&data->owner, 0,
 				       sizeof(struct rte_eth_dev_owner));
+		}
 		RTE_ETHDEV_LOG(NOTICE,
 			"All port owners owned by %016"PRIx64" identifier have removed\n",
 			owner_id);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.420618591 +0800
+++ 0239-ethdev-fix-crash-on-owner-delete.patch	2021-11-10 14:17:02.080744373 +0800
@@ -1 +1 @@
-From b7ade5d31a747fc044a9816b38814b47a6e1b201 Mon Sep 17 00:00:00 2001
+From ffe143c3a8ee84139231095668462f5051d38a79 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b7ade5d31a747fc044a9816b38814b47a6e1b201 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
- lib/ethdev/rte_ethdev.c | 9 ++++++---
+ lib/librte_ethdev/rte_ethdev.c | 9 ++++++---
@@ -22,5 +24,5 @@
-diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
-index 7db84b12d0..8e679e4003 100644
---- a/lib/ethdev/rte_ethdev.c
-+++ b/lib/ethdev/rte_ethdev.c
-@@ -757,10 +757,13 @@ rte_eth_dev_owner_delete(const uint64_t owner_id)
+diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
+index 9b695e1e1b..dd5ce4eb1a 100644
+--- a/lib/librte_ethdev/rte_ethdev.c
++++ b/lib/librte_ethdev/rte_ethdev.c
+@@ -718,10 +718,13 @@ rte_eth_dev_owner_delete(const uint64_t owner_id)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'common/sfc_efx: fix debug compilation control' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (238 preceding siblings ...)
  2021-11-10  6:32 ` [dpdk-stable] patch 'ethdev: fix crash on owner delete' " Xueming Li
@ 2021-11-10  6:32 ` Xueming Li
  2021-11-10  6:32 ` [dpdk-stable] patch 'app/testpmd: remove double dependency on bitrate lib' " Xueming Li
                   ` (12 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:32 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f4893697256da4579190dbfe7761c6af87c27599

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f4893697256da4579190dbfe7761c6af87c27599 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Date: Fri, 5 Nov 2021 11:33:30 +0300
Subject: [PATCH] common/sfc_efx: fix debug compilation control
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5e973b3fa1bb6a8e682a8bfab6142809db69dcc3 ]

efsys.h belongs to common/sfc_efx and common driver debug
toggle should be used instead of net/sfc toggle.

Fixes: 5e111ed87999 ("net/sfc: introduce common driver library")

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/common/sfc_efx/efsys.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/common/sfc_efx/efsys.h b/drivers/common/sfc_efx/efsys.h
index a3ae3137e6..c2ff3fe9bc 100644
--- a/drivers/common/sfc_efx/efsys.h
+++ b/drivers/common/sfc_efx/efsys.h
@@ -125,7 +125,7 @@ prefetch_read_once(const volatile void *addr)
 /* Enable Riverhead support */
 #define EFSYS_OPT_RIVERHEAD 1
 
-#ifdef RTE_LIBRTE_SFC_EFX_DEBUG
+#ifdef RTE_DEBUG_COMMON_SFC_EFX
 #define EFSYS_OPT_CHECK_REG 1
 #else
 #define EFSYS_OPT_CHECK_REG 0
@@ -740,7 +740,7 @@ typedef uint64_t	efsys_stat_t;
 /* RTE_VERIFY from DPDK treats expressions with % operator incorrectly,
  * so we re-implement it here
  */
-#ifdef RTE_LIBRTE_SFC_EFX_DEBUG
+#ifdef RTE_DEBUG_COMMON_SFC_EFX
 #define EFSYS_ASSERT(_exp)						\
 	do {								\
 		if (unlikely(!(_exp)))					\
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.463387073 +0800
+++ 0240-common-sfc_efx-fix-debug-compilation-control.patch	2021-11-10 14:17:02.084077679 +0800
@@ -1 +1 @@
-From 5e973b3fa1bb6a8e682a8bfab6142809db69dcc3 Mon Sep 17 00:00:00 2001
+From f4893697256da4579190dbfe7761c6af87c27599 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5e973b3fa1bb6a8e682a8bfab6142809db69dcc3 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 37ec6b99ba..b2109bf3c0 100644
+index a3ae3137e6..c2ff3fe9bc 100644
@@ -30 +32 @@
-@@ -742,7 +742,7 @@ typedef uint64_t	efsys_stat_t;
+@@ -740,7 +740,7 @@ typedef uint64_t	efsys_stat_t;

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'app/testpmd: remove double dependency on bitrate lib' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (239 preceding siblings ...)
  2021-11-10  6:32 ` [dpdk-stable] patch 'common/sfc_efx: fix debug compilation control' " Xueming Li
@ 2021-11-10  6:32 ` Xueming Li
  2021-11-10  6:32 ` [dpdk-stable] patch 'common/mlx5: remove unreachable branch in UAR allocation' " Xueming Li
                   ` (11 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:32 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/27dbdfd926d978628ba95e99a7d7a23915ed7c8b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 27dbdfd926d978628ba95e99a7d7a23915ed7c8b Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 5 Nov 2021 14:30:18 +0100
Subject: [PATCH] app/testpmd: remove double dependency on bitrate lib
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit fe629897def9ff5aa003a1a298df47239afb337f ]

No need for double dependency, once is enough.
While at it, sort alphabetically.

Fixes: fac83b3ef8ac ("app: fix missing dependencies")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/meson.build | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build
index 7e9c7bdd69..4d584f7562 100644
--- a/app/test-pmd/meson.build
+++ b/app/test-pmd/meson.build
@@ -25,20 +25,21 @@ sources = files('5tswap.c',
 	'util.c')
 
 deps += ['ethdev', 'gro', 'gso', 'cmdline', 'metrics', 'meter', 'bus_pci']
-if dpdk_conf.has('RTE_LIB_BITRATESTATS')
-	deps += 'bitratestats'
-endif
-if dpdk_conf.has('RTE_LIB_PDUMP')
-	deps += 'pdump'
+if dpdk_conf.has('RTE_CRYPTO_SCHEDULER')
+	deps += 'crypto_scheduler'
 endif
 if dpdk_conf.has('RTE_LIB_BITRATESTATS')
 	deps += 'bitratestats'
 endif
+if dpdk_conf.has('RTE_LIB_BPF')
+    sources += files('bpf_cmd.c')
+    deps += 'bpf'
+endif
 if dpdk_conf.has('RTE_LIB_LATENCYSTATS')
 	deps += 'latencystats'
 endif
-if dpdk_conf.has('RTE_CRYPTO_SCHEDULER')
-	deps += 'crypto_scheduler'
+if dpdk_conf.has('RTE_LIB_PDUMP')
+	deps += 'pdump'
 endif
 if dpdk_conf.has('RTE_NET_BOND')
 	deps += 'net_bond'
@@ -55,7 +56,3 @@ endif
 if dpdk_conf.has('RTE_NET_DPAA')
 	deps += ['bus_dpaa', 'mempool_dpaa', 'net_dpaa']
 endif
-if dpdk_conf.has('RTE_LIB_BPF')
-	sources += files('bpf_cmd.c')
-	deps += 'bpf'
-endif
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.503426726 +0800
+++ 0241-app-testpmd-remove-double-dependency-on-bitrate-lib.patch	2021-11-10 14:17:02.084077679 +0800
@@ -1 +1 @@
-From fe629897def9ff5aa003a1a298df47239afb337f Mon Sep 17 00:00:00 2001
+From 27dbdfd926d978628ba95e99a7d7a23915ed7c8b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fe629897def9ff5aa003a1a298df47239afb337f ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 21d50e92d0..b05c531c7f 100644
+index 7e9c7bdd69..4d584f7562 100644
@@ -22,2 +24,2 @@
-@@ -29,20 +29,21 @@ sources = files(
- )
+@@ -25,20 +25,21 @@ sources = files('5tswap.c',
+ 	'util.c')
@@ -25 +27 @@
- deps += ['ethdev', 'gro', 'gso', 'cmdline', 'metrics', 'bus_pci']
+ deps += ['ethdev', 'gro', 'gso', 'cmdline', 'metrics', 'meter', 'bus_pci']
@@ -27 +29 @@
--    deps += 'bitratestats'
+-	deps += 'bitratestats'
@@ -30 +32 @@
--    deps += 'pdump'
+-	deps += 'pdump'
@@ -32 +34 @@
-+    deps += 'crypto_scheduler'
++	deps += 'crypto_scheduler'
@@ -35 +37 @@
-     deps += 'bitratestats'
+ 	deps += 'bitratestats'
@@ -42 +44 @@
-     deps += 'latencystats'
+ 	deps += 'latencystats'
@@ -45 +47 @@
--    deps += 'crypto_scheduler'
+-	deps += 'crypto_scheduler'
@@ -47 +49 @@
-+    deps += 'pdump'
++	deps += 'pdump'
@@ -50,2 +52,2 @@
-     deps += 'net_bond'
-@@ -59,10 +60,6 @@ endif
+ 	deps += 'net_bond'
+@@ -55,7 +56,3 @@ endif
@@ -53 +55 @@
-     deps += ['bus_dpaa', 'mempool_dpaa', 'net_dpaa']
+ 	deps += ['bus_dpaa', 'mempool_dpaa', 'net_dpaa']
@@ -56,2 +58,2 @@
--    sources += files('bpf_cmd.c')
--    deps += 'bpf'
+-	sources += files('bpf_cmd.c')
+-	deps += 'bpf'
@@ -59,3 +60,0 @@
- jansson_dep = dependency('jansson', required: false, method: 'pkg-config')
- if jansson_dep.found()
-     dpdk_conf.set('RTE_HAS_JANSSON', 1)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'common/mlx5: remove unreachable branch in UAR allocation' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (240 preceding siblings ...)
  2021-11-10  6:32 ` [dpdk-stable] patch 'app/testpmd: remove double dependency on bitrate lib' " Xueming Li
@ 2021-11-10  6:32 ` Xueming Li
  2021-11-10  6:32 ` [dpdk-stable] patch 'common/mlx5: fix UAR allocation diagnostics messages' " Xueming Li
                   ` (10 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:32 UTC (permalink / raw)
  To: Michael Baum
  Cc: Luca Boccassi, Viacheslav Ovsiienko, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d9971e5ae33c9fe7eb4bb48b57573effa2e0e33e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d9971e5ae33c9fe7eb4bb48b57573effa2e0e33e Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Wed, 3 Nov 2021 20:35:09 +0200
Subject: [PATCH] common/mlx5: remove unreachable branch in UAR allocation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d1325200ac4de94e804d735f05403d9507343222 ]

The User Access Region (UAR) provides access to the hardware resources
like Doorbell Register from userspace.
It means the resources should be mapped by the kernel to some virtual
address range. There two types of memory mapping are supported by mlx5
kernel driver:

 MLX5DV_UAR_ALLOC_TYPE_NC - non-cached, all writes promoted directly to
			    hardware.
 MLX5DV_UAR_ALLOC_TYPE_BF - "BlueFlame", all writes might be cached by
			    CPU, and will be flushed to hardware
			    explicitly with memory barriers.

The supported mapping types depend on the platform (x86/ARM/etc), kernel
version, driver version, virtualization environment (hypervisor), etc.

In UAR allocation, if the system supports the allocation with non-cached
mapping, the first attempt is performed with MLX5DV_UAR_ALLOC_TYPE_NC.
Then, if this fails, the next attempt is done with
MLX5DV_UAR_ALLOC_TYPE_BF.

However, the function adds a condition for the case where the first
attempt was performed with MLX5DV_UAR_ALLOC_TYPE_BF, a condition that is
unattainable since the first attempt was always performed with
MLX5DV_UAR_ALLOC_TYPE_NC.

Remove the unreachable code.

Fixes: 9cc0e99c81ab0 ("common/mlx5: share UAR allocation routine")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/common/mlx5/mlx5_common.c | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c
index 4a0992ac8d..0db9882c43 100644
--- a/drivers/common/mlx5/mlx5_common.c
+++ b/drivers/common/mlx5/mlx5_common.c
@@ -248,11 +248,11 @@ mlx5_release_dbr(struct mlx5_dbr_page_list *head, uint32_t umem_id,
  *				attributes (if supported by the host), the
  *				writes to the UAR registers must be followed
  *				by write memory barrier.
- *   MLX5DV_UAR_ALLOC_TYPE_NC - allocate as non-cached nenory, all writes are
+ *   MLX5DV_UAR_ALLOC_TYPE_NC - allocate as non-cached memory, all writes are
  *				promoted to the registers immediately, no
  *				memory barriers needed.
- *   mapping < 0 - the first attempt is performed with MLX5DV_UAR_ALLOC_TYPE_BF,
- *		   if this fails the next attempt with MLX5DV_UAR_ALLOC_TYPE_NC
+ *   mapping < 0 - the first attempt is performed with MLX5DV_UAR_ALLOC_TYPE_NC,
+ *		   if this fails the next attempt with MLX5DV_UAR_ALLOC_TYPE_BF
  *		   is performed. The drivers specifying negative values should
  *		   always provide the write memory barrier operation after UAR
  *		   register writings.
@@ -284,21 +284,7 @@ mlx5_devx_alloc_uar(void *ctx, int mapping)
 #endif
 		uar = mlx5_glue->devx_alloc_uar(ctx, uar_mapping);
 #ifdef MLX5DV_UAR_ALLOC_TYPE_NC
-		if (!uar &&
-		    mapping < 0 &&
-		    uar_mapping == MLX5DV_UAR_ALLOC_TYPE_BF) {
-			/*
-			 * In some environments like virtual machine the
-			 * Write Combining mapped might be not supported and
-			 * UAR allocation fails. We tried "Non-Cached" mapping
-			 * for the case.
-			 */
-			DRV_LOG(WARNING, "Failed to allocate DevX UAR (BF)");
-			uar_mapping = MLX5DV_UAR_ALLOC_TYPE_NC;
-			uar = mlx5_glue->devx_alloc_uar(ctx, uar_mapping);
-		} else if (!uar &&
-			   mapping < 0 &&
-			   uar_mapping == MLX5DV_UAR_ALLOC_TYPE_NC) {
+		if (!uar && mapping < 0) {
 			/*
 			 * If Verbs/kernel does not support "Non-Cached"
 			 * try the "Write-Combining".
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.543465132 +0800
+++ 0242-common-mlx5-remove-unreachable-branch-in-UAR-allocat.patch	2021-11-10 14:17:02.084077679 +0800
@@ -1 +1 @@
-From d1325200ac4de94e804d735f05403d9507343222 Mon Sep 17 00:00:00 2001
+From d9971e5ae33c9fe7eb4bb48b57573effa2e0e33e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d1325200ac4de94e804d735f05403d9507343222 ]
@@ -34 +36,0 @@
-Cc: stable@dpdk.org
@@ -44 +46 @@
-index 1c36212a04..e8603c7ea9 100644
+index 4a0992ac8d..0db9882c43 100644
@@ -47 +49 @@
-@@ -936,11 +936,11 @@ RTE_INIT_PRIO(mlx5_is_haswell_broadwell_cpu, LOG)
+@@ -248,11 +248,11 @@ mlx5_release_dbr(struct mlx5_dbr_page_list *head, uint32_t umem_id,
@@ -62 +64 @@
-@@ -972,21 +972,7 @@ mlx5_devx_alloc_uar(void *ctx, int mapping)
+@@ -284,21 +284,7 @@ mlx5_devx_alloc_uar(void *ctx, int mapping)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'common/mlx5: fix UAR allocation diagnostics messages' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (241 preceding siblings ...)
  2021-11-10  6:32 ` [dpdk-stable] patch 'common/mlx5: remove unreachable branch in UAR allocation' " Xueming Li
@ 2021-11-10  6:32 ` Xueming Li
  2021-11-10  6:32 ` [dpdk-stable] patch 'net/mlx5: remove duplicated reference of Tx doorbell' " Xueming Li
                   ` (9 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:32 UTC (permalink / raw)
  To: Michael Baum
  Cc: Luca Boccassi, Viacheslav Ovsiienko, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b6d5c0004bb530eb2ae3ee0a79520045a82ef2c5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b6d5c0004bb530eb2ae3ee0a79520045a82ef2c5 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Wed, 3 Nov 2021 20:35:10 +0200
Subject: [PATCH] common/mlx5: fix UAR allocation diagnostics messages
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3f0e54fe00de7aec060afd50bfb288a8a43d0689 ]

Depending on kernel capabilities and rdma-core version the mapping of
UAR (User Access Region) of desired memory caching type (non-cached or
write combining) might fail. The PMD implements the flexible strategy
of UAR mapping, alternating the type of caching to succeed.

During this process the failure diagnostics messages are emitted.
These messages are merely diagnostics ones and the logging level should
be adjusted to DEBUG.

Fixes: 9cc0e99c81ab0 ("common/mlx5: share UAR allocation routine")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/common/mlx5/mlx5_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c
index 0db9882c43..c348caaedf 100644
--- a/drivers/common/mlx5/mlx5_common.c
+++ b/drivers/common/mlx5/mlx5_common.c
@@ -289,7 +289,7 @@ mlx5_devx_alloc_uar(void *ctx, int mapping)
 			 * If Verbs/kernel does not support "Non-Cached"
 			 * try the "Write-Combining".
 			 */
-			DRV_LOG(WARNING, "Failed to allocate DevX UAR (NC)");
+			DRV_LOG(DEBUG, "Failed to allocate DevX UAR (NC)");
 			uar_mapping = MLX5DV_UAR_ALLOC_TYPE_BF;
 			uar = mlx5_glue->devx_alloc_uar(ctx, uar_mapping);
 		}
@@ -307,7 +307,7 @@ mlx5_devx_alloc_uar(void *ctx, int mapping)
 		 * IB device context, on context closure all UARs
 		 * will be freed, should be no memory/object leakage.
 		 */
-		DRV_LOG(WARNING, "Retrying to allocate DevX UAR");
+		DRV_LOG(DEBUG, "Retrying to allocate DevX UAR");
 		uar = NULL;
 	}
 	/* Check whether we finally succeeded with valid UAR allocation. */
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.584538701 +0800
+++ 0243-common-mlx5-fix-UAR-allocation-diagnostics-messages.patch	2021-11-10 14:17:02.084077679 +0800
@@ -1 +1 @@
-From 3f0e54fe00de7aec060afd50bfb288a8a43d0689 Mon Sep 17 00:00:00 2001
+From b6d5c0004bb530eb2ae3ee0a79520045a82ef2c5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3f0e54fe00de7aec060afd50bfb288a8a43d0689 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index e8603c7ea9..e3497c40eb 100644
+index 0db9882c43..c348caaedf 100644
@@ -29 +31 @@
-@@ -977,7 +977,7 @@ mlx5_devx_alloc_uar(void *ctx, int mapping)
+@@ -289,7 +289,7 @@ mlx5_devx_alloc_uar(void *ctx, int mapping)
@@ -38 +40 @@
-@@ -995,7 +995,7 @@ mlx5_devx_alloc_uar(void *ctx, int mapping)
+@@ -307,7 +307,7 @@ mlx5_devx_alloc_uar(void *ctx, int mapping)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/mlx5: remove duplicated reference of Tx doorbell' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (242 preceding siblings ...)
  2021-11-10  6:32 ` [dpdk-stable] patch 'common/mlx5: fix UAR allocation diagnostics messages' " Xueming Li
@ 2021-11-10  6:32 ` Xueming Li
  2021-11-10  6:32 ` [dpdk-stable] patch 'kni: check error code of allmulticast mode switch' " Xueming Li
                   ` (8 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:32 UTC (permalink / raw)
  To: Michael Baum
  Cc: Luca Boccassi, Viacheslav Ovsiienko, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3851aac989fbb60bb07355b51ab7207e9976e84c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3851aac989fbb60bb07355b51ab7207e9976e84c Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Wed, 3 Nov 2021 20:35:12 +0200
Subject: [PATCH] net/mlx5: remove duplicated reference of Tx doorbell
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b6e9c33c82582bf88c90220e3a8c1f6a8ace843f ]

The Tx doorbell has different virtual addresses per process.
The secondary process takes the UAR physical page ID of the primary and
mmap it to its own virtual address.
The primary doorbell references were saved in two shared memory
locations: the TxQ structure and a dedicated doorbell array.

Remove the doorbell reference from the TxQ structure and move the
primary processes to take the UAR information from the primary doorbell
array.

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_verbs.c |  6 ++----
 drivers/net/mlx5/mlx5.c             |  2 ++
 drivers/net/mlx5/mlx5.h             |  2 +-
 drivers/net/mlx5/mlx5_devx.c        |  8 ++------
 drivers/net/mlx5/mlx5_rxtx.h        |  2 +-
 drivers/net/mlx5/mlx5_txq.c         | 15 ++++++++-------
 6 files changed, 16 insertions(+), 19 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_verbs.c b/drivers/net/mlx5/linux/mlx5_verbs.c
index 689c523ec8..95e8eb06d1 100644
--- a/drivers/net/mlx5/linux/mlx5_verbs.c
+++ b/drivers/net/mlx5/linux/mlx5_verbs.c
@@ -1027,20 +1027,18 @@ mlx5_txq_ibv_obj_new(struct rte_eth_dev *dev, uint16_t idx)
 		}
 	}
 #endif
-	txq_ctrl->bf_reg = qp.bf.reg;
 	if (qp.comp_mask & MLX5DV_QP_MASK_UAR_MMAP_OFFSET) {
 		txq_ctrl->uar_mmap_offset = qp.uar_mmap_offset;
 		DRV_LOG(DEBUG, "Port %u: uar_mmap_offset 0x%" PRIx64 ".",
 			dev->data->port_id, txq_ctrl->uar_mmap_offset);
 	} else {
 		DRV_LOG(ERR,
-			"Port %u failed to retrieve UAR info, invalid"
-			" libmlx5.so",
+			"Port %u failed to retrieve UAR info, invalid libmlx5.so",
 			dev->data->port_id);
 		rte_errno = EINVAL;
 		goto error;
 	}
-	txq_uar_init(txq_ctrl);
+	txq_uar_init(txq_ctrl, qp.bf.reg);
 	dev->data->tx_queue_state[idx] = RTE_ETH_QUEUE_STATE_STARTED;
 	return 0;
 error:
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index ef1308ffc1..d094e9e423 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1265,6 +1265,8 @@ mlx5_proc_priv_init(struct rte_eth_dev *dev)
 	}
 	ppriv->uar_table_sz = priv->txqs_n;
 	dev->process_private = ppriv;
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+		priv->sh->pppriv = ppriv;
 	return 0;
 }
 
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 7e984f8438..4b0a97f246 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -753,6 +753,7 @@ struct mlx5_dev_ctx_shared {
 	struct mlx5_devx_obj *tis; /* TIS object. */
 	struct mlx5_devx_obj *td; /* Transport domain. */
 	void *tx_uar; /* Tx/packet pacing shared UAR. */
+	struct mlx5_proc_priv *pppriv; /* Pointer to primary private process. */
 	struct mlx5_flex_parser_profiles fp[MLX5_FLEX_PARSER_MAX];
 	/* Flex parser profiles information. */
 	void *devx_rx_uar; /* DevX UAR for Rx. */
@@ -1050,7 +1051,6 @@ void mlx5_set_min_inline(struct mlx5_dev_spawn_data *spawn,
 void mlx5_set_metadata_mask(struct rte_eth_dev *dev);
 int mlx5_dev_check_sibling_config(struct mlx5_priv *priv,
 				  struct mlx5_dev_config *config);
-int mlx5_dev_configure(struct rte_eth_dev *dev);
 int mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info);
 int mlx5_fw_version_get(struct rte_eth_dev *dev, char *fw_ver, size_t fw_size);
 int mlx5_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu);
diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c
index 8add3b2cac..ac1939415b 100644
--- a/drivers/net/mlx5/mlx5_devx.c
+++ b/drivers/net/mlx5/mlx5_devx.c
@@ -1432,7 +1432,6 @@ mlx5_txq_devx_obj_new(struct rte_eth_dev *dev, uint16_t idx)
 #else
 	struct mlx5_dev_ctx_shared *sh = priv->sh;
 	struct mlx5_txq_obj *txq_obj = txq_ctrl->obj;
-	void *reg_addr;
 	uint32_t cqe_n, log_desc_n;
 	uint32_t wqe_n, wqe_size;
 	int ret = 0;
@@ -1516,13 +1515,10 @@ mlx5_txq_devx_obj_new(struct rte_eth_dev *dev, uint16_t idx)
 	if (!priv->sh->tdn)
 		priv->sh->tdn = priv->sh->td->id;
 #endif
-	MLX5_ASSERT(sh->tx_uar);
-	reg_addr = mlx5_os_get_devx_uar_reg_addr(sh->tx_uar);
-	MLX5_ASSERT(reg_addr);
-	txq_ctrl->bf_reg = reg_addr;
+	MLX5_ASSERT(sh->tx_uar && mlx5_os_get_devx_uar_reg_addr(sh->tx_uar));
 	txq_ctrl->uar_mmap_offset =
 				mlx5_os_get_devx_uar_mmap_offset(sh->tx_uar);
-	txq_uar_init(txq_ctrl);
+	txq_uar_init(txq_ctrl, mlx5_os_get_devx_uar_reg_addr(sh->tx_uar));
 	dev->data->tx_queue_state[idx] = RTE_ETH_QUEUE_STATE_STARTED;
 	return 0;
 error:
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 7c3c4c0099..4d043d2015 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -397,7 +397,7 @@ int mlx5_tx_hairpin_queue_setup
 	(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 	 const struct rte_eth_hairpin_conf *hairpin_conf);
 void mlx5_tx_queue_release(void *dpdk_txq);
-void txq_uar_init(struct mlx5_txq_ctrl *txq_ctrl);
+void txq_uar_init(struct mlx5_txq_ctrl *txq_ctrl, void *bf_reg);
 int mlx5_tx_uar_init_secondary(struct rte_eth_dev *dev, int fd);
 void mlx5_tx_uar_uninit_secondary(struct rte_eth_dev *dev);
 int mlx5_txq_obj_verify(struct rte_eth_dev *dev);
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 5f1a179df3..f3516a8a5a 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -526,9 +526,11 @@ txq_uar_ncattr_init(struct mlx5_txq_ctrl *txq_ctrl, size_t page_size)
  *
  * @param txq_ctrl
  *   Pointer to Tx queue control structure.
+ * @param bf_reg
+ *   BlueFlame register from Verbs UAR.
  */
 void
-txq_uar_init(struct mlx5_txq_ctrl *txq_ctrl)
+txq_uar_init(struct mlx5_txq_ctrl *txq_ctrl, void *bf_reg)
 {
 	struct mlx5_priv *priv = txq_ctrl->priv;
 	struct mlx5_proc_priv *ppriv = MLX5_PROC_PRIV(PORT_ID(priv));
@@ -545,7 +547,7 @@ txq_uar_init(struct mlx5_txq_ctrl *txq_ctrl)
 		return;
 	MLX5_ASSERT(rte_eal_process_type() == RTE_PROC_PRIMARY);
 	MLX5_ASSERT(ppriv);
-	ppriv->uar_table[txq_ctrl->txq.idx] = txq_ctrl->bf_reg;
+	ppriv->uar_table[txq_ctrl->txq.idx] = bf_reg;
 	txq_uar_ncattr_init(txq_ctrl, page_size);
 #ifndef RTE_ARCH_64
 	/* Assign an UAR lock according to UAR page number */
@@ -574,6 +576,7 @@ txq_uar_init_secondary(struct mlx5_txq_ctrl *txq_ctrl, int fd)
 {
 	struct mlx5_priv *priv = txq_ctrl->priv;
 	struct mlx5_proc_priv *ppriv = MLX5_PROC_PRIV(PORT_ID(priv));
+	struct mlx5_proc_priv *primary_ppriv = priv->sh->pppriv;
 	struct mlx5_txq_data *txq = &txq_ctrl->txq;
 	void *addr;
 	uintptr_t uar_va;
@@ -592,20 +595,18 @@ txq_uar_init_secondary(struct mlx5_txq_ctrl *txq_ctrl, int fd)
 	 * As rdma-core, UARs are mapped in size of OS page
 	 * size. Ref to libmlx5 function: mlx5_init_context()
 	 */
-	uar_va = (uintptr_t)txq_ctrl->bf_reg;
+	uar_va = (uintptr_t)primary_ppriv->uar_table[txq->idx];
 	offset = uar_va & (page_size - 1); /* Offset in page. */
 	addr = rte_mem_map(NULL, page_size, RTE_PROT_WRITE, RTE_MAP_SHARED,
-			    fd, txq_ctrl->uar_mmap_offset);
+			   fd, txq_ctrl->uar_mmap_offset);
 	if (!addr) {
-		DRV_LOG(ERR,
-			"port %u mmap failed for BF reg of txq %u",
+		DRV_LOG(ERR, "Port %u mmap failed for BF reg of txq %u.",
 			txq->port_id, txq->idx);
 		rte_errno = ENXIO;
 		return -rte_errno;
 	}
 	addr = RTE_PTR_ADD(addr, offset);
 	ppriv->uar_table[txq->idx] = addr;
-	txq_uar_ncattr_init(txq_ctrl, page_size);
 	return 0;
 }
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.625001650 +0800
+++ 0244-net-mlx5-remove-duplicated-reference-of-Tx-doorbell.patch	2021-11-10 14:17:02.087410985 +0800
@@ -1 +1 @@
-From b6e9c33c82582bf88c90220e3a8c1f6a8ace843f Mon Sep 17 00:00:00 2001
+From 3851aac989fbb60bb07355b51ab7207e9976e84c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b6e9c33c82582bf88c90220e3a8c1f6a8ace843f ]
@@ -16,2 +18,0 @@
-Cc: stable@dpdk.org
-
@@ -26 +27 @@
- drivers/net/mlx5/mlx5_tx.h          |  3 +--
+ drivers/net/mlx5/mlx5_rxtx.h        |  2 +-
@@ -28 +29 @@
- 6 files changed, 16 insertions(+), 20 deletions(-)
+ 6 files changed, 16 insertions(+), 19 deletions(-)
@@ -31 +32 @@
-index 9d29954261..0ae1ea1e5c 100644
+index 689c523ec8..95e8eb06d1 100644
@@ -34 +35 @@
-@@ -1017,20 +1017,18 @@ mlx5_txq_ibv_obj_new(struct rte_eth_dev *dev, uint16_t idx)
+@@ -1027,20 +1027,18 @@ mlx5_txq_ibv_obj_new(struct rte_eth_dev *dev, uint16_t idx)
@@ -58 +59 @@
-index 9c8d1cc76f..55596d27d2 100644
+index ef1308ffc1..d094e9e423 100644
@@ -61 +62 @@
-@@ -1620,6 +1620,8 @@ mlx5_proc_priv_init(struct rte_eth_dev *dev)
+@@ -1265,6 +1265,8 @@ mlx5_proc_priv_init(struct rte_eth_dev *dev)
@@ -71 +72 @@
-index 9307a4f95b..22a21f1e5f 100644
+index 7e984f8438..4b0a97f246 100644
@@ -74 +75,2 @@
-@@ -1206,6 +1206,7 @@ struct mlx5_dev_ctx_shared {
+@@ -753,6 +753,7 @@ struct mlx5_dev_ctx_shared {
+ 	struct mlx5_devx_obj *tis; /* TIS object. */
@@ -76 +77,0 @@
- 	struct mlx5_lag lag; /* LAG attributes */
@@ -79 +80 @@
- 	struct mlx5_ecpri_parser_profile ecpri_parser;
+ 	struct mlx5_flex_parser_profiles fp[MLX5_FLEX_PARSER_MAX];
@@ -82 +83,2 @@
-@@ -1528,7 +1529,6 @@ void mlx5_set_metadata_mask(struct rte_eth_dev *dev);
+@@ -1050,7 +1051,6 @@ void mlx5_set_min_inline(struct mlx5_dev_spawn_data *spawn,
+ void mlx5_set_metadata_mask(struct rte_eth_dev *dev);
@@ -84,2 +86 @@
- 				  struct mlx5_dev_config *config,
- 				  struct rte_device *dpdk_dev);
+ 				  struct mlx5_dev_config *config);
@@ -91 +92 @@
-index e46f79124d..07305ca942 100644
+index 8add3b2cac..ac1939415b 100644
@@ -94,4 +95,4 @@
-@@ -1244,7 +1244,6 @@ mlx5_txq_devx_obj_new(struct rte_eth_dev *dev, uint16_t idx)
- 	struct mlx5_devx_cq_attr cq_attr = {
- 		.uar_page_id = mlx5_os_get_devx_uar_page_id(sh->tx_uar),
- 	};
+@@ -1432,7 +1432,6 @@ mlx5_txq_devx_obj_new(struct rte_eth_dev *dev, uint16_t idx)
+ #else
+ 	struct mlx5_dev_ctx_shared *sh = priv->sh;
+ 	struct mlx5_txq_obj *txq_obj = txq_ctrl->obj;
@@ -102 +103 @@
-@@ -1341,13 +1340,10 @@ mlx5_txq_devx_obj_new(struct rte_eth_dev *dev, uint16_t idx)
+@@ -1516,13 +1515,10 @@ mlx5_txq_devx_obj_new(struct rte_eth_dev *dev, uint16_t idx)
@@ -118,13 +119,5 @@
-diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h
-index 0b9109a115..02441ef34d 100644
---- a/drivers/net/mlx5/mlx5_tx.h
-+++ b/drivers/net/mlx5/mlx5_tx.h
-@@ -184,7 +184,6 @@ struct mlx5_txq_ctrl {
- 	struct mlx5_txq_obj *obj; /* Verbs/DevX queue object. */
- 	struct mlx5_priv *priv; /* Back pointer to private data. */
- 	off_t uar_mmap_offset; /* UAR mmap offset for non-primary process. */
--	void *bf_reg; /* BlueFlame register from Verbs. */
- 	uint16_t dump_file_n; /* Number of dump files. */
- 	struct rte_eth_hairpin_conf hairpin_conf; /* Hairpin configuration. */
- 	uint32_t hairpin_status; /* Hairpin binding status. */
-@@ -204,7 +203,7 @@ int mlx5_tx_hairpin_queue_setup
+diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
+index 7c3c4c0099..4d043d2015 100644
+--- a/drivers/net/mlx5/mlx5_rxtx.h
++++ b/drivers/net/mlx5/mlx5_rxtx.h
+@@ -397,7 +397,7 @@ int mlx5_tx_hairpin_queue_setup
@@ -133 +126 @@
- void mlx5_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid);
+ void mlx5_tx_queue_release(void *dpdk_txq);
@@ -140 +133 @@
-index e9ab7fa266..820421f7cd 100644
+index 5f1a179df3..f3516a8a5a 100644
@@ -143 +136 @@
-@@ -523,9 +523,11 @@ txq_uar_ncattr_init(struct mlx5_txq_ctrl *txq_ctrl, size_t page_size)
+@@ -526,9 +526,11 @@ txq_uar_ncattr_init(struct mlx5_txq_ctrl *txq_ctrl, size_t page_size)
@@ -156 +149 @@
-@@ -542,7 +544,7 @@ txq_uar_init(struct mlx5_txq_ctrl *txq_ctrl)
+@@ -545,7 +547,7 @@ txq_uar_init(struct mlx5_txq_ctrl *txq_ctrl)
@@ -165 +158 @@
-@@ -571,6 +573,7 @@ txq_uar_init_secondary(struct mlx5_txq_ctrl *txq_ctrl, int fd)
+@@ -574,6 +576,7 @@ txq_uar_init_secondary(struct mlx5_txq_ctrl *txq_ctrl, int fd)
@@ -173 +166 @@
-@@ -589,20 +592,18 @@ txq_uar_init_secondary(struct mlx5_txq_ctrl *txq_ctrl, int fd)
+@@ -592,20 +595,18 @@ txq_uar_init_secondary(struct mlx5_txq_ctrl *txq_ctrl, int fd)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'kni: check error code of allmulticast mode switch' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (243 preceding siblings ...)
  2021-11-10  6:32 ` [dpdk-stable] patch 'net/mlx5: remove duplicated reference of Tx doorbell' " Xueming Li
@ 2021-11-10  6:32 ` Xueming Li
  2021-11-10  6:32 ` [dpdk-stable] patch 'vfio: fix FreeBSD clear group stub' " Xueming Li
                   ` (7 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:32 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/686908c0164bdafd3aeef65dc691af78c55eda2f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 686908c0164bdafd3aeef65dc691af78c55eda2f Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 23 Apr 2021 16:12:42 +0800
Subject: [PATCH] kni: check error code of allmulticast mode switch
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b1f4933ef320cfc9096101499b711d0dd65f2e51 ]

Some drivers may return errcode when switch allmulticast mode,
so it's necessary to check the return code.

Fixes: b34801d1aa2e ("kni: support allmulticast mode set")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_kni/rte_kni.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c
index eb24b0d0ae..17e4487306 100644
--- a/lib/librte_kni/rte_kni.c
+++ b/lib/librte_kni/rte_kni.c
@@ -514,6 +514,8 @@ kni_config_promiscusity(uint16_t port_id, uint8_t to_on)
 static int
 kni_config_allmulticast(uint16_t port_id, uint8_t to_on)
 {
+	int ret;
+
 	if (!rte_eth_dev_is_valid_port(port_id)) {
 		RTE_LOG(ERR, KNI, "Invalid port id %d\n", port_id);
 		return -EINVAL;
@@ -523,11 +525,16 @@ kni_config_allmulticast(uint16_t port_id, uint8_t to_on)
 		port_id, to_on);
 
 	if (to_on)
-		rte_eth_allmulticast_enable(port_id);
+		ret = rte_eth_allmulticast_enable(port_id);
 	else
-		rte_eth_allmulticast_disable(port_id);
+		ret = rte_eth_allmulticast_disable(port_id);
+	if (ret != 0)
+		RTE_LOG(ERR, KNI,
+			"Failed to %s allmulticast mode for port %u: %s\n",
+			to_on ? "enable" : "disable", port_id,
+			rte_strerror(-ret));
 
-	return 0;
+	return ret;
 }
 
 int
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.672163735 +0800
+++ 0245-kni-check-error-code-of-allmulticast-mode-switch.patch	2021-11-10 14:17:02.090744291 +0800
@@ -1 +1 @@
-From b1f4933ef320cfc9096101499b711d0dd65f2e51 Mon Sep 17 00:00:00 2001
+From 686908c0164bdafd3aeef65dc691af78c55eda2f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b1f4933ef320cfc9096101499b711d0dd65f2e51 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- lib/kni/rte_kni.c | 13 ++++++++++---
+ lib/librte_kni/rte_kni.c | 13 ++++++++++---
@@ -19,4 +21,4 @@
-diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c
-index d3e236005e..fc8f0e7b5a 100644
---- a/lib/kni/rte_kni.c
-+++ b/lib/kni/rte_kni.c
+diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c
+index eb24b0d0ae..17e4487306 100644
+--- a/lib/librte_kni/rte_kni.c
++++ b/lib/librte_kni/rte_kni.c

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'vfio: fix FreeBSD clear group stub' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (244 preceding siblings ...)
  2021-11-10  6:32 ` [dpdk-stable] patch 'kni: check error code of allmulticast mode switch' " Xueming Li
@ 2021-11-10  6:32 ` Xueming Li
  2021-11-10  6:32 ` [dpdk-stable] patch 'vfio: fix FreeBSD documentation' " Xueming Li
                   ` (6 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:32 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/bef6f8c951463c9c99449553b2ab95c812643309

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bef6f8c951463c9c99449553b2ab95c812643309 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Thu, 28 Oct 2021 14:15:17 +0000
Subject: [PATCH] vfio: fix FreeBSD clear group stub
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit bf8b792f3b8519fecf3585ffac15da6f7bca2de9 ]

On FreeBSD, `rte_vfio_clear_group()` was returning 0 even though this
function is not valid for FreeBSD, and is called out to return error in
doxygen comments.
Fix the return value to match documentation.

Fixes: c564a2a20093 ("vfio: expose clear group function for internal usages")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/freebsd/eal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
index 957273a9bb..053ae65365 100644
--- a/lib/librte_eal/freebsd/eal.c
+++ b/lib/librte_eal/freebsd/eal.c
@@ -1041,7 +1041,7 @@ int rte_vfio_noiommu_is_enabled(void)
 
 int rte_vfio_clear_group(__rte_unused int vfio_group_fd)
 {
-	return 0;
+	return -1;
 }
 
 int
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.720041765 +0800
+++ 0246-vfio-fix-FreeBSD-clear-group-stub.patch	2021-11-10 14:17:02.090744291 +0800
@@ -1 +1 @@
-From bf8b792f3b8519fecf3585ffac15da6f7bca2de9 Mon Sep 17 00:00:00 2001
+From bef6f8c951463c9c99449553b2ab95c812643309 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit bf8b792f3b8519fecf3585ffac15da6f7bca2de9 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- lib/eal/freebsd/eal.c | 2 +-
+ lib/librte_eal/freebsd/eal.c | 2 +-
@@ -19,5 +21,5 @@
-diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c
-index 2c2baaa691..5cea368efe 100644
---- a/lib/eal/freebsd/eal.c
-+++ b/lib/eal/freebsd/eal.c
-@@ -1045,7 +1045,7 @@ int rte_vfio_noiommu_is_enabled(void)
+diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
+index 957273a9bb..053ae65365 100644
+--- a/lib/librte_eal/freebsd/eal.c
++++ b/lib/librte_eal/freebsd/eal.c
+@@ -1041,7 +1041,7 @@ int rte_vfio_noiommu_is_enabled(void)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'vfio: fix FreeBSD documentation' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (245 preceding siblings ...)
  2021-11-10  6:32 ` [dpdk-stable] patch 'vfio: fix FreeBSD clear group stub' " Xueming Li
@ 2021-11-10  6:32 ` Xueming Li
  2021-11-10  6:32 ` [dpdk-stable] patch 'vfio: set errno on unsupported OS' " Xueming Li
                   ` (5 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:32 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Luca Boccassi, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/971626cbed459b97576c21daefd5a24ef3b61d31

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 971626cbed459b97576c21daefd5a24ef3b61d31 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Thu, 28 Oct 2021 14:15:18 +0000
Subject: [PATCH] vfio: fix FreeBSD documentation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit da6e4cdca1144e2cc6f9f495a34d3085e707b78a ]

On FreeBSD, `rte_vfio_is_enabled()` and `rte_vfio_noiommu_is_enabled()`
API calls will not return error, and will instead return 0. This is
intentional, because the caller of this API does not care whether VFIO
is supported at all, and will instead be interested in whether VFIO is
enabled or not. However, the doxygen comments for these functions state
that they will return an error on FreeBSD, which is incorrect.

Fix the doxygen comment to call out the fact that these
functions are only relevant on Linux, but remove the reference to
returning errors.

Fixes: 279b581c897d ("vfio: expose functions")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/librte_eal/include/rte_vfio.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/include/rte_vfio.h b/lib/librte_eal/include/rte_vfio.h
index 2d90b36480..7bdb8932b2 100644
--- a/lib/librte_eal/include/rte_vfio.h
+++ b/lib/librte_eal/include/rte_vfio.h
@@ -150,8 +150,7 @@ int rte_vfio_enable(const char *modname);
 /**
  * Check whether a VFIO-related kmod is enabled.
  *
- * This function is only relevant to linux and will return
- * an error on BSD.
+ * This function is only relevant to Linux.
  *
  * @param modname
  *   kernel module name.
@@ -165,8 +164,7 @@ int rte_vfio_is_enabled(const char *modname);
 /**
  * Whether VFIO NOIOMMU mode is enabled.
  *
- * This function is only relevant to linux and will return
- * an error on BSD.
+ * This function is only relevant to Linux.
  *
  * @return
  *   1 if true.
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.760823204 +0800
+++ 0247-vfio-fix-FreeBSD-documentation.patch	2021-11-10 14:17:02.090744291 +0800
@@ -1 +1 @@
-From da6e4cdca1144e2cc6f9f495a34d3085e707b78a Mon Sep 17 00:00:00 2001
+From 971626cbed459b97576c21daefd5a24ef3b61d31 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit da6e4cdca1144e2cc6f9f495a34d3085e707b78a ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
- lib/eal/include/rte_vfio.h | 6 ++----
+ lib/librte_eal/include/rte_vfio.h | 6 ++----
@@ -26 +28 @@
-diff --git a/lib/eal/include/rte_vfio.h b/lib/eal/include/rte_vfio.h
+diff --git a/lib/librte_eal/include/rte_vfio.h b/lib/librte_eal/include/rte_vfio.h
@@ -28,2 +30,2 @@
---- a/lib/eal/include/rte_vfio.h
-+++ b/lib/eal/include/rte_vfio.h
+--- a/lib/librte_eal/include/rte_vfio.h
++++ b/lib/librte_eal/include/rte_vfio.h

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'vfio: set errno on unsupported OS' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (246 preceding siblings ...)
  2021-11-10  6:32 ` [dpdk-stable] patch 'vfio: fix FreeBSD documentation' " Xueming Li
@ 2021-11-10  6:32 ` Xueming Li
  2021-11-10  6:32 ` [dpdk-stable] patch 'interrupt: fix request notifier interrupt processing' " Xueming Li
                   ` (4 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:32 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Luca Boccassi, Chenbo Xia, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4298385935eef1e27cfcd12d75517a448d176be9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4298385935eef1e27cfcd12d75517a448d176be9 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Thu, 28 Oct 2021 14:15:19 +0000
Subject: [PATCH] vfio: set errno on unsupported OS
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4fd15c6af0d4e065227a27cda9ec0ca1a563dc67 ]

Currently, when code is running on FreeBSD or Windows, there is no way
to distinguish between a geniune error and a "VFIO is unsupported"
error. Fix the dummy implementations to also set the rte_errno flag.

Fixes: 279b581c897d ("vfio: expose functions")
Fixes: c564a2a20093 ("vfio: expose clear group function for internal usages")
Fixes: 964b2f3bfb07 ("vfio: export some internal functions")
Fixes: ea2dc1066870 ("vfio: add multi container support")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/freebsd/eal.c | 13 +++++++++++++
 lib/librte_eal/windows/eal.c |  2 ++
 2 files changed, 15 insertions(+)

diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
index 053ae65365..6f9f12911e 100644
--- a/lib/librte_eal/freebsd/eal.c
+++ b/lib/librte_eal/freebsd/eal.c
@@ -1014,6 +1014,7 @@ int rte_vfio_setup_device(__rte_unused const char *sysfs_base,
 		      __rte_unused int *vfio_dev_fd,
 		      __rte_unused struct vfio_device_info *device_info)
 {
+	rte_errno = ENOTSUP;
 	return -1;
 }
 
@@ -1021,11 +1022,13 @@ int rte_vfio_release_device(__rte_unused const char *sysfs_base,
 			__rte_unused const char *dev_addr,
 			__rte_unused int fd)
 {
+	rte_errno = ENOTSUP;
 	return -1;
 }
 
 int rte_vfio_enable(__rte_unused const char *modname)
 {
+	rte_errno = ENOTSUP;
 	return -1;
 }
 
@@ -1041,6 +1044,7 @@ int rte_vfio_noiommu_is_enabled(void)
 
 int rte_vfio_clear_group(__rte_unused int vfio_group_fd)
 {
+	rte_errno = ENOTSUP;
 	return -1;
 }
 
@@ -1049,30 +1053,35 @@ rte_vfio_get_group_num(__rte_unused const char *sysfs_base,
 		       __rte_unused const char *dev_addr,
 		       __rte_unused int *iommu_group_num)
 {
+	rte_errno = ENOTSUP;
 	return -1;
 }
 
 int
 rte_vfio_get_container_fd(void)
 {
+	rte_errno = ENOTSUP;
 	return -1;
 }
 
 int
 rte_vfio_get_group_fd(__rte_unused int iommu_group_num)
 {
+	rte_errno = ENOTSUP;
 	return -1;
 }
 
 int
 rte_vfio_container_create(void)
 {
+	rte_errno = ENOTSUP;
 	return -1;
 }
 
 int
 rte_vfio_container_destroy(__rte_unused int container_fd)
 {
+	rte_errno = ENOTSUP;
 	return -1;
 }
 
@@ -1080,6 +1089,7 @@ int
 rte_vfio_container_group_bind(__rte_unused int container_fd,
 		__rte_unused int iommu_group_num)
 {
+	rte_errno = ENOTSUP;
 	return -1;
 }
 
@@ -1087,6 +1097,7 @@ int
 rte_vfio_container_group_unbind(__rte_unused int container_fd,
 		__rte_unused int iommu_group_num)
 {
+	rte_errno = ENOTSUP;
 	return -1;
 }
 
@@ -1096,6 +1107,7 @@ rte_vfio_container_dma_map(__rte_unused int container_fd,
 			__rte_unused uint64_t iova,
 			__rte_unused uint64_t len)
 {
+	rte_errno = ENOTSUP;
 	return -1;
 }
 
@@ -1105,5 +1117,6 @@ rte_vfio_container_dma_unmap(__rte_unused int container_fd,
 			__rte_unused uint64_t iova,
 			__rte_unused uint64_t len)
 {
+	rte_errno = ENOTSUP;
 	return -1;
 }
diff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c
index abe4c4038d..892c69356d 100644
--- a/lib/librte_eal/windows/eal.c
+++ b/lib/librte_eal/windows/eal.c
@@ -446,6 +446,7 @@ rte_vfio_container_dma_map(__rte_unused int container_fd,
 			__rte_unused uint64_t iova,
 			__rte_unused uint64_t len)
 {
+	rte_errno = ENOTSUP;
 	return -1;
 }
 
@@ -455,5 +456,6 @@ rte_vfio_container_dma_unmap(__rte_unused int container_fd,
 			__rte_unused uint64_t iova,
 			__rte_unused uint64_t len)
 {
+	rte_errno = ENOTSUP;
 	return -1;
 }
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.800067594 +0800
+++ 0248-vfio-set-errno-on-unsupported-OS.patch	2021-11-10 14:17:02.090744291 +0800
@@ -1 +1 @@
-From 4fd15c6af0d4e065227a27cda9ec0ca1a563dc67 Mon Sep 17 00:00:00 2001
+From 4298385935eef1e27cfcd12d75517a448d176be9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4fd15c6af0d4e065227a27cda9ec0ca1a563dc67 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -20,2 +22,2 @@
- lib/eal/freebsd/eal.c | 13 +++++++++++++
- lib/eal/windows/eal.c |  2 ++
+ lib/librte_eal/freebsd/eal.c | 13 +++++++++++++
+ lib/librte_eal/windows/eal.c |  2 ++
@@ -24,5 +26,5 @@
-diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c
-index 5cea368efe..a1cd2462db 100644
---- a/lib/eal/freebsd/eal.c
-+++ b/lib/eal/freebsd/eal.c
-@@ -1018,6 +1018,7 @@ int rte_vfio_setup_device(__rte_unused const char *sysfs_base,
+diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
+index 053ae65365..6f9f12911e 100644
+--- a/lib/librte_eal/freebsd/eal.c
++++ b/lib/librte_eal/freebsd/eal.c
+@@ -1014,6 +1014,7 @@ int rte_vfio_setup_device(__rte_unused const char *sysfs_base,
@@ -36 +38 @@
-@@ -1025,11 +1026,13 @@ int rte_vfio_release_device(__rte_unused const char *sysfs_base,
+@@ -1021,11 +1022,13 @@ int rte_vfio_release_device(__rte_unused const char *sysfs_base,
@@ -50 +52 @@
-@@ -1045,6 +1048,7 @@ int rte_vfio_noiommu_is_enabled(void)
+@@ -1041,6 +1044,7 @@ int rte_vfio_noiommu_is_enabled(void)
@@ -58 +60 @@
-@@ -1053,30 +1057,35 @@ rte_vfio_get_group_num(__rte_unused const char *sysfs_base,
+@@ -1049,30 +1053,35 @@ rte_vfio_get_group_num(__rte_unused const char *sysfs_base,
@@ -94 +96 @@
-@@ -1084,6 +1093,7 @@ int
+@@ -1080,6 +1089,7 @@ int
@@ -102 +104 @@
-@@ -1091,6 +1101,7 @@ int
+@@ -1087,6 +1097,7 @@ int
@@ -110 +112 @@
-@@ -1100,6 +1111,7 @@ rte_vfio_container_dma_map(__rte_unused int container_fd,
+@@ -1096,6 +1107,7 @@ rte_vfio_container_dma_map(__rte_unused int container_fd,
@@ -118 +120 @@
-@@ -1109,5 +1121,6 @@ rte_vfio_container_dma_unmap(__rte_unused int container_fd,
+@@ -1105,5 +1117,6 @@ rte_vfio_container_dma_unmap(__rte_unused int container_fd,
@@ -125,5 +127,5 @@
-diff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c
-index f7ce1b6671..67db7f099a 100644
---- a/lib/eal/windows/eal.c
-+++ b/lib/eal/windows/eal.c
-@@ -481,6 +481,7 @@ rte_vfio_container_dma_map(__rte_unused int container_fd,
+diff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c
+index abe4c4038d..892c69356d 100644
+--- a/lib/librte_eal/windows/eal.c
++++ b/lib/librte_eal/windows/eal.c
+@@ -446,6 +446,7 @@ rte_vfio_container_dma_map(__rte_unused int container_fd,
@@ -137 +139 @@
-@@ -490,6 +491,7 @@ rte_vfio_container_dma_unmap(__rte_unused int container_fd,
+@@ -455,5 +456,6 @@ rte_vfio_container_dma_unmap(__rte_unused int container_fd,
@@ -144 +145,0 @@
- 

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'interrupt: fix request notifier interrupt processing' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (247 preceding siblings ...)
  2021-11-10  6:32 ` [dpdk-stable] patch 'vfio: set errno on unsupported OS' " Xueming Li
@ 2021-11-10  6:32 ` Xueming Li
  2021-11-10  6:32 ` [dpdk-stable] patch 'net/hns3: simplify queue DMA address arithmetic' " Xueming Li
                   ` (3 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:32 UTC (permalink / raw)
  To: Maciej Szwed; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0fcdac4ba11dcf8f0631c41b80db8d64147baa5a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0fcdac4ba11dcf8f0631c41b80db8d64147baa5a Mon Sep 17 00:00:00 2001
From: Maciej Szwed <maciej.szwed@intel.com>
Date: Tue, 19 Oct 2021 12:06:57 +0200
Subject: [PATCH] interrupt: fix request notifier interrupt processing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit aeed570a211fe31c976f9f4de07039cb7c8a125e ]

We should call read() on RTE_INTR_HANDLE_VFIO_REQ event
to confirm that event.

Fixes: 0eb8a1c4c786 ("vfio: add request notifier interrupt")

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
---
 lib/librte_eal/linux/eal_interrupts.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/lib/librte_eal/linux/eal_interrupts.c b/lib/librte_eal/linux/eal_interrupts.c
index 1dd994bd1f..6fe22589bd 100644
--- a/lib/librte_eal/linux/eal_interrupts.c
+++ b/lib/librte_eal/linux/eal_interrupts.c
@@ -906,17 +906,14 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)
 			bytes_read = sizeof(buf.timerfd_num);
 			break;
 #ifdef VFIO_PRESENT
+#ifdef HAVE_VFIO_DEV_REQ_INTERFACE
+		case RTE_INTR_HANDLE_VFIO_REQ:
+#endif
 		case RTE_INTR_HANDLE_VFIO_MSIX:
 		case RTE_INTR_HANDLE_VFIO_MSI:
 		case RTE_INTR_HANDLE_VFIO_LEGACY:
 			bytes_read = sizeof(buf.vfio_intr_count);
 			break;
-#ifdef HAVE_VFIO_DEV_REQ_INTERFACE
-		case RTE_INTR_HANDLE_VFIO_REQ:
-			bytes_read = 0;
-			call = true;
-			break;
-#endif
 #endif
 		case RTE_INTR_HANDLE_VDEV:
 		case RTE_INTR_HANDLE_EXT:
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.840215631 +0800
+++ 0249-interrupt-fix-request-notifier-interrupt-processing.patch	2021-11-10 14:17:02.090744291 +0800
@@ -1 +1 @@
-From aeed570a211fe31c976f9f4de07039cb7c8a125e Mon Sep 17 00:00:00 2001
+From 0fcdac4ba11dcf8f0631c41b80db8d64147baa5a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit aeed570a211fe31c976f9f4de07039cb7c8a125e ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -14 +16 @@
- lib/eal/linux/eal_interrupts.c | 9 +++------
+ lib/librte_eal/linux/eal_interrupts.c | 9 +++------
@@ -17,5 +19,5 @@
-diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c
-index 15a27a2abf..6e3925efd4 100644
---- a/lib/eal/linux/eal_interrupts.c
-+++ b/lib/eal/linux/eal_interrupts.c
-@@ -947,17 +947,14 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)
+diff --git a/lib/librte_eal/linux/eal_interrupts.c b/lib/librte_eal/linux/eal_interrupts.c
+index 1dd994bd1f..6fe22589bd 100644
+--- a/lib/librte_eal/linux/eal_interrupts.c
++++ b/lib/librte_eal/linux/eal_interrupts.c
+@@ -906,17 +906,14 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'net/hns3: simplify queue DMA address arithmetic' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (248 preceding siblings ...)
  2021-11-10  6:32 ` [dpdk-stable] patch 'interrupt: fix request notifier interrupt processing' " Xueming Li
@ 2021-11-10  6:32 ` Xueming Li
  2021-11-10  6:32 ` [dpdk-stable] patch 'app/testpmd: remove unused header file' " Xueming Li
                   ` (2 subsequent siblings)
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:32 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/42ea17b50b17f1fc482cc98c078cff72329ca1e3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 42ea17b50b17f1fc482cc98c078cff72329ca1e3 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sat, 6 Nov 2021 09:42:58 +0800
Subject: [PATCH] net/hns3: simplify queue DMA address arithmetic
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f658f415814add688ade5783200143d14eefc51a ]

The patch obtains the upper 32 bits of the Rx/Tx queue DMA address in one
step instead of two steps.

Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 9bfa9eef8a..4ae7c1f00a 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -308,7 +308,7 @@ hns3_init_rx_queue_hw(struct hns3_rx_queue *rxq)
 
 	hns3_write_dev(rxq, HNS3_RING_RX_BASEADDR_L_REG, (uint32_t)dma_addr);
 	hns3_write_dev(rxq, HNS3_RING_RX_BASEADDR_H_REG,
-		       (uint32_t)((dma_addr >> 31) >> 1));
+		       (uint32_t)(dma_addr >> 32));
 
 	hns3_write_dev(rxq, HNS3_RING_RX_BD_LEN_REG,
 		       hns3_buf_size2type(rx_buf_len));
@@ -323,7 +323,7 @@ hns3_init_tx_queue_hw(struct hns3_tx_queue *txq)
 
 	hns3_write_dev(txq, HNS3_RING_TX_BASEADDR_L_REG, (uint32_t)dma_addr);
 	hns3_write_dev(txq, HNS3_RING_TX_BASEADDR_H_REG,
-		       (uint32_t)((dma_addr >> 31) >> 1));
+		       (uint32_t)(dma_addr >> 32));
 
 	hns3_write_dev(txq, HNS3_RING_TX_BD_NUM_REG,
 		       HNS3_CFG_DESC_NUM(txq->nb_tx_desc));
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.879792101 +0800
+++ 0250-net-hns3-simplify-queue-DMA-address-arithmetic.patch	2021-11-10 14:17:02.094077597 +0800
@@ -1 +1 @@
-From f658f415814add688ade5783200143d14eefc51a Mon Sep 17 00:00:00 2001
+From 42ea17b50b17f1fc482cc98c078cff72329ca1e3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f658f415814add688ade5783200143d14eefc51a ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index ceb98025f8..00af73c850 100644
+index 9bfa9eef8a..4ae7c1f00a 100644
@@ -22 +24 @@
-@@ -322,7 +322,7 @@ hns3_init_rx_queue_hw(struct hns3_rx_queue *rxq)
+@@ -308,7 +308,7 @@ hns3_init_rx_queue_hw(struct hns3_rx_queue *rxq)
@@ -31 +33 @@
-@@ -337,7 +337,7 @@ hns3_init_tx_queue_hw(struct hns3_tx_queue *txq)
+@@ -323,7 +323,7 @@ hns3_init_tx_queue_hw(struct hns3_tx_queue *txq)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'app/testpmd: remove unused header file' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (249 preceding siblings ...)
  2021-11-10  6:32 ` [dpdk-stable] patch 'net/hns3: simplify queue DMA address arithmetic' " Xueming Li
@ 2021-11-10  6:32 ` Xueming Li
  2021-11-10  6:32 ` [dpdk-stable] patch 'ip_frag: revert fix fragmenting IPv4 fragment' " Xueming Li
  2021-11-28 14:53 ` your patch " Xueming Li
  252 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:32 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/01d1789456423e36a9daf546b7c439bda375e968

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 01d1789456423e36a9daf546b7c439bda375e968 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Mon, 25 Oct 2021 14:39:22 +0800
Subject: [PATCH] app/testpmd: remove unused header file
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 694d61b8e7cb9d8992d1dc9f81bad491451465e4 ]

This patch removes unused "rte_eth_bond.h" header file.

Fixes: 2950a769315e ("bond: testpmd support")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/parameters.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index bf6df7ed22..97267003c0 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -39,9 +39,6 @@
 #include <rte_ether.h>
 #include <rte_ethdev.h>
 #include <rte_string_fns.h>
-#ifdef RTE_NET_BOND
-#include <rte_eth_bond.h>
-#endif
 #include <rte_flow.h>
 
 #include "testpmd.h"
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.922255906 +0800
+++ 0251-app-testpmd-remove-unused-header-file.patch	2021-11-10 14:17:02.094077597 +0800
@@ -1 +1 @@
-From 694d61b8e7cb9d8992d1dc9f81bad491451465e4 Mon Sep 17 00:00:00 2001
+From 01d1789456423e36a9daf546b7c439bda375e968 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 694d61b8e7cb9d8992d1dc9f81bad491451465e4 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index cb40917077..0974b0a38f 100644
+index bf6df7ed22..97267003c0 100644
@@ -22 +24 @@
-@@ -38,9 +38,6 @@
+@@ -39,9 +39,6 @@

^ permalink raw reply	[flat|nested] 345+ messages in thread

* [dpdk-stable] patch 'ip_frag: revert fix fragmenting IPv4 fragment' has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (250 preceding siblings ...)
  2021-11-10  6:32 ` [dpdk-stable] patch 'app/testpmd: remove unused header file' " Xueming Li
@ 2021-11-10  6:32 ` Xueming Li
  2021-11-10  7:09   ` Huichao Cai
  2021-11-28 14:53 ` your patch " Xueming Li
  252 siblings, 1 reply; 345+ messages in thread
From: Xueming Li @ 2021-11-10  6:32 UTC (permalink / raw)
  To: Huichao Cai; +Cc: Luca Boccassi, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1f01d7a0f29460da1f2f58a7fa465b746a7a8baf

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1f01d7a0f29460da1f2f58a7fa465b746a7a8baf Mon Sep 17 00:00:00 2001
From: Huichao Cai <chcchc88@163.com>
Date: Mon, 25 Oct 2021 15:55:53 +0800
Subject: [PATCH] ip_frag: revert fix fragmenting IPv4 fragment
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 013bb504c81ed4efce61a8c5c1bd169f539797ef ]

The patch ("ip_frag: fix fragmenting IPv4 fragment") introduces
a bug and needs to be rolled back. This is because the patch
and variables "flag_offset" conflict with each other.

Bugzilla ID: 835
Fixes: 567473433b7e ("ip_frag: fix fragmenting IPv4 fragment")

Signed-off-by: Huichao Cai <chcchc88@163.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_ip_frag/rte_ipv4_fragmentation.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/lib/librte_ip_frag/rte_ipv4_fragmentation.c b/lib/librte_ip_frag/rte_ipv4_fragmentation.c
index fead5a985a..2e7739d027 100644
--- a/lib/librte_ip_frag/rte_ipv4_fragmentation.c
+++ b/lib/librte_ip_frag/rte_ipv4_fragmentation.c
@@ -75,7 +75,7 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
 	uint32_t out_pkt_pos, in_seg_data_pos;
 	uint32_t more_in_segs;
 	uint16_t fragment_offset, flag_offset, frag_size, header_len;
-	uint16_t frag_bytes_remaining, not_last_frag;
+	uint16_t frag_bytes_remaining;
 
 	/*
 	 * Formal parameter checking.
@@ -116,9 +116,7 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
 	in_seg = pkt_in;
 	in_seg_data_pos = header_len;
 	out_pkt_pos = 0;
-	fragment_offset = (uint16_t)((flag_offset &
-	    RTE_IPV4_HDR_OFFSET_MASK) << RTE_IPV4_HDR_FO_SHIFT);
-	not_last_frag = (uint16_t)(flag_offset & IPV4_HDR_MF_MASK);
+	fragment_offset = 0;
 
 	more_in_segs = 1;
 	while (likely(more_in_segs)) {
@@ -188,8 +186,7 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
 
 		__fill_ipv4hdr_frag(out_hdr, in_hdr, header_len,
 		    (uint16_t)out_pkt->pkt_len,
-		    flag_offset, fragment_offset,
-		    not_last_frag || more_in_segs);
+		    flag_offset, fragment_offset, more_in_segs);
 
 		fragment_offset = (uint16_t)(fragment_offset +
 		    out_pkt->pkt_len - header_len);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.962173283 +0800
+++ 0252-ip_frag-revert-fix-fragmenting-IPv4-fragment.patch	2021-11-10 14:17:02.094077597 +0800
@@ -1 +1 @@
-From 013bb504c81ed4efce61a8c5c1bd169f539797ef Mon Sep 17 00:00:00 2001
+From 1f01d7a0f29460da1f2f58a7fa465b746a7a8baf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 013bb504c81ed4efce61a8c5c1bd169f539797ef ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
- lib/ip_frag/rte_ipv4_fragmentation.c | 9 +++------
+ lib/librte_ip_frag/rte_ipv4_fragmentation.c | 9 +++------
@@ -20 +22 @@
-diff --git a/lib/ip_frag/rte_ipv4_fragmentation.c b/lib/ip_frag/rte_ipv4_fragmentation.c
+diff --git a/lib/librte_ip_frag/rte_ipv4_fragmentation.c b/lib/librte_ip_frag/rte_ipv4_fragmentation.c
@@ -22,2 +24,2 @@
---- a/lib/ip_frag/rte_ipv4_fragmentation.c
-+++ b/lib/ip_frag/rte_ipv4_fragmentation.c
+--- a/lib/librte_ip_frag/rte_ipv4_fragmentation.c
++++ b/lib/librte_ip_frag/rte_ipv4_fragmentation.c

^ permalink raw reply	[flat|nested] 345+ messages in thread

* Re: [dpdk-stable] patch 'ip_frag: fix fragmenting IPv4 fragment' has been queued to stable release 20.11.4
  2021-11-10  6:30 ` [dpdk-stable] patch 'ip_frag: fix fragmenting IPv4 fragment' " Xueming Li
@ 2021-11-10  6:57   ` Huichao Cai
  2021-11-10  8:02     ` Xueming(Steven) Li
  0 siblings, 1 reply; 345+ messages in thread
From: Huichao Cai @ 2021-11-10  6:57 UTC (permalink / raw)
  To: Xueming Li; +Cc: Luca Boccassi, Konstantin Ananyev, dpdk stable

Hi Xueming


Please stop doing this!!!
There is a bug in this patch.I've submitted another patch for fallback.
The patch is:
https://patchwork.dpdk.org/project/dpdk/patch/1635148553-50086-1-git-send-email-chcchc88@163.com/
I apologize for my mistake.I'll pay attention to these problems in the future.
Thanks!


Best Regards!
Huichao Cai


^ permalink raw reply	[flat|nested] 345+ messages in thread

* Re: [dpdk-stable] patch 'ip_frag: revert fix fragmenting IPv4 fragment' has been queued to stable release 20.11.4
  2021-11-10  6:32 ` [dpdk-stable] patch 'ip_frag: revert fix fragmenting IPv4 fragment' " Xueming Li
@ 2021-11-10  7:09   ` Huichao Cai
  2021-11-10  8:38     ` Xueming(Steven) Li
  0 siblings, 1 reply; 345+ messages in thread
From: Huichao Cai @ 2021-11-10  7:09 UTC (permalink / raw)
  To: Xueming Li; +Cc: Luca Boccassi, Konstantin Ananyev, dpdk stable

Hi Xueming


As I said in my last e-mail,this patch is a fallback to the previous patch.
The previous patch is:
https://patchwork.dpdk.org/project/dpdk/patch/1633764424-17370-1-git-send-email-chcchc88@163.com/


So this patch doesn't need to be merged into the stable release 20.11.4.
Thanks.


Huichao Cai


^ permalink raw reply	[flat|nested] 345+ messages in thread

* Re: [dpdk-stable] patch 'cmdline: free on exit' has been queued to stable release 20.11.4
  2021-11-10  6:30 ` [dpdk-stable] patch 'cmdline: free on exit' " Xueming Li
@ 2021-11-10  7:23   ` Peng, ZhihongX
  2021-11-10  8:29     ` Xueming(Steven) Li
  0 siblings, 1 reply; 345+ messages in thread
From: Peng, ZhihongX @ 2021-11-10  7:23 UTC (permalink / raw)
  To: Xueming Li; +Cc: Luca Boccassi, Dmitry Kozlyuk, Olivier Matz, dpdk stable

Hi , Xueming

This patch is not backward compatible. Backward compatibility will cause
the app to change the CmdLine code. In addition, we found a bug in some
test cases of this patch, and I will submit a new patch for solution.

Regards,
Peng,Zhihong

> -----Original Message-----
> From: Xueming Li <xuemingl@nvidia.com>
> Sent: Wednesday, November 10, 2021 2:31 PM
> To: Peng, ZhihongX <zhihongx.peng@intel.com>
> Cc: Luca Boccassi <bluca@debian.org>; Dmitry Kozlyuk
> <dmitry.kozliuk@gmail.com>; Olivier Matz <olivier.matz@6wind.com>; dpdk
> stable <stable@dpdk.org>
> Subject: patch 'cmdline: free on exit' has been queued to stable release
> 20.11.4
> 
> Hi,
> 
> FYI, your patch has been queued to stable release 20.11.4
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 11/12/21. So please shout if
> anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for
> rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
> 
> Queued patches are on a temporary branch at:
> https://github.com/steevenlee/dpdk
> 
> This queued commit can be viewed at:
> https://github.com/steevenlee/dpdk/commit/f181839864ae7ba170519235a6
> da969a7df36a85
> 
> Thanks.
> 
> Xueming Li <xuemingl@nvidia.com>
> 
> ---
> From f181839864ae7ba170519235a6da969a7df36a85 Mon Sep 17 00:00:00
> 2001
> From: Zhihong Peng <zhihongx.peng@intel.com>
> Date: Mon, 18 Oct 2021 21:58:50 +0800
> Subject: [PATCH] cmdline: free on exit
> Cc: Xueming Li <xuemingl@nvidia.com>
> 
> [ upstream commit 6ad06203a587a8ce10392d9224e9fbdcb77b3d5c ]
> 
> Malloc cl in the cmdline_stdin_new function, so release in the
> cmdline_stdin_exit function is logical, so that cl will not be released alone.
> 
> Fixes: af75078fece3 ("first public release")
> 
> Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
> Reviewed-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> Acked-by: Olivier Matz <olivier.matz@6wind.com>
> Tested-by: Zhihong Peng <zhihongx.peng@intel.com>
> ---
>  app/test/test.c                     | 1 -
>  app/test/test_cmdline_lib.c         | 1 -
>  lib/librte_cmdline/cmdline_socket.c | 1 +
>  3 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/app/test/test.c b/app/test/test.c index 864523ed61..f7d0946761
> 100644
> --- a/app/test/test.c
> +++ b/app/test/test.c
> @@ -195,7 +195,6 @@ main(int argc, char **argv)
> 
>  		cmdline_interact(cl);
>  		cmdline_stdin_exit(cl);
> -		cmdline_free(cl);
>  	}
>  #endif
>  	ret = 0;
> diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c index
> d5a09b4541..6bcfa6511e 100644
> --- a/app/test/test_cmdline_lib.c
> +++ b/app/test/test_cmdline_lib.c
> @@ -174,7 +174,6 @@ test_cmdline_socket_fns(void)
>  	/* void functions */
>  	cmdline_stdin_exit(NULL);
> 
> -	cmdline_free(cl);
>  	return 0;
>  error:
>  	printf("Error: function accepted null parameter!\n"); diff --git
> a/lib/librte_cmdline/cmdline_socket.c b/lib/librte_cmdline/cmdline_socket.c
> index 0fe1497008..f919537460 100644
> --- a/lib/librte_cmdline/cmdline_socket.c
> +++ b/lib/librte_cmdline/cmdline_socket.c
> @@ -57,4 +57,5 @@ cmdline_stdin_exit(struct cmdline *cl)
>  		return;
> 
>  	terminal_restore(cl);
> +	cmdline_free(cl);
>  }
> --
> 2.33.0
> 
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-
> empty:
> ---
> --- -	2021-11-10 14:17:09.660774437 +0800
> +++ 0174-cmdline-free-on-exit.patch	2021-11-10 14:17:01.984078497 +0800
> @@ -1 +1 @@
> -From 6ad06203a587a8ce10392d9224e9fbdcb77b3d5c Mon Sep 17 00:00:00
> 2001
> +From f181839864ae7ba170519235a6da969a7df36a85 Mon Sep 17 00:00:00
> 2001
> @@ -4,0 +5,3 @@
> +Cc: Xueming Li <xuemingl@nvidia.com>
> +
> +[ upstream commit 6ad06203a587a8ce10392d9224e9fbdcb77b3d5c ]
> @@ -17,5 +20,4 @@
> - app/test/test.c                        | 1 -
> - app/test/test_cmdline_lib.c            | 1 -
> - doc/guides/rel_notes/release_21_11.rst | 3 +++
> - lib/cmdline/cmdline_socket.c           | 1 +
> - 4 files changed, 4 insertions(+), 2 deletions(-)
> + app/test/test.c                     | 1 -
> + app/test/test_cmdline_lib.c         | 1 -
> + lib/librte_cmdline/cmdline_socket.c | 1 +
> + 3 files changed, 1 insertion(+), 2 deletions(-)
> @@ -24 +26 @@
> -index 173d202e47..5194131026 100644
> +index 864523ed61..f7d0946761 100644
> @@ -27 +29 @@
> -@@ -233,7 +233,6 @@ main(int argc, char **argv)
> +@@ -195,7 +195,6 @@ main(int argc, char **argv)
> @@ -36 +38 @@
> -index 054ebf5e9d..f238094b07 100644
> +index d5a09b4541..6bcfa6511e 100644
> @@ -39 +41 @@
> -@@ -180,7 +180,6 @@ test_cmdline_socket_fns(void)
> +@@ -174,7 +174,6 @@ test_cmdline_socket_fns(void)
> @@ -47,19 +49,5 @@
> -diff --git a/doc/guides/rel_notes/release_21_11.rst
> b/doc/guides/rel_notes/release_21_11.rst
> -index 9b1843eb09..450bcbb445 100644
> ---- a/doc/guides/rel_notes/release_21_11.rst
> -+++ b/doc/guides/rel_notes/release_21_11.rst
> -@@ -325,6 +325,9 @@ API Changes
> -   removed. Its usages have been replaced by a new function
> -   ``rte_kvargs_get_with_value()``.
> -
> -+* cmdline: ``cmdline_stdin_exit()`` now frees the ``cmdline`` structure.
> -+  Calls to ``cmdline_free()`` after it need to be deleted from applications.
> -+
> - * cmdline: Made ``cmdline`` structure definition hidden on Linux and
> FreeBSD.
> -
> - * cmdline: Made ``rdline`` structure definition hidden. Functions are added -
> diff --git a/lib/cmdline/cmdline_socket.c b/lib/cmdline/cmdline_socket.c -
> index 998e8ade25..ebd5343754 100644
> ---- a/lib/cmdline/cmdline_socket.c
> -+++ b/lib/cmdline/cmdline_socket.c
> -@@ -53,4 +53,5 @@ cmdline_stdin_exit(struct cmdline *cl)
> +diff --git a/lib/librte_cmdline/cmdline_socket.c
> +b/lib/librte_cmdline/cmdline_socket.c
> +index 0fe1497008..f919537460 100644
> +--- a/lib/librte_cmdline/cmdline_socket.c
> ++++ b/lib/librte_cmdline/cmdline_socket.c
> +@@ -57,4 +57,5 @@ cmdline_stdin_exit(struct cmdline *cl)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* Re: [dpdk-stable] patch 'pipeline: fix build with ASan' has been queued to stable release 20.11.4
  2021-11-10  6:31 ` [dpdk-stable] patch 'pipeline: fix build with ASan' " Xueming Li
@ 2021-11-10  7:27   ` Peng, ZhihongX
  2021-11-10  8:33     ` Xueming(Steven) Li
  0 siblings, 1 reply; 345+ messages in thread
From: Peng, ZhihongX @ 2021-11-10  7:27 UTC (permalink / raw)
  To: Xueming Li; +Cc: Luca Boccassi, Lin, Xueqin, Dumitrescu, Cristian, dpdk stable

Hi , Xueming

This patch is not backward compatible. 

Regards,
Peng,Zhihong

> -----Original Message-----
> From: Xueming Li <xuemingl@nvidia.com>
> Sent: Wednesday, November 10, 2021 2:31 PM
> To: Peng, ZhihongX <zhihongx.peng@intel.com>
> Cc: Luca Boccassi <bluca@debian.org>; Lin, Xueqin <xueqin.lin@intel.com>;
> Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; dpdk stable
> <stable@dpdk.org>
> Subject: patch 'pipeline: fix build with ASan' has been queued to stable
> release 20.11.4
> 
> Hi,
> 
> FYI, your patch has been queued to stable release 20.11.4
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 11/12/21. So please shout if
> anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for
> rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
> 
> Queued patches are on a temporary branch at:
> https://github.com/steevenlee/dpdk
> 
> This queued commit can be viewed at:
> https://github.com/steevenlee/dpdk/commit/e7dd7a6c07e28be8f4319a6b3
> 623d9810e4c4ced
> 
> Thanks.
> 
> Xueming Li <xuemingl@nvidia.com>
> 
> ---
> From e7dd7a6c07e28be8f4319a6b3623d9810e4c4ced Mon Sep 17 00:00:00
> 2001
> From: Zhihong Peng <zhihongx.peng@intel.com>
> Date: Wed, 20 Oct 2021 15:46:42 +0800
> Subject: [PATCH] pipeline: fix build with ASan
> Cc: Xueming Li <xuemingl@nvidia.com>
> 
> [ upstream commit 84f5ac9418ea9995975b30fa4ea57018f9618fc1 ]
> 
> Code changes to avoid the following build error:
> "Control reaches end of non-void function".
> 
> Signed-off-by: Xueqin Lin <xueqin.lin@intel.com>
> Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> ---
>  lib/librte_pipeline/rte_swx_pipeline.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/librte_pipeline/rte_swx_pipeline.c
> b/lib/librte_pipeline/rte_swx_pipeline.c
> index 4a96b77e28..923fa8b769 100644
> --- a/lib/librte_pipeline/rte_swx_pipeline.c
> +++ b/lib/librte_pipeline/rte_swx_pipeline.c
> @@ -3240,7 +3240,7 @@ instr_extern_translate(struct rte_swx_pipeline *p,
>  		return 0;
>  	}
> 
> -	CHECK(0, EINVAL);
> +	return -EINVAL;
>  }
> 
>  static inline void
> @@ -5869,7 +5869,7 @@ instr_translate(struct rte_swx_pipeline *p,
>  					      instr,
>  					      data);
> 
> -	CHECK(0, EINVAL);
> +	return -EINVAL;
>  }
> 
>  static struct instruction_data *
> --
> 2.33.0
> 
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-
> empty:
> ---
> --- -	2021-11-10 14:17:10.811450551 +0800
> +++ 0201-pipeline-fix-build-with-ASan.patch	2021-11-10
> 14:17:02.014078251 +0800
> @@ -1 +1 @@
> -From 84f5ac9418ea9995975b30fa4ea57018f9618fc1 Mon Sep 17 00:00:00
> 2001
> +From e7dd7a6c07e28be8f4319a6b3623d9810e4c4ced Mon Sep 17 00:00:00
> 2001
> @@ -4,0 +5,3 @@
> +Cc: Xueming Li <xuemingl@nvidia.com>
> +
> +[ upstream commit 84f5ac9418ea9995975b30fa4ea57018f9618fc1 ]
> @@ -13 +16 @@
> - lib/pipeline/rte_swx_pipeline.c | 4 ++--
> + lib/librte_pipeline/rte_swx_pipeline.c | 4 ++--
> @@ -16,5 +19,5 @@
> -diff --git a/lib/pipeline/rte_swx_pipeline.c
> b/lib/pipeline/rte_swx_pipeline.c -index 5e089fb72b..1afaffefd4 100644
> ---- a/lib/pipeline/rte_swx_pipeline.c
> -+++ b/lib/pipeline/rte_swx_pipeline.c
> -@@ -4642,7 +4642,7 @@ instr_meter_translate(struct rte_swx_pipeline *p,
> +diff --git a/lib/librte_pipeline/rte_swx_pipeline.c
> +b/lib/librte_pipeline/rte_swx_pipeline.c
> +index 4a96b77e28..923fa8b769 100644
> +--- a/lib/librte_pipeline/rte_swx_pipeline.c
> ++++ b/lib/librte_pipeline/rte_swx_pipeline.c
> +@@ -3240,7 +3240,7 @@ instr_extern_translate(struct rte_swx_pipeline
> +*p,
> @@ -29 +32 @@
> -@@ -5937,7 +5937,7 @@ instr_translate(struct rte_swx_pipeline *p,
> +@@ -5869,7 +5869,7 @@ instr_translate(struct rte_swx_pipeline *p,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* Re: [dpdk-stable] patch 'examples/performance-thread: fix build with ASan' has been queued to stable release 20.11.4
  2021-11-10  6:31 ` [dpdk-stable] patch 'examples/performance-thread: " Xueming Li
@ 2021-11-10  7:27   ` Peng, ZhihongX
  2021-11-10  8:35     ` Xueming(Steven) Li
  0 siblings, 1 reply; 345+ messages in thread
From: Peng, ZhihongX @ 2021-11-10  7:27 UTC (permalink / raw)
  To: Xueming Li; +Cc: Luca Boccassi, Lin, Xueqin, Richardson, Bruce, dpdk stable

Hi , Xueming

This patch is not backward compatible. 

Regards,
Peng,Zhihong

> -----Original Message-----
> From: Xueming Li <xuemingl@nvidia.com>
> Sent: Wednesday, November 10, 2021 2:31 PM
> To: Peng, ZhihongX <zhihongx.peng@intel.com>
> Cc: Luca Boccassi <bluca@debian.org>; Lin, Xueqin <xueqin.lin@intel.com>;
> Richardson, Bruce <bruce.richardson@intel.com>; dpdk stable
> <stable@dpdk.org>
> Subject: patch 'examples/performance-thread: fix build with ASan' has been
> queued to stable release 20.11.4
> 
> Hi,
> 
> FYI, your patch has been queued to stable release 20.11.4
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 11/12/21. So please shout if
> anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for
> rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
> 
> Queued patches are on a temporary branch at:
> https://github.com/steevenlee/dpdk
> 
> This queued commit can be viewed at:
> https://github.com/steevenlee/dpdk/commit/4b98552d4d3ca54ebc58014b4
> 163e1164e2e4342
> 
> Thanks.
> 
> Xueming Li <xuemingl@nvidia.com>
> 
> ---
> From 4b98552d4d3ca54ebc58014b4163e1164e2e4342 Mon Sep 17 00:00:00
> 2001
> From: Zhihong Peng <zhihongx.peng@intel.com>
> Date: Wed, 20 Oct 2021 15:46:43 +0800
> Subject: [PATCH] examples/performance-thread: fix build with ASan
> Cc: Xueming Li <xuemingl@nvidia.com>
> 
> [ upstream commit 4d2d1258151657d69b0be5d118956b7e809f9d47 ]
> 
> Code changes to avoid the following build error:
> "strncpy specified bound XX equals destination size".
> 
> Signed-off-by: Xueqin Lin <xueqin.lin@intel.com>
> Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  examples/performance-thread/common/lthread.c       | 4 ++--
>  examples/performance-thread/common/lthread_cond.c  | 6 +++---
> examples/performance-thread/common/lthread_mutex.c | 6 +++---
>  3 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/examples/performance-thread/common/lthread.c
> b/examples/performance-thread/common/lthread.c
> index 3f1f48db43..190e5874b1 100644
> --- a/examples/performance-thread/common/lthread.c
> +++ b/examples/performance-thread/common/lthread.c
> @@ -20,6 +20,7 @@
>  #include <sys/mman.h>
> 
>  #include <rte_log.h>
> +#include <rte_string_fns.h>
>  #include <ctx.h>
>  #include <stack.h>
> 
> @@ -463,6 +464,5 @@ void lthread_set_funcname(const char *f)  {
>  	struct lthread *lt = THIS_LTHREAD;
> 
> -	strncpy(lt->funcname, f, sizeof(lt->funcname));
> -	lt->funcname[sizeof(lt->funcname)-1] = 0;
> +	strlcpy(lt->funcname, f, sizeof(lt->funcname));
>  }
> diff --git a/examples/performance-thread/common/lthread_cond.c
> b/examples/performance-thread/common/lthread_cond.c
> index cdcc7a7b5a..e7be17089a 100644
> --- a/examples/performance-thread/common/lthread_cond.c
> +++ b/examples/performance-thread/common/lthread_cond.c
> @@ -20,6 +20,7 @@
> 
>  #include <rte_log.h>
>  #include <rte_common.h>
> +#include <rte_string_fns.h>
> 
>  #include "lthread_api.h"
>  #include "lthread_diag_api.h"
> @@ -57,10 +58,9 @@ lthread_cond_init(char *name, struct lthread_cond
> **cond,
>  	}
> 
>  	if (name == NULL)
> -		strncpy(c->name, "no name", sizeof(c->name));
> +		strlcpy(c->name, "no name", sizeof(c->name));
>  	else
> -		strncpy(c->name, name, sizeof(c->name));
> -	c->name[sizeof(c->name)-1] = 0;
> +		strlcpy(c->name, name, sizeof(c->name));
> 
>  	c->root_sched = THIS_SCHED;
> 
> diff --git a/examples/performance-thread/common/lthread_mutex.c
> b/examples/performance-thread/common/lthread_mutex.c
> index 01da6cad4f..709ab9f553 100644
> --- a/examples/performance-thread/common/lthread_mutex.c
> +++ b/examples/performance-thread/common/lthread_mutex.c
> @@ -19,6 +19,7 @@
>  #include <rte_log.h>
>  #include <rte_spinlock.h>
>  #include <rte_common.h>
> +#include <rte_string_fns.h>
> 
>  #include "lthread_api.h"
>  #include "lthread_int.h"
> @@ -52,10 +53,9 @@ lthread_mutex_init(char *name, struct lthread_mutex
> **mutex,
>  	}
> 
>  	if (name == NULL)
> -		strncpy(m->name, "no name", sizeof(m->name));
> +		strlcpy(m->name, "no name", sizeof(m->name));
>  	else
> -		strncpy(m->name, name, sizeof(m->name));
> -	m->name[sizeof(m->name)-1] = 0;
> +		strlcpy(m->name, name, sizeof(m->name));
> 
>  	m->root_sched = THIS_SCHED;
>  	m->owner = NULL;
> --
> 2.33.0
> 
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-
> empty:
> ---
> --- -	2021-11-10 14:17:10.858279926 +0800
> +++ 0202-examples-performance-thread-fix-build-with-ASan.patch	2021-
> 11-10 14:17:02.014078251 +0800
> @@ -1 +1 @@
> -From 4d2d1258151657d69b0be5d118956b7e809f9d47 Mon Sep 17 00:00:00
> 2001
> +From 4b98552d4d3ca54ebc58014b4163e1164e2e4342 Mon Sep 17 00:00:00
> 2001
> @@ -4,0 +5,3 @@
> +Cc: Xueming Li <xuemingl@nvidia.com>
> +
> +[ upstream commit 4d2d1258151657d69b0be5d118956b7e809f9d47 ]
> @@ -19 +22 @@
> -index 98123f34f8..009374a8c3 100644
> +index 3f1f48db43..190e5874b1 100644
> @@ -30 +33 @@
> -@@ -465,6 +466,5 @@ void lthread_set_funcname(const char *f)
> +@@ -463,6 +464,5 @@ void lthread_set_funcname(const char *f)
> @@ -64 +67 @@
> -index 061fc5c19a..f3ec7c1c60 100644
> +index 01da6cad4f..709ab9f553 100644

^ permalink raw reply	[flat|nested] 345+ messages in thread

* Re: [dpdk-stable] patch 'ip_frag: fix fragmenting IPv4 fragment' has been queued to stable release 20.11.4
  2021-11-10  6:57   ` Huichao Cai
@ 2021-11-10  8:02     ` Xueming(Steven) Li
  0 siblings, 0 replies; 345+ messages in thread
From: Xueming(Steven) Li @ 2021-11-10  8:02 UTC (permalink / raw)
  To: chcchc88; +Cc: konstantin.ananyev, stable, bluca

On Wed, 2021-11-10 at 14:57 +0800, Huichao Cai wrote:
> Hi Xueming
> 
> Please stop doing this!!!
> There is a bug in this patch.I've submitted another patch for
> fallback.
> The patch is:
> https://patchwork.dpdk.org/project/dpdk/patch/1635148553-50086-1-git-
> send-email-chcchc88@163.com/
> I apologize for my mistake.I'll pay attention to these problems in
> the future.
> Thanks!
> 
> Best Regards!
> Huichao Cai
> 

Hi Huichao,

Thanks for the notice, removed.


^ permalink raw reply	[flat|nested] 345+ messages in thread

* Re: [dpdk-stable] patch 'cmdline: free on exit' has been queued to stable release 20.11.4
  2021-11-10  7:23   ` Peng, ZhihongX
@ 2021-11-10  8:29     ` Xueming(Steven) Li
  0 siblings, 0 replies; 345+ messages in thread
From: Xueming(Steven) Li @ 2021-11-10  8:29 UTC (permalink / raw)
  To: zhihongx.peng; +Cc: olivier.matz, dmitry.kozliuk, stable, bluca

Hi Zhihong, 

Thanks for update, removed from list.

On Wed, 2021-11-10 at 07:23 +0000, Peng, ZhihongX wrote:
> Hi , Xueming
> 
> This patch is not backward compatible. Backward compatibility will cause
> the app to change the CmdLine code. In addition, we found a bug in some
> test cases of this patch, and I will submit a new patch for solution.
> 
> Regards,
> Peng,Zhihong
> 
> > -----Original Message-----
> > From: Xueming Li <xuemingl@nvidia.com>
> > Sent: Wednesday, November 10, 2021 2:31 PM
> > To: Peng, ZhihongX <zhihongx.peng@intel.com>
> > Cc: Luca Boccassi <bluca@debian.org>; Dmitry Kozlyuk
> > <dmitry.kozliuk@gmail.com>; Olivier Matz <olivier.matz@6wind.com>; dpdk
> > stable <stable@dpdk.org>
> > Subject: patch 'cmdline: free on exit' has been queued to stable release
> > 20.11.4
> > 
> > Hi,
> > 
> > FYI, your patch has been queued to stable release 20.11.4
> > 
> > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> > It will be pushed if I get no objections before 11/12/21. So please shout if
> > anyone has objections.
> > 
> > Also note that after the patch there's a diff of the upstream commit vs the
> > patch applied to the branch. This will indicate if there was any rebasing
> > needed to apply to the stable branch. If there were code changes for
> > rebasing
> > (ie: not only metadata diffs), please double check that the rebase was
> > correctly done.
> > 
> > Queued patches are on a temporary branch at:
> > https://github.com/steevenlee/dpdk
> > 
> > This queued commit can be viewed at:
> > https://github.com/steevenlee/dpdk/commit/f181839864ae7ba170519235a6
> > da969a7df36a85
> > 
> > Thanks.
> > 
> > Xueming Li <xuemingl@nvidia.com>
> > 
> > ---
> > From f181839864ae7ba170519235a6da969a7df36a85 Mon Sep 17 00:00:00
> > 2001
> > From: Zhihong Peng <zhihongx.peng@intel.com>
> > Date: Mon, 18 Oct 2021 21:58:50 +0800
> > Subject: [PATCH] cmdline: free on exit
> > Cc: Xueming Li <xuemingl@nvidia.com>
> > 
> > [ upstream commit 6ad06203a587a8ce10392d9224e9fbdcb77b3d5c ]
> > 
> > Malloc cl in the cmdline_stdin_new function, so release in the
> > cmdline_stdin_exit function is logical, so that cl will not be released alone.
> > 
> > Fixes: af75078fece3 ("first public release")
> > 
> > Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
> > Reviewed-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> > Acked-by: Olivier Matz <olivier.matz@6wind.com>
> > Tested-by: Zhihong Peng <zhihongx.peng@intel.com>
> > ---
> >  app/test/test.c                     | 1 -
> >  app/test/test_cmdline_lib.c         | 1 -
> >  lib/librte_cmdline/cmdline_socket.c | 1 +
> >  3 files changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/app/test/test.c b/app/test/test.c index 864523ed61..f7d0946761
> > 100644
> > --- a/app/test/test.c
> > +++ b/app/test/test.c
> > @@ -195,7 +195,6 @@ main(int argc, char **argv)
> > 
> >  		cmdline_interact(cl);
> >  		cmdline_stdin_exit(cl);
> > -		cmdline_free(cl);
> >  	}
> >  #endif
> >  	ret = 0;
> > diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c index
> > d5a09b4541..6bcfa6511e 100644
> > --- a/app/test/test_cmdline_lib.c
> > +++ b/app/test/test_cmdline_lib.c
> > @@ -174,7 +174,6 @@ test_cmdline_socket_fns(void)
> >  	/* void functions */
> >  	cmdline_stdin_exit(NULL);
> > 
> > -	cmdline_free(cl);
> >  	return 0;
> >  error:
> >  	printf("Error: function accepted null parameter!\n"); diff --git
> > a/lib/librte_cmdline/cmdline_socket.c b/lib/librte_cmdline/cmdline_socket.c
> > index 0fe1497008..f919537460 100644
> > --- a/lib/librte_cmdline/cmdline_socket.c
> > +++ b/lib/librte_cmdline/cmdline_socket.c
> > @@ -57,4 +57,5 @@ cmdline_stdin_exit(struct cmdline *cl)
> >  		return;
> > 
> >  	terminal_restore(cl);
> > +	cmdline_free(cl);
> >  }
> > --
> > 2.33.0
> > 
> > ---
> >   Diff of the applied patch vs upstream commit (please double-check if non-
> > empty:
> > ---
> > --- -	2021-11-10 14:17:09.660774437 +0800
> > +++ 0174-cmdline-free-on-exit.patch	2021-11-10 14:17:01.984078497 +0800
> > @@ -1 +1 @@
> > -From 6ad06203a587a8ce10392d9224e9fbdcb77b3d5c Mon Sep 17 00:00:00
> > 2001
> > +From f181839864ae7ba170519235a6da969a7df36a85 Mon Sep 17 00:00:00
> > 2001
> > @@ -4,0 +5,3 @@
> > +Cc: Xueming Li <xuemingl@nvidia.com>
> > +
> > +[ upstream commit 6ad06203a587a8ce10392d9224e9fbdcb77b3d5c ]
> > @@ -17,5 +20,4 @@
> > - app/test/test.c                        | 1 -
> > - app/test/test_cmdline_lib.c            | 1 -
> > - doc/guides/rel_notes/release_21_11.rst | 3 +++
> > - lib/cmdline/cmdline_socket.c           | 1 +
> > - 4 files changed, 4 insertions(+), 2 deletions(-)
> > + app/test/test.c                     | 1 -
> > + app/test/test_cmdline_lib.c         | 1 -
> > + lib/librte_cmdline/cmdline_socket.c | 1 +
> > + 3 files changed, 1 insertion(+), 2 deletions(-)
> > @@ -24 +26 @@
> > -index 173d202e47..5194131026 100644
> > +index 864523ed61..f7d0946761 100644
> > @@ -27 +29 @@
> > -@@ -233,7 +233,6 @@ main(int argc, char **argv)
> > +@@ -195,7 +195,6 @@ main(int argc, char **argv)
> > @@ -36 +38 @@
> > -index 054ebf5e9d..f238094b07 100644
> > +index d5a09b4541..6bcfa6511e 100644
> > @@ -39 +41 @@
> > -@@ -180,7 +180,6 @@ test_cmdline_socket_fns(void)
> > +@@ -174,7 +174,6 @@ test_cmdline_socket_fns(void)
> > @@ -47,19 +49,5 @@
> > -diff --git a/doc/guides/rel_notes/release_21_11.rst
> > b/doc/guides/rel_notes/release_21_11.rst
> > -index 9b1843eb09..450bcbb445 100644
> > ---- a/doc/guides/rel_notes/release_21_11.rst
> > -+++ b/doc/guides/rel_notes/release_21_11.rst
> > -@@ -325,6 +325,9 @@ API Changes
> > -   removed. Its usages have been replaced by a new function
> > -   ``rte_kvargs_get_with_value()``.
> > -
> > -+* cmdline: ``cmdline_stdin_exit()`` now frees the ``cmdline`` structure.
> > -+  Calls to ``cmdline_free()`` after it need to be deleted from applications.
> > -+
> > - * cmdline: Made ``cmdline`` structure definition hidden on Linux and
> > FreeBSD.
> > -
> > - * cmdline: Made ``rdline`` structure definition hidden. Functions are added -
> > diff --git a/lib/cmdline/cmdline_socket.c b/lib/cmdline/cmdline_socket.c -
> > index 998e8ade25..ebd5343754 100644
> > ---- a/lib/cmdline/cmdline_socket.c
> > -+++ b/lib/cmdline/cmdline_socket.c
> > -@@ -53,4 +53,5 @@ cmdline_stdin_exit(struct cmdline *cl)
> > +diff --git a/lib/librte_cmdline/cmdline_socket.c
> > +b/lib/librte_cmdline/cmdline_socket.c
> > +index 0fe1497008..f919537460 100644
> > +--- a/lib/librte_cmdline/cmdline_socket.c
> > ++++ b/lib/librte_cmdline/cmdline_socket.c
> > +@@ -57,4 +57,5 @@ cmdline_stdin_exit(struct cmdline *cl)


^ permalink raw reply	[flat|nested] 345+ messages in thread

* Re: [dpdk-stable] patch 'pipeline: fix build with ASan' has been queued to stable release 20.11.4
  2021-11-10  7:27   ` Peng, ZhihongX
@ 2021-11-10  8:33     ` Xueming(Steven) Li
  0 siblings, 0 replies; 345+ messages in thread
From: Xueming(Steven) Li @ 2021-11-10  8:33 UTC (permalink / raw)
  To: zhihongx.peng; +Cc: xueqin.lin, cristian.dumitrescu, stable, bluca

Thanks, removed from list.


On Wed, 2021-11-10 at 07:27 +0000, Peng, ZhihongX wrote:
> Hi , Xueming
> 
> This patch is not backward compatible. 
> 
> Regards,
> Peng,Zhihong
> 
> > -----Original Message-----
> > From: Xueming Li <xuemingl@nvidia.com>
> > Sent: Wednesday, November 10, 2021 2:31 PM
> > To: Peng, ZhihongX <zhihongx.peng@intel.com>
> > Cc: Luca Boccassi <bluca@debian.org>; Lin, Xueqin <xueqin.lin@intel.com>;
> > Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; dpdk stable
> > <stable@dpdk.org>
> > Subject: patch 'pipeline: fix build with ASan' has been queued to stable
> > release 20.11.4
> > 
> > Hi,
> > 
> > FYI, your patch has been queued to stable release 20.11.4
> > 
> > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> > It will be pushed if I get no objections before 11/12/21. So please shout if
> > anyone has objections.
> > 
> > Also note that after the patch there's a diff of the upstream commit vs the
> > patch applied to the branch. This will indicate if there was any rebasing
> > needed to apply to the stable branch. If there were code changes for
> > rebasing
> > (ie: not only metadata diffs), please double check that the rebase was
> > correctly done.
> > 
> > Queued patches are on a temporary branch at:
> > https://github.com/steevenlee/dpdk
> > 
> > This queued commit can be viewed at:
> > https://github.com/steevenlee/dpdk/commit/e7dd7a6c07e28be8f4319a6b3
> > 623d9810e4c4ced
> > 
> > Thanks.
> > 
> > Xueming Li <xuemingl@nvidia.com>
> > 
> > ---
> > From e7dd7a6c07e28be8f4319a6b3623d9810e4c4ced Mon Sep 17 00:00:00
> > 2001
> > From: Zhihong Peng <zhihongx.peng@intel.com>
> > Date: Wed, 20 Oct 2021 15:46:42 +0800
> > Subject: [PATCH] pipeline: fix build with ASan
> > Cc: Xueming Li <xuemingl@nvidia.com>
> > 
> > [ upstream commit 84f5ac9418ea9995975b30fa4ea57018f9618fc1 ]
> > 
> > Code changes to avoid the following build error:
> > "Control reaches end of non-void function".
> > 
> > Signed-off-by: Xueqin Lin <xueqin.lin@intel.com>
> > Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
> > Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> > ---
> >  lib/librte_pipeline/rte_swx_pipeline.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/lib/librte_pipeline/rte_swx_pipeline.c
> > b/lib/librte_pipeline/rte_swx_pipeline.c
> > index 4a96b77e28..923fa8b769 100644
> > --- a/lib/librte_pipeline/rte_swx_pipeline.c
> > +++ b/lib/librte_pipeline/rte_swx_pipeline.c
> > @@ -3240,7 +3240,7 @@ instr_extern_translate(struct rte_swx_pipeline *p,
> >  		return 0;
> >  	}
> > 
> > -	CHECK(0, EINVAL);
> > +	return -EINVAL;
> >  }
> > 
> >  static inline void
> > @@ -5869,7 +5869,7 @@ instr_translate(struct rte_swx_pipeline *p,
> >  					      instr,
> >  					      data);
> > 
> > -	CHECK(0, EINVAL);
> > +	return -EINVAL;
> >  }
> > 
> >  static struct instruction_data *
> > --
> > 2.33.0
> > 
> > ---
> >   Diff of the applied patch vs upstream commit (please double-check if non-
> > empty:
> > ---
> > --- -	2021-11-10 14:17:10.811450551 +0800
> > +++ 0201-pipeline-fix-build-with-ASan.patch	2021-11-10
> > 14:17:02.014078251 +0800
> > @@ -1 +1 @@
> > -From 84f5ac9418ea9995975b30fa4ea57018f9618fc1 Mon Sep 17 00:00:00
> > 2001
> > +From e7dd7a6c07e28be8f4319a6b3623d9810e4c4ced Mon Sep 17 00:00:00
> > 2001
> > @@ -4,0 +5,3 @@
> > +Cc: Xueming Li <xuemingl@nvidia.com>
> > +
> > +[ upstream commit 84f5ac9418ea9995975b30fa4ea57018f9618fc1 ]
> > @@ -13 +16 @@
> > - lib/pipeline/rte_swx_pipeline.c | 4 ++--
> > + lib/librte_pipeline/rte_swx_pipeline.c | 4 ++--
> > @@ -16,5 +19,5 @@
> > -diff --git a/lib/pipeline/rte_swx_pipeline.c
> > b/lib/pipeline/rte_swx_pipeline.c -index 5e089fb72b..1afaffefd4 100644
> > ---- a/lib/pipeline/rte_swx_pipeline.c
> > -+++ b/lib/pipeline/rte_swx_pipeline.c
> > -@@ -4642,7 +4642,7 @@ instr_meter_translate(struct rte_swx_pipeline *p,
> > +diff --git a/lib/librte_pipeline/rte_swx_pipeline.c
> > +b/lib/librte_pipeline/rte_swx_pipeline.c
> > +index 4a96b77e28..923fa8b769 100644
> > +--- a/lib/librte_pipeline/rte_swx_pipeline.c
> > ++++ b/lib/librte_pipeline/rte_swx_pipeline.c
> > +@@ -3240,7 +3240,7 @@ instr_extern_translate(struct rte_swx_pipeline
> > +*p,
> > @@ -29 +32 @@
> > -@@ -5937,7 +5937,7 @@ instr_translate(struct rte_swx_pipeline *p,
> > +@@ -5869,7 +5869,7 @@ instr_translate(struct rte_swx_pipeline *p,


^ permalink raw reply	[flat|nested] 345+ messages in thread

* Re: [dpdk-stable] patch 'examples/performance-thread: fix build with ASan' has been queued to stable release 20.11.4
  2021-11-10  7:27   ` Peng, ZhihongX
@ 2021-11-10  8:35     ` Xueming(Steven) Li
  0 siblings, 0 replies; 345+ messages in thread
From: Xueming(Steven) Li @ 2021-11-10  8:35 UTC (permalink / raw)
  To: zhihongx.peng; +Cc: xueqin.lin, stable, bluca, bruce.richardson

Thanks for update, removed from list.


On Wed, 2021-11-10 at 07:27 +0000, Peng, ZhihongX wrote:
> Hi , Xueming
> 
> This patch is not backward compatible. 
> 
> Regards,
> Peng,Zhihong
> 
> > -----Original Message-----
> > From: Xueming Li <xuemingl@nvidia.com>
> > Sent: Wednesday, November 10, 2021 2:31 PM
> > To: Peng, ZhihongX <zhihongx.peng@intel.com>
> > Cc: Luca Boccassi <bluca@debian.org>; Lin, Xueqin <xueqin.lin@intel.com>;
> > Richardson, Bruce <bruce.richardson@intel.com>; dpdk stable
> > <stable@dpdk.org>
> > Subject: patch 'examples/performance-thread: fix build with ASan' has been
> > queued to stable release 20.11.4
> > 
> > Hi,
> > 
> > FYI, your patch has been queued to stable release 20.11.4
> > 
> > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> > It will be pushed if I get no objections before 11/12/21. So please shout if
> > anyone has objections.
> > 
> > Also note that after the patch there's a diff of the upstream commit vs the
> > patch applied to the branch. This will indicate if there was any rebasing
> > needed to apply to the stable branch. If there were code changes for
> > rebasing
> > (ie: not only metadata diffs), please double check that the rebase was
> > correctly done.
> > 
> > Queued patches are on a temporary branch at:
> > https://github.com/steevenlee/dpdk
> > 
> > This queued commit can be viewed at:
> > https://github.com/steevenlee/dpdk/commit/4b98552d4d3ca54ebc58014b4
> > 163e1164e2e4342
> > 
> > Thanks.
> > 
> > Xueming Li <xuemingl@nvidia.com>
> > 
> > ---
> > From 4b98552d4d3ca54ebc58014b4163e1164e2e4342 Mon Sep 17 00:00:00
> > 2001
> > From: Zhihong Peng <zhihongx.peng@intel.com>
> > Date: Wed, 20 Oct 2021 15:46:43 +0800
> > Subject: [PATCH] examples/performance-thread: fix build with ASan
> > Cc: Xueming Li <xuemingl@nvidia.com>
> > 
> > [ upstream commit 4d2d1258151657d69b0be5d118956b7e809f9d47 ]
> > 
> > Code changes to avoid the following build error:
> > "strncpy specified bound XX equals destination size".
> > 
> > Signed-off-by: Xueqin Lin <xueqin.lin@intel.com>
> > Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
> > Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> >  examples/performance-thread/common/lthread.c       | 4 ++--
> >  examples/performance-thread/common/lthread_cond.c  | 6 +++---
> > examples/performance-thread/common/lthread_mutex.c | 6 +++---
> >  3 files changed, 8 insertions(+), 8 deletions(-)
> > 
> > diff --git a/examples/performance-thread/common/lthread.c
> > b/examples/performance-thread/common/lthread.c
> > index 3f1f48db43..190e5874b1 100644
> > --- a/examples/performance-thread/common/lthread.c
> > +++ b/examples/performance-thread/common/lthread.c
> > @@ -20,6 +20,7 @@
> >  #include <sys/mman.h>
> > 
> >  #include <rte_log.h>
> > +#include <rte_string_fns.h>
> >  #include <ctx.h>
> >  #include <stack.h>
> > 
> > @@ -463,6 +464,5 @@ void lthread_set_funcname(const char *f)  {
> >  	struct lthread *lt = THIS_LTHREAD;
> > 
> > -	strncpy(lt->funcname, f, sizeof(lt->funcname));
> > -	lt->funcname[sizeof(lt->funcname)-1] = 0;
> > +	strlcpy(lt->funcname, f, sizeof(lt->funcname));
> >  }
> > diff --git a/examples/performance-thread/common/lthread_cond.c
> > b/examples/performance-thread/common/lthread_cond.c
> > index cdcc7a7b5a..e7be17089a 100644
> > --- a/examples/performance-thread/common/lthread_cond.c
> > +++ b/examples/performance-thread/common/lthread_cond.c
> > @@ -20,6 +20,7 @@
> > 
> >  #include <rte_log.h>
> >  #include <rte_common.h>
> > +#include <rte_string_fns.h>
> > 
> >  #include "lthread_api.h"
> >  #include "lthread_diag_api.h"
> > @@ -57,10 +58,9 @@ lthread_cond_init(char *name, struct lthread_cond
> > **cond,
> >  	}
> > 
> >  	if (name == NULL)
> > -		strncpy(c->name, "no name", sizeof(c->name));
> > +		strlcpy(c->name, "no name", sizeof(c->name));
> >  	else
> > -		strncpy(c->name, name, sizeof(c->name));
> > -	c->name[sizeof(c->name)-1] = 0;
> > +		strlcpy(c->name, name, sizeof(c->name));
> > 
> >  	c->root_sched = THIS_SCHED;
> > 
> > diff --git a/examples/performance-thread/common/lthread_mutex.c
> > b/examples/performance-thread/common/lthread_mutex.c
> > index 01da6cad4f..709ab9f553 100644
> > --- a/examples/performance-thread/common/lthread_mutex.c
> > +++ b/examples/performance-thread/common/lthread_mutex.c
> > @@ -19,6 +19,7 @@
> >  #include <rte_log.h>
> >  #include <rte_spinlock.h>
> >  #include <rte_common.h>
> > +#include <rte_string_fns.h>
> > 
> >  #include "lthread_api.h"
> >  #include "lthread_int.h"
> > @@ -52,10 +53,9 @@ lthread_mutex_init(char *name, struct lthread_mutex
> > **mutex,
> >  	}
> > 
> >  	if (name == NULL)
> > -		strncpy(m->name, "no name", sizeof(m->name));
> > +		strlcpy(m->name, "no name", sizeof(m->name));
> >  	else
> > -		strncpy(m->name, name, sizeof(m->name));
> > -	m->name[sizeof(m->name)-1] = 0;
> > +		strlcpy(m->name, name, sizeof(m->name));
> > 
> >  	m->root_sched = THIS_SCHED;
> >  	m->owner = NULL;
> > --
> > 2.33.0
> > 
> > ---
> >   Diff of the applied patch vs upstream commit (please double-check if non-
> > empty:
> > ---
> > --- -	2021-11-10 14:17:10.858279926 +0800
> > +++ 0202-examples-performance-thread-fix-build-with-ASan.patch	2021-
> > 11-10 14:17:02.014078251 +0800
> > @@ -1 +1 @@
> > -From 4d2d1258151657d69b0be5d118956b7e809f9d47 Mon Sep 17 00:00:00
> > 2001
> > +From 4b98552d4d3ca54ebc58014b4163e1164e2e4342 Mon Sep 17 00:00:00
> > 2001
> > @@ -4,0 +5,3 @@
> > +Cc: Xueming Li <xuemingl@nvidia.com>
> > +
> > +[ upstream commit 4d2d1258151657d69b0be5d118956b7e809f9d47 ]
> > @@ -19 +22 @@
> > -index 98123f34f8..009374a8c3 100644
> > +index 3f1f48db43..190e5874b1 100644
> > @@ -30 +33 @@
> > -@@ -465,6 +466,5 @@ void lthread_set_funcname(const char *f)
> > +@@ -463,6 +464,5 @@ void lthread_set_funcname(const char *f)
> > @@ -64 +67 @@
> > -index 061fc5c19a..f3ec7c1c60 100644
> > +index 01da6cad4f..709ab9f553 100644


^ permalink raw reply	[flat|nested] 345+ messages in thread

* Re: [dpdk-stable] patch 'ip_frag: revert fix fragmenting IPv4 fragment' has been queued to stable release 20.11.4
  2021-11-10  7:09   ` Huichao Cai
@ 2021-11-10  8:38     ` Xueming(Steven) Li
  0 siblings, 0 replies; 345+ messages in thread
From: Xueming(Steven) Li @ 2021-11-10  8:38 UTC (permalink / raw)
  To: chcchc88; +Cc: konstantin.ananyev, stable, bluca

Yes, thanks for reminding, applied!

On Wed, 2021-11-10 at 15:09 +0800, Huichao Cai wrote:
> Hi Xueming
> 
> As I said in my last e-mail,this patch is a fallback to the previous
> patch.
> The previous patch is:
> https://patchwork.dpdk.org/project/dpdk/patch/1633764424-17370-1-git-
> send-email-chcchc88@163.com/
> 
> So this patch doesn't need to be merged into the stable release
> 20.11.4.
> Thanks.
> 
> Huichao Cai
> 
> 
> 
>  


^ permalink raw reply	[flat|nested] 345+ messages in thread

* Re: [dpdk-stable] patch 'vhost: add sanity check on inflight last index' has been queued to stable release 20.11.4
  2021-11-10  6:31 ` [dpdk-stable] patch 'vhost: add sanity check on inflight last index' " Xueming Li
@ 2021-11-10 10:54   ` Li Feng
  0 siblings, 0 replies; 345+ messages in thread
From: Li Feng @ 2021-11-10 10:54 UTC (permalink / raw)
  To: Xueming Li; +Cc: Luca Boccassi, Maxime Coquelin, dpdk stable

Looks good.


On Wed, Nov 10, 2021 at 2:52 PM Xueming Li <xuemingl@nvidia.com> wrote:
>
> Hi,
>
> FYI, your patch has been queued to stable release 20.11.4
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 11/12/21. So please
> shout if anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Queued patches are on a temporary branch at:
> https://github.com/steevenlee/dpdk
>
> This queued commit can be viewed at:
> https://github.com/steevenlee/dpdk/commit/022ab64a482d3e7a8627446d4acd52cfd084dd7d
>
> Thanks.
>
> Xueming Li <xuemingl@nvidia.com>
>
> ---
> From 022ab64a482d3e7a8627446d4acd52cfd084dd7d Mon Sep 17 00:00:00 2001
> From: Li Feng <fengli@smartx.com>
> Date: Thu, 14 Oct 2021 20:40:08 +0800
> Subject: [PATCH] vhost: add sanity check on inflight last index
> Cc: Xueming Li <xuemingl@nvidia.com>
>
> [ upstream commit 5a4fbe79e6d124141bd0a820c897287b15c559c4 ]
>
> The index in rte_vhost_set_last_inflight_io_split is from
> the frontend driver, check if it's in the virtqueue range.
>
> Fixes: bb0c2de9602b ("vhost: add APIs to operate inflight ring")
>
> Signed-off-by: Li Feng <fengli@smartx.com>
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
>  lib/librte_vhost/vhost.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
> index b97dcf6b69..1a7c240492 100644
> --- a/lib/librte_vhost/vhost.c
> +++ b/lib/librte_vhost/vhost.c
> @@ -1191,6 +1191,9 @@ rte_vhost_set_last_inflight_io_split(int vid, uint16_t vring_idx,
>         if (unlikely(!vq->inflight_split))
>                 return -1;
>
> +       if (unlikely(idx >= vq->size))
> +               return -1;
> +
>         vq->inflight_split->last_inflight_io = idx;
>         return 0;
>  }
> --
> 2.33.0
>
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-empty:
> ---
> --- -   2021-11-10 14:17:09.922847297 +0800
> +++ 0180-vhost-add-sanity-check-on-inflight-last-index.patch    2021-11-10 14:17:01.990745109 +0800
> @@ -1 +1 @@
> -From 5a4fbe79e6d124141bd0a820c897287b15c559c4 Mon Sep 17 00:00:00 2001
> +From 022ab64a482d3e7a8627446d4acd52cfd084dd7d Mon Sep 17 00:00:00 2001
> @@ -4,0 +5,3 @@
> +Cc: Xueming Li <xuemingl@nvidia.com>
> +
> +[ upstream commit 5a4fbe79e6d124141bd0a820c897287b15c559c4 ]
> @@ -10 +12,0 @@
> -Cc: stable@dpdk.org
> @@ -15 +17 @@
> - lib/vhost/vhost.c | 3 +++
> + lib/librte_vhost/vhost.c | 3 +++
> @@ -18,5 +20,5 @@
> -diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c
> -index 9540522dac..3b674ac320 100644
> ---- a/lib/vhost/vhost.c
> -+++ b/lib/vhost/vhost.c
> -@@ -1226,6 +1226,9 @@ rte_vhost_set_last_inflight_io_split(int vid, uint16_t vring_idx,
> +diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
> +index b97dcf6b69..1a7c240492 100644
> +--- a/lib/librte_vhost/vhost.c
> ++++ b/lib/librte_vhost/vhost.c
> +@@ -1191,6 +1191,9 @@ rte_vhost_set_last_inflight_io_split(int vid, uint16_t vring_idx,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* your patch has been queued to stable release 20.11.4
  2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
                   ` (251 preceding siblings ...)
  2021-11-10  6:32 ` [dpdk-stable] patch 'ip_frag: revert fix fragmenting IPv4 fragment' " Xueming Li
@ 2021-11-28 14:53 ` Xueming Li
  2021-11-28 14:53   ` patch 'common/mlx5: glue MR registration with IOVA' " Xueming Li
                     ` (78 more replies)
  252 siblings, 79 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Xueming Li; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/31/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f0ff3aa20e2a04582ae5f13d6a402a459a7f97b5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---

Alexander Bechikov (1):
  mbuf: fix dump of dynamic fields and flags

Alexander Kozyrev (2):
  net/mlx5: fix GRE flow item matching
  net/mlx5: fix GENEVE and VXLAN-GPE flow item matching

Alvin Zhang (1):
  net/iavf: fix pointer of meta data

Anoob Joseph (3):
  test/crypto: skip plain text compare for null cipher
  test/crypto: fix missing return checks
  common/cpt: fix KASUMI input length

Bing Zhao (2):
  net/mlx5: fix RETA update without stopping device
  vdpa/mlx5: fix mkey creation check

Bruce Richardson (1):
  doc: fix Doxygen examples build on FreeBSD

Chengfeng Ye (1):
  net/mlx5: fix mutex unlock in Tx packet pacing cleanup

Chengwen Feng (1):
  net/hns3: optimize Tx performance by mbuf fast free

Ciara Power (1):
  test/crypto: remove unnecessary stats retrieval

Conor Walsh (11):
  net/hinic/base: remove some unused variables
  net/octeontx: remove unused packet length
  bus/fslmc: remove unused device count
  event/sw: remove unused inflight events count
  net/bnxt: remove some unused variables
  net/liquidio: remove unused counter
  net/nfp: remove unused message length
  net/qede/base: remove unused message size
  net/vmxnet3: fix build with clang 13
  test/distributor: remove unused counter
  examples/performance-thread: remove unused hits count

Dariusz Sosnowski (4):
  net/mlx5: fix partial inline of fine grain packets
  net/mlx5: fix MPLS tunnel outer layer overwrite
  net/mlx5: fix multi-segment packet wraparound
  doc: fix typo in coding style

David Marchand (2):
  test/red: fix typo in test description
  examples/ntb: fix build dependency

Dmitry Kozlyuk (1):
  config/x86: skip GNU binutils bug check for LLVM

Ferruh Yigit (2):
  ethdev: fix typos
  kni: restrict bifurcated device support

Gagandeep Singh (1):
  drivers/crypto: fix IPsec TTL decrement option

Gregory Etelson (9):
  net/mlx5: fix tunnel offload validation
  examples/multi_process: fix Rx packets distribution
  net/mlx5: fix VXLAN-GPE next protocol translation
  net/mlx5: add Ethernet header to GENEVE RSS expansion
  net/mlx5: fix RSS expansion scheme for GRE header
  net/mlx5: fix GENEVE protocol type translation
  net/mlx5: fix GRE protocol type translation
  app/testpmd: fix tunnel offload validation
  app/testpmd: fix hexadecimal parser with odd length

Harneet Singh (1):
  examples/l3fwd-power: fix early shutdown

Jerin Jacob (1):
  doc: fix memif driver acronyms

Jiawei Wang (3):
  net/mlx5: fix tag ID conflict with sample action
  net/mlx5: fix metadata and meter split shared tag
  net/mlx5: fix flow mark with sampling and metering

Jie Wang (1):
  app/testpmd: fix DCB in VT configuration

Jim Harris (1):
  power: fix build with clang 13

Junxiao Shi (1):
  net/memif: allow stopping and closing device

Kai Ji (1):
  test/crypto: fix data lengths

Kefu Chai (1):
  doc: fix a typo in EAL guide

Kumara Parameshwaran (1):
  net/failsafe: fix secondary process probe

Matan Azrad (3):
  common/mlx5: create wrapped MR
  vdpa/mlx5: workaround dirty bitmap MR creation
  common/mlx5: fix build for zero-length headroom array

Michael Baum (5):
  common/mlx5: glue MR registration with IOVA
  vdpa/mlx5: workaround guest MR registrations
  net/mlx5: workaround MR creation for flow counter
  common/mlx5: fix user mode register access attribute
  net/mlx5: fix devargs validation for multi-class probing

Naga Harish K S V (1):
  eventdev/eth_tx: fix queue delete logic

Pablo de Lara (1):
  crypto/ipsec_mb: fix cipher key setting

Rashmi Shetty (1):
  event/dlb2: fix delayed pop test in selftest

Raslan Darawsheh (1):
  app/flow-perf: fix parsing of invalid option

Ruifeng Wang (1):
  net/i40e: fix risk in descriptor read in scalar Rx

Sean Morrissey (3):
  remove repeated 'the' in the code
  fix PMD wording
  doc: capitalise PMD

Somnath Kotur (2):
  net/bnxt: fix Rx next consumer index in mbuf alloc fail
  net/bnxt: fix autoneg on PAM4 links

Stephen Hemminger (1):
  fix spelling in comments and doxygen

Thomas Monjalon (1):
  doc: remove repeated repeated words

Timothy Redaelli (1):
  doc: strip build artefacts for examples file list

Vanshika Shukla (1):
  examples/ptpclient: fix delay request message

Viacheslav Ovsiienko (2):
  doc: describe timestamp limitations for mlx5
  net/mlx5: fix Tx scheduling check

Xiaoyu Min (1):
  net/mlx4: fix empty Ethernet spec with VLAN

 app/test-flow-perf/main.c                     |   3 +-
 app/test-pmd/cmdline.c                        |   6 +-
 app/test-pmd/cmdline_flow.c                   |  29 +-
 app/test-pmd/config.c                         |  10 +-
 app/test-pmd/icmpecho.c                       |   2 +-
 app/test-pmd/testpmd.c                        |   7 +
 app/test/test_atomic.c                        |   2 +-
 app/test/test_barrier.c                       |   4 +-
 app/test/test_bpf.c                           |   2 +-
 app/test/test_compressdev.c                   |   2 +-
 app/test/test_cryptodev.c                     | 208 +++++++++------
 app/test/test_distributor_perf.c              |   3 -
 app/test/test_func_reentrancy.c               |   6 +-
 app/test/test_ipsec.c                         |   2 +-
 app/test/test_link_bonding.c                  |   2 +-
 app/test/test_lpm.c                           |   6 +-
 app/test/test_lpm6.c                          |  14 +-
 app/test/test_malloc.c                        |   4 +-
 app/test/test_mbuf.c                          |   2 +-
 app/test/test_mempool.c                       |   2 +-
 app/test/test_mempool_perf.c                  |   2 +-
 app/test/test_meter.c                         |   6 +-
 app/test/test_pmd_perf.c                      |   2 +-
 app/test/test_red.c                           |   2 +-
 app/test/test_timer.c                         |   2 +-
 config/x86/meson.build                        |   7 +-
 doc/api/generate_examples.sh                  |  14 +-
 doc/api/meson.build                           |   2 +-
 doc/guides/bbdevs/turbo_sw.rst                |   2 +-
 doc/guides/contributing/coding_style.rst      |   2 +-
 doc/guides/cryptodevs/ccp.rst                 |   2 +-
 doc/guides/cryptodevs/openssl.rst             |   2 +-
 doc/guides/cryptodevs/overview.rst            |   2 +-
 doc/guides/cryptodevs/virtio.rst              |   2 +-
 doc/guides/eventdevs/opdl.rst                 |   2 +-
 doc/guides/linux_gsg/build_sample_apps.rst    |   2 +-
 doc/guides/nics/af_packet.rst                 |   2 +-
 doc/guides/nics/af_xdp.rst                    |   2 +-
 doc/guides/nics/avp.rst                       |   4 +-
 doc/guides/nics/features/hns3.ini             |   1 +
 doc/guides/nics/fm10k.rst                     |   4 +-
 doc/guides/nics/intel_vf.rst                  |   2 +-
 doc/guides/nics/memif.rst                     |  12 +-
 doc/guides/nics/mlx5.rst                      |  18 ++
 doc/guides/nics/netvsc.rst                    |   2 +-
 doc/guides/nics/nfp.rst                       |   2 +-
 doc/guides/nics/octeontx.rst                  |   4 +-
 doc/guides/nics/octeontx2.rst                 |   6 +-
 doc/guides/nics/thunderx.rst                  |   4 +-
 doc/guides/nics/virtio.rst                    |   4 +-
 doc/guides/prog_guide/compressdev.rst         |   6 +-
 .../prog_guide/env_abstraction_layer.rst      |   4 +-
 doc/guides/prog_guide/flow_classify_lib.rst   |   2 +-
 doc/guides/prog_guide/graph_lib.rst           |   2 +-
 .../prog_guide/kernel_nic_interface.rst       |  28 ++
 .../prog_guide/writing_efficient_code.rst     |   4 +-
 doc/guides/rel_notes/known_issues.rst         |   2 +-
 doc/guides/rel_notes/release_16_04.rst        |   2 +-
 doc/guides/rel_notes/release_18_02.rst        |   4 +-
 doc/guides/rel_notes/release_19_05.rst        |   6 +-
 doc/guides/rel_notes/release_19_11.rst        |   2 +-
 doc/guides/rel_notes/release_20_11.rst        |   4 +-
 doc/guides/rel_notes/release_2_1.rst          |   2 +-
 doc/guides/rel_notes/release_2_2.rst          |   4 +-
 doc/guides/sample_app_ug/bbdev_app.rst        |   2 +-
 doc/guides/sample_app_ug/ipsec_secgw.rst      |   2 +-
 doc/guides/sample_app_ug/keep_alive.rst       |   2 +-
 .../sample_app_ug/l3_forward_access_ctrl.rst  |   2 +-
 doc/guides/sample_app_ug/vhost.rst            |   4 +-
 .../sample_app_ug/vm_power_management.rst     |   2 +-
 doc/guides/tools/testeventdev.rst             |   2 +-
 doc/guides/vdpadevs/ifc.rst                   |   4 +-
 drivers/bus/fslmc/fslmc_bus.c                 |   2 -
 drivers/bus/vmbus/rte_bus_vmbus.h             |   2 +-
 drivers/common/cpt/cpt_hw_types.h             |   2 +-
 drivers/common/cpt/cpt_ucode.h                |   2 +-
 drivers/common/mlx5/linux/meson.build         |   2 +
 drivers/common/mlx5/linux/mlx5_common_os.c    |  56 ++++
 drivers/common/mlx5/linux/mlx5_glue.c         |  18 ++
 drivers/common/mlx5/linux/mlx5_glue.h         |   3 +
 drivers/common/mlx5/mlx5_common.h             |  18 ++
 drivers/common/mlx5/mlx5_prm.h                |   7 +-
 drivers/common/mlx5/version.map               |   3 +
 drivers/common/sfc_efx/efsys.h                |   2 +-
 drivers/compress/qat/qat_comp_pmd.h           |   2 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  19 +-
 drivers/crypto/caam_jr/caam_jr.c              |   5 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   |   3 +-
 drivers/crypto/dpaa_sec/dpaa_sec.c            |   4 +-
 drivers/crypto/qat/qat_asym_pmd.h             |   2 +-
 drivers/crypto/qat/qat_sym_pmd.h              |   2 +-
 drivers/event/dlb2/dlb2_selftest.c            |  12 +-
 drivers/event/sw/sw_evdev.c                   |   2 -
 drivers/net/bnx2x/elink.c                     |   2 +-
 drivers/net/bnxt/bnxt_hwrm.c                  |   2 +
 drivers/net/bnxt/bnxt_rxr.c                   |  24 +-
 drivers/net/bnxt/hsi_struct_def_dpdk.h        |   2 +-
 drivers/net/bnxt/tf_ulp/ulp_utils.c           |   3 -
 drivers/net/bonding/rte_eth_bond_pmd.c        |   2 +-
 drivers/net/failsafe/failsafe.c               |   3 +-
 drivers/net/fm10k/fm10k_ethdev.c              |   2 +-
 drivers/net/hinic/base/hinic_pmd_cmdq.h       |   2 +-
 drivers/net/hinic/base/hinic_pmd_hwdev.c      |   2 +-
 drivers/net/hinic/base/hinic_pmd_mgmt.c       |   6 -
 drivers/net/hns3/hns3_ethdev.c                |   6 +-
 drivers/net/hns3/hns3_ethdev.h                |   8 +-
 drivers/net/hns3/hns3_ethdev_vf.c             |  28 +-
 drivers/net/hns3/hns3_rss.c                   |   4 +-
 drivers/net/hns3/hns3_rxtx.c                  |  19 +-
 drivers/net/hns3/hns3_rxtx.h                  |   6 +-
 drivers/net/hns3/hns3_rxtx_vec.h              |   9 +
 drivers/net/i40e/base/i40e_common.c           |   2 +-
 drivers/net/i40e/i40e_ethdev.c                |   2 +-
 drivers/net/i40e/i40e_rxtx.c                  |  12 +
 drivers/net/iavf/iavf_hash.c                  |   5 +-
 drivers/net/ice/ice_ethdev.h                  |   2 +-
 drivers/net/ionic/ionic_if.h                  |   2 +-
 drivers/net/liquidio/lio_rxtx.c               |   2 -
 drivers/net/memif/rte_eth_memif.c             |  11 +-
 drivers/net/mlx4/mlx4_flow.c                  |   3 +-
 drivers/net/mlx5/linux/mlx5_os.c              |  13 +-
 drivers/net/mlx5/mlx5.c                       |  67 +----
 drivers/net/mlx5/mlx5.h                       |   5 +-
 drivers/net/mlx5/mlx5_flow.c                  | 164 ++++++------
 drivers/net/mlx5/mlx5_flow.h                  |   7 +-
 drivers/net/mlx5/mlx5_flow_dv.c               | 250 +++++++++++-------
 drivers/net/mlx5/mlx5_rss.c                   |   8 +-
 drivers/net/mlx5/mlx5_rxtx.c                  |  14 +-
 drivers/net/mlx5/mlx5_rxtx.h                  |   1 -
 drivers/net/mlx5/mlx5_trigger.c               |   2 +-
 drivers/net/mlx5/mlx5_txpp.c                  |  30 +--
 drivers/net/nfp/nfp_net.c                     |   8 +-
 drivers/net/nfp/nfp_net_pmd.h                 |   2 +-
 drivers/net/octeontx/octeontx_rxtx.h          |   3 +-
 drivers/net/qede/base/ecore_vf.c              |   5 +-
 drivers/net/vmxnet3/vmxnet3_rxtx.c            |   3 +
 drivers/raw/ifpga/base/README                 |   2 +-
 drivers/vdpa/mlx5/mlx5_vdpa.h                 |   9 +-
 drivers/vdpa/mlx5/mlx5_vdpa_lm.c              |  42 +--
 drivers/vdpa/mlx5/mlx5_vdpa_mem.c             |  42 +--
 examples/l3fwd-power/main.c                   |   6 +-
 .../client_server_mp/mp_server/main.c         |   2 +-
 examples/ntb/meson.build                      |   5 +-
 .../performance-thread/l3fwd-thread/main.c    |   3 -
 examples/ptpclient/ptpclient.c                |  32 ++-
 kernel/linux/kni/kni_dev.h                    |   3 +
 kernel/linux/kni/kni_misc.c                   |  36 +++
 kernel/linux/kni/kni_net.c                    |  42 +--
 lib/librte_acl/acl.h                          |   4 +-
 lib/librte_acl/acl_bld.c                      |   2 +-
 lib/librte_acl/acl_run_avx2.h                 |   2 +-
 lib/librte_acl/meson.build                    |   2 +-
 lib/librte_bbdev/rte_bbdev.c                  |   2 +-
 lib/librte_bbdev/rte_bbdev.h                  |  12 +-
 lib/librte_bbdev/rte_bbdev_pmd.h              |   2 +-
 lib/librte_bpf/bpf_jit_x86.c                  |   2 +-
 lib/librte_bpf/bpf_load_elf.c                 |   2 +-
 lib/librte_bpf/bpf_pkt.c                      |   2 +-
 lib/librte_bpf/bpf_validate.c                 |   8 +-
 lib/librte_compressdev/rte_compressdev_pmd.h  |   4 +-
 lib/librte_cryptodev/rte_cryptodev_pmd.h      |   4 +-
 lib/librte_eal/include/rte_dev.h              |   2 +-
 .../include/rte_function_versioning.h         |   2 +-
 lib/librte_eal/windows/include/fnmatch.h      |   2 +-
 lib/librte_ethdev/rte_ethdev.h                |  18 +-
 lib/librte_ethdev/rte_ethdev_driver.h         |   4 +-
 lib/librte_ethdev/rte_flow.h                  |   4 +-
 .../rte_event_eth_tx_adapter.c                |   2 +-
 lib/librte_eventdev/rte_event_timer_adapter.c |   2 +-
 lib/librte_eventdev/rte_eventdev_pmd.h        |   2 +-
 lib/librte_fib/meson.build                    |   2 +-
 lib/librte_ip_frag/rte_ipv4_reassembly.c      |   2 +-
 lib/librte_ip_frag/rte_ipv6_fragmentation.c   |   2 +-
 lib/librte_ipsec/esp_inb.c                    |   4 +-
 lib/librte_ipsec/esp_outb.c                   |   2 +-
 lib/librte_ipsec/ipsec_sad.c                  |   2 +-
 lib/librte_ipsec/sa.c                         |   2 +-
 lib/librte_ipsec/sa.h                         |   2 +-
 lib/librte_mbuf/rte_mbuf_dyn.c                |   2 +-
 lib/librte_net/rte_gtp.h                      |   6 +-
 lib/librte_node/ethdev_rx_priv.h              |   2 +-
 lib/librte_node/ethdev_tx_priv.h              |   2 +-
 lib/librte_node/ip4_rewrite_priv.h            |   2 +-
 lib/librte_power/power_acpi_cpufreq.c         |   2 +-
 lib/librte_power/rte_power_empty_poll.c       |   3 +-
 lib/librte_rawdev/rte_rawdev_pmd.h            |   2 +-
 lib/librte_rcu/rte_rcu_qsbr.h                 |   2 +-
 lib/librte_rib/rte_rib6.c                     |   2 +-
 lib/librte_sched/rte_sched.c                  |   2 +-
 lib/librte_vhost/rte_vhost.h                  |   4 +-
 190 files changed, 1009 insertions(+), 799 deletions(-)

-- 
2.34.0


^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'common/mlx5: glue MR registration with IOVA' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'common/mlx5: create wrapped MR' " Xueming Li
                     ` (77 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Michael Baum; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2991d7abc22335185b28558708a171612a581d22

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2991d7abc22335185b28558708a171612a581d22 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Tue, 9 Nov 2021 14:36:08 +0200
Subject: [PATCH] common/mlx5: glue MR registration with IOVA
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6ebd062e0602f0571cf9abbe9eabd0e5f6ad0a39 ]

Add support for rdma-core API to register IOVA MR.
The API gets the process VA, size, and IOVA and returns a memory region
with space pointed by a specific IOVA.

So any access in this MR should come with an address that is relative to
the IOVA specified in the API.

Fixes: cc07a42da250 ("vdpa/mlx5: prepare memory regions")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Signed-off-by: Matan Azrad <matan@nvidia.com>
---
 drivers/common/mlx5/linux/meson.build |  2 ++
 drivers/common/mlx5/linux/mlx5_glue.c | 18 ++++++++++++++++++
 drivers/common/mlx5/linux/mlx5_glue.h |  3 +++
 3 files changed, 23 insertions(+)

diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build
index c2d580c4a6..43d70c1324 100644
--- a/drivers/common/mlx5/linux/meson.build
+++ b/drivers/common/mlx5/linux/meson.build
@@ -188,6 +188,8 @@ has_sym_args = [
 	[ 'HAVE_DEVLINK', 'linux/devlink.h', 'DEVLINK_GENL_NAME' ],
         [ 'HAVE_MLX5_DR_CREATE_ACTION_ASO', 'infiniband/mlx5dv.h',
         'mlx5dv_dr_action_create_aso' ],
+        [ 'HAVE_MLX5_IBV_REG_MR_IOVA', 'infiniband/verbs.h',
+            'ibv_reg_mr_iova' ],
 ]
 config = configuration_data()
 foreach arg:has_sym_args
diff --git a/drivers/common/mlx5/linux/mlx5_glue.c b/drivers/common/mlx5/linux/mlx5_glue.c
index 09fdce1c22..97ac5d3b5e 100644
--- a/drivers/common/mlx5/linux/mlx5_glue.c
+++ b/drivers/common/mlx5/linux/mlx5_glue.c
@@ -224,6 +224,23 @@ mlx5_glue_reg_mr(struct ibv_pd *pd, void *addr, size_t length, int access)
 	return ibv_reg_mr(pd, addr, length, access);
 }
 
+static struct ibv_mr *
+mlx5_glue_reg_mr_iova(struct ibv_pd *pd, void *addr, size_t length,
+		      uint64_t iova, int access)
+{
+#ifdef HAVE_MLX5_IBV_REG_MR_IOVA
+		return ibv_reg_mr_iova(pd, addr, length, iova, access);
+#else
+	(void)pd;
+	(void)addr;
+	(void)length;
+	(void)iova;
+	(void)access;
+	errno = ENOTSUP;
+	return NULL;
+#endif
+}
+
 static struct ibv_mr *
 mlx5_glue_alloc_null_mr(struct ibv_pd *pd)
 {
@@ -1389,6 +1406,7 @@ const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue) {
 	.destroy_qp = mlx5_glue_destroy_qp,
 	.modify_qp = mlx5_glue_modify_qp,
 	.reg_mr = mlx5_glue_reg_mr,
+	.reg_mr_iova = mlx5_glue_reg_mr_iova,
 	.alloc_null_mr = mlx5_glue_alloc_null_mr,
 	.dereg_mr = mlx5_glue_dereg_mr,
 	.create_counter_set = mlx5_glue_create_counter_set,
diff --git a/drivers/common/mlx5/linux/mlx5_glue.h b/drivers/common/mlx5/linux/mlx5_glue.h
index f08c83768c..d48a06d443 100644
--- a/drivers/common/mlx5/linux/mlx5_glue.h
+++ b/drivers/common/mlx5/linux/mlx5_glue.h
@@ -196,6 +196,9 @@ struct mlx5_glue {
 			 int attr_mask);
 	struct ibv_mr *(*reg_mr)(struct ibv_pd *pd, void *addr,
 				 size_t length, int access);
+	struct ibv_mr *(*reg_mr_iova)(struct ibv_pd *pd, void *addr,
+				      size_t length, uint64_t iova,
+				      int access);
 	struct ibv_mr *(*alloc_null_mr)(struct ibv_pd *pd);
 	int (*dereg_mr)(struct ibv_mr *mr);
 	struct ibv_counter_set *(*create_counter_set)
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:03.641565773 +0800
+++ 0001-common-mlx5-glue-MR-registration-with-IOVA.patch	2021-11-28 22:41:03.183543455 +0800
@@ -1 +1 @@
-From 6ebd062e0602f0571cf9abbe9eabd0e5f6ad0a39 Mon Sep 17 00:00:00 2001
+From 2991d7abc22335185b28558708a171612a581d22 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6ebd062e0602f0571cf9abbe9eabd0e5f6ad0a39 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 2dcd27b778..7909f23e21 100644
+index c2d580c4a6..43d70c1324 100644
@@ -28,4 +30,4 @@
-@@ -200,6 +200,8 @@ has_sym_args = [
-             'MLX5DV_DR_ACTION_FLAGS_ASO_CT_DIRECTION_INITIATOR' ],
-         [ 'HAVE_MLX5_DR_ALLOW_DUPLICATE', 'infiniband/mlx5dv.h',
-             'mlx5dv_dr_domain_allow_duplicate_rules' ],
+@@ -188,6 +188,8 @@ has_sym_args = [
+ 	[ 'HAVE_DEVLINK', 'linux/devlink.h', 'DEVLINK_GENL_NAME' ],
+         [ 'HAVE_MLX5_DR_CREATE_ACTION_ASO', 'infiniband/mlx5dv.h',
+         'mlx5dv_dr_action_create_aso' ],
@@ -38 +40 @@
-index 037ca961a0..bc6622053f 100644
+index 09fdce1c22..97ac5d3b5e 100644
@@ -65 +67 @@
-@@ -1412,6 +1429,7 @@ const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue) {
+@@ -1389,6 +1406,7 @@ const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue) {
@@ -74 +76 @@
-index f39ef2dac7..4e6d31f263 100644
+index f08c83768c..d48a06d443 100644
@@ -77 +79 @@
-@@ -197,6 +197,9 @@ struct mlx5_glue {
+@@ -196,6 +196,9 @@ struct mlx5_glue {

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'common/mlx5: create wrapped MR' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
  2021-11-28 14:53   ` patch 'common/mlx5: glue MR registration with IOVA' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'vdpa/mlx5: workaround dirty bitmap MR creation' " Xueming Li
                     ` (76 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Matan Azrad; +Cc: Luca Boccassi, Michael Baum, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6108eff3be195b61ffd38e8467839c21e3968804

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6108eff3be195b61ffd38e8467839c21e3968804 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@nvidia.com>
Date: Tue, 9 Nov 2021 14:36:09 +0200
Subject: [PATCH] common/mlx5: create wrapped MR
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 76b5bdf828cfcc3c145960c93dbab322ffe6dd79 ]

The mlx5 PMD uses the kernel mlx5 driver to map physical memory to the
HW.

Using the Verbs API ibv_reg_mr, a mkey can be created for that.
In this case, the mkey is signed on the user ID of the kernel driver.

Using the DevX API, a mkey also can be created, but it should point an
umem object (represents the specific buffer mapping) created by the
kernel. In this case, the mkey is signed on the user ID of the process
DevX context.

In FW DevX control commands which get mkey as a parameter, there is
a security check on the user ID and Verbs mkeys are rejected.

Unfortunately, also when using DevX mkey, there is an error in the FW
command on umem validation because the umem is not designed to be used
for any mkey parameters.

As a workaround to the kernel driver/FW issue, it is needed to use a
wrapped MR, which is an indirect mkey(created by the DevX API) pointing to
direct mkey created by the kernel for any DevX command uses an MR.

Add an API to create and destroy this wrapped MR.

Fixes: 5382d28c2110 ("net/mlx5: accelerate DV flow counter transactions")
Fixes: 9d39e57f21ac ("vdpa/mlx5: support live migration")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Signed-off-by: Matan Azrad <matan@nvidia.com>
---
 drivers/common/mlx5/linux/mlx5_common_os.c | 56 ++++++++++++++++++++++
 drivers/common/mlx5/mlx5_common.h          | 18 +++++++
 drivers/common/mlx5/version.map            |  3 ++
 3 files changed, 77 insertions(+)

diff --git a/drivers/common/mlx5/linux/mlx5_common_os.c b/drivers/common/mlx5/linux/mlx5_common_os.c
index 5cf9576921..96e036fc66 100644
--- a/drivers/common/mlx5/linux/mlx5_common_os.c
+++ b/drivers/common/mlx5/linux/mlx5_common_os.c
@@ -423,3 +423,59 @@ glue_error:
 	mlx5_glue = NULL;
 }
 
+
+/*
+ * Create direct mkey using the kernel ibv_reg_mr API and wrap it with a new
+ * indirect mkey created by the DevX API.
+ * This mkey should be used for DevX commands requesting mkey as a parameter.
+ */
+int
+mlx5_os_wrapped_mkey_create(void *ctx, void *pd, uint32_t pdn, void *addr,
+			    size_t length, struct mlx5_pmd_wrapped_mr *pmd_mr)
+{
+	struct mlx5_klm klm = {
+		.byte_count = length,
+		.address = (uintptr_t)addr,
+	};
+	struct mlx5_devx_mkey_attr mkey_attr = {
+		.pd = pdn,
+		.klm_array = &klm,
+		.klm_num = 1,
+	};
+	struct mlx5_devx_obj *mkey;
+	struct ibv_mr *ibv_mr = mlx5_glue->reg_mr(pd, addr, length,
+						  IBV_ACCESS_LOCAL_WRITE |
+						  (haswell_broadwell_cpu ? 0 :
+						  IBV_ACCESS_RELAXED_ORDERING));
+
+	if (!ibv_mr) {
+		rte_errno = errno;
+		return -rte_errno;
+	}
+	klm.mkey = ibv_mr->lkey;
+	mkey_attr.addr = (uintptr_t)addr;
+	mkey_attr.size = length;
+	mkey = mlx5_devx_cmd_mkey_create(ctx, &mkey_attr);
+	if (!mkey) {
+		claim_zero(mlx5_glue->dereg_mr(ibv_mr));
+		return -rte_errno;
+	}
+	pmd_mr->addr = addr;
+	pmd_mr->len = length;
+	pmd_mr->obj = (void *)ibv_mr;
+	pmd_mr->imkey = mkey;
+	pmd_mr->lkey = mkey->id;
+	return 0;
+}
+
+void
+mlx5_os_wrapped_mkey_destroy(struct mlx5_pmd_wrapped_mr *pmd_mr)
+{
+	if (!pmd_mr)
+		return;
+	if (pmd_mr->imkey)
+		claim_zero(mlx5_devx_cmd_destroy(pmd_mr->imkey));
+	if (pmd_mr->obj)
+		claim_zero(mlx5_glue->dereg_mr(pmd_mr->obj));
+	memset(pmd_mr, 0, sizeof(*pmd_mr));
+}
diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h
index 4c75addd08..86d690af09 100644
--- a/drivers/common/mlx5/mlx5_common.h
+++ b/drivers/common/mlx5/mlx5_common.h
@@ -270,4 +270,22 @@ extern uint8_t haswell_broadwell_cpu;
 __rte_internal
 void mlx5_common_init(void);
 
+/* mlx5 PMD wrapped MR struct. */
+struct mlx5_pmd_wrapped_mr {
+	uint32_t	     lkey;
+	void		     *addr;
+	size_t		     len;
+	void		     *obj; /* verbs mr object or devx umem object. */
+	void		     *imkey; /* DevX indirect mkey object. */
+};
+
+__rte_internal
+int
+mlx5_os_wrapped_mkey_create(void *ctx, void *pd, uint32_t pdn, void *addr,
+			    size_t length, struct mlx5_pmd_wrapped_mr *pmd_mr);
+
+__rte_internal
+void
+mlx5_os_wrapped_mkey_destroy(struct mlx5_pmd_wrapped_mr *pmd_mr);
+
 #endif /* RTE_PMD_MLX5_COMMON_H_ */
diff --git a/drivers/common/mlx5/version.map b/drivers/common/mlx5/version.map
index 02aedbc431..983714a82c 100644
--- a/drivers/common/mlx5/version.map
+++ b/drivers/common/mlx5/version.map
@@ -89,6 +89,9 @@ INTERNAL {
 	mlx5_nl_vlan_vmwa_create;
 	mlx5_nl_vlan_vmwa_delete;
 
+	mlx5_os_wrapped_mkey_create;
+	mlx5_os_wrapped_mkey_destroy;
+
 	mlx5_release_dbr;
 
 	mlx5_translate_port_name;
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:03.683867000 +0800
+++ 0002-common-mlx5-create-wrapped-MR.patch	2021-11-28 22:41:03.183543455 +0800
@@ -1 +1 @@
-From 76b5bdf828cfcc3c145960c93dbab322ffe6dd79 Mon Sep 17 00:00:00 2001
+From 6108eff3be195b61ffd38e8467839c21e3968804 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 76b5bdf828cfcc3c145960c93dbab322ffe6dd79 ]
@@ -32 +34,0 @@
-Cc: stable@dpdk.org
@@ -37,5 +39,4 @@
- drivers/common/mlx5/linux/mlx5_common_os.c   | 56 ++++++++++++++++++++
- drivers/common/mlx5/mlx5_common.h            | 18 +++++++
- drivers/common/mlx5/version.map              |  3 ++
- drivers/common/mlx5/windows/mlx5_common_os.c | 39 ++++++++++++++
- 4 files changed, 116 insertions(+)
+ drivers/common/mlx5/linux/mlx5_common_os.c | 56 ++++++++++++++++++++++
+ drivers/common/mlx5/mlx5_common.h          | 18 +++++++
+ drivers/common/mlx5/version.map            |  3 ++
+ 3 files changed, 77 insertions(+)
@@ -44 +45 @@
-index b516564b79..0d3e24e04e 100644
+index 5cf9576921..96e036fc66 100644
@@ -47,3 +48,2 @@
-@@ -744,3 +744,59 @@ mlx5_get_device_guid(const struct rte_pci_addr *dev, uint8_t *guid, size_t len)
- 	fclose(id_file);
- 	return ret;
+@@ -423,3 +423,59 @@ glue_error:
+ 	mlx5_glue = NULL;
@@ -50,0 +51 @@
+ 
@@ -108 +109 @@
-index 661d3ab235..e8809844af 100644
+index 4c75addd08..86d690af09 100644
@@ -111,3 +112,3 @@
-@@ -509,4 +509,22 @@ mlx5_devx_uar_release(struct mlx5_uar *uar);
- int mlx5_os_open_device(struct mlx5_common_device *cdev, uint32_t classes);
- int mlx5_os_pd_create(struct mlx5_common_device *cdev);
+@@ -270,4 +270,22 @@ extern uint8_t haswell_broadwell_cpu;
+ __rte_internal
+ void mlx5_common_init(void);
@@ -135 +136 @@
-index 2335edf39d..8a62dc2782 100644
+index 02aedbc431..983714a82c 100644
@@ -138,3 +139,3 @@
-@@ -134,6 +134,9 @@ INTERNAL {
- 	mlx5_os_umem_dereg;
- 	mlx5_os_umem_reg;
+@@ -89,6 +89,9 @@ INTERNAL {
+ 	mlx5_nl_vlan_vmwa_create;
+ 	mlx5_nl_vlan_vmwa_delete;
@@ -145 +146 @@
- 	mlx5_realloc;
+ 	mlx5_release_dbr;
@@ -147,48 +148 @@
- 	mlx5_translate_port_name; # WINDOWS_NO_EXPORT
-diff --git a/drivers/common/mlx5/windows/mlx5_common_os.c b/drivers/common/mlx5/windows/mlx5_common_os.c
-index ea478d7395..5fb45d12ea 100644
---- a/drivers/common/mlx5/windows/mlx5_common_os.c
-+++ b/drivers/common/mlx5/windows/mlx5_common_os.c
-@@ -390,3 +390,42 @@ mlx5_os_set_reg_mr_cb(mlx5_reg_mr_t *reg_mr_cb, mlx5_dereg_mr_t *dereg_mr_cb)
- 	*reg_mr_cb = mlx5_os_reg_mr;
- 	*dereg_mr_cb = mlx5_os_dereg_mr;
- }
-+
-+/*
-+ * In Windows, no need to wrap the MR, no known issue for it in kernel.
-+ * Use the regular function to create direct MR.
-+ */
-+int
-+mlx5_os_wrapped_mkey_create(void *ctx, void *pd, uint32_t pdn, void *addr,
-+			    size_t length, struct mlx5_pmd_wrapped_mr *wpmd_mr)
-+{
-+	struct mlx5_pmd_mr pmd_mr = {0};
-+	int ret = mlx5_os_reg_mr(pd, addr, length, &pmd_mr);
-+
-+	(void)pdn;
-+	(void)ctx;
-+	if (ret != 0)
-+		return -1;
-+	wpmd_mr->addr = addr;
-+	wpmd_mr->len = length;
-+	wpmd_mr->obj = pmd_mr.obj;
-+	wpmd_mr->imkey = pmd_mr.mkey;
-+	wpmd_mr->lkey = pmd_mr.mkey->id;
-+	return 0;
-+}
-+
-+void
-+mlx5_os_wrapped_mkey_destroy(struct mlx5_pmd_wrapped_mr *wpmd_mr)
-+{
-+	struct mlx5_pmd_mr pmd_mr;
-+
-+	if (!wpmd_mr)
-+		return;
-+	pmd_mr.addr = wpmd_mr->addr;
-+	pmd_mr.len = wpmd_mr->len;
-+	pmd_mr.obj = wpmd_mr->obj;
-+	pmd_mr.mkey = wpmd_mr->imkey;
-+	pmd_mr.lkey = wpmd_mr->lkey;
-+	mlx5_os_dereg_mr(&pmd_mr);
-+	memset(wpmd_mr, 0, sizeof(*wpmd_mr));
-+}
+ 	mlx5_translate_port_name;

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'vdpa/mlx5: workaround dirty bitmap MR creation' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
  2021-11-28 14:53   ` patch 'common/mlx5: glue MR registration with IOVA' " Xueming Li
  2021-11-28 14:53   ` patch 'common/mlx5: create wrapped MR' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'vdpa/mlx5: workaround guest MR registrations' " Xueming Li
                     ` (75 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Matan Azrad; +Cc: Luca Boccassi, Michael Baum, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4f691f2c97079a5fe264c85d226a46a08e691cb7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4f691f2c97079a5fe264c85d226a46a08e691cb7 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@nvidia.com>
Date: Tue, 9 Nov 2021 14:36:10 +0200
Subject: [PATCH] vdpa/mlx5: workaround dirty bitmap MR creation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 398ea8450c535a1385c7767d6c60c94e8f1c4c25 ]

Due to kernel driver/FW issues in direct MKEY creation using the DevX
API, this patch replaces the dirty bitmap MR creation to use wrapped
mkey instead.

Fixes: 9d39e57f21ac ("vdpa/mlx5: support live migration")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Signed-off-by: Matan Azrad <matan@nvidia.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa.h     |  1 +
 drivers/vdpa/mlx5/mlx5_vdpa_lm.c  | 42 ++++++-------------------------
 drivers/vdpa/mlx5/mlx5_vdpa_mem.c |  2 ++
 3 files changed, 11 insertions(+), 34 deletions(-)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.h b/drivers/vdpa/mlx5/mlx5_vdpa.h
index fefc7cfdad..954fd1e86a 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.h
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.h
@@ -160,6 +160,7 @@ struct mlx5_vdpa_priv {
 	struct mlx5_vdpa_steer steer;
 	struct mlx5dv_var *var;
 	void *virtq_db_addr;
+	struct mlx5_pmd_wrapped_mr lm_mr;
 	SLIST_HEAD(mr_list, mlx5_vdpa_query_mr) mr_list;
 	struct mlx5_vdpa_virtq virtqs[];
 };
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_lm.c b/drivers/vdpa/mlx5/mlx5_vdpa_lm.c
index 6c4284f7f7..49d74a7e99 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_lm.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_lm.c
@@ -36,42 +36,22 @@ int
 mlx5_vdpa_dirty_bitmap_set(struct mlx5_vdpa_priv *priv, uint64_t log_base,
 			   uint64_t log_size)
 {
-	struct mlx5_devx_mkey_attr mkey_attr = {
-			.addr = (uintptr_t)log_base,
-			.size = log_size,
-			.pd = priv->pdn,
-			.pg_access = 1,
-			.klm_array = NULL,
-			.klm_num = 0,
-			.relaxed_ordering_read = 0,
-			.relaxed_ordering_write = 0,
-	};
 	struct mlx5_devx_virtq_attr attr = {
 		.type = MLX5_VIRTQ_MODIFY_TYPE_DIRTY_BITMAP_PARAMS,
 		.dirty_bitmap_addr = log_base,
 		.dirty_bitmap_size = log_size,
 	};
-	struct mlx5_vdpa_query_mr *mr = rte_malloc(__func__, sizeof(*mr), 0);
 	int i;
+	int ret = mlx5_os_wrapped_mkey_create(priv->ctx, priv->pd,
+					      priv->pdn,
+					      (void *)(uintptr_t)log_base,
+					      log_size, &priv->lm_mr);
 
-	if (!mr) {
-		DRV_LOG(ERR, "Failed to allocate mem for lm mr.");
+	if (!ret) {
+		DRV_LOG(ERR, "Failed to allocate wrapped MR for lm.");
 		return -1;
 	}
-	mr->umem = mlx5_glue->devx_umem_reg(priv->ctx,
-					    (void *)(uintptr_t)log_base,
-					    log_size, IBV_ACCESS_LOCAL_WRITE);
-	if (!mr->umem) {
-		DRV_LOG(ERR, "Failed to register umem for lm mr.");
-		goto err;
-	}
-	mkey_attr.umem_id = mr->umem->umem_id;
-	mr->mkey = mlx5_devx_cmd_mkey_create(priv->ctx, &mkey_attr);
-	if (!mr->mkey) {
-		DRV_LOG(ERR, "Failed to create Mkey for lm.");
-		goto err;
-	}
-	attr.dirty_bitmap_mkey = mr->mkey->id;
+	attr.dirty_bitmap_mkey = priv->lm_mr.lkey;
 	for (i = 0; i < priv->nr_virtqs; ++i) {
 		attr.queue_index = i;
 		if (!priv->virtqs[i].virtq) {
@@ -82,15 +62,9 @@ mlx5_vdpa_dirty_bitmap_set(struct mlx5_vdpa_priv *priv, uint64_t log_base,
 			goto err;
 		}
 	}
-	mr->is_indirect = 0;
-	SLIST_INSERT_HEAD(&priv->mr_list, mr, next);
 	return 0;
 err:
-	if (mr->mkey)
-		mlx5_devx_cmd_destroy(mr->mkey);
-	if (mr->umem)
-		mlx5_glue->devx_umem_dereg(mr->umem);
-	rte_free(mr);
+	mlx5_os_wrapped_mkey_destroy(&priv->lm_mr);
 	return -1;
 }
 
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_mem.c b/drivers/vdpa/mlx5/mlx5_vdpa_mem.c
index c5ab652a6b..f36ceabaec 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_mem.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_mem.c
@@ -31,6 +31,8 @@ mlx5_vdpa_mem_dereg(struct mlx5_vdpa_priv *priv)
 		entry = next;
 	}
 	SLIST_INIT(&priv->mr_list);
+	if (priv->lm_mr.addr)
+		mlx5_os_wrapped_mkey_destroy(&priv->lm_mr);
 	if (priv->null_mr) {
 		claim_zero(mlx5_glue->dereg_mr(priv->null_mr));
 		priv->null_mr = NULL;
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:03.727391773 +0800
+++ 0003-vdpa-mlx5-workaround-dirty-bitmap-MR-creation.patch	2021-11-28 22:41:03.183543455 +0800
@@ -1 +1 @@
-From 398ea8450c535a1385c7767d6c60c94e8f1c4c25 Mon Sep 17 00:00:00 2001
+From 4f691f2c97079a5fe264c85d226a46a08e691cb7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 398ea8450c535a1385c7767d6c60c94e8f1c4c25 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
- drivers/vdpa/mlx5/mlx5_vdpa_lm.c  | 38 +++++++------------------------
+ drivers/vdpa/mlx5/mlx5_vdpa_lm.c  | 42 ++++++-------------------------
@@ -19 +21 @@
- 3 files changed, 11 insertions(+), 30 deletions(-)
+ 3 files changed, 11 insertions(+), 34 deletions(-)
@@ -22 +24 @@
-index 62498f87fd..15212a2b30 100644
+index fefc7cfdad..954fd1e86a 100644
@@ -25 +27 @@
-@@ -147,6 +147,7 @@ struct mlx5_vdpa_priv {
+@@ -160,6 +160,7 @@ struct mlx5_vdpa_priv {
@@ -34 +36 @@
-index 3e8d9eb9a2..e65e4faa47 100644
+index 6c4284f7f7..49d74a7e99 100644
@@ -37 +39 @@
-@@ -36,38 +36,22 @@ int
+@@ -36,42 +36,22 @@ int
@@ -44 +46 @@
--			.pd = priv->cdev->pdn,
+-			.pd = priv->pdn,
@@ -45,0 +48,4 @@
+-			.klm_array = NULL,
+-			.klm_num = 0,
+-			.relaxed_ordering_read = 0,
+-			.relaxed_ordering_write = 0,
@@ -54,2 +60,2 @@
-+	int ret = mlx5_os_wrapped_mkey_create(priv->cdev->ctx, priv->cdev->pd,
-+					      priv->cdev->pdn,
++	int ret = mlx5_os_wrapped_mkey_create(priv->ctx, priv->pd,
++					      priv->pdn,
@@ -65 +71 @@
--	mr->umem = mlx5_glue->devx_umem_reg(priv->cdev->ctx,
+-	mr->umem = mlx5_glue->devx_umem_reg(priv->ctx,
@@ -73 +79 @@
--	mr->mkey = mlx5_devx_cmd_mkey_create(priv->cdev->ctx, &mkey_attr);
+-	mr->mkey = mlx5_devx_cmd_mkey_create(priv->ctx, &mkey_attr);
@@ -83 +89 @@
-@@ -78,15 +62,9 @@ mlx5_vdpa_dirty_bitmap_set(struct mlx5_vdpa_priv *priv, uint64_t log_base,
+@@ -82,15 +62,9 @@ mlx5_vdpa_dirty_bitmap_set(struct mlx5_vdpa_priv *priv, uint64_t log_base,
@@ -101 +107 @@
-index f551a094cd..d7707bbd91 100644
+index c5ab652a6b..f36ceabaec 100644

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'vdpa/mlx5: workaround guest MR registrations' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (2 preceding siblings ...)
  2021-11-28 14:53   ` patch 'vdpa/mlx5: workaround dirty bitmap MR creation' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/mlx5: workaround MR creation for flow counter' " Xueming Li
                     ` (74 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Michael Baum; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2e7f6f9336fe91e94e06274f6cf00410c1a8f55f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2e7f6f9336fe91e94e06274f6cf00410c1a8f55f Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Tue, 9 Nov 2021 14:36:11 +0200
Subject: [PATCH] vdpa/mlx5: workaround guest MR registrations
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 04b4e4cbc0352c6323f459d501d7bc0d82b2f1aa ]

Due to kernel issue in direct MKEY creation using the DevX API, this
patch replaces the virtio MR creation to use Verbs API.

Fixes: cc07a42da250 ("vdpa/mlx5: prepare memory regions")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Signed-off-by: Matan Azrad <matan@nvidia.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa.h     |  8 +++----
 drivers/vdpa/mlx5/mlx5_vdpa_mem.c | 40 ++++++++++---------------------
 2 files changed, 16 insertions(+), 32 deletions(-)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.h b/drivers/vdpa/mlx5/mlx5_vdpa.h
index 954fd1e86a..0ffe16e295 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.h
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.h
@@ -67,10 +67,10 @@ struct mlx5_vdpa_event_qp {
 
 struct mlx5_vdpa_query_mr {
 	SLIST_ENTRY(mlx5_vdpa_query_mr) next;
-	void *addr;
-	uint64_t length;
-	struct mlx5dv_devx_umem *umem;
-	struct mlx5_devx_obj *mkey;
+	union {
+		struct ibv_mr *mr;
+		struct mlx5_devx_obj *mkey;
+	};
 	int is_indirect;
 };
 
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_mem.c b/drivers/vdpa/mlx5/mlx5_vdpa_mem.c
index f36ceabaec..97a5f1c1ea 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_mem.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_mem.c
@@ -23,9 +23,10 @@ mlx5_vdpa_mem_dereg(struct mlx5_vdpa_priv *priv)
 	entry = SLIST_FIRST(&priv->mr_list);
 	while (entry) {
 		next = SLIST_NEXT(entry, next);
-		claim_zero(mlx5_devx_cmd_destroy(entry->mkey));
-		if (!entry->is_indirect)
-			claim_zero(mlx5_glue->devx_umem_dereg(entry->umem));
+		if (entry->is_indirect)
+			claim_zero(mlx5_devx_cmd_destroy(entry->mkey));
+		else
+			claim_zero(mlx5_glue->dereg_mr(entry->mr));
 		SLIST_REMOVE(&priv->mr_list, entry, mlx5_vdpa_query_mr, next);
 		rte_free(entry);
 		entry = next;
@@ -210,31 +211,18 @@ mlx5_vdpa_mem_register(struct mlx5_vdpa_priv *priv)
 			DRV_LOG(ERR, "Failed to allocate mem entry memory.");
 			goto error;
 		}
-		entry->umem = mlx5_glue->devx_umem_reg(priv->ctx,
-					 (void *)(uintptr_t)reg->host_user_addr,
-					     reg->size, IBV_ACCESS_LOCAL_WRITE);
-		if (!entry->umem) {
-			DRV_LOG(ERR, "Failed to register Umem by Devx.");
-			ret = -errno;
-			goto error;
-		}
-		mkey_attr.addr = (uintptr_t)(reg->guest_phys_addr);
-		mkey_attr.size = reg->size;
-		mkey_attr.umem_id = entry->umem->umem_id;
-		mkey_attr.pd = priv->pdn;
-		mkey_attr.pg_access = 1;
-		mkey_attr.klm_array = NULL;
-		mkey_attr.klm_num = 0;
+		entry->mr = mlx5_glue->reg_mr_iova(priv->pd,
+				       (void *)(uintptr_t)(reg->host_user_addr),
+				       reg->size, reg->guest_phys_addr,
+				       IBV_ACCESS_LOCAL_WRITE);
+		if (!entry->mr) {
 		mkey_attr.relaxed_ordering_read = 0;
 		mkey_attr.relaxed_ordering_write = 0;
 		entry->mkey = mlx5_devx_cmd_mkey_create(priv->ctx, &mkey_attr);
-		if (!entry->mkey) {
 			DRV_LOG(ERR, "Failed to create direct Mkey.");
 			ret = -rte_errno;
 			goto error;
 		}
-		entry->addr = (void *)(uintptr_t)(reg->host_user_addr);
-		entry->length = reg->size;
 		entry->is_indirect = 0;
 		if (i > 0) {
 			uint64_t sadd;
@@ -264,12 +252,13 @@ mlx5_vdpa_mem_register(struct mlx5_vdpa_priv *priv)
 		for (k = 0; k < reg->size; k += klm_size) {
 			klm_array[klm_index].byte_count = k + klm_size >
 					   reg->size ? reg->size - k : klm_size;
-			klm_array[klm_index].mkey = entry->mkey->id;
+			klm_array[klm_index].mkey = entry->mr->lkey;
 			klm_array[klm_index].address = reg->guest_phys_addr + k;
 			klm_index++;
 		}
 		SLIST_INSERT_HEAD(&priv->mr_list, entry, next);
 	}
+	memset(&mkey_attr, 0, sizeof(mkey_attr));
 	mkey_attr.addr = (uintptr_t)(mem->regions[0].guest_phys_addr);
 	mkey_attr.size = mem_size;
 	mkey_attr.pd = priv->pdn;
@@ -297,13 +286,8 @@ mlx5_vdpa_mem_register(struct mlx5_vdpa_priv *priv)
 	priv->gpa_mkey_index = entry->mkey->id;
 	return 0;
 error:
-	if (entry) {
-		if (entry->mkey)
-			mlx5_devx_cmd_destroy(entry->mkey);
-		if (entry->umem)
-			mlx5_glue->devx_umem_dereg(entry->umem);
+	if (entry)
 		rte_free(entry);
-	}
 	mlx5_vdpa_mem_dereg(priv);
 	rte_errno = -ret;
 	return ret;
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:03.769042316 +0800
+++ 0004-vdpa-mlx5-workaround-guest-MR-registrations.patch	2021-11-28 22:41:03.186876727 +0800
@@ -1 +1 @@
-From 04b4e4cbc0352c6323f459d501d7bc0d82b2f1aa Mon Sep 17 00:00:00 2001
+From 2e7f6f9336fe91e94e06274f6cf00410c1a8f55f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 04b4e4cbc0352c6323f459d501d7bc0d82b2f1aa ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -15,3 +17,3 @@
- drivers/vdpa/mlx5/mlx5_vdpa.h     |  8 +++---
- drivers/vdpa/mlx5/mlx5_vdpa_mem.c | 41 +++++++++----------------------
- 2 files changed, 16 insertions(+), 33 deletions(-)
+ drivers/vdpa/mlx5/mlx5_vdpa.h     |  8 +++----
+ drivers/vdpa/mlx5/mlx5_vdpa_mem.c | 40 ++++++++++---------------------
+ 2 files changed, 16 insertions(+), 32 deletions(-)
@@ -20 +22 @@
-index 15212a2b30..22617924ea 100644
+index 954fd1e86a..0ffe16e295 100644
@@ -23 +25 @@
-@@ -59,10 +59,10 @@ struct mlx5_vdpa_event_qp {
+@@ -67,10 +67,10 @@ struct mlx5_vdpa_event_qp {
@@ -39 +41 @@
-index d7707bbd91..b1b9053bff 100644
+index f36ceabaec..97a5f1c1ea 100644
@@ -56,9 +58 @@
-@@ -202,7 +203,6 @@ mlx5_vdpa_mem_register(struct mlx5_vdpa_priv *priv)
- 		goto error;
- 	}
- 	DRV_LOG(DEBUG, "Dump fill Mkey = %u.", priv->null_mr->lkey);
--	memset(&mkey_attr, 0, sizeof(mkey_attr));
- 	for (i = 0; i < mem->nregions; i++) {
- 		reg = &mem->regions[i];
- 		entry = rte_zmalloc(__func__, sizeof(*entry), 0);
-@@ -211,28 +211,15 @@ mlx5_vdpa_mem_register(struct mlx5_vdpa_priv *priv)
+@@ -210,31 +211,18 @@ mlx5_vdpa_mem_register(struct mlx5_vdpa_priv *priv)
@@ -68 +62 @@
--		entry->umem = mlx5_glue->devx_umem_reg(priv->cdev->ctx,
+-		entry->umem = mlx5_glue->devx_umem_reg(priv->ctx,
@@ -79 +73 @@
--		mkey_attr.pd = priv->cdev->pdn;
+-		mkey_attr.pd = priv->pdn;
@@ -81,4 +75,3 @@
--		entry->mkey = mlx5_devx_cmd_mkey_create(priv->cdev->ctx,
--							&mkey_attr);
--		if (!entry->mkey) {
-+		entry->mr = mlx5_glue->reg_mr_iova(priv->cdev->pd,
+-		mkey_attr.klm_array = NULL;
+-		mkey_attr.klm_num = 0;
++		entry->mr = mlx5_glue->reg_mr_iova(priv->pd,
@@ -88,0 +82,4 @@
+ 		mkey_attr.relaxed_ordering_read = 0;
+ 		mkey_attr.relaxed_ordering_write = 0;
+ 		entry->mkey = mlx5_devx_cmd_mkey_create(priv->ctx, &mkey_attr);
+-		if (!entry->mkey) {
@@ -98 +95 @@
-@@ -262,12 +249,13 @@ mlx5_vdpa_mem_register(struct mlx5_vdpa_priv *priv)
+@@ -264,12 +252,13 @@ mlx5_vdpa_mem_register(struct mlx5_vdpa_priv *priv)
@@ -112,2 +109,2 @@
- 	mkey_attr.pd = priv->cdev->pdn;
-@@ -295,13 +283,8 @@ mlx5_vdpa_mem_register(struct mlx5_vdpa_priv *priv)
+ 	mkey_attr.pd = priv->pdn;
+@@ -297,13 +286,8 @@ mlx5_vdpa_mem_register(struct mlx5_vdpa_priv *priv)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx5: workaround MR creation for flow counter' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (3 preceding siblings ...)
  2021-11-28 14:53   ` patch 'vdpa/mlx5: workaround guest MR registrations' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'power: fix build with clang 13' " Xueming Li
                     ` (73 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Michael Baum; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3088dda469407fe71c930a41a78f06582b509bdd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3088dda469407fe71c930a41a78f06582b509bdd Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Tue, 9 Nov 2021 14:36:12 +0200
Subject: [PATCH] net/mlx5: workaround MR creation for flow counter
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8451e165b8b2f0503922b03c27a754d646a4e5b4 ]

Due to kernel driver / FW issues in direct MKEY creation using the DevX
API, this patch replaces the counter MR creation to use wrapped mkey
API.

Fixes: 5382d28c2110 ("net/mlx5: accelerate DV flow counter transactions")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Signed-off-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 10 ----------
 drivers/net/mlx5/mlx5.c          |  3 +--
 drivers/net/mlx5/mlx5.h          |  5 +----
 drivers/net/mlx5/mlx5_flow.c     | 28 ++++++----------------------
 4 files changed, 8 insertions(+), 38 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index e4bb26bc2b..3128fb3e5e 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1184,16 +1184,6 @@ err_secondary:
 			err = -err;
 			goto error;
 		}
-		/* Check relax ordering support. */
-		if (!haswell_broadwell_cpu) {
-			sh->cmng.relaxed_ordering_write =
-				config->hca_attr.relaxed_ordering_write;
-			sh->cmng.relaxed_ordering_read =
-				config->hca_attr.relaxed_ordering_read;
-		} else {
-			sh->cmng.relaxed_ordering_read = 0;
-			sh->cmng.relaxed_ordering_write = 0;
-		}
 		sh->rq_ts_format = config->hca_attr.rq_ts_format;
 		sh->sq_ts_format = config->hca_attr.sq_ts_format;
 		sh->qp_ts_format = config->hca_attr.qp_ts_format;
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index d094e9e423..800ca6af0a 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -477,8 +477,7 @@ mlx5_flow_destroy_counter_stat_mem_mng(struct mlx5_counter_stats_mem_mng *mng)
 	uint8_t *mem = (uint8_t *)(uintptr_t)mng->raws[0].data;
 
 	LIST_REMOVE(mng, next);
-	claim_zero(mlx5_devx_cmd_destroy(mng->dm));
-	claim_zero(mlx5_glue->devx_umem_dereg(mng->umem));
+	mlx5_os_wrapped_mkey_destroy(&mng->wm);
 	mlx5_free(mem);
 }
 
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 4b0a97f246..2a040453a6 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -423,8 +423,7 @@ struct mlx5_flow_counter_pool {
 struct mlx5_counter_stats_mem_mng {
 	LIST_ENTRY(mlx5_counter_stats_mem_mng) next;
 	struct mlx5_counter_stats_raw *raws;
-	struct mlx5_devx_obj *dm;
-	void *umem;
+	struct mlx5_pmd_wrapped_mr wm;
 };
 
 /* Raw memory structure for the counter statistics values of a pool. */
@@ -455,8 +454,6 @@ struct mlx5_flow_counter_mng {
 	uint8_t pending_queries;
 	uint16_t pool_index;
 	uint8_t query_thread_on;
-	bool relaxed_ordering_read;
-	bool relaxed_ordering_write;
 	bool counter_fallback; /* Use counter fallback management. */
 	LIST_HEAD(mem_mngs, mlx5_counter_stats_mem_mng) mem_mngs;
 	LIST_HEAD(stat_raws, mlx5_counter_stats_raw) free_stat_raws;
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 5f44af5fa6..49619d95e1 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -6496,7 +6496,6 @@ mlx5_counter_query(struct rte_eth_dev *dev, uint32_t cnt,
 static int
 mlx5_flow_create_counter_stat_mem_mng(struct mlx5_dev_ctx_shared *sh)
 {
-	struct mlx5_devx_mkey_attr mkey_attr;
 	struct mlx5_counter_stats_mem_mng *mem_mng;
 	volatile struct flow_counter_stats *raw_data;
 	int raws_n = MLX5_CNT_CONTAINER_RESIZE + MLX5_MAX_PENDING_QUERIES;
@@ -6506,6 +6505,7 @@ mlx5_flow_create_counter_stat_mem_mng(struct mlx5_dev_ctx_shared *sh)
 			sizeof(struct mlx5_counter_stats_mem_mng);
 	size_t pgsize = rte_mem_page_size();
 	uint8_t *mem;
+	int ret;
 	int i;
 
 	if (pgsize == (size_t)-1) {
@@ -6520,26 +6520,10 @@ mlx5_flow_create_counter_stat_mem_mng(struct mlx5_dev_ctx_shared *sh)
 	}
 	mem_mng = (struct mlx5_counter_stats_mem_mng *)(mem + size) - 1;
 	size = sizeof(*raw_data) * MLX5_COUNTERS_PER_POOL * raws_n;
-	mem_mng->umem = mlx5_glue->devx_umem_reg(sh->ctx, mem, size,
-						 IBV_ACCESS_LOCAL_WRITE);
-	if (!mem_mng->umem) {
-		rte_errno = errno;
-		mlx5_free(mem);
-		return -rte_errno;
-	}
-	mkey_attr.addr = (uintptr_t)mem;
-	mkey_attr.size = size;
-	mkey_attr.umem_id = mlx5_os_get_umem_id(mem_mng->umem);
-	mkey_attr.pd = sh->pdn;
-	mkey_attr.log_entity_size = 0;
-	mkey_attr.pg_access = 0;
-	mkey_attr.klm_array = NULL;
-	mkey_attr.klm_num = 0;
-	mkey_attr.relaxed_ordering_write = sh->cmng.relaxed_ordering_write;
-	mkey_attr.relaxed_ordering_read = sh->cmng.relaxed_ordering_read;
-	mem_mng->dm = mlx5_devx_cmd_mkey_create(sh->ctx, &mkey_attr);
-	if (!mem_mng->dm) {
-		mlx5_glue->devx_umem_dereg(mem_mng->umem);
+	ret = mlx5_os_wrapped_mkey_create(sh->ctx, sh->pd,
+					  sh->pdn, mem, size,
+					  &mem_mng->wm);
+	if (ret) {
 		rte_errno = errno;
 		mlx5_free(mem);
 		return -rte_errno;
@@ -6658,7 +6642,7 @@ mlx5_flow_query_alarm(void *arg)
 	ret = mlx5_devx_cmd_flow_counter_query(pool->min_dcs, 0,
 					       MLX5_COUNTERS_PER_POOL,
 					       NULL, NULL,
-					       pool->raw_hw->mem_mng->dm->id,
+					       pool->raw_hw->mem_mng->wm.lkey,
 					       (void *)(uintptr_t)
 					       pool->raw_hw->data,
 					       sh->devx_comp,
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:03.810717714 +0800
+++ 0005-net-mlx5-workaround-MR-creation-for-flow-counter.patch	2021-11-28 22:41:03.193543273 +0800
@@ -1 +1 @@
-From 8451e165b8b2f0503922b03c27a754d646a4e5b4 Mon Sep 17 00:00:00 2001
+From 3088dda469407fe71c930a41a78f06582b509bdd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8451e165b8b2f0503922b03c27a754d646a4e5b4 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -16,4 +18,5 @@
- drivers/net/mlx5/mlx5.c      |  8 +-------
- drivers/net/mlx5/mlx5.h      |  5 +----
- drivers/net/mlx5/mlx5_flow.c | 25 ++++++-------------------
- 3 files changed, 8 insertions(+), 30 deletions(-)
+ drivers/net/mlx5/linux/mlx5_os.c | 10 ----------
+ drivers/net/mlx5/mlx5.c          |  3 +--
+ drivers/net/mlx5/mlx5.h          |  5 +----
+ drivers/net/mlx5/mlx5_flow.c     | 28 ++++++----------------------
+ 4 files changed, 8 insertions(+), 38 deletions(-)
@@ -20,0 +24,21 @@
+diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
+index e4bb26bc2b..3128fb3e5e 100644
+--- a/drivers/net/mlx5/linux/mlx5_os.c
++++ b/drivers/net/mlx5/linux/mlx5_os.c
+@@ -1184,16 +1184,6 @@ err_secondary:
+ 			err = -err;
+ 			goto error;
+ 		}
+-		/* Check relax ordering support. */
+-		if (!haswell_broadwell_cpu) {
+-			sh->cmng.relaxed_ordering_write =
+-				config->hca_attr.relaxed_ordering_write;
+-			sh->cmng.relaxed_ordering_read =
+-				config->hca_attr.relaxed_ordering_read;
+-		} else {
+-			sh->cmng.relaxed_ordering_read = 0;
+-			sh->cmng.relaxed_ordering_write = 0;
+-		}
+ 		sh->rq_ts_format = config->hca_attr.rq_ts_format;
+ 		sh->sq_ts_format = config->hca_attr.sq_ts_format;
+ 		sh->qp_ts_format = config->hca_attr.qp_ts_format;
@@ -22 +46 @@
-index f5990dd757..2a3efb3588 100644
+index d094e9e423..800ca6af0a 100644
@@ -25,20 +49 @@
-@@ -522,7 +522,6 @@ mlx5_flow_aging_init(struct mlx5_dev_ctx_shared *sh)
- static void
- mlx5_flow_counters_mng_init(struct mlx5_dev_ctx_shared *sh)
- {
--	struct mlx5_hca_attr *attr = &sh->cdev->config.hca_attr;
- 	int i;
- 
- 	memset(&sh->cmng, 0, sizeof(sh->cmng));
-@@ -535,10 +534,6 @@ mlx5_flow_counters_mng_init(struct mlx5_dev_ctx_shared *sh)
- 		TAILQ_INIT(&sh->cmng.counters[i]);
- 		rte_spinlock_init(&sh->cmng.csl[i]);
- 	}
--	if (sh->devx && !haswell_broadwell_cpu) {
--		sh->cmng.relaxed_ordering_write = attr->relaxed_ordering_write;
--		sh->cmng.relaxed_ordering_read = attr->relaxed_ordering_read;
--	}
- }
- 
- /**
-@@ -553,8 +548,7 @@ mlx5_flow_destroy_counter_stat_mem_mng(struct mlx5_counter_stats_mem_mng *mng)
+@@ -477,8 +477,7 @@ mlx5_flow_destroy_counter_stat_mem_mng(struct mlx5_counter_stats_mem_mng *mng)
@@ -49 +54 @@
--	claim_zero(mlx5_os_umem_dereg(mng->umem));
+-	claim_zero(mlx5_glue->devx_umem_dereg(mng->umem));
@@ -55 +60 @@
-index c2a13b6de4..bdadd6e024 100644
+index 4b0a97f246..2a040453a6 100644
@@ -58 +63 @@
-@@ -462,8 +462,7 @@ struct mlx5_flow_counter_pool {
+@@ -423,8 +423,7 @@ struct mlx5_flow_counter_pool {
@@ -68 +73 @@
-@@ -494,8 +493,6 @@ struct mlx5_flow_counter_mng {
+@@ -455,8 +454,6 @@ struct mlx5_flow_counter_mng {
@@ -78 +83 @@
-index 2f30a35525..40625688b0 100644
+index 5f44af5fa6..49619d95e1 100644
@@ -81 +86 @@
-@@ -7775,7 +7775,6 @@ mlx5_counter_query(struct rte_eth_dev *dev, uint32_t cnt,
+@@ -6496,7 +6496,6 @@ mlx5_counter_query(struct rte_eth_dev *dev, uint32_t cnt,
@@ -89 +94 @@
-@@ -7785,6 +7784,7 @@ mlx5_flow_create_counter_stat_mem_mng(struct mlx5_dev_ctx_shared *sh)
+@@ -6506,6 +6505,7 @@ mlx5_flow_create_counter_stat_mem_mng(struct mlx5_dev_ctx_shared *sh)
@@ -97 +102 @@
-@@ -7799,23 +7799,10 @@ mlx5_flow_create_counter_stat_mem_mng(struct mlx5_dev_ctx_shared *sh)
+@@ -6520,26 +6520,10 @@ mlx5_flow_create_counter_stat_mem_mng(struct mlx5_dev_ctx_shared *sh)
@@ -101 +106 @@
--	mem_mng->umem = mlx5_os_umem_reg(sh->cdev->ctx, mem, size,
+-	mem_mng->umem = mlx5_glue->devx_umem_reg(sh->ctx, mem, size,
@@ -108 +112,0 @@
--	memset(&mkey_attr, 0, sizeof(mkey_attr));
@@ -112 +116,5 @@
--	mkey_attr.pd = sh->cdev->pdn;
+-	mkey_attr.pd = sh->pdn;
+-	mkey_attr.log_entity_size = 0;
+-	mkey_attr.pg_access = 0;
+-	mkey_attr.klm_array = NULL;
+-	mkey_attr.klm_num = 0;
@@ -115 +123 @@
--	mem_mng->dm = mlx5_devx_cmd_mkey_create(sh->cdev->ctx, &mkey_attr);
+-	mem_mng->dm = mlx5_devx_cmd_mkey_create(sh->ctx, &mkey_attr);
@@ -117,3 +125,3 @@
--		mlx5_os_umem_dereg(mem_mng->umem);
-+	ret = mlx5_os_wrapped_mkey_create(sh->cdev->ctx, sh->cdev->pd,
-+					  sh->cdev->pdn, mem, size,
+-		mlx5_glue->devx_umem_dereg(mem_mng->umem);
++	ret = mlx5_os_wrapped_mkey_create(sh->ctx, sh->pd,
++					  sh->pdn, mem, size,
@@ -125 +133 @@
-@@ -7934,7 +7921,7 @@ mlx5_flow_query_alarm(void *arg)
+@@ -6658,7 +6642,7 @@ mlx5_flow_query_alarm(void *arg)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'power: fix build with clang 13' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (4 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/mlx5: workaround MR creation for flow counter' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/mlx5: fix tunnel offload validation' " Xueming Li
                     ` (72 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Jim Harris; +Cc: Luca Boccassi, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/180fa49727dfbf755c1dc76231892204a4f0ae69

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 180fa49727dfbf755c1dc76231892204a4f0ae69 Mon Sep 17 00:00:00 2001
From: Jim Harris <james.r.harris@intel.com>
Date: Fri, 5 Nov 2021 15:53:51 +0000
Subject: [PATCH] power: fix build with clang 13
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0353121c33846c40ff2e2282448f324c93d3ce9d ]

clang-13 rightfully complains that the tot_ppi variable in update_stats
is set but not used, since the final accumulated tot_ppi results isn't
used anywhere.

Fixes: 450f0791312c ("power: add traffic pattern aware power control")

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_power/rte_power_empty_poll.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/librte_power/rte_power_empty_poll.c b/lib/librte_power/rte_power_empty_poll.c
index 975aa92997..8a2d60c576 100644
--- a/lib/librte_power/rte_power_empty_poll.c
+++ b/lib/librte_power/rte_power_empty_poll.c
@@ -207,7 +207,7 @@ update_training_stats(struct priority_worker *poll_stats,
 static __rte_always_inline uint32_t
 update_stats(struct priority_worker *poll_stats)
 {
-	uint64_t tot_edpi = 0, tot_ppi = 0;
+	uint64_t tot_edpi = 0;
 	uint32_t j, percent;
 
 	struct priority_worker *s = poll_stats;
@@ -237,7 +237,6 @@ update_stats(struct priority_worker *poll_stats)
 
 	for (j = 0; j < BINS_AV; j++) {
 		tot_edpi += s->edpi_av[j];
-		tot_ppi += s->ppi_av[j];
 	}
 
 	tot_edpi = tot_edpi / BINS_AV;
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:03.862179661 +0800
+++ 0006-power-fix-build-with-clang-13.patch	2021-11-28 22:41:03.193543273 +0800
@@ -1 +1 @@
-From 0353121c33846c40ff2e2282448f324c93d3ce9d Mon Sep 17 00:00:00 2001
+From 180fa49727dfbf755c1dc76231892204a4f0ae69 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0353121c33846c40ff2e2282448f324c93d3ce9d ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- lib/power/rte_power_empty_poll.c | 3 +--
+ lib/librte_power/rte_power_empty_poll.c | 3 +--
@@ -19 +21 @@
-diff --git a/lib/power/rte_power_empty_poll.c b/lib/power/rte_power_empty_poll.c
+diff --git a/lib/librte_power/rte_power_empty_poll.c b/lib/librte_power/rte_power_empty_poll.c
@@ -21,2 +23,2 @@
---- a/lib/power/rte_power_empty_poll.c
-+++ b/lib/power/rte_power_empty_poll.c
+--- a/lib/librte_power/rte_power_empty_poll.c
++++ b/lib/librte_power/rte_power_empty_poll.c

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx5: fix tunnel offload validation' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (5 preceding siblings ...)
  2021-11-28 14:53   ` patch 'power: fix build with clang 13' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/mlx5: fix tag ID conflict with sample action' " Xueming Li
                     ` (71 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5744208d62383b276d955922ad6fb5783ad9451e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5744208d62383b276d955922ad6fb5783ad9451e Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Wed, 3 Nov 2021 10:55:56 +0200
Subject: [PATCH] net/mlx5: fix tunnel offload validation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit aaa6a7ec0f3e19388f1262b7af298e6668d401cf ]

Tunnel offload API allows the application to restore packet to
its original form if the chain of flows is missed after DECAP action.

MLX5 PMD provides tunnel offload support only if DV API was enabled.

The patch verifies DV availability before processing with
tunnel offload tasks.

Fixes: 4ec6360de37d ("net/mlx5: implement tunnel offload")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c    | 54 +++++++++++++++------------------
 drivers/net/mlx5/mlx5_flow_dv.c |  5 +++
 2 files changed, 30 insertions(+), 29 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 49619d95e1..1fa361b318 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -7736,33 +7736,37 @@ err:
 	return err;
 }
 
-static inline bool
+static inline int
 mlx5_flow_tunnel_validate(struct rte_eth_dev *dev,
 			  struct rte_flow_tunnel *tunnel,
-			  const char *err_msg)
+			  struct rte_flow_error *error)
 {
-	err_msg = NULL;
-	if (!is_tunnel_offload_active(dev)) {
-		err_msg = "tunnel offload was not activated";
-		goto out;
-	} else if (!tunnel) {
-		err_msg = "no application tunnel";
-		goto out;
-	}
+	struct mlx5_priv *priv = dev->data->dev_private;
 
+	if (!priv->config.dv_flow_en)
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, NULL,
+					  "flow DV interface is off");
+	if (!is_tunnel_offload_active(dev))
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, NULL,
+					  "tunnel offload was not activated");
+	if (!tunnel)
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, NULL,
+					  "no application tunnel");
 	switch (tunnel->type) {
 	default:
-		err_msg = "unsupported tunnel type";
-		goto out;
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, NULL,
+					  "unsupported tunnel type");
 	case RTE_FLOW_ITEM_TYPE_VXLAN:
 	case RTE_FLOW_ITEM_TYPE_GRE:
 	case RTE_FLOW_ITEM_TYPE_NVGRE:
 	case RTE_FLOW_ITEM_TYPE_GENEVE:
 		break;
 	}
-
-out:
-	return !err_msg;
+	return 0;
 }
 
 static int
@@ -7772,15 +7776,11 @@ mlx5_flow_tunnel_decap_set(struct rte_eth_dev *dev,
 		    uint32_t *num_of_actions,
 		    struct rte_flow_error *error)
 {
-	int ret;
 	struct mlx5_flow_tunnel *tunnel;
-	const char *err_msg = NULL;
-	bool verdict = mlx5_flow_tunnel_validate(dev, app_tunnel, err_msg);
+	int ret = mlx5_flow_tunnel_validate(dev, app_tunnel, error);
 
-	if (!verdict)
-		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, NULL,
-					  err_msg);
+	if (ret)
+		return ret;
 	ret = mlx5_get_flow_tunnel(dev, app_tunnel, &tunnel);
 	if (ret < 0) {
 		return rte_flow_error_set(error, ret,
@@ -7799,15 +7799,11 @@ mlx5_flow_tunnel_match(struct rte_eth_dev *dev,
 		       uint32_t *num_of_items,
 		       struct rte_flow_error *error)
 {
-	int ret;
 	struct mlx5_flow_tunnel *tunnel;
-	const char *err_msg = NULL;
-	bool verdict = mlx5_flow_tunnel_validate(dev, app_tunnel, err_msg);
+	int ret = mlx5_flow_tunnel_validate(dev, app_tunnel, error);
 
-	if (!verdict)
-		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
-					  err_msg);
+	if (ret)
+		return ret;
 	ret = mlx5_get_flow_tunnel(dev, app_tunnel, &tunnel);
 	if (ret < 0) {
 		return rte_flow_error_set(error, ret,
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index e8d4a006d4..37c5a7eb88 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5337,6 +5337,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 	tunnel = is_tunnel_offload_active(dev) ?
 		 mlx5_get_tof(items, actions, &tof_rule_type) : NULL;
 	if (tunnel) {
+		if (!priv->config.dv_flow_en)
+			return rte_flow_error_set
+				(error, ENOTSUP,
+				 RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+				 NULL, "tunnel offload requires DV flow interface");
 		if (priv->representor)
 			return rte_flow_error_set
 				(error, ENOTSUP,
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:03.903624575 +0800
+++ 0007-net-mlx5-fix-tunnel-offload-validation.patch	2021-11-28 22:41:03.206876365 +0800
@@ -1 +1 @@
-From aaa6a7ec0f3e19388f1262b7af298e6668d401cf Mon Sep 17 00:00:00 2001
+From 5744208d62383b276d955922ad6fb5783ad9451e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit aaa6a7ec0f3e19388f1262b7af298e6668d401cf ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 40625688b0..29134b4825 100644
+index 49619d95e1..1fa361b318 100644
@@ -28 +30 @@
-@@ -9489,33 +9489,37 @@ err:
+@@ -7736,33 +7736,37 @@ err:
@@ -81 +83 @@
-@@ -9525,15 +9529,11 @@ mlx5_flow_tunnel_decap_set(struct rte_eth_dev *dev,
+@@ -7772,15 +7776,11 @@ mlx5_flow_tunnel_decap_set(struct rte_eth_dev *dev,
@@ -100 +102 @@
-@@ -9552,15 +9552,11 @@ mlx5_flow_tunnel_match(struct rte_eth_dev *dev,
+@@ -7799,15 +7799,11 @@ mlx5_flow_tunnel_match(struct rte_eth_dev *dev,
@@ -120 +122 @@
-index fa017c5521..8fa7829341 100644
+index e8d4a006d4..37c5a7eb88 100644
@@ -123 +125 @@
-@@ -6871,6 +6871,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -5337,6 +5337,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx5: fix tag ID conflict with sample action' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (6 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/mlx5: fix tunnel offload validation' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/mlx5: fix RETA update without stopping device' " Xueming Li
                     ` (70 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Jiawei Wang; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2a9a0c9d63e2bfcb01b8d16eebb23b60a561a6eb

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2a9a0c9d63e2bfcb01b8d16eebb23b60a561a6eb Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Wed, 3 Nov 2021 15:07:59 +0200
Subject: [PATCH] net/mlx5: fix tag ID conflict with sample action
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a9b6ea45bed6acb2d95c93bc177f9d5cb53275ef ]

For the flows containing sample action, the tag action was added
implicitly to store the unique flow index into metadata register in the
split prefix subflow, and then match on this index in the split suffix
subflow. The metadata register for flow index of sample split subflows
was also used to store application metadata TAG 0 item, this might cause
TAG 0 corruption in the flows with sample actions.

This patch uses the same metadata register C index as used for
ASO action since it's reserved and not used directly by the application,
and adds the checking in validation to make sure not to conflict
with ASO CT in the same flow.

Fixes: b4c0ddbfcc58 ("net/mlx5: split sample flow into two sub-flows")

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 3 ++-
 drivers/net/mlx5/mlx5_flow.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 1fa361b318..b8e11a43f5 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -835,6 +835,7 @@ mlx5_flow_get_reg_id(struct rte_eth_dev *dev,
 			       REG_C_3;
 	case MLX5_MTR_COLOR:
 	case MLX5_ASO_FLOW_HIT: /* Both features use the same REG_C. */
+	case MLX5_SAMPLE_ID:
 		MLX5_ASSERT(priv->mtr_color_reg != REG_NON);
 		return priv->mtr_color_reg;
 	case MLX5_COPY_MARK:
@@ -4656,7 +4657,7 @@ flow_sample_split_prep(struct rte_eth_dev *dev,
 	if (!fdb_tx) {
 		/* Prepare the prefix tag action. */
 		set_tag = (void *)(actions_pre + actions_n + 1);
-		ret = mlx5_flow_get_reg_id(dev, MLX5_APP_TAG, 0, error);
+		ret = mlx5_flow_get_reg_id(dev, MLX5_SAMPLE_ID, 0, error);
 		if (ret < 0)
 			return ret;
 		set_tag->id = ret;
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 56af30c2bb..c7021c2110 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -81,6 +81,7 @@ enum mlx5_feature_name {
 	MLX5_MTR_COLOR,
 	MLX5_MTR_SFX,
 	MLX5_ASO_FLOW_HIT,
+	MLX5_SAMPLE_ID,
 };
 
 /* Default queue number. */
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:03.964883622 +0800
+++ 0008-net-mlx5-fix-tag-ID-conflict-with-sample-action.patch	2021-11-28 22:41:03.213542911 +0800
@@ -1 +1 @@
-From a9b6ea45bed6acb2d95c93bc177f9d5cb53275ef Mon Sep 17 00:00:00 2001
+From 2a9a0c9d63e2bfcb01b8d16eebb23b60a561a6eb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a9b6ea45bed6acb2d95c93bc177f9d5cb53275ef ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -24,4 +26,3 @@
- drivers/net/mlx5/mlx5_flow.c    | 3 ++-
- drivers/net/mlx5/mlx5_flow.h    | 1 +
- drivers/net/mlx5/mlx5_flow_dv.c | 4 ++++
- 3 files changed, 7 insertions(+), 1 deletion(-)
+ drivers/net/mlx5/mlx5_flow.c | 3 ++-
+ drivers/net/mlx5/mlx5_flow.h | 1 +
+ 2 files changed, 3 insertions(+), 1 deletion(-)
@@ -30 +31 @@
-index 29134b4825..f657980737 100644
+index 1fa361b318..b8e11a43f5 100644
@@ -33 +34,2 @@
-@@ -907,6 +907,7 @@ mlx5_flow_get_reg_id(struct rte_eth_dev *dev,
+@@ -835,6 +835,7 @@ mlx5_flow_get_reg_id(struct rte_eth_dev *dev,
+ 			       REG_C_3;
@@ -35,2 +37 @@
- 	case MLX5_ASO_FLOW_HIT:
- 	case MLX5_ASO_CONNTRACK:
+ 	case MLX5_ASO_FLOW_HIT: /* Both features use the same REG_C. */
@@ -38 +38,0 @@
- 		/* All features use the same REG_C. */
@@ -41 +41,3 @@
-@@ -5581,7 +5582,7 @@ flow_sample_split_prep(struct rte_eth_dev *dev,
+ 	case MLX5_COPY_MARK:
+@@ -4656,7 +4657,7 @@ flow_sample_split_prep(struct rte_eth_dev *dev,
+ 	if (!fdb_tx) {
@@ -43,2 +45 @@
- 		append_index++;
- 		set_tag = (void *)(actions_pre + actions_n + append_index);
+ 		set_tag = (void *)(actions_pre + actions_n + 1);
@@ -49 +50 @@
- 		mlx5_ipool_malloc(priv->sh->ipool
+ 		set_tag->id = ret;
@@ -51 +52 @@
-index 4026255ce4..696d294ca5 100644
+index 56af30c2bb..c7021c2110 100644
@@ -54,2 +55,3 @@
-@@ -109,6 +109,7 @@ enum mlx5_feature_name {
- 	MLX5_MTR_ID,
+@@ -81,6 +81,7 @@ enum mlx5_feature_name {
+ 	MLX5_MTR_COLOR,
+ 	MLX5_MTR_SFX,
@@ -57 +58,0 @@
- 	MLX5_ASO_CONNTRACK,
@@ -62,15 +62,0 @@
-diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 8fa7829341..0beaf7b62d 100644
---- a/drivers/net/mlx5/mlx5_flow_dv.c
-+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -5574,6 +5574,10 @@ flow_dv_validate_action_sample(uint64_t *action_flags,
- 					  RTE_FLOW_ERROR_TYPE_ACTION, action,
- 					  "wrong action order, jump should "
- 					  "be after sample action");
-+	if (*action_flags & MLX5_FLOW_ACTION_CT)
-+		return rte_flow_error_set(error, EINVAL,
-+					  RTE_FLOW_ERROR_TYPE_ACTION, action,
-+					  "Sample after CT not supported");
- 	act = sample->actions;
- 	for (; act->type != RTE_FLOW_ACTION_TYPE_END; act++) {
- 		if (actions_n == MLX5_DV_MAX_NUMBER_OF_ACTIONS)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx5: fix RETA update without stopping device' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (7 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/mlx5: fix tag ID conflict with sample action' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'common/mlx5: fix build for zero-length headroom array' " Xueming Li
                     ` (69 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6d132c0f7329b26ce88cdb082bc50ca69d38e8b6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6d132c0f7329b26ce88cdb082bc50ca69d38e8b6 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Fri, 5 Nov 2021 08:10:57 +0200
Subject: [PATCH] net/mlx5: fix RETA update without stopping device
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6b5b3005cb1854e471fa1ef3eb579dbd444c05b0 ]

The global redirection table is used to create the default flow
rules for the ingress traffic with the lowest priority. It is also
used to create the default RSS rule in the destination table when
there is a tunnel offload.

To update the RETA in-flight, there is no restriction in the ethdev
API. In the previous implementation of mlx5, a port restart was
needed to make the new configuration take effect.

The restart is heavy, e.g., all the queues will be released and
reallocated, users' rules will be flushed. Since the restart is
internal, there is a risk to crash the application when some change
in the ethdev is introduced but no workaround is done in mlx5 PMD.

The users' rules, including the default miss rule for tunnel
offload, should not be impacted by the RETA update. It is improper
to flush all rules when updating RETA.

With this patch, only the default rules will be flushed and
re-created with the new table configuration.

Fixes: 3f2fe392bd49 ("net/mlx5: fix crash during RETA update")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rss.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c
index 0aa3b4ed98..c79cfcbba8 100644
--- a/drivers/net/mlx5/mlx5_rss.c
+++ b/drivers/net/mlx5/mlx5_rss.c
@@ -215,12 +215,6 @@ mlx5_dev_rss_reta_update(struct rte_eth_dev *dev,
 		MLX5_ASSERT(reta_conf[idx].reta[pos] < priv->rxqs_n);
 		(*priv->reta_idx)[i] = reta_conf[idx].reta[pos];
 	}
-
 	priv->skip_default_rss_reta = 1;
-
-	if (dev->data->dev_started) {
-		mlx5_dev_stop(dev);
-		return mlx5_dev_start(dev);
-	}
-	return 0;
+	return mlx5_traffic_restart(dev);
 }
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.028075704 +0800
+++ 0009-net-mlx5-fix-RETA-update-without-stopping-device.patch	2021-11-28 22:41:03.213542911 +0800
@@ -1 +1 @@
-From 6b5b3005cb1854e471fa1ef3eb579dbd444c05b0 Mon Sep 17 00:00:00 2001
+From 6d132c0f7329b26ce88cdb082bc50ca69d38e8b6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6b5b3005cb1854e471fa1ef3eb579dbd444c05b0 ]
@@ -28 +30,0 @@
-Cc: stable@dpdk.org
@@ -37 +39 @@
-index 75af05b7b0..e2b478b75c 100644
+index 0aa3b4ed98..c79cfcbba8 100644
@@ -40 +42 @@
-@@ -218,12 +218,6 @@ mlx5_dev_rss_reta_update(struct rte_eth_dev *dev,
+@@ -215,12 +215,6 @@ mlx5_dev_rss_reta_update(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'common/mlx5: fix build for zero-length headroom array' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (8 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/mlx5: fix RETA update without stopping device' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'doc: describe timestamp limitations for mlx5' " Xueming Li
                     ` (68 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Matan Azrad; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7ae03fc171b21609212c6ed69d79e7f5f72a5811

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7ae03fc171b21609212c6ed69d79e7f5f72a5811 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@nvidia.com>
Date: Mon, 8 Nov 2021 14:22:04 +0200
Subject: [PATCH] common/mlx5: fix build for zero-length headroom array
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8594e2a64ffe54b57f06a259d2be694096b8dccb ]

The structure of the striding RQ(MPRQ) buffer includes an array size
defined by the RTE_PKTMBUF_HEADROOM macro added in [1].

When RTE_PKTMBUF_HEADROOM is set to 0 in the compilation config file
the compilation with debug type failed:

"In file included from ../drivers/common/mlx5/mlx5_common.h:25,
                 from ../drivers/common/mlx5/linux/mlx5_nl.h:12,
                 from ../drivers/common/mlx5/linux/mlx5_nl.c:22:
../drivers/common/mlx5/mlx5_common_mr.h:96:10: error: ISO C forbids
                             zero-size array 'pad' [-Werror=pedantic]"

Actually, the array for the first stride headroom is not needed:

Each stride in the striding RQ buffer includes the headroom of the next
stride, so the headroom of the first stride should be allocated before
the starting point of the buffer posted to the HW(HW buffer).

The striding RQ buffer is used as an attached buffer to mbuf and have
shared information per stride.

The LRO support moved all the strides shared information to the top of
the buffer before the first stride headroom but didn't remove the old
memory of this headroom from the buffer.

Remove the old headroom memory from the striding RQ buffer.

[1] commit 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support")

Fixes: 3a22f3877c9d ("net/mlx5: replace external mbuf shared memory")

Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxtx.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 4d043d2015..b2a891c8f6 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -69,7 +69,6 @@ struct rxq_zip {
 struct mlx5_mprq_buf {
 	struct rte_mempool *mp;
 	uint16_t refcnt; /* Atomically accessed refcnt. */
-	uint8_t pad[RTE_PKTMBUF_HEADROOM]; /* Headroom for the first packet. */
 	struct rte_mbuf_ext_shared_info shinfos[];
 	/*
 	 * Shared information per stride.
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.069713835 +0800
+++ 0010-common-mlx5-fix-build-for-zero-length-headroom-array.patch	2021-11-28 22:41:03.216876184 +0800
@@ -1 +1 @@
-From 8594e2a64ffe54b57f06a259d2be694096b8dccb Mon Sep 17 00:00:00 2001
+From 7ae03fc171b21609212c6ed69d79e7f5f72a5811 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8594e2a64ffe54b57f06a259d2be694096b8dccb ]
@@ -36 +38,0 @@
-Cc: stable@dpdk.org
@@ -41 +43 @@
- drivers/common/mlx5/mlx5_common_mr.h | 1 -
+ drivers/net/mlx5/mlx5_rxtx.h | 1 -
@@ -44,5 +46,5 @@
-diff --git a/drivers/common/mlx5/mlx5_common_mr.h b/drivers/common/mlx5/mlx5_common_mr.h
-index 93903d8397..dc7ddc3513 100644
---- a/drivers/common/mlx5/mlx5_common_mr.h
-+++ b/drivers/common/mlx5/mlx5_common_mr.h
-@@ -96,7 +96,6 @@ struct mlx5_mr_share_cache {
+diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
+index 4d043d2015..b2a891c8f6 100644
+--- a/drivers/net/mlx5/mlx5_rxtx.h
++++ b/drivers/net/mlx5/mlx5_rxtx.h
+@@ -69,7 +69,6 @@ struct rxq_zip {

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'doc: describe timestamp limitations for mlx5' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (9 preceding siblings ...)
  2021-11-28 14:53   ` patch 'common/mlx5: fix build for zero-length headroom array' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/i40e: fix risk in descriptor read in scalar Rx' " Xueming Li
                     ` (67 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/fdb91c91e807780d48e50e3f6158f0173f48c28c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fdb91c91e807780d48e50e3f6158f0173f48c28c Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Mon, 8 Nov 2021 18:41:01 +0200
Subject: [PATCH] doc: describe timestamp limitations for mlx5
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1a3709c1f021afbe58db4a27a179127e561fe401 ]

The ConnectX NIC series hardware provides only 63-bit
wide timestamps. The imposed limitations description
added to documentation.

At the moment there are no affected applications known
or bug reports neither, this is just the declaration
of limitation.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 doc/guides/nics/mlx5.rst | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 84e58fc27b..ac3e148b2d 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -338,6 +338,20 @@ Limitations
   - Hairpin between two ports could only manual binding and explicit Tx flow mode. For single port hairpin, all the combinations of auto/manual binding and explicit/implicit Tx flow mode could be supported.
   - Hairpin in switchdev SR-IOV mode is not supported till now.
 
+- Timestamps:
+
+  - CQE timestamp field width is limited by hardware to 63 bits, MSB is zero.
+  - In the free-running mode the timestamp counter is reset on power on
+    and 63-bit value provides over 1800 years of uptime till overflow.
+  - In the real-time mode
+    (configurable with ``REAL_TIME_CLOCK_ENABLE`` firmware settings),
+    the timestamp presents the nanoseconds elapsed since 01-Jan-1970,
+    hardware timestamp overflow will happen on 19-Jan-2038
+    (0x80000000 seconds since 01-Jan-1970).
+  - The send scheduling is based on timestamps
+    from the reference "Clock Queue" completions,
+    the scheduled send timestamps should not be specified with non-zero MSB.
+
 Statistics
 ----------
 
@@ -1035,6 +1049,10 @@ Below are some firmware configurations listed.
    FLEX_PARSER_PROFILE_ENABLE=4
    PROG_PARSE_GRAPH=1
 
+- enable realtime timestamp format::
+
+   REAL_TIME_CLOCK_ENABLE=1
+
 Prerequisites
 -------------
 
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.119783495 +0800
+++ 0011-doc-describe-timestamp-limitations-for-mlx5.patch	2021-11-28 22:41:03.216876184 +0800
@@ -1 +1 @@
-From 1a3709c1f021afbe58db4a27a179127e561fe401 Mon Sep 17 00:00:00 2001
+From fdb91c91e807780d48e50e3f6158f0173f48c28c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1a3709c1f021afbe58db4a27a179127e561fe401 ]
@@ -14,2 +16,0 @@
-Cc: stable@dpdk.org
-
@@ -22 +23 @@
-index d175c2061e..552e06c0db 100644
+index 84e58fc27b..ac3e148b2d 100644
@@ -25,3 +26,3 @@
-@@ -480,6 +480,20 @@ Limitations
- 
-   - Needs OFED 5.4+.
+@@ -338,6 +338,20 @@ Limitations
+   - Hairpin between two ports could only manual binding and explicit Tx flow mode. For single port hairpin, all the combinations of auto/manual binding and explicit/implicit Tx flow mode could be supported.
+   - Hairpin in switchdev SR-IOV mode is not supported till now.
@@ -46 +47 @@
-@@ -1242,6 +1256,10 @@ Below are some firmware configurations listed.
+@@ -1035,6 +1049,10 @@ Below are some firmware configurations listed.
@@ -54,2 +55,2 @@
- Linux Prerequisites
- -------------------
+ Prerequisites
+ -------------

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/i40e: fix risk in descriptor read in scalar Rx' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (10 preceding siblings ...)
  2021-11-28 14:53   ` patch 'doc: describe timestamp limitations for mlx5' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/iavf: fix pointer of meta data' " Xueming Li
                     ` (66 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Luca Boccassi, Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2f5b7df1e4ce4f3c2d1bc5e41408d5df80401fba

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2f5b7df1e4ce4f3c2d1bc5e41408d5df80401fba Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Wed, 15 Sep 2021 16:33:39 +0800
Subject: [PATCH] net/i40e: fix risk in descriptor read in scalar Rx
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c4d3e8fbe485f244391797f7610512de377675e0 ]

Rx descriptor is 16B/32B in size. If the DD bit is set, it indicates
that the rest of the descriptor words have valid values. Hence, the
word containing DD bit must be read first before reading the rest of
the descriptor words.

Since the entire descriptor is not read atomically, on relaxed memory
ordered systems like Aarch64, read of the word containing DD field
could be reordered after read of other words.

Read barrier is inserted between read of the word with DD field
and read of other words. The barrier ensures that the fetched data
is correct.

Testpmd single core test showed no performance drop on x86 or N1SDP.
On ThunderX2, 22% performance regression was observed.

Fixes: 7b0cf70135d1 ("net/i40e: support ARM platform")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 drivers/net/i40e/i40e_rxtx.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 02389905ce..b26bd0640d 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -704,6 +704,12 @@ i40e_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 			break;
 		}
 
+		/**
+		 * Use acquire fence to ensure that qword1 which includes DD
+		 * bit is loaded before loading of other descriptor words.
+		 */
+		rte_atomic_thread_fence(__ATOMIC_ACQUIRE);
+
 		rxd = *rxdp;
 		nb_hold++;
 		rxe = &sw_ring[rx_id];
@@ -820,6 +826,12 @@ i40e_recv_scattered_pkts(void *rx_queue,
 			break;
 		}
 
+		/**
+		 * Use acquire fence to ensure that qword1 which includes DD
+		 * bit is loaded before loading of other descriptor words.
+		 */
+		rte_atomic_thread_fence(__ATOMIC_ACQUIRE);
+
 		rxd = *rxdp;
 		nb_hold++;
 		rxe = &sw_ring[rx_id];
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.164049443 +0800
+++ 0012-net-i40e-fix-risk-in-descriptor-read-in-scalar-Rx.patch	2021-11-28 22:41:03.220209457 +0800
@@ -1 +1 @@
-From c4d3e8fbe485f244391797f7610512de377675e0 Mon Sep 17 00:00:00 2001
+From 2f5b7df1e4ce4f3c2d1bc5e41408d5df80401fba Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c4d3e8fbe485f244391797f7610512de377675e0 ]
@@ -23 +25,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index 41fe3bf481..e4cb33dc3c 100644
+index 02389905ce..b26bd0640d 100644
@@ -35 +37 @@
-@@ -744,6 +744,12 @@ i40e_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -704,6 +704,12 @@ i40e_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
@@ -48 +50 @@
-@@ -860,6 +866,12 @@ i40e_recv_scattered_pkts(void *rx_queue,
+@@ -820,6 +826,12 @@ i40e_recv_scattered_pkts(void *rx_queue,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/iavf: fix pointer of meta data' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (11 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/i40e: fix risk in descriptor read in scalar Rx' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/mlx5: fix Tx scheduling check' " Xueming Li
                     ` (65 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/712ace31c574c287538d606f108ffd7400464214

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 712ace31c574c287538d606f108ffd7400464214 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Thu, 11 Nov 2021 14:31:47 +0800
Subject: [PATCH] net/iavf: fix pointer of meta data
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f96789aeaf1851071f5b2ab532d7687c66e1ee41 ]

This patch fixes coverity issue by directly passing the address
of the meta data to lower function.

Coverity issue: 373867
Fixes: 7be10c3004be ("net/iavf: add RSS configuration for VF")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_hash.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index 72b0117230..eb7fd3f66f 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -901,10 +901,9 @@ iavf_any_invalid_rss_type(enum rte_eth_hash_function rss_func,
 static int
 iavf_hash_parse_action(struct iavf_pattern_match_item *match_item,
 		       const struct rte_flow_action actions[],
-		       uint64_t pattern_hint, void **meta,
+		       uint64_t pattern_hint, struct iavf_rss_meta *rss_meta,
 		       struct rte_flow_error *error)
 {
-	struct iavf_rss_meta *rss_meta = (struct iavf_rss_meta *)*meta;
 	struct virtchnl_proto_hdrs *proto_hdrs;
 	enum rte_flow_action_type action_type;
 	const struct rte_flow_action_rss *rss;
@@ -1018,7 +1017,7 @@ iavf_hash_parse_pattern_action(__rte_unused struct iavf_adapter *ad,
 		goto error;
 
 	ret = iavf_hash_parse_action(pattern_match_item, actions, phint,
-				     (void **)&rss_meta_ptr, error);
+				     rss_meta_ptr, error);
 
 error:
 	if (!ret && meta)
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.209479880 +0800
+++ 0013-net-iavf-fix-pointer-of-meta-data.patch	2021-11-28 22:41:03.220209457 +0800
@@ -1 +1 @@
-From f96789aeaf1851071f5b2ab532d7687c66e1ee41 Mon Sep 17 00:00:00 2001
+From 712ace31c574c287538d606f108ffd7400464214 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f96789aeaf1851071f5b2ab532d7687c66e1ee41 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 55d8a11da3..5e0888ea68 100644
+index 72b0117230..eb7fd3f66f 100644
@@ -23 +25 @@
-@@ -1261,10 +1261,9 @@ iavf_any_invalid_rss_type(enum rte_eth_hash_function rss_func,
+@@ -901,10 +901,9 @@ iavf_any_invalid_rss_type(enum rte_eth_hash_function rss_func,
@@ -35 +37 @@
-@@ -1378,7 +1377,7 @@ iavf_hash_parse_pattern_action(__rte_unused struct iavf_adapter *ad,
+@@ -1018,7 +1017,7 @@ iavf_hash_parse_pattern_action(__rte_unused struct iavf_adapter *ad,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx5: fix Tx scheduling check' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (12 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/iavf: fix pointer of meta data' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'app/testpmd: fix DCB in VT configuration' " Xueming Li
                     ` (64 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/40588e9f6f1f1c5b0f4be0c504bf0f01ddd44359

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 40588e9f6f1f1c5b0f4be0c504bf0f01ddd44359 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 10 Nov 2021 15:05:52 +0200
Subject: [PATCH] net/mlx5: fix Tx scheduling check
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 11cfe349b3f17b11b6dce109f5226e89bc0a5b85 ]

There was a redundant check for the enabled E-Switch, this
resulted in device probing failure if the Tx scheduling was
requested and E-Switch was enabled.

Fixes: f17e4b4ffef9 ("net/mlx5: add Tx scheduling check on queue creation")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 3128fb3e5e..a0ddc90311 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1579,8 +1579,7 @@ err_secondary:
 		priv->obj_ops = ibv_obj_ops;
 	}
 	if (config->tx_pp &&
-	    (priv->config.dv_esw_en ||
-	     priv->obj_ops.txq_obj_new != mlx5_os_txq_obj_new)) {
+	    priv->obj_ops.txq_obj_new != mlx5_os_txq_obj_new) {
 		/*
 		 * HAVE_MLX5DV_DEVX_UAR_OFFSET is required to support
 		 * packet pacing and already checked above.
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.253284827 +0800
+++ 0014-net-mlx5-fix-Tx-scheduling-check.patch	2021-11-28 22:41:03.223542730 +0800
@@ -1 +1 @@
-From 11cfe349b3f17b11b6dce109f5226e89bc0a5b85 Mon Sep 17 00:00:00 2001
+From 40588e9f6f1f1c5b0f4be0c504bf0f01ddd44359 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 11cfe349b3f17b11b6dce109f5226e89bc0a5b85 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index de880ee4c9..c29fe3d92b 100644
+index 3128fb3e5e..a0ddc90311 100644
@@ -22 +24 @@
-@@ -1727,8 +1727,7 @@ err_secondary:
+@@ -1579,8 +1579,7 @@ err_secondary:
@@ -27,2 +29,2 @@
--	     priv->obj_ops.txq_obj_new != mlx5_txq_devx_obj_new)) {
-+	    priv->obj_ops.txq_obj_new != mlx5_txq_devx_obj_new) {
+-	     priv->obj_ops.txq_obj_new != mlx5_os_txq_obj_new)) {
++	    priv->obj_ops.txq_obj_new != mlx5_os_txq_obj_new) {

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'app/testpmd: fix DCB in VT configuration' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (13 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/mlx5: fix Tx scheduling check' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'ethdev: fix typos' " Xueming Li
                     ` (63 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Jie Wang; +Cc: Luca Boccassi, Aman Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5d3a7aab1960e4216e97dca86a24cebcd22685f7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5d3a7aab1960e4216e97dca86a24cebcd22685f7 Mon Sep 17 00:00:00 2001
From: Jie Wang <jie1x.wang@intel.com>
Date: Mon, 15 Nov 2021 11:29:58 +0800
Subject: [PATCH] app/testpmd: fix DCB in VT configuration
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit cbe70fded831acac4ccbde8e11ba33ce8c24227c ]

When set port DCB in VT mode enabled, it should remove RSS HASH
offload before reconfiguring the device and queues.

Because port multi-queue mode is changed from RSS to DCB in VT.

Fixes: 2a977b891f99 ("app/testpmd: fix DCB configuration")

Signed-off-by: Jie Wang <jie1x.wang@intel.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
 app/test-pmd/testpmd.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 35a48e39cc..5af7dea3fe 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3582,6 +3582,13 @@ init_port_dcb_config(portid_t pid,
 	if (retval < 0)
 		return retval;
 	port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_VLAN_FILTER;
+	/* remove RSS HASH offload for DCB in vt mode */
+	if (port_conf.rxmode.mq_mode == ETH_MQ_RX_VMDQ_DCB) {
+		port_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_RSS_HASH;
+		for (i = 0; i < nb_rxq; i++)
+			rte_port->rx_conf[i].offloads &=
+				~DEV_RX_OFFLOAD_RSS_HASH;
+	}
 
 	/* re-configure the device . */
 	retval = rte_eth_dev_configure(pid, nb_rxq, nb_rxq, &port_conf);
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.297779601 +0800
+++ 0015-app-testpmd-fix-DCB-in-VT-configuration.patch	2021-11-28 22:41:03.223542730 +0800
@@ -1 +1 @@
-From cbe70fded831acac4ccbde8e11ba33ce8c24227c Mon Sep 17 00:00:00 2001
+From 5d3a7aab1960e4216e97dca86a24cebcd22685f7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cbe70fded831acac4ccbde8e11ba33ce8c24227c ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index a66dfb297c..c18942279a 100644
+index 35a48e39cc..5af7dea3fe 100644
@@ -24 +26 @@
-@@ -3948,6 +3948,13 @@ init_port_dcb_config(portid_t pid,
+@@ -3582,6 +3582,13 @@ init_port_dcb_config(portid_t pid,
@@ -27 +29 @@
- 	port_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_VLAN_FILTER;
+ 	port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_VLAN_FILTER;
@@ -29,2 +31,2 @@
-+	if (port_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_VMDQ_DCB) {
-+		port_conf.rxmode.offloads &= ~RTE_ETH_RX_OFFLOAD_RSS_HASH;
++	if (port_conf.rxmode.mq_mode == ETH_MQ_RX_VMDQ_DCB) {
++		port_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_RSS_HASH;
@@ -33 +35 @@
-+				~RTE_ETH_RX_OFFLOAD_RSS_HASH;
++				~DEV_RX_OFFLOAD_RSS_HASH;

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'ethdev: fix typos' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (14 preceding siblings ...)
  2021-11-28 14:53   ` patch 'app/testpmd: fix DCB in VT configuration' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'test/red: fix typo in test description' " Xueming Li
                     ` (62 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Luca Boccassi, Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0ed3a7333f7a769fbf6dfae651b12176594b66d6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0ed3a7333f7a769fbf6dfae651b12176594b66d6 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Fri, 12 Nov 2021 12:13:39 +0000
Subject: [PATCH] ethdev: fix typos
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5139502783ed4e3ccaab49548812b8bdd7fb14b5 ]

Fixes: 9039c8125730 ("ethdev: change promiscuous callbacks to return status")
Fixes: 12e6e3e78fe0 ("ethdev: add API to dump device internal flow info")
Fixes: 44bf3c796be3 ("ethdev: support flow aging")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 lib/librte_ethdev/rte_ethdev_driver.h | 4 ++--
 lib/librte_ethdev/rte_flow.h          | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index 0eacfd8425..7ee0f797d3 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -73,7 +73,7 @@ typedef int (*eth_is_removed_t)(struct rte_eth_dev *dev);
  * @retval -E_RTE_SECONDARY
  *   Function was called from a secondary process instance and not supported.
  * @retval -ETIMEDOUT
- *   Attempt to enable promiscuos mode failed because of timeout.
+ *   Attempt to enable promiscuous mode failed because of timeout.
  * @retval -EAGAIN
  *   Failed to enable promiscuous mode.
  */
@@ -98,7 +98,7 @@ typedef int (*eth_promiscuous_enable_t)(struct rte_eth_dev *dev);
  * @retval -E_RTE_SECONDARY
  *   Function was called from a secondary process instance and not supported.
  * @retval -ETIMEDOUT
- *   Attempt to disable promiscuos mode failed because of timeout.
+ *   Attempt to disable promiscuous mode failed because of timeout.
  * @retval -EAGAIN
  *   Failed to disable promiscuous mode.
  */
diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
index 5a45f9fab5..8f9e82ce2d 100644
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -3088,7 +3088,7 @@ enum rte_flow_conv_op {
  *   Perform verbose error reporting if not NULL. PMDs initialize this
  *   structure in case of error only.
  * @return
- *   0 on success, a nagative value otherwise.
+ *   0 on success, a negative value otherwise.
  */
 __rte_experimental
 int
@@ -3449,7 +3449,7 @@ rte_flow_conv(enum rte_flow_conv_op op,
  *
  * RTE_ETH_EVENT_FLOW_AGED event will be triggered when at least one new aged
  * out flow was detected after the last call to rte_flow_get_aged_flows.
- * This function can be called to get the aged flows usynchronously from the
+ * This function can be called to get the aged flows asynchronously from the
  * event callback or synchronously regardless the event.
  * This is not safe to call rte_flow_get_aged_flows function with other flow
  * functions from multiple threads simultaneously.
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.342275193 +0800
+++ 0016-ethdev-fix-typos.patch	2021-11-28 22:41:03.226876003 +0800
@@ -1 +1 @@
-From 5139502783ed4e3ccaab49548812b8bdd7fb14b5 Mon Sep 17 00:00:00 2001
+From 0ed3a7333f7a769fbf6dfae651b12176594b66d6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5139502783ed4e3ccaab49548812b8bdd7fb14b5 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -14,2 +16,2 @@
- lib/ethdev/ethdev_driver.h | 4 ++--
- lib/ethdev/rte_flow.h      | 4 ++--
+ lib/librte_ethdev/rte_ethdev_driver.h | 4 ++--
+ lib/librte_ethdev/rte_flow.h          | 4 ++--
@@ -18,5 +20,5 @@
-diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
-index dcbffd4265..d95605a355 100644
---- a/lib/ethdev/ethdev_driver.h
-+++ b/lib/ethdev/ethdev_driver.h
-@@ -227,7 +227,7 @@ typedef int (*eth_is_removed_t)(struct rte_eth_dev *dev);
+diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
+index 0eacfd8425..7ee0f797d3 100644
+--- a/lib/librte_ethdev/rte_ethdev_driver.h
++++ b/lib/librte_ethdev/rte_ethdev_driver.h
+@@ -73,7 +73,7 @@ typedef int (*eth_is_removed_t)(struct rte_eth_dev *dev);
@@ -31 +33 @@
-@@ -252,7 +252,7 @@ typedef int (*eth_promiscuous_enable_t)(struct rte_eth_dev *dev);
+@@ -98,7 +98,7 @@ typedef int (*eth_promiscuous_enable_t)(struct rte_eth_dev *dev);
@@ -40,5 +42,5 @@
-diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
-index ebcd3a3c8e..650376c16d 100644
---- a/lib/ethdev/rte_flow.h
-+++ b/lib/ethdev/rte_flow.h
-@@ -3954,7 +3954,7 @@ enum rte_flow_conv_op {
+diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
+index 5a45f9fab5..8f9e82ce2d 100644
+--- a/lib/librte_ethdev/rte_flow.h
++++ b/lib/librte_ethdev/rte_flow.h
+@@ -3088,7 +3088,7 @@ enum rte_flow_conv_op {
@@ -53 +55 @@
-@@ -4316,7 +4316,7 @@ rte_flow_conv(enum rte_flow_conv_op op,
+@@ -3449,7 +3449,7 @@ rte_flow_conv(enum rte_flow_conv_op op,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'test/red: fix typo in test description' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (15 preceding siblings ...)
  2021-11-28 14:53   ` patch 'ethdev: fix typos' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/hinic/base: remove some unused variables' " Xueming Li
                     ` (61 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/878f71050eae6b695accefc27a778c8c481a1e6c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 878f71050eae6b695accefc27a778c8c481a1e6c Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 12 Nov 2021 14:56:45 +0100
Subject: [PATCH] test/red: fix typo in test description
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit fc812a214055091518df78526138f2059e90f5c8 ]

This is probably due a s/red/rte_red/ a long time ago.

Fixes: de3cfa2c9823 ("sched: initial import")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@yahoo.com>
---
 app/test/test_red.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_red.c b/app/test/test_red.c
index e973f3131e..05936cfee8 100644
--- a/app/test/test_red.c
+++ b/app/test/test_red.c
@@ -1049,7 +1049,7 @@ static struct test_queue ft6_tqueue = {
 static struct test_config func_test6_config = {
 	.ifname = "functional test 6 interface",
 	.msg = "functional test 6 : use several queues (each with its own run-time data),\n"
-	"		    use several RED configurations (such that each configuration is sharte_red by multiple queues),\n"
+	"		    use several RED configurations (such that each configuration is shared by multiple queues),\n"
 	"		    increase average queue size to target level,\n"
 	"		    dequeue all packets until queue is empty,\n"
 	"		    confirm that average queue size is computed correctly while queue is empty\n"
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.388028867 +0800
+++ 0017-test-red-fix-typo-in-test-description.patch	2021-11-28 22:41:03.226876003 +0800
@@ -1 +1 @@
-From fc812a214055091518df78526138f2059e90f5c8 Mon Sep 17 00:00:00 2001
+From 878f71050eae6b695accefc27a778c8c481a1e6c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fc812a214055091518df78526138f2059e90f5c8 ]

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/hinic/base: remove some unused variables' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (16 preceding siblings ...)
  2021-11-28 14:53   ` patch 'test/red: fix typo in test description' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/octeontx: remove unused packet length' " Xueming Li
                     ` (60 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Conor Walsh; +Cc: Luca Boccassi, Liang Longfeng, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0a475878ef6515262697693a22274091b98ba014

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0a475878ef6515262697693a22274091b98ba014 Mon Sep 17 00:00:00 2001
From: Conor Walsh <conor.walsh@intel.com>
Date: Mon, 15 Nov 2021 17:58:54 +0000
Subject: [PATCH] net/hinic/base: remove some unused variables
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b5dedf261c907df478413f5c9e4ba97fc568bb4e ]

Reported by clang 13.

Bugzilla ID: 881
Fixes: a4957d87e05a ("net/hinic/base: add mgmt module")

Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/hinic/base/hinic_pmd_mgmt.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/hinic/base/hinic_pmd_mgmt.c b/drivers/net/hinic/base/hinic_pmd_mgmt.c
index 9b399502de..6ecca407a1 100644
--- a/drivers/net/hinic/base/hinic_pmd_mgmt.c
+++ b/drivers/net/hinic/base/hinic_pmd_mgmt.c
@@ -133,16 +133,12 @@ static void prepare_header(struct hinic_msg_pf_to_mgmt *pf_to_mgmt,
 static void prepare_mgmt_cmd(u8 *mgmt_cmd, u64 *header, void *msg,
 			     int msg_len)
 {
-	u32 cmd_buf_max = MAX_PF_MGMT_BUF_SIZE;
-
 	memset(mgmt_cmd, 0, MGMT_MSG_RSVD_FOR_DEV);
 
 	mgmt_cmd += MGMT_MSG_RSVD_FOR_DEV;
-	cmd_buf_max -= MGMT_MSG_RSVD_FOR_DEV;
 	memcpy(mgmt_cmd, header, sizeof(*header));
 
 	mgmt_cmd += sizeof(*header);
-	cmd_buf_max -= sizeof(*header);
 	memcpy(mgmt_cmd, msg, msg_len);
 }
 
@@ -615,7 +611,6 @@ static int recv_mgmt_msg_handler(struct hinic_msg_pf_to_mgmt *pf_to_mgmt,
 	void *msg_body = header + sizeof(msg_header);
 	u8 *dest_msg;
 	u8 seq_id, seq_len;
-	u32 msg_buf_max = MAX_PF_MGMT_BUF_SIZE;
 	u8 front_id;
 	u16 msg_id;
 
@@ -635,7 +630,6 @@ static int recv_mgmt_msg_handler(struct hinic_msg_pf_to_mgmt *pf_to_mgmt,
 	}
 
 	dest_msg = (u8 *)recv_msg->msg + seq_id * HINIC_MSG_SEG_LEN;
-	msg_buf_max -= seq_id * HINIC_MSG_SEG_LEN;
 	memcpy(dest_msg, msg_body, seq_len);
 
 	if (!HINIC_MSG_HEADER_GET(msg_header, LAST))
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.432298156 +0800
+++ 0018-net-hinic-base-remove-some-unused-variables.patch	2021-11-28 22:41:03.230209276 +0800
@@ -1 +1 @@
-From b5dedf261c907df478413f5c9e4ba97fc568bb4e Mon Sep 17 00:00:00 2001
+From 0a475878ef6515262697693a22274091b98ba014 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b5dedf261c907df478413f5c9e4ba97fc568bb4e ]

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/octeontx: remove unused packet length' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (17 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/hinic/base: remove some unused variables' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'bus/fslmc: remove unused device count' " Xueming Li
                     ` (59 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Conor Walsh; +Cc: Luca Boccassi, Liang Longfeng, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/14e420ac852077af1934915c4a2231814f780a58

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 14e420ac852077af1934915c4a2231814f780a58 Mon Sep 17 00:00:00 2001
From: Conor Walsh <conor.walsh@intel.com>
Date: Mon, 15 Nov 2021 17:58:50 +0000
Subject: [PATCH] net/octeontx: remove unused packet length
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 23c97a67e53e937e7bf35ae84d298857e7298ada ]

Reported by clang 13.

Bugzilla ID: 881
Fixes: 9eb5cb3b11cc ("net/octeontx: fix access to indirect buffers")

Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/octeontx/octeontx_rxtx.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/octeontx/octeontx_rxtx.h b/drivers/net/octeontx/octeontx_rxtx.h
index dde0d6277b..1447f2617e 100644
--- a/drivers/net/octeontx/octeontx_rxtx.h
+++ b/drivers/net/octeontx/octeontx_rxtx.h
@@ -365,7 +365,7 @@ __octeontx_xmit_mseg_prepare(struct rte_mbuf *tx_pkt, uint64_t *cmd_buf,
 			const uint16_t flag)
 {
 	uint16_t nb_segs, nb_desc = 0;
-	uint16_t gaura_id, len = 0;
+	uint16_t gaura_id;
 	struct rte_mbuf *m_next = NULL, *m_tofree;
 	rte_iova_t iova;
 	uint16_t data_len;
@@ -425,7 +425,6 @@ __octeontx_xmit_mseg_prepare(struct rte_mbuf *tx_pkt, uint64_t *cmd_buf,
 		cmd_buf[nb_desc++] = iova;
 
 		nb_segs--;
-		len += data_len;
 		tx_pkt = m_next;
 	} while (nb_segs);
 
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.474449025 +0800
+++ 0019-net-octeontx-remove-unused-packet-length.patch	2021-11-28 22:41:03.230209276 +0800
@@ -1 +1 @@
-From 23c97a67e53e937e7bf35ae84d298857e7298ada Mon Sep 17 00:00:00 2001
+From 14e420ac852077af1934915c4a2231814f780a58 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 23c97a67e53e937e7bf35ae84d298857e7298ada ]
@@ -19 +22 @@
-index 56f11d3dd5..b63a5edfb3 100644
+index dde0d6277b..1447f2617e 100644

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'bus/fslmc: remove unused device count' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (18 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/octeontx: remove unused packet length' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'event/sw: remove unused inflight events " Xueming Li
                     ` (58 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Conor Walsh; +Cc: Luca Boccassi, Liang Longfeng, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/22ebe5378e9becc3582ef5ae7b5ee5ba9904c585

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 22ebe5378e9becc3582ef5ae7b5ee5ba9904c585 Mon Sep 17 00:00:00 2001
From: Conor Walsh <conor.walsh@intel.com>
Date: Mon, 15 Nov 2021 17:58:51 +0000
Subject: [PATCH] bus/fslmc: remove unused device count
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 54d109b5643002d4368a7355af5fa623aede330a ]

Reported by clang 13.
This patch removes the device_count variable from the rte_fslmc_scan
function within the fslmc bus driver as it is an unused but set variable.

Bugzilla ID: 881
Fixes: 828d51d8fc3e ("bus/fslmc: refactor scan and probe functions")

Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/bus/fslmc/fslmc_bus.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index 58435589b2..d03ec1cd97 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -303,7 +303,6 @@ static int
 rte_fslmc_scan(void)
 {
 	int ret;
-	int device_count = 0;
 	char fslmc_dirpath[PATH_MAX];
 	DIR *dir;
 	struct dirent *entry;
@@ -337,7 +336,6 @@ rte_fslmc_scan(void)
 			/* Error in parsing directory - exit gracefully */
 			goto scan_fail_cleanup;
 		}
-		device_count += 1;
 	}
 
 	closedir(dir);
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.515805582 +0800
+++ 0020-bus-fslmc-remove-unused-device-count.patch	2021-11-28 22:41:03.230209276 +0800
@@ -1 +1 @@
-From 54d109b5643002d4368a7355af5fa623aede330a Mon Sep 17 00:00:00 2001
+From 22ebe5378e9becc3582ef5ae7b5ee5ba9904c585 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 54d109b5643002d4368a7355af5fa623aede330a ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index ac3cb4aa5a..a0ef24cdc8 100644
+index 58435589b2..d03ec1cd97 100644
@@ -25 +27 @@
-@@ -315,7 +315,6 @@ static int
+@@ -303,7 +303,6 @@ static int
@@ -33 +35 @@
-@@ -349,7 +348,6 @@ rte_fslmc_scan(void)
+@@ -337,7 +336,6 @@ rte_fslmc_scan(void)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'event/sw: remove unused inflight events count' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (19 preceding siblings ...)
  2021-11-28 14:53   ` patch 'bus/fslmc: remove unused device count' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/bnxt: remove some unused variables' " Xueming Li
                     ` (57 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Conor Walsh
  Cc: Luca Boccassi, Liang Longfeng, Harry van Haaren, David Marchand,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ae0fe7d799603111cbbf558c2d174d7e99ad1924

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ae0fe7d799603111cbbf558c2d174d7e99ad1924 Mon Sep 17 00:00:00 2001
From: Conor Walsh <conor.walsh@intel.com>
Date: Mon, 15 Nov 2021 17:58:53 +0000
Subject: [PATCH] event/sw: remove unused inflight events count
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0f66d415c467daa1a41bb5184d72e61980c8991b ]

Reported by clang 13.
This patch removes the inflights variable from the sw_dump function
within the software section of the event driver as it is an unused but
set variable.

Bugzilla ID: 881
Fixes: c66baa68e453 ("event/sw: add dump function for easier debugging")

Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/event/sw/sw_evdev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index 0d8013adf7..54c7abbf93 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -712,7 +712,6 @@ sw_dump(struct rte_eventdev *dev, FILE *f)
 			continue;
 		}
 		int affinities_per_port[SW_PORTS_MAX] = {0};
-		uint32_t inflights = 0;
 
 		fprintf(f, "  Queue %d (%s)\n", i, q_type_strings[qid->type]);
 		fprintf(f, "\trx   %"PRIu64"\tdrop %"PRIu64"\ttx   %"PRIu64"\n",
@@ -733,7 +732,6 @@ sw_dump(struct rte_eventdev *dev, FILE *f)
 		for (flow = 0; flow < RTE_DIM(qid->fids); flow++)
 			if (qid->fids[flow].cq != -1) {
 				affinities_per_port[qid->fids[flow].cq]++;
-				inflights += qid->fids[flow].pcount;
 			}
 
 		uint32_t port;
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.557584695 +0800
+++ 0021-event-sw-remove-unused-inflight-events-count.patch	2021-11-28 22:41:03.230209276 +0800
@@ -1 +1 @@
-From 0f66d415c467daa1a41bb5184d72e61980c8991b Mon Sep 17 00:00:00 2001
+From ae0fe7d799603111cbbf558c2d174d7e99ad1924 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0f66d415c467daa1a41bb5184d72e61980c8991b ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 070a4802e9..fa72ceb949 100644
+index 0d8013adf7..54c7abbf93 100644
@@ -27 +29 @@
-@@ -711,7 +711,6 @@ sw_dump(struct rte_eventdev *dev, FILE *f)
+@@ -712,7 +712,6 @@ sw_dump(struct rte_eventdev *dev, FILE *f)
@@ -35 +37 @@
-@@ -732,7 +731,6 @@ sw_dump(struct rte_eventdev *dev, FILE *f)
+@@ -733,7 +732,6 @@ sw_dump(struct rte_eventdev *dev, FILE *f)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/bnxt: remove some unused variables' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (20 preceding siblings ...)
  2021-11-28 14:53   ` patch 'event/sw: remove unused inflight events " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/liquidio: remove unused counter' " Xueming Li
                     ` (56 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Conor Walsh
  Cc: Luca Boccassi, Liang Longfeng, Somnath Kotur, Ajit Khaparde,
	David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/415c636992bd80539713a30b6a0b1189389cb91e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 415c636992bd80539713a30b6a0b1189389cb91e Mon Sep 17 00:00:00 2001
From: Conor Walsh <conor.walsh@intel.com>
Date: Mon, 15 Nov 2021 17:58:54 +0000
Subject: [PATCH] net/bnxt: remove some unused variables
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2d72ec8dabd02c1fae159f5222e5a2d0d0a07db3 ]

Reported by clang 13.

Bugzilla ID: 881
Fixes: b87abb2e55cb ("net/bnxt: support marking packet")
Fixes: 88badb3aef94 ("net/bnxt: add helper functions for blob/regfile ops")

Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/bnxt/bnxt_rxr.c         | 22 ----------------------
 drivers/net/bnxt/tf_ulp/ulp_utils.c |  3 ---
 2 files changed, 25 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 67181b0fa9..e847af9fff 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -759,9 +759,6 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp,
 			   struct rte_mbuf *mbuf)
 {
 	uint32_t cfa_code = 0;
-	uint8_t meta_fmt = 0;
-	uint16_t flags2 = 0;
-	uint32_t meta =  0;
 
 	cfa_code = rte_le_to_cpu_16(rxcmp1->cfa_code);
 	if (!cfa_code)
@@ -770,25 +767,6 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp,
 	if (cfa_code && !bp->mark_table[cfa_code].valid)
 		return;
 
-	flags2 = rte_le_to_cpu_16(rxcmp1->flags2);
-	meta = rte_le_to_cpu_32(rxcmp1->metadata);
-	if (meta) {
-		meta >>= BNXT_RX_META_CFA_CODE_SHIFT;
-
-		/* The flags field holds extra bits of info from [6:4]
-		 * which indicate if the flow is in TCAM or EM or EEM
-		 */
-		meta_fmt = (flags2 & BNXT_CFA_META_FMT_MASK) >>
-			   BNXT_CFA_META_FMT_SHFT;
-
-		/* meta_fmt == 4 => 'b100 => 'b10x => EM.
-		 * meta_fmt == 5 => 'b101 => 'b10x => EM + VLAN
-		 * meta_fmt == 6 => 'b110 => 'b11x => EEM
-		 * meta_fmt == 7 => 'b111 => 'b11x => EEM + VLAN.
-		 */
-		meta_fmt >>= BNXT_CFA_META_FMT_EM_EEM_SHFT;
-	}
-
 	mbuf->hash.fdir.hi = bp->mark_table[cfa_code].mark_id;
 	mbuf->ol_flags |= PKT_RX_FDIR | PKT_RX_FDIR_ID;
 }
diff --git a/drivers/net/bnxt/tf_ulp/ulp_utils.c b/drivers/net/bnxt/tf_ulp/ulp_utils.c
index a13a3bbf65..ac9ce97ff2 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_utils.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_utils.c
@@ -175,7 +175,6 @@ ulp_bs_push_msb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val)
 {
 	int i;
 	int cnt = (len + 7) / 8;
-	int tlen = len;
 
 	/* Handle any remainder bits */
 	int tmp = len % 8;
@@ -186,12 +185,10 @@ ulp_bs_push_msb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val)
 	ulp_bs_put_msb(bs, pos, tmp, val[0]);
 
 	pos += tmp;
-	tlen -= tmp;
 
 	for (i = 1; i < cnt; i++) {
 		ulp_bs_put_msb(bs, pos, 8, val[i]);
 		pos += 8;
-		tlen -= 8;
 	}
 
 	return len;
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.605481955 +0800
+++ 0022-net-bnxt-remove-some-unused-variables.patch	2021-11-28 22:41:03.233542549 +0800
@@ -1 +1 @@
-From 2d72ec8dabd02c1fae159f5222e5a2d0d0a07db3 Mon Sep 17 00:00:00 2001
+From 415c636992bd80539713a30b6a0b1189389cb91e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2d72ec8dabd02c1fae159f5222e5a2d0d0a07db3 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 8bc8ddc353..157297bc64 100644
+index 67181b0fa9..e847af9fff 100644
@@ -27 +29 @@
-@@ -823,9 +823,6 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp,
+@@ -759,9 +759,6 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp,
@@ -37 +39 @@
-@@ -834,25 +831,6 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp,
+@@ -770,25 +767,6 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp,
@@ -61 +63 @@
- 	mbuf->ol_flags |= RTE_MBUF_F_RX_FDIR | RTE_MBUF_F_RX_FDIR_ID;
+ 	mbuf->ol_flags |= PKT_RX_FDIR | PKT_RX_FDIR_ID;
@@ -64 +66 @@
-index df3afaa6fd..c60d81d14a 100644
+index a13a3bbf65..ac9ce97ff2 100644
@@ -67 +69 @@
-@@ -200,7 +200,6 @@ ulp_bs_push_msb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val)
+@@ -175,7 +175,6 @@ ulp_bs_push_msb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val)
@@ -75 +77 @@
-@@ -211,12 +210,10 @@ ulp_bs_push_msb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val)
+@@ -186,12 +185,10 @@ ulp_bs_push_msb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/liquidio: remove unused counter' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (21 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/bnxt: remove some unused variables' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/nfp: remove unused message length' " Xueming Li
                     ` (55 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Conor Walsh; +Cc: Luca Boccassi, Liang Longfeng, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6fdb54e73f80e9dd8dd40a5826af1588cd8ec56b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6fdb54e73f80e9dd8dd40a5826af1588cd8ec56b Mon Sep 17 00:00:00 2001
From: Conor Walsh <conor.walsh@intel.com>
Date: Mon, 15 Nov 2021 17:58:54 +0000
Subject: [PATCH] net/liquidio: remove unused counter
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 52415c6b2553d4cd44f79b4cb693016225a67b43 ]

Reported by clang 13.

Bugzilla ID: 881
Fixes: 5ee7640f95a0 ("net/liquidio: add API to flush IQ")

Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/liquidio/lio_rxtx.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/liquidio/lio_rxtx.c b/drivers/net/liquidio/lio_rxtx.c
index 8d705bfe7f..f57b7712b5 100644
--- a/drivers/net/liquidio/lio_rxtx.c
+++ b/drivers/net/liquidio/lio_rxtx.c
@@ -1050,7 +1050,6 @@ lio_update_read_index(struct lio_instr_queue *iq)
 int
 lio_flush_iq(struct lio_device *lio_dev, struct lio_instr_queue *iq)
 {
-	uint32_t tot_inst_processed = 0;
 	uint32_t inst_processed = 0;
 	int tx_done = 1;
 
@@ -1073,7 +1072,6 @@ lio_flush_iq(struct lio_device *lio_dev, struct lio_instr_queue *iq)
 			iq->stats.instr_processed += inst_processed;
 		}
 
-		tot_inst_processed += inst_processed;
 		inst_processed = 0;
 
 	} while (1);
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.649778811 +0800
+++ 0023-net-liquidio-remove-unused-counter.patch	2021-11-28 22:41:03.233542549 +0800
@@ -1 +1 @@
-From 52415c6b2553d4cd44f79b4cb693016225a67b43 Mon Sep 17 00:00:00 2001
+From 6fdb54e73f80e9dd8dd40a5826af1588cd8ec56b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 52415c6b2553d4cd44f79b4cb693016225a67b43 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index ef127f26c4..e09798ddd7 100644
+index 8d705bfe7f..f57b7712b5 100644

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/nfp: remove unused message length' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (22 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/liquidio: remove unused counter' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/qede/base: remove unused message size' " Xueming Li
                     ` (54 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Conor Walsh; +Cc: Luca Boccassi, Liang Longfeng, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e72e4962d5e73e03a590f7622391129b24dd1bfe

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e72e4962d5e73e03a590f7622391129b24dd1bfe Mon Sep 17 00:00:00 2001
From: Conor Walsh <conor.walsh@intel.com>
Date: Mon, 15 Nov 2021 17:58:54 +0000
Subject: [PATCH] net/nfp: remove unused message length
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9465a5d5a065b66075614e3712f9459c3e267155 ]

Reported by clang 13.

Bugzilla ID: 881
Fixes: 29a62d1476b6 ("net/nfp: add CPP bridge as service")

Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/nfp/nfp_net.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 39a6d3f570..8e27845ce6 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -3044,7 +3044,7 @@ nfp_cpp_bridge_serve_write(int sockfd, struct nfp_cpp *cpp)
 	off_t offset, nfp_offset;
 	uint32_t cpp_id, pos, len;
 	uint32_t tmpbuf[16];
-	size_t count, curlen, totlen = 0;
+	size_t count, curlen;
 	int err = 0;
 
 	PMD_CPP_LOG(DEBUG, "%s: offset size %zu, count_size: %zu\n", __func__,
@@ -3121,7 +3121,6 @@ nfp_cpp_bridge_serve_write(int sockfd, struct nfp_cpp *cpp)
 		}
 
 		nfp_offset += pos;
-		totlen += pos;
 		nfp_cpp_area_release(area);
 		nfp_cpp_area_free(area);
 
@@ -3146,7 +3145,7 @@ nfp_cpp_bridge_serve_read(int sockfd, struct nfp_cpp *cpp)
 	off_t offset, nfp_offset;
 	uint32_t cpp_id, pos, len;
 	uint32_t tmpbuf[16];
-	size_t count, curlen, totlen = 0;
+	size_t count, curlen;
 	int err = 0;
 
 	PMD_CPP_LOG(DEBUG, "%s: offset size %zu, count_size: %zu\n", __func__,
@@ -3222,7 +3221,6 @@ nfp_cpp_bridge_serve_read(int sockfd, struct nfp_cpp *cpp)
 		}
 
 		nfp_offset += pos;
-		totlen += pos;
 		nfp_cpp_area_release(area);
 		nfp_cpp_area_free(area);
 
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.693003483 +0800
+++ 0024-net-nfp-remove-unused-message-length.patch	2021-11-28 22:41:03.236875822 +0800
@@ -1 +1 @@
-From 9465a5d5a065b66075614e3712f9459c3e267155 Mon Sep 17 00:00:00 2001
+From e72e4962d5e73e03a590f7622391129b24dd1bfe Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9465a5d5a065b66075614e3712f9459c3e267155 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- drivers/net/nfp/nfp_cpp_bridge.c | 6 ++----
+ drivers/net/nfp/nfp_net.c | 6 ++----
@@ -19,5 +21,5 @@
-diff --git a/drivers/net/nfp/nfp_cpp_bridge.c b/drivers/net/nfp/nfp_cpp_bridge.c
-index 74a0eacb3f..0922ea9cf9 100644
---- a/drivers/net/nfp/nfp_cpp_bridge.c
-+++ b/drivers/net/nfp/nfp_cpp_bridge.c
-@@ -58,7 +58,7 @@ nfp_cpp_bridge_serve_write(int sockfd, struct nfp_cpp *cpp)
+diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
+index 39a6d3f570..8e27845ce6 100644
+--- a/drivers/net/nfp/nfp_net.c
++++ b/drivers/net/nfp/nfp_net.c
+@@ -3044,7 +3044,7 @@ nfp_cpp_bridge_serve_write(int sockfd, struct nfp_cpp *cpp)
@@ -32 +34 @@
-@@ -135,7 +135,6 @@ nfp_cpp_bridge_serve_write(int sockfd, struct nfp_cpp *cpp)
+@@ -3121,7 +3121,6 @@ nfp_cpp_bridge_serve_write(int sockfd, struct nfp_cpp *cpp)
@@ -40 +42 @@
-@@ -160,7 +159,7 @@ nfp_cpp_bridge_serve_read(int sockfd, struct nfp_cpp *cpp)
+@@ -3146,7 +3145,7 @@ nfp_cpp_bridge_serve_read(int sockfd, struct nfp_cpp *cpp)
@@ -49 +51 @@
-@@ -236,7 +235,6 @@ nfp_cpp_bridge_serve_read(int sockfd, struct nfp_cpp *cpp)
+@@ -3222,7 +3221,6 @@ nfp_cpp_bridge_serve_read(int sockfd, struct nfp_cpp *cpp)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/qede/base: remove unused message size' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (23 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/nfp: remove unused message length' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/vmxnet3: fix build with clang 13' " Xueming Li
                     ` (53 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Conor Walsh; +Cc: Luca Boccassi, Liang Longfeng, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0c8aa412492c3279e6d582c2bc13859007243606

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0c8aa412492c3279e6d582c2bc13859007243606 Mon Sep 17 00:00:00 2001
From: Conor Walsh <conor.walsh@intel.com>
Date: Mon, 15 Nov 2021 17:58:54 +0000
Subject: [PATCH] net/qede/base: remove unused message size
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2ccebadab2f1e7fa867c708cc1487986ac3be122 ]

Reported by clang 13.

Bugzilla ID: 881
Fixes: 86a2265e59d7 ("qede: add SRIOV support")

Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/qede/base/ecore_vf.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/qede/base/ecore_vf.c b/drivers/net/qede/base/ecore_vf.c
index db03bc494f..a36ae47c2b 100644
--- a/drivers/net/qede/base/ecore_vf.c
+++ b/drivers/net/qede/base/ecore_vf.c
@@ -73,7 +73,7 @@ static void ecore_vf_pf_req_end(struct ecore_hwfn *p_hwfn,
 #endif
 static enum _ecore_status_t
 ecore_send_msg2pf(struct ecore_hwfn *p_hwfn,
-		  u8 *done, u32 resp_size)
+		  u8 *done, __rte_unused u32 resp_size)
 {
 	union vfpf_tlvs *p_req = p_hwfn->vf_iov_info->vf2pf_request;
 	struct ustorm_trigger_vf_zone trigger;
@@ -86,9 +86,6 @@ ecore_send_msg2pf(struct ecore_hwfn *p_hwfn,
 	/* output tlvs list */
 	ecore_dp_tlv_list(p_hwfn, p_req);
 
-	/* need to add the END TLV to the message size */
-	resp_size += sizeof(struct channel_list_end_tlv);
-
 	/* Send TLVs over HW channel */
 	OSAL_MEMSET(&trigger, 0, sizeof(struct ustorm_trigger_vf_zone));
 	trigger.vf_pf_msg_valid = 1;
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.735292901 +0800
+++ 0025-net-qede-base-remove-unused-message-size.patch	2021-11-28 22:41:03.236875822 +0800
@@ -1 +1 @@
-From 2ccebadab2f1e7fa867c708cc1487986ac3be122 Mon Sep 17 00:00:00 2001
+From 0c8aa412492c3279e6d582c2bc13859007243606 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2ccebadab2f1e7fa867c708cc1487986ac3be122 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/vmxnet3: fix build with clang 13' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (24 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/qede/base: remove unused message size' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'test/distributor: remove unused counter' " Xueming Li
                     ` (52 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Conor Walsh; +Cc: Luca Boccassi, Liang Longfeng, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7db7d2e658f6901385a9f3d290e01da52260cc61

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7db7d2e658f6901385a9f3d290e01da52260cc61 Mon Sep 17 00:00:00 2001
From: Conor Walsh <conor.walsh@intel.com>
Date: Mon, 15 Nov 2021 17:58:54 +0000
Subject: [PATCH] net/vmxnet3: fix build with clang 13
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e76eb560bcf31988384a0cecc6a617475cec1d06 ]

The completed variable is used for debug logs even though clang 13
reports it as unused.

Bugzilla ID: 881
Fixes: c3ecdbb376da ("vmxnet3: support TSO")

Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/vmxnet3/vmxnet3_rxtx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 95c697f8e3..40b366854d 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -341,6 +341,9 @@ vmxnet3_tq_tx_complete(vmxnet3_tx_queue_t *txq)
 	}
 
 	PMD_TX_LOG(DEBUG, "Processed %d tx comps & command descs.", completed);
+
+	/* To avoid compiler warnings when not in DEBUG mode. */
+	RTE_SET_USED(completed);
 }
 
 uint16_t
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.778139563 +0800
+++ 0026-net-vmxnet3-fix-build-with-clang-13.patch	2021-11-28 22:41:03.240209095 +0800
@@ -1 +1 @@
-From e76eb560bcf31988384a0cecc6a617475cec1d06 Mon Sep 17 00:00:00 2001
+From 7db7d2e658f6901385a9f3d290e01da52260cc61 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e76eb560bcf31988384a0cecc6a617475cec1d06 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index deba64be6a..d745064bc4 100644
+index 95c697f8e3..40b366854d 100644
@@ -24 +26 @@
-@@ -340,6 +340,9 @@ vmxnet3_tq_tx_complete(vmxnet3_tx_queue_t *txq)
+@@ -341,6 +341,9 @@ vmxnet3_tq_tx_complete(vmxnet3_tx_queue_t *txq)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'test/distributor: remove unused counter' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (25 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/vmxnet3: fix build with clang 13' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'examples/performance-thread: remove unused hits count' " Xueming Li
                     ` (51 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Conor Walsh; +Cc: Luca Boccassi, Liang Longfeng, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9a514a21d822a4b4c57a3e68f5db54d6bdfffae3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9a514a21d822a4b4c57a3e68f5db54d6bdfffae3 Mon Sep 17 00:00:00 2001
From: Conor Walsh <conor.walsh@intel.com>
Date: Mon, 15 Nov 2021 17:58:50 +0000
Subject: [PATCH] test/distributor: remove unused counter
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ccbdaaa9815259f5af3b6cd3be6ba6eb8ffc4b5b ]

Reported by clang 13.
This patch fixes unused but set variables in the distributor test perf.

Bugzilla ID: 881
Fixes: c0de0eb82e40 ("distributor: switch over to new API")

Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_distributor_perf.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/app/test/test_distributor_perf.c b/app/test/test_distributor_perf.c
index fdbeae6d2f..92e330f194 100644
--- a/app/test/test_distributor_perf.c
+++ b/app/test/test_distributor_perf.c
@@ -108,7 +108,6 @@ static int
 handle_work(void *arg)
 {
 	struct rte_distributor *d = arg;
-	unsigned int count = 0;
 	unsigned int num = 0;
 	int i;
 	unsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED);
@@ -120,11 +119,9 @@ handle_work(void *arg)
 	num = rte_distributor_get_pkt(d, id, buf, buf, num);
 	while (!quit) {
 		worker_stats[id].handled_packets += num;
-		count += num;
 		num = rte_distributor_get_pkt(d, id, buf, buf, num);
 	}
 	worker_stats[id].handled_packets += num;
-	count += num;
 	rte_distributor_return_pkt(d, id, buf, num);
 	return 0;
 }
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.820764946 +0800
+++ 0027-test-distributor-remove-unused-counter.patch	2021-11-28 22:41:03.240209095 +0800
@@ -1 +1 @@
-From ccbdaaa9815259f5af3b6cd3be6ba6eb8ffc4b5b Mon Sep 17 00:00:00 2001
+From 9a514a21d822a4b4c57a3e68f5db54d6bdfffae3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ccbdaaa9815259f5af3b6cd3be6ba6eb8ffc4b5b ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'examples/performance-thread: remove unused hits count' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (26 preceding siblings ...)
  2021-11-28 14:53   ` patch 'test/distributor: remove unused counter' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'eventdev/eth_tx: fix queue delete logic' " Xueming Li
                     ` (50 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Conor Walsh; +Cc: Luca Boccassi, Liang Longfeng, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0d266c9fe9d9ea2cba73631e12f8c8b53cd3d8f1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0d266c9fe9d9ea2cba73631e12f8c8b53cd3d8f1 Mon Sep 17 00:00:00 2001
From: Conor Walsh <conor.walsh@intel.com>
Date: Mon, 15 Nov 2021 17:58:55 +0000
Subject: [PATCH] examples/performance-thread: remove unused hits count
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 130e99db590073dd58da7e5c32dec8c2181527dd ]

Reported by clang 13.
This patch removes the hits variable from the cpu_load_collector function
within the performance thread example app as it is an unused but set
variable.

Bugzilla ID: 881
Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app")

Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 examples/performance-thread/l3fwd-thread/main.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index 9830efb96f..081a3fa0d2 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -1885,7 +1885,6 @@ process_burst(struct rte_mbuf *pkts_burst[MAX_PKT_BURST], int nb_rx,
 static int __rte_noreturn
 cpu_load_collector(__rte_unused void *arg) {
 	unsigned i, j, k;
-	uint64_t hits;
 	uint64_t prev_tsc, diff_tsc, cur_tsc;
 	uint64_t total[MAX_CPU] = { 0 };
 	unsigned min_cpu = MAX_CPU;
@@ -1975,12 +1974,10 @@ cpu_load_collector(__rte_unused void *arg) {
 			printf("cpu#     proc%%  poll%%  overhead%%\n\n");
 
 			for (i = min_cpu; i <= max_cpu; i++) {
-				hits = 0;
 				printf("CPU %d:", i);
 				for (j = 0; j < MAX_CPU_COUNTER; j++) {
 					printf("%7" PRIu64 "",
 							cpu_load.hits[j][i] * 100 / cpu_load.counter);
-					hits += cpu_load.hits[j][i];
 					cpu_load.hits[j][i] = 0;
 				}
 				printf("%7" PRIu64 "\n",
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.862072127 +0800
+++ 0028-examples-performance-thread-remove-unused-hits-count.patch	2021-11-28 22:41:03.243542368 +0800
@@ -1 +1 @@
-From 130e99db590073dd58da7e5c32dec8c2181527dd Mon Sep 17 00:00:00 2001
+From 0d266c9fe9d9ea2cba73631e12f8c8b53cd3d8f1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 130e99db590073dd58da7e5c32dec8c2181527dd ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 3a6a33bda3..8a35040597 100644
+index 9830efb96f..081a3fa0d2 100644
@@ -34 +36 @@
-@@ -1972,12 +1971,10 @@ cpu_load_collector(__rte_unused void *arg) {
+@@ -1975,12 +1974,10 @@ cpu_load_collector(__rte_unused void *arg) {

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'eventdev/eth_tx: fix queue delete logic' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (27 preceding siblings ...)
  2021-11-28 14:53   ` patch 'examples/performance-thread: remove unused hits count' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'event/dlb2: fix delayed pop test in selftest' " Xueming Li
                     ` (49 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Naga Harish K S V
  Cc: Luca Boccassi, Jay Jayatheerthan, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4f17d46380ff62b353e1d08cf15754239009ab4e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4f17d46380ff62b353e1d08cf15754239009ab4e Mon Sep 17 00:00:00 2001
From: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Date: Tue, 9 Nov 2021 01:33:33 -0600
Subject: [PATCH] eventdev/eth_tx: fix queue delete logic
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 741b499e6421ff93542d17c57f536b9d8e9bb443 ]

This patch fixes heap-use-after-free reported by ASan.

The application can use the queue_id as `-1` to delete all
the queues of the eth_device that are added to tx_adapter
instance.
In above case, the queue_del API is trying to use number of
queues from adapter level instead of eth_device queues.
When there are queues added from multiple eth devices,
it will result in heap-use-after-free as reported by ASAN.

This patch fixes the queue_del API to use correct number of
queues.

Bugzilla ID: 869
Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Tested-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
index a122750fd9..2684eb4308 100644
--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
@@ -818,7 +818,7 @@ txa_service_queue_del(uint8_t id,
 		uint16_t i, q, nb_queues;
 		int ret = 0;
 
-		nb_queues = txa->nb_queues;
+		nb_queues = txa->txa_ethdev[port_id].nb_queues;
 		if (nb_queues == 0)
 			return 0;
 
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.907296563 +0800
+++ 0029-eventdev-eth_tx-fix-queue-delete-logic.patch	2021-11-28 22:41:03.243542368 +0800
@@ -1 +1 @@
-From 741b499e6421ff93542d17c57f536b9d8e9bb443 Mon Sep 17 00:00:00 2001
+From 4f17d46380ff62b353e1d08cf15754239009ab4e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 741b499e6421ff93542d17c57f536b9d8e9bb443 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
- lib/eventdev/rte_event_eth_tx_adapter.c | 2 +-
+ lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 +-
@@ -30,5 +32,5 @@
-diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
-index da55d2c2dc..c17f33f098 100644
---- a/lib/eventdev/rte_event_eth_tx_adapter.c
-+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
-@@ -864,7 +864,7 @@ txa_service_queue_del(uint8_t id,
+diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+index a122750fd9..2684eb4308 100644
+--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+@@ -818,7 +818,7 @@ txa_service_queue_del(uint8_t id,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'event/dlb2: fix delayed pop test in selftest' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (28 preceding siblings ...)
  2021-11-28 14:53   ` patch 'eventdev/eth_tx: fix queue delete logic' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'test/crypto: skip plain text compare for null cipher' " Xueming Li
                     ` (48 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Rashmi Shetty; +Cc: Luca Boccassi, Mike Ximing Chen, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/985e9324d96246c73fae73a59be83e989fc77354

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 985e9324d96246c73fae73a59be83e989fc77354 Mon Sep 17 00:00:00 2001
From: Rashmi Shetty <rashmi.shetty@intel.com>
Date: Mon, 15 Nov 2021 10:34:44 -0600
Subject: [PATCH] event/dlb2: fix delayed pop test in selftest
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 5fe46ce0558c4e53943aded6c4841235a7196762 ]

Number of events scheduled and available for dequeue
after token pop was set to dequeue_depth-1 instead of
dequeue_depth in test_delayed_pop. The expectation is
that all dequeue_depth number of events can be dequeued
once the last event is released.

Fixes: 07d55c418d47 ("event/dlb2: add delayed token pop logic")

Signed-off-by: Rashmi Shetty <rashmi.shetty@intel.com>
Reviewed-by: Mike Ximing Chen <mike.ximing.chen@intel.com>
---
 drivers/event/dlb2/dlb2_selftest.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/event/dlb2/dlb2_selftest.c b/drivers/event/dlb2/dlb2_selftest.c
index 5cf66c552c..2113bc2c99 100644
--- a/drivers/event/dlb2/dlb2_selftest.c
+++ b/drivers/event/dlb2/dlb2_selftest.c
@@ -1354,7 +1354,7 @@ test_delayed_pop(void)
 	}
 
 	/* Release one more event. This will trigger the token pop, and
-	 * dequeue_depth - 1 more events will be scheduled to the device.
+	 * dequeue_depth more events will be scheduled to the device.
 	 */
 	ev.op = RTE_EVENT_OP_RELEASE;
 
@@ -1366,7 +1366,7 @@ test_delayed_pop(void)
 
 	timeout = 0xFFFFFFFFF;
 
-	for (i = 0; i < port_conf.dequeue_depth - 1; i++) {
+	for (i = 0; i < port_conf.dequeue_depth; i++) {
 		if (rte_event_dequeue_burst(evdev, 0, &ev, 1, timeout) != 1) {
 			printf("%d: event dequeue expected to succeed\n",
 			       __LINE__);
@@ -1374,14 +1374,6 @@ test_delayed_pop(void)
 		}
 	}
 
-	timeout = 0x10000;
-
-	if (rte_event_dequeue_burst(evdev, 0, &ev, 1, timeout) != 0) {
-		printf("%d: event dequeue expected to fail\n",
-		       __LINE__);
-		goto err;
-	}
-
 	cleanup();
 	return 0;
 
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.948944015 +0800
+++ 0030-event-dlb2-fix-delayed-pop-test-in-selftest.patch	2021-11-28 22:41:03.243542368 +0800
@@ -1 +1 @@
-From 5fe46ce0558c4e53943aded6c4841235a7196762 Mon Sep 17 00:00:00 2001
+From 985e9324d96246c73fae73a59be83e989fc77354 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5fe46ce0558c4e53943aded6c4841235a7196762 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'test/crypto: skip plain text compare for null cipher' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (29 preceding siblings ...)
  2021-11-28 14:53   ` patch 'event/dlb2: fix delayed pop test in selftest' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'test/crypto: fix data lengths' " Xueming Li
                     ` (47 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Anoob Joseph; +Cc: Luca Boccassi, Ciara Power, Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/139df4588581128bc94f26439c56aa5ddb681d96

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 139df4588581128bc94f26439c56aa5ddb681d96 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Wed, 10 Nov 2021 18:34:08 +0530
Subject: [PATCH] test/crypto: skip plain text compare for null cipher
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9fc69835feb33d0e155076163ecc2f5479cf1bc2 ]

NULL cipher is used for validating auth only cases. With NULL cipher,
validating plain text should not be done as the PMD is only expected
to update auth data.

Fixes: e847fc512817 ("test/crypto: add encrypted digest case for AES-CTR-CMAC")

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test/test_cryptodev.c | 63 ++++++++++++++++++++++-----------------
 1 file changed, 35 insertions(+), 28 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 4772eea30c..7270730145 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -6951,27 +6951,30 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata,
 				tdata->digest_enc.len);
 	}
 
-	/* Validate obuf */
-	if (verify) {
-		TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
-				plaintext,
-				tdata->plaintext.data,
-				tdata->plaintext.len_bits >> 3,
-				"Plaintext data not as expected");
-	} else {
-		TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
-				ciphertext,
-				tdata->ciphertext.data,
-				tdata->validDataLen.len_bits,
-				"Ciphertext data not as expected");
-
+	if (!verify) {
 		TEST_ASSERT_BUFFERS_ARE_EQUAL(
 				ut_params->digest,
 				tdata->digest_enc.data,
-				DIGEST_BYTE_LENGTH_SNOW3G_UIA2,
+				tdata->digest_enc.len,
 				"Generated auth tag not as expected");
 	}
 
+	if (tdata->cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
+		if (verify) {
+			TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
+					plaintext,
+					tdata->plaintext.data,
+					tdata->plaintext.len_bits >> 3,
+					"Plaintext data not as expected");
+		} else {
+			TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
+					ciphertext,
+					tdata->ciphertext.data,
+					tdata->validDataLen.len_bits,
+					"Ciphertext data not as expected");
+		}
+	}
+
 	TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,
 			"crypto op processing failed");
 
@@ -7168,19 +7171,7 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata,
 				tdata->digest_enc.data, tdata->digest_enc.len);
 	}
 
-	/* Validate obuf */
-	if (verify) {
-		TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
-				plaintext,
-				tdata->plaintext.data,
-				tdata->plaintext.len_bits >> 3,
-				"Plaintext data not as expected");
-	} else {
-		TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
-				ciphertext,
-				tdata->ciphertext.data,
-				tdata->validDataLen.len_bits,
-				"Ciphertext data not as expected");
+	if (!verify) {
 		TEST_ASSERT_BUFFERS_ARE_EQUAL(
 				digest,
 				tdata->digest_enc.data,
@@ -7188,6 +7179,22 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata,
 				"Generated auth tag not as expected");
 	}
 
+	if (tdata->cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
+		if (verify) {
+			TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
+					plaintext,
+					tdata->plaintext.data,
+					tdata->plaintext.len_bits >> 3,
+					"Plaintext data not as expected");
+		} else {
+			TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
+					ciphertext,
+					tdata->ciphertext.data,
+					tdata->validDataLen.len_bits,
+					"Ciphertext data not as expected");
+		}
+	}
+
 	TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,
 			"crypto op processing failed");
 
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.990522663 +0800
+++ 0031-test-crypto-skip-plain-text-compare-for-null-cipher.patch	2021-11-28 22:41:03.253542187 +0800
@@ -1 +1 @@
-From 9fc69835feb33d0e155076163ecc2f5479cf1bc2 Mon Sep 17 00:00:00 2001
+From 139df4588581128bc94f26439c56aa5ddb681d96 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9fc69835feb33d0e155076163ecc2f5479cf1bc2 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 52457596e2..1b68d7c43b 100644
+index 4772eea30c..7270730145 100644
@@ -24 +26 @@
-@@ -7484,27 +7484,30 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata,
+@@ -6951,27 +6951,30 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata,
@@ -70 +72 @@
-@@ -7701,19 +7704,7 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata,
+@@ -7168,19 +7171,7 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata,
@@ -91 +93 @@
-@@ -7721,6 +7712,22 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata,
+@@ -7188,6 +7179,22 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'test/crypto: fix data lengths' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (30 preceding siblings ...)
  2021-11-28 14:53   ` patch 'test/crypto: skip plain text compare for null cipher' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'test/crypto: fix missing return checks' " Xueming Li
                     ` (46 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Kai Ji; +Cc: Luca Boccassi, Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/fa912be2c5392c50dd9157070c3a0537cad53a90

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fa912be2c5392c50dd9157070c3a0537cad53a90 Mon Sep 17 00:00:00 2001
From: Kai Ji <kai.ji@intel.com>
Date: Tue, 9 Nov 2021 10:42:31 +0000
Subject: [PATCH] test/crypto: fix data lengths
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f52b75c61b7cf75e5c9a665e465dfbace2a18f30 ]

This patch fixes incorrect data lengths computation in cryptodev
unit test. Previously some data lengths were incorrectly set, which
was insensitive for crypto op unit tets but is critical for raw data
path API unit tests. The patch addressed the issue by setting the
correct data lengths for some tests.

Fixes: 681f540da52b ("cryptodev: do not use AAD in wireless algorithms")
Fixes: e847fc512817 ("test/crypto: add encrypted digest case for AES-CTR-CMAC")
Fixes: b1c1df46878d ("test/crypto: add ZUC test cases for auth-cipher")

Signed-off-by: Kai Ji <kai.ji@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
 app/test/test_cryptodev.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 7270730145..7a205a2b00 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -3707,9 +3707,9 @@ test_kasumi_decryption(const struct kasumi_test_data *tdata)
 
 	/* Create KASUMI operation */
 	retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
-					tdata->cipher_iv.len,
-					tdata->ciphertext.len,
-					tdata->validCipherOffsetInBits.len);
+			tdata->cipher_iv.len,
+			RTE_ALIGN_CEIL(tdata->validCipherLenInBits.len, 8),
+			tdata->validCipherOffsetInBits.len);
 	if (retval < 0)
 		return retval;
 
@@ -5853,20 +5853,20 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata,
 		ciphertext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,
 					ciphertext_pad_len);
 		memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len);
-		if (op_mode == OUT_OF_PLACE)
-			rte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len);
 		debug_hexdump(stdout, "ciphertext:", ciphertext,
 			ciphertext_len);
 	} else {
+		/* make sure enough space to cover partial digest verify case */
 		plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,
-					plaintext_pad_len);
+					ciphertext_pad_len);
 		memcpy(plaintext, tdata->plaintext.data, plaintext_len);
-		if (op_mode == OUT_OF_PLACE)
-			rte_pktmbuf_append(ut_params->obuf, plaintext_pad_len);
 		debug_hexdump(stdout, "plaintext:", plaintext,
 			plaintext_len);
 	}
 
+	if (op_mode == OUT_OF_PLACE)
+		rte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len);
+
 	/* Create ZUC operation */
 	retval = create_wireless_algo_auth_cipher_operation(
 		tdata->digest.data, tdata->digest.len,
@@ -6867,19 +6867,19 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata,
 		ciphertext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,
 				ciphertext_pad_len);
 		memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len);
-		if (op_mode == OUT_OF_PLACE)
-			rte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len);
 		debug_hexdump(stdout, "ciphertext:", ciphertext,
 				ciphertext_len);
 	} else {
+		/* make sure enough space to cover partial digest verify case */
 		plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,
-				plaintext_pad_len);
+				ciphertext_pad_len);
 		memcpy(plaintext, tdata->plaintext.data, plaintext_len);
-		if (op_mode == OUT_OF_PLACE)
-			rte_pktmbuf_append(ut_params->obuf, plaintext_pad_len);
 		debug_hexdump(stdout, "plaintext:", plaintext, plaintext_len);
 	}
 
+	if (op_mode == OUT_OF_PLACE)
+		rte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len);
+
 	/* Create the operation */
 	retval = create_wireless_algo_auth_cipher_operation(
 			tdata->digest_enc.data, tdata->digest_enc.len,
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.042473116 +0800
+++ 0032-test-crypto-fix-data-lengths.patch	2021-11-28 22:41:03.263542006 +0800
@@ -1 +1 @@
-From f52b75c61b7cf75e5c9a665e465dfbace2a18f30 Mon Sep 17 00:00:00 2001
+From fa912be2c5392c50dd9157070c3a0537cad53a90 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f52b75c61b7cf75e5c9a665e465dfbace2a18f30 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 1b68d7c43b..29e8675e30 100644
+index 7270730145..7a205a2b00 100644
@@ -27 +29 @@
-@@ -4102,9 +4102,9 @@ test_kasumi_decryption(const struct kasumi_test_data *tdata)
+@@ -3707,9 +3707,9 @@ test_kasumi_decryption(const struct kasumi_test_data *tdata)
@@ -40 +42 @@
-@@ -6332,20 +6332,20 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata,
+@@ -5853,20 +5853,20 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata,
@@ -66 +68 @@
-@@ -7400,19 +7400,19 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata,
+@@ -6867,19 +6867,19 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'test/crypto: fix missing return checks' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (31 preceding siblings ...)
  2021-11-28 14:53   ` patch 'test/crypto: fix data lengths' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'common/cpt: fix KASUMI input length' " Xueming Li
                     ` (45 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Anoob Joseph; +Cc: Luca Boccassi, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ce1df1c241eec4e077d0c705f59dbc878715a382

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ce1df1c241eec4e077d0c705f59dbc878715a382 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Mon, 8 Nov 2021 20:43:46 +0530
Subject: [PATCH] test/crypto: fix missing return checks
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0015b149bcc59bdd5d8797c8e19c26b0f6f1b40d ]

The API could return errors. Add error checking for the same.

Fixes: b3bbd9e5f265 ("cryptodev: support device independent sessions")

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test/test_cryptodev.c | 116 ++++++++++++++++++++++++++------------
 1 file changed, 80 insertions(+), 36 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 7a205a2b00..a655c37a10 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -1675,6 +1675,7 @@ test_AES_CBC_HMAC_SHA1_encrypt_digest(void)
 {
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
 	struct crypto_unittest_params *ut_params = &unittest_params;
+	int status;
 
 	/* Verify the capabilities */
 	struct rte_cryptodev_sym_capability_idx cap_idx;
@@ -1721,12 +1722,17 @@ test_AES_CBC_HMAC_SHA1_encrypt_digest(void)
 
 	ut_params->sess = rte_cryptodev_sym_session_create(
 			ts_params->session_mpool);
+	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
 
 	/* Create crypto session*/
-	rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
+	status = rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
 			ut_params->sess, &ut_params->cipher_xform,
 			ts_params->session_priv_mpool);
-	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
+
+	if (status == -ENOTSUP)
+		return TEST_SKIPPED;
+
+	TEST_ASSERT_EQUAL(status, 0, "Session init failed");
 
 	/* Generate crypto op data structure */
 	ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,
@@ -7439,6 +7445,7 @@ create_aead_session(uint8_t dev_id, enum rte_crypto_aead_algorithm algo,
 		uint8_t iv_len)
 {
 	uint8_t aead_key[key_len];
+	int status;
 
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
 	struct crypto_unittest_params *ut_params = &unittest_params;
@@ -7462,14 +7469,13 @@ create_aead_session(uint8_t dev_id, enum rte_crypto_aead_algorithm algo,
 	/* Create Crypto session*/
 	ut_params->sess = rte_cryptodev_sym_session_create(
 			ts_params->session_mpool);
+	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
 
-	rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
+	status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
 			&ut_params->aead_xform,
 			ts_params->session_priv_mpool);
 
-	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
-
-	return 0;
+	return status;
 }
 
 static int
@@ -10190,6 +10196,7 @@ static int MD5_HMAC_create_session(struct crypto_testsuite_params *ts_params,
 				   const struct HMAC_MD5_vector *test_case)
 {
 	uint8_t key[64];
+	int status;
 
 	memcpy(key, test_case->key.data, test_case->key.len);
 
@@ -10205,13 +10212,15 @@ static int MD5_HMAC_create_session(struct crypto_testsuite_params *ts_params,
 
 	ut_params->sess = rte_cryptodev_sym_session_create(
 			ts_params->session_mpool);
+	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
+	if (ut_params->sess == NULL)
+		return TEST_FAILED;
 
-	rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
+	status = rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
 			ut_params->sess, &ut_params->auth_xform,
 			ts_params->session_priv_mpool);
-
-	if (ut_params->sess == NULL)
-		return TEST_FAILED;
+	if (status == -ENOTSUP)
+		return TEST_SKIPPED;
 
 	ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
 
@@ -10424,6 +10433,7 @@ test_multi_session(void)
 	struct rte_cryptodev_sym_session **sessions;
 
 	uint16_t i;
+	int status;
 
 	/* Verify the capabilities */
 	struct rte_cryptodev_sym_capability_idx cap_idx;
@@ -10453,14 +10463,17 @@ test_multi_session(void)
 
 		sessions[i] = rte_cryptodev_sym_session_create(
 				ts_params->session_mpool);
-
-		rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
-				sessions[i], &ut_params->auth_xform,
-				ts_params->session_priv_mpool);
 		TEST_ASSERT_NOT_NULL(sessions[i],
 				"Session creation failed at session number %u",
 				i);
 
+		status = rte_cryptodev_sym_session_init(
+				ts_params->valid_devs[0],
+				sessions[i], &ut_params->auth_xform,
+				ts_params->session_priv_mpool);
+		if (status == -ENOTSUP)
+			return TEST_SKIPPED;
+
 		/* Attempt to send a request on each session */
 		TEST_ASSERT_SUCCESS( test_AES_CBC_HMAC_SHA512_decrypt_perform(
 			sessions[i],
@@ -10553,6 +10566,7 @@ test_multi_session_random_usage(void)
 		},
 
 	};
+	int status;
 
 	/* Verify the capabilities */
 	struct rte_cryptodev_sym_capability_idx cap_idx;
@@ -10576,6 +10590,9 @@ test_multi_session_random_usage(void)
 	for (i = 0; i < MB_SESSION_NUMBER; i++) {
 		sessions[i] = rte_cryptodev_sym_session_create(
 				ts_params->session_mpool);
+		TEST_ASSERT_NOT_NULL(sessions[i],
+				"Session creation failed at session number %u",
+				i);
 
 		rte_memcpy(&ut_paramz[i].ut_params, &unittest_params,
 				sizeof(struct crypto_unittest_params));
@@ -10585,16 +10602,16 @@ test_multi_session_random_usage(void)
 				ut_paramz[i].cipher_key, ut_paramz[i].hmac_key);
 
 		/* Create multiple crypto sessions*/
-		rte_cryptodev_sym_session_init(
+		status = rte_cryptodev_sym_session_init(
 				ts_params->valid_devs[0],
 				sessions[i],
 				&ut_paramz[i].ut_params.auth_xform,
 				ts_params->session_priv_mpool);
 
-		TEST_ASSERT_NOT_NULL(sessions[i],
-				"Session creation failed at session number %u",
-				i);
+		if (status == -ENOTSUP)
+			return TEST_SKIPPED;
 
+		TEST_ASSERT_EQUAL(status, 0, "Session init failed");
 	}
 
 	srand(time(NULL));
@@ -10706,6 +10723,7 @@ test_null_burst_operation(void)
 {
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
 	struct crypto_unittest_params *ut_params = &unittest_params;
+	int status;
 
 	unsigned i, burst_len = NULL_BURST_LENGTH;
 
@@ -10733,12 +10751,17 @@ test_null_burst_operation(void)
 
 	ut_params->sess = rte_cryptodev_sym_session_create(
 			ts_params->session_mpool);
+	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
 
 	/* Create Crypto session*/
-	rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
+	status = rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
 			ut_params->sess, &ut_params->cipher_xform,
 			ts_params->session_priv_mpool);
-	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
+
+	if (status == -ENOTSUP)
+		return TEST_SKIPPED;
+
+	TEST_ASSERT_EQUAL(status, 0, "Session init failed");
 
 	TEST_ASSERT_EQUAL(rte_crypto_op_bulk_alloc(ts_params->op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC, burst, burst_len),
@@ -10896,6 +10919,7 @@ static int create_gmac_session(uint8_t dev_id,
 		enum rte_crypto_auth_operation auth_op)
 {
 	uint8_t auth_key[tdata->key.len];
+	int status;
 
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
 	struct crypto_unittest_params *ut_params = &unittest_params;
@@ -10916,14 +10940,13 @@ static int create_gmac_session(uint8_t dev_id,
 
 	ut_params->sess = rte_cryptodev_sym_session_create(
 			ts_params->session_mpool);
+	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
 
-	rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
+	status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
 			&ut_params->auth_xform,
 			ts_params->session_priv_mpool);
 
-	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
-
-	return 0;
+	return status;
 }
 
 static int
@@ -10961,6 +10984,8 @@ test_AES_GMAC_authentication(const struct gmac_test_data *tdata)
 	retval = create_gmac_session(ts_params->valid_devs[0],
 			tdata, RTE_CRYPTO_AUTH_OP_GENERATE);
 
+	if (retval == -ENOTSUP)
+		return TEST_SKIPPED;
 	if (retval < 0)
 		return retval;
 
@@ -11090,6 +11115,8 @@ test_AES_GMAC_authentication_verify(const struct gmac_test_data *tdata)
 	retval = create_gmac_session(ts_params->valid_devs[0],
 			tdata, RTE_CRYPTO_AUTH_OP_VERIFY);
 
+	if (retval == -ENOTSUP)
+		return TEST_SKIPPED;
 	if (retval < 0)
 		return retval;
 
@@ -11217,6 +11244,8 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
 	retval = create_gmac_session(ts_params->valid_devs[0],
 			tdata, RTE_CRYPTO_AUTH_OP_GENERATE);
 
+	if (retval == -ENOTSUP)
+		return TEST_SKIPPED;
 	if (retval < 0)
 		return retval;
 
@@ -11546,6 +11575,7 @@ create_auth_session(struct crypto_unittest_params *ut_params,
 {
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
 	uint8_t auth_key[reference->auth_key.len + 1];
+	int status;
 
 	memcpy(auth_key, reference->auth_key.data, reference->auth_key.len);
 
@@ -11561,14 +11591,13 @@ create_auth_session(struct crypto_unittest_params *ut_params,
 	/* Create Crypto session*/
 	ut_params->sess = rte_cryptodev_sym_session_create(
 			ts_params->session_mpool);
+	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
 
-	rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
+	status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
 				&ut_params->auth_xform,
 				ts_params->session_priv_mpool);
 
-	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
-
-	return 0;
+	return status;
 }
 
 static int
@@ -11581,6 +11610,7 @@ create_auth_cipher_session(struct crypto_unittest_params *ut_params,
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
 	uint8_t cipher_key[reference->cipher_key.len + 1];
 	uint8_t auth_key[reference->auth_key.len + 1];
+	int status;
 
 	memcpy(cipher_key, reference->cipher_key.data,
 			reference->cipher_key.len);
@@ -11614,14 +11644,13 @@ create_auth_cipher_session(struct crypto_unittest_params *ut_params,
 	/* Create Crypto session*/
 	ut_params->sess = rte_cryptodev_sym_session_create(
 			ts_params->session_mpool);
+	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
 
-	rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
+	status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
 				&ut_params->auth_xform,
 				ts_params->session_priv_mpool);
 
-	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
-
-	return 0;
+	return status;
 }
 
 static int
@@ -11837,6 +11866,9 @@ test_authentication_verify_fail_when_data_corruption(
 			ts_params->valid_devs[0],
 			reference,
 			RTE_CRYPTO_AUTH_OP_VERIFY);
+
+	if (retval == -ENOTSUP)
+		return TEST_SKIPPED;
 	if (retval < 0)
 		return retval;
 
@@ -12009,6 +12041,9 @@ test_authenticated_decryption_fail_when_corruption(
 			reference,
 			RTE_CRYPTO_AUTH_OP_VERIFY,
 			RTE_CRYPTO_CIPHER_OP_DECRYPT);
+
+	if (retval == -ENOTSUP)
+		return TEST_SKIPPED;
 	if (retval < 0)
 		return retval;
 
@@ -12121,13 +12156,17 @@ test_authenticated_encrypt_with_esn(
 	/* Create Crypto session*/
 	ut_params->sess = rte_cryptodev_sym_session_create(
 			ts_params->session_mpool);
+	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
 
-	rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
+	status = rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
 				ut_params->sess,
 				&ut_params->cipher_xform,
 				ts_params->session_priv_mpool);
 
-	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
+	if (status == -ENOTSUP)
+		return TEST_SKIPPED;
+
+	TEST_ASSERT_EQUAL(status, 0, "Session init failed");
 
 	ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
 	TEST_ASSERT_NOT_NULL(ut_params->ibuf,
@@ -12203,6 +12242,7 @@ test_authenticated_decrypt_with_esn(
 	uint8_t cipher_key[reference->cipher_key.len + 1];
 	uint8_t auth_key[reference->auth_key.len + 1];
 	struct rte_cryptodev_info dev_info;
+	int status;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
 	uint64_t feat_flags = dev_info.feature_flags;
@@ -12253,13 +12293,17 @@ test_authenticated_decrypt_with_esn(
 	/* Create Crypto session*/
 	ut_params->sess = rte_cryptodev_sym_session_create(
 			ts_params->session_mpool);
+	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
 
-	rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
+	retval = rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
 				ut_params->sess,
 				&ut_params->auth_xform,
 				ts_params->session_priv_mpool);
 
-	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
+	if (retval == -ENOTSUP)
+		return TEST_SKIPPED;
+
+	TEST_ASSERT_EQUAL(retval, 0, "Session init failed");
 
 	ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
 	TEST_ASSERT_NOT_NULL(ut_params->ibuf,
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.095528780 +0800
+++ 0033-test-crypto-fix-missing-return-checks.patch	2021-11-28 22:41:03.273541825 +0800
@@ -1 +1 @@
-From 0015b149bcc59bdd5d8797c8e19c26b0f6f1b40d Mon Sep 17 00:00:00 2001
+From ce1df1c241eec4e077d0c705f59dbc878715a382 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0015b149bcc59bdd5d8797c8e19c26b0f6f1b40d ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 29e8675e30..ef0433680c 100644
+index 7a205a2b00..a655c37a10 100644
@@ -21 +23 @@
-@@ -2138,6 +2138,7 @@ test_AES_CBC_HMAC_SHA1_encrypt_digest(void)
+@@ -1675,6 +1675,7 @@ test_AES_CBC_HMAC_SHA1_encrypt_digest(void)
@@ -29 +31 @@
-@@ -2184,12 +2185,17 @@ test_AES_CBC_HMAC_SHA1_encrypt_digest(void)
+@@ -1721,12 +1722,17 @@ test_AES_CBC_HMAC_SHA1_encrypt_digest(void)
@@ -49 +51 @@
-@@ -7972,6 +7978,7 @@ create_aead_session(uint8_t dev_id, enum rte_crypto_aead_algorithm algo,
+@@ -7439,6 +7445,7 @@ create_aead_session(uint8_t dev_id, enum rte_crypto_aead_algorithm algo,
@@ -57 +59 @@
-@@ -7995,14 +8002,13 @@ create_aead_session(uint8_t dev_id, enum rte_crypto_aead_algorithm algo,
+@@ -7462,14 +7469,13 @@ create_aead_session(uint8_t dev_id, enum rte_crypto_aead_algorithm algo,
@@ -75 +77 @@
-@@ -11103,6 +11109,7 @@ static int MD5_HMAC_create_session(struct crypto_testsuite_params *ts_params,
+@@ -10190,6 +10196,7 @@ static int MD5_HMAC_create_session(struct crypto_testsuite_params *ts_params,
@@ -83 +85 @@
-@@ -11118,13 +11125,15 @@ static int MD5_HMAC_create_session(struct crypto_testsuite_params *ts_params,
+@@ -10205,13 +10212,15 @@ static int MD5_HMAC_create_session(struct crypto_testsuite_params *ts_params,
@@ -103 +105 @@
-@@ -11337,6 +11346,7 @@ test_multi_session(void)
+@@ -10424,6 +10433,7 @@ test_multi_session(void)
@@ -111 +113 @@
-@@ -11366,14 +11376,17 @@ test_multi_session(void)
+@@ -10453,14 +10463,17 @@ test_multi_session(void)
@@ -133 +135 @@
-@@ -11466,6 +11479,7 @@ test_multi_session_random_usage(void)
+@@ -10553,6 +10566,7 @@ test_multi_session_random_usage(void)
@@ -141 +143 @@
-@@ -11489,6 +11503,9 @@ test_multi_session_random_usage(void)
+@@ -10576,6 +10590,9 @@ test_multi_session_random_usage(void)
@@ -151 +153 @@
-@@ -11498,16 +11515,16 @@ test_multi_session_random_usage(void)
+@@ -10585,16 +10602,16 @@ test_multi_session_random_usage(void)
@@ -172 +174 @@
-@@ -11619,6 +11636,7 @@ test_null_burst_operation(void)
+@@ -10706,6 +10723,7 @@ test_null_burst_operation(void)
@@ -180 +182 @@
-@@ -11646,12 +11664,17 @@ test_null_burst_operation(void)
+@@ -10733,12 +10751,17 @@ test_null_burst_operation(void)
@@ -200 +202 @@
-@@ -12049,6 +12072,7 @@ static int create_gmac_session(uint8_t dev_id,
+@@ -10896,6 +10919,7 @@ static int create_gmac_session(uint8_t dev_id,
@@ -208 +210 @@
-@@ -12069,14 +12093,13 @@ static int create_gmac_session(uint8_t dev_id,
+@@ -10916,14 +10940,13 @@ static int create_gmac_session(uint8_t dev_id,
@@ -226 +228 @@
-@@ -12114,6 +12137,8 @@ test_AES_GMAC_authentication(const struct gmac_test_data *tdata)
+@@ -10961,6 +10984,8 @@ test_AES_GMAC_authentication(const struct gmac_test_data *tdata)
@@ -235 +237 @@
-@@ -12243,6 +12268,8 @@ test_AES_GMAC_authentication_verify(const struct gmac_test_data *tdata)
+@@ -11090,6 +11115,8 @@ test_AES_GMAC_authentication_verify(const struct gmac_test_data *tdata)
@@ -244 +246 @@
-@@ -12370,6 +12397,8 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
+@@ -11217,6 +11244,8 @@ test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata,
@@ -253 +255 @@
-@@ -12699,6 +12728,7 @@ create_auth_session(struct crypto_unittest_params *ut_params,
+@@ -11546,6 +11575,7 @@ create_auth_session(struct crypto_unittest_params *ut_params,
@@ -261 +263 @@
-@@ -12714,14 +12744,13 @@ create_auth_session(struct crypto_unittest_params *ut_params,
+@@ -11561,14 +11591,13 @@ create_auth_session(struct crypto_unittest_params *ut_params,
@@ -279 +281 @@
-@@ -12734,6 +12763,7 @@ create_auth_cipher_session(struct crypto_unittest_params *ut_params,
+@@ -11581,6 +11610,7 @@ create_auth_cipher_session(struct crypto_unittest_params *ut_params,
@@ -287 +289 @@
-@@ -12767,14 +12797,13 @@ create_auth_cipher_session(struct crypto_unittest_params *ut_params,
+@@ -11614,14 +11644,13 @@ create_auth_cipher_session(struct crypto_unittest_params *ut_params,
@@ -305 +307 @@
-@@ -12990,6 +13019,9 @@ test_authentication_verify_fail_when_data_corruption(
+@@ -11837,6 +11866,9 @@ test_authentication_verify_fail_when_data_corruption(
@@ -315 +317 @@
-@@ -13165,6 +13197,9 @@ test_authenticated_decryption_fail_when_corruption(
+@@ -12009,6 +12041,9 @@ test_authenticated_decryption_fail_when_corruption(
@@ -325,9 +327 @@
-@@ -13226,6 +13261,7 @@ test_authenticated_encrypt_with_esn(
- 	uint8_t cipher_key[reference->cipher_key.len + 1];
- 	uint8_t auth_key[reference->auth_key.len + 1];
- 	struct rte_cryptodev_info dev_info;
-+	int status;
- 
- 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- 	uint64_t feat_flags = dev_info.feature_flags;
-@@ -13277,13 +13313,17 @@ test_authenticated_encrypt_with_esn(
+@@ -12121,13 +12156,17 @@ test_authenticated_encrypt_with_esn(
@@ -353 +347,9 @@
-@@ -13409,13 +13449,17 @@ test_authenticated_decrypt_with_esn(
+@@ -12203,6 +12242,7 @@ test_authenticated_decrypt_with_esn(
+ 	uint8_t cipher_key[reference->cipher_key.len + 1];
+ 	uint8_t auth_key[reference->auth_key.len + 1];
+ 	struct rte_cryptodev_info dev_info;
++	int status;
+ 
+ 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
+ 	uint64_t feat_flags = dev_info.feature_flags;
+@@ -12253,13 +12293,17 @@ test_authenticated_decrypt_with_esn(

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'common/cpt: fix KASUMI input length' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (32 preceding siblings ...)
  2021-11-28 14:53   ` patch 'test/crypto: fix missing return checks' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'test/crypto: remove unnecessary stats retrieval' " Xueming Li
                     ` (44 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Anoob Joseph; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0619333182a0429a6450bd41324c0c12158c7e92

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0619333182a0429a6450bd41324c0c12158c7e92 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Thu, 11 Nov 2021 17:18:42 +0530
Subject: [PATCH] common/cpt: fix KASUMI input length
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d937e872023373266e21784027938851533c6459 ]

Fix kasumi input len calculation to consider encr_offset.

Fixes: da39e3eccd3d ("common/cpt: support KASUMI")

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 drivers/common/cpt/cpt_ucode.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index 0536620710..9c22ee75d2 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -2248,7 +2248,7 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
 	/* consider iv len */
 	encr_offset += iv_len;
 
-	inputlen = iv_len + (RTE_ALIGN(encr_data_len, 8) / 8);
+	inputlen = encr_offset + (RTE_ALIGN(encr_data_len, 8) / 8);
 	outputlen = inputlen;
 
 	/* save space for offset ctrl & iv */
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.146807681 +0800
+++ 0034-common-cpt-fix-KASUMI-input-length.patch	2021-11-28 22:41:03.273541825 +0800
@@ -1 +1 @@
-From d937e872023373266e21784027938851533c6459 Mon Sep 17 00:00:00 2001
+From 0619333182a0429a6450bd41324c0c12158c7e92 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d937e872023373266e21784027938851533c6459 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index 006411cd89..e015cf66a1 100644
+index 0536620710..9c22ee75d2 100644
@@ -20 +22 @@
-@@ -2311,7 +2311,7 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
+@@ -2248,7 +2248,7 @@ cpt_kasumi_dec_prep(uint64_t d_offs,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'test/crypto: remove unnecessary stats retrieval' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (33 preceding siblings ...)
  2021-11-28 14:53   ` patch 'common/cpt: fix KASUMI input length' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'examples/l3fwd-power: fix early shutdown' " Xueming Li
                     ` (43 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Ciara Power; +Cc: Luca Boccassi, Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8d0932f280f78fefac50f1f4478281a937004cde

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8d0932f280f78fefac50f1f4478281a937004cde Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Thu, 11 Nov 2021 10:56:19 +0000
Subject: [PATCH] test/crypto: remove unnecessary stats retrieval
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c0daf3bd4b4e36375f8c338092975d61ec03a98f ]

The device stats are retrieved in the testcase teardown function,
but are not being used afterwards. Remove this unnecessary call.
The stats retrieval for the device is being tested already by a
dedicated stats testcase.

Fixes: 202d375c60bc ("app/test: add cryptodev unit and performance tests")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
 app/test/test_cryptodev.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index a655c37a10..4dc2a597ff 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -954,7 +954,6 @@ ut_teardown(void)
 {
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
 	struct crypto_unittest_params *ut_params = &unittest_params;
-	struct rte_cryptodev_stats stats;
 
 	/* free crypto session structure */
 #ifdef RTE_LIB_SECURITY
@@ -1001,8 +1000,6 @@ ut_teardown(void)
 		RTE_LOG(DEBUG, USER1, "CRYPTO_MBUFPOOL count %u\n",
 			rte_mempool_avail_count(ts_params->mbuf_pool));
 
-	rte_cryptodev_stats_get(ts_params->valid_devs[0], &stats);
-
 	/* Stop the device */
 	rte_cryptodev_stop(ts_params->valid_devs[0]);
 }
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.189960833 +0800
+++ 0035-test-crypto-remove-unnecessary-stats-retrieval.patch	2021-11-28 22:41:03.283541644 +0800
@@ -1 +1 @@
-From c0daf3bd4b4e36375f8c338092975d61ec03a98f Mon Sep 17 00:00:00 2001
+From 8d0932f280f78fefac50f1f4478281a937004cde Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c0daf3bd4b4e36375f8c338092975d61ec03a98f ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index ef0433680c..10b48cdadb 100644
+index a655c37a10..4dc2a597ff 100644
@@ -24 +26 @@
-@@ -1417,7 +1417,6 @@ ut_teardown(void)
+@@ -954,7 +954,6 @@ ut_teardown(void)
@@ -32 +34 @@
-@@ -1464,8 +1463,6 @@ ut_teardown(void)
+@@ -1001,8 +1000,6 @@ ut_teardown(void)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'examples/l3fwd-power: fix early shutdown' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (34 preceding siblings ...)
  2021-11-28 14:53   ` patch 'test/crypto: remove unnecessary stats retrieval' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'examples/multi_process: fix Rx packets distribution' " Xueming Li
                     ` (42 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Harneet Singh; +Cc: Luca Boccassi, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e4f79de95a24b9d6030957cef4826623abd664f3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e4f79de95a24b9d6030957cef4826623abd664f3 Mon Sep 17 00:00:00 2001
From: Harneet Singh <harneet.singh@intel.com>
Date: Fri, 29 Oct 2021 14:05:56 +0000
Subject: [PATCH] examples/l3fwd-power: fix early shutdown
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 19781e7a038ac3fdae4d71904268daa6ee399001 ]

Currently, EAL init cannot be interrupted with SIGINT because the
signal handler is already overridden by the time EAL init happens.

Fix it by moving signal handler installation to after EAL
initialization, to allow SIGNIT to interrupt EAL initialization.

Fixes: d7937e2e3d12 ("power: initial import")
Fixes: 613ce6691c0d ("examples/l3fwd-power: implement proper shutdown")

Signed-off-by: Harneet Singh <harneet.singh@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 examples/l3fwd-power/main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index 43f14104a3..0cfcff7da0 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -2464,9 +2464,6 @@ main(int argc, char **argv)
 	uint16_t portid;
 	const char *ptr_strings[NUM_TELSTATS];
 
-	/* catch SIGINT and restore cpufreq governor to ondemand */
-	signal(SIGINT, signal_exit_now);
-
 	/* init EAL */
 	ret = rte_eal_init(argc, argv);
 	if (ret < 0)
@@ -2474,6 +2471,9 @@ main(int argc, char **argv)
 	argc -= ret;
 	argv += ret;
 
+	/* catch SIGINT and restore cpufreq governor to ondemand */
+	signal(SIGINT, signal_exit_now);
+
 	/* init RTE timer library to be used late */
 	rte_timer_subsystem_init();
 
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.239855636 +0800
+++ 0036-examples-l3fwd-power-fix-early-shutdown.patch	2021-11-28 22:41:03.286874917 +0800
@@ -1 +1 @@
-From 19781e7a038ac3fdae4d71904268daa6ee399001 Mon Sep 17 00:00:00 2001
+From e4f79de95a24b9d6030957cef4826623abd664f3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 19781e7a038ac3fdae4d71904268daa6ee399001 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 6988a0ed34..b8b3be2b8a 100644
+index 43f14104a3..0cfcff7da0 100644
@@ -26 +28 @@
-@@ -2540,9 +2540,6 @@ main(int argc, char **argv)
+@@ -2464,9 +2464,6 @@ main(int argc, char **argv)
@@ -36 +38 @@
-@@ -2550,6 +2547,9 @@ main(int argc, char **argv)
+@@ -2474,6 +2471,9 @@ main(int argc, char **argv)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'examples/multi_process: fix Rx packets distribution' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (35 preceding siblings ...)
  2021-11-28 14:53   ` patch 'examples/l3fwd-power: fix early shutdown' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'fix spelling in comments and doxygen' " Xueming Li
                     ` (41 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Luca Boccassi, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/bb4c5550b15b4b26cffa97f7122d93569d87316c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bb4c5550b15b4b26cffa97f7122d93569d87316c Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Wed, 10 Nov 2021 18:57:59 +0200
Subject: [PATCH] examples/multi_process: fix Rx packets distribution
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 69f9d8aa357d2299e057b7e335f340e20a0c5e7e ]

MP servers distributes Rx packets between clients according to
round-robin scheme.

Current implementation always started packets distribution from
the first client. That procedure resulted in uniform distribution
in cases when Rx packets number was around clients number
multiplication. However, if RX burst repeatedly returned single
packet, round-robin scheme would not work because all packets
were assigned to the first client only.

The patch does not restart packets distribution from
the first client.
Packets distribution always continues to the next client.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 examples/multi_process/client_server_mp/mp_server/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/multi_process/client_server_mp/mp_server/main.c b/examples/multi_process/client_server_mp/mp_server/main.c
index 9bcee460fd..89a996eb58 100644
--- a/examples/multi_process/client_server_mp/mp_server/main.c
+++ b/examples/multi_process/client_server_mp/mp_server/main.c
@@ -233,7 +233,7 @@ process_packets(uint32_t port_num __rte_unused,
 		struct rte_mbuf *pkts[], uint16_t rx_count)
 {
 	uint16_t i;
-	uint8_t client = 0;
+	static uint8_t client;
 
 	for (i = 0; i < rx_count; i++) {
 		enqueue_rx_packet(client, pkts[i]);
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.281707508 +0800
+++ 0037-examples-multi_process-fix-Rx-packets-distribution.patch	2021-11-28 22:41:03.286874917 +0800
@@ -1 +1 @@
-From 69f9d8aa357d2299e057b7e335f340e20a0c5e7e Mon Sep 17 00:00:00 2001
+From bb4c5550b15b4b26cffa97f7122d93569d87316c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 69f9d8aa357d2299e057b7e335f340e20a0c5e7e ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index b4761ebc7b..f54bb8b75a 100644
+index 9bcee460fd..89a996eb58 100644
@@ -33 +35 @@
-@@ -234,7 +234,7 @@ process_packets(uint32_t port_num __rte_unused,
+@@ -233,7 +233,7 @@ process_packets(uint32_t port_num __rte_unused,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'fix spelling in comments and doxygen' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (36 preceding siblings ...)
  2021-11-28 14:53   ` patch 'examples/multi_process: fix Rx packets distribution' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'config/x86: skip GNU binutils bug check for LLVM' " Xueming Li
                     ` (40 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Luca Boccassi, Konstantin Ananyev, Vladimir Medvedkin,
	Honnappa Nagarahalli, Ray Kinsella, Cristian Dumitrescu,
	Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ea5ee2019838a5cfad689bda039ca0b9fda425e0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ea5ee2019838a5cfad689bda039ca0b9fda425e0 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 11 Nov 2021 16:02:09 -0800
Subject: [PATCH] fix spelling in comments and doxygen
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4a6672c2d301c105189ae74de73260af204c5ee8 ]

Fix spelling errors in comments including doxygen found using codespell.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
---
 app/test-pmd/cmdline.c                           |  2 +-
 app/test-pmd/config.c                            |  4 ++--
 app/test-pmd/icmpecho.c                          |  2 +-
 app/test/test_atomic.c                           |  2 +-
 app/test/test_barrier.c                          |  2 +-
 app/test/test_bpf.c                              |  2 +-
 app/test/test_compressdev.c                      |  2 +-
 app/test/test_func_reentrancy.c                  |  6 +++---
 app/test/test_ipsec.c                            |  2 +-
 app/test/test_link_bonding.c                     |  2 +-
 app/test/test_lpm.c                              |  6 +++---
 app/test/test_lpm6.c                             | 14 +++++++-------
 app/test/test_malloc.c                           |  4 ++--
 app/test/test_mbuf.c                             |  2 +-
 app/test/test_mempool.c                          |  2 +-
 app/test/test_mempool_perf.c                     |  2 +-
 app/test/test_meter.c                            |  6 +++---
 app/test/test_pmd_perf.c                         |  2 +-
 app/test/test_timer.c                            |  2 +-
 lib/librte_acl/acl.h                             |  4 ++--
 lib/librte_acl/acl_bld.c                         |  2 +-
 lib/librte_acl/acl_run_avx2.h                    |  2 +-
 lib/librte_bbdev/rte_bbdev.c                     |  2 +-
 lib/librte_bpf/bpf_jit_x86.c                     |  2 +-
 lib/librte_bpf/bpf_load_elf.c                    |  2 +-
 lib/librte_bpf/bpf_pkt.c                         |  2 +-
 lib/librte_bpf/bpf_validate.c                    |  8 ++++----
 lib/librte_eal/include/rte_function_versioning.h |  2 +-
 lib/librte_eal/windows/include/fnmatch.h         |  2 +-
 lib/librte_eventdev/rte_event_timer_adapter.c    |  2 +-
 lib/librte_ip_frag/rte_ipv4_reassembly.c         |  2 +-
 lib/librte_ipsec/esp_inb.c                       |  4 ++--
 lib/librte_ipsec/esp_outb.c                      |  2 +-
 lib/librte_ipsec/ipsec_sad.c                     |  2 +-
 lib/librte_ipsec/sa.c                            |  2 +-
 lib/librte_ipsec/sa.h                            |  2 +-
 lib/librte_net/rte_gtp.h                         |  6 +++---
 lib/librte_node/ethdev_rx_priv.h                 |  2 +-
 lib/librte_node/ethdev_tx_priv.h                 |  2 +-
 lib/librte_node/ip4_rewrite_priv.h               |  2 +-
 lib/librte_power/power_acpi_cpufreq.c            |  2 +-
 lib/librte_rcu/rte_rcu_qsbr.h                    |  2 +-
 lib/librte_rib/rte_rib6.c                        |  2 +-
 lib/librte_sched/rte_sched.c                     |  2 +-
 lib/librte_vhost/rte_vhost.h                     |  4 ++--
 45 files changed, 67 insertions(+), 67 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 58ebff5502..22283bc355 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -3551,7 +3551,7 @@ parse_item_list(char* str, const char* item_name, unsigned int max_items,
 		return nb_item;
 
 	/*
-	 * Then, check that all values in the list are differents.
+	 * Then, check that all values in the list are different.
 	 * No optimization here...
 	 */
 	for (i = 0; i < nb_item; i++) {
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 29c5f37222..22da15e51d 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2912,7 +2912,7 @@ port_rss_reta_info(portid_t port_id,
 }
 
 /*
- * Displays the RSS hash functions of a port, and, optionaly, the RSS hash
+ * Displays the RSS hash functions of a port, and, optionally, the RSS hash
  * key of the port.
  */
 void
@@ -5053,7 +5053,7 @@ mcast_addr_pool_remove(struct rte_port *port, uint32_t addr_idx)
 {
 	port->mc_addr_nb--;
 	if (addr_idx == port->mc_addr_nb) {
-		/* No need to recompact the set of multicast addressses. */
+		/* No need to recompact the set of multicast addresses. */
 		if (port->mc_addr_nb == 0) {
 			/* free the pool of multicast addresses. */
 			free(port->mc_addr_pool);
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index af6f7e7902..a7b568e46e 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -54,7 +54,7 @@ arp_op_name(uint16_t arp_op)
 	default:
 		break;
 	}
-	return "Unkwown ARP op";
+	return "Unknown ARP op";
 }
 
 static const char *
diff --git a/app/test/test_atomic.c b/app/test/test_atomic.c
index ce0c259bd7..e4b997827e 100644
--- a/app/test/test_atomic.c
+++ b/app/test/test_atomic.c
@@ -88,7 +88,7 @@
  *
  *   - Invoke ``test_atomic_exchange`` on each lcore.  Before doing
  *     anything else, the cores wait for a synchronization event.
- *     Each core then does the follwoing for N iterations:
+ *     Each core then does the following for N iterations:
  *
  *       Generate a new token with a data integrity check
  *       Exchange the new token for previously generated token
diff --git a/app/test/test_barrier.c b/app/test/test_barrier.c
index c27f8a0742..8fa93c0032 100644
--- a/app/test/test_barrier.c
+++ b/app/test/test_barrier.c
@@ -66,7 +66,7 @@ struct plock_test {
 struct lcore_plock_test {
 	struct plock_test *pt[2]; /* shared, lock-protected data */
 	uint64_t sum[2];          /* local copy of the shared data */
-	uint64_t iter;            /* number of iterations to perfom */
+	uint64_t iter;            /* number of iterations to perform */
 	uint32_t lc;              /* given lcore id */
 };
 
diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c
index 7002c6a734..b5149dd842 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -2406,7 +2406,7 @@ static const struct ebpf_insn test_call5_prog[] = {
 	},
 };
 
-/* String comparision impelementation, return 0 if equal else difference */
+/* String comparison implementation, return 0 if equal else difference */
 static uint32_t
 dummy_func5(const char *s1, const char *s2)
 {
diff --git a/app/test/test_compressdev.c b/app/test/test_compressdev.c
index a1b9f06250..c63b5b6737 100644
--- a/app/test/test_compressdev.c
+++ b/app/test/test_compressdev.c
@@ -2033,7 +2033,7 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,
 	test_priv_data.all_decomp_data = &all_decomp_data;
 	test_priv_data.decomp_produced_data_size = &decomp_produced_data_size;
 
-	test_priv_data.num_priv_xforms = 0; /* it's used for deompression only */
+	test_priv_data.num_priv_xforms = 0; /* it's used for decompression only */
 
 	capa = rte_compressdev_capability_get(0, RTE_COMP_ALGO_DEFLATE);
 	if (capa == NULL) {
diff --git a/app/test/test_func_reentrancy.c b/app/test/test_func_reentrancy.c
index 838ab6f0f9..36e83bc587 100644
--- a/app/test/test_func_reentrancy.c
+++ b/app/test/test_func_reentrancy.c
@@ -253,7 +253,7 @@ hash_create_free(__rte_unused void *arg)
 			rte_atomic32_inc(&obj_count);
 	}
 
-	/* create mutiple times simultaneously */
+	/* create multiple times simultaneously */
 	for (i = 0; i < MAX_ITER_MULTI; i++) {
 		snprintf(hash_name, sizeof(hash_name), "fr_test_%d_%d", lcore_self, i);
 		hash_params.name = hash_name;
@@ -321,7 +321,7 @@ fbk_create_free(__rte_unused void *arg)
 			rte_atomic32_inc(&obj_count);
 	}
 
-	/* create mutiple fbk tables simultaneously */
+	/* create multiple fbk tables simultaneously */
 	for (i = 0; i < MAX_ITER_MULTI; i++) {
 		snprintf(fbk_name, sizeof(fbk_name), "fr_test_%d_%d", lcore_self, i);
 		fbk_params.name = fbk_name;
@@ -387,7 +387,7 @@ lpm_create_free(__rte_unused void *arg)
 			rte_atomic32_inc(&obj_count);
 	}
 
-	/* create mutiple fbk tables simultaneously */
+	/* create multiple fbk tables simultaneously */
 	for (i = 0; i < MAX_LPM_ITER_TIMES; i++) {
 		snprintf(lpm_name, sizeof(lpm_name), "fr_test_%d_%d", lcore_self, i);
 		lpm = rte_lpm_create(lpm_name, SOCKET_ID_ANY, &config);
diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index d18220a885..fc77539bc7 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -654,7 +654,7 @@ create_crypto_session(struct ipsec_unitest_params *ut,
 	if (s == NULL)
 		return -ENOMEM;
 
-	/* initiliaze SA crypto session for device */
+	/* initialize SA crypto session for device */
 	rc = rte_cryptodev_sym_session_init(dev_id, s,
 			ut->crypto_xforms, qp->mp_session_private);
 	if (rc == 0) {
diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
index e8b76bd850..868bf94301 100644
--- a/app/test/test_link_bonding.c
+++ b/app/test/test_link_bonding.c
@@ -3041,7 +3041,7 @@ test_balance_tx_burst_slave_tx_fail(void)
 	first_tx_fail_idx = TEST_BAL_SLAVE_TX_FAIL_BURST_SIZE_1 -
 			TEST_BAL_SLAVE_TX_FAIL_PACKETS_COUNT;
 
-	/* copy mbuf referneces for expected transmission failures */
+	/* copy mbuf references for expected transmission failures */
 	for (i = 0; i < TEST_BAL_SLAVE_TX_FAIL_PACKETS_COUNT; i++)
 		expected_fail_pkts[i] = pkts_burst_1[i + first_tx_fail_idx];
 
diff --git a/app/test/test_lpm.c b/app/test/test_lpm.c
index 258b2f67c7..bee8307caa 100644
--- a/app/test/test_lpm.c
+++ b/app/test/test_lpm.c
@@ -179,7 +179,7 @@ test3(void)
 	status = rte_lpm_add(NULL, ip, depth, next_hop);
 	TEST_LPM_ASSERT(status < 0);
 
-	/*Create vaild lpm to use in rest of test. */
+	/*Create valid lpm to use in rest of test. */
 	lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, &config);
 	TEST_LPM_ASSERT(lpm != NULL);
 
@@ -217,7 +217,7 @@ test4(void)
 	status = rte_lpm_delete(NULL, ip, depth);
 	TEST_LPM_ASSERT(status < 0);
 
-	/*Create vaild lpm to use in rest of test. */
+	/*Create valid lpm to use in rest of test. */
 	lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, &config);
 	TEST_LPM_ASSERT(lpm != NULL);
 
@@ -255,7 +255,7 @@ test5(void)
 	status = rte_lpm_lookup(NULL, ip, &next_hop_return);
 	TEST_LPM_ASSERT(status < 0);
 
-	/*Create vaild lpm to use in rest of test. */
+	/*Create valid lpm to use in rest of test. */
 	lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, &config);
 	TEST_LPM_ASSERT(lpm != NULL);
 
diff --git a/app/test/test_lpm6.c b/app/test/test_lpm6.c
index 0d664546fa..17221f992a 100644
--- a/app/test/test_lpm6.c
+++ b/app/test/test_lpm6.c
@@ -261,7 +261,7 @@ test4(void)
 	status = rte_lpm6_add(NULL, ip, depth, next_hop);
 	TEST_LPM_ASSERT(status < 0);
 
-	/*Create vaild lpm to use in rest of test. */
+	/*Create valid lpm to use in rest of test. */
 	lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
 	TEST_LPM_ASSERT(lpm != NULL);
 
@@ -299,7 +299,7 @@ test5(void)
 	status = rte_lpm6_delete(NULL, ip, depth);
 	TEST_LPM_ASSERT(status < 0);
 
-	/*Create vaild lpm to use in rest of test. */
+	/*Create valid lpm to use in rest of test. */
 	lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
 	TEST_LPM_ASSERT(lpm != NULL);
 
@@ -337,7 +337,7 @@ test6(void)
 	status = rte_lpm6_lookup(NULL, ip, &next_hop_return);
 	TEST_LPM_ASSERT(status < 0);
 
-	/*Create vaild lpm to use in rest of test. */
+	/*Create valid lpm to use in rest of test. */
 	lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
 	TEST_LPM_ASSERT(lpm != NULL);
 
@@ -375,7 +375,7 @@ test7(void)
 	status = rte_lpm6_lookup_bulk_func(NULL, ip, next_hop_return, 10);
 	TEST_LPM_ASSERT(status < 0);
 
-	/*Create vaild lpm to use in rest of test. */
+	/*Create valid lpm to use in rest of test. */
 	lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
 	TEST_LPM_ASSERT(lpm != NULL);
 
@@ -413,7 +413,7 @@ test8(void)
 	status = rte_lpm6_delete_bulk_func(NULL, ip, depth, 10);
 	TEST_LPM_ASSERT(status < 0);
 
-	/*Create vaild lpm to use in rest of test. */
+	/*Create valid lpm to use in rest of test. */
 	lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
 	TEST_LPM_ASSERT(lpm != NULL);
 
@@ -433,7 +433,7 @@ test8(void)
 /*
  * Call add, lookup and delete for a single rule with depth < 24.
  * Check all the combinations for the first three bytes that result in a hit.
- * Delete the rule and check that the same test returs a miss.
+ * Delete the rule and check that the same test returns a miss.
  */
 int32_t
 test9(void)
@@ -1738,7 +1738,7 @@ test27(void)
  * Call add, lookup and delete for a single rule with maximum 21bit next_hop
  * size.
  * Check that next_hop returned from lookup is equal to provisioned value.
- * Delete the rule and check that the same test returs a miss.
+ * Delete the rule and check that the same test returns a miss.
  */
 int32_t
 test28(void)
diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c
index afff0de9f0..6d9249f831 100644
--- a/app/test/test_malloc.c
+++ b/app/test/test_malloc.c
@@ -603,7 +603,7 @@ test_realloc_numa(void)
 		}
 	}
 
-	/* Print warnign if only a single socket, but don't fail the test */
+	/* Print warning if only a single socket, but don't fail the test */
 	if (socket_count < 2)
 		printf("WARNING: realloc_socket test needs memory on multiple sockets!\n");
 
@@ -971,7 +971,7 @@ test_alloc_socket(void)
 		}
 	}
 
-	/* Print warnign if only a single socket, but don't fail the test */
+	/* Print warning if only a single socket, but don't fail the test */
 	if (socket_count < 2) {
 		printf("WARNING: alloc_socket test needs memory on multiple sockets!\n");
 	}
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index a6c11dd5b1..1bfaa029ba 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -1148,7 +1148,7 @@ test_refcnt_mbuf(void)
 
 	rte_eal_mp_wait_lcore();
 
-	/* check that we porcessed all references */
+	/* check that we processed all references */
 	tref = 0;
 	main_lcore = rte_get_main_lcore();
 
diff --git a/app/test/test_mempool.c b/app/test/test_mempool.c
index 3adadd6731..9b0236e30a 100644
--- a/app/test/test_mempool.c
+++ b/app/test/test_mempool.c
@@ -633,7 +633,7 @@ test_mempool(void)
 	if (test_mempool_basic_ex(mp_nocache) < 0)
 		GOTO_ERR(ret, err);
 
-	/* mempool operation test based on single producer and single comsumer */
+	/* mempool operation test based on single producer and single consumer */
 	if (test_mempool_sp_sc() < 0)
 		GOTO_ERR(ret, err);
 
diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c
index d7d0aaa334..7c0c280fce 100644
--- a/app/test/test_mempool_perf.c
+++ b/app/test/test_mempool_perf.c
@@ -89,7 +89,7 @@ static rte_atomic32_t synchro;
 static unsigned n_get_bulk;
 static unsigned n_put_bulk;
 
-/* number of objects retrived from mempool before putting them back */
+/* number of objects retrieved from mempool before putting them back */
 static unsigned n_keep;
 
 /* number of enqueues / dequeues */
diff --git a/app/test/test_meter.c b/app/test/test_meter.c
index f6fe6494ab..15d5a4839b 100644
--- a/app/test/test_meter.c
+++ b/app/test/test_meter.c
@@ -444,7 +444,7 @@ tm_test_srtcm_color_aware_check(void)
 	  * if using blind check
 	  */
 
-	/* previouly have a green, test points should keep unchanged */
+	/* previously have a green, test points should keep unchanged */
 	in[0] = in[1] = in[2] = in[3] = RTE_COLOR_GREEN;
 	out[0] = RTE_COLOR_GREEN;
 	out[1] = RTE_COLOR_YELLOW;
@@ -551,7 +551,7 @@ tm_test_trtcm_color_aware_check(void)
 	  * if using blind check
 	  */
 
-	/* previouly have a green, test points should keep unchanged */
+	/* previously have a green, test points should keep unchanged */
 	in[0] = in[1] = in[2] = in[3] = RTE_COLOR_GREEN;
 	out[0] = RTE_COLOR_GREEN;
 	out[1] = RTE_COLOR_YELLOW;
@@ -648,7 +648,7 @@ tm_test_trtcm_rfc4115_color_aware_check(void)
 	  * if using blind check
 	  */
 
-	/* previouly have a green, test points should keep unchanged */
+	/* previously have a green, test points should keep unchanged */
 	in[0] = in[1] = in[2] = in[3] = RTE_COLOR_GREEN;
 	out[0] = RTE_COLOR_GREEN;
 	out[1] = RTE_COLOR_YELLOW;
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 3a248d512c..1ef844ba75 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -753,7 +753,7 @@ test_pmd_perf(void)
 				"rte_eth_dev_start: err=%d, port=%d\n",
 				ret, portid);
 
-		/* always eanble promiscuous */
+		/* always enable promiscuous */
 		ret = rte_eth_promiscuous_enable(portid);
 		if (ret != 0)
 			rte_exit(EXIT_FAILURE,
diff --git a/app/test/test_timer.c b/app/test/test_timer.c
index a10b2fe9da..631b737d16 100644
--- a/app/test/test_timer.c
+++ b/app/test/test_timer.c
@@ -432,7 +432,7 @@ timer_basic_cb(struct rte_timer *tim, void *arg)
 		return;
 	}
 
-	/* Explicitelly stop timer 0. Once stop() called, we can even
+	/* Explicitly stop timer 0. Once stop() called, we can even
 	 * erase the content of the structure: it is not referenced
 	 * anymore by any code (in case of dynamic structure, it can
 	 * be freed) */
diff --git a/lib/librte_acl/acl.h b/lib/librte_acl/acl.h
index 4089ab2a04..f5739a475c 100644
--- a/lib/librte_acl/acl.h
+++ b/lib/librte_acl/acl.h
@@ -45,7 +45,7 @@ struct rte_acl_bitset {
  * Each transition is 64 bit value with the following format:
  * | node_type_specific : 32 | node_type : 3 | node_addr : 29 |
  * For all node types except RTE_ACL_NODE_MATCH, node_addr is an index
- * to the start of the node in the transtions array.
+ * to the start of the node in the transitions array.
  * Few different node types are used:
  * RTE_ACL_NODE_MATCH:
  * node_addr value is and index into an array that contains the return value
@@ -66,7 +66,7 @@ struct rte_acl_bitset {
  * RTE_ACL_NODE_SINGLE:
  * always transitions to the same node regardless of the input value.
  * RTE_ACL_NODE_DFA:
- * that node consits of up to 256 transitions.
+ * that node consists of up to 256 transitions.
  * In attempt to conserve space all transitions are divided into 4 consecutive
  * groups, by 64 transitions per group:
  * group64[i] contains transitions[i * 64, .. i * 64 + 63].
diff --git a/lib/librte_acl/acl_bld.c b/lib/librte_acl/acl_bld.c
index da10864cd8..f316d3e875 100644
--- a/lib/librte_acl/acl_bld.c
+++ b/lib/librte_acl/acl_bld.c
@@ -1494,7 +1494,7 @@ acl_set_data_indexes(struct rte_acl_ctx *ctx)
 /*
  * Internal routine, performs 'build' phase of trie generation:
  * - setups build context.
- * - analizes given set of rules.
+ * - analyzes given set of rules.
  * - builds internal tree(s).
  */
 static int
diff --git a/lib/librte_acl/acl_run_avx2.h b/lib/librte_acl/acl_run_avx2.h
index d06d2e8782..0b8967f22e 100644
--- a/lib/librte_acl/acl_run_avx2.h
+++ b/lib/librte_acl/acl_run_avx2.h
@@ -125,7 +125,7 @@ acl_process_matches_avx2x8(const struct rte_acl_ctx *ctx,
 	/* For each transition: put low 32 into tr_lo and high 32 into tr_hi */
 	ACL_TR_HILO(mm256, __m256, t0, t1, lo, hi);
 
-	/* Keep transitions wth NOMATCH intact. */
+	/* Keep transitions with NOMATCH intact. */
 	*tr_lo = _mm256_blendv_epi8(*tr_lo, lo, matches);
 	*tr_hi = _mm256_blendv_epi8(*tr_hi, hi, matches);
 }
diff --git a/lib/librte_bbdev/rte_bbdev.c b/lib/librte_bbdev/rte_bbdev.c
index 5ba891c232..310de3761d 100644
--- a/lib/librte_bbdev/rte_bbdev.c
+++ b/lib/librte_bbdev/rte_bbdev.c
@@ -138,7 +138,7 @@ rte_bbdev_data_alloc(void)
 }
 
 /*
- * Find data alocated for the device or if not found return first unused bbdev
+ * Find data allocated for the device or if not found return first unused bbdev
  * data. If all structures are in use and none is used by the device return
  * NULL.
  */
diff --git a/lib/librte_bpf/bpf_jit_x86.c b/lib/librte_bpf/bpf_jit_x86.c
index aa22ea78a0..518513376a 100644
--- a/lib/librte_bpf/bpf_jit_x86.c
+++ b/lib/librte_bpf/bpf_jit_x86.c
@@ -1245,7 +1245,7 @@ emit_epilog(struct bpf_jit_state *st)
 	uint32_t i;
 	int32_t spil, ofs;
 
-	/* if we allready have an epilog generate a jump to it */
+	/* if we already have an epilog generate a jump to it */
 	if (st->exit.num++ != 0) {
 		emit_abs_jmp(st, st->exit.off);
 		return;
diff --git a/lib/librte_bpf/bpf_load_elf.c b/lib/librte_bpf/bpf_load_elf.c
index 2b11adeb5e..02a5d8ba0d 100644
--- a/lib/librte_bpf/bpf_load_elf.c
+++ b/lib/librte_bpf/bpf_load_elf.c
@@ -80,7 +80,7 @@ resolve_xsym(const char *sn, size_t ofs, struct ebpf_insn *ins, size_t ins_sz,
 	if (type == RTE_BPF_XTYPE_FUNC) {
 
 		/* we don't support multiple functions per BPF module,
-		 * so treat EBPF_PSEUDO_CALL to extrernal function
+		 * so treat EBPF_PSEUDO_CALL to external function
 		 * as an ordinary EBPF_CALL.
 		 */
 		if (ins[idx].src_reg == EBPF_PSEUDO_CALL) {
diff --git a/lib/librte_bpf/bpf_pkt.c b/lib/librte_bpf/bpf_pkt.c
index 6e8248f0d6..701e8e2c62 100644
--- a/lib/librte_bpf/bpf_pkt.c
+++ b/lib/librte_bpf/bpf_pkt.c
@@ -169,7 +169,7 @@ bpf_eth_cbh_add(struct bpf_eth_cbh *cbh, uint16_t port, uint16_t queue)
 }
 
 /*
- * BPF packet processing routinies.
+ * BPF packet processing routines.
  */
 
 static inline uint32_t
diff --git a/lib/librte_bpf/bpf_validate.c b/lib/librte_bpf/bpf_validate.c
index 853279fee5..09331258eb 100644
--- a/lib/librte_bpf/bpf_validate.c
+++ b/lib/librte_bpf/bpf_validate.c
@@ -1730,7 +1730,7 @@ static const struct bpf_ins_check ins_chk[UINT8_MAX + 1] = {
 
 /*
  * make sure that instruction syntax is valid,
- * and it fields don't violate partciular instrcution type restrictions.
+ * and its fields don't violate particular instruction type restrictions.
  */
 static const char *
 check_syntax(const struct ebpf_insn *ins)
@@ -1961,7 +1961,7 @@ log_loop(const struct bpf_verifier *bvf)
  * First pass goes though all instructions in the set, checks that each
  * instruction is a valid one (correct syntax, valid field values, etc.)
  * and constructs control flow graph (CFG).
- * Then deapth-first search is performed over the constructed graph.
+ * Then depth-first search is performed over the constructed graph.
  * Programs with unreachable instructions and/or loops will be rejected.
  */
 static int
@@ -1988,7 +1988,7 @@ validate(struct bpf_verifier *bvf)
 
 		/*
 		 * construct CFG, jcc nodes have to outgoing edges,
-		 * 'exit' nodes - none, all others nodes have exaclty one
+		 * 'exit' nodes - none, all other nodes have exactly one
 		 * outgoing edge.
 		 */
 		switch (ins->code) {
@@ -2258,7 +2258,7 @@ evaluate(struct bpf_verifier *bvf)
 			idx = get_node_idx(bvf, node);
 			op = ins[idx].code;
 
-			/* for jcc node make a copy of evaluatoion state */
+			/* for jcc node make a copy of evaluation state */
 			if (node->nb_edge > 1)
 				rc |= save_eval_state(bvf, node);
 
diff --git a/lib/librte_eal/include/rte_function_versioning.h b/lib/librte_eal/include/rte_function_versioning.h
index 746a1e1992..eb6dd2bc17 100644
--- a/lib/librte_eal/include/rte_function_versioning.h
+++ b/lib/librte_eal/include/rte_function_versioning.h
@@ -15,7 +15,7 @@
 
 /*
  * Provides backwards compatibility when updating exported functions.
- * When a symol is exported from a library to provide an API, it also provides a
+ * When a symbol is exported from a library to provide an API, it also provides a
  * calling convention (ABI) that is embodied in its name, return type,
  * arguments, etc.  On occasion that function may need to change to accommodate
  * new functionality, behavior, etc.  When that occurs, it is desirable to
diff --git a/lib/librte_eal/windows/include/fnmatch.h b/lib/librte_eal/windows/include/fnmatch.h
index 142753c356..c272f65ccd 100644
--- a/lib/librte_eal/windows/include/fnmatch.h
+++ b/lib/librte_eal/windows/include/fnmatch.h
@@ -30,7 +30,7 @@ extern "C" {
  * with the given regular expression pattern.
  *
  * @param pattern
- *	regular expression notation decribing the pattern to match
+ *	regular expression notation describing the pattern to match
  *
  * @param string
  *	source string to searcg for the pattern
diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c
index 4c5e49ea3b..64b0f7ed0f 100644
--- a/lib/librte_eventdev/rte_event_timer_adapter.c
+++ b/lib/librte_eventdev/rte_event_timer_adapter.c
@@ -493,7 +493,7 @@ event_buffer_flush(struct event_buffer *bufp, uint8_t dev_id, uint8_t port_id,
 
 	RTE_ASSERT(head_idx < EVENT_BUFFER_SZ && tail_idx < EVENT_BUFFER_SZ);
 
-	/* Determine the largest contigous run we can attempt to enqueue to the
+	/* Determine the largest contiguous run we can attempt to enqueue to the
 	 * event device.
 	 */
 	if (head_idx > tail_idx)
diff --git a/lib/librte_ip_frag/rte_ipv4_reassembly.c b/lib/librte_ip_frag/rte_ipv4_reassembly.c
index 69666c8b82..4a89a5f536 100644
--- a/lib/librte_ip_frag/rte_ipv4_reassembly.c
+++ b/lib/librte_ip_frag/rte_ipv4_reassembly.c
@@ -80,7 +80,7 @@ ipv4_frag_reassemble(struct ip_frag_pkt *fp)
 
 /*
  * Process new mbuf with fragment of IPV4 packet.
- * Incoming mbuf should have it's l2_len/l3_len fields setuped correclty.
+ * Incoming mbuf should have it's l2_len/l3_len fields setup correctly.
  * @param tbl
  *   Table where to lookup/add the fragmented packet.
  * @param mb
diff --git a/lib/librte_ipsec/esp_inb.c b/lib/librte_ipsec/esp_inb.c
index 2b1df6a032..846fc0ea71 100644
--- a/lib/librte_ipsec/esp_inb.c
+++ b/lib/librte_ipsec/esp_inb.c
@@ -415,7 +415,7 @@ trs_process_check(struct rte_mbuf *mb, struct rte_mbuf **ml,
 
 /*
  * packet checks for tunnel mode:
- * - same as for trasnport mode
+ * - same as for transport mode
  * - esp tail next proto contains expected for that SA value
  */
 static inline int32_t
@@ -501,7 +501,7 @@ trs_process_step3(struct rte_mbuf *mb)
 static inline void
 tun_process_step3(struct rte_mbuf *mb, uint64_t txof_msk, uint64_t txof_val)
 {
-	/* reset mbuf metatdata: L2/L3 len, packet type */
+	/* reset mbuf metadata: L2/L3 len, packet type */
 	mb->packet_type = RTE_PTYPE_UNKNOWN;
 	mb->tx_offload = (mb->tx_offload & txof_msk) | txof_val;
 
diff --git a/lib/librte_ipsec/esp_outb.c b/lib/librte_ipsec/esp_outb.c
index 1e181cf2ce..0bf3cd6bd4 100644
--- a/lib/librte_ipsec/esp_outb.c
+++ b/lib/librte_ipsec/esp_outb.c
@@ -525,7 +525,7 @@ cpu_outb_trs_pkt_prepare(const struct rte_ipsec_session *ss,
 
 /*
  * process outbound packets for SA with ESN support,
- * for algorithms that require SQN.hibits to be implictly included
+ * for algorithms that require SQN.hibits to be implicitly included
  * into digest computation.
  * In that case we have to move ICV bytes back to their proper place.
  */
diff --git a/lib/librte_ipsec/ipsec_sad.c b/lib/librte_ipsec/ipsec_sad.c
index 3f9533c80a..531e1e323c 100644
--- a/lib/librte_ipsec/ipsec_sad.c
+++ b/lib/librte_ipsec/ipsec_sad.c
@@ -62,7 +62,7 @@ EAL_REGISTER_TAILQ(rte_ipsec_sad_tailq)
  * Inserts a rule into an appropriate hash table,
  * updates the value for a given SPI in SPI_ONLY hash table
  * reflecting presence of more specific rule type in two LSBs.
- * Updates a counter that reflects the number of rules whith the same SPI.
+ * Updates a counter that reflects the number of rules with the same SPI.
  */
 static inline int
 add_specific(struct rte_ipsec_sad *sad, const void *key,
diff --git a/lib/librte_ipsec/sa.c b/lib/librte_ipsec/sa.c
index e59189d215..f49b3ec15d 100644
--- a/lib/librte_ipsec/sa.c
+++ b/lib/librte_ipsec/sa.c
@@ -126,7 +126,7 @@ ipsec_sa_size(uint64_t type, uint32_t *wnd_sz, uint32_t *nb_bucket)
 		/*
 		 * RFC 4303 recommends 64 as minimum window size.
 		 * there is no point to use ESN mode without SQN window,
-		 * so make sure we have at least 64 window when ESN is enalbed.
+		 * so make sure we have at least 64 window when ESN is enabled.
 		 */
 		wsz = ((type & RTE_IPSEC_SATP_ESN_MASK) ==
 			RTE_IPSEC_SATP_ESN_DISABLE) ?
diff --git a/lib/librte_ipsec/sa.h b/lib/librte_ipsec/sa.h
index 1bffe751f5..b8ce4e9581 100644
--- a/lib/librte_ipsec/sa.h
+++ b/lib/librte_ipsec/sa.h
@@ -116,7 +116,7 @@ struct rte_ipsec_sa {
 	 * In case of SA handled by multiple threads *sqn* cacheline
 	 * could be shared by multiple cores.
 	 * To minimise performance impact, we try to locate in a separate
-	 * place from other frequently accesed data.
+	 * place from other frequently accessed data.
 	 */
 	union {
 		uint64_t outb;
diff --git a/lib/librte_net/rte_gtp.h b/lib/librte_net/rte_gtp.h
index 104384cc53..95f0822a16 100644
--- a/lib/librte_net/rte_gtp.h
+++ b/lib/librte_net/rte_gtp.h
@@ -37,9 +37,9 @@ struct rte_gtp_hdr {
 /** GTP header length */
 #define RTE_ETHER_GTP_HLEN \
 	(sizeof(struct rte_udp_hdr) + sizeof(struct rte_gtp_hdr))
-/* GTP next protocal type */
-#define RTE_GTP_TYPE_IPV4 0x40 /**< GTP next protocal type IPv4 */
-#define RTE_GTP_TYPE_IPV6 0x60 /**< GTP next protocal type IPv6 */
+/* GTP next protocol type */
+#define RTE_GTP_TYPE_IPV4 0x40 /**< GTP next protocol type IPv4 */
+#define RTE_GTP_TYPE_IPV6 0x60 /**< GTP next protocol type IPv6 */
 /* GTP destination port number */
 #define RTE_GTPC_UDP_PORT 2123 /**< GTP-C UDP destination port */
 #define RTE_GTPU_UDP_PORT 2152 /**< GTP-U UDP destination port */
diff --git a/lib/librte_node/ethdev_rx_priv.h b/lib/librte_node/ethdev_rx_priv.h
index efcd66dd48..76cf77d603 100644
--- a/lib/librte_node/ethdev_rx_priv.h
+++ b/lib/librte_node/ethdev_rx_priv.h
@@ -71,7 +71,7 @@ struct ethdev_rx_node_main *ethdev_rx_get_node_data_get(void);
  *
  * Get the Ethernet Rx node.
  *
- * @retrun
+ * @return
  *   Pointer to the Ethernet Rx node.
  */
 struct rte_node_register *ethdev_rx_node_get(void);
diff --git a/lib/librte_node/ethdev_tx_priv.h b/lib/librte_node/ethdev_tx_priv.h
index 586bff44a7..9ced520bd2 100644
--- a/lib/librte_node/ethdev_tx_priv.h
+++ b/lib/librte_node/ethdev_tx_priv.h
@@ -50,7 +50,7 @@ struct ethdev_tx_node_main *ethdev_tx_node_data_get(void);
  *
  * Get the Ethernet Tx node.
  *
- * @retrun
+ * @return
  *   Pointer to the Ethernet Tx node.
  */
 struct rte_node_register *ethdev_tx_node_get(void);
diff --git a/lib/librte_node/ip4_rewrite_priv.h b/lib/librte_node/ip4_rewrite_priv.h
index 80f0abdc94..036469746b 100644
--- a/lib/librte_node/ip4_rewrite_priv.h
+++ b/lib/librte_node/ip4_rewrite_priv.h
@@ -53,7 +53,7 @@ struct ip4_rewrite_node_main {
  *
  * Get the ipv4 rewrite node.
  *
- * @retrun
+ * @return
  *   Pointer to the ipv4 rewrite node.
  */
 struct rte_node_register *ip4_rewrite_node_get(void);
diff --git a/lib/librte_power/power_acpi_cpufreq.c b/lib/librte_power/power_acpi_cpufreq.c
index d028a9947f..66dd013427 100644
--- a/lib/librte_power/power_acpi_cpufreq.c
+++ b/lib/librte_power/power_acpi_cpufreq.c
@@ -226,7 +226,7 @@ power_get_available_freqs(struct rte_power_info *pi)
 		goto out;
 	}
 
-	/* Store the available frequncies into power context */
+	/* Store the available frequencies into power context */
 	for (i = 0, pi->nb_freqs = 0; i < count; i++) {
 		POWER_DEBUG_TRACE("Lcore %u frequency[%d]: %s\n", pi->lcore_id,
 				i, freqs[i]);
diff --git a/lib/librte_rcu/rte_rcu_qsbr.h b/lib/librte_rcu/rte_rcu_qsbr.h
index fa2b881bd0..6f09d9c398 100644
--- a/lib/librte_rcu/rte_rcu_qsbr.h
+++ b/lib/librte_rcu/rte_rcu_qsbr.h
@@ -367,7 +367,7 @@ rte_rcu_qsbr_thread_offline(struct rte_rcu_qsbr *v, unsigned int thread_id)
 
 	/* The reader can go offline only after the load of the
 	 * data structure is completed. i.e. any load of the
-	 * data strcture can not move after this store.
+	 * data structure can not move after this store.
 	 */
 
 	__atomic_store_n(&v->qsbr_cnt[thread_id].cnt,
diff --git a/lib/librte_rib/rte_rib6.c b/lib/librte_rib/rte_rib6.c
index b00c7fbf5a..70405113b4 100644
--- a/lib/librte_rib/rte_rib6.c
+++ b/lib/librte_rib/rte_rib6.c
@@ -199,7 +199,7 @@ rte_rib6_lookup_exact(struct rte_rib6 *rib,
 }
 
 /*
- *  Traverses on subtree and retreeves more specific routes
+ *  Traverses on subtree and retrieves more specific routes
  *  for a given in args ip/depth prefix
  *  last = NULL means the first invocation
  */
diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c
index a858f61f95..329f4b2e7b 100644
--- a/lib/librte_sched/rte_sched.c
+++ b/lib/librte_sched/rte_sched.c
@@ -579,7 +579,7 @@ rte_sched_subport_config_qsize(struct rte_sched_subport *subport)
 
 	subport->qsize_add[0] = 0;
 
-	/* Strict prority traffic class */
+	/* Strict priority traffic class */
 	for (i = 1; i < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; i++)
 		subport->qsize_add[i] = subport->qsize_add[i-1] + subport->qsize[i-1];
 
diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
index fe910a2a7a..755fb3dd7a 100644
--- a/lib/librte_vhost/rte_vhost.h
+++ b/lib/librte_vhost/rte_vhost.h
@@ -761,7 +761,7 @@ rte_vhost_get_vhost_ring_inflight(int vid, uint16_t vring_idx,
 /**
  * Set split inflight descriptor.
  *
- * This function save descriptors that has been comsumed in available
+ * This function save descriptors that has been consumed in available
  * ring
  *
  * @param vid
@@ -781,7 +781,7 @@ rte_vhost_set_inflight_desc_split(int vid, uint16_t vring_idx,
 /**
  * Set packed inflight descriptor and get corresponding inflight entry
  *
- * This function save descriptors that has been comsumed
+ * This function save descriptors that has been consumed
  *
  * @param vid
  *  vhost device ID
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.322672413 +0800
+++ 0038-fix-spelling-in-comments-and-doxygen.patch	2021-11-28 22:41:03.323540920 +0800
@@ -1 +1 @@
-From 4a6672c2d301c105189ae74de73260af204c5ee8 Mon Sep 17 00:00:00 2001
+From ea5ee2019838a5cfad689bda039ca0b9fda425e0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4a6672c2d301c105189ae74de73260af204c5ee8 ]
@@ -16,48 +19,46 @@
- app/test-pmd/cmdline.c                    |  2 +-
- app/test-pmd/config.c                     |  4 ++--
- app/test-pmd/icmpecho.c                   |  2 +-
- app/test/test_atomic.c                    |  2 +-
- app/test/test_barrier.c                   |  2 +-
- app/test/test_bpf.c                       |  2 +-
- app/test/test_compressdev.c               |  2 +-
- app/test/test_func_reentrancy.c           |  6 +++---
- app/test/test_ipsec.c                     |  2 +-
- app/test/test_link_bonding.c              |  2 +-
- app/test/test_lpm.c                       |  6 +++---
- app/test/test_lpm6.c                      | 14 +++++++-------
- app/test/test_malloc.c                    |  4 ++--
- app/test/test_mbuf.c                      |  2 +-
- app/test/test_mempool.c                   |  2 +-
- app/test/test_mempool_perf.c              |  2 +-
- app/test/test_meter.c                     |  6 +++---
- app/test/test_pmd_perf.c                  |  2 +-
- app/test/test_timer.c                     |  2 +-
- lib/acl/acl.h                             |  4 ++--
- lib/acl/acl_bld.c                         |  2 +-
- lib/acl/acl_run_avx2.h                    |  2 +-
- lib/bbdev/rte_bbdev.c                     |  2 +-
- lib/bpf/bpf_jit_x86.c                     |  2 +-
- lib/bpf/bpf_load_elf.c                    |  2 +-
- lib/bpf/bpf_pkt.c                         |  2 +-
- lib/bpf/bpf_validate.c                    |  8 ++++----
- lib/eal/include/rte_function_versioning.h |  2 +-
- lib/eal/windows/include/fnmatch.h         |  2 +-
- lib/eventdev/rte_event_timer_adapter.c    |  2 +-
- lib/hash/rte_thash.c                      |  2 +-
- lib/ip_frag/rte_ipv4_reassembly.c         |  2 +-
- lib/ipsec/esp_inb.c                       |  4 ++--
- lib/ipsec/esp_outb.c                      |  2 +-
- lib/ipsec/ipsec_sad.c                     |  2 +-
- lib/ipsec/sa.c                            |  2 +-
- lib/ipsec/sa.h                            |  2 +-
- lib/net/rte_gtp.h                         |  6 +++---
- lib/node/ethdev_rx_priv.h                 |  2 +-
- lib/node/ethdev_tx_priv.h                 |  2 +-
- lib/node/ip4_rewrite_priv.h               |  2 +-
- lib/pipeline/rte_swx_pipeline.h           |  2 +-
- lib/power/power_acpi_cpufreq.c            |  2 +-
- lib/rcu/rte_rcu_qsbr.h                    |  2 +-
- lib/rib/rte_rib6.c                        |  2 +-
- lib/sched/rte_sched.c                     |  2 +-
- lib/vhost/rte_vhost.h                     |  4 ++--
- 47 files changed, 69 insertions(+), 69 deletions(-)
+ app/test-pmd/cmdline.c                           |  2 +-
+ app/test-pmd/config.c                            |  4 ++--
+ app/test-pmd/icmpecho.c                          |  2 +-
+ app/test/test_atomic.c                           |  2 +-
+ app/test/test_barrier.c                          |  2 +-
+ app/test/test_bpf.c                              |  2 +-
+ app/test/test_compressdev.c                      |  2 +-
+ app/test/test_func_reentrancy.c                  |  6 +++---
+ app/test/test_ipsec.c                            |  2 +-
+ app/test/test_link_bonding.c                     |  2 +-
+ app/test/test_lpm.c                              |  6 +++---
+ app/test/test_lpm6.c                             | 14 +++++++-------
+ app/test/test_malloc.c                           |  4 ++--
+ app/test/test_mbuf.c                             |  2 +-
+ app/test/test_mempool.c                          |  2 +-
+ app/test/test_mempool_perf.c                     |  2 +-
+ app/test/test_meter.c                            |  6 +++---
+ app/test/test_pmd_perf.c                         |  2 +-
+ app/test/test_timer.c                            |  2 +-
+ lib/librte_acl/acl.h                             |  4 ++--
+ lib/librte_acl/acl_bld.c                         |  2 +-
+ lib/librte_acl/acl_run_avx2.h                    |  2 +-
+ lib/librte_bbdev/rte_bbdev.c                     |  2 +-
+ lib/librte_bpf/bpf_jit_x86.c                     |  2 +-
+ lib/librte_bpf/bpf_load_elf.c                    |  2 +-
+ lib/librte_bpf/bpf_pkt.c                         |  2 +-
+ lib/librte_bpf/bpf_validate.c                    |  8 ++++----
+ lib/librte_eal/include/rte_function_versioning.h |  2 +-
+ lib/librte_eal/windows/include/fnmatch.h         |  2 +-
+ lib/librte_eventdev/rte_event_timer_adapter.c    |  2 +-
+ lib/librte_ip_frag/rte_ipv4_reassembly.c         |  2 +-
+ lib/librte_ipsec/esp_inb.c                       |  4 ++--
+ lib/librte_ipsec/esp_outb.c                      |  2 +-
+ lib/librte_ipsec/ipsec_sad.c                     |  2 +-
+ lib/librte_ipsec/sa.c                            |  2 +-
+ lib/librte_ipsec/sa.h                            |  2 +-
+ lib/librte_net/rte_gtp.h                         |  6 +++---
+ lib/librte_node/ethdev_rx_priv.h                 |  2 +-
+ lib/librte_node/ethdev_tx_priv.h                 |  2 +-
+ lib/librte_node/ip4_rewrite_priv.h               |  2 +-
+ lib/librte_power/power_acpi_cpufreq.c            |  2 +-
+ lib/librte_rcu/rte_rcu_qsbr.h                    |  2 +-
+ lib/librte_rib/rte_rib6.c                        |  2 +-
+ lib/librte_sched/rte_sched.c                     |  2 +-
+ lib/librte_vhost/rte_vhost.h                     |  4 ++--
+ 45 files changed, 67 insertions(+), 67 deletions(-)
@@ -66 +67 @@
-index 4f51b259fe..fb5433fd5b 100644
+index 58ebff5502..22283bc355 100644
@@ -69 +70 @@
-@@ -3653,7 +3653,7 @@ parse_item_list(const char *str, const char *item_name, unsigned int max_items,
+@@ -3551,7 +3551,7 @@ parse_item_list(char* str, const char* item_name, unsigned int max_items,
@@ -79 +80 @@
-index 26cadf39f7..26318b4f14 100644
+index 29c5f37222..22da15e51d 100644
@@ -82 +83 @@
-@@ -2965,7 +2965,7 @@ port_rss_reta_info(portid_t port_id,
+@@ -2912,7 +2912,7 @@ port_rss_reta_info(portid_t port_id,
@@ -91 +92 @@
-@@ -5250,7 +5250,7 @@ mcast_addr_pool_remove(struct rte_port *port, uint32_t addr_idx)
+@@ -5053,7 +5053,7 @@ mcast_addr_pool_remove(struct rte_port *port, uint32_t addr_idx)
@@ -101 +102 @@
-index 8f1d68a83a..d6620f5f6a 100644
+index af6f7e7902..a7b568e46e 100644
@@ -140 +141 @@
-index 8f2414eb2b..8b28722515 100644
+index 7002c6a734..b5149dd842 100644
@@ -143 +144 @@
-@@ -2407,7 +2407,7 @@ static const struct ebpf_insn test_call5_prog[] = {
+@@ -2406,7 +2406,7 @@ static const struct ebpf_insn test_call5_prog[] = {
@@ -197 +198 @@
-index 1bec63b0e8..bc2a3dbc2e 100644
+index d18220a885..fc77539bc7 100644
@@ -200 +201 @@
-@@ -653,7 +653,7 @@ create_crypto_session(struct ipsec_unitest_params *ut,
+@@ -654,7 +654,7 @@ create_crypto_session(struct ipsec_unitest_params *ut,
@@ -210 +211 @@
-index 8a9ef85178..dc6fc46b9c 100644
+index e8b76bd850..868bf94301 100644
@@ -213 +214 @@
-@@ -3040,7 +3040,7 @@ test_balance_tx_burst_slave_tx_fail(void)
+@@ -3041,7 +3041,7 @@ test_balance_tx_burst_slave_tx_fail(void)
@@ -223 +224 @@
-index 556f5a67ba..37b460af3a 100644
+index 258b2f67c7..bee8307caa 100644
@@ -343 +344 @@
-index f93bcef8a9..75f3453946 100644
+index a6c11dd5b1..1bfaa029ba 100644
@@ -356 +357 @@
-index a451608558..f6c650d11f 100644
+index 3adadd6731..9b0236e30a 100644
@@ -359 +360 @@
-@@ -994,7 +994,7 @@ test_mempool(void)
+@@ -633,7 +633,7 @@ test_mempool(void)
@@ -369 +370 @@
-index 8f629736e8..87ad251367 100644
+index d7d0aaa334..7c0c280fce 100644
@@ -372 +373 @@
-@@ -88,7 +88,7 @@ static uint32_t synchro;
+@@ -89,7 +89,7 @@ static rte_atomic32_t synchro;
@@ -413 +414 @@
-index 1df86ce080..aac6c97ceb 100644
+index 3a248d512c..1ef844ba75 100644
@@ -416 +417 @@
-@@ -752,7 +752,7 @@ test_pmd_perf(void)
+@@ -753,7 +753,7 @@ test_pmd_perf(void)
@@ -438 +439 @@
-diff --git a/lib/acl/acl.h b/lib/acl/acl.h
+diff --git a/lib/librte_acl/acl.h b/lib/librte_acl/acl.h
@@ -440,2 +441,2 @@
---- a/lib/acl/acl.h
-+++ b/lib/acl/acl.h
+--- a/lib/librte_acl/acl.h
++++ b/lib/librte_acl/acl.h
@@ -460 +461 @@
-diff --git a/lib/acl/acl_bld.c b/lib/acl/acl_bld.c
+diff --git a/lib/librte_acl/acl_bld.c b/lib/librte_acl/acl_bld.c
@@ -462,2 +463,2 @@
---- a/lib/acl/acl_bld.c
-+++ b/lib/acl/acl_bld.c
+--- a/lib/librte_acl/acl_bld.c
++++ b/lib/librte_acl/acl_bld.c
@@ -473 +474 @@
-diff --git a/lib/acl/acl_run_avx2.h b/lib/acl/acl_run_avx2.h
+diff --git a/lib/librte_acl/acl_run_avx2.h b/lib/librte_acl/acl_run_avx2.h
@@ -475,2 +476,2 @@
---- a/lib/acl/acl_run_avx2.h
-+++ b/lib/acl/acl_run_avx2.h
+--- a/lib/librte_acl/acl_run_avx2.h
++++ b/lib/librte_acl/acl_run_avx2.h
@@ -486,4 +487,4 @@
-diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c
-index b86c5fdcc0..7f353d4f7e 100644
---- a/lib/bbdev/rte_bbdev.c
-+++ b/lib/bbdev/rte_bbdev.c
+diff --git a/lib/librte_bbdev/rte_bbdev.c b/lib/librte_bbdev/rte_bbdev.c
+index 5ba891c232..310de3761d 100644
+--- a/lib/librte_bbdev/rte_bbdev.c
++++ b/lib/librte_bbdev/rte_bbdev.c
@@ -499 +500 @@
-diff --git a/lib/bpf/bpf_jit_x86.c b/lib/bpf/bpf_jit_x86.c
+diff --git a/lib/librte_bpf/bpf_jit_x86.c b/lib/librte_bpf/bpf_jit_x86.c
@@ -501,2 +502,2 @@
---- a/lib/bpf/bpf_jit_x86.c
-+++ b/lib/bpf/bpf_jit_x86.c
+--- a/lib/librte_bpf/bpf_jit_x86.c
++++ b/lib/librte_bpf/bpf_jit_x86.c
@@ -512 +513 @@
-diff --git a/lib/bpf/bpf_load_elf.c b/lib/bpf/bpf_load_elf.c
+diff --git a/lib/librte_bpf/bpf_load_elf.c b/lib/librte_bpf/bpf_load_elf.c
@@ -514,2 +515,2 @@
---- a/lib/bpf/bpf_load_elf.c
-+++ b/lib/bpf/bpf_load_elf.c
+--- a/lib/librte_bpf/bpf_load_elf.c
++++ b/lib/librte_bpf/bpf_load_elf.c
@@ -525,5 +526,5 @@
-diff --git a/lib/bpf/bpf_pkt.c b/lib/bpf/bpf_pkt.c
-index 08eebd99b3..af422afc07 100644
---- a/lib/bpf/bpf_pkt.c
-+++ b/lib/bpf/bpf_pkt.c
-@@ -166,7 +166,7 @@ bpf_eth_cbh_add(struct bpf_eth_cbh *cbh, uint16_t port, uint16_t queue)
+diff --git a/lib/librte_bpf/bpf_pkt.c b/lib/librte_bpf/bpf_pkt.c
+index 6e8248f0d6..701e8e2c62 100644
+--- a/lib/librte_bpf/bpf_pkt.c
++++ b/lib/librte_bpf/bpf_pkt.c
+@@ -169,7 +169,7 @@ bpf_eth_cbh_add(struct bpf_eth_cbh *cbh, uint16_t port, uint16_t queue)
@@ -538 +539 @@
-diff --git a/lib/bpf/bpf_validate.c b/lib/bpf/bpf_validate.c
+diff --git a/lib/librte_bpf/bpf_validate.c b/lib/librte_bpf/bpf_validate.c
@@ -540,2 +541,2 @@
---- a/lib/bpf/bpf_validate.c
-+++ b/lib/bpf/bpf_validate.c
+--- a/lib/librte_bpf/bpf_validate.c
++++ b/lib/librte_bpf/bpf_validate.c
@@ -578 +579 @@
-diff --git a/lib/eal/include/rte_function_versioning.h b/lib/eal/include/rte_function_versioning.h
+diff --git a/lib/librte_eal/include/rte_function_versioning.h b/lib/librte_eal/include/rte_function_versioning.h
@@ -580,2 +581,2 @@
---- a/lib/eal/include/rte_function_versioning.h
-+++ b/lib/eal/include/rte_function_versioning.h
+--- a/lib/librte_eal/include/rte_function_versioning.h
++++ b/lib/librte_eal/include/rte_function_versioning.h
@@ -591 +592 @@
-diff --git a/lib/eal/windows/include/fnmatch.h b/lib/eal/windows/include/fnmatch.h
+diff --git a/lib/librte_eal/windows/include/fnmatch.h b/lib/librte_eal/windows/include/fnmatch.h
@@ -593,2 +594,2 @@
---- a/lib/eal/windows/include/fnmatch.h
-+++ b/lib/eal/windows/include/fnmatch.h
+--- a/lib/librte_eal/windows/include/fnmatch.h
++++ b/lib/librte_eal/windows/include/fnmatch.h
@@ -604,5 +605,5 @@
-diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c
-index e5572e2add..9dad170b5a 100644
---- a/lib/eventdev/rte_event_timer_adapter.c
-+++ b/lib/eventdev/rte_event_timer_adapter.c
-@@ -525,7 +525,7 @@ event_buffer_flush(struct event_buffer *bufp, uint8_t dev_id, uint8_t port_id,
+diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c
+index 4c5e49ea3b..64b0f7ed0f 100644
+--- a/lib/librte_eventdev/rte_event_timer_adapter.c
++++ b/lib/librte_eventdev/rte_event_timer_adapter.c
+@@ -493,7 +493,7 @@ event_buffer_flush(struct event_buffer *bufp, uint8_t dev_id, uint8_t port_id,
@@ -617,14 +618 @@
-diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c
-index 394e1328c5..6847e36f4b 100644
---- a/lib/hash/rte_thash.c
-+++ b/lib/hash/rte_thash.c
-@@ -28,7 +28,7 @@ EAL_REGISTER_TAILQ(rte_thash_tailq)
- 
- /**
-  * Table of some irreducible polinomials over GF(2).
-- * For lfsr they are reperesented in BE bit order, and
-+ * For lfsr they are represented in BE bit order, and
-  * x^0 is masked out.
-  * For example, poly x^5 + x^2 + 1 will be represented
-  * as (101001b & 11111b) = 01001b = 0x9
-diff --git a/lib/ip_frag/rte_ipv4_reassembly.c b/lib/ip_frag/rte_ipv4_reassembly.c
+diff --git a/lib/librte_ip_frag/rte_ipv4_reassembly.c b/lib/librte_ip_frag/rte_ipv4_reassembly.c
@@ -632,2 +620,2 @@
---- a/lib/ip_frag/rte_ipv4_reassembly.c
-+++ b/lib/ip_frag/rte_ipv4_reassembly.c
+--- a/lib/librte_ip_frag/rte_ipv4_reassembly.c
++++ b/lib/librte_ip_frag/rte_ipv4_reassembly.c
@@ -643,5 +631,5 @@
-diff --git a/lib/ipsec/esp_inb.c b/lib/ipsec/esp_inb.c
-index 99e9c43f2f..636c850fa6 100644
---- a/lib/ipsec/esp_inb.c
-+++ b/lib/ipsec/esp_inb.c
-@@ -475,7 +475,7 @@ trs_process_check(struct rte_mbuf *mb, struct rte_mbuf **ml,
+diff --git a/lib/librte_ipsec/esp_inb.c b/lib/librte_ipsec/esp_inb.c
+index 2b1df6a032..846fc0ea71 100644
+--- a/lib/librte_ipsec/esp_inb.c
++++ b/lib/librte_ipsec/esp_inb.c
+@@ -415,7 +415,7 @@ trs_process_check(struct rte_mbuf *mb, struct rte_mbuf **ml,
@@ -656 +644 @@
-@@ -561,7 +561,7 @@ trs_process_step3(struct rte_mbuf *mb)
+@@ -501,7 +501,7 @@ trs_process_step3(struct rte_mbuf *mb)
@@ -665,5 +653,5 @@
-diff --git a/lib/ipsec/esp_outb.c b/lib/ipsec/esp_outb.c
-index b7a70fd001..672e56aba0 100644
---- a/lib/ipsec/esp_outb.c
-+++ b/lib/ipsec/esp_outb.c
-@@ -614,7 +614,7 @@ cpu_outb_trs_pkt_prepare(const struct rte_ipsec_session *ss,
+diff --git a/lib/librte_ipsec/esp_outb.c b/lib/librte_ipsec/esp_outb.c
+index 1e181cf2ce..0bf3cd6bd4 100644
+--- a/lib/librte_ipsec/esp_outb.c
++++ b/lib/librte_ipsec/esp_outb.c
+@@ -525,7 +525,7 @@ cpu_outb_trs_pkt_prepare(const struct rte_ipsec_session *ss,
@@ -678 +666 @@
-diff --git a/lib/ipsec/ipsec_sad.c b/lib/ipsec/ipsec_sad.c
+diff --git a/lib/librte_ipsec/ipsec_sad.c b/lib/librte_ipsec/ipsec_sad.c
@@ -680,2 +668,2 @@
---- a/lib/ipsec/ipsec_sad.c
-+++ b/lib/ipsec/ipsec_sad.c
+--- a/lib/librte_ipsec/ipsec_sad.c
++++ b/lib/librte_ipsec/ipsec_sad.c
@@ -691,5 +679,5 @@
-diff --git a/lib/ipsec/sa.c b/lib/ipsec/sa.c
-index a19819f9f1..1e51482c92 100644
---- a/lib/ipsec/sa.c
-+++ b/lib/ipsec/sa.c
-@@ -136,7 +136,7 @@ ipsec_sa_size(uint64_t type, uint32_t *wnd_sz, uint32_t *nb_bucket)
+diff --git a/lib/librte_ipsec/sa.c b/lib/librte_ipsec/sa.c
+index e59189d215..f49b3ec15d 100644
+--- a/lib/librte_ipsec/sa.c
++++ b/lib/librte_ipsec/sa.c
+@@ -126,7 +126,7 @@ ipsec_sa_size(uint64_t type, uint32_t *wnd_sz, uint32_t *nb_bucket)
@@ -704,5 +692,5 @@
-diff --git a/lib/ipsec/sa.h b/lib/ipsec/sa.h
-index 6e59f18e16..7503587b50 100644
---- a/lib/ipsec/sa.h
-+++ b/lib/ipsec/sa.h
-@@ -122,7 +122,7 @@ struct rte_ipsec_sa {
+diff --git a/lib/librte_ipsec/sa.h b/lib/librte_ipsec/sa.h
+index 1bffe751f5..b8ce4e9581 100644
+--- a/lib/librte_ipsec/sa.h
++++ b/lib/librte_ipsec/sa.h
+@@ -116,7 +116,7 @@ struct rte_ipsec_sa {
@@ -717,5 +705,5 @@
-diff --git a/lib/net/rte_gtp.h b/lib/net/rte_gtp.h
-index 9f6deb9c7e..dca940c2c5 100644
---- a/lib/net/rte_gtp.h
-+++ b/lib/net/rte_gtp.h
-@@ -142,9 +142,9 @@ struct rte_gtp_psc_type1_hdr {
+diff --git a/lib/librte_net/rte_gtp.h b/lib/librte_net/rte_gtp.h
+index 104384cc53..95f0822a16 100644
+--- a/lib/librte_net/rte_gtp.h
++++ b/lib/librte_net/rte_gtp.h
+@@ -37,9 +37,9 @@ struct rte_gtp_hdr {
@@ -734,5 +722,5 @@
-diff --git a/lib/node/ethdev_rx_priv.h b/lib/node/ethdev_rx_priv.h
-index 21dcba51fc..7f24cf962e 100644
---- a/lib/node/ethdev_rx_priv.h
-+++ b/lib/node/ethdev_rx_priv.h
-@@ -67,7 +67,7 @@ struct ethdev_rx_node_main *ethdev_rx_get_node_data_get(void);
+diff --git a/lib/librte_node/ethdev_rx_priv.h b/lib/librte_node/ethdev_rx_priv.h
+index efcd66dd48..76cf77d603 100644
+--- a/lib/librte_node/ethdev_rx_priv.h
++++ b/lib/librte_node/ethdev_rx_priv.h
+@@ -71,7 +71,7 @@ struct ethdev_rx_node_main *ethdev_rx_get_node_data_get(void);
@@ -747,5 +735,5 @@
-diff --git a/lib/node/ethdev_tx_priv.h b/lib/node/ethdev_tx_priv.h
-index e3a6fdb8af..93744df56a 100644
---- a/lib/node/ethdev_tx_priv.h
-+++ b/lib/node/ethdev_tx_priv.h
-@@ -46,7 +46,7 @@ struct ethdev_tx_node_main *ethdev_tx_node_data_get(void);
+diff --git a/lib/librte_node/ethdev_tx_priv.h b/lib/librte_node/ethdev_tx_priv.h
+index 586bff44a7..9ced520bd2 100644
+--- a/lib/librte_node/ethdev_tx_priv.h
++++ b/lib/librte_node/ethdev_tx_priv.h
+@@ -50,7 +50,7 @@ struct ethdev_tx_node_main *ethdev_tx_node_data_get(void);
@@ -760,5 +748,5 @@
-diff --git a/lib/node/ip4_rewrite_priv.h b/lib/node/ip4_rewrite_priv.h
-index a1fb8668c5..5105ec1d29 100644
---- a/lib/node/ip4_rewrite_priv.h
-+++ b/lib/node/ip4_rewrite_priv.h
-@@ -49,7 +49,7 @@ struct ip4_rewrite_node_main {
+diff --git a/lib/librte_node/ip4_rewrite_priv.h b/lib/librte_node/ip4_rewrite_priv.h
+index 80f0abdc94..036469746b 100644
+--- a/lib/librte_node/ip4_rewrite_priv.h
++++ b/lib/librte_node/ip4_rewrite_priv.h
+@@ -53,7 +53,7 @@ struct ip4_rewrite_node_main {
@@ -773,18 +761,5 @@
-diff --git a/lib/pipeline/rte_swx_pipeline.h b/lib/pipeline/rte_swx_pipeline.h
-index 9c3d08199c..77141bd341 100644
---- a/lib/pipeline/rte_swx_pipeline.h
-+++ b/lib/pipeline/rte_swx_pipeline.h
-@@ -647,7 +647,7 @@ struct rte_swx_pipeline_selector_params {
- 	const char *group_id_field_name;
- 
- 	/** The set of fields used to select (through a hashing scheme) the
--	 * member within the current group. Inputs into the seletion operation.
-+	 * member within the current group. Inputs into the selection operation.
- 	 * Restriction: All the selector fields must be part of the same struct,
- 	 * i.e. part of the same header or part of the meta-data structure.
- 	 */
-diff --git a/lib/power/power_acpi_cpufreq.c b/lib/power/power_acpi_cpufreq.c
-index 1e8aeb8403..402ed8c99b 100644
---- a/lib/power/power_acpi_cpufreq.c
-+++ b/lib/power/power_acpi_cpufreq.c
-@@ -159,7 +159,7 @@ power_get_available_freqs(struct acpi_power_info *pi)
+diff --git a/lib/librte_power/power_acpi_cpufreq.c b/lib/librte_power/power_acpi_cpufreq.c
+index d028a9947f..66dd013427 100644
+--- a/lib/librte_power/power_acpi_cpufreq.c
++++ b/lib/librte_power/power_acpi_cpufreq.c
+@@ -226,7 +226,7 @@ power_get_available_freqs(struct rte_power_info *pi)
@@ -799,5 +774,5 @@
-diff --git a/lib/rcu/rte_rcu_qsbr.h b/lib/rcu/rte_rcu_qsbr.h
-index 18811c1cc1..62a420a785 100644
---- a/lib/rcu/rte_rcu_qsbr.h
-+++ b/lib/rcu/rte_rcu_qsbr.h
-@@ -362,7 +362,7 @@ rte_rcu_qsbr_thread_offline(struct rte_rcu_qsbr *v, unsigned int thread_id)
+diff --git a/lib/librte_rcu/rte_rcu_qsbr.h b/lib/librte_rcu/rte_rcu_qsbr.h
+index fa2b881bd0..6f09d9c398 100644
+--- a/lib/librte_rcu/rte_rcu_qsbr.h
++++ b/lib/librte_rcu/rte_rcu_qsbr.h
+@@ -367,7 +367,7 @@ rte_rcu_qsbr_thread_offline(struct rte_rcu_qsbr *v, unsigned int thread_id)
@@ -812 +787 @@
-diff --git a/lib/rib/rte_rib6.c b/lib/rib/rte_rib6.c
+diff --git a/lib/librte_rib/rte_rib6.c b/lib/librte_rib/rte_rib6.c
@@ -814,2 +789,2 @@
---- a/lib/rib/rte_rib6.c
-+++ b/lib/rib/rte_rib6.c
+--- a/lib/librte_rib/rte_rib6.c
++++ b/lib/librte_rib/rte_rib6.c
@@ -825,5 +800,5 @@
-diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c
-index 2fe32bbd33..ed44808f7b 100644
---- a/lib/sched/rte_sched.c
-+++ b/lib/sched/rte_sched.c
-@@ -590,7 +590,7 @@ rte_sched_subport_config_qsize(struct rte_sched_subport *subport)
+diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c
+index a858f61f95..329f4b2e7b 100644
+--- a/lib/librte_sched/rte_sched.c
++++ b/lib/librte_sched/rte_sched.c
+@@ -579,7 +579,7 @@ rte_sched_subport_config_qsize(struct rte_sched_subport *subport)
@@ -838,5 +813,5 @@
-diff --git a/lib/vhost/rte_vhost.h b/lib/vhost/rte_vhost.h
-index af0afbcf60..b454c05868 100644
---- a/lib/vhost/rte_vhost.h
-+++ b/lib/vhost/rte_vhost.h
-@@ -796,7 +796,7 @@ rte_vhost_get_vhost_ring_inflight(int vid, uint16_t vring_idx,
+diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
+index fe910a2a7a..755fb3dd7a 100644
+--- a/lib/librte_vhost/rte_vhost.h
++++ b/lib/librte_vhost/rte_vhost.h
+@@ -761,7 +761,7 @@ rte_vhost_get_vhost_ring_inflight(int vid, uint16_t vring_idx,
@@ -851 +826 @@
-@@ -815,7 +815,7 @@ rte_vhost_set_inflight_desc_split(int vid, uint16_t vring_idx,
+@@ -781,7 +781,7 @@ rte_vhost_set_inflight_desc_split(int vid, uint16_t vring_idx,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'config/x86: skip GNU binutils bug check for LLVM' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (37 preceding siblings ...)
  2021-11-28 14:53   ` patch 'fix spelling in comments and doxygen' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'examples/ntb: fix build dependency' " Xueming Li
                     ` (39 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Luca Boccassi, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/27cfa20c2a997f4b49d5fd2a2531d8a0fc1cb72d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 27cfa20c2a997f4b49d5fd2a2531d8a0fc1cb72d Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Sat, 13 Nov 2021 00:48:24 +0300
Subject: [PATCH] config/x86: skip GNU binutils bug check for LLVM
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 04f9fac660d018d0b163dcafed2805909f576ee9 ]

AVX512 was disabled when GNU binutils were missing or had a known bug,
even if LLVM binutils were used for the build,
because binutils-avx512-check.sh was invoked regardless and failed.
In particular, this was the case for FreeBSD with clang (default).
Run the check only when GNU binutils are used.

Fixes: 68b1f1cda5b4 ("build: check AVX512 rather than binutils version")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/x86/meson.build     | 7 ++++---
 lib/librte_acl/meson.build | 2 +-
 lib/librte_fib/meson.build | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/config/x86/meson.build b/config/x86/meson.build
index 31bfa63b1c..0007b6b49f 100644
--- a/config/x86/meson.build
+++ b/config/x86/meson.build
@@ -2,9 +2,10 @@
 # Copyright(c) 2017-2020 Intel Corporation
 
 # get binutils version for the workaround of Bug 97
-if not is_windows
-	binutils_ok = run_command(binutils_avx512_check)
-	if binutils_ok.returncode() != 0 and cc.has_argument('-mno-avx512f')
+binutils_ok = true
+if not is_windows and (is_linux or cc.get_id() == 'gcc')
+	binutils_ok = run_command(binutils_avx512_check).returncode() == 0
+	if not binutils_ok and cc.has_argument('-mno-avx512f')
 		machine_args += '-mno-avx512f'
 		warning('Binutils error with AVX512 assembly, disabling AVX512 support')
 	endif
diff --git a/lib/librte_acl/meson.build b/lib/librte_acl/meson.build
index ee4e229e59..c261101de7 100644
--- a/lib/librte_acl/meson.build
+++ b/lib/librte_acl/meson.build
@@ -30,7 +30,7 @@ if dpdk_conf.has('RTE_ARCH_X86')
 	# compile AVX512 version if:
 	# we are building 64-bit binary AND binutils can generate proper code
 
-	if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok.returncode() == 0
+	if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok
 
 		# compile AVX512 version if either:
 		# a. we have AVX512 supported in minimum instruction set
diff --git a/lib/librte_fib/meson.build b/lib/librte_fib/meson.build
index 18eadcc56c..2438a2791c 100644
--- a/lib/librte_fib/meson.build
+++ b/lib/librte_fib/meson.build
@@ -8,7 +8,7 @@ deps += ['rib']
 
 # compile AVX512 version if:
 # we are building 64-bit binary AND binutils can generate proper code
-if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok.returncode() == 0
+if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok
 	# compile AVX512 version if either:
 	# a. we have AVX512F supported in minimum instruction set baseline
 	# b. it's not minimum instruction set, but supported by compiler
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.402977689 +0800
+++ 0039-config-x86-skip-GNU-binutils-bug-check-for-LLVM.patch	2021-11-28 22:41:03.323540920 +0800
@@ -1 +1 @@
-From 04f9fac660d018d0b163dcafed2805909f576ee9 Mon Sep 17 00:00:00 2001
+From 27cfa20c2a997f4b49d5fd2a2531d8a0fc1cb72d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 04f9fac660d018d0b163dcafed2805909f576ee9 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -18,3 +20,3 @@
- config/x86/meson.build | 7 ++++---
- lib/acl/meson.build    | 2 +-
- lib/fib/meson.build    | 2 +-
+ config/x86/meson.build     | 7 ++++---
+ lib/librte_acl/meson.build | 2 +-
+ lib/librte_fib/meson.build | 2 +-
@@ -24 +26 @@
-index 29f3dea181..603359e55a 100644
+index 31bfa63b1c..0007b6b49f 100644
@@ -32,2 +34,2 @@
--    binutils_ok = run_command(binutils_avx512_check)
--    if binutils_ok.returncode() != 0 and cc.has_argument('-mno-avx512f')
+-	binutils_ok = run_command(binutils_avx512_check)
+-	if binutils_ok.returncode() != 0 and cc.has_argument('-mno-avx512f')
@@ -36,12 +38,12 @@
-+    binutils_ok = run_command(binutils_avx512_check).returncode() == 0
-+    if not binutils_ok and cc.has_argument('-mno-avx512f')
-         machine_args += '-mno-avx512f'
-         warning('Binutils error with AVX512 assembly, disabling AVX512 support')
-     endif
-diff --git a/lib/acl/meson.build b/lib/acl/meson.build
-index f3dc513846..fbe17f9454 100644
---- a/lib/acl/meson.build
-+++ b/lib/acl/meson.build
-@@ -36,7 +36,7 @@ if dpdk_conf.has('RTE_ARCH_X86')
-     # compile AVX512 version if:
-     # we are building 64-bit binary AND binutils can generate proper code
++	binutils_ok = run_command(binutils_avx512_check).returncode() == 0
++	if not binutils_ok and cc.has_argument('-mno-avx512f')
+ 		machine_args += '-mno-avx512f'
+ 		warning('Binutils error with AVX512 assembly, disabling AVX512 support')
+ 	endif
+diff --git a/lib/librte_acl/meson.build b/lib/librte_acl/meson.build
+index ee4e229e59..c261101de7 100644
+--- a/lib/librte_acl/meson.build
++++ b/lib/librte_acl/meson.build
+@@ -30,7 +30,7 @@ if dpdk_conf.has('RTE_ARCH_X86')
+ 	# compile AVX512 version if:
+ 	# we are building 64-bit binary AND binutils can generate proper code
@@ -49,2 +51,2 @@
--    if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok.returncode() == 0
-+    if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok
+-	if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok.returncode() == 0
++	if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok
@@ -52,7 +54,7 @@
-         # compile AVX512 version if either:
-         # a. we have AVX512 supported in minimum instruction set
-diff --git a/lib/fib/meson.build b/lib/fib/meson.build
-index 593c8c47c8..9b848d0841 100644
---- a/lib/fib/meson.build
-+++ b/lib/fib/meson.build
-@@ -14,7 +14,7 @@ deps += ['rib']
+ 		# compile AVX512 version if either:
+ 		# a. we have AVX512 supported in minimum instruction set
+diff --git a/lib/librte_fib/meson.build b/lib/librte_fib/meson.build
+index 18eadcc56c..2438a2791c 100644
+--- a/lib/librte_fib/meson.build
++++ b/lib/librte_fib/meson.build
+@@ -8,7 +8,7 @@ deps += ['rib']
@@ -64,3 +66,3 @@
-     # compile AVX512 version if either:
-     # a. we have AVX512F supported in minimum instruction set baseline
-     # b. it's not minimum instruction set, but supported by compiler
+ 	# compile AVX512 version if either:
+ 	# a. we have AVX512F supported in minimum instruction set baseline
+ 	# b. it's not minimum instruction set, but supported by compiler

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'examples/ntb: fix build dependency' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (38 preceding siblings ...)
  2021-11-28 14:53   ` patch 'config/x86: skip GNU binutils bug check for LLVM' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'app/flow-perf: fix parsing of invalid option' " Xueming Li
                     ` (38 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/55935076628619db56dcafd2c726110e246e8411

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 55935076628619db56dcafd2c726110e246e8411 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 16 Nov 2021 21:51:35 +0100
Subject: [PATCH] examples/ntb: fix build dependency
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 2c7302145c0405b056850382731e5352d44f7d64 ]

Caught while building with -Ddisable_drivers=*/*.
This example requires raw/ntb specific API.
Fix dependency to avoid a compilation error:

FAILED: examples/c590b3c@@dpdk-ntb@exe/ntb_ntb_fwd.c.o
ccache gcc -Iexamples/c590b3c@@dpdk-ntb@exe -Iexamples -I../examples
  -Iexamples/ntb -I../examples/ntb -I. -I../ -Iconfig -I../config
  -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include
  -I../lib/eal/linux/include -Ilib/eal/x86/include
  -I../lib/eal/x86/include -Ilib/eal/common -I../lib/eal/common
  -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs
  -Ilib/telemetry/../metrics -I../lib/telemetry/../metrics
  -Ilib/telemetry -I../lib/telemetry -Ilib/mempool -I../lib/mempool
  -Ilib/ring -I../lib/ring -Ilib/net -I../lib/net -Ilib/mbuf
  -I../lib/mbuf -Ilib/ethdev -I../lib/ethdev -Ilib/meter
  -I../lib/meter -Ilib/cmdline -I../lib/cmdline -Ilib/rawdev
  -I../lib/rawdev -fdiagnostics-color=always -pipe -Wall
  -Winvalid-pch -Werror -O2 -g -include rte_config.h -Wextra
  -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral
  -Wformat-security -Wmissing-declarations -Wmissing-prototypes
  -Wnested-externs -Wold-style-definition -Wpointer-arith
  -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings
  -Wno-missing-field-initializers -D_GNU_SOURCE -march=corei7
  -Wno-format-truncation -D_FILE_OFFSET_BITS=64
  -DALLOW_EXPERIMENTAL_API  -MD
  -MQ 'examples/c590b3c@@dpdk-ntb@exe/ntb_ntb_fwd.c.o'
  -MF 'examples/c590b3c@@dpdk-ntb@exe/ntb_ntb_fwd.c.o.d'
  -o 'examples/c590b3c@@dpdk-ntb@exe/ntb_ntb_fwd.c.o'
  -c ../examples/ntb/ntb_fwd.c
../examples/ntb/ntb_fwd.c:21:10: fatal error: rte_pmd_ntb.h:
  No such file or directory
 #include <rte_pmd_ntb.h>
          ^~~~~~~~~~~~~~~
compilation terminated.

Fixes: 5194299d6ef5 ("examples/ntb: support more functions")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 examples/ntb/meson.build | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/examples/ntb/meson.build b/examples/ntb/meson.build
index 02be9fc80d..3da983badb 100644
--- a/examples/ntb/meson.build
+++ b/examples/ntb/meson.build
@@ -12,11 +12,8 @@ if not is_linux
 	subdir_done()
 endif
 
-deps += 'rawdev'
+deps += ['rawdev', 'raw_ntb']
 cflags += ['-D_FILE_OFFSET_BITS=64']
 sources = files(
 	'ntb_fwd.c'
 )
-if dpdk_conf.has('RTE_RAW_NTB')
-	deps += 'raw_ntb'
-endif
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.444645244 +0800
+++ 0040-examples-ntb-fix-build-dependency.patch	2021-11-28 22:41:03.323540920 +0800
@@ -1 +1 @@
-From 2c7302145c0405b056850382731e5352d44f7d64 Mon Sep 17 00:00:00 2001
+From 55935076628619db56dcafd2c726110e246e8411 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2c7302145c0405b056850382731e5352d44f7d64 ]
@@ -42 +44,0 @@
-Cc: stable@dpdk.org
@@ -50 +52 @@
-index 37899dfeb6..18eaffdf21 100644
+index 02be9fc80d..3da983badb 100644
@@ -54 +56 @@
-     subdir_done()
+ 	subdir_done()
@@ -61 +63 @@
-         'ntb_fwd.c',
+ 	'ntb_fwd.c'
@@ -64 +66 @@
--    deps += 'raw_ntb'
+-	deps += 'raw_ntb'

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'app/flow-perf: fix parsing of invalid option' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (39 preceding siblings ...)
  2021-11-28 14:53   ` patch 'examples/ntb: fix build dependency' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'doc: fix Doxygen examples build on FreeBSD' " Xueming Li
                     ` (37 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Luca Boccassi, Wisam Jaddo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7b247102a4157359d341bfa2b6df094fb5f607dc

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7b247102a4157359d341bfa2b6df094fb5f607dc Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@nvidia.com>
Date: Tue, 16 Nov 2021 16:12:26 +0200
Subject: [PATCH] app/flow-perf: fix parsing of invalid option
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 22ffcce31b9489705bca6eaf87f4714437cc16da ]

Currently, if an invalid parameter is passed to the application
it will cause a crash due to missing default in options.

For example:
        ./dpdk-test-flow-perf -a 01:00.0 -- --invalid

This adds missing default for options, and prints the
invalid option.

Fixes: 3344cf2e3001 ("app/flow-perf: add flow performance skeleton")

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
Acked-by: Wisam Jaddo <wisamm@nvidia.com>
---
 app/test-flow-perf/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
index f525bc913a..3b3ecdc75e 100644
--- a/app/test-flow-perf/main.c
+++ b/app/test-flow-perf/main.c
@@ -591,6 +591,7 @@ args_parse(int argc, char **argv)
 		{ "raw-decap",                  1, 0, 0 },
 		{ "vxlan-encap",                0, 0, 0 },
 		{ "vxlan-decap",                0, 0, 0 },
+		{ 0, 0, 0, 0 },
 	};
 
 	RTE_ETH_FOREACH_DEV(i)
@@ -751,7 +752,7 @@ args_parse(int argc, char **argv)
 		default:
 			usage(argv[0]);
 			rte_exit(EXIT_FAILURE, "Invalid option: %s\n",
-					argv[optind]);
+					argv[optind - 1]);
 			break;
 		}
 	}
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.485167594 +0800
+++ 0041-app-flow-perf-fix-parsing-of-invalid-option.patch	2021-11-28 22:41:03.323540920 +0800
@@ -1 +1 @@
-From 22ffcce31b9489705bca6eaf87f4714437cc16da Mon Sep 17 00:00:00 2001
+From 7b247102a4157359d341bfa2b6df094fb5f607dc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 22ffcce31b9489705bca6eaf87f4714437cc16da ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 2b612aa32c..11f1ee0e1e 100644
+index f525bc913a..3b3ecdc75e 100644
@@ -28,4 +30,4 @@
-@@ -715,6 +715,7 @@ args_parse(int argc, char **argv)
- 		{ "policy-mtr",                 1, 0, 0 },
- 		{ "meter-profile",              1, 0, 0 },
- 		{ "packet-mode",                0, 0, 0 },
+@@ -591,6 +591,7 @@ args_parse(int argc, char **argv)
+ 		{ "raw-decap",                  1, 0, 0 },
+ 		{ "vxlan-encap",                0, 0, 0 },
+ 		{ "vxlan-decap",                0, 0, 0 },
@@ -36 +38 @@
-@@ -951,7 +952,7 @@ args_parse(int argc, char **argv)
+@@ -751,7 +752,7 @@ args_parse(int argc, char **argv)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'doc: fix Doxygen examples build on FreeBSD' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (40 preceding siblings ...)
  2021-11-28 14:53   ` patch 'app/flow-perf: fix parsing of invalid option' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'vdpa/mlx5: fix mkey creation check' " Xueming Li
                     ` (36 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6382840ec2d183faec901892f24cb85c730d1926

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6382840ec2d183faec901892f24cb85c730d1926 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 15 Sep 2021 18:36:33 +0100
Subject: [PATCH] doc: fix Doxygen examples build on FreeBSD
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 897e55c8d27f7c69cdc0c330deb67d15bd0b583d ]

On FreeBSD, "find" does not support the "printf" flag, so we need to
use "gfind" from the "findutils" package.

Fixes: 8260f4f98cfe ("mk: use script to generate examples.dox")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/api/generate_examples.sh | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/doc/api/generate_examples.sh b/doc/api/generate_examples.sh
index dae7ee0be0..3e08236596 100755
--- a/doc/api/generate_examples.sh
+++ b/doc/api/generate_examples.sh
@@ -5,12 +5,22 @@
 EXAMPLES_DIR=$1
 API_EXAMPLES=$2
 
+FIND=find
+if [ "$(uname)" = "FreeBSD" ] ; then
+# on FreeBSD, we need GNU find for "-printf" flag
+	FIND=gfind
+	if ! which -s $FIND ; then
+		echo "Error: need '$FIND' on FreeBSD. Install 'findutils' pkg"
+		exit 1
+	fi
+fi
+
 # generate a .d file including both C files and also build files, so we can
 # detect both file changes and file additions/deletions
-echo "$API_EXAMPLES: $(find ${EXAMPLES_DIR} -type f \( -name '*.c' -o -name 'meson.build' \) -printf '%p ' )" > ${API_EXAMPLES}.d
+echo "$API_EXAMPLES: $($FIND ${EXAMPLES_DIR} -type f \( -name '*.c' -o -name 'meson.build' \) -printf '%p ' )" > ${API_EXAMPLES}.d
 
 exec > "${API_EXAMPLES}"
 printf '/**\n'
 printf '@page examples DPDK Example Programs\n\n'
-find "${EXAMPLES_DIR}" -type f -name '*.c' -printf '@example examples/%P\n' | LC_ALL=C sort
+$FIND "${EXAMPLES_DIR}" -type f -name '*.c' -printf '@example examples/%P\n' | LC_ALL=C sort
 printf '*/\n'
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.526215477 +0800
+++ 0042-doc-fix-Doxygen-examples-build-on-FreeBSD.patch	2021-11-28 22:41:03.323540920 +0800
@@ -1 +1 @@
-From 897e55c8d27f7c69cdc0c330deb67d15bd0b583d Mon Sep 17 00:00:00 2001
+From 6382840ec2d183faec901892f24cb85c730d1926 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 897e55c8d27f7c69cdc0c330deb67d15bd0b583d ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'vdpa/mlx5: fix mkey creation check' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (41 preceding siblings ...)
  2021-11-28 14:53   ` patch 'doc: fix Doxygen examples build on FreeBSD' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/mlx5: fix VXLAN-GPE next protocol translation' " Xueming Li
                     ` (35 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Luca Boccassi, Matan Azrad, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/bc9ea21f705e5c0b66b9e187e92b24b38fddabfd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bc9ea21f705e5c0b66b9e187e92b24b38fddabfd Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Fri, 12 Nov 2021 16:42:45 +0200
Subject: [PATCH] vdpa/mlx5: fix mkey creation check
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e9511a26e1c4fed566c3c2ea33ca895b7ab4f724 ]

The return value of "mlx5_os_wrapped_mkey_create" is checked in the
caller. A zero means success without any error.

The typo in the if-condition should be fixed in case there is a
misjudgment.

Fixes: 398ea8450c53 ("vdpa/mlx5: workaround dirty bitmap MR creation")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa_lm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_lm.c b/drivers/vdpa/mlx5/mlx5_vdpa_lm.c
index 49d74a7e99..bb5bd3b887 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_lm.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_lm.c
@@ -47,7 +47,7 @@ mlx5_vdpa_dirty_bitmap_set(struct mlx5_vdpa_priv *priv, uint64_t log_base,
 					      (void *)(uintptr_t)log_base,
 					      log_size, &priv->lm_mr);
 
-	if (!ret) {
+	if (ret) {
 		DRV_LOG(ERR, "Failed to allocate wrapped MR for lm.");
 		return -1;
 	}
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.566180945 +0800
+++ 0043-vdpa-mlx5-fix-mkey-creation-check.patch	2021-11-28 22:41:03.323540920 +0800
@@ -1 +1 @@
-From e9511a26e1c4fed566c3c2ea33ca895b7ab4f724 Mon Sep 17 00:00:00 2001
+From bc9ea21f705e5c0b66b9e187e92b24b38fddabfd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e9511a26e1c4fed566c3c2ea33ca895b7ab4f724 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index e65e4faa47..43a2b98255 100644
+index 49d74a7e99..bb5bd3b887 100644

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx5: fix VXLAN-GPE next protocol translation' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (42 preceding siblings ...)
  2021-11-28 14:53   ` patch 'vdpa/mlx5: fix mkey creation check' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/mlx5: add Ethernet header to GENEVE RSS expansion' " Xueming Li
                     ` (34 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/121e062b7f6259e544ecef31d48fb123ea3d6599

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 121e062b7f6259e544ecef31d48fb123ea3d6599 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Sun, 14 Nov 2021 17:36:12 +0200
Subject: [PATCH] net/mlx5: fix VXLAN-GPE next protocol translation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 861fa3796f75748ccc4a6dae55e5a7e34c97dea4 ]

VXLAN-GPE extends VXLAN protocol and provides the next protocol
field specifying the first inner header type.

The application can assign some explicit value to
VXLAN-GPE::next_protocol field or set it to the default one. In the
latter case, the rdma-core library cannot recognize the matcher
built by PMD correctly, and it results in hardware configuration
missing inner headers match.

The patch forces VXLAN-GPE::next_protocol assignment if the
application did not explicitly assign it to the non-default value

Fixes: 90456726eb80 ("net/mlx5: fix VXLAN-GPE item translation")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 76 ++++++++++++++++++---------------
 1 file changed, 42 insertions(+), 34 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 37c5a7eb88..27a6554c7e 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7182,46 +7182,40 @@ flow_dv_translate_item_vxlan(void *matcher, void *key,
 
 static void
 flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
-				 const struct rte_flow_item *item, int inner)
+				 const struct rte_flow_item *item,
+				 const uint64_t pattern_flags)
 {
+	static const struct rte_flow_item_vxlan_gpe dummy_vxlan_gpe_hdr = {0, };
 	const struct rte_flow_item_vxlan_gpe *vxlan_m = item->mask;
 	const struct rte_flow_item_vxlan_gpe *vxlan_v = item->spec;
-	void *headers_m;
-	void *headers_v;
+	/* The item was validated to be on the outer side */
+	void *headers_m = MLX5_ADDR_OF(fte_match_param, matcher, outer_headers);
+	void *headers_v = MLX5_ADDR_OF(fte_match_param, key, outer_headers);
 	void *misc_m =
 		MLX5_ADDR_OF(fte_match_param, matcher, misc_parameters_3);
 	void *misc_v =
 		MLX5_ADDR_OF(fte_match_param, key, misc_parameters_3);
-	char *vni_m;
-	char *vni_v;
-	uint16_t dport;
-	int size;
-	int i;
+	char *vni_m =
+		MLX5_ADDR_OF(fte_match_set_misc3, misc_m, outer_vxlan_gpe_vni);
+	char *vni_v =
+		MLX5_ADDR_OF(fte_match_set_misc3, misc_v, outer_vxlan_gpe_vni);
+	int i, size = sizeof(vxlan_m->vni);
 	uint8_t flags_m = 0xff;
 	uint8_t flags_v = 0xc;
+	uint8_t m_protocol, v_protocol;
 
-	if (inner) {
-		headers_m = MLX5_ADDR_OF(fte_match_param, matcher,
-					 inner_headers);
-		headers_v = MLX5_ADDR_OF(fte_match_param, key, inner_headers);
-	} else {
-		headers_m = MLX5_ADDR_OF(fte_match_param, matcher,
-					 outer_headers);
-		headers_v = MLX5_ADDR_OF(fte_match_param, key, outer_headers);
-	}
-	dport = item->type == RTE_FLOW_ITEM_TYPE_VXLAN ?
-		MLX5_UDP_PORT_VXLAN : MLX5_UDP_PORT_VXLAN_GPE;
 	if (!MLX5_GET16(fte_match_set_lyr_2_4, headers_v, udp_dport)) {
 		MLX5_SET(fte_match_set_lyr_2_4, headers_m, udp_dport, 0xFFFF);
-		MLX5_SET(fte_match_set_lyr_2_4, headers_v, udp_dport, dport);
+		MLX5_SET(fte_match_set_lyr_2_4, headers_v, udp_dport,
+			 MLX5_UDP_PORT_VXLAN_GPE);
+	}
+	if (!vxlan_v) {
+		vxlan_v = &dummy_vxlan_gpe_hdr;
+		vxlan_m = &dummy_vxlan_gpe_hdr;
+	} else {
+		if (!vxlan_m)
+			vxlan_m = &rte_flow_item_vxlan_gpe_mask;
 	}
-	if (!vxlan_v)
-		return;
-	if (!vxlan_m)
-		vxlan_m = &rte_flow_item_vxlan_gpe_mask;
-	size = sizeof(vxlan_m->vni);
-	vni_m = MLX5_ADDR_OF(fte_match_set_misc3, misc_m, outer_vxlan_gpe_vni);
-	vni_v = MLX5_ADDR_OF(fte_match_set_misc3, misc_v, outer_vxlan_gpe_vni);
 	memcpy(vni_m, vxlan_m->vni, size);
 	for (i = 0; i < size; ++i)
 		vni_v[i] = vni_m[i] & vxlan_v->vni[i];
@@ -7231,10 +7225,22 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
 	}
 	MLX5_SET(fte_match_set_misc3, misc_m, outer_vxlan_gpe_flags, flags_m);
 	MLX5_SET(fte_match_set_misc3, misc_v, outer_vxlan_gpe_flags, flags_v);
-	MLX5_SET(fte_match_set_misc3, misc_m, outer_vxlan_gpe_next_protocol,
-		 vxlan_m->protocol);
-	MLX5_SET(fte_match_set_misc3, misc_v, outer_vxlan_gpe_next_protocol,
-		 vxlan_v->protocol);
+	m_protocol = vxlan_m->protocol;
+	v_protocol = vxlan_v->protocol;
+	if (!m_protocol) {
+		m_protocol = 0xff;
+		/* Force next protocol to ensure next headers parsing. */
+		if (pattern_flags & MLX5_FLOW_LAYER_INNER_L2)
+			v_protocol = RTE_VXLAN_GPE_TYPE_ETH;
+		else if (pattern_flags & MLX5_FLOW_LAYER_INNER_L3_IPV4)
+			v_protocol = RTE_VXLAN_GPE_TYPE_IPV4;
+		else if (pattern_flags & MLX5_FLOW_LAYER_INNER_L3_IPV6)
+			v_protocol = RTE_VXLAN_GPE_TYPE_IPV6;
+	}
+	MLX5_SET(fte_match_set_misc3, misc_m,
+		 outer_vxlan_gpe_next_protocol, m_protocol);
+	MLX5_SET(fte_match_set_misc3, misc_v,
+		 outer_vxlan_gpe_next_protocol, m_protocol & v_protocol);
 }
 
 /**
@@ -9758,6 +9764,7 @@ flow_dv_translate(struct rte_eth_dev *dev,
 		.skip_scale = !!dev_flow->skip_scale,
 		.std_tbl_fix = true,
 	};
+	const struct rte_flow_item *tunnel_item = NULL;
 
 	if (!wks)
 		return rte_flow_error_set(error, ENOMEM,
@@ -10549,11 +10556,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
 			last_item = MLX5_FLOW_LAYER_VXLAN;
 			break;
 		case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
-			flow_dv_translate_item_vxlan_gpe(match_mask,
-							 match_value, items,
-							 tunnel);
 			matcher.priority = MLX5_TUNNEL_PRIO_GET(rss_desc);
 			last_item = MLX5_FLOW_LAYER_VXLAN_GPE;
+			tunnel_item = items;
 			break;
 		case RTE_FLOW_ITEM_TYPE_GENEVE:
 			flow_dv_translate_item_geneve(match_mask, match_value,
@@ -10648,6 +10653,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
 						   match_value, NULL, attr))
 			return -rte_errno;
 	}
+	if (item_flags & MLX5_FLOW_LAYER_VXLAN_GPE)
+		flow_dv_translate_item_vxlan_gpe(match_mask, match_value,
+						 tunnel_item, item_flags);
 #ifdef RTE_LIBRTE_MLX5_DEBUG
 	MLX5_ASSERT(!flow_dv_check_valid_spec(matcher.mask.buf,
 					      dev_flow->dv.value.buf));
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.607589874 +0800
+++ 0044-net-mlx5-fix-VXLAN-GPE-next-protocol-translation.patch	2021-11-28 22:41:03.333540739 +0800
@@ -1 +1 @@
-From 861fa3796f75748ccc4a6dae55e5a7e34c97dea4 Mon Sep 17 00:00:00 2001
+From 121e062b7f6259e544ecef31d48fb123ea3d6599 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 861fa3796f75748ccc4a6dae55e5a7e34c97dea4 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 1b4e15dff1..f9acb69cca 100644
+index 37c5a7eb88..27a6554c7e 100644
@@ -31 +33 @@
-@@ -8962,46 +8962,40 @@ flow_dv_translate_item_vxlan(struct rte_eth_dev *dev,
+@@ -7182,46 +7182,40 @@ flow_dv_translate_item_vxlan(void *matcher, void *key,
@@ -99 +101 @@
-@@ -9011,10 +9005,22 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
+@@ -7231,10 +7225,22 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
@@ -126 +128,2 @@
-@@ -12644,6 +12650,7 @@ flow_dv_translate(struct rte_eth_dev *dev,
+@@ -9758,6 +9764,7 @@ flow_dv_translate(struct rte_eth_dev *dev,
+ 		.skip_scale = !!dev_flow->skip_scale,
@@ -129 +131,0 @@
- 	const struct rte_flow_item *integrity_items[2] = {NULL, NULL};
@@ -134 +136 @@
-@@ -13437,11 +13444,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
+@@ -10549,11 +10556,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
@@ -147,3 +149,3 @@
-@@ -13573,6 +13578,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
- 						      integrity_items,
- 						      item_flags);
+@@ -10648,6 +10653,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
+ 						   match_value, NULL, attr))
+ 			return -rte_errno;

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx5: add Ethernet header to GENEVE RSS expansion' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (43 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/mlx5: fix VXLAN-GPE next protocol translation' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/mlx5: fix RSS expansion scheme for GRE header' " Xueming Li
                     ` (33 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ae9d83d713a8861f4dee8cf86f91ff125b488655

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ae9d83d713a8861f4dee8cf86f91ff125b488655 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Sun, 14 Nov 2021 17:36:13 +0200
Subject: [PATCH] net/mlx5: add Ethernet header to GENEVE RSS expansion
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9f151fd8dfb30946a00f6ac273df93db14d1b45d ]

RFC-8926 allows inner Ethernet header after GENEVE tunnel.

Current GENEVE RSS expansion created IPv4 and IPv6 paths only.

The patch adds Ethernet to RSS expansion scheme.

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 36 ++++++++++++++++++++++++++++++++++--
 1 file changed, 34 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index b8e11a43f5..21f018dd1d 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -237,6 +237,29 @@ mlx5_flow_expand_rss_item_complete(const struct rte_flow_item *item)
 		else
 			ret = RTE_FLOW_ITEM_TYPE_END;
 		break;
+	case RTE_FLOW_ITEM_TYPE_GENEVE:
+		ether_type_m = item->mask ?
+			       ((const struct rte_flow_item_geneve *)
+			       (item->mask))->protocol :
+			       rte_flow_item_geneve_mask.protocol;
+		ether_type = ((const struct rte_flow_item_geneve *)
+			     (item->spec))->protocol;
+		ether_type_m = rte_be_to_cpu_16(ether_type_m);
+		ether_type = rte_be_to_cpu_16(ether_type);
+		switch (ether_type_m & ether_type) {
+		case RTE_ETHER_TYPE_TEB:
+			ret = RTE_FLOW_ITEM_TYPE_ETH;
+			break;
+		case RTE_ETHER_TYPE_IPV4:
+			ret = RTE_FLOW_ITEM_TYPE_IPV4;
+			break;
+		case RTE_ETHER_TYPE_IPV6:
+			ret = RTE_FLOW_ITEM_TYPE_IPV6;
+			break;
+		default:
+			ret = RTE_FLOW_ITEM_TYPE_END;
+		}
+		break;
 	default:
 		ret = RTE_FLOW_ITEM_TYPE_VOID;
 		break;
@@ -456,7 +479,8 @@ enum mlx5_expansion {
 	MLX5_EXPANSION_IPV6_UDP,
 	MLX5_EXPANSION_IPV6_TCP,
 	MLX5_EXPANSION_IPV6_FRAG_EXT,
-	MLX5_EXPANSION_GTP
+	MLX5_EXPANSION_GTP,
+	MLX5_EXPANSION_GENEVE,
 };
 
 /** Supported expansion of items. */
@@ -514,6 +538,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_VXLAN,
 						  MLX5_EXPANSION_VXLAN_GPE,
 						  MLX5_EXPANSION_MPLS,
+						  MLX5_EXPANSION_GENEVE,
 						  MLX5_EXPANSION_GTP),
 		.type = RTE_FLOW_ITEM_TYPE_UDP,
 		.rss_types = ETH_RSS_NONFRAG_IPV4_UDP,
@@ -538,6 +563,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_VXLAN,
 						  MLX5_EXPANSION_VXLAN_GPE,
 						  MLX5_EXPANSION_MPLS,
+						  MLX5_EXPANSION_GENEVE,
 						  MLX5_EXPANSION_GTP),
 		.type = RTE_FLOW_ITEM_TYPE_UDP,
 		.rss_types = ETH_RSS_NONFRAG_IPV6_UDP,
@@ -634,7 +660,13 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 			.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
 							  MLX5_EXPANSION_IPV6),
 			.type = RTE_FLOW_ITEM_TYPE_GTP
-	}
+	},
+	[MLX5_EXPANSION_GENEVE] = {
+		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_ETH,
+						  MLX5_EXPANSION_IPV4,
+						  MLX5_EXPANSION_IPV6),
+		.type = RTE_FLOW_ITEM_TYPE_GENEVE,
+	},
 };
 
 static struct rte_flow_shared_action *
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.662242319 +0800
+++ 0045-net-mlx5-add-Ethernet-header-to-GENEVE-RSS-expansion.patch	2021-11-28 22:41:03.340207285 +0800
@@ -1 +1 @@
-From 9f151fd8dfb30946a00f6ac273df93db14d1b45d Mon Sep 17 00:00:00 2001
+From ae9d83d713a8861f4dee8cf86f91ff125b488655 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9f151fd8dfb30946a00f6ac273df93db14d1b45d ]
@@ -12,2 +14,0 @@
-Cc: stable@dpdk.org
-
@@ -17,2 +18,2 @@
- drivers/net/mlx5/mlx5_flow.c | 34 +++++++++++++++++++++++++++++++++-
- 1 file changed, 33 insertions(+), 1 deletion(-)
+ drivers/net/mlx5/mlx5_flow.c | 36 ++++++++++++++++++++++++++++++++++--
+ 1 file changed, 34 insertions(+), 2 deletions(-)
@@ -21 +22 @@
-index f657980737..205fe19cdd 100644
+index b8e11a43f5..21f018dd1d 100644
@@ -24 +25 @@
-@@ -258,6 +258,29 @@ mlx5_flow_expand_rss_item_complete(const struct rte_flow_item *item)
+@@ -237,6 +237,29 @@ mlx5_flow_expand_rss_item_complete(const struct rte_flow_item *item)
@@ -54 +55 @@
-@@ -530,7 +553,8 @@ enum mlx5_expansion {
+@@ -456,7 +479,8 @@ enum mlx5_expansion {
@@ -64 +65 @@
-@@ -574,6 +598,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+@@ -514,6 +538,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
@@ -71,2 +72,2 @@
- 		.rss_types = RTE_ETH_RSS_NONFRAG_IPV4_UDP,
-@@ -598,6 +623,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+ 		.rss_types = ETH_RSS_NONFRAG_IPV4_UDP,
+@@ -538,6 +563,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
@@ -79,5 +80,7 @@
- 		.rss_types = RTE_ETH_RSS_NONFRAG_IPV6_UDP,
-@@ -701,6 +727,12 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
- 						  MLX5_EXPANSION_IPV6),
- 		.type = RTE_FLOW_ITEM_TYPE_GTP,
- 	},
+ 		.rss_types = ETH_RSS_NONFRAG_IPV6_UDP,
+@@ -634,7 +660,13 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+ 			.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
+ 							  MLX5_EXPANSION_IPV6),
+ 			.type = RTE_FLOW_ITEM_TYPE_GTP
+-	}
++	},
@@ -92 +95 @@
- static struct rte_flow_action_handle *
+ static struct rte_flow_shared_action *

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx5: fix RSS expansion scheme for GRE header' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (44 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/mlx5: add Ethernet header to GENEVE RSS expansion' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/mlx5: fix GENEVE protocol type translation' " Xueming Li
                     ` (32 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b87d31178d809ee6b778ff05d670f8abbcafa984

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b87d31178d809ee6b778ff05d670f8abbcafa984 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Sun, 14 Nov 2021 17:36:14 +0200
Subject: [PATCH] net/mlx5: fix RSS expansion scheme for GRE header
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a21d616b99ffc5810a4b5333e5efdf1ddff21405 ]

RFC-2784 allows any valid Ethernet type in GRE protocol type field.

Add Ethernet to GRE RSS expansion.

Fixes: f4b901a46aec ("net/mlx5: add flow GRE item")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 21f018dd1d..2533a9102e 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -585,7 +585,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 		.type = RTE_FLOW_ITEM_TYPE_VXLAN_GPE,
 	},
 	[MLX5_EXPANSION_GRE] = {
-		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
+		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_ETH,
+						  MLX5_EXPANSION_IPV4,
 						  MLX5_EXPANSION_IPV6,
 						  MLX5_EXPANSION_GRE_KEY,
 						  MLX5_EXPANSION_MPLS),
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.708802346 +0800
+++ 0046-net-mlx5-fix-RSS-expansion-scheme-for-GRE-header.patch	2021-11-28 22:41:03.346873831 +0800
@@ -1 +1 @@
-From a21d616b99ffc5810a4b5333e5efdf1ddff21405 Mon Sep 17 00:00:00 2001
+From b87d31178d809ee6b778ff05d670f8abbcafa984 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a21d616b99ffc5810a4b5333e5efdf1ddff21405 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 205fe19cdd..43598f92ee 100644
+index 21f018dd1d..2533a9102e 100644
@@ -23 +25 @@
-@@ -654,7 +654,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+@@ -585,7 +585,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx5: fix GENEVE protocol type translation' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (45 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/mlx5: fix RSS expansion scheme for GRE header' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/mlx5: fix GRE " Xueming Li
                     ` (31 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/fdae4c228feb436202527ea8c2e919139c4f95e1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fdae4c228feb436202527ea8c2e919139c4f95e1 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Sun, 14 Nov 2021 17:36:15 +0200
Subject: [PATCH] net/mlx5: fix GENEVE protocol type translation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 690391dd0e8bc7a8d02a3aba844ffc3dffe7aecd ]

When application creates several flows to match on GENEVE tunnel
without explicitly specifying GENEVE protocol type value in
flow rules, PMD will translate that to zero mask.
RDMA-CORE cannot distinguish between different inner flow types and
produces identical matchers for each zero mask.

The patch extracts inner header type from flow rule and forces it
in GENEVE protocol type, if application did not specify
any without explicitly specifying GENEVE protocol type value in
flow rules, protocol type value.

Fixes: e59a5dbcfd07 ("net/mlx5: add flow match on GENEVE item")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 78 ++++++++++++++++++++-------------
 1 file changed, 47 insertions(+), 31 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 27a6554c7e..b80bdc78ba 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -84,6 +84,20 @@ flow_dv_port_id_action_resource_release(struct rte_eth_dev *dev,
 static void
 flow_dv_shared_rss_action_release(struct rte_eth_dev *dev, uint32_t srss);
 
+static inline uint16_t
+mlx5_translate_tunnel_etypes(uint64_t pattern_flags)
+{
+	if (pattern_flags & MLX5_FLOW_LAYER_INNER_L2)
+		return RTE_ETHER_TYPE_TEB;
+	else if (pattern_flags & MLX5_FLOW_LAYER_INNER_L3_IPV4)
+		return RTE_ETHER_TYPE_IPV4;
+	else if (pattern_flags & MLX5_FLOW_LAYER_INNER_L3_IPV6)
+		return RTE_ETHER_TYPE_IPV6;
+	else if (pattern_flags & MLX5_FLOW_LAYER_MPLS)
+		return RTE_ETHER_TYPE_MPLS;
+	return 0;
+}
+
 /**
  * Initialize flow attributes structure according to flow items' types.
  *
@@ -7258,49 +7272,39 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
 
 static void
 flow_dv_translate_item_geneve(void *matcher, void *key,
-			      const struct rte_flow_item *item, int inner)
+			      const struct rte_flow_item *item,
+			      uint64_t pattern_flags)
 {
+	static const struct rte_flow_item_geneve empty_geneve = {0,};
 	const struct rte_flow_item_geneve *geneve_m = item->mask;
 	const struct rte_flow_item_geneve *geneve_v = item->spec;
-	void *headers_m;
-	void *headers_v;
+	/* GENEVE flow item validation allows single tunnel item */
+	void *headers_m = MLX5_ADDR_OF(fte_match_param, matcher, outer_headers);
+	void *headers_v = MLX5_ADDR_OF(fte_match_param, key, outer_headers);
 	void *misc_m = MLX5_ADDR_OF(fte_match_param, matcher, misc_parameters);
 	void *misc_v = MLX5_ADDR_OF(fte_match_param, key, misc_parameters);
-	uint16_t dport;
 	uint16_t gbhdr_m;
 	uint16_t gbhdr_v;
-	char *vni_m;
-	char *vni_v;
-	size_t size, i;
+	char *vni_m = MLX5_ADDR_OF(fte_match_set_misc, misc_m, geneve_vni);
+	char *vni_v = MLX5_ADDR_OF(fte_match_set_misc, misc_v, geneve_vni);
+	size_t size = sizeof(geneve_m->vni), i;
+	uint16_t protocol_m, protocol_v;
 
-	if (inner) {
-		headers_m = MLX5_ADDR_OF(fte_match_param, matcher,
-					 inner_headers);
-		headers_v = MLX5_ADDR_OF(fte_match_param, key, inner_headers);
-	} else {
-		headers_m = MLX5_ADDR_OF(fte_match_param, matcher,
-					 outer_headers);
-		headers_v = MLX5_ADDR_OF(fte_match_param, key, outer_headers);
-	}
-	dport = MLX5_UDP_PORT_GENEVE;
 	if (!MLX5_GET16(fte_match_set_lyr_2_4, headers_v, udp_dport)) {
 		MLX5_SET(fte_match_set_lyr_2_4, headers_m, udp_dport, 0xFFFF);
-		MLX5_SET(fte_match_set_lyr_2_4, headers_v, udp_dport, dport);
+		MLX5_SET(fte_match_set_lyr_2_4, headers_v, udp_dport,
+			 MLX5_UDP_PORT_GENEVE);
+	}
+	if (!geneve_v) {
+		geneve_v = &empty_geneve;
+		geneve_m = &empty_geneve;
+	} else {
+		if (!geneve_m)
+			geneve_m = &rte_flow_item_geneve_mask;
 	}
-	if (!geneve_v)
-		return;
-	if (!geneve_m)
-		geneve_m = &rte_flow_item_geneve_mask;
-	size = sizeof(geneve_m->vni);
-	vni_m = MLX5_ADDR_OF(fte_match_set_misc, misc_m, geneve_vni);
-	vni_v = MLX5_ADDR_OF(fte_match_set_misc, misc_v, geneve_vni);
 	memcpy(vni_m, geneve_m->vni, size);
 	for (i = 0; i < size; ++i)
 		vni_v[i] = vni_m[i] & geneve_v->vni[i];
-	MLX5_SET(fte_match_set_misc, misc_m, geneve_protocol_type,
-		 rte_be_to_cpu_16(geneve_m->protocol));
-	MLX5_SET(fte_match_set_misc, misc_v, geneve_protocol_type,
-		 rte_be_to_cpu_16(geneve_v->protocol & geneve_m->protocol));
 	gbhdr_m = rte_be_to_cpu_16(geneve_m->ver_opt_len_o_c_rsvd0);
 	gbhdr_v = rte_be_to_cpu_16(geneve_v->ver_opt_len_o_c_rsvd0);
 	MLX5_SET(fte_match_set_misc, misc_m, geneve_oam,
@@ -7312,6 +7316,16 @@ flow_dv_translate_item_geneve(void *matcher, void *key,
 	MLX5_SET(fte_match_set_misc, misc_v, geneve_opt_len,
 		 MLX5_GENEVE_OPTLEN_VAL(gbhdr_v) &
 		 MLX5_GENEVE_OPTLEN_VAL(gbhdr_m));
+	protocol_m = rte_be_to_cpu_16(geneve_m->protocol);
+	protocol_v = rte_be_to_cpu_16(geneve_v->protocol);
+	if (!protocol_m) {
+		/* Force next protocol to prevent matchers duplication */
+		protocol_m = 0xFFFF;
+		protocol_v = mlx5_translate_tunnel_etypes(pattern_flags);
+	}
+	MLX5_SET(fte_match_set_misc, misc_m, geneve_protocol_type, protocol_m);
+	MLX5_SET(fte_match_set_misc, misc_v, geneve_protocol_type,
+		 protocol_m & protocol_v);
 }
 
 /**
@@ -10561,10 +10575,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
 			tunnel_item = items;
 			break;
 		case RTE_FLOW_ITEM_TYPE_GENEVE:
-			flow_dv_translate_item_geneve(match_mask, match_value,
-						      items, tunnel);
 			matcher.priority = MLX5_TUNNEL_PRIO_GET(rss_desc);
 			last_item = MLX5_FLOW_LAYER_GENEVE;
+			tunnel_item = items;
 			break;
 		case RTE_FLOW_ITEM_TYPE_MPLS:
 			flow_dv_translate_item_mpls(match_mask, match_value,
@@ -10656,6 +10669,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
 	if (item_flags & MLX5_FLOW_LAYER_VXLAN_GPE)
 		flow_dv_translate_item_vxlan_gpe(match_mask, match_value,
 						 tunnel_item, item_flags);
+	else if (item_flags & MLX5_FLOW_LAYER_GENEVE)
+		flow_dv_translate_item_geneve(match_mask, match_value,
+					      tunnel_item, item_flags);
 #ifdef RTE_LIBRTE_MLX5_DEBUG
 	MLX5_ASSERT(!flow_dv_check_valid_spec(matcher.mask.buf,
 					      dev_flow->dv.value.buf));
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.755107120 +0800
+++ 0047-net-mlx5-fix-GENEVE-protocol-type-translation.patch	2021-11-28 22:41:03.356873650 +0800
@@ -1 +1 @@
-From 690391dd0e8bc7a8d02a3aba844ffc3dffe7aecd Mon Sep 17 00:00:00 2001
+From fdae4c228feb436202527ea8c2e919139c4f95e1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 690391dd0e8bc7a8d02a3aba844ffc3dffe7aecd ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index f9acb69cca..bce504391d 100644
+index 27a6554c7e..b80bdc78ba 100644
@@ -30,3 +32,3 @@
-@@ -93,6 +93,20 @@ static int
- flow_dv_jump_tbl_resource_release(struct rte_eth_dev *dev,
- 				  uint32_t rix_jump);
+@@ -84,6 +84,20 @@ flow_dv_port_id_action_resource_release(struct rte_eth_dev *dev,
+ static void
+ flow_dv_shared_rss_action_release(struct rte_eth_dev *dev, uint32_t srss);
@@ -48,4 +50,4 @@
- static int16_t
- flow_dv_get_esw_manager_vport_id(struct rte_eth_dev *dev)
- {
-@@ -9038,49 +9052,39 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
+ /**
+  * Initialize flow attributes structure according to flow items' types.
+  *
+@@ -7258,49 +7272,39 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
@@ -120 +122 @@
-@@ -9092,6 +9096,16 @@ flow_dv_translate_item_geneve(void *matcher, void *key,
+@@ -7312,6 +7316,16 @@ flow_dv_translate_item_geneve(void *matcher, void *key,
@@ -137 +139 @@
-@@ -13449,10 +13463,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
+@@ -10561,10 +10575,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
@@ -147,3 +149,3 @@
- 		case RTE_FLOW_ITEM_TYPE_GENEVE_OPT:
- 			ret = flow_dv_translate_item_geneve_opt(dev, match_mask,
-@@ -13581,6 +13594,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
+ 		case RTE_FLOW_ITEM_TYPE_MPLS:
+ 			flow_dv_translate_item_mpls(match_mask, match_value,
+@@ -10656,6 +10669,9 @@ flow_dv_translate(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx5: fix GRE protocol type translation' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (46 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/mlx5: fix GENEVE protocol type translation' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/hns3: optimize Tx performance by mbuf fast free' " Xueming Li
                     ` (30 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a12dd597cdabdacf66df697ac60546ad0cbeb401

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a12dd597cdabdacf66df697ac60546ad0cbeb401 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Sun, 14 Nov 2021 17:36:16 +0200
Subject: [PATCH] net/mlx5: fix GRE protocol type translation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit be26e81bfc1cb681d3ee0764aa6733000869984a ]

When application creates several flows to match on GRE tunnel
without explicitly specifying GRE protocol type value in
flow rules, PMD will translate that to zero mask.
RDMA-CORE cannot distinguish between different inner flow types and
produces identical matchers for each zero mask.

The patch extracts inner header type from flow rule and forces it
in GRE protocol type, if application did not specify
any without explicitly specifying GRE protocol type value in
flow rules, protocol type value.

Fixes: fc2c498ccb94 ("net/mlx5: add Direct Verbs translate items")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 70 +++++++++++++++++++--------------
 1 file changed, 40 insertions(+), 30 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index b80bdc78ba..498b2137f7 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7001,18 +7001,19 @@ flow_dv_translate_item_gre_key(void *matcher, void *key,
  *   Flow matcher value.
  * @param[in] item
  *   Flow pattern to translate.
- * @param[in] inner
- *   Item is inner pattern.
+ * @param[in] pattern_flags
+ *   Accumulated pattern flags.
  */
 static void
 flow_dv_translate_item_gre(void *matcher, void *key,
 			   const struct rte_flow_item *item,
-			   int inner)
+			   uint64_t pattern_flags)
 {
+	static const struct rte_flow_item_gre empty_gre = {0,};
 	const struct rte_flow_item_gre *gre_m = item->mask;
 	const struct rte_flow_item_gre *gre_v = item->spec;
-	void *headers_m;
-	void *headers_v;
+	void *headers_m = MLX5_ADDR_OF(fte_match_param, matcher, outer_headers);
+	void *headers_v = MLX5_ADDR_OF(fte_match_param, key, outer_headers);
 	void *misc_m = MLX5_ADDR_OF(fte_match_param, matcher, misc_parameters);
 	void *misc_v = MLX5_ADDR_OF(fte_match_param, key, misc_parameters);
 	struct {
@@ -7029,26 +7030,17 @@ flow_dv_translate_item_gre(void *matcher, void *key,
 			uint16_t value;
 		};
 	} gre_crks_rsvd0_ver_m, gre_crks_rsvd0_ver_v;
+	uint16_t protocol_m, protocol_v;
 
-	if (inner) {
-		headers_m = MLX5_ADDR_OF(fte_match_param, matcher,
-					 inner_headers);
-		headers_v = MLX5_ADDR_OF(fte_match_param, key, inner_headers);
-	} else {
-		headers_m = MLX5_ADDR_OF(fte_match_param, matcher,
-					 outer_headers);
-		headers_v = MLX5_ADDR_OF(fte_match_param, key, outer_headers);
-	}
 	MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_protocol, 0xff);
 	MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol, IPPROTO_GRE);
-	if (!gre_v)
-		return;
-	if (!gre_m)
-		gre_m = &rte_flow_item_gre_mask;
-	MLX5_SET(fte_match_set_misc, misc_m, gre_protocol,
-		 rte_be_to_cpu_16(gre_m->protocol));
-	MLX5_SET(fte_match_set_misc, misc_v, gre_protocol,
-		 rte_be_to_cpu_16(gre_v->protocol & gre_m->protocol));
+	if (!gre_v) {
+		gre_v = &empty_gre;
+		gre_m = &empty_gre;
+	} else {
+		if (!gre_m)
+			gre_m = &rte_flow_item_gre_mask;
+	}
 	gre_crks_rsvd0_ver_m.value = rte_be_to_cpu_16(gre_m->c_rsvd0_ver);
 	gre_crks_rsvd0_ver_v.value = rte_be_to_cpu_16(gre_v->c_rsvd0_ver);
 	MLX5_SET(fte_match_set_misc, misc_m, gre_c_present,
@@ -7066,6 +7058,16 @@ flow_dv_translate_item_gre(void *matcher, void *key,
 	MLX5_SET(fte_match_set_misc, misc_v, gre_s_present,
 		 gre_crks_rsvd0_ver_v.s_present &
 		 gre_crks_rsvd0_ver_m.s_present);
+	protocol_m = rte_be_to_cpu_16(gre_m->protocol);
+	protocol_v = rte_be_to_cpu_16(gre_v->protocol);
+	if (!protocol_m) {
+		/* Force next protocol to prevent matchers duplication */
+		protocol_m = 0xFFFF;
+		protocol_v = mlx5_translate_tunnel_etypes(pattern_flags);
+	}
+	MLX5_SET(fte_match_set_misc, misc_m, gre_protocol, protocol_m);
+	MLX5_SET(fte_match_set_misc, misc_v, gre_protocol,
+		 protocol_m & protocol_v);
 }
 
 /**
@@ -7077,13 +7079,13 @@ flow_dv_translate_item_gre(void *matcher, void *key,
  *   Flow matcher value.
  * @param[in] item
  *   Flow pattern to translate.
- * @param[in] inner
- *   Item is inner pattern.
+ * @param[in] pattern_flags
+ *   Accumulated pattern flags.
  */
 static void
 flow_dv_translate_item_nvgre(void *matcher, void *key,
 			     const struct rte_flow_item *item,
-			     int inner)
+			     unsigned long pattern_flags)
 {
 	const struct rte_flow_item_nvgre *nvgre_m = item->mask;
 	const struct rte_flow_item_nvgre *nvgre_v = item->spec;
@@ -7110,7 +7112,7 @@ flow_dv_translate_item_nvgre(void *matcher, void *key,
 		.mask = &gre_mask,
 		.last = NULL,
 	};
-	flow_dv_translate_item_gre(matcher, key, &gre_item, inner);
+	flow_dv_translate_item_gre(matcher, key, &gre_item, pattern_flags);
 	if (!nvgre_v)
 		return;
 	if (!nvgre_m)
@@ -10547,10 +10549,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
 					     MLX5_FLOW_LAYER_OUTER_L4_UDP;
 			break;
 		case RTE_FLOW_ITEM_TYPE_GRE:
-			flow_dv_translate_item_gre(match_mask, match_value,
-						   items, tunnel);
 			matcher.priority = MLX5_TUNNEL_PRIO_GET(rss_desc);
 			last_item = MLX5_FLOW_LAYER_GRE;
+			tunnel_item = items;
 			break;
 		case RTE_FLOW_ITEM_TYPE_GRE_KEY:
 			flow_dv_translate_item_gre_key(match_mask,
@@ -10558,10 +10559,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
 			last_item = MLX5_FLOW_LAYER_GRE_KEY;
 			break;
 		case RTE_FLOW_ITEM_TYPE_NVGRE:
-			flow_dv_translate_item_nvgre(match_mask, match_value,
-						     items, tunnel);
 			matcher.priority = MLX5_TUNNEL_PRIO_GET(rss_desc);
 			last_item = MLX5_FLOW_LAYER_GRE;
+			tunnel_item = items;
 			break;
 		case RTE_FLOW_ITEM_TYPE_VXLAN:
 			flow_dv_translate_item_vxlan(match_mask, match_value,
@@ -10672,6 +10672,16 @@ flow_dv_translate(struct rte_eth_dev *dev,
 	else if (item_flags & MLX5_FLOW_LAYER_GENEVE)
 		flow_dv_translate_item_geneve(match_mask, match_value,
 					      tunnel_item, item_flags);
+	else if (item_flags & MLX5_FLOW_LAYER_GRE) {
+		if (tunnel_item->type == RTE_FLOW_ITEM_TYPE_GRE)
+			flow_dv_translate_item_gre(match_mask, match_value,
+						   tunnel_item, item_flags);
+		else if (tunnel_item->type == RTE_FLOW_ITEM_TYPE_NVGRE)
+			flow_dv_translate_item_nvgre(match_mask, match_value,
+						     tunnel_item, item_flags);
+		else
+			MLX5_ASSERT(false);
+	}
 #ifdef RTE_LIBRTE_MLX5_DEBUG
 	MLX5_ASSERT(!flow_dv_check_valid_spec(matcher.mask.buf,
 					      dev_flow->dv.value.buf));
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.810489890 +0800
+++ 0048-net-mlx5-fix-GRE-protocol-type-translation.patch	2021-11-28 22:41:03.366873469 +0800
@@ -1 +1 @@
-From be26e81bfc1cb681d3ee0764aa6733000869984a Mon Sep 17 00:00:00 2001
+From a12dd597cdabdacf66df697ac60546ad0cbeb401 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit be26e81bfc1cb681d3ee0764aa6733000869984a ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index bce504391d..287a17d956 100644
+index b80bdc78ba..498b2137f7 100644
@@ -30 +32 @@
-@@ -8730,18 +8730,19 @@ flow_dv_translate_item_gre_key(void *matcher, void *key,
+@@ -7001,18 +7001,19 @@ flow_dv_translate_item_gre_key(void *matcher, void *key,
@@ -55 +57 @@
-@@ -8758,26 +8759,17 @@ flow_dv_translate_item_gre(void *matcher, void *key,
+@@ -7029,26 +7030,17 @@ flow_dv_translate_item_gre(void *matcher, void *key,
@@ -90 +92 @@
-@@ -8795,6 +8787,16 @@ flow_dv_translate_item_gre(void *matcher, void *key,
+@@ -7066,6 +7058,16 @@ flow_dv_translate_item_gre(void *matcher, void *key,
@@ -107 +109 @@
-@@ -8806,13 +8808,13 @@ flow_dv_translate_item_gre(void *matcher, void *key,
+@@ -7077,13 +7079,13 @@ flow_dv_translate_item_gre(void *matcher, void *key,
@@ -124 +126 @@
-@@ -8839,7 +8841,7 @@ flow_dv_translate_item_nvgre(void *matcher, void *key,
+@@ -7110,7 +7112,7 @@ flow_dv_translate_item_nvgre(void *matcher, void *key,
@@ -133 +135 @@
-@@ -13434,10 +13436,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
+@@ -10547,10 +10549,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
@@ -145 +147 @@
-@@ -13445,10 +13446,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
+@@ -10558,10 +10559,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
@@ -156,2 +158,2 @@
- 			flow_dv_translate_item_vxlan(dev, attr,
-@@ -13597,6 +13597,16 @@ flow_dv_translate(struct rte_eth_dev *dev,
+ 			flow_dv_translate_item_vxlan(match_mask, match_value,
+@@ -10672,6 +10672,16 @@ flow_dv_translate(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/hns3: optimize Tx performance by mbuf fast free' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (47 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/mlx5: fix GRE " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/mlx5: fix mutex unlock in Tx packet pacing cleanup' " Xueming Li
                     ` (29 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6a4f262ed3ffb82a92332825230bab668f18ca7b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6a4f262ed3ffb82a92332825230bab668f18ca7b Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Tue, 16 Nov 2021 09:22:11 +0800
Subject: [PATCH] net/hns3: optimize Tx performance by mbuf fast free
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3cc817c195cc8e3bf54b5cadd89c5c7776d3727e ]

Currently the vector and simple xmit algorithm don't support multi_segs,
so if Tx offload support MBUF_FAST_FREE, driver could invoke
rte_mempool_put_bulk() to free Tx mbufs in this situation.

In the testpmd single core MAC forwarding scenario, the performance is
improved by 8% at 64B on Kunpeng920 platform.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 doc/guides/nics/features/hns3.ini |  1 +
 drivers/net/hns3/hns3_rxtx.c      | 11 +++++++++++
 drivers/net/hns3/hns3_rxtx.h      |  2 ++
 drivers/net/hns3/hns3_rxtx_vec.h  |  9 +++++++++
 4 files changed, 23 insertions(+)

diff --git a/doc/guides/nics/features/hns3.ini b/doc/guides/nics/features/hns3.ini
index a1dc7eb9eb..00d9b1aef2 100644
--- a/doc/guides/nics/features/hns3.ini
+++ b/doc/guides/nics/features/hns3.ini
@@ -10,6 +10,7 @@ Queue start/stop     = Y
 Runtime Rx queue setup = Y
 Runtime Tx queue setup = Y
 Burst mode info      = Y
+Fast mbuf free       = Y
 MTU update           = Y
 Jumbo frame          = Y
 Scattered Rx         = Y
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 4ae7c1f00a..235197ce55 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -2722,6 +2722,8 @@ hns3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
 	txq->udp_cksum_mode = hw->udp_cksum_mode;
 	txq->over_length_pkt_cnt = 0;
 	txq->exceed_limit_bd_pkt_cnt = 0;
+	txq->mbuf_fast_free_en = !!(dev->data->dev_conf.txmode.offloads &
+					DEV_TX_OFFLOAD_MBUF_FAST_FREE);
 	txq->exceed_limit_bd_reassem_fail = 0;
 	txq->unsupported_tunnel_pkt_cnt = 0;
 	txq->queue_full_cnt = 0;
@@ -3592,6 +3594,14 @@ hns3_tx_free_buffer_simple(struct hns3_tx_queue *txq)
 
 		tx_entry = &txq->sw_ring[txq->next_to_clean];
 
+		if (txq->mbuf_fast_free_en) {
+			rte_mempool_put_bulk(tx_entry->mbuf->pool,
+					(void **)tx_entry, txq->tx_rs_thresh);
+			for (i = 0; i < txq->tx_rs_thresh; i++)
+				tx_entry[i].mbuf = NULL;
+			goto update_field;
+		}
+
 		for (i = 0; i < txq->tx_rs_thresh; i++)
 			rte_prefetch0((tx_entry + i)->mbuf);
 		for (i = 0; i < txq->tx_rs_thresh; i++, tx_entry++) {
@@ -3599,6 +3609,7 @@ hns3_tx_free_buffer_simple(struct hns3_tx_queue *txq)
 			tx_entry->mbuf = NULL;
 		}
 
+update_field:
 		txq->next_to_clean = (tx_next_clean + 1) % txq->nb_tx_desc;
 		txq->tx_bd_ready += txq->tx_rs_thresh;
 	}
diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
index dc9c89b5af..f425c9e8a3 100644
--- a/drivers/net/hns3/hns3_rxtx.h
+++ b/drivers/net/hns3/hns3_rxtx.h
@@ -423,6 +423,8 @@ struct hns3_tx_queue {
 	 */
 	bool pvid_sw_shift_en;
 	bool enabled;           /* indicate if Tx queue has been enabled */
+	/* check whether the mbuf fast free offload is enabled */
+	uint16_t mbuf_fast_free_en:1;
 
 	/*
 	 * The following items are used for the abnormal errors statistics in
diff --git a/drivers/net/hns3/hns3_rxtx_vec.h b/drivers/net/hns3/hns3_rxtx_vec.h
index 67c75e44ef..4985a7cae8 100644
--- a/drivers/net/hns3/hns3_rxtx_vec.h
+++ b/drivers/net/hns3/hns3_rxtx_vec.h
@@ -18,6 +18,14 @@ hns3_tx_bulk_free_buffers(struct hns3_tx_queue *txq)
 	int i;
 
 	tx_entry = &txq->sw_ring[txq->next_to_clean];
+	if (txq->mbuf_fast_free_en) {
+		rte_mempool_put_bulk(tx_entry->mbuf->pool, (void **)tx_entry,
+				     txq->tx_rs_thresh);
+		for (i = 0; i < txq->tx_rs_thresh; i++)
+			tx_entry[i].mbuf = NULL;
+		goto update_field;
+	}
+
 	for (i = 0; i < txq->tx_rs_thresh; i++, tx_entry++) {
 		m = rte_pktmbuf_prefree_seg(tx_entry->mbuf);
 		tx_entry->mbuf = NULL;
@@ -36,6 +44,7 @@ hns3_tx_bulk_free_buffers(struct hns3_tx_queue *txq)
 	if (nb_free)
 		rte_mempool_put_bulk(free[0]->pool, (void **)free, nb_free);
 
+update_field:
 	/* Update numbers of available descriptor due to buffer freed */
 	txq->tx_bd_ready += txq->tx_rs_thresh;
 	txq->next_to_clean += txq->tx_rs_thresh;
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.866400503 +0800
+++ 0049-net-hns3-optimize-Tx-performance-by-mbuf-fast-free.patch	2021-11-28 22:41:03.370206742 +0800
@@ -1 +1 @@
-From 3cc817c195cc8e3bf54b5cadd89c5c7776d3727e Mon Sep 17 00:00:00 2001
+From 6a4f262ed3ffb82a92332825230bab668f18ca7b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3cc817c195cc8e3bf54b5cadd89c5c7776d3727e ]
@@ -13,2 +15,0 @@
-Cc: stable@dpdk.org
-
@@ -25 +26 @@
-index c3464c8396..405b94f05c 100644
+index a1dc7eb9eb..00d9b1aef2 100644
@@ -28 +29 @@
-@@ -12,6 +12,7 @@ Queue start/stop     = Y
+@@ -10,6 +10,7 @@ Queue start/stop     = Y
@@ -33 +33,0 @@
- Free Tx mbuf on demand = Y
@@ -34,0 +35 @@
+ Jumbo frame          = Y
@@ -37 +38 @@
-index d26e262335..f0a57611ec 100644
+index 4ae7c1f00a..235197ce55 100644
@@ -40,3 +41 @@
-@@ -3059,6 +3059,8 @@ hns3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
- 	txq->min_tx_pkt_len = hw->min_tx_pkt_len;
- 	txq->tso_mode = hw->tso_mode;
+@@ -2722,6 +2722,8 @@ hns3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
@@ -43,0 +43,2 @@
+ 	txq->over_length_pkt_cnt = 0;
+ 	txq->exceed_limit_bd_pkt_cnt = 0;
@@ -45,5 +46,5 @@
-+				    RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE);
- 	memset(&txq->basic_stats, 0, sizeof(struct hns3_tx_basic_stats));
- 	memset(&txq->dfx_stats, 0, sizeof(struct hns3_tx_dfx_stats));
- 
-@@ -3991,6 +3993,14 @@ hns3_tx_free_buffer_simple(struct hns3_tx_queue *txq)
++					DEV_TX_OFFLOAD_MBUF_FAST_FREE);
+ 	txq->exceed_limit_bd_reassem_fail = 0;
+ 	txq->unsupported_tunnel_pkt_cnt = 0;
+ 	txq->queue_full_cnt = 0;
+@@ -3592,6 +3594,14 @@ hns3_tx_free_buffer_simple(struct hns3_tx_queue *txq)
@@ -64 +65 @@
-@@ -3998,6 +4008,7 @@ hns3_tx_free_buffer_simple(struct hns3_tx_queue *txq)
+@@ -3599,6 +3609,7 @@ hns3_tx_free_buffer_simple(struct hns3_tx_queue *txq)
@@ -73 +74 @@
-index 63bafc68b6..df731856ef 100644
+index dc9c89b5af..f425c9e8a3 100644
@@ -76,2 +77 @@
-@@ -495,6 +495,8 @@ struct hns3_tx_queue {
- 	 * this point.
+@@ -423,6 +423,8 @@ struct hns3_tx_queue {
@@ -79 +79,2 @@
- 	uint16_t pvid_sw_shift_en:1;
+ 	bool pvid_sw_shift_en;
+ 	bool enabled;           /* indicate if Tx queue has been enabled */
@@ -84 +85 @@
- 	 * For better performance in tx datapath, releasing mbuf in batches is
+ 	 * The following items are used for the abnormal errors statistics in

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx5: fix mutex unlock in Tx packet pacing cleanup' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (48 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/hns3: optimize Tx performance by mbuf fast free' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/bnxt: fix Rx next consumer index in mbuf alloc fail' " Xueming Li
                     ` (28 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Chengfeng Ye; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2b0a3cc701098a342c1bcd0af7abc79aab4c62b9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2b0a3cc701098a342c1bcd0af7abc79aab4c62b9 Mon Sep 17 00:00:00 2001
From: Chengfeng Ye <cyeaa@connect.ust.hk>
Date: Tue, 16 Nov 2021 06:49:23 -0800
Subject: [PATCH] net/mlx5: fix mutex unlock in Tx packet pacing cleanup
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 1e580ed4b0ff6afb23043f664ce30fe449e40d71 ]

The lock sh->txpp.mutex was not correctly released on one path
of cleanup function return, potentially causing the deadlock.

Fixes: d133f4cdb706 ("net/mlx5: create clock queue for packet pacing")

Signed-off-by: Chengfeng Ye <cyeaa@connect.ust.hk>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_txpp.c | 30 ++++++++++++------------------
 1 file changed, 12 insertions(+), 18 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_txpp.c b/drivers/net/mlx5/mlx5_txpp.c
index cf11048160..1f4c1081f5 100644
--- a/drivers/net/mlx5/mlx5_txpp.c
+++ b/drivers/net/mlx5/mlx5_txpp.c
@@ -1049,7 +1049,6 @@ mlx5_txpp_start(struct rte_eth_dev *dev)
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct mlx5_dev_ctx_shared *sh = priv->sh;
 	int err = 0;
-	int ret;
 
 	if (!priv->config.tx_pp) {
 		/* Packet pacing is not requested for the device. */
@@ -1062,14 +1061,14 @@ mlx5_txpp_start(struct rte_eth_dev *dev)
 		return 0;
 	}
 	if (priv->config.tx_pp > 0) {
-		ret = rte_mbuf_dynflag_lookup
-				(RTE_MBUF_DYNFLAG_TX_TIMESTAMP_NAME, NULL);
-		if (ret < 0)
+		err = rte_mbuf_dynflag_lookup
+			(RTE_MBUF_DYNFLAG_TX_TIMESTAMP_NAME, NULL);
+		/* No flag registered means no service needed. */
+		if (err < 0)
 			return 0;
+		err = 0;
 	}
-	ret = pthread_mutex_lock(&sh->txpp.mutex);
-	MLX5_ASSERT(!ret);
-	RTE_SET_USED(ret);
+	claim_zero(pthread_mutex_lock(&sh->txpp.mutex));
 	if (sh->txpp.refcnt) {
 		priv->txpp_en = 1;
 		++sh->txpp.refcnt;
@@ -1083,9 +1082,7 @@ mlx5_txpp_start(struct rte_eth_dev *dev)
 			rte_errno = -err;
 		}
 	}
-	ret = pthread_mutex_unlock(&sh->txpp.mutex);
-	MLX5_ASSERT(!ret);
-	RTE_SET_USED(ret);
+	claim_zero(pthread_mutex_unlock(&sh->txpp.mutex));
 	return err;
 }
 
@@ -1103,24 +1100,21 @@ mlx5_txpp_stop(struct rte_eth_dev *dev)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct mlx5_dev_ctx_shared *sh = priv->sh;
-	int ret;
 
 	if (!priv->txpp_en) {
 		/* Packet pacing is already disabled for the device. */
 		return;
 	}
 	priv->txpp_en = 0;
-	ret = pthread_mutex_lock(&sh->txpp.mutex);
-	MLX5_ASSERT(!ret);
-	RTE_SET_USED(ret);
+	claim_zero(pthread_mutex_lock(&sh->txpp.mutex));
 	MLX5_ASSERT(sh->txpp.refcnt);
-	if (!sh->txpp.refcnt || --sh->txpp.refcnt)
+	if (!sh->txpp.refcnt || --sh->txpp.refcnt) {
+		claim_zero(pthread_mutex_unlock(&sh->txpp.mutex));
 		return;
+	}
 	/* No references any more, do actual destroy. */
 	mlx5_txpp_destroy(sh);
-	ret = pthread_mutex_unlock(&sh->txpp.mutex);
-	MLX5_ASSERT(!ret);
-	RTE_SET_USED(ret);
+	claim_zero(pthread_mutex_unlock(&sh->txpp.mutex));
 }
 
 /*
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.911375618 +0800
+++ 0050-net-mlx5-fix-mutex-unlock-in-Tx-packet-pacing-cleanu.patch	2021-11-28 22:41:03.370206742 +0800
@@ -1 +1 @@
-From 1e580ed4b0ff6afb23043f664ce30fe449e40d71 Mon Sep 17 00:00:00 2001
+From 2b0a3cc701098a342c1bcd0af7abc79aab4c62b9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1e580ed4b0ff6afb23043f664ce30fe449e40d71 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 927c327284..af77e91e4c 100644
+index cf11048160..1f4c1081f5 100644
@@ -22 +24 @@
-@@ -890,7 +890,6 @@ mlx5_txpp_start(struct rte_eth_dev *dev)
+@@ -1049,7 +1049,6 @@ mlx5_txpp_start(struct rte_eth_dev *dev)
@@ -30 +32 @@
-@@ -903,14 +902,14 @@ mlx5_txpp_start(struct rte_eth_dev *dev)
+@@ -1062,14 +1061,14 @@ mlx5_txpp_start(struct rte_eth_dev *dev)
@@ -51 +53 @@
-@@ -924,9 +923,7 @@ mlx5_txpp_start(struct rte_eth_dev *dev)
+@@ -1083,9 +1082,7 @@ mlx5_txpp_start(struct rte_eth_dev *dev)
@@ -62 +64 @@
-@@ -944,24 +941,21 @@ mlx5_txpp_stop(struct rte_eth_dev *dev)
+@@ -1103,24 +1100,21 @@ mlx5_txpp_stop(struct rte_eth_dev *dev)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/bnxt: fix Rx next consumer index in mbuf alloc fail' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (49 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/mlx5: fix mutex unlock in Tx packet pacing cleanup' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/failsafe: fix secondary process probe' " Xueming Li
                     ` (27 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Luca Boccassi, Ajit Khaparde, Kalesh AP, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7801afdd35968c08488fd7d21ae1dedae106c971

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7801afdd35968c08488fd7d21ae1dedae106c971 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Wed, 17 Nov 2021 08:42:06 +0530
Subject: [PATCH] net/bnxt: fix Rx next consumer index in mbuf alloc fail
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a7e21843f0f6067ebe36eafff9b8319092db3fc4 ]

The driver internal variable to track the next consumer index on
the Rx ring was not being set if there was an mbuf allocation
failure. In that scenario, eventually it would fall out of sync
with the actual consumer index and raise a false alarm on Thor
needlessly causing a segmentation fault with testpmd

Fixes: 03c8f2fe111c ("net/bnxt: detect bad opaque in Rx completion")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index e847af9fff..43cb8057da 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -916,6 +916,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 		goto rx;
 	}
 	rxr->rx_prod = prod;
+rx:
 	rxr->rx_next_cons = RING_NEXT(rxr->rx_ring_struct, cons);
 
 	if (BNXT_TRUFLOW_EN(bp) && (BNXT_VF_IS_TRUSTED(bp) || BNXT_PF(bp)) &&
@@ -934,7 +935,6 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 	 * All MBUFs are allocated with the same size under DPDK,
 	 * no optimization for rx_copy_thresh
 	 */
-rx:
 	*rx_pkt = mbuf;
 
 next_rx:
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.952337654 +0800
+++ 0051-net-bnxt-fix-Rx-next-consumer-index-in-mbuf-alloc-fa.patch	2021-11-28 22:41:03.373540015 +0800
@@ -1 +1 @@
-From a7e21843f0f6067ebe36eafff9b8319092db3fc4 Mon Sep 17 00:00:00 2001
+From 7801afdd35968c08488fd7d21ae1dedae106c971 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a7e21843f0f6067ebe36eafff9b8319092db3fc4 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 157297bc64..e2f09ad3a0 100644
+index e847af9fff..43cb8057da 100644
@@ -26 +28 @@
-@@ -986,6 +986,7 @@ reuse_rx_mbuf:
+@@ -916,6 +916,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
@@ -29 +31 @@
- 	rxr->rx_raw_prod = raw_prod;
+ 	rxr->rx_prod = prod;
@@ -31 +33 @@
- 	rxr->rx_next_cons = RING_IDX(rxr->rx_ring_struct, RING_NEXT(cons));
+ 	rxr->rx_next_cons = RING_NEXT(rxr->rx_ring_struct, cons);
@@ -34 +36 @@
-@@ -1004,7 +1005,6 @@ reuse_rx_mbuf:
+@@ -934,7 +935,6 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/failsafe: fix secondary process probe' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (50 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/bnxt: fix Rx next consumer index in mbuf alloc fail' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'app/testpmd: fix tunnel offload validation' " Xueming Li
                     ` (26 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Kumara Parameshwaran; +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/db9d14af1c2572ace1ec790052533fcc6b100f14

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From db9d14af1c2572ace1ec790052533fcc6b100f14 Mon Sep 17 00:00:00 2001
From: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
Date: Thu, 11 Nov 2021 18:14:58 +0530
Subject: [PATCH] net/failsafe: fix secondary process probe
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 47f5dee19e5f9a2cf1883a7119675d7a25470aca ]

Remove the vdev args check for secondary process which prevents the
secondary from attaching to the device created by the primary process
via the hotplug framework. This check was removed for other vdevs but
was missed for failsafe.

Fixes: 4852aa8f6e21 ("drivers/net: enable hotplug on secondary process")

Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/failsafe/failsafe.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index ba81c82174..0b9b537984 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -329,8 +329,7 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev)
 	INFO("Initializing " FAILSAFE_DRIVER_NAME " for %s",
 			name);
 
-	if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
-	    strlen(rte_vdev_device_args(vdev)) == 0) {
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
 		eth_dev = rte_eth_dev_attach_secondary(name);
 		if (!eth_dev) {
 			ERROR("Failed to probe %s", name);
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.993428912 +0800
+++ 0052-net-failsafe-fix-secondary-process-probe.patch	2021-11-28 22:41:03.373540015 +0800
@@ -1 +1 @@
-From 47f5dee19e5f9a2cf1883a7119675d7a25470aca Mon Sep 17 00:00:00 2001
+From db9d14af1c2572ace1ec790052533fcc6b100f14 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 47f5dee19e5f9a2cf1883a7119675d7a25470aca ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index ad6b43538e..3c754a5f66 100644
+index ba81c82174..0b9b537984 100644
@@ -24 +26 @@
-@@ -340,8 +340,7 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev)
+@@ -329,8 +329,7 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'app/testpmd: fix tunnel offload validation' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (51 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/failsafe: fix secondary process probe' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/mlx5: fix partial inline of fine grain packets' " Xueming Li
                     ` (25 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Gregory Etelson
  Cc: Luca Boccassi, Viacheslav Ovsiienko, Aman Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6d5aa03a7788612dfd64a827a5beb7d1f3d371c2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6d5aa03a7788612dfd64a827a5beb7d1f3d371c2 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Tue, 2 Nov 2021 14:24:21 +0200
Subject: [PATCH] app/testpmd: fix tunnel offload validation
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 849e6ddc6a431a021d6ab2125f1ebbba545cf05a ]

Tunnel offload API allows application to restore packet to
its original form if chain of flows missed after DECAP action.
The main idea of the tunnel offload API was to query port PMD
to provide flow elements - actions or items.
Flow elements supplied by PMD are merged with original flow rule
elements provided by testpmd operator to create a new flow rule,
optimal for PMD, to implement the tunnel offload API.
That flow rule transformation is hidden form testpmd operator and uses
internal testpmd resources.

Current testpmd did not release tunnel offload resources if flow rule
validation failed.

The patch always releases tunnel offload resources after flow rule
validation returns.

Fixes: 1b9f274623b8 ("app/testpmd: add commands for tunnel offload")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
 app/test-pmd/config.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 22da15e51d..8e37602f6b 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2047,6 +2047,7 @@ port_flow_validate(portid_t port_id,
 {
 	struct rte_flow_error error;
 	struct port_flow_tunnel *pft = NULL;
+	int ret;
 
 	/* Poisoning to make sure PMDs update it in case of error. */
 	memset(&error, 0x11, sizeof(error));
@@ -2060,10 +2061,11 @@ port_flow_validate(portid_t port_id,
 		if (pft->actions)
 			actions = pft->actions;
 	}
-	if (rte_flow_validate(port_id, attr, pattern, actions, &error))
-		return port_flow_complain(&error);
+	ret = rte_flow_validate(port_id, attr, pattern, actions, &error);
 	if (tunnel_ops->enabled)
 		port_flow_tunnel_offload_cmd_release(port_id, tunnel_ops, pft);
+	if (ret)
+		return port_flow_complain(&error);
 	printf("Flow rule validated\n");
 	return 0;
 }
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.033761875 +0800
+++ 0053-app-testpmd-fix-tunnel-offload-validation.patch	2021-11-28 22:41:03.376873288 +0800
@@ -1 +1 @@
-From 849e6ddc6a431a021d6ab2125f1ebbba545cf05a Mon Sep 17 00:00:00 2001
+From 6d5aa03a7788612dfd64a827a5beb7d1f3d371c2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 849e6ddc6a431a021d6ab2125f1ebbba545cf05a ]
@@ -23 +25,0 @@
-Cc: stable@dpdk.org
@@ -33 +35 @@
-index f87d9d5b82..1722d6c8f8 100644
+index 22da15e51d..8e37602f6b 100644
@@ -36 +38 @@
-@@ -1971,6 +1971,7 @@ port_flow_validate(portid_t port_id,
+@@ -2047,6 +2047,7 @@ port_flow_validate(portid_t port_id,
@@ -44 +46 @@
-@@ -1984,10 +1985,11 @@ port_flow_validate(portid_t port_id,
+@@ -2060,10 +2061,11 @@ port_flow_validate(portid_t port_id,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx5: fix partial inline of fine grain packets' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (52 preceding siblings ...)
  2021-11-28 14:53   ` patch 'app/testpmd: fix tunnel offload validation' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:53   ` patch 'net/mlx5: fix MPLS tunnel outer layer overwrite' " Xueming Li
                     ` (24 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Dariusz Sosnowski; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/630a42f437228b5b7aaab5ceee5ebeaea23e1d9c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 630a42f437228b5b7aaab5ceee5ebeaea23e1d9c Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Wed, 17 Nov 2021 11:50:50 +0200
Subject: [PATCH] net/mlx5: fix partial inline of fine grain packets
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 7775172c045f3387cee47d3f32633255d37ba785 ]

Assuming a user tried to send multi-segment packets, with
RTE_PMD_MLX5_FINE_GRANULARITY_INLINE flag set, using a device with
minimum inlining requirements (such as ConnectX-4 Lx or when user
specified them explicitly), sending such packets caused segfault.
Segfault was caused by failed invariants in
mlx5_tx_packet_multi_inline function.

This patch introduces a logic for multi-segment packets, with
RTE_PMD_MLX5_FINE_GRANULARITY_INLINE flag set, to omit mbuf scanning for
filling inline buffer and inline only minimal amount of data required.

Fixes: ec837ad0fc7c ("net/mlx5: fix multi-segment inline for the first segments")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 5ec823b024..97e0995c66 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -3468,7 +3468,7 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,
 			MLX5_ASSERT(txq->inlen_mode >=
 				    MLX5_ESEG_MIN_INLINE_SIZE);
 			MLX5_ASSERT(txq->inlen_mode <= txq->inlen_send);
-			inlen = txq->inlen_mode;
+			inlen = RTE_MIN(txq->inlen_mode, inlen);
 		} else if (vlan && !txq->vlan_en) {
 			/*
 			 * VLAN insertion is requested and hardware does not
@@ -3481,6 +3481,8 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,
 		} else {
 			goto do_first;
 		}
+		if (mbuf->ol_flags & PKT_TX_DYNF_NOINLINE)
+			goto do_build;
 		/*
 		 * Now we know the minimal amount of data is requested
 		 * to inline. Check whether we should inline the buffers
@@ -3513,6 +3515,8 @@ do_first:
 				mbuf = NEXT(mbuf);
 				/* There should be not end of packet. */
 				MLX5_ASSERT(mbuf);
+				if (mbuf->ol_flags & PKT_TX_DYNF_NOINLINE)
+					break;
 				nxlen = inlen + rte_pktmbuf_data_len(mbuf);
 			} while (unlikely(nxlen < txq->inlen_send));
 		}
@@ -3540,6 +3544,7 @@ do_align:
 	 * Estimate the number of Data Segments conservatively,
 	 * supposing no any mbufs is being freed during inlining.
 	 */
+do_build:
 	MLX5_ASSERT(inlen <= txq->inlen_send);
 	ds = NB_SEGS(loc->mbuf) + 2 + (inlen -
 				       MLX5_ESEG_MIN_INLINE_SIZE +
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.078722329 +0800
+++ 0054-net-mlx5-fix-partial-inline-of-fine-grain-packets.patch	2021-11-28 22:41:03.380206560 +0800
@@ -1 +1 @@
-From 7775172c045f3387cee47d3f32633255d37ba785 Mon Sep 17 00:00:00 2001
+From 630a42f437228b5b7aaab5ceee5ebeaea23e1d9c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7775172c045f3387cee47d3f32633255d37ba785 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
- drivers/net/mlx5/mlx5_tx.h | 7 ++++++-
+ drivers/net/mlx5/mlx5_rxtx.c | 7 ++++++-
@@ -26,5 +28,5 @@
-diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h
-index ad13b5e608..bc629983fa 100644
---- a/drivers/net/mlx5/mlx5_tx.h
-+++ b/drivers/net/mlx5/mlx5_tx.h
-@@ -1933,7 +1933,7 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,
+diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
+index 5ec823b024..97e0995c66 100644
+--- a/drivers/net/mlx5/mlx5_rxtx.c
++++ b/drivers/net/mlx5/mlx5_rxtx.c
+@@ -3468,7 +3468,7 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,
@@ -39 +41 @@
-@@ -1946,6 +1946,8 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,
+@@ -3481,6 +3481,8 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,
@@ -43 +45 @@
-+		if (mbuf->ol_flags & RTE_MBUF_F_TX_DYNF_NOINLINE)
++		if (mbuf->ol_flags & PKT_TX_DYNF_NOINLINE)
@@ -48 +50 @@
-@@ -1978,6 +1980,8 @@ do_first:
+@@ -3513,6 +3515,8 @@ do_first:
@@ -52 +54 @@
-+				if (mbuf->ol_flags & RTE_MBUF_F_TX_DYNF_NOINLINE)
++				if (mbuf->ol_flags & PKT_TX_DYNF_NOINLINE)
@@ -57 +59 @@
-@@ -2005,6 +2009,7 @@ do_align:
+@@ -3540,6 +3544,7 @@ do_align:

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx5: fix MPLS tunnel outer layer overwrite' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (53 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/mlx5: fix partial inline of fine grain packets' " Xueming Li
@ 2021-11-28 14:53   ` Xueming Li
  2021-11-28 14:54   ` patch 'common/mlx5: fix user mode register access attribute' " Xueming Li
                     ` (23 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:53 UTC (permalink / raw)
  To: Dariusz Sosnowski; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4a5f3c979e5964b87b1f094536e2e8e189f9f1a9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4a5f3c979e5964b87b1f094536e2e8e189f9f1a9 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Wed, 17 Nov 2021 11:59:33 +0200
Subject: [PATCH] net/mlx5: fix MPLS tunnel outer layer overwrite
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 421177ccd7f59ec8d898fd6aa6bc6fb9eb298a52 ]

mlx5 PMD incorrectly overwrote outer layer fields in MPLS tunnel
rte_flow patterns using defaults for MPLS tunnels. This included
overwriting UDP destination port in MPLSoUDP and GRE protocol field in
MPLSoGRE.

This patch fixes this behavior. If application provides the values in
flow pattern items preceding the MPLS flow item the provided values will
be used, otherwise the defaults will be applied.

Fixes: d1abe664ddde ("net/mlx5: add MPLS to Direct Verbs flow engine")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 498b2137f7..8804b9816d 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7364,16 +7364,22 @@ flow_dv_translate_item_mpls(void *matcher, void *key,
 
 	switch (prev_layer) {
 	case MLX5_FLOW_LAYER_OUTER_L4_UDP:
-		MLX5_SET(fte_match_set_lyr_2_4, headers_m, udp_dport, 0xffff);
-		MLX5_SET(fte_match_set_lyr_2_4, headers_v, udp_dport,
-			 MLX5_UDP_PORT_MPLS);
+		if (!MLX5_GET16(fte_match_set_lyr_2_4, headers_v, udp_dport)) {
+			MLX5_SET(fte_match_set_lyr_2_4, headers_m, udp_dport,
+				 0xffff);
+			MLX5_SET(fte_match_set_lyr_2_4, headers_v, udp_dport,
+				 MLX5_UDP_PORT_MPLS);
+		}
 		break;
 	case MLX5_FLOW_LAYER_GRE:
 		/* Fall-through. */
 	case MLX5_FLOW_LAYER_GRE_KEY:
-		MLX5_SET(fte_match_set_misc, misc_m, gre_protocol, 0xffff);
-		MLX5_SET(fte_match_set_misc, misc_v, gre_protocol,
-			 RTE_ETHER_TYPE_MPLS);
+		if (!MLX5_GET16(fte_match_set_misc, misc_v, gre_protocol)) {
+			MLX5_SET(fte_match_set_misc, misc_m, gre_protocol,
+				 0xffff);
+			MLX5_SET(fte_match_set_misc, misc_v, gre_protocol,
+				 RTE_ETHER_TYPE_MPLS);
+		}
 		break;
 	default:
 		break;
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.125022299 +0800
+++ 0055-net-mlx5-fix-MPLS-tunnel-outer-layer-overwrite.patch	2021-11-28 22:41:03.390206379 +0800
@@ -1 +1 @@
-From 421177ccd7f59ec8d898fd6aa6bc6fb9eb298a52 Mon Sep 17 00:00:00 2001
+From 4a5f3c979e5964b87b1f094536e2e8e189f9f1a9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 421177ccd7f59ec8d898fd6aa6bc6fb9eb298a52 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 7b32c06fc6..d079a52d30 100644
+index 498b2137f7..8804b9816d 100644
@@ -28 +30 @@
-@@ -9328,16 +9328,22 @@ flow_dv_translate_item_mpls(void *matcher, void *key,
+@@ -7364,16 +7364,22 @@ flow_dv_translate_item_mpls(void *matcher, void *key,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'common/mlx5: fix user mode register access attribute' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (54 preceding siblings ...)
  2021-11-28 14:53   ` patch 'net/mlx5: fix MPLS tunnel outer layer overwrite' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'crypto/ipsec_mb: fix cipher key setting' " Xueming Li
                     ` (22 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Michael Baum; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/91ab2a7d0a4e14f90765380dcc37aa785392e92c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 91ab2a7d0a4e14f90765380dcc37aa785392e92c Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Wed, 17 Nov 2021 12:57:09 +0200
Subject: [PATCH] common/mlx5: fix user mode register access attribute
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e6a6829f9996b1cf066669ad1721b3d04552c048 ]

To detect the timestamp mode configured on the NIC the mlx5 PMD uses the
firmware command ACCESS_REGISTER_USER.
The HCA capability command has an attribute flag checking whether
firmware supports the command.

However, the HCA capability query command read the flag from wrong place
in PRM structure.

This patch move the flag to correct place.

Fixes: 972a1bf8120d ("common/mlx5: fix user mode register access command")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/common/mlx5/mlx5_prm.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index 4792835200..201224cf24 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -1140,13 +1140,14 @@ struct mlx5_ifc_cmd_hca_cap_bits {
 	u8 reserved_at_bc[0x4];
 	u8 reserved_at_c0[0x8];
 	u8 log_max_cq_sz[0x8];
-	u8 reserved_at_d0[0xb];
+	u8 reserved_at_d0[0x2];
+	u8 access_register_user[0x1];
+	u8 reserved_at_d3[0x8];
 	u8 log_max_cq[0x5];
 	u8 log_max_eq_sz[0x8];
 	u8 relaxed_ordering_write[0x1];
 	u8 relaxed_ordering_read[0x1];
-	u8 access_register_user[0x1];
-	u8 log_max_mkey[0x5];
+	u8 log_max_mkey[0x6];
 	u8 reserved_at_f0[0x8];
 	u8 dump_fill_mkey[0x1];
 	u8 reserved_at_f9[0x3];
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.177175093 +0800
+++ 0056-common-mlx5-fix-user-mode-register-access-attribute.patch	2021-11-28 22:41:03.390206379 +0800
@@ -1 +1 @@
-From e6a6829f9996b1cf066669ad1721b3d04552c048 Mon Sep 17 00:00:00 2001
+From 91ab2a7d0a4e14f90765380dcc37aa785392e92c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e6a6829f9996b1cf066669ad1721b3d04552c048 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 13959575e3..2ded67e85e 100644
+index 4792835200..201224cf24 100644
@@ -29 +31 @@
-@@ -1370,13 +1370,14 @@ struct mlx5_ifc_cmd_hca_cap_bits {
+@@ -1140,13 +1140,14 @@ struct mlx5_ifc_cmd_hca_cap_bits {

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'crypto/ipsec_mb: fix cipher key setting' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (55 preceding siblings ...)
  2021-11-28 14:54   ` patch 'common/mlx5: fix user mode register access attribute' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-12-06 12:45     ` Xueming(Steven) Li
  2021-11-28 14:54   ` patch 'drivers/crypto: fix IPsec TTL decrement option' " Xueming Li
                     ` (21 subsequent siblings)
  78 siblings, 1 reply; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Luca Boccassi, Ciara Power, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6096e4200509865f35a2cf9383da0af76bc68aff

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6096e4200509865f35a2cf9383da0af76bc68aff Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Mon, 22 Nov 2021 17:47:29 +0000
Subject: [PATCH] crypto/ipsec_mb: fix cipher key setting
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b0a37e8cd2ac559202086d88c1761e0b6406b445 ]

When authenticating with SNOW3G, KASUMI and ZUC,
the pointers for encryption/decryption keys is not set.
If a cipher algorithm such as AES-CBC is also used,
the application would seg fault.
Hence, these pointers should be set to some value by default.

Command line to replicate the issue:
./build/app/dpdk-test-crypto-perf -l 4,5 -n 6 --vdev="crypto_aesni_mb" -- \
 --devtype="crypto_aesni_mb" --optype=cipher-then-auth --auth-algo \
 snow3g-uia2 --auth-key-sz 16 --auth-iv-sz 16 --digest-sz 4 --silent \
 --total-ops 1000000 --auth-op generate --burst-sz 32 \
 --cipher-algo aes-ctr --cipher-key-sz 16 --cipher-iv-sz 16

Fixes: ae8e085c608d ("crypto/aesni_mb: support KASUMI F8/F9")
Fixes: 6c42e0cf4d12 ("crypto/aesni_mb: support SNOW3G-UEA2/UIA2")
Fixes: fd8df85487c4 ("crypto/aesni_mb: support ZUC-EEA3/EIA3")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 03186485f9..6e14788fd0 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -1267,6 +1267,14 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
 
 	const int aead = is_aead_algo(job->hash_alg, job->cipher_mode);
 
+	if (job->cipher_mode == IMB_CIPHER_DES3) {
+		job->enc_keys = session->cipher.exp_3des_keys.ks_ptr;
+		job->dec_keys = session->cipher.exp_3des_keys.ks_ptr;
+	} else {
+		job->enc_keys = session->cipher.expanded_aes_keys.encode;
+		job->dec_keys = session->cipher.expanded_aes_keys.decode;
+	}
+
 	switch (job->hash_alg) {
 	case AES_XCBC:
 		job->u.XCBC._k1_expanded = session->auth.xcbc.k1_expanded;
@@ -1339,17 +1347,6 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
 		job->u.HMAC._hashed_auth_key_xor_ipad = session->auth.pads.inner;
 		job->u.HMAC._hashed_auth_key_xor_opad = session->auth.pads.outer;
 
-		if (job->cipher_mode == DES3) {
-			job->aes_enc_key_expanded =
-				session->cipher.exp_3des_keys.ks_ptr;
-			job->aes_dec_key_expanded =
-				session->cipher.exp_3des_keys.ks_ptr;
-		} else {
-			job->aes_enc_key_expanded =
-				session->cipher.expanded_aes_keys.encode;
-			job->aes_dec_key_expanded =
-				session->cipher.expanded_aes_keys.decode;
-		}
 	}
 
 	if (aead)
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.220130340 +0800
+++ 0057-crypto-ipsec_mb-fix-cipher-key-setting.patch	2021-11-28 22:41:03.393539652 +0800
@@ -1 +1 @@
-From b0a37e8cd2ac559202086d88c1761e0b6406b445 Mon Sep 17 00:00:00 2001
+From 6096e4200509865f35a2cf9383da0af76bc68aff Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b0a37e8cd2ac559202086d88c1761e0b6406b445 ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -28,2 +30,2 @@
- drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 15 ++++++++-------
- 1 file changed, 8 insertions(+), 7 deletions(-)
+ drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 19 ++++++++-----------
+ 1 file changed, 8 insertions(+), 11 deletions(-)
@@ -31,5 +33,5 @@
-diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
-index e05bc04c3b..a308d42ffa 100644
---- a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
-+++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
-@@ -1120,6 +1120,14 @@ set_mb_job_params(IMB_JOB *job, struct ipsec_mb_qp *qp,
+diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+index 03186485f9..6e14788fd0 100644
+--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
++++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+@@ -1267,6 +1267,14 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
@@ -48 +50 @@
- 	case IMB_AUTH_AES_XCBC:
+ 	case AES_XCBC:
@@ -50,3 +52,3 @@
-@@ -1189,13 +1197,6 @@ set_mb_job_params(IMB_JOB *job, struct ipsec_mb_qp *qp,
- 		job->u.HMAC._hashed_auth_key_xor_opad =
- 			session->auth.pads.outer;
+@@ -1339,17 +1347,6 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
+ 		job->u.HMAC._hashed_auth_key_xor_ipad = session->auth.pads.inner;
+ 		job->u.HMAC._hashed_auth_key_xor_opad = session->auth.pads.outer;
@@ -54,3 +56,5 @@
--		if (job->cipher_mode == IMB_CIPHER_DES3) {
--			job->enc_keys = session->cipher.exp_3des_keys.ks_ptr;
--			job->dec_keys = session->cipher.exp_3des_keys.ks_ptr;
+-		if (job->cipher_mode == DES3) {
+-			job->aes_enc_key_expanded =
+-				session->cipher.exp_3des_keys.ks_ptr;
+-			job->aes_dec_key_expanded =
+-				session->cipher.exp_3des_keys.ks_ptr;
@@ -58,2 +62,4 @@
--			job->enc_keys = session->cipher.expanded_aes_keys.encode;
--			job->dec_keys = session->cipher.expanded_aes_keys.decode;
+-			job->aes_enc_key_expanded =
+-				session->cipher.expanded_aes_keys.encode;
+-			job->aes_dec_key_expanded =
+-				session->cipher.expanded_aes_keys.decode;

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'drivers/crypto: fix IPsec TTL decrement option' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (56 preceding siblings ...)
  2021-11-28 14:54   ` patch 'crypto/ipsec_mb: fix cipher key setting' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'kni: restrict bifurcated device support' " Xueming Li
                     ` (20 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Luca Boccassi, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7626e554b849dfb4308a06d06f84f91d1c1143ca

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7626e554b849dfb4308a06d06f84f91d1c1143ca Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Thu, 18 Nov 2021 12:30:18 +0530
Subject: [PATCH] drivers/crypto: fix IPsec TTL decrement option
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 0aa5986c280f34893b2a6bacf044cff31484fe0c ]

dpaa, dpaa2 and caam_jr drivers decrement the inner IP header
TTL for all packets and ignoring the dec_ttl option of SA.

In this patch, using the dec_ttl to decide to decrement the
packets inner IP header TTL or not.

Fixes: 0a23d4b6f4c2 ("crypto/dpaa2_sec: support protocol offload IPsec")
Fixes: 3e33486f80a5 ("crypto/caam_jr: add security offload")
Fixes: 1f14d500bce1 ("crypto/dpaa_sec: support IPsec protocol offload")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/crypto/caam_jr/caam_jr.c            | 5 +++--
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 3 ++-
 drivers/crypto/dpaa_sec/dpaa_sec.c          | 4 +++-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index 3fb3fe0f8a..6fc8adf752 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -1881,8 +1881,9 @@ caam_jr_set_ipsec_session(__rte_unused struct rte_cryptodev *dev,
 		session->encap_pdb.options =
 			(IPVERSION << PDBNH_ESP_ENCAP_SHIFT) |
 			PDBOPTS_ESP_OIHI_PDB_INL |
-			PDBOPTS_ESP_IVSRC |
-			PDBHMO_ESP_ENCAP_DTTL;
+			PDBOPTS_ESP_IVSRC;
+		if (ipsec_xform->options.dec_ttl)
+			session->encap_pdb.options |= PDBHMO_ESP_ENCAP_DTTL;
 		if (ipsec_xform->options.esn)
 			session->encap_pdb.options |= PDBOPTS_ESP_ESN;
 		session->encap_pdb.spi = ipsec_xform->spi;
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 9f189dd890..7e728d1cf7 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2910,8 +2910,9 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev,
 		encap_pdb.options = (IPVERSION << PDBNH_ESP_ENCAP_SHIFT) |
 			PDBOPTS_ESP_OIHI_PDB_INL |
 			PDBOPTS_ESP_IVSRC |
-			PDBHMO_ESP_ENCAP_DTTL |
 			PDBHMO_ESP_SNR;
+		if (ipsec_xform->options.dec_ttl)
+			encap_pdb.options |= PDBHMO_ESP_ENCAP_DTTL;
 		if (ipsec_xform->options.esn)
 			encap_pdb.options |= PDBOPTS_ESP_ESN;
 		encap_pdb.spi = ipsec_xform->spi;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index a958d00b46..f29e674c01 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2799,12 +2799,14 @@ dpaa_sec_set_ipsec_session(__rte_unused struct rte_cryptodev *dev,
 			session->encap_pdb.ip_hdr_len =
 						sizeof(struct rte_ipv6_hdr);
 		}
+
 		session->encap_pdb.options =
 			(IPVERSION << PDBNH_ESP_ENCAP_SHIFT) |
 			PDBOPTS_ESP_OIHI_PDB_INL |
 			PDBOPTS_ESP_IVSRC |
-			PDBHMO_ESP_ENCAP_DTTL |
 			PDBHMO_ESP_SNR;
+		if (ipsec_xform->options.dec_ttl)
+			session->encap_pdb.options |= PDBHMO_ESP_ENCAP_DTTL;
 		if (ipsec_xform->options.esn)
 			session->encap_pdb.options |= PDBOPTS_ESP_ESN;
 		session->encap_pdb.spi = ipsec_xform->spi;
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.261589500 +0800
+++ 0058-drivers-crypto-fix-IPsec-TTL-decrement-option.patch	2021-11-28 22:41:03.400206198 +0800
@@ -1 +1 @@
-From 0aa5986c280f34893b2a6bacf044cff31484fe0c Mon Sep 17 00:00:00 2001
+From 7626e554b849dfb4308a06d06f84f91d1c1143ca Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0aa5986c280f34893b2a6bacf044cff31484fe0c ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 8c56610ac8..5909eca6e4 100644
+index 3fb3fe0f8a..6fc8adf752 100644
@@ -42 +44 @@
-index cb2ad435bf..2e8e4c6adf 100644
+index 9f189dd890..7e728d1cf7 100644
@@ -45 +47 @@
-@@ -2935,8 +2935,9 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev,
+@@ -2910,8 +2910,9 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev,
@@ -57 +59 @@
-index 454b9c4785..9a7d5eb8b7 100644
+index a958d00b46..f29e674c01 100644
@@ -60 +62 @@
-@@ -2898,12 +2898,14 @@ dpaa_sec_set_ipsec_session(__rte_unused struct rte_cryptodev *dev,
+@@ -2799,12 +2799,14 @@ dpaa_sec_set_ipsec_session(__rte_unused struct rte_cryptodev *dev,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'kni: restrict bifurcated device support' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (57 preceding siblings ...)
  2021-11-28 14:54   ` patch 'drivers/crypto: fix IPsec TTL decrement option' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'mbuf: fix dump of dynamic fields and flags' " Xueming Li
                     ` (19 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Luca Boccassi, Igor Ryzhov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e811e57fe13bd9159e112471d5953160bd10fd8d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e811e57fe13bd9159e112471d5953160bd10fd8d Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 23 Nov 2021 16:46:17 +0000
Subject: [PATCH] kni: restrict bifurcated device support
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit a1b2558cdb6aff0c459c9cb11b382840b66d1d2b ]

To enable bifurcated device support, rtnl_lock is released before calling
userspace callbacks and asynchronous requests are enabled.

But these changes caused more issues, like bug #809, #816. To reduce the
scope of the problems, the bifurcated device support related changes are
only enabled when it is requested explicitly with new 'enable_bifurcated'
module parameter.
And bifurcated device support is disabled by default.

So the bifurcated device related problems are isolated and they can be
fixed without impacting all use cases.

Bugzilla ID: 816
Fixes: 631217c76135 ("kni: fix kernel deadlock with bifurcated device")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Igor Ryzhov <iryzhov@nfware.com>
---
 .../prog_guide/kernel_nic_interface.rst       | 28 +++++++++++++
 kernel/linux/kni/kni_dev.h                    |  3 ++
 kernel/linux/kni/kni_misc.c                   | 36 ++++++++++++++++
 kernel/linux/kni/kni_net.c                    | 42 +++++++++++--------
 4 files changed, 92 insertions(+), 17 deletions(-)

diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst
index 1ce03ec1a3..771c7d7fda 100644
--- a/doc/guides/prog_guide/kernel_nic_interface.rst
+++ b/doc/guides/prog_guide/kernel_nic_interface.rst
@@ -56,6 +56,12 @@ can be specified when the module is loaded to control its behavior:
                     off   Interfaces will be created with carrier state set to off.
                     on    Interfaces will be created with carrier state set to on.
                      (charp)
+    parm:           enable_bifurcated: Enable request processing support for
+                    bifurcated drivers, which means releasing rtnl_lock before calling
+                    userspace callback and supporting async requests (default=off):
+                    on    Enable request processing support for bifurcated drivers.
+                     (charp)
+
 
 Loading the ``rte_kni`` kernel module without any optional parameters is
 the typical way a DPDK application gets packets into and out of the kernel
@@ -174,6 +180,28 @@ To set the default carrier state to *off*:
 If the ``carrier`` parameter is not specified, the default carrier state
 of KNI interfaces will be set to *off*.
 
+.. _kni_bifurcated_device_support:
+
+Bifurcated Device Support
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+User callbacks are executed while kernel module holds the ``rtnl`` lock, this
+causes a deadlock when callbacks run control commands on another Linux kernel
+network interface.
+
+Bifurcated devices has kernel network driver part and to prevent deadlock for
+them ``enable_bifurcated`` is used.
+
+To enable bifurcated device support:
+
+.. code-block:: console
+
+    # insmod <build_dir>/kernel/linux/kni/rte_kni.ko enable_bifurcated=on
+
+Enabling bifurcated device support releases ``rtnl`` lock before calling
+callback and locks it back after callback. Also enables asynchronous request to
+support callbacks that requires rtnl lock to work (interface down).
+
 KNI Creation and Deletion
 -------------------------
 
diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h
index c15da311ba..e8633486ee 100644
--- a/kernel/linux/kni/kni_dev.h
+++ b/kernel/linux/kni/kni_dev.h
@@ -34,6 +34,9 @@
 /* Default carrier state for created KNI network interfaces */
 extern uint32_t kni_dflt_carrier;
 
+/* Request processing support for bifurcated drivers. */
+extern uint32_t bifurcated_support;
+
 /**
  * A structure describing the private information for a kni device.
  */
diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c
index 2b464c4381..aae977c187 100644
--- a/kernel/linux/kni/kni_misc.c
+++ b/kernel/linux/kni/kni_misc.c
@@ -41,6 +41,10 @@ static uint32_t multiple_kthread_on;
 static char *carrier;
 uint32_t kni_dflt_carrier;
 
+/* Request processing support for bifurcated drivers. */
+static char *enable_bifurcated;
+uint32_t bifurcated_support;
+
 #define KNI_DEV_IN_USE_BIT_NUM 0 /* Bit number for device in use */
 
 static int kni_net_id;
@@ -568,6 +572,22 @@ kni_parse_carrier_state(void)
 	return 0;
 }
 
+static int __init
+kni_parse_bifurcated_support(void)
+{
+	if (!enable_bifurcated) {
+		bifurcated_support = 0;
+		return 0;
+	}
+
+	if (strcmp(enable_bifurcated, "on") == 0)
+		bifurcated_support = 1;
+	else
+		return -1;
+
+	return 0;
+}
+
 static int __init
 kni_init(void)
 {
@@ -593,6 +613,13 @@ kni_init(void)
 	else
 		pr_debug("Default carrier state set to on.\n");
 
+	if (kni_parse_bifurcated_support() < 0) {
+		pr_err("Invalid parameter for bifurcated support\n");
+		return -EINVAL;
+	}
+	if (bifurcated_support == 1)
+		pr_debug("bifurcated support is enabled.\n");
+
 #ifdef HAVE_SIMPLIFIED_PERNET_OPERATIONS
 	rc = register_pernet_subsys(&kni_net_ops);
 #else
@@ -659,3 +686,12 @@ MODULE_PARM_DESC(carrier,
 "\t\ton    Interfaces will be created with carrier state set to on.\n"
 "\t\t"
 );
+
+module_param(enable_bifurcated, charp, 0644);
+MODULE_PARM_DESC(enable_bifurcated,
+"Enable request processing support for bifurcated drivers, "
+"which means releasing rtnl_lock before calling userspace callback and "
+"supporting async requests (default=off):\n"
+"\t\ton    Enable request processing support for bifurcated drivers.\n"
+"\t\t"
+);
diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index 611719b5ee..29e5b9e21f 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -113,12 +113,14 @@ kni_net_process_request(struct net_device *dev, struct rte_kni_request *req)
 
 	ASSERT_RTNL();
 
-	/* If we need to wait and RTNL mutex is held
-	 * drop the mutex and hold reference to keep device
-	 */
-	if (req->async == 0) {
-		dev_hold(dev);
-		rtnl_unlock();
+	if (bifurcated_support) {
+		/* If we need to wait and RTNL mutex is held
+		 * drop the mutex and hold reference to keep device
+		 */
+		if (req->async == 0) {
+			dev_hold(dev);
+			rtnl_unlock();
+		}
 	}
 
 	mutex_lock(&kni->sync_lock);
@@ -132,12 +134,14 @@ kni_net_process_request(struct net_device *dev, struct rte_kni_request *req)
 		goto fail;
 	}
 
-	/* No result available since request is handled
-	 * asynchronously. set response to success.
-	 */
-	if (req->async != 0) {
-		req->result = 0;
-		goto async;
+	if (bifurcated_support) {
+		/* No result available since request is handled
+		 * asynchronously. set response to success.
+		 */
+		if (req->async != 0) {
+			req->result = 0;
+			goto async;
+		}
 	}
 
 	ret_val = wait_event_interruptible_timeout(kni->wq,
@@ -160,9 +164,11 @@ async:
 
 fail:
 	mutex_unlock(&kni->sync_lock);
-	if (req->async == 0) {
-		rtnl_lock();
-		dev_put(dev);
+	if (bifurcated_support) {
+		if (req->async == 0) {
+			rtnl_lock();
+			dev_put(dev);
+		}
 	}
 	return ret;
 }
@@ -207,8 +213,10 @@ kni_net_release(struct net_device *dev)
 	/* Setting if_up to 0 means down */
 	req.if_up = 0;
 
-	/* request async because of the deadlock problem */
-	req.async = 1;
+	if (bifurcated_support) {
+		/* request async because of the deadlock problem */
+		req.async = 1;
+	}
 
 	ret = kni_net_process_request(dev, &req);
 
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.307839066 +0800
+++ 0059-kni-restrict-bifurcated-device-support.patch	2021-11-28 22:41:03.400206198 +0800
@@ -1 +1 @@
-From a1b2558cdb6aff0c459c9cb11b382840b66d1d2b Mon Sep 17 00:00:00 2001
+From e811e57fe13bd9159e112471d5953160bd10fd8d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a1b2558cdb6aff0c459c9cb11b382840b66d1d2b ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -26 +27,0 @@
- doc/guides/rel_notes/release_21_11.rst        |  6 +++
@@ -30 +31 @@
- 5 files changed, 98 insertions(+), 17 deletions(-)
+ 4 files changed, 92 insertions(+), 17 deletions(-)
@@ -78,17 +78,0 @@
-diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst
-index 4d8c59472a..fa2ce760d8 100644
---- a/doc/guides/rel_notes/release_21_11.rst
-+++ b/doc/guides/rel_notes/release_21_11.rst
-@@ -75,6 +75,12 @@ New Features
-     operations.
-   * Added multi-process support.
- 
-+* **Updated default KNI behavior on net devices control callbacks.**
-+
-+  Updated KNI net devices control callbacks to run with ``rtnl`` kernel lock
-+  held by default. A newly added ``enable_bifurcated`` KNI kernel module
-+  parameter can be used to run callbacks with ``rtnl`` lock released.
-+
- * **Added HiSilicon DMA driver.**
- 
-   The HiSilicon DMA driver provides device drivers for the Kunpeng's DMA devices.
@@ -110 +94 @@
-index f4944e1ddf..f10dcd069d 100644
+index 2b464c4381..aae977c187 100644
@@ -124 +108 @@
-@@ -565,6 +569,22 @@ kni_parse_carrier_state(void)
+@@ -568,6 +572,22 @@ kni_parse_carrier_state(void)
@@ -147 +131 @@
-@@ -590,6 +610,13 @@ kni_init(void)
+@@ -593,6 +613,13 @@ kni_init(void)
@@ -161 +145 @@
-@@ -656,3 +683,12 @@ MODULE_PARM_DESC(carrier,
+@@ -659,3 +686,12 @@ MODULE_PARM_DESC(carrier,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'mbuf: fix dump of dynamic fields and flags' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (58 preceding siblings ...)
  2021-11-28 14:54   ` patch 'kni: restrict bifurcated device support' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'doc: strip build artefacts for examples file list' " Xueming Li
                     ` (18 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Alexander Bechikov; +Cc: Luca Boccassi, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f1e3e6d421ba5c1faccfffbfb55a79aaa5c2ba85

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f1e3e6d421ba5c1faccfffbfb55a79aaa5c2ba85 Mon Sep 17 00:00:00 2001
From: Alexander Bechikov <asb.tyum@gmail.com>
Date: Wed, 24 Nov 2021 13:57:04 +0100
Subject: [PATCH] mbuf: fix dump of dynamic fields and flags
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit c0b48da45c151987f660b897c247132dac81021f ]

The dump of dynamic fields and flags fails if the shm is already
allocated. Add a check to fix the issue.

Fixes: d4902ed31c63 ("mbuf: check shared memory before dumping dynamic space")

Signed-off-by: Alexander Bechikov <asb.tyum@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mbuf/rte_mbuf_dyn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c
index d55e162a68..0c463f5818 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.c
+++ b/lib/librte_mbuf/rte_mbuf_dyn.c
@@ -531,7 +531,7 @@ void rte_mbuf_dyn_dump(FILE *out)
 	size_t i;
 
 	rte_mcfg_tailq_write_lock();
-	if (init_shared_mem() < 0) {
+	if (shm == NULL && init_shared_mem() < 0) {
 		rte_mcfg_tailq_write_unlock();
 		return;
 	}
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.351137328 +0800
+++ 0060-mbuf-fix-dump-of-dynamic-fields-and-flags.patch	2021-11-28 22:41:03.400206198 +0800
@@ -1 +1 @@
-From c0b48da45c151987f660b897c247132dac81021f Mon Sep 17 00:00:00 2001
+From f1e3e6d421ba5c1faccfffbfb55a79aaa5c2ba85 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c0b48da45c151987f660b897c247132dac81021f ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -15 +17 @@
- lib/mbuf/rte_mbuf_dyn.c | 2 +-
+ lib/librte_mbuf/rte_mbuf_dyn.c | 2 +-
@@ -18,4 +20,4 @@
-diff --git a/lib/mbuf/rte_mbuf_dyn.c b/lib/mbuf/rte_mbuf_dyn.c
-index db8e020665..4ae79383b5 100644
---- a/lib/mbuf/rte_mbuf_dyn.c
-+++ b/lib/mbuf/rte_mbuf_dyn.c
+diff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c
+index d55e162a68..0c463f5818 100644
+--- a/lib/librte_mbuf/rte_mbuf_dyn.c
++++ b/lib/librte_mbuf/rte_mbuf_dyn.c

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'doc: strip build artefacts for examples file list' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (59 preceding siblings ...)
  2021-11-28 14:54   ` patch 'mbuf: fix dump of dynamic fields and flags' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'examples/ptpclient: fix delay request message' " Xueming Li
                     ` (17 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Timothy Redaelli; +Cc: Luca Boccassi, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/edfcdd91ea9bc8236a2ef0a36c80b0c2c7fe4129

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From edfcdd91ea9bc8236a2ef0a36c80b0c2c7fe4129 Mon Sep 17 00:00:00 2001
From: Timothy Redaelli <tredaelli@redhat.com>
Date: Tue, 23 Nov 2021 15:48:42 +0100
Subject: [PATCH] doc: strip build artefacts for examples file list
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 92eb2c3465439dad4d7aa4f073df517de1817ed9 ]

examples.dox is built inside builddir/doc/api and so doxygen generates
some dir_HASH.html that includes the builddir name and this may prevent
DPDK documentation to be correctly generated in some distributions, for
example CentOS Stream 9 and RHEL9, since the builddir includes the
architecture.

This commit adds builddir/doc/api (the path where examples.dox is
generated) to STRIP_FROM_PATH, so the generated documentation doesn't
change if builddir changes.

Fixes: a6090630f4e5 ("doc: automate examples file list for API")

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Tested-by: David Marchand <david.marchand@redhat.com>
---
 doc/api/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/api/meson.build b/doc/api/meson.build
index dfdefdc924..22d1bc204d 100644
--- a/doc/api/meson.build
+++ b/doc/api/meson.build
@@ -36,7 +36,7 @@ cdata.set('API_EXAMPLES', join_paths(meson.build_root(), 'doc', 'api', 'examples
 cdata.set('OUTPUT', join_paths(meson.build_root(), 'doc', 'api'))
 cdata.set('HTML_OUTPUT', 'html')
 cdata.set('TOPDIR', meson.source_root())
-cdata.set('STRIP_FROM_PATH', meson.source_root())
+cdata.set('STRIP_FROM_PATH', ' '.join([meson.source_root(), join_paths(meson.build_root(), 'doc', 'api')]))
 cdata.set('WARN_AS_ERROR', 'NO')
 if get_option('werror')
 	cdata.set('WARN_AS_ERROR', 'YES')
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.391439141 +0800
+++ 0061-doc-strip-build-artefacts-for-examples-file-list.patch	2021-11-28 22:41:03.400206198 +0800
@@ -1 +1 @@
-From 92eb2c3465439dad4d7aa4f073df517de1817ed9 Mon Sep 17 00:00:00 2001
+From edfcdd91ea9bc8236a2ef0a36c80b0c2c7fe4129 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 92eb2c3465439dad4d7aa4f073df517de1817ed9 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index d34c383694..7e2b429ac8 100644
+index dfdefdc924..22d1bc204d 100644
@@ -38 +40 @@
-     cdata.set('WARN_AS_ERROR', 'YES')
+ 	cdata.set('WARN_AS_ERROR', 'YES')

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'examples/ptpclient: fix delay request message' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (60 preceding siblings ...)
  2021-11-28 14:54   ` patch 'doc: strip build artefacts for examples file list' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'doc: remove repeated repeated words' " Xueming Li
                     ` (16 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Vanshika Shukla; +Cc: Luca Boccassi, Nipun Gupta, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/eb7ddaede6f526881827f0f114fa11249f623b7b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From eb7ddaede6f526881827f0f114fa11249f623b7b Mon Sep 17 00:00:00 2001
From: Vanshika Shukla <vanshika.shukla@nxp.com>
Date: Mon, 22 Nov 2021 13:01:22 +0530
Subject: [PATCH] examples/ptpclient: fix delay request message
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 21ba4d572a5cb404cd3d02a59aaf7997bb4e8a39 ]

The size of delay request message sent out by the DPDK
ptpclient application was observed to have extra length
than expected. Due to this, bad messages were observed
on the master side and delay response was not received.
This patch fixes this bug.

Fixes: ab129e9065a5 ("examples/ptpclient: add minimal PTP client")

Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 examples/ptpclient/ptpclient.c | 32 +++++++++++++++++++-------------
 1 file changed, 19 insertions(+), 13 deletions(-)

diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c
index a8b1b85c6d..c8fdae9cce 100644
--- a/examples/ptpclient/ptpclient.c
+++ b/examples/ptpclient/ptpclient.c
@@ -382,6 +382,7 @@ parse_fup(struct ptpv2_data_slave_ordinary *ptp_data)
 	struct ptp_header *ptp_hdr;
 	struct clock_id *client_clkid;
 	struct ptp_message *ptp_msg;
+	struct delay_req_msg *req_msg;
 	struct rte_mbuf *created_pkt;
 	struct tstamp *origin_tstamp;
 	struct rte_ether_addr eth_multicast = ether_multicast;
@@ -419,7 +420,12 @@ parse_fup(struct ptpv2_data_slave_ordinary *ptp_data)
 
 		created_pkt = rte_pktmbuf_alloc(mbuf_pool);
 		pkt_size = sizeof(struct rte_ether_hdr) +
-			sizeof(struct ptp_message);
+			sizeof(struct delay_req_msg);
+
+		if (rte_pktmbuf_append(created_pkt, pkt_size) == NULL) {
+			rte_pktmbuf_free(created_pkt);
+			return;
+		}
 		created_pkt->data_len = pkt_size;
 		created_pkt->pkt_len = pkt_size;
 		eth_hdr = rte_pktmbuf_mtod(created_pkt, struct rte_ether_hdr *);
@@ -429,22 +435,22 @@ parse_fup(struct ptpv2_data_slave_ordinary *ptp_data)
 		rte_ether_addr_copy(&eth_multicast, &eth_hdr->d_addr);
 
 		eth_hdr->ether_type = htons(PTP_PROTOCOL);
-		ptp_msg = (struct ptp_message *)
-			(rte_pktmbuf_mtod(created_pkt, char *) +
-			sizeof(struct rte_ether_hdr));
-
-		ptp_msg->delay_req.hdr.seq_id = htons(ptp_data->seqID_SYNC);
-		ptp_msg->delay_req.hdr.msg_type = DELAY_REQ;
-		ptp_msg->delay_req.hdr.ver = 2;
-		ptp_msg->delay_req.hdr.control = 1;
-		ptp_msg->delay_req.hdr.log_message_interval = 127;
-		ptp_msg->delay_req.hdr.message_length =
+		req_msg = rte_pktmbuf_mtod_offset(created_pkt,
+			struct delay_req_msg *, sizeof(struct
+			rte_ether_hdr));
+
+		req_msg->hdr.seq_id = htons(ptp_data->seqID_SYNC);
+		req_msg->hdr.msg_type = DELAY_REQ;
+		req_msg->hdr.ver = 2;
+		req_msg->hdr.control = 1;
+		req_msg->hdr.log_message_interval = 127;
+		req_msg->hdr.message_length =
 			htons(sizeof(struct delay_req_msg));
-		ptp_msg->delay_req.hdr.domain_number = ptp_hdr->domain_number;
+		req_msg->hdr.domain_number = ptp_hdr->domain_number;
 
 		/* Set up clock id. */
 		client_clkid =
-			&ptp_msg->delay_req.hdr.source_port_id.clock_id;
+			&req_msg->hdr.source_port_id.clock_id;
 
 		client_clkid->id[0] = eth_hdr->s_addr.addr_bytes[0];
 		client_clkid->id[1] = eth_hdr->s_addr.addr_bytes[1];
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.431460858 +0800
+++ 0062-examples-ptpclient-fix-delay-request-message.patch	2021-11-28 22:41:03.400206198 +0800
@@ -1 +1 @@
-From 21ba4d572a5cb404cd3d02a59aaf7997bb4e8a39 Mon Sep 17 00:00:00 2001
+From eb7ddaede6f526881827f0f114fa11249f623b7b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 21ba4d572a5cb404cd3d02a59aaf7997bb4e8a39 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 354c7b2c90..de799f698b 100644
+index a8b1b85c6d..c8fdae9cce 100644
@@ -25 +27 @@
-@@ -386,6 +386,7 @@ parse_fup(struct ptpv2_data_slave_ordinary *ptp_data)
+@@ -382,6 +382,7 @@ parse_fup(struct ptpv2_data_slave_ordinary *ptp_data)
@@ -33 +35 @@
-@@ -423,7 +424,12 @@ parse_fup(struct ptpv2_data_slave_ordinary *ptp_data)
+@@ -419,7 +420,12 @@ parse_fup(struct ptpv2_data_slave_ordinary *ptp_data)
@@ -47,2 +49,2 @@
-@@ -433,22 +439,22 @@ parse_fup(struct ptpv2_data_slave_ordinary *ptp_data)
- 		rte_ether_addr_copy(&eth_multicast, &eth_hdr->dst_addr);
+@@ -429,22 +435,22 @@ parse_fup(struct ptpv2_data_slave_ordinary *ptp_data)
+ 		rte_ether_addr_copy(&eth_multicast, &eth_hdr->d_addr);
@@ -80,2 +82,2 @@
- 		client_clkid->id[0] = eth_hdr->src_addr.addr_bytes[0];
- 		client_clkid->id[1] = eth_hdr->src_addr.addr_bytes[1];
+ 		client_clkid->id[0] = eth_hdr->s_addr.addr_bytes[0];
+ 		client_clkid->id[1] = eth_hdr->s_addr.addr_bytes[1];

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'doc: remove repeated repeated words' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (61 preceding siblings ...)
  2021-11-28 14:54   ` patch 'examples/ptpclient: fix delay request message' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'net/bnxt: fix autoneg on PAM4 links' " Xueming Li
                     ` (15 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Luca Boccassi, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d748677d8b45feb014da9175e314ca02b96704c2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d748677d8b45feb014da9175e314ca02b96704c2 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Fri, 5 Nov 2021 22:10:30 +0100
Subject: [PATCH] doc: remove repeated repeated words
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 4f823975f45218c674b15ad1e9b84255eeabe08c ]

Some duplicate words were detected with a script.

Fixes: fdec9301f52d ("doc: add flow classify guides")
Fixes: 4dc6d8e63c16 ("doc: add graph library guide")
Fixes: 30d3aa861db5 ("doc: rework VM power manager user guide")
Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
Fixes: e64833f2273a ("examples/l2fwd-keepalive: add sample application")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 doc/guides/prog_guide/flow_classify_lib.rst      | 2 +-
 doc/guides/prog_guide/graph_lib.rst              | 2 +-
 doc/guides/sample_app_ug/ipsec_secgw.rst         | 2 +-
 doc/guides/sample_app_ug/keep_alive.rst          | 2 +-
 doc/guides/sample_app_ug/vm_power_management.rst | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/guides/prog_guide/flow_classify_lib.rst b/doc/guides/prog_guide/flow_classify_lib.rst
index f0ed5a1a04..7dae0bc8c6 100644
--- a/doc/guides/prog_guide/flow_classify_lib.rst
+++ b/doc/guides/prog_guide/flow_classify_lib.rst
@@ -366,7 +366,7 @@ Packet Matching
 ~~~~~~~~~~~~~~~
 
 The ``rte_flow_classifier_query`` API is used to find packets which match a
-given flow Flow rule in the table.
+given flow rule in the table.
 This API calls the flow_classify_run internal function which calls the
 ``table.ops.f_lookup`` API to see if any packets in a burst match any
 of the Flow rules in the table.
diff --git a/doc/guides/prog_guide/graph_lib.rst b/doc/guides/prog_guide/graph_lib.rst
index fcff9c4286..1cfdc86433 100644
--- a/doc/guides/prog_guide/graph_lib.rst
+++ b/doc/guides/prog_guide/graph_lib.rst
@@ -220,7 +220,7 @@ the user needs to update the context of the node hence access to
 ``struct rte_node *`` memory.
 
 ``rte_graph_foreach_node()``, ``rte_graph_node_get()``,
-``rte_graph_node_get_by_name()`` APIs can be used to to get the
+``rte_graph_node_get_by_name()`` APIs can be used to get the
 ``struct rte_node*``. ``rte_graph_foreach_node()`` iterator function works on
 ``struct rte_graph *`` fast-path graph object while others works on graph ID or name.
 
diff --git a/doc/guides/sample_app_ug/ipsec_secgw.rst b/doc/guides/sample_app_ug/ipsec_secgw.rst
index c07275e581..b2f94963d5 100644
--- a/doc/guides/sample_app_ug/ipsec_secgw.rst
+++ b/doc/guides/sample_app_ug/ipsec_secgw.rst
@@ -421,7 +421,7 @@ where each options means:
 
    * *protect <SA_idx>*: the specified traffic is protected by SA rule
      with id SA_idx
-   * *bypass*: the specified traffic traffic is bypassed
+   * *bypass*: the specified traffic is bypassed
    * *discard*: the specified traffic is discarded
 
 ``<priority>``
diff --git a/doc/guides/sample_app_ug/keep_alive.rst b/doc/guides/sample_app_ug/keep_alive.rst
index c9392c9951..2ecfe3cfce 100644
--- a/doc/guides/sample_app_ug/keep_alive.rst
+++ b/doc/guides/sample_app_ug/keep_alive.rst
@@ -78,7 +78,7 @@ options.
 Explanation
 -----------
 
-The following sections provide some explanation of the The
+The following sections provide some explanation of the
 Keep-Alive/'Liveliness' conceptual scheme. As mentioned in the
 overview section, the initialization and run-time paths are very
 similar to those of the :doc:`l2_forward_real_virtual`.
diff --git a/doc/guides/sample_app_ug/vm_power_management.rst b/doc/guides/sample_app_ug/vm_power_management.rst
index 35afdac63f..7160b6a63a 100644
--- a/doc/guides/sample_app_ug/vm_power_management.rst
+++ b/doc/guides/sample_app_ug/vm_power_management.rst
@@ -236,7 +236,7 @@ Compiling and Running the Host Application
 Compiling the Host Application
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-For information on compiling the DPDK and sample applications, see
+For information on compiling the DPDK and sample applications,
 see :doc:`compiling`.
 
 The application is located in the ``vm_power_manager`` subdirectory.
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.471956943 +0800
+++ 0063-doc-remove-repeated-repeated-words.patch	2021-11-28 22:41:03.403539471 +0800
@@ -1 +1 @@
-From 4f823975f45218c674b15ad1e9b84255eeabe08c Mon Sep 17 00:00:00 2001
+From d748677d8b45feb014da9175e314ca02b96704c2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4f823975f45218c674b15ad1e9b84255eeabe08c ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -52 +54 @@
-index 2304141ce8..c53ee7c386 100644
+index c07275e581..b2f94963d5 100644
@@ -55 +57 @@
-@@ -443,7 +443,7 @@ where each options means:
+@@ -421,7 +421,7 @@ where each options means:
@@ -65 +67 @@
-index b6d75c8a80..a907ff36a1 100644
+index c9392c9951..2ecfe3cfce 100644

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/bnxt: fix autoneg on PAM4 links' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (62 preceding siblings ...)
  2021-11-28 14:54   ` patch 'doc: remove repeated repeated words' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'net/mlx5: fix metadata and meter split shared tag' " Xueming Li
                     ` (14 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Luca Boccassi, Charles Brett, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/932ade3bdcaceccd3704b34d13ed7ae1cebe2734

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 932ade3bdcaceccd3704b34d13ed7ae1cebe2734 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Thu, 18 Nov 2021 09:34:39 +0530
Subject: [PATCH] net/bnxt: fix autoneg on PAM4 links
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e806385c6deaba31b7f81931c44e7867a2ebdfb7 ]

If autonegotiation was enabled, driver was not passing the
'auto_pam4_link_speeds' obtained during init and stored in bp->link_info
to bnxt_hwrm_port_phy_cfg(). This would result in an incorrect setting
being passed to the HW during PHY configuration. This in turn, would
result in invalid settings being retrieved and configured in subsequent
application loads resulting in launch failures.

Bugzilla ID: 791
Fixes: c23f9ded0391 ("net/bnxt: support 200G PAM4 link")

Reported-by: Charles Brett <cfb@hpe.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index b78e099a5e..71ddc6f55d 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -3148,6 +3148,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
 		link_req.auto_link_speed_mask =
 			bnxt_parse_eth_link_speed_mask(bp,
 						       dev_conf->link_speeds);
+		link_req.auto_pam4_link_speeds =
+			bp->link_info->auto_pam4_link_speeds;
 	} else {
 		if (bp->link_info->phy_type ==
 		    HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASET ||
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.514543200 +0800
+++ 0064-net-bnxt-fix-autoneg-on-PAM4-links.patch	2021-11-28 22:41:03.406872744 +0800
@@ -1 +1 @@
-From e806385c6deaba31b7f81931c44e7867a2ebdfb7 Mon Sep 17 00:00:00 2001
+From 932ade3bdcaceccd3704b34d13ed7ae1cebe2734 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e806385c6deaba31b7f81931c44e7867a2ebdfb7 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 6de3b92c40..7f51c61097 100644
+index b78e099a5e..71ddc6f55d 100644
@@ -28 +30 @@
-@@ -3247,6 +3247,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
+@@ -3148,6 +3148,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx5: fix metadata and meter split shared tag' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (63 preceding siblings ...)
  2021-11-28 14:54   ` patch 'net/bnxt: fix autoneg on PAM4 links' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'net/mlx4: fix empty Ethernet spec with VLAN' " Xueming Li
                     ` (13 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Jiawei Wang; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/32255ff0fe19aedcb65775a8242718b168b8b4bf

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 32255ff0fe19aedcb65775a8242718b168b8b4bf Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Fri, 19 Nov 2021 15:02:00 +0200
Subject: [PATCH] net/mlx5: fix metadata and meter split shared tag
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 16f4aa57ca381c4283826cdfce2cd4e172744ca7 ]

In the metadata flow split, PMD created the prefix subflow
with removed Queue or RSS action and appended the set tag and
copy table jump actions. If the flow being split for metadata
was the meter prefix subflow, the driver supposed to share the same
meter split tag action for the metadata split flow. There was the wrong
check for preceding meter split tag action, causing append with metadata
split set tag action and resulting the meter suffix subflow was missed
due to tag value mismatch.

This patch adds the checking before copying into extend action list,
to make sure the correct shared tag is used.

Fixes: 8d72fa668964 ("net/mlx5: share tag between meter and metadata")

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 35 +++++++++++++++++------------------
 1 file changed, 17 insertions(+), 18 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 2533a9102e..ba5ad7b87d 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -4415,6 +4415,8 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
  *   Pointer to the Q/RSS action.
  * @param[in] actions_n
  *   Number of original actions.
+ * @param[in] mtr_sfx
+ *   Check if it is in meter suffix table.
  * @param[out] error
  *   Perform verbose error reporting if not NULL.
  *
@@ -4427,7 +4429,8 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev,
 			  struct rte_flow_action *split_actions,
 			  const struct rte_flow_action *actions,
 			  const struct rte_flow_action *qrss,
-			  int actions_n, struct rte_flow_error *error)
+			  int actions_n, int mtr_sfx,
+			  struct rte_flow_error *error)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct mlx5_rte_flow_action_set_tag *set_tag;
@@ -4442,15 +4445,15 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev,
 	 * - Add jump to mreg CP_TBL.
 	 * As a result, there will be one more action.
 	 */
-	++actions_n;
 	memcpy(split_actions, actions, sizeof(*split_actions) * actions_n);
+	/* Count MLX5_RTE_FLOW_ACTION_TYPE_TAG. */
+	++actions_n;
 	set_tag = (void *)(split_actions + actions_n);
 	/*
-	 * If tag action is not set to void(it means we are not the meter
-	 * suffix flow), add the tag action. Since meter suffix flow already
-	 * has the tag added.
+	 * If we are not the meter suffix flow, add the tag action.
+	 * Since meter suffix flow already has the tag added.
 	 */
-	if (split_actions[qrss_idx].type != RTE_FLOW_ACTION_TYPE_VOID) {
+	if (!mtr_sfx) {
 		/*
 		 * Allocate the new subflow ID. This one is unique within
 		 * device and not shared with representors. Otherwise,
@@ -4483,6 +4486,12 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev,
 				MLX5_RTE_FLOW_ACTION_TYPE_TAG,
 			.conf = set_tag,
 		};
+	} else {
+		/*
+		 * If we are the suffix flow of meter, tag already exist.
+		 * Set the QUEUE/RSS action to void.
+		 */
+		split_actions[qrss_idx].type = RTE_FLOW_ACTION_TYPE_VOID;
 	}
 	/* JUMP action to jump to mreg copy table (CP_TBL). */
 	jump = (void *)(set_tag + 1);
@@ -4855,17 +4864,6 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
 						  RTE_FLOW_ERROR_TYPE_ACTION,
 						  NULL, "no memory to split "
 						  "metadata flow");
-		/*
-		 * If we are the suffix flow of meter, tag already exist.
-		 * Set the tag action to void.
-		 */
-		if (mtr_sfx)
-			ext_actions[qrss - actions].type =
-						RTE_FLOW_ACTION_TYPE_VOID;
-		else
-			ext_actions[qrss - actions].type =
-						(enum rte_flow_action_type)
-						MLX5_RTE_FLOW_ACTION_TYPE_TAG;
 		/*
 		 * Create the new actions list with removed Q/RSS action
 		 * and appended set tag and jump to register copy table
@@ -4873,7 +4871,8 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
 		 * in advance, because it is needed for set tag action.
 		 */
 		qrss_id = flow_mreg_split_qrss_prep(dev, ext_actions, actions,
-						    qrss, actions_n, error);
+						    qrss, actions_n,
+						    mtr_sfx, error);
 		if (!mtr_sfx && !qrss_id) {
 			ret = -rte_errno;
 			goto exit;
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.558158347 +0800
+++ 0065-net-mlx5-fix-metadata-and-meter-split-shared-tag.patch	2021-11-28 22:41:03.413539290 +0800
@@ -1 +1 @@
-From 16f4aa57ca381c4283826cdfce2cd4e172744ca7 Mon Sep 17 00:00:00 2001
+From 32255ff0fe19aedcb65775a8242718b168b8b4bf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 16f4aa57ca381c4283826cdfce2cd4e172744ca7 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 43598f92ee..84e6f3048c 100644
+index 2533a9102e..ba5ad7b87d 100644
@@ -31 +33 @@
-@@ -5251,6 +5251,8 @@ exit:
+@@ -4415,6 +4415,8 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
@@ -40 +42 @@
-@@ -5263,7 +5265,8 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev,
+@@ -4427,7 +4429,8 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev,
@@ -50 +52 @@
-@@ -5278,15 +5281,15 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev,
+@@ -4442,15 +4445,15 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev,
@@ -71 +73 @@
-@@ -5319,6 +5322,12 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev,
+@@ -4483,6 +4486,12 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev,
@@ -84 +86 @@
-@@ -5773,17 +5782,6 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
+@@ -4855,17 +4864,6 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
@@ -102 +104 @@
-@@ -5791,7 +5789,8 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
+@@ -4873,7 +4871,8 @@ flow_create_split_metadata(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx4: fix empty Ethernet spec with VLAN' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (64 preceding siblings ...)
  2021-11-28 14:54   ` patch 'net/mlx5: fix metadata and meter split shared tag' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'net/mlx5: fix flow mark with sampling and metering' " Xueming Li
                     ` (12 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Xiaoyu Min; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b1c95cef1d78246b4b0f815fe3fd149f9db92b67

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b1c95cef1d78246b4b0f815fe3fd149f9db92b67 Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin@nvidia.com>
Date: Mon, 22 Nov 2021 21:53:29 +0800
Subject: [PATCH] net/mlx4: fix empty Ethernet spec with VLAN
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit d564eea7ce7fe66f6b4210956b8907f663d30734 ]

When the ETH spec is empty MLX4 PMD doesn't allow match other criteria,
which means the flow should be promisc one.

Currently, PMD validates this by setting flow->promisc bit when ETH spec
is empty and checking whether there is other rte_flow_item followed
when flow->promisc is on.

However, commit [1] adds support to match traffic only on VLAN id, the
above validation logic should be changed accordingly.

This patch changes the above validate logic by skipping flow->promisc
check if this item is VLAN.

[1]:
Fixes: c0d239263156 ("net/mlx4: support flow w/o ETH spec and with VLAN")

Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx4/mlx4_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c
index 418e3c6bb0..cf231e5944 100644
--- a/drivers/net/mlx4/mlx4_flow.c
+++ b/drivers/net/mlx4/mlx4_flow.c
@@ -713,7 +713,8 @@ fill:
 			flow->internal = 1;
 			continue;
 		}
-		if (flow->promisc || flow->allmulti) {
+		if ((item->type != RTE_FLOW_ITEM_TYPE_VLAN && flow->promisc) ||
+		    flow->allmulti) {
 			msg = "mlx4 does not support additional matching"
 				" criteria combined with indiscriminate"
 				" matching on Ethernet headers";
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.606898220 +0800
+++ 0066-net-mlx4-fix-empty-Ethernet-spec-with-VLAN.patch	2021-11-28 22:41:03.413539290 +0800
@@ -1 +1 @@
-From d564eea7ce7fe66f6b4210956b8907f663d30734 Mon Sep 17 00:00:00 2001
+From b1c95cef1d78246b4b0f815fe3fd149f9db92b67 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d564eea7ce7fe66f6b4210956b8907f663d30734 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index 2e1b6c87e9..9d7247cf81 100644
+index 418e3c6bb0..cf231e5944 100644

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx5: fix flow mark with sampling and metering' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (65 preceding siblings ...)
  2021-11-28 14:54   ` patch 'net/mlx4: fix empty Ethernet spec with VLAN' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'net/mlx5: fix multi-segment packet wraparound' " Xueming Li
                     ` (11 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Jiawei Wang; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6e5d1776da0318075b1239bc078b9a6e39a9b68b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6e5d1776da0318075b1239bc078b9a6e39a9b68b Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Mon, 22 Nov 2021 16:22:52 +0200
Subject: [PATCH] net/mlx5: fix flow mark with sampling and metering
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 693c7d4b1e12024cd429ef563e9df5cc2c477aee ]

If there are sample action and the meter action in the same flow,
mlx5 PMD performs several levels of splitting. For example, sampling
feature splits the original flow into prefix subflow with sample action,
and suffix subflow with the rest of actions. Then, metering feature
splits the sampling suffix subflow into its own meter subflows.
If mark action was added before the sample and meter action, the
flow mark flag was kept in the sample subflows but reset on
handling the metering split, causing the flow mark value missed.

This patch keeps the flow mark flag of previous subflow, and then
the following meter subflows handle the flow mark correctly.

Fixes: 9ade91dfe85d ("net/mlx5: fix group value of sample suffix flow")

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 5 ++---
 drivers/net/mlx5/mlx5_flow.h | 6 +++---
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index ba5ad7b87d..3c35b87964 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -5063,7 +5063,6 @@ flow_create_split_meter(struct rte_eth_dev *dev,
 			goto exit;
 		}
 		/* Add the prefix subflow. */
-		flow_split_info->prefix_mark = 0;
 		ret = flow_create_split_inner(dev, flow, &dev_flow,
 					      attr, items, pre_actions,
 					      flow_split_info, error);
@@ -5078,7 +5077,7 @@ flow_create_split_meter(struct rte_eth_dev *dev,
 				 MLX5_FLOW_TABLE_LEVEL_SUFFIX;
 		flow_split_info->prefix_layers =
 				flow_get_prefix_layer_flags(dev_flow);
-		flow_split_info->prefix_mark = dev_flow->handle->mark;
+		flow_split_info->prefix_mark |= dev_flow->handle->mark;
 	}
 	/* Add the prefix subflow. */
 	ret = flow_create_split_metadata(dev, flow,
@@ -5209,7 +5208,7 @@ flow_create_split_sample(struct rte_eth_dev *dev,
 					 sfx_table_key.table_id;
 		flow_split_info->prefix_layers =
 				flow_get_prefix_layer_flags(dev_flow);
-		flow_split_info->prefix_mark = dev_flow->handle->mark;
+		flow_split_info->prefix_mark |= dev_flow->handle->mark;
 		/* Suffix group level already be scaled with factor, set
 		 * skip_scale to 1 to avoid scale again in translation.
 		 */
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index c7021c2110..ed9e9f7240 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -1126,11 +1126,11 @@ struct mlx5_flow_workspace {
 };
 
 struct mlx5_flow_split_info {
-	bool external;
+	uint32_t external:1;
 	/**< True if flow is created by request external to PMD. */
-	uint8_t skip_scale; /**< Skip the scale the table with factor. */
+	uint32_t prefix_mark:1; /**< Prefix subflow mark flag. */
+	uint32_t skip_scale:8; /**< Skip the scale the table with factor. */
 	uint32_t flow_idx; /**< This memory pool index to the flow. */
-	uint32_t prefix_mark; /**< Prefix subflow mark flag. */
 	uint64_t prefix_layers; /**< Prefix subflow layers. */
 };
 
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.648923770 +0800
+++ 0067-net-mlx5-fix-flow-mark-with-sampling-and-metering.patch	2021-11-28 22:41:03.420205836 +0800
@@ -1 +1 @@
-From 693c7d4b1e12024cd429ef563e9df5cc2c477aee Mon Sep 17 00:00:00 2001
+From 6e5d1776da0318075b1239bc078b9a6e39a9b68b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 693c7d4b1e12024cd429ef563e9df5cc2c477aee ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -25,2 +27,2 @@
- drivers/net/mlx5/mlx5_flow.h | 8 ++++----
- 2 files changed, 6 insertions(+), 7 deletions(-)
+ drivers/net/mlx5/mlx5_flow.h | 6 +++---
+ 2 files changed, 5 insertions(+), 6 deletions(-)
@@ -29 +31 @@
-index a30ce695aa..f34e4b88aa 100644
+index ba5ad7b87d..3c35b87964 100644
@@ -32 +34 @@
-@@ -6096,7 +6096,6 @@ flow_create_split_meter(struct rte_eth_dev *dev,
+@@ -5063,7 +5063,6 @@ flow_create_split_meter(struct rte_eth_dev *dev,
@@ -37,5 +39,5 @@
- 		skip_scale_restore = flow_split_info->skip_scale;
- 		flow_split_info->skip_scale |=
- 			1 << MLX5_SCALE_JUMP_FLOW_GROUP_BIT;
-@@ -6129,7 +6128,7 @@ flow_create_split_meter(struct rte_eth_dev *dev,
- 				 MLX5_FLOW_TABLE_LEVEL_METER;
+ 		ret = flow_create_split_inner(dev, flow, &dev_flow,
+ 					      attr, items, pre_actions,
+ 					      flow_split_info, error);
+@@ -5078,7 +5077,7 @@ flow_create_split_meter(struct rte_eth_dev *dev,
+ 				 MLX5_FLOW_TABLE_LEVEL_SUFFIX;
@@ -46 +47,0 @@
- 		flow_split_info->table_id = MLX5_MTR_TABLE_ID_SUFFIX;
@@ -49,2 +50,3 @@
-@@ -6281,7 +6280,7 @@ flow_create_split_sample(struct rte_eth_dev *dev,
- 		}
+ 	ret = flow_create_split_metadata(dev, flow,
+@@ -5209,7 +5208,7 @@ flow_create_split_sample(struct rte_eth_dev *dev,
+ 					 sfx_table_key.table_id;
@@ -56,2 +58,2 @@
- 		 * MLX5_SCALE_FLOW_GROUP_BIT of skip_scale to 1 to avoid scale
- 		 * again in translation.
+ 		 * skip_scale to 1 to avoid scale again in translation.
+ 		 */
@@ -59 +61 @@
-index 1de2f2edb0..1f54649c69 100644
+index c7021c2110..ed9e9f7240 100644
@@ -62 +64 @@
-@@ -1111,13 +1111,13 @@ struct mlx5_flow_workspace {
+@@ -1126,11 +1126,11 @@ struct mlx5_flow_workspace {
@@ -74,3 +76 @@
--	uint64_t prefix_layers; /**< Prefix subflow layers. */
- 	uint32_t table_id; /**< Flow table identifier. */
-+	uint64_t prefix_layers; /**< Prefix subflow layers. */
+ 	uint64_t prefix_layers; /**< Prefix subflow layers. */
@@ -79 +78,0 @@
- typedef int (*mlx5_flow_validate_t)(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx5: fix multi-segment packet wraparound' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (66 preceding siblings ...)
  2021-11-28 14:54   ` patch 'net/mlx5: fix flow mark with sampling and metering' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'net/memif: allow stopping and closing device' " Xueming Li
                     ` (10 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Dariusz Sosnowski; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d2291cc9998f381214141f1a16fa60e7ff2b020a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d2291cc9998f381214141f1a16fa60e7ff2b020a Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Tue, 23 Nov 2021 15:57:40 +0200
Subject: [PATCH] net/mlx5: fix multi-segment packet wraparound
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit fa4883456d86fef8364e6dd90c57f134f28d46bf ]

This patch fixes the assertion failure triggered when the user
configured minimum inline length requirements and the application
transmitted multi segment packets. Failure was triggered when space left
in TX queue was not enough to cover this requirement.

This patch limits the length of data to be copied to the available space
in TX queue.

Fixes: cacb44a09962 ("net/mlx5: add no-inline Tx flag")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 97e0995c66..5012f2a74f 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -2584,7 +2584,6 @@ mlx5_tx_mseg_memcpy(uint8_t *pdst,
 	uint8_t *psrc;
 
 	MLX5_ASSERT(len);
-	MLX5_ASSERT(must <= len);
 	do {
 		/* Allow zero length packets, must check first. */
 		dlen = rte_pktmbuf_data_len(loc->mbuf);
@@ -2611,9 +2610,11 @@ mlx5_tx_mseg_memcpy(uint8_t *pdst,
 				if (diff <= rte_pktmbuf_data_len(loc->mbuf)) {
 					/*
 					 * Copy only the minimal required
-					 * part of the data buffer.
+					 * part of the data buffer. Limit amount
+					 * of data to be copied to the length of
+					 * available space.
 					 */
-					len = diff;
+					len = RTE_MIN(len, diff);
 				}
 			}
 			continue;
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.695670432 +0800
+++ 0068-net-mlx5-fix-multi-segment-packet-wraparound.patch	2021-11-28 22:41:03.423539109 +0800
@@ -1 +1 @@
-From fa4883456d86fef8364e6dd90c57f134f28d46bf Mon Sep 17 00:00:00 2001
+From d2291cc9998f381214141f1a16fa60e7ff2b020a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fa4883456d86fef8364e6dd90c57f134f28d46bf ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
- drivers/net/mlx5/mlx5_tx.h | 7 ++++---
+ drivers/net/mlx5/mlx5_rxtx.c | 7 ++++---
@@ -23,5 +25,5 @@
-diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h
-index bc629983fa..099e72935a 100644
---- a/drivers/net/mlx5/mlx5_tx.h
-+++ b/drivers/net/mlx5/mlx5_tx.h
-@@ -1071,7 +1071,6 @@ mlx5_tx_mseg_memcpy(uint8_t *pdst,
+diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
+index 97e0995c66..5012f2a74f 100644
+--- a/drivers/net/mlx5/mlx5_rxtx.c
++++ b/drivers/net/mlx5/mlx5_rxtx.c
+@@ -2584,7 +2584,6 @@ mlx5_tx_mseg_memcpy(uint8_t *pdst,
@@ -35 +37 @@
-@@ -1098,9 +1097,11 @@ mlx5_tx_mseg_memcpy(uint8_t *pdst,
+@@ -2611,9 +2610,11 @@ mlx5_tx_mseg_memcpy(uint8_t *pdst,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/memif: allow stopping and closing device' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (67 preceding siblings ...)
  2021-11-28 14:54   ` patch 'net/mlx5: fix multi-segment packet wraparound' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'doc: fix memif driver acronyms' " Xueming Li
                     ` (9 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Junxiao Shi; +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e6b5cb9fdd6d54f4df61f32fca31ab137f61fd4f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e6b5cb9fdd6d54f4df61f32fca31ab137f61fd4f Mon Sep 17 00:00:00 2001
From: Junxiao Shi <git@mail1.yoursunny.com>
Date: Thu, 18 Nov 2021 17:33:46 +0000
Subject: [PATCH] net/memif: allow stopping and closing device
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 858a152ab5e99852390b3157c2a4ecbb23022b4f ]

Bugzilla ID: 888
Fixes: febc855b358e ("ethdev: forbid closing started device")

Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/memif/rte_eth_memif.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index aded2ac134..2df9a14e63 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -1245,6 +1245,13 @@ memif_dev_start(struct rte_eth_dev *dev)
 	return ret;
 }
 
+static int
+memif_dev_stop(struct rte_eth_dev *dev)
+{
+	memif_disconnect(dev);
+	return 0;
+}
+
 static int
 memif_dev_close(struct rte_eth_dev *dev)
 {
@@ -1253,7 +1260,6 @@ memif_dev_close(struct rte_eth_dev *dev)
 
 	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
 		memif_msg_enq_disconnect(pmd->cc, "Device closed", 0);
-		memif_disconnect(dev);
 
 		for (i = 0; i < dev->data->nb_rx_queues; i++)
 			(*dev->dev_ops->rx_queue_release)(dev->data->rx_queues[i]);
@@ -1261,8 +1267,6 @@ memif_dev_close(struct rte_eth_dev *dev)
 			(*dev->dev_ops->tx_queue_release)(dev->data->tx_queues[i]);
 
 		memif_socket_remove_device(dev);
-	} else {
-		memif_disconnect(dev);
 	}
 
 	rte_free(dev->process_private);
@@ -1464,6 +1468,7 @@ memif_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t qid __rte_unused)
 
 static const struct eth_dev_ops ops = {
 	.dev_start = memif_dev_start,
+	.dev_stop = memif_dev_stop,
 	.dev_close = memif_dev_close,
 	.dev_infos_get = memif_dev_info,
 	.dev_configure = memif_dev_configure,
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.736654781 +0800
+++ 0069-net-memif-allow-stopping-and-closing-device.patch	2021-11-28 22:41:03.426872382 +0800
@@ -1 +1 @@
-From 858a152ab5e99852390b3157c2a4ecbb23022b4f Mon Sep 17 00:00:00 2001
+From e6b5cb9fdd6d54f4df61f32fca31ab137f61fd4f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 858a152ab5e99852390b3157c2a4ecbb23022b4f ]
@@ -8 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index 43d7378329..e3d523af57 100644
+index aded2ac134..2df9a14e63 100644
@@ -20 +22 @@
-@@ -1260,6 +1260,13 @@ memif_dev_start(struct rte_eth_dev *dev)
+@@ -1245,6 +1245,13 @@ memif_dev_start(struct rte_eth_dev *dev)
@@ -34 +36 @@
-@@ -1268,7 +1275,6 @@ memif_dev_close(struct rte_eth_dev *dev)
+@@ -1253,7 +1260,6 @@ memif_dev_close(struct rte_eth_dev *dev)
@@ -41,3 +43,3 @@
- 			(*dev->dev_ops->rx_queue_release)(dev, i);
-@@ -1276,8 +1282,6 @@ memif_dev_close(struct rte_eth_dev *dev)
- 			(*dev->dev_ops->tx_queue_release)(dev, i);
+ 			(*dev->dev_ops->rx_queue_release)(dev->data->rx_queues[i]);
+@@ -1261,8 +1267,6 @@ memif_dev_close(struct rte_eth_dev *dev)
+ 			(*dev->dev_ops->tx_queue_release)(dev->data->tx_queues[i]);
@@ -51 +53 @@
-@@ -1515,6 +1519,7 @@ memif_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t qid __rte_unused)
+@@ -1464,6 +1468,7 @@ memif_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t qid __rte_unused)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'doc: fix memif driver acronyms' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (68 preceding siblings ...)
  2021-11-28 14:54   ` patch 'net/memif: allow stopping and closing device' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'app/testpmd: fix hexadecimal parser with odd length' " Xueming Li
                     ` (8 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9de850690d8a0bccc836d2a2e023009aa832090e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9de850690d8a0bccc836d2a2e023009aa832090e Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerinj@marvell.com>
Date: Fri, 19 Nov 2021 10:29:26 +0530
Subject: [PATCH] doc: fix memif driver acronyms
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 3f7b90eb80b1c6fc63c70f77e27ddbd2599e592e ]

The commit d250589d5702 ("net/memif: replace master/slave arguments")
replaced master/slave terms to server/client terms.
Fix the documentation to reflect the same.

Fixes: d250589d5702 ("net/memif: replace master/slave arguments")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 doc/guides/nics/memif.rst | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/guides/nics/memif.rst b/doc/guides/nics/memif.rst
index d783f2d4a4..aca843640b 100644
--- a/doc/guides/nics/memif.rst
+++ b/doc/guides/nics/memif.rst
@@ -107,13 +107,13 @@ region n (no-zero-copy):
 +-----------------------+-------------------------------------------------------------------------+
 | Rings                 | Buffers                                                                 |
 +-----------+-----------+-----------------+---+---------------------------------------------------+
-| S2M rings | M2S rings | packet buffer 0 | . | pb ((1 << pmd->run.log2_ring_size)*(s2m + m2s))-1 |
+| C2S rings | S2C rings | packet buffer 0 | . | pb ((1 << pmd->run.log2_ring_size)*(c2s + s2c))-1 |
 +-----------+-----------+-----------------+---+---------------------------------------------------+
 
-S2M OR M2S Rings:
+C2S OR S2C Rings:
 
 +--------+--------+-----------------------+
-| ring 0 | ring 1 | ring num_s2m_rings - 1|
+| ring 0 | ring 1 | ring num_c2s_rings - 1|
 +--------+--------+-----------------------+
 
 ring 0:
@@ -123,8 +123,8 @@ ring 0:
 +-------------+---------------------------------------+
 
 Descriptors are assigned packet buffers in order of rings creation. If we have one ring
-in each direction and ring size is 1024, then first 1024 buffers will belong to S2M ring and
-last 1024 will belong to M2S ring. In case of zero-copy, buffers are dequeued and
+in each direction and ring size is 1024, then first 1024 buffers will belong to C2S ring and
+last 1024 will belong to S2C ring. In case of zero-copy, buffers are dequeued and
 enqueued as needed.
 
 **Descriptor format**
@@ -193,7 +193,7 @@ region 0:
 +-----------------------+
 | Rings                 |
 +-----------+-----------+
-| S2M rings | M2S rings |
+| C2S rings | S2C rings |
 +-----------+-----------+
 
 region n:
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.776720426 +0800
+++ 0070-doc-fix-memif-driver-acronyms.patch	2021-11-28 22:41:03.426872382 +0800
@@ -1 +1 @@
-From 3f7b90eb80b1c6fc63c70f77e27ddbd2599e592e Mon Sep 17 00:00:00 2001
+From 9de850690d8a0bccc836d2a2e023009aa832090e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3f7b90eb80b1c6fc63c70f77e27ddbd2599e592e ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'app/testpmd: fix hexadecimal parser with odd length' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (69 preceding siblings ...)
  2021-11-28 14:54   ` patch 'doc: fix memif driver acronyms' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'net/mlx5: fix GRE flow item matching' " Xueming Li
                     ` (7 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a6f7eb3e2079ba5141b8b06f1da2946a0577eecf

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a6f7eb3e2079ba5141b8b06f1da2946a0577eecf Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Wed, 24 Nov 2021 14:33:54 +0200
Subject: [PATCH] app/testpmd: fix hexadecimal parser with odd length
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit ea1da434c0a876b1913b9f0758abd1b6e70a19fd ]

Current hex string parser assumes input has even characters number.
The parser fails input string with odd length.

The patch parses hex strings with even and odd length.
Parse result of an input with odd length will match result of
even length input, that has `0` as MSB, following by the original
sequence.
For example:
"0x1" results in *dst={0x01, 0x00}, *size=1
"0xabc" results in *dst={0x0a, 0xbc, 0x00}, *size=2

Fixes: 169a9fed1f4c ("app/testpmd: fix hex string parser support for flow API")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 app/test-pmd/cmdline_flow.c | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index bbf62be5ae..6ff6391146 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -6411,9 +6411,8 @@ error:
 static int
 parse_hex_string(const char *src, uint8_t *dst, uint32_t *size)
 {
-	char *c = NULL;
-	uint32_t i, len;
-	char tmp[3];
+	uint32_t left = *size;
+	const uint8_t *head = dst;
 
 	/* Check input parameters */
 	if ((src == NULL) ||
@@ -6423,19 +6422,23 @@ parse_hex_string(const char *src, uint8_t *dst, uint32_t *size)
 		return -1;
 
 	/* Convert chars to bytes */
-	for (i = 0, len = 0; i < *size; i += 2) {
-		snprintf(tmp, 3, "%s", src + i);
-		dst[len++] = strtoul(tmp, &c, 16);
-		if (*c != 0) {
-			len--;
-			dst[len] = 0;
-			*size = len;
+	while (left) {
+		char tmp[3], *end = tmp;
+		uint32_t read_lim = left & 1 ? 1 : 2;
+
+		snprintf(tmp, read_lim + 1, "%s", src);
+		*dst = strtoul(tmp, &end, 16);
+		if (*end) {
+			*dst = 0;
+			*size = (uint32_t)(dst - head);
 			return -1;
 		}
+		left -= read_lim;
+		src += read_lim;
+		dst++;
 	}
-	dst[len] = 0;
-	*size = len;
-
+	*dst = 0;
+	*size = (uint32_t)(dst - head);
 	return 0;
 }
 
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.816987317 +0800
+++ 0071-app-testpmd-fix-hexadecimal-parser-with-odd-length.patch	2021-11-28 22:41:03.430205655 +0800
@@ -1 +1 @@
-From ea1da434c0a876b1913b9f0758abd1b6e70a19fd Mon Sep 17 00:00:00 2001
+From a6f7eb3e2079ba5141b8b06f1da2946a0577eecf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ea1da434c0a876b1913b9f0758abd1b6e70a19fd ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 1b00ae507b..bbe3dc0115 100644
+index bbf62be5ae..6ff6391146 100644
@@ -30 +32 @@
-@@ -7702,9 +7702,8 @@ error:
+@@ -6411,9 +6411,8 @@ error:
@@ -42 +44 @@
-@@ -7714,19 +7713,23 @@ parse_hex_string(const char *src, uint8_t *dst, uint32_t *size)
+@@ -6423,19 +6422,23 @@ parse_hex_string(const char *src, uint8_t *dst, uint32_t *size)

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx5: fix GRE flow item matching' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (70 preceding siblings ...)
  2021-11-28 14:54   ` patch 'app/testpmd: fix hexadecimal parser with odd length' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'net/mlx5: fix GENEVE and VXLAN-GPE " Xueming Li
                     ` (6 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7d4d3d56e969f262d11775afa3a303d4dadde445

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7d4d3d56e969f262d11775afa3a303d4dadde445 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Wed, 24 Nov 2021 06:32:34 +0200
Subject: [PATCH] net/mlx5: fix GRE flow item matching
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 9e61533df27fc4d76080da20a7e8f9c9e7e1b90f ]

GRE protocol type is implicitly set in the matching translation in case
an application doesn't specify any type explicitly in a flow rule.
It is extracted from the inner header type, but this type may be absent.
In this case, GRE item matching is broken. Check if we have the inner
header type before setting it to allow matching on all GRE packets.

Fixes: be26e81bfc1c ("net/mlx5: fix GRE protocol type translation")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 8804b9816d..582cddf62b 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7062,8 +7062,9 @@ flow_dv_translate_item_gre(void *matcher, void *key,
 	protocol_v = rte_be_to_cpu_16(gre_v->protocol);
 	if (!protocol_m) {
 		/* Force next protocol to prevent matchers duplication */
-		protocol_m = 0xFFFF;
 		protocol_v = mlx5_translate_tunnel_etypes(pattern_flags);
+		if (protocol_v)
+			protocol_m = 0xFFFF;
 	}
 	MLX5_SET(fte_match_set_misc, misc_m, gre_protocol, protocol_m);
 	MLX5_SET(fte_match_set_misc, misc_v, gre_protocol,
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.861847095 +0800
+++ 0072-net-mlx5-fix-GRE-flow-item-matching.patch	2021-11-28 22:41:03.440205474 +0800
@@ -1 +1 @@
-From 9e61533df27fc4d76080da20a7e8f9c9e7e1b90f Mon Sep 17 00:00:00 2001
+From 7d4d3d56e969f262d11775afa3a303d4dadde445 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9e61533df27fc4d76080da20a7e8f9c9e7e1b90f ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 9979d16f74..1a9c040f3c 100644
+index 8804b9816d..582cddf62b 100644
@@ -25 +27 @@
-@@ -8823,8 +8823,9 @@ flow_dv_translate_item_gre(void *matcher, void *key,
+@@ -7062,8 +7062,9 @@ flow_dv_translate_item_gre(void *matcher, void *key,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx5: fix GENEVE and VXLAN-GPE flow item matching' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (71 preceding siblings ...)
  2021-11-28 14:54   ` patch 'net/mlx5: fix GRE flow item matching' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'remove repeated 'the' in the code' " Xueming Li
                     ` (5 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4bcae288d566dc05afbec4f3525d981fa82842fe

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4bcae288d566dc05afbec4f3525d981fa82842fe Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Wed, 24 Nov 2021 15:26:09 +0200
Subject: [PATCH] net/mlx5: fix GENEVE and VXLAN-GPE flow item matching
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 94421842de9a821778b95b928945ed8ea382302d ]

GENEVE and VXLAN-GPE item matching is done similarly to GRE matching.
Users can skip the specification of the protocol type and expect that
this type is deducted from the inner header type automatically.
But the inner header type may not be specified in order to match all the
protocol types. In this case, PMD should not specify the protocol type.
Check if we have the inner header type before setting the protocol type.

Fixes: 690391dd0e8b ("net/mlx5: fix GENEVE protocol type translation")
Fixes: 861fa3796f75 ("net/mlx5: fix VXLAN-GPE next protocol translation")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 582cddf62b..c9711d6e77 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7245,7 +7245,6 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
 	m_protocol = vxlan_m->protocol;
 	v_protocol = vxlan_v->protocol;
 	if (!m_protocol) {
-		m_protocol = 0xff;
 		/* Force next protocol to ensure next headers parsing. */
 		if (pattern_flags & MLX5_FLOW_LAYER_INNER_L2)
 			v_protocol = RTE_VXLAN_GPE_TYPE_ETH;
@@ -7253,6 +7252,8 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
 			v_protocol = RTE_VXLAN_GPE_TYPE_IPV4;
 		else if (pattern_flags & MLX5_FLOW_LAYER_INNER_L3_IPV6)
 			v_protocol = RTE_VXLAN_GPE_TYPE_IPV6;
+		if (v_protocol)
+			m_protocol = 0xFF;
 	}
 	MLX5_SET(fte_match_set_misc3, misc_m,
 		 outer_vxlan_gpe_next_protocol, m_protocol);
@@ -7323,8 +7324,9 @@ flow_dv_translate_item_geneve(void *matcher, void *key,
 	protocol_v = rte_be_to_cpu_16(geneve_v->protocol);
 	if (!protocol_m) {
 		/* Force next protocol to prevent matchers duplication */
-		protocol_m = 0xFFFF;
 		protocol_v = mlx5_translate_tunnel_etypes(pattern_flags);
+		if (protocol_v)
+			protocol_m = 0xFFFF;
 	}
 	MLX5_SET(fte_match_set_misc, misc_m, geneve_protocol_type, protocol_m);
 	MLX5_SET(fte_match_set_misc, misc_v, geneve_protocol_type,
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.913861702 +0800
+++ 0073-net-mlx5-fix-GENEVE-and-VXLAN-GPE-flow-item-matching.patch	2021-11-28 22:41:03.450205293 +0800
@@ -1 +1 @@
-From 94421842de9a821778b95b928945ed8ea382302d Mon Sep 17 00:00:00 2001
+From 4bcae288d566dc05afbec4f3525d981fa82842fe Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 94421842de9a821778b95b928945ed8ea382302d ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 1a9c040f3c..3da122cbb9 100644
+index 582cddf62b..c9711d6e77 100644
@@ -27 +29 @@
-@@ -9057,7 +9057,6 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
+@@ -7245,7 +7245,6 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
@@ -35 +37 @@
-@@ -9065,6 +9064,8 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
+@@ -7253,6 +7252,8 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
@@ -44 +46 @@
-@@ -9135,8 +9136,9 @@ flow_dv_translate_item_geneve(void *matcher, void *key,
+@@ -7323,8 +7324,9 @@ flow_dv_translate_item_geneve(void *matcher, void *key,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'remove repeated 'the' in the code' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (72 preceding siblings ...)
  2021-11-28 14:54   ` patch 'net/mlx5: fix GENEVE and VXLAN-GPE " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'fix PMD wording' " Xueming Li
                     ` (4 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Sean Morrissey
  Cc: Luca Boccassi, Conor Fogarty, John McNamara, Conor Walsh,
	Somnath Kotur, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/05d7a6b2ec668624da604fe0ae0f1415d2f44136

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 05d7a6b2ec668624da604fe0ae0f1415d2f44136 Mon Sep 17 00:00:00 2001
From: Sean Morrissey <sean.morrissey@intel.com>
Date: Mon, 22 Nov 2021 10:50:45 +0000
Subject: [PATCH] remove repeated 'the' in the code
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit b53d106d34b5c638f5a2cbdfee0da5bd42d4383f ]

Remove the use of double "the" as it does not make sense.

Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Signed-off-by: Conor Fogarty <conor.fogarty@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test/test_barrier.c                      | 2 +-
 drivers/bus/vmbus/rte_bus_vmbus.h            | 2 +-
 drivers/common/cpt/cpt_hw_types.h            | 2 +-
 drivers/net/bnx2x/elink.c                    | 2 +-
 drivers/net/bnxt/hsi_struct_def_dpdk.h       | 2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c       | 2 +-
 drivers/net/hinic/base/hinic_pmd_hwdev.c     | 2 +-
 drivers/net/i40e/base/i40e_common.c          | 2 +-
 drivers/net/ice/ice_ethdev.h                 | 2 +-
 drivers/net/ionic/ionic_if.h                 | 2 +-
 drivers/net/mlx5/mlx5_trigger.c              | 2 +-
 lib/librte_bbdev/rte_bbdev_pmd.h             | 2 +-
 lib/librte_compressdev/rte_compressdev_pmd.h | 2 +-
 lib/librte_cryptodev/rte_cryptodev_pmd.h     | 2 +-
 lib/librte_eventdev/rte_eventdev_pmd.h       | 2 +-
 lib/librte_ip_frag/rte_ipv6_fragmentation.c  | 2 +-
 lib/librte_rawdev/rte_rawdev_pmd.h           | 2 +-
 17 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/app/test/test_barrier.c b/app/test/test_barrier.c
index 8fa93c0032..3951370607 100644
--- a/app/test/test_barrier.c
+++ b/app/test/test_barrier.c
@@ -6,7 +6,7 @@
   * This is a simple functional test for rte_smp_mb() implementation.
   * I.E. make sure that LOAD and STORE operations that precede the
   * rte_smp_mb() call are globally visible across the lcores
-  * before the the LOAD and STORE operations that follows it.
+  * before the LOAD and STORE operations that follows it.
   * The test uses simple implementation of Peterson's lock algorithm
   * (https://en.wikipedia.org/wiki/Peterson%27s_algorithm)
   * for two execution units to make sure that rte_smp_mb() prevents
diff --git a/drivers/bus/vmbus/rte_bus_vmbus.h b/drivers/bus/vmbus/rte_bus_vmbus.h
index 4cf73ce815..81b17817f1 100644
--- a/drivers/bus/vmbus/rte_bus_vmbus.h
+++ b/drivers/bus/vmbus/rte_bus_vmbus.h
@@ -292,7 +292,7 @@ struct iova_list {
  * @param data
  *	Pointer to the buffer additional data to send
  * @param dlen
- *	 Maximum size of what the the buffer will hold
+ *	 Maximum size of what the buffer will hold
  * @param xact
  *	Identifier of the request
  * @param flags
diff --git a/drivers/common/cpt/cpt_hw_types.h b/drivers/common/cpt/cpt_hw_types.h
index a1f969eb14..522844c351 100644
--- a/drivers/common/cpt/cpt_hw_types.h
+++ b/drivers/common/cpt/cpt_hw_types.h
@@ -466,7 +466,7 @@ typedef union {
 		uint64_t dbell_cnt             : 20;
 		/** [ 19:  0](R/W/H) Number of instruction queue 64-bit words
 		 * to add to the CPT instruction doorbell count. Readback value
-		 * is the the current number of pending doorbell requests.
+		 * is the current number of pending doorbell requests.
 		 *
 		 * If counter overflows CPT()_VQ()_MISC_INT[DBELL_DOVF] is set.
 		 *
diff --git a/drivers/net/bnx2x/elink.c b/drivers/net/bnx2x/elink.c
index b65126d718..2093d8f373 100644
--- a/drivers/net/bnx2x/elink.c
+++ b/drivers/net/bnx2x/elink.c
@@ -15013,7 +15013,7 @@ static void elink_check_kr2_wa(struct elink_params *params,
 
 	/* Once KR2 was disabled, wait 5 seconds before checking KR2 recovery
 	 * Since some switches tend to reinit the AN process and clear the
-	 * the advertised BP/NP after ~2 seconds causing the KR2 to be disabled
+	 * advertised BP/NP after ~2 seconds causing the KR2 to be disabled
 	 * and recovered many times
 	 */
 	if (vars->check_kr2_recovery_cnt > 0) {
diff --git a/drivers/net/bnxt/hsi_struct_def_dpdk.h b/drivers/net/bnxt/hsi_struct_def_dpdk.h
index 4b8b13e3bb..81fc68d0c9 100644
--- a/drivers/net/bnxt/hsi_struct_def_dpdk.h
+++ b/drivers/net/bnxt/hsi_struct_def_dpdk.h
@@ -13591,7 +13591,7 @@ struct hwrm_func_resource_qcaps_output {
 	#define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_MINIMAL \
 		UINT32_C(0x1)
 	/*
-	 * The PF driver should not reserve any resources for each VF until the
+	 * The PF driver should not reserve any resources for each VF until
 	 * the VF interface is brought up.
 	 */
 	#define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_MINIMAL_STATIC \
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index fb430be549..44b2e684d2 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3498,7 +3498,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 
 	/*
 	 * If RSS is enabled, fill table with default values and
-	 * set key to the the value specified in port RSS configuration.
+	 * set key to the value specified in port RSS configuration.
 	 * Fall back to default RSS key if the key is not specified
 	 */
 	if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS) {
diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c
index 41c99bdbf8..4c2242ddaf 100644
--- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
+++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
@@ -826,7 +826,7 @@ static int set_vf_dma_attr_entry(struct hinic_hwdev *hwdev, u8 entry_idx,
 }
 
 /**
- * dma_attr_table_init - initialize the the default dma attributes
+ * dma_attr_table_init - initialize the default dma attributes
  * @hwdev: the pointer to the private hardware device object
  */
 static int dma_attr_table_init(struct hinic_hwdev *hwdev)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 6376e685e4..f11d25d0d8 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -5862,7 +5862,7 @@ enum i40e_status_code i40e_aq_add_cloud_filters(struct i40e_hw *hw,
  * @filter_count: number of filters contained in the buffer
  *
  * Set the cloud filters for a given VSI.  The contents of the
- * i40e_aqc_cloud_filters_element_bb are filled in by the caller of the
+ * i40e_aqc_cloud_filters_element_bb are filled in by the caller of
  * the function.
  *
  **/
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index cba2e46eff..b3e518fcbc 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -222,7 +222,7 @@ struct ice_vsi {
 	 * needs to add, HW needs to know the layout that VSIs are organized.
 	 * Besides that, VSI isan element and can't switch packets, which needs
 	 * to add new component VEB to perform switching. So, a new VSI needs
-	 * to specify the the uplink VSI (Parent VSI) before created. The
+	 * to specify the uplink VSI (Parent VSI) before created. The
 	 * uplink VSI will check whether it had a VEB to switch packets. If no,
 	 * it will try to create one. Then, uplink VSI will move the new VSI
 	 * into its' sib_vsi_list to manage all the downlink VSI.
diff --git a/drivers/net/ionic/ionic_if.h b/drivers/net/ionic/ionic_if.h
index f83c8711b1..673cf19f27 100644
--- a/drivers/net/ionic/ionic_if.h
+++ b/drivers/net/ionic/ionic_if.h
@@ -604,7 +604,7 @@ enum ionic_txq_desc_opcode {
  *
  *                      Offload 16-bit checksum computation to hardware.
  *                      If @csum_l3 is set then the packet's L3 checksum is
- *                      updated. Similarly, if @csum_l4 is set the the L4
+ *                      updated. Similarly, if @csum_l4 is set the L4
  *                      checksum is updated. If @encap is set then encap header
  *                      checksums are also updated.
  *
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 98055efd50..92eaef87d1 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -812,7 +812,7 @@ error:
 
 /*
  * Unbind the hairpin port pair, HW configuration of both devices will be clear
- * and status will be reset for all the queues used between the them.
+ * and status will be reset for all the queues used between them.
  * This function only supports to unbind the Tx from one Rx.
  *
  * @param dev
diff --git a/lib/librte_bbdev/rte_bbdev_pmd.h b/lib/librte_bbdev/rte_bbdev_pmd.h
index 237e3361d7..b8a5cb4015 100644
--- a/lib/librte_bbdev/rte_bbdev_pmd.h
+++ b/lib/librte_bbdev/rte_bbdev_pmd.h
@@ -76,7 +76,7 @@ struct rte_bbdev *
 rte_bbdev_get_named_dev(const char *name);
 
 /**
- * Definitions of all functions exported by a driver through the the generic
+ * Definitions of all functions exported by a driver through the generic
  * structure of type *rte_bbdev_ops* supplied in the *rte_bbdev* structure
  * associated with a device.
  */
diff --git a/lib/librte_compressdev/rte_compressdev_pmd.h b/lib/librte_compressdev/rte_compressdev_pmd.h
index 16b6bc6b35..b2a0e25001 100644
--- a/lib/librte_compressdev/rte_compressdev_pmd.h
+++ b/lib/librte_compressdev/rte_compressdev_pmd.h
@@ -64,7 +64,7 @@ struct rte_compressdev *
 rte_compressdev_pmd_get_named_dev(const char *name);
 
 /**
- * Definitions of all functions exported by a driver through the
+ * Definitions of all functions exported by a driver through
  * the generic structure of type *comp_dev_ops* supplied in the
  * *rte_compressdev* structure associated with a device.
  */
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 1274436870..96bea17c92 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -113,7 +113,7 @@ extern struct rte_cryptodev *rte_cryptodevs;
 
 /**
  * Definitions of all functions exported by a driver through the
- * the generic structure of type *crypto_dev_ops* supplied in the
+ * generic structure of type *crypto_dev_ops* supplied in the
  * *rte_cryptodev* structure associated with a device.
  */
 
diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
index 7eb9a77393..5e1c836eb7 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd.h
@@ -147,7 +147,7 @@ rte_event_pmd_is_valid_dev(uint8_t dev_id)
 
 /**
  * Definitions of all functions exported by a driver through the
- * the generic structure of type *event_dev_ops* supplied in the
+ * generic structure of type *event_dev_ops* supplied in the
  * *rte_eventdev* structure associated with a device.
  */
 
diff --git a/lib/librte_ip_frag/rte_ipv6_fragmentation.c b/lib/librte_ip_frag/rte_ipv6_fragmentation.c
index 5d67336f2d..a512c90955 100644
--- a/lib/librte_ip_frag/rte_ipv6_fragmentation.c
+++ b/lib/librte_ip_frag/rte_ipv6_fragmentation.c
@@ -90,7 +90,7 @@ rte_ipv6_fragment_packet(struct rte_mbuf *pkt_in,
 
 	/*
 	 * Ensure the IP payload length of all fragments (except the
-	 * the last fragment) are a multiple of 8 bytes per RFC2460.
+	 * last fragment) are a multiple of 8 bytes per RFC2460.
 	 */
 
 	frag_size = mtu_size - sizeof(struct rte_ipv6_hdr) -
diff --git a/lib/librte_rawdev/rte_rawdev_pmd.h b/lib/librte_rawdev/rte_rawdev_pmd.h
index b1bed13ee2..3b7be57d3e 100644
--- a/lib/librte_rawdev/rte_rawdev_pmd.h
+++ b/lib/librte_rawdev/rte_rawdev_pmd.h
@@ -126,7 +126,7 @@ rte_rawdev_pmd_is_valid_dev(uint8_t dev_id)
 }
 
 /**
- * Definitions of all functions exported by a driver through the
+ * Definitions of all functions exported by a driver through
  * the generic structure of type *rawdev_ops* supplied in the
  * *rte_rawdev* structure associated with a device.
  */
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.963952041 +0800
+++ 0074-remove-repeated-the-in-the-code.patch	2021-11-28 22:41:03.500204388 +0800
@@ -1 +1 @@
-From b53d106d34b5c638f5a2cbdfee0da5bd42d4383f Mon Sep 17 00:00:00 2001
+From 05d7a6b2ec668624da604fe0ae0f1415d2f44136 Mon Sep 17 00:00:00 2001
@@ -4,0 +5 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
@@ -6 +7 @@
-Remove the use of double "the" as it does not make sense.
+[ upstream commit b53d106d34b5c638f5a2cbdfee0da5bd42d4383f ]
@@ -8 +9 @@
-Cc: stable@dpdk.org
+Remove the use of double "the" as it does not make sense.
@@ -17,17 +18,17 @@
- app/test/test_barrier.c                  | 2 +-
- drivers/bus/vmbus/rte_bus_vmbus.h        | 2 +-
- drivers/common/cpt/cpt_hw_types.h        | 2 +-
- drivers/net/bnx2x/elink.c                | 2 +-
- drivers/net/bnxt/hsi_struct_def_dpdk.h   | 2 +-
- drivers/net/bonding/rte_eth_bond_pmd.c   | 2 +-
- drivers/net/hinic/base/hinic_pmd_hwdev.c | 2 +-
- drivers/net/i40e/base/i40e_common.c      | 2 +-
- drivers/net/ice/ice_ethdev.h             | 2 +-
- drivers/net/ionic/ionic_if.h             | 2 +-
- drivers/net/mlx5/mlx5_trigger.c          | 2 +-
- lib/bbdev/rte_bbdev_pmd.h                | 2 +-
- lib/compressdev/rte_compressdev_pmd.h    | 2 +-
- lib/cryptodev/cryptodev_pmd.h            | 2 +-
- lib/eventdev/eventdev_pmd.h              | 2 +-
- lib/ip_frag/rte_ipv6_fragmentation.c     | 2 +-
- lib/rawdev/rte_rawdev_pmd.h              | 2 +-
+ app/test/test_barrier.c                      | 2 +-
+ drivers/bus/vmbus/rte_bus_vmbus.h            | 2 +-
+ drivers/common/cpt/cpt_hw_types.h            | 2 +-
+ drivers/net/bnx2x/elink.c                    | 2 +-
+ drivers/net/bnxt/hsi_struct_def_dpdk.h       | 2 +-
+ drivers/net/bonding/rte_eth_bond_pmd.c       | 2 +-
+ drivers/net/hinic/base/hinic_pmd_hwdev.c     | 2 +-
+ drivers/net/i40e/base/i40e_common.c          | 2 +-
+ drivers/net/ice/ice_ethdev.h                 | 2 +-
+ drivers/net/ionic/ionic_if.h                 | 2 +-
+ drivers/net/mlx5/mlx5_trigger.c              | 2 +-
+ lib/librte_bbdev/rte_bbdev_pmd.h             | 2 +-
+ lib/librte_compressdev/rte_compressdev_pmd.h | 2 +-
+ lib/librte_cryptodev/rte_cryptodev_pmd.h     | 2 +-
+ lib/librte_eventdev/rte_eventdev_pmd.h       | 2 +-
+ lib/librte_ip_frag/rte_ipv6_fragmentation.c  | 2 +-
+ lib/librte_rawdev/rte_rawdev_pmd.h           | 2 +-
@@ -37 +38 @@
-index 9641133ccf..6d6d48749c 100644
+index 8fa93c0032..3951370607 100644
@@ -50 +51 @@
-index 466d42d277..a24bad831d 100644
+index 4cf73ce815..81b17817f1 100644
@@ -53 +54 @@
-@@ -291,7 +291,7 @@ struct iova_list {
+@@ -292,7 +292,7 @@ struct iova_list {
@@ -89 +90 @@
-index 0c08171dec..88624f8129 100644
+index 4b8b13e3bb..81fc68d0c9 100644
@@ -92 +93 @@
-@@ -14998,7 +14998,7 @@ struct hwrm_func_resource_qcaps_output {
+@@ -13591,7 +13591,7 @@ struct hwrm_func_resource_qcaps_output {
@@ -102 +103 @@
-index 9bbe1291bc..84f4900ee5 100644
+index fb430be549..44b2e684d2 100644
@@ -113 +114 @@
- 	if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS) {
+ 	if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS) {
@@ -115 +116 @@
-index 80f9eb5c30..5eb022297e 100644
+index 41c99bdbf8..4c2242ddaf 100644
@@ -128 +129 @@
-index baa51e1396..9eee104063 100644
+index 6376e685e4..f11d25d0d8 100644
@@ -131 +132 @@
-@@ -5969,7 +5969,7 @@ enum i40e_status_code i40e_aq_add_cloud_filters(struct i40e_hw *hw,
+@@ -5862,7 +5862,7 @@ enum i40e_status_code i40e_aq_add_cloud_filters(struct i40e_hw *hw,
@@ -141 +142 @@
-index 11f7eb4352..2e3e45f3d7 100644
+index cba2e46eff..b3e518fcbc 100644
@@ -144 +145 @@
-@@ -242,7 +242,7 @@ struct ice_vsi {
+@@ -222,7 +222,7 @@ struct ice_vsi {
@@ -154 +155 @@
-index ba4cc4b724..693b44d764 100644
+index f83c8711b1..673cf19f27 100644
@@ -157,2 +158,2 @@
-@@ -684,7 +684,7 @@ enum ionic_txq_desc_opcode {
-  *                   IONIC_TXQ_DESC_OPCODE_CSUM_HW:
+@@ -604,7 +604,7 @@ enum ionic_txq_desc_opcode {
+  *
@@ -167 +168 @@
-index 68df3f8b4d..74c9c0a4ff 100644
+index 98055efd50..92eaef87d1 100644
@@ -170 +171 @@
-@@ -853,7 +853,7 @@ error:
+@@ -812,7 +812,7 @@ error:
@@ -179,5 +180,5 @@
-diff --git a/lib/bbdev/rte_bbdev_pmd.h b/lib/bbdev/rte_bbdev_pmd.h
-index dd0e35994c..3da7a2bdf5 100644
---- a/lib/bbdev/rte_bbdev_pmd.h
-+++ b/lib/bbdev/rte_bbdev_pmd.h
-@@ -70,7 +70,7 @@ struct rte_bbdev *
+diff --git a/lib/librte_bbdev/rte_bbdev_pmd.h b/lib/librte_bbdev/rte_bbdev_pmd.h
+index 237e3361d7..b8a5cb4015 100644
+--- a/lib/librte_bbdev/rte_bbdev_pmd.h
++++ b/lib/librte_bbdev/rte_bbdev_pmd.h
+@@ -76,7 +76,7 @@ struct rte_bbdev *
@@ -192 +193 @@
-diff --git a/lib/compressdev/rte_compressdev_pmd.h b/lib/compressdev/rte_compressdev_pmd.h
+diff --git a/lib/librte_compressdev/rte_compressdev_pmd.h b/lib/librte_compressdev/rte_compressdev_pmd.h
@@ -194,2 +195,2 @@
---- a/lib/compressdev/rte_compressdev_pmd.h
-+++ b/lib/compressdev/rte_compressdev_pmd.h
+--- a/lib/librte_compressdev/rte_compressdev_pmd.h
++++ b/lib/librte_compressdev/rte_compressdev_pmd.h
@@ -205,5 +206,5 @@
-diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
-index 89bf2af399..1bca24e74e 100644
---- a/lib/cryptodev/cryptodev_pmd.h
-+++ b/lib/cryptodev/cryptodev_pmd.h
-@@ -159,7 +159,7 @@ rte_cryptodev_pmd_get_named_dev(const char *name);
+diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
+index 1274436870..96bea17c92 100644
+--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
++++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
+@@ -113,7 +113,7 @@ extern struct rte_cryptodev *rte_cryptodevs;
@@ -218,5 +219,5 @@
-diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
-index 4787df7ba0..d0b0c00a60 100644
---- a/lib/eventdev/eventdev_pmd.h
-+++ b/lib/eventdev/eventdev_pmd.h
-@@ -237,7 +237,7 @@ rte_event_pmd_is_valid_dev(uint8_t dev_id)
+diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
+index 7eb9a77393..5e1c836eb7 100644
+--- a/lib/librte_eventdev/rte_eventdev_pmd.h
++++ b/lib/librte_eventdev/rte_eventdev_pmd.h
+@@ -147,7 +147,7 @@ rte_event_pmd_is_valid_dev(uint8_t dev_id)
@@ -231,4 +232,4 @@
-diff --git a/lib/ip_frag/rte_ipv6_fragmentation.c b/lib/ip_frag/rte_ipv6_fragmentation.c
-index 88f29c158c..2e692418b5 100644
---- a/lib/ip_frag/rte_ipv6_fragmentation.c
-+++ b/lib/ip_frag/rte_ipv6_fragmentation.c
+diff --git a/lib/librte_ip_frag/rte_ipv6_fragmentation.c b/lib/librte_ip_frag/rte_ipv6_fragmentation.c
+index 5d67336f2d..a512c90955 100644
+--- a/lib/librte_ip_frag/rte_ipv6_fragmentation.c
++++ b/lib/librte_ip_frag/rte_ipv6_fragmentation.c
@@ -244 +245 @@
-diff --git a/lib/rawdev/rte_rawdev_pmd.h b/lib/rawdev/rte_rawdev_pmd.h
+diff --git a/lib/librte_rawdev/rte_rawdev_pmd.h b/lib/librte_rawdev/rte_rawdev_pmd.h
@@ -246,2 +247,2 @@
---- a/lib/rawdev/rte_rawdev_pmd.h
-+++ b/lib/rawdev/rte_rawdev_pmd.h
+--- a/lib/librte_rawdev/rte_rawdev_pmd.h
++++ b/lib/librte_rawdev/rte_rawdev_pmd.h

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'fix PMD wording' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (73 preceding siblings ...)
  2021-11-28 14:54   ` patch 'remove repeated 'the' in the code' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'doc: capitalise PMD' " Xueming Li
                     ` (3 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Sean Morrissey
  Cc: Luca Boccassi, Conor Fogarty, John McNamara, Conor Walsh,
	Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f198b59e4165974716bf386fd87d577421bdd39f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f198b59e4165974716bf386fd87d577421bdd39f Mon Sep 17 00:00:00 2001
From: Sean Morrissey <sean.morrissey@intel.com>
Date: Mon, 22 Nov 2021 10:50:44 +0000
Subject: [PATCH] fix PMD wording
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit f8dbaebbf1c9efcbb2e2354b341ed62175466a57 ]

Removing the use of driver following PMD as its unnecessary.

Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Signed-off-by: Conor Fogarty <conor.fogarty@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/cmdline.c                        |  4 +--
 doc/guides/bbdevs/turbo_sw.rst                |  2 +-
 doc/guides/cryptodevs/virtio.rst              |  2 +-
 doc/guides/linux_gsg/build_sample_apps.rst    |  2 +-
 doc/guides/nics/af_packet.rst                 |  2 +-
 doc/guides/nics/af_xdp.rst                    |  2 +-
 doc/guides/nics/avp.rst                       |  4 +--
 doc/guides/nics/fm10k.rst                     |  4 +--
 doc/guides/nics/intel_vf.rst                  |  2 +-
 doc/guides/nics/netvsc.rst                    |  2 +-
 doc/guides/nics/nfp.rst                       |  2 +-
 doc/guides/nics/thunderx.rst                  |  2 +-
 doc/guides/nics/virtio.rst                    |  4 +--
 .../prog_guide/writing_efficient_code.rst     |  4 +--
 doc/guides/rel_notes/known_issues.rst         |  2 +-
 doc/guides/rel_notes/release_16_04.rst        |  2 +-
 doc/guides/rel_notes/release_19_05.rst        |  6 ++--
 doc/guides/rel_notes/release_19_11.rst        |  2 +-
 doc/guides/rel_notes/release_20_11.rst        |  4 +--
 doc/guides/rel_notes/release_2_2.rst          |  4 +--
 doc/guides/sample_app_ug/bbdev_app.rst        |  2 +-
 .../sample_app_ug/l3_forward_access_ctrl.rst  |  2 +-
 doc/guides/tools/testeventdev.rst             |  2 +-
 drivers/common/sfc_efx/efsys.h                |  2 +-
 drivers/compress/qat/qat_comp_pmd.h           |  2 +-
 drivers/crypto/qat/qat_asym_pmd.h             |  2 +-
 drivers/crypto/qat/qat_sym_pmd.h              |  2 +-
 drivers/net/fm10k/fm10k_ethdev.c              |  2 +-
 drivers/net/hinic/base/hinic_pmd_cmdq.h       |  2 +-
 drivers/net/hns3/hns3_ethdev.c                |  6 ++--
 drivers/net/hns3/hns3_ethdev.h                |  8 +++---
 drivers/net/hns3/hns3_ethdev_vf.c             | 28 +++++++++----------
 drivers/net/hns3/hns3_rss.c                   |  4 +--
 drivers/net/hns3/hns3_rxtx.c                  |  8 +++---
 drivers/net/hns3/hns3_rxtx.h                  |  4 +--
 drivers/net/i40e/i40e_ethdev.c                |  2 +-
 drivers/net/nfp/nfp_net.c                     |  2 +-
 drivers/net/nfp/nfp_net_pmd.h                 |  2 +-
 drivers/raw/ifpga/base/README                 |  2 +-
 lib/librte_bbdev/rte_bbdev.h                  | 12 ++++----
 lib/librte_compressdev/rte_compressdev_pmd.h  |  2 +-
 lib/librte_cryptodev/rte_cryptodev_pmd.h      |  2 +-
 lib/librte_eal/include/rte_dev.h              |  2 +-
 lib/librte_ethdev/rte_ethdev.h                | 18 ++++++------
 44 files changed, 89 insertions(+), 89 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 22283bc355..ee9335e3d3 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2607,7 +2607,7 @@ cmd_config_rxtx_queue_parsed(void *parsed_result,
 		ret = rte_eth_dev_tx_queue_stop(res->portid, res->qid);
 
 	if (ret == -ENOTSUP)
-		printf("Function not supported in PMD driver\n");
+		fprintf(stderr, "Function not supported in PMD\n");
 }
 
 cmdline_parse_token_string_t cmd_config_rxtx_queue_port =
@@ -14035,7 +14035,7 @@ no_print_return:
 		free(proto);
 #endif
 	if (ret == -ENOTSUP)
-		printf("Function not supported in PMD driver\n");
+		fprintf(stderr, "Function not supported in PMD\n");
 	close_file(pkg);
 }
 
diff --git a/doc/guides/bbdevs/turbo_sw.rst b/doc/guides/bbdevs/turbo_sw.rst
index 43c5129fd7..1e23e37027 100644
--- a/doc/guides/bbdevs/turbo_sw.rst
+++ b/doc/guides/bbdevs/turbo_sw.rst
@@ -149,7 +149,7 @@ Example:
 
 * For AVX512 machines with SDK libraries installed then both 4G and 5G can be enabled for full real time FEC capability.
   For AVX2 machines it is possible to only enable the 4G libraries and the PMD capabilities will be limited to 4G FEC.
-  If no library is present then the PMD driver will still build but its capabilities will be limited accordingly.
+  If no library is present then the PMD will still build but its capabilities will be limited accordingly.
 
 
 To use the PMD in an application, user must:
diff --git a/doc/guides/cryptodevs/virtio.rst b/doc/guides/cryptodevs/virtio.rst
index 8b96446ff2..ce4d43519a 100644
--- a/doc/guides/cryptodevs/virtio.rst
+++ b/doc/guides/cryptodevs/virtio.rst
@@ -73,7 +73,7 @@ number of the virtio-crypto device:
     echo -n 0000:00:04.0 > /sys/bus/pci/drivers/virtio-pci/unbind
     echo "1af4 1054" > /sys/bus/pci/drivers/uio_pci_generic/new_id
 
-Finally the front-end virtio crypto PMD driver can be installed.
+Finally the front-end virtio crypto PMD can be installed.
 
 Tests
 -----
diff --git a/doc/guides/linux_gsg/build_sample_apps.rst b/doc/guides/linux_gsg/build_sample_apps.rst
index 396fcf08d7..7a12795c70 100644
--- a/doc/guides/linux_gsg/build_sample_apps.rst
+++ b/doc/guides/linux_gsg/build_sample_apps.rst
@@ -66,7 +66,7 @@ The EAL options are as follows:
 
 * ``-d``:
   Add a driver or driver directory to be loaded.
-  The application should use this option to load the pmd drivers
+  The application should use this option to load the PMDs
   that are built as shared libraries.
 
 * ``-m MB``:
diff --git a/doc/guides/nics/af_packet.rst b/doc/guides/nics/af_packet.rst
index efd6f1ca73..cf098fcaa4 100644
--- a/doc/guides/nics/af_packet.rst
+++ b/doc/guides/nics/af_packet.rst
@@ -5,7 +5,7 @@ AF_PACKET Poll Mode Driver
 ==========================
 
 The AF_PACKET socket in Linux allows an application to receive and send raw
-packets. This Linux-specific PMD driver binds to an AF_PACKET socket and allows
+packets. This Linux-specific PMD binds to an AF_PACKET socket and allows
 a DPDK application to send and receive raw packets through the Kernel.
 
 In order to improve Rx and Tx performance this implementation makes use of
diff --git a/doc/guides/nics/af_xdp.rst b/doc/guides/nics/af_xdp.rst
index 5ed24374f8..7b2989ab84 100644
--- a/doc/guides/nics/af_xdp.rst
+++ b/doc/guides/nics/af_xdp.rst
@@ -12,7 +12,7 @@ For the full details behind AF_XDP socket, you can refer to
 `AF_XDP documentation in the Kernel
 <https://www.kernel.org/doc/Documentation/networking/af_xdp.rst>`_.
 
-This Linux-specific PMD driver creates the AF_XDP socket and binds it to a
+This Linux-specific PMD creates the AF_XDP socket and binds it to a
 specific netdev queue, it allows a DPDK application to send and receive raw
 packets through the socket which would bypass the kernel network stack.
 Current implementation only supports single queue, multi-queues feature will
diff --git a/doc/guides/nics/avp.rst b/doc/guides/nics/avp.rst
index 1a194fc23c..a749f2a0f6 100644
--- a/doc/guides/nics/avp.rst
+++ b/doc/guides/nics/avp.rst
@@ -35,7 +35,7 @@ to another with minimal packet loss.
 Features and Limitations of the AVP PMD
 ---------------------------------------
 
-The AVP PMD driver provides the following functionality.
+The AVP PMD provides the following functionality.
 
 *   Receive and transmit of both simple and chained mbuf packets,
 
@@ -74,7 +74,7 @@ Launching a VM with an AVP type network attachment
 The following example will launch a VM with three network attachments.  The
 first attachment will have a default vif-model of "virtio".  The next two
 network attachments will have a vif-model of "avp" and may be used with a DPDK
-application which is built to include the AVP PMD driver.
+application which is built to include the AVP PMD.
 
 .. code-block:: console
 
diff --git a/doc/guides/nics/fm10k.rst b/doc/guides/nics/fm10k.rst
index 7b8ef0e782..9057fd8c9e 100644
--- a/doc/guides/nics/fm10k.rst
+++ b/doc/guides/nics/fm10k.rst
@@ -114,9 +114,9 @@ Switch manager
 ~~~~~~~~~~~~~~
 
 The Intel FM10000 family of NICs integrate a hardware switch and multiple host
-interfaces. The FM10000 PMD driver only manages host interfaces. For the
+interfaces. The FM10000 PMD only manages host interfaces. For the
 switch component another switch driver has to be loaded prior to the
-FM10000 PMD driver. The switch driver can be acquired from Intel support.
+FM10000 PMD. The switch driver can be acquired from Intel support.
 Only Testpoint is validated with DPDK, the latest version that has been
 validated with DPDK is 4.1.6.
 
diff --git a/doc/guides/nics/intel_vf.rst b/doc/guides/nics/intel_vf.rst
index 529ff4a955..079ff7e4d7 100644
--- a/doc/guides/nics/intel_vf.rst
+++ b/doc/guides/nics/intel_vf.rst
@@ -570,7 +570,7 @@ Fast Host-based Packet Processing
 
 Software Defined Network (SDN) trends are demanding fast host-based packet handling.
 In a virtualization environment,
-the DPDK VF PMD driver performs the same throughput result as a non-VT native environment.
+the DPDK VF PMD performs the same throughput result as a non-VT native environment.
 
 With such host instance fast packet processing, lots of services such as filtering, QoS,
 DPI can be offloaded on the host fast path.
diff --git a/doc/guides/nics/netvsc.rst b/doc/guides/nics/netvsc.rst
index c0e218c743..77efe1dc91 100644
--- a/doc/guides/nics/netvsc.rst
+++ b/doc/guides/nics/netvsc.rst
@@ -14,7 +14,7 @@ checksum and segmentation offloads.
 Features and Limitations of Hyper-V PMD
 ---------------------------------------
 
-In this release, the hyper PMD driver provides the basic functionality of packet reception and transmission.
+In this release, the hyper PMD provides the basic functionality of packet reception and transmission.
 
 *   It supports merge-able buffers per packet when receiving packets and scattered buffer per packet
     when transmitting packets. The packet size supported is from 64 to 65536.
diff --git a/doc/guides/nics/nfp.rst b/doc/guides/nics/nfp.rst
index bf8be723b0..30cdc69202 100644
--- a/doc/guides/nics/nfp.rst
+++ b/doc/guides/nics/nfp.rst
@@ -14,7 +14,7 @@ This document explains how to use DPDK with the Netronome Poll Mode
 Driver (PMD) supporting Netronome's Network Flow Processor 6xxx
 (NFP-6xxx) and Netronome's Flow Processor 4xxx (NFP-4xxx).
 
-NFP is a SRIOV capable device and the PMD driver supports the physical
+NFP is a SRIOV capable device and the PMD supports the physical
 function (PF) and the virtual functions (VFs).
 
 Dependencies
diff --git a/doc/guides/nics/thunderx.rst b/doc/guides/nics/thunderx.rst
index 12d43ce93e..f233504ba3 100644
--- a/doc/guides/nics/thunderx.rst
+++ b/doc/guides/nics/thunderx.rst
@@ -199,7 +199,7 @@ Each port consists of a primary VF and n secondary VF(s). Each VF provides 8 Tx/
 When a given port is configured to use more than 8 queues, it requires one (or more) secondary VF.
 Each secondary VF adds 8 additional queues to the queue set.
 
-During PMD driver initialization, the primary VF's are enumerated by checking the
+During PMD initialization, the primary VF's are enumerated by checking the
 specific flag (see sqs message in DPDK boot log - sqs indicates secondary queue set).
 They are at the beginning of VF list (the remain ones are secondary VF's).
 
diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst
index 1f0aba3207..f96df3fb62 100644
--- a/doc/guides/nics/virtio.rst
+++ b/doc/guides/nics/virtio.rst
@@ -17,7 +17,7 @@ With this enhancement, virtio could achieve quite promising performance.
 For basic qemu-KVM installation and other Intel EM poll mode driver in guest VM,
 please refer to Chapter "Driver for VM Emulated Devices".
 
-In this chapter, we will demonstrate usage of virtio PMD driver with two backends,
+In this chapter, we will demonstrate usage of virtio PMD with two backends,
 standard qemu vhost back end and vhost kni back end.
 
 Virtio Implementation in DPDK
@@ -40,7 +40,7 @@ end if necessary.
 Features and Limitations of virtio PMD
 --------------------------------------
 
-In this release, the virtio PMD driver provides the basic functionality of packet reception and transmission.
+In this release, the virtio PMD provides the basic functionality of packet reception and transmission.
 
 *   It supports merge-able buffers per packet when receiving packets and scattered buffer per packet
     when transmitting packets. The packet size supported is from 64 to 1518.
diff --git a/doc/guides/prog_guide/writing_efficient_code.rst b/doc/guides/prog_guide/writing_efficient_code.rst
index a61e8320ae..e6c26efdd3 100644
--- a/doc/guides/prog_guide/writing_efficient_code.rst
+++ b/doc/guides/prog_guide/writing_efficient_code.rst
@@ -119,8 +119,8 @@ The code algorithm that dequeues messages may be something similar to the follow
         my_process_bulk(obj_table, count);
    }
 
-PMD Driver
-----------
+PMD
+---
 
 The DPDK Poll Mode Driver (PMD) is also able to work in bulk/burst mode,
 allowing the factorization of some code for each call in the send or receive function.
diff --git a/doc/guides/rel_notes/known_issues.rst b/doc/guides/rel_notes/known_issues.rst
index e8f9fe6023..65c196de6c 100644
--- a/doc/guides/rel_notes/known_issues.rst
+++ b/doc/guides/rel_notes/known_issues.rst
@@ -250,7 +250,7 @@ PMD does not work with --no-huge EAL command line parameter
 
 **Description**:
    Currently, the DPDK does not store any information about memory allocated by ``malloc()` (for example, NUMA node,
-   physical address), hence PMD drivers do not work when the ``--no-huge`` command line parameter is supplied to EAL.
+   physical address), hence PMDs do not work when the ``--no-huge`` command line parameter is supplied to EAL.
 
 **Implication**:
    Sending and receiving data with PMD will not work.
diff --git a/doc/guides/rel_notes/release_16_04.rst b/doc/guides/rel_notes/release_16_04.rst
index e9f1e6ff6c..7e7fcd0ac4 100644
--- a/doc/guides/rel_notes/release_16_04.rst
+++ b/doc/guides/rel_notes/release_16_04.rst
@@ -57,7 +57,7 @@ New Features
 
 * **Enabled Virtio 1.0 support.**
 
-  Enabled Virtio 1.0 support for Virtio pmd driver.
+  Enabled Virtio 1.0 support for Virtio PMD.
 
 * **Supported Virtio for ARM.**
 
diff --git a/doc/guides/rel_notes/release_19_05.rst b/doc/guides/rel_notes/release_19_05.rst
index b4c6972e35..52829bdb08 100644
--- a/doc/guides/rel_notes/release_19_05.rst
+++ b/doc/guides/rel_notes/release_19_05.rst
@@ -93,13 +93,13 @@ New Features
   Updated the KNI kernel module to set the ``max_mtu`` according to the given
   initial MTU size. Without it, the maximum MTU was 1500.
 
-  Updated the KNI PMD driver to set the ``mbuf_size`` and MTU based on
+  Updated the KNI PMD to set the ``mbuf_size`` and MTU based on
   the given mb-pool. This provide the ability to pass jumbo frames
   if the mb-pool contains a suitable buffer size.
 
 * **Added the AF_XDP PMD.**
 
-  Added a Linux-specific PMD driver for AF_XDP. This PMD can create an AF_XDP socket
+  Added a Linux-specific PMD for AF_XDP. This PMD can create an AF_XDP socket
   and bind it to a specific netdev queue. It allows a DPDK application to send
   and receive raw packets through the socket which would bypass the kernel
   network stack to achieve high performance packet processing.
@@ -311,7 +311,7 @@ ABI Changes
 
   The ``rte_eth_dev_info`` structure has had two extra fields
   added: ``min_mtu`` and ``max_mtu``. Each of these are of type ``uint16_t``.
-  The values of these fields can be set specifically by the PMD drivers as
+  The values of these fields can be set specifically by the PMDs as
   supported values can vary from device to device.
 
 * cryptodev: in 18.08 a new structure ``rte_crypto_asym_op`` was introduced and
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index 0261d28431..e493628614 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -236,7 +236,7 @@ New Features
 
 * **Added Marvell OCTEON TX2 crypto PMD.**
 
-  Added a new PMD driver for hardware crypto offload block on ``OCTEON TX2``
+  Added a new PMD for hardware crypto offload block on ``OCTEON TX2``
   SoC.
 
   See :doc:`../cryptodevs/octeontx2` for more details
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index b2f76bccae..0234a9001f 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -238,7 +238,7 @@ New Features
 
 * **Added Wangxun txgbe PMD.**
 
-  Added a new PMD driver for Wangxun 10 Gigabit Ethernet NICs.
+  Added a new PMD for Wangxun 10 Gigabit Ethernet NICs.
 
   See the :doc:`../nics/txgbe` for more details.
 
@@ -334,7 +334,7 @@ New Features
 
 * **Added Marvell OCTEON TX2 regex PMD.**
 
-  Added a new PMD driver for the hardware regex offload block for OCTEON TX2 SoC.
+  Added a new PMD for the hardware regex offload block for OCTEON TX2 SoC.
 
   See the :doc:`../regexdevs/octeontx2` for more details.
 
diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst
index 8273473ff4..029b758e90 100644
--- a/doc/guides/rel_notes/release_2_2.rst
+++ b/doc/guides/rel_notes/release_2_2.rst
@@ -10,8 +10,8 @@ New Features
 * **Introduce ARMv7 and ARMv8 architectures.**
 
   * It is now possible to build DPDK for the ARMv7 and ARMv8 platforms.
-  * ARMv7 can be tested with virtual PMD drivers.
-  * ARMv8 can be tested with virtual and physical PMD drivers.
+  * ARMv7 can be tested with virtual PMDs.
+  * ARMv8 can be tested with virtual and physical PMDs.
 
 * **Enabled freeing of ring.**
 
diff --git a/doc/guides/sample_app_ug/bbdev_app.rst b/doc/guides/sample_app_ug/bbdev_app.rst
index 45e69e36e2..7f02f0ed90 100644
--- a/doc/guides/sample_app_ug/bbdev_app.rst
+++ b/doc/guides/sample_app_ug/bbdev_app.rst
@@ -31,7 +31,7 @@ Limitations
 Compiling the Application
 -------------------------
 
-DPDK needs to be built with ``baseband_turbo_sw`` PMD driver enabled along
+DPDK needs to be built with ``baseband_turbo_sw`` PMD enabled along
 with ``FLEXRAN SDK`` Libraries. Refer to *SW Turbo Poll Mode Driver*
 documentation for more details on this.
 
diff --git a/doc/guides/sample_app_ug/l3_forward_access_ctrl.rst b/doc/guides/sample_app_ug/l3_forward_access_ctrl.rst
index 2cf6e4556f..b252efd7a7 100644
--- a/doc/guides/sample_app_ug/l3_forward_access_ctrl.rst
+++ b/doc/guides/sample_app_ug/l3_forward_access_ctrl.rst
@@ -220,7 +220,7 @@ Once the application starts, it transitions through three phases:
 
 *   **Final Phase** - Perform the following tasks:
 
-    Calls the EAL, PMD driver and ACL library to free resource, then quits.
+    Calls the EAL, PMD and ACL library to free resource, then quits.
 
 Compiling the Application
 -------------------------
diff --git a/doc/guides/tools/testeventdev.rst b/doc/guides/tools/testeventdev.rst
index ad1788a3d8..4317f3170a 100644
--- a/doc/guides/tools/testeventdev.rst
+++ b/doc/guides/tools/testeventdev.rst
@@ -207,7 +207,7 @@ to the ordered queue. The worker receives the events from ordered queue and
 forwards to atomic queue. Since the events from an ordered queue can be
 processed in parallel on the different workers, the ingress order of events
 might have changed on the downstream atomic queue enqueue. On enqueue to the
-atomic queue, the eventdev PMD driver reorders the event to the original
+atomic queue, the eventdev PMD reorders the event to the original
 ingress order(i.e producer ingress order).
 
 When the event is dequeued from the atomic queue by the worker, this test
diff --git a/drivers/common/sfc_efx/efsys.h b/drivers/common/sfc_efx/efsys.h
index c2ff3fe9bc..8e22507080 100644
--- a/drivers/common/sfc_efx/efsys.h
+++ b/drivers/common/sfc_efx/efsys.h
@@ -607,7 +607,7 @@ typedef struct efsys_bar_s {
 /* DMA SYNC */
 
 /*
- * DPDK does not provide any DMA syncing API, and no PMD drivers
+ * DPDK does not provide any DMA syncing API, and no PMDs
  * have any traces of explicit DMA syncing.
  * DMA mapping is assumed to be coherent.
  */
diff --git a/drivers/compress/qat/qat_comp_pmd.h b/drivers/compress/qat/qat_comp_pmd.h
index 252b4b24e3..ed7e917e62 100644
--- a/drivers/compress/qat/qat_comp_pmd.h
+++ b/drivers/compress/qat/qat_comp_pmd.h
@@ -12,7 +12,7 @@
 
 #include "qat_device.h"
 
-/**< Intel(R) QAT Compression PMD driver name */
+/**< Intel(R) QAT Compression PMD name */
 #define COMPRESSDEV_NAME_QAT_PMD	compress_qat
 
 /** private data structure for a QAT compression device.
diff --git a/drivers/crypto/qat/qat_asym_pmd.h b/drivers/crypto/qat/qat_asym_pmd.h
index 3b5abddec8..f6770bc4fb 100644
--- a/drivers/crypto/qat/qat_asym_pmd.h
+++ b/drivers/crypto/qat/qat_asym_pmd.h
@@ -9,7 +9,7 @@
 #include <rte_cryptodev.h>
 #include "qat_device.h"
 
-/** Intel(R) QAT Asymmetric Crypto PMD driver name */
+/** Intel(R) QAT Asymmetric Crypto PMD name */
 #define CRYPTODEV_NAME_QAT_ASYM_PMD	crypto_qat_asym
 
 
diff --git a/drivers/crypto/qat/qat_sym_pmd.h b/drivers/crypto/qat/qat_sym_pmd.h
index e0992cbe27..c449924194 100644
--- a/drivers/crypto/qat/qat_sym_pmd.h
+++ b/drivers/crypto/qat/qat_sym_pmd.h
@@ -16,7 +16,7 @@
 #include "qat_sym_capabilities.h"
 #include "qat_device.h"
 
-/** Intel(R) QAT Symmetric Crypto PMD driver name */
+/** Intel(R) QAT Symmetric Crypto PMD name */
 #define CRYPTODEV_NAME_QAT_SYM_PMD	crypto_qat
 
 /* Internal capabilities */
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index c187088a33..6057f34525 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -254,7 +254,7 @@ rx_queue_clean(struct fm10k_rx_queue *q)
 	for (i = 0; i < q->nb_fake_desc; ++i)
 		q->hw_ring[q->nb_desc + i] = zero;
 
-	/* vPMD driver has a different way of releasing mbufs. */
+	/* vPMD has a different way of releasing mbufs. */
 	if (q->rx_using_sse) {
 		fm10k_rx_queue_release_mbufs_vec(q);
 		return;
diff --git a/drivers/net/hinic/base/hinic_pmd_cmdq.h b/drivers/net/hinic/base/hinic_pmd_cmdq.h
index 0d5e380123..58a1fbda71 100644
--- a/drivers/net/hinic/base/hinic_pmd_cmdq.h
+++ b/drivers/net/hinic/base/hinic_pmd_cmdq.h
@@ -9,7 +9,7 @@
 
 #define HINIC_SCMD_DATA_LEN		16
 
-/* pmd driver uses 64, kernel l2nic use 4096 */
+/* PMD uses 64, kernel l2nic use 4096 */
 #define	HINIC_CMDQ_DEPTH		64
 
 #define	HINIC_CMDQ_BUF_SIZE		2048U
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index c97e38e279..cf9302ed00 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -984,7 +984,7 @@ hns3_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on)
 		return ret;
 	/*
 	 * Only in HNS3_SW_SHIFT_AND_MODE the PVID related operation in Tx/Rx
-	 * need be processed by PMD driver.
+	 * need be processed by PMD.
 	 */
 	if (pvid_en_state_change &&
 	    hw->vlan_mode == HNS3_SW_SHIFT_AND_DISCARD_MODE)
@@ -2930,7 +2930,7 @@ hns3_parse_cfg(struct hns3_cfg *cfg, struct hns3_cmd_desc *desc)
 	 * Field ext_rss_size_max obtained from firmware will be more flexible
 	 * for future changes and expansions, which is an exponent of 2, instead
 	 * of reading out directly. If this field is not zero, hns3 PF PMD
-	 * driver uses it as rss_size_max under one TC. Device, whose revision
+	 * uses it as rss_size_max under one TC. Device, whose revision
 	 * id is greater than or equal to PCI_REVISION_ID_HIP09_A, obtains the
 	 * maximum number of queues supported under a TC through this field.
 	 */
@@ -6090,7 +6090,7 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
 	if (ret < 0)
 		return ret;
 
-	/* HNS3 PMD driver only support one bit set mode, e.g. 0x1, 0x4 */
+	/* HNS3 PMD only support one bit set mode, e.g. 0x1, 0x4 */
 	if (!is_fec_mode_one_bit_set(mode)) {
 		hns3_err(hw, "FEC mode(0x%x) not supported in HNS3 PMD, "
 			     "FEC mode should be only one bit set", mode);
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 2bb449be9d..4334c1ee60 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -401,8 +401,8 @@ struct hns3_queue_intr {
 	 *     enable Rx interrupt.
 	 *
 	 *  - HNS3_INTR_MAPPING_VEC_ALL
-	 *     PMD driver can map/unmmap all interrupt vectors with queues When
-	 *     Rx interrupt in enabled.
+	 *     PMD can map/unmmap all interrupt vectors with queues when
+	 *     Rx interrupt is enabled.
 	 */
 	uint8_t mapping_mode;
 	/*
@@ -501,14 +501,14 @@ struct hns3_hw {
 	 *
 	 *  - HNS3_SW_SHIFT_AND_DISCARD_MODE
 	 *     For some versions of hardware network engine, because of the
-	 *     hardware limitation, PMD driver needs to detect the PVID status
+	 *     hardware limitation, PMD needs to detect the PVID status
 	 *     to work with haredware to implement PVID-related functions.
 	 *     For example, driver need discard the stripped PVID tag to ensure
 	 *     the PVID will not report to mbuf and shift the inserted VLAN tag
 	 *     to avoid port based VLAN covering it.
 	 *
 	 *  - HNS3_HW_SHIT_AND_DISCARD_MODE
-	 *     PMD driver does not need to process PVID-related functions in
+	 *     PMD does not need to process PVID-related functions in
 	 *     I/O process, Hardware will adjust the sequence between port based
 	 *     VLAN tag and BD VLAN tag automatically and VLAN tag stripped by
 	 *     PVID will be invisible to driver. And in this mode, hns3 is able
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index e4caa396ec..3428cefb2c 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -319,7 +319,7 @@ hns3vf_set_default_mac_addr(struct rte_eth_dev *dev,
 				HNS3_TWO_ETHER_ADDR_LEN, true, NULL, 0);
 	if (ret) {
 		/*
-		 * The hns3 VF PMD driver depends on the hns3 PF kernel ethdev
+		 * The hns3 VF PMD depends on the hns3 PF kernel ethdev
 		 * driver. When user has configured a MAC address for VF device
 		 * by "ip link set ..." command based on the PF device, the hns3
 		 * PF kernel ethdev driver does not allow VF driver to request
@@ -573,9 +573,9 @@ hns3vf_set_promisc_mode(struct hns3_hw *hw, bool en_bc_pmc,
 	req = (struct hns3_mbx_vf_to_pf_cmd *)desc.data;
 
 	/*
-	 * The hns3 VF PMD driver depends on the hns3 PF kernel ethdev driver,
+	 * The hns3 VF PMD depends on the hns3 PF kernel ethdev driver,
 	 * so there are some features for promiscuous/allmulticast mode in hns3
-	 * VF PMD driver as below:
+	 * VF PMD as below:
 	 * 1. The promiscuous/allmulticast mode can be configured successfully
 	 *    only based on the trusted VF device. If based on the non trusted
 	 *    VF device, configuring promiscuous/allmulticast mode will fail.
@@ -583,14 +583,14 @@ hns3vf_set_promisc_mode(struct hns3_hw *hw, bool en_bc_pmc,
 	 *    kernel ethdev driver on the host by the following command:
 	 *      "ip link set <eth num> vf <vf id> turst on"
 	 * 2. After the promiscuous mode is configured successfully, hns3 VF PMD
-	 *    driver can receive the ingress and outgoing traffic. In the words,
+	 *    can receive the ingress and outgoing traffic. This includes
 	 *    all the ingress packets, all the packets sent from the PF and
 	 *    other VFs on the same physical port.
 	 * 3. Note: Because of the hardware constraints, By default vlan filter
 	 *    is enabled and couldn't be turned off based on VF device, so vlan
 	 *    filter is still effective even in promiscuous mode. If upper
 	 *    applications don't call rte_eth_dev_vlan_filter API function to
-	 *    set vlan based on VF device, hns3 VF PMD driver will can't receive
+	 *    set vlan based on VF device, hns3 VF PMD will can't receive
 	 *    the packets with vlan tag in promiscuoue mode.
 	 */
 	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_MBX_VF_TO_PF, false);
@@ -902,9 +902,9 @@ hns3vf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	/*
 	 * The hns3 PF/VF devices on the same port share the hardware MTU
 	 * configuration. Currently, we send mailbox to inform hns3 PF kernel
-	 * ethdev driver to finish hardware MTU configuration in hns3 VF PMD
-	 * driver, there is no need to stop the port for hns3 VF device, and the
-	 * MTU value issued by hns3 VF PMD driver must be less than or equal to
+	 * ethdev driver to finish hardware MTU configuration in hns3 VF PMD,
+	 * there is no need to stop the port for hns3 VF device, and the
+	 * MTU value issued by hns3 VF PMD must be less than or equal to
 	 * PF's MTU.
 	 */
 	if (rte_atomic16_read(&hw->reset.resetting)) {
@@ -914,8 +914,8 @@ hns3vf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 
 	/*
 	 * when Rx of scattered packets is off, we have some possibility of
-	 * using vector Rx process function or simple Rx functions in hns3 PMD
-	 * driver. If the input MTU is increased and the maximum length of
+	 * using vector Rx process function or simple Rx functions in hns3 PMD.
+	 * If the input MTU is increased and the maximum length of
 	 * received packets is greater than the length of a buffer for Rx
 	 * packet, the hardware network engine needs to use multiple BDs and
 	 * buffers to store these packets. This will cause problems when still
@@ -2474,7 +2474,7 @@ hns3vf_check_default_mac_change(struct hns3_hw *hw)
 	 * ethdev driver sets the MAC address for VF device after the
 	 * initialization of the related VF device, the PF driver will notify
 	 * VF driver to reset VF device to make the new MAC address effective
-	 * immediately. The hns3 VF PMD driver should check whether the MAC
+	 * immediately. The hns3 VF PMD should check whether the MAC
 	 * address has been changed by the PF kernel ethdev driver, if changed
 	 * VF driver should configure hardware using the new MAC address in the
 	 * recovering hardware configuration stage of the reset process.
@@ -2814,12 +2814,12 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
 	/*
 	 * The hns3 PF ethdev driver in kernel support setting VF MAC address
 	 * on the host by "ip link set ..." command. To avoid some incorrect
-	 * scenes, for example, hns3 VF PMD driver fails to receive and send
+	 * scenes, for example, hns3 VF PMD fails to receive and send
 	 * packets after user configure the MAC address by using the
-	 * "ip link set ..." command, hns3 VF PMD driver keep the same MAC
+	 * "ip link set ..." command, hns3 VF PMD keep the same MAC
 	 * address strategy as the hns3 kernel ethdev driver in the
 	 * initialization. If user configure a MAC address by the ip command
-	 * for VF device, then hns3 VF PMD driver will start with it, otherwise
+	 * for VF device, then hns3 VF PMD will start with it, otherwise
 	 * start with a random MAC address in the initialization.
 	 */
 	if (rte_is_zero_ether_addr((struct rte_ether_addr *)hw->mac.mac_addr))
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 6726c19afe..3a11a78341 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -672,7 +672,7 @@ hns3_set_default_rss_args(struct hns3_hw *hw)
 }
 
 /*
- * RSS initialization for hns3 pmd driver.
+ * RSS initialization for hns3 PMD.
  */
 int
 hns3_config_rss(struct hns3_adapter *hns)
@@ -744,7 +744,7 @@ rss_tuple_uninit:
 }
 
 /*
- * RSS uninitialization for hns3 pmd driver.
+ * RSS uninitialization for hns3 PMD.
  */
 void
 hns3_rss_uninit(struct hns3_adapter *hns)
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 235197ce55..cea8017432 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -1885,8 +1885,8 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
 	/*
 	 * For hns3 PF device, if the VLAN mode is HW_SHIFT_AND_DISCARD_MODE,
 	 * the pvid_sw_discard_en in the queue struct should not be changed,
-	 * because PVID-related operations do not need to be processed by PMD
-	 * driver. For hns3 VF device, whether it needs to process PVID depends
+	 * because PVID-related operations do not need to be processed by PMD.
+	 * For hns3 VF device, whether it needs to process PVID depends
 	 * on the configuration of PF kernel mode netdevice driver. And the
 	 * related PF configuration is delivered through the mailbox and finally
 	 * reflectd in port_base_vlan_cfg.
@@ -2700,8 +2700,8 @@ hns3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
 	/*
 	 * For hns3 PF device, if the VLAN mode is HW_SHIFT_AND_DISCARD_MODE,
 	 * the pvid_sw_shift_en in the queue struct should not be changed,
-	 * because PVID-related operations do not need to be processed by PMD
-	 * driver. For hns3 VF device, whether it needs to process PVID depends
+	 * because PVID-related operations do not need to be processed by PMD.
+	 * For hns3 VF device, whether it needs to process PVID depends
 	 * on the configuration of PF kernel mode netdev driver. And the
 	 * related PF configuration is delivered through the mailbox and finally
 	 * reflectd in port_base_vlan_cfg.
diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
index f425c9e8a3..9f398b507e 100644
--- a/drivers/net/hns3/hns3_rxtx.h
+++ b/drivers/net/hns3/hns3_rxtx.h
@@ -303,7 +303,7 @@ struct hns3_rx_queue {
 	 * should not be transitted to the upper-layer application. For hardware
 	 * network engine whose vlan mode is HNS3_HW_SHIFT_AND_DISCARD_MODE,
 	 * such as kunpeng 930, PVID will not be reported to the BDs. So, PMD
-	 * driver does not need to perform PVID-related operation in Rx. At this
+	 * does not need to perform PVID-related operation in Rx. At this
 	 * point, the pvid_sw_discard_en will be false.
 	 */
 	bool pvid_sw_discard_en;
@@ -417,7 +417,7 @@ struct hns3_tx_queue {
 	 * PVID will overwrite the outer VLAN field of Tx BD. For the hardware
 	 * network engine whose vlan mode is HNS3_HW_SHIFT_AND_DISCARD_MODE,
 	 * such as kunpeng 930, if the PVID is set, the hardware will shift the
-	 * VLAN field automatically. So, PMD driver does not need to do
+	 * VLAN field automatically. So, PMD does not need to do
 	 * PVID-related operations in Tx. And pvid_sw_shift_en will be false at
 	 * this point.
 	 */
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index a195281795..ba4a4a9ddc 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1995,7 +1995,7 @@ i40e_dev_configure(struct rte_eth_dev *dev)
 		goto err;
 
 	/* VMDQ setup.
-	 *  General PMD driver call sequence are NIC init, configure,
+	 *  General PMD call sequence are NIC init, configure,
 	 *  rx/tx_queue_setup and dev_start. In rx/tx_queue_setup() function, it
 	 *  will try to lookup the VSI that specific queue belongs to if VMDQ
 	 *  applicable. So, VMDQ setting has to be done before
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 8e27845ce6..deea3de910 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -912,7 +912,7 @@ nfp_net_close(struct rte_eth_dev *dev)
 			     (void *)dev);
 
 	/*
-	 * The ixgbe PMD driver disables the pcie master on the
+	 * The ixgbe PMD disables the pcie master on the
 	 * device. The i40e does not...
 	 */
 
diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h
index 444c1b3773..ac6118d639 100644
--- a/drivers/net/nfp/nfp_net_pmd.h
+++ b/drivers/net/nfp/nfp_net_pmd.h
@@ -8,7 +8,7 @@
  *
  * @file dpdk/pmd/nfp_net_pmd.h
  *
- * Netronome NFP_NET PMD driver
+ * Netronome NFP_NET PMD
  */
 
 #ifndef _NFP_NET_PMD_H_
diff --git a/drivers/raw/ifpga/base/README b/drivers/raw/ifpga/base/README
index 6b2b171b01..55d92d590a 100644
--- a/drivers/raw/ifpga/base/README
+++ b/drivers/raw/ifpga/base/README
@@ -42,5 +42,5 @@ Some features added in this version:
 3. Add altera SPI master driver and Intel MAX10 device driver.
 4. Add Altera I2C master driver and AT24 eeprom driver.
 5. Add Device Tree support to get the configuration from card.
-6. Instruding and exposing APIs to DPDK PMD driver to access networking
+6. Instruding and exposing APIs to DPDK PMD to access networking
 functionality.
diff --git a/lib/librte_bbdev/rte_bbdev.h b/lib/librte_bbdev/rte_bbdev.h
index 7017124414..7fbc75f572 100644
--- a/lib/librte_bbdev/rte_bbdev.h
+++ b/lib/librte_bbdev/rte_bbdev.h
@@ -174,7 +174,7 @@ rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id,
  *
  * @return
  *   - 0 on success
- *   - negative value on failure - as returned from PMD driver
+ *   - negative value on failure - as returned from PMD
  */
 __rte_experimental
 int
@@ -220,7 +220,7 @@ rte_bbdev_close(uint16_t dev_id);
  *
  * @return
  *   - 0 on success
- *   - negative value on failure - as returned from PMD driver
+ *   - negative value on failure - as returned from PMD
  */
 __rte_experimental
 int
@@ -236,7 +236,7 @@ rte_bbdev_queue_start(uint16_t dev_id, uint16_t queue_id);
  *
  * @return
  *   - 0 on success
- *   - negative value on failure - as returned from PMD driver
+ *   - negative value on failure - as returned from PMD
  */
 __rte_experimental
 int
@@ -807,7 +807,7 @@ rte_bbdev_callback_unregister(uint16_t dev_id, enum rte_bbdev_event_type event,
  *
  * @return
  *   - 0 on success
- *   - negative value on failure - as returned from PMD driver
+ *   - negative value on failure - as returned from PMD
  */
 __rte_experimental
 int
@@ -824,7 +824,7 @@ rte_bbdev_queue_intr_enable(uint16_t dev_id, uint16_t queue_id);
  *
  * @return
  *   - 0 on success
- *   - negative value on failure - as returned from PMD driver
+ *   - negative value on failure - as returned from PMD
  */
 __rte_experimental
 int
@@ -852,7 +852,7 @@ rte_bbdev_queue_intr_disable(uint16_t dev_id, uint16_t queue_id);
  * @return
  *   - 0 on success
  *   - ENOTSUP if interrupts are not supported by the identified device
- *   - negative value on failure - as returned from PMD driver
+ *   - negative value on failure - as returned from PMD
  */
 __rte_experimental
 int
diff --git a/lib/librte_compressdev/rte_compressdev_pmd.h b/lib/librte_compressdev/rte_compressdev_pmd.h
index b2a0e25001..f9a42d1f05 100644
--- a/lib/librte_compressdev/rte_compressdev_pmd.h
+++ b/lib/librte_compressdev/rte_compressdev_pmd.h
@@ -319,7 +319,7 @@ rte_compressdev_pmd_release_device(struct rte_compressdev *dev);
  * PMD assist function to parse initialisation arguments for comp driver
  * when creating a new comp PMD device instance.
  *
- * PMD driver should set default values for that PMD before calling function,
+ * PMD should set default values for that PMD before calling function,
  * these default values will be over-written with successfully parsed values
  * from args string.
  *
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 96bea17c92..6c46acf7c2 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -435,7 +435,7 @@ rte_cryptodev_pmd_release_device(struct rte_cryptodev *cryptodev);
  * PMD assist function to parse initialisation arguments for crypto driver
  * when creating a new crypto PMD device instance.
  *
- * PMD driver should set default values for that PMD before calling function,
+ * PMD should set default values for that PMD before calling function,
  * these default values will be over-written with successfully parsed values
  * from args string.
  *
diff --git a/lib/librte_eal/include/rte_dev.h b/lib/librte_eal/include/rte_dev.h
index 6dd72c11a1..ef3ce849be 100644
--- a/lib/librte_eal/include/rte_dev.h
+++ b/lib/librte_eal/include/rte_dev.h
@@ -8,7 +8,7 @@
 /**
  * @file
  *
- * RTE PMD Driver Registration Interface
+ * RTE PMD Registration Interface
  *
  * This file manages the list of device drivers.
  */
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 57a2edf363..8856648d11 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -2321,7 +2321,7 @@ int rte_eth_tx_hairpin_queue_setup
  *   - (-EINVAL) if bad parameter.
  *   - (-ENODEV) if *port_id* invalid
  *   - (-ENOTSUP) if hardware doesn't support.
- *   - Others detailed errors from PMD drivers.
+ *   - Others detailed errors from PMDs.
  */
 __rte_experimental
 int rte_eth_hairpin_get_peer_ports(uint16_t port_id, uint16_t *peer_ports,
@@ -2347,7 +2347,7 @@ int rte_eth_hairpin_get_peer_ports(uint16_t port_id, uint16_t *peer_ports,
  *   - (-ENODEV) if Tx port ID is invalid.
  *   - (-EBUSY) if device is not in started state.
  *   - (-ENOTSUP) if hardware doesn't support.
- *   - Others detailed errors from PMD drivers.
+ *   - Others detailed errors from PMDs.
  */
 __rte_experimental
 int rte_eth_hairpin_bind(uint16_t tx_port, uint16_t rx_port);
@@ -2374,7 +2374,7 @@ int rte_eth_hairpin_bind(uint16_t tx_port, uint16_t rx_port);
  *   - (-ENODEV) if Tx port ID is invalid.
  *   - (-EBUSY) if device is in stopped state.
  *   - (-ENOTSUP) if hardware doesn't support.
- *   - Others detailed errors from PMD drivers.
+ *   - Others detailed errors from PMDs.
  */
 __rte_experimental
 int rte_eth_hairpin_unbind(uint16_t tx_port, uint16_t rx_port);
@@ -2417,7 +2417,7 @@ int rte_eth_dev_is_valid_port(uint16_t port_id);
  *   - -ENODEV: if *port_id* is invalid.
  *   - -EINVAL: The queue_id out of range or belong to hairpin.
  *   - -EIO: if device is removed.
- *   - -ENOTSUP: The function not supported in PMD driver.
+ *   - -ENOTSUP: The function not supported in PMD.
  */
 int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id);
 
@@ -2435,7 +2435,7 @@ int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id);
  *   - -ENODEV: if *port_id* is invalid.
  *   - -EINVAL: The queue_id out of range or belong to hairpin.
  *   - -EIO: if device is removed.
- *   - -ENOTSUP: The function not supported in PMD driver.
+ *   - -ENOTSUP: The function not supported in PMD.
  */
 int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id);
 
@@ -2454,7 +2454,7 @@ int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id);
  *   - -ENODEV: if *port_id* is invalid.
  *   - -EINVAL: The queue_id out of range or belong to hairpin.
  *   - -EIO: if device is removed.
- *   - -ENOTSUP: The function not supported in PMD driver.
+ *   - -ENOTSUP: The function not supported in PMD.
  */
 int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id);
 
@@ -2472,7 +2472,7 @@ int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id);
  *   - -ENODEV: if *port_id* is invalid.
  *   - -EINVAL: The queue_id out of range or belong to hairpin.
  *   - -EIO: if device is removed.
- *   - -ENOTSUP: The function not supported in PMD driver.
+ *   - -ENOTSUP: The function not supported in PMD.
  */
 int rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id);
 
@@ -2674,7 +2674,7 @@ int rte_eth_allmulticast_get(uint16_t port_id);
  *   Link information written back.
  * @return
  *   - (0) if successful.
- *   - (-ENOTSUP) if the function is not supported in PMD driver.
+ *   - (-ENOTSUP) if the function is not supported in PMD.
  *   - (-ENODEV) if *port_id* invalid.
  */
 int rte_eth_link_get(uint16_t port_id, struct rte_eth_link *link);
@@ -2689,7 +2689,7 @@ int rte_eth_link_get(uint16_t port_id, struct rte_eth_link *link);
  *   Link information written back.
  * @return
  *   - (0) if successful.
- *   - (-ENOTSUP) if the function is not supported in PMD driver.
+ *   - (-ENOTSUP) if the function is not supported in PMD.
  *   - (-ENODEV) if *port_id* invalid.
  */
 int rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *link);
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:07.061129827 +0800
+++ 0075-fix-PMD-wording.patch	2021-11-28 22:41:03.553536756 +0800
@@ -1 +1 @@
-From f8dbaebbf1c9efcbb2e2354b341ed62175466a57 Mon Sep 17 00:00:00 2001
+From f198b59e4165974716bf386fd87d577421bdd39f Mon Sep 17 00:00:00 2001
@@ -4,0 +5 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
@@ -6 +7 @@
-Removing the use of driver following PMD as its unnecessary.
+[ upstream commit f8dbaebbf1c9efcbb2e2354b341ed62175466a57 ]
@@ -8 +9 @@
-Cc: stable@dpdk.org
+Removing the use of driver following PMD as its unnecessary.
@@ -23 +23,0 @@
- doc/guides/nics/enetfec.rst                   |  2 +-
@@ -36,4 +35,0 @@
- doc/guides/rel_notes/release_21_02.rst        |  2 +-
- doc/guides/rel_notes/release_21_05.rst        |  2 +-
- doc/guides/rel_notes/release_21_08.rst        |  2 +-
- doc/guides/rel_notes/release_21_11.rst        |  2 +-
@@ -57,3 +53,2 @@
- drivers/net/nfp/nfp_common.h                  |  2 +-
- drivers/net/nfp/nfp_ethdev.c                  |  2 +-
- drivers/net/nfp/nfp_ethdev_vf.c               |  2 +-
+ drivers/net/nfp/nfp_net.c                     |  2 +-
+ drivers/net/nfp/nfp_net_pmd.h                 |  2 +-
@@ -61,8 +56,6 @@
- lib/bbdev/rte_bbdev.h                         | 12 ++++----
- lib/compressdev/rte_compressdev_pmd.h         |  2 +-
- lib/cryptodev/cryptodev_pmd.h                 |  2 +-
- lib/dmadev/rte_dmadev_core.h                  |  2 +-
- lib/eal/include/rte_dev.h                     |  2 +-
- lib/eal/include/rte_devargs.h                 |  4 +--
- lib/ethdev/rte_ethdev.h                       | 18 ++++++------
- 52 files changed, 98 insertions(+), 98 deletions(-)
+ lib/librte_bbdev/rte_bbdev.h                  | 12 ++++----
+ lib/librte_compressdev/rte_compressdev_pmd.h  |  2 +-
+ lib/librte_cryptodev/rte_cryptodev_pmd.h      |  2 +-
+ lib/librte_eal/include/rte_dev.h              |  2 +-
+ lib/librte_ethdev/rte_ethdev.h                | 18 ++++++------
+ 44 files changed, 89 insertions(+), 89 deletions(-)
@@ -71 +64 @@
-index c43c85c591..6e10afeedd 100644
+index 22283bc355..ee9335e3d3 100644
@@ -74 +67 @@
-@@ -2701,7 +2701,7 @@ cmd_config_rxtx_queue_parsed(void *parsed_result,
+@@ -2607,7 +2607,7 @@ cmd_config_rxtx_queue_parsed(void *parsed_result,
@@ -78 +71 @@
--		fprintf(stderr, "Function not supported in PMD driver\n");
+-		printf("Function not supported in PMD driver\n");
@@ -83 +76 @@
-@@ -14700,7 +14700,7 @@ no_print_return:
+@@ -14035,7 +14035,7 @@ no_print_return:
@@ -87 +80 @@
--		fprintf(stderr, "Function not supported in PMD driver\n");
+-		printf("Function not supported in PMD driver\n");
@@ -119 +112 @@
-index efd2dd23f1..4f99617233 100644
+index 396fcf08d7..7a12795c70 100644
@@ -132 +125 @@
-index 54feffdef4..8292369141 100644
+index efd6f1ca73..cf098fcaa4 100644
@@ -145 +138 @@
-index 8bf40b5f0f..c9d0e1ad6c 100644
+index 5ed24374f8..7b2989ab84 100644
@@ -179,13 +171,0 @@
-diff --git a/doc/guides/nics/enetfec.rst b/doc/guides/nics/enetfec.rst
-index a64e72fdd6..381635e627 100644
---- a/doc/guides/nics/enetfec.rst
-+++ b/doc/guides/nics/enetfec.rst
-@@ -65,7 +65,7 @@ The diagram below shows a system level overview of ENETFEC:
-                         | PHY |
-                         +-----+
- 
--ENETFEC Ethernet driver is traditional DPDK PMD driver running in userspace.
-+ENETFEC Ethernet driver is traditional DPDK PMD running in userspace.
- 'fec-uio' is the kernel driver.
- The MAC and PHY are the hardware blocks.
- ENETFEC PMD uses standard UIO interface to access kernel
@@ -193 +173 @@
-index bba53f5a64..d6efac0917 100644
+index 7b8ef0e782..9057fd8c9e 100644
@@ -209 +189 @@
-index fd235e1463..648af39c22 100644
+index 529ff4a955..079ff7e4d7 100644
@@ -212 +192 @@
-@@ -571,7 +571,7 @@ Fast Host-based Packet Processing
+@@ -570,7 +570,7 @@ Fast Host-based Packet Processing
@@ -248 +228 @@
-index 98f23a2b2a..d96395dafa 100644
+index 12d43ce93e..f233504ba3 100644
@@ -261 +241 @@
-index 98e0d012b7..7c0ae2b3af 100644
+index 1f0aba3207..f96df3fb62 100644
@@ -298 +278 @@
-index beea877bad..187d9c942e 100644
+index e8f9fe6023..65c196de6c 100644
@@ -311 +291 @@
-index b7d07834e1..ac18e1dddb 100644
+index e9f1e6ff6c..7e7fcd0ac4 100644
@@ -314 +294 @@
-@@ -56,7 +56,7 @@ New Features
+@@ -57,7 +57,7 @@ New Features
@@ -324 +304 @@
-index 30f704e204..89ae425bdb 100644
+index b4c6972e35..52829bdb08 100644
@@ -327 +307 @@
-@@ -46,13 +46,13 @@ New Features
+@@ -93,13 +93,13 @@ New Features
@@ -343 +323 @@
-@@ -240,7 +240,7 @@ ABI Changes
+@@ -311,7 +311,7 @@ ABI Changes
@@ -353 +333 @@
-index b509a6dd28..302b3e5f37 100644
+index 0261d28431..e493628614 100644
@@ -356 +336 @@
-@@ -189,7 +189,7 @@ New Features
+@@ -236,7 +236,7 @@ New Features
@@ -366 +346 @@
-index 90cc3ed680..af7ce90ba3 100644
+index b2f76bccae..0234a9001f 100644
@@ -369 +349 @@
-@@ -192,7 +192,7 @@ New Features
+@@ -238,7 +238,7 @@ New Features
@@ -378 +358 @@
-@@ -288,7 +288,7 @@ New Features
+@@ -334,7 +334,7 @@ New Features
@@ -387,52 +366,0 @@
-diff --git a/doc/guides/rel_notes/release_21_02.rst b/doc/guides/rel_notes/release_21_02.rst
-index 9d5e17758f..5fbf5b3d43 100644
---- a/doc/guides/rel_notes/release_21_02.rst
-+++ b/doc/guides/rel_notes/release_21_02.rst
-@@ -135,7 +135,7 @@ New Features
- 
- * **Added mlx5 compress PMD.**
- 
--  Added a new compress PMD driver for Bluefield 2 adapters.
-+  Added a new compress PMD for Bluefield 2 adapters.
- 
-   See the :doc:`../compressdevs/mlx5` for more details.
- 
-diff --git a/doc/guides/rel_notes/release_21_05.rst b/doc/guides/rel_notes/release_21_05.rst
-index 8adb225a4d..49044ed422 100644
---- a/doc/guides/rel_notes/release_21_05.rst
-+++ b/doc/guides/rel_notes/release_21_05.rst
-@@ -78,7 +78,7 @@ New Features
-   * Updated ena_com (HAL) to the latest version.
-   * Added indication of the RSS hash presence in the mbuf.
- 
--* **Updated Arkville PMD driver.**
-+* **Updated Arkville PMD.**
- 
-   Updated Arkville net driver with new features and improvements, including:
- 
-diff --git a/doc/guides/rel_notes/release_21_08.rst b/doc/guides/rel_notes/release_21_08.rst
-index 6fb4e43346..ac1c081903 100644
---- a/doc/guides/rel_notes/release_21_08.rst
-+++ b/doc/guides/rel_notes/release_21_08.rst
-@@ -67,7 +67,7 @@ New Features
- 
- * **Added Wangxun ngbe PMD.**
- 
--  Added a new PMD driver for Wangxun 1Gb Ethernet NICs.
-+  Added a new PMD for Wangxun 1Gb Ethernet NICs.
-   See the :doc:`../nics/ngbe` for more details.
- 
- * **Added inflight packets clear API in vhost library.**
-diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst
-index f31d52f557..115c679c23 100644
---- a/doc/guides/rel_notes/release_21_11.rst
-+++ b/doc/guides/rel_notes/release_21_11.rst
-@@ -321,7 +321,7 @@ New Features
- 
- * **Added NXP LA12xx baseband PMD.**
- 
--  * Added a new baseband PMD driver for NXP LA12xx Software defined radio.
-+  * Added a new baseband PMD for NXP LA12xx Software defined radio.
-   * See the :doc:`../bbdevs/la12xx` for more details.
- 
- * **Updated Mellanox compress driver.**
@@ -468 +396 @@
-index 486247ac2e..ecb1c857c4 100644
+index 2cf6e4556f..b252efd7a7 100644
@@ -481 +409 @@
-index 7b4cdeb43f..48efb9ea6e 100644
+index ad1788a3d8..4317f3170a 100644
@@ -484 +412 @@
-@@ -239,7 +239,7 @@ to the ordered queue. The worker receives the events from ordered queue and
+@@ -207,7 +207,7 @@ to the ordered queue. The worker receives the events from ordered queue and
@@ -494 +422 @@
-index b2109bf3c0..3860c2835a 100644
+index c2ff3fe9bc..8e22507080 100644
@@ -497 +425 @@
-@@ -609,7 +609,7 @@ typedef struct efsys_bar_s {
+@@ -607,7 +607,7 @@ typedef struct efsys_bar_s {
@@ -507 +435 @@
-index 86317a513c..3c8682a768 100644
+index 252b4b24e3..ed7e917e62 100644
@@ -510 +438,2 @@
-@@ -13,7 +13,7 @@
+@@ -12,7 +12,7 @@
+ 
@@ -512 +440,0 @@
- #include "qat_comp.h"
@@ -518 +446 @@
- /* Private data structure for a QAT compression device capability. */
+ /** private data structure for a QAT compression device.
@@ -520 +448 @@
-index fd6b406248..f988d646e5 100644
+index 3b5abddec8..f6770bc4fb 100644
@@ -523,2 +451,2 @@
-@@ -10,7 +10,7 @@
- #include "qat_crypto.h"
+@@ -9,7 +9,7 @@
+ #include <rte_cryptodev.h>
@@ -533 +461 @@
-index 0dc0c6f0d9..59fbdefa12 100644
+index e0992cbe27..c449924194 100644
@@ -537 +465 @@
- #include "qat_crypto.h"
+ #include "qat_sym_capabilities.h"
@@ -546 +474 @@
-index 7c85a05746..43e1d13431 100644
+index c187088a33..6057f34525 100644
@@ -549 +477 @@
-@@ -255,7 +255,7 @@ rx_queue_clean(struct fm10k_rx_queue *q)
+@@ -254,7 +254,7 @@ rx_queue_clean(struct fm10k_rx_queue *q)
@@ -572 +500 @@
-index 847e660f44..0bd12907d8 100644
+index c97e38e279..cf9302ed00 100644
@@ -575 +503 @@
-@@ -1060,7 +1060,7 @@ hns3_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on)
+@@ -984,7 +984,7 @@ hns3_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on)
@@ -584 +512 @@
-@@ -2592,7 +2592,7 @@ hns3_parse_cfg(struct hns3_cfg *cfg, struct hns3_cmd_desc *desc)
+@@ -2930,7 +2930,7 @@ hns3_parse_cfg(struct hns3_cfg *cfg, struct hns3_cmd_desc *desc)
@@ -593 +521 @@
-@@ -6311,7 +6311,7 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
+@@ -6090,7 +6090,7 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
@@ -603 +531 @@
-index 6d30125dcc..aa45b31261 100644
+index 2bb449be9d..4334c1ee60 100644
@@ -606 +534 @@
-@@ -465,8 +465,8 @@ struct hns3_queue_intr {
+@@ -401,8 +401,8 @@ struct hns3_queue_intr {
@@ -617 +545 @@
-@@ -575,14 +575,14 @@ struct hns3_hw {
+@@ -501,14 +501,14 @@ struct hns3_hw {
@@ -635 +563 @@
-index d8a99693e0..805abd4543 100644
+index e4caa396ec..3428cefb2c 100644
@@ -638 +566 @@
-@@ -232,7 +232,7 @@ hns3vf_set_default_mac_addr(struct rte_eth_dev *dev,
+@@ -319,7 +319,7 @@ hns3vf_set_default_mac_addr(struct rte_eth_dev *dev,
@@ -647 +575 @@
-@@ -312,9 +312,9 @@ hns3vf_set_promisc_mode(struct hns3_hw *hw, bool en_bc_pmc,
+@@ -573,9 +573,9 @@ hns3vf_set_promisc_mode(struct hns3_hw *hw, bool en_bc_pmc,
@@ -659 +587 @@
-@@ -322,14 +322,14 @@ hns3vf_set_promisc_mode(struct hns3_hw *hw, bool en_bc_pmc,
+@@ -583,14 +583,14 @@ hns3vf_set_promisc_mode(struct hns3_hw *hw, bool en_bc_pmc,
@@ -676 +604 @@
-@@ -553,9 +553,9 @@ hns3vf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -902,9 +902,9 @@ hns3vf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -688,2 +616,2 @@
- 	if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED)) {
-@@ -565,8 +565,8 @@ hns3vf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+ 	if (rte_atomic16_read(&hw->reset.resetting)) {
+@@ -914,8 +914,8 @@ hns3vf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -700 +628 @@
-@@ -2075,7 +2075,7 @@ hns3vf_check_default_mac_change(struct hns3_hw *hw)
+@@ -2474,7 +2474,7 @@ hns3vf_check_default_mac_change(struct hns3_hw *hw)
@@ -709 +637 @@
-@@ -2416,12 +2416,12 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -2814,12 +2814,12 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
@@ -726 +654 @@
-index 85495bbe89..3a4b699ae2 100644
+index 6726c19afe..3a11a78341 100644
@@ -729 +657 @@
-@@ -667,7 +667,7 @@ hns3_rss_set_default_args(struct hns3_hw *hw)
+@@ -672,7 +672,7 @@ hns3_set_default_rss_args(struct hns3_hw *hw)
@@ -738 +666 @@
-@@ -739,7 +739,7 @@ rss_tuple_uninit:
+@@ -744,7 +744,7 @@ rss_tuple_uninit:
@@ -748 +676 @@
-index 40cc4e9c1a..f365daadf8 100644
+index 235197ce55..cea8017432 100644
@@ -751 +679 @@
-@@ -1899,8 +1899,8 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
+@@ -1885,8 +1885,8 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
@@ -762 +690 @@
-@@ -3039,8 +3039,8 @@ hns3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
+@@ -2700,8 +2700,8 @@ hns3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
@@ -774 +702 @@
-index df731856ef..5423568cd0 100644
+index f425c9e8a3..9f398b507e 100644
@@ -777 +705 @@
-@@ -318,7 +318,7 @@ struct hns3_rx_queue {
+@@ -303,7 +303,7 @@ struct hns3_rx_queue {
@@ -785,2 +713,2 @@
- 	uint8_t pvid_sw_discard_en:1;
-@@ -490,7 +490,7 @@ struct hns3_tx_queue {
+ 	bool pvid_sw_discard_en;
+@@ -417,7 +417,7 @@ struct hns3_tx_queue {
@@ -796 +724 @@
-index 344cbd25d3..c0bfff43ee 100644
+index a195281795..ba4a4a9ddc 100644
@@ -799 +727 @@
-@@ -1922,7 +1922,7 @@ i40e_dev_configure(struct rte_eth_dev *dev)
+@@ -1995,7 +1995,7 @@ i40e_dev_configure(struct rte_eth_dev *dev)
@@ -808,31 +736,5 @@
-diff --git a/drivers/net/nfp/nfp_common.h b/drivers/net/nfp/nfp_common.h
-index 3556c9cd17..8b35fa119c 100644
---- a/drivers/net/nfp/nfp_common.h
-+++ b/drivers/net/nfp/nfp_common.h
-@@ -8,7 +8,7 @@
-  *
-  * @file dpdk/pmd/nfp_net_pmd.h
-  *
-- * Netronome NFP_NET PMD driver
-+ * Netronome NFP_NET PMD
-  */
- 
- #ifndef _NFP_COMMON_H_
-diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
-index 830863af28..8e81cc498f 100644
---- a/drivers/net/nfp/nfp_ethdev.c
-+++ b/drivers/net/nfp/nfp_ethdev.c
-@@ -342,7 +342,7 @@ nfp_net_close(struct rte_eth_dev *dev)
- 				     (void *)dev);
- 
- 	/*
--	 * The ixgbe PMD driver disables the pcie master on the
-+	 * The ixgbe PMD disables the pcie master on the
- 	 * device. The i40e does not...
- 	 */
- 
-diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c
-index 5557a1e002..303ef72b1b 100644
---- a/drivers/net/nfp/nfp_ethdev_vf.c
-+++ b/drivers/net/nfp/nfp_ethdev_vf.c
-@@ -238,7 +238,7 @@ nfp_netvf_close(struct rte_eth_dev *dev)
+diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
+index 8e27845ce6..deea3de910 100644
+--- a/drivers/net/nfp/nfp_net.c
++++ b/drivers/net/nfp/nfp_net.c
+@@ -912,7 +912,7 @@ nfp_net_close(struct rte_eth_dev *dev)
@@ -846,0 +749,13 @@
+diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h
+index 444c1b3773..ac6118d639 100644
+--- a/drivers/net/nfp/nfp_net_pmd.h
++++ b/drivers/net/nfp/nfp_net_pmd.h
+@@ -8,7 +8,7 @@
+  *
+  * @file dpdk/pmd/nfp_net_pmd.h
+  *
+- * Netronome NFP_NET PMD driver
++ * Netronome NFP_NET PMD
+  */
+ 
+ #ifndef _NFP_NET_PMD_H_
@@ -858,5 +773,5 @@
-diff --git a/lib/bbdev/rte_bbdev.h b/lib/bbdev/rte_bbdev.h
-index ff193f2d65..1dbcf73b0e 100644
---- a/lib/bbdev/rte_bbdev.h
-+++ b/lib/bbdev/rte_bbdev.h
-@@ -164,7 +164,7 @@ rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id,
+diff --git a/lib/librte_bbdev/rte_bbdev.h b/lib/librte_bbdev/rte_bbdev.h
+index 7017124414..7fbc75f572 100644
+--- a/lib/librte_bbdev/rte_bbdev.h
++++ b/lib/librte_bbdev/rte_bbdev.h
+@@ -174,7 +174,7 @@ rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id,
@@ -868,0 +784 @@
+ __rte_experimental
@@ -870,2 +786 @@
- rte_bbdev_start(uint16_t dev_id);
-@@ -207,7 +207,7 @@ rte_bbdev_close(uint16_t dev_id);
+@@ -220,7 +220,7 @@ rte_bbdev_close(uint16_t dev_id);
@@ -877,0 +793 @@
+ __rte_experimental
@@ -879,2 +795 @@
- rte_bbdev_queue_start(uint16_t dev_id, uint16_t queue_id);
-@@ -222,7 +222,7 @@ rte_bbdev_queue_start(uint16_t dev_id, uint16_t queue_id);
+@@ -236,7 +236,7 @@ rte_bbdev_queue_start(uint16_t dev_id, uint16_t queue_id);
@@ -886,0 +802 @@
+ __rte_experimental
@@ -888,2 +804 @@
- rte_bbdev_queue_stop(uint16_t dev_id, uint16_t queue_id);
-@@ -782,7 +782,7 @@ rte_bbdev_callback_unregister(uint16_t dev_id, enum rte_bbdev_event_type event,
+@@ -807,7 +807,7 @@ rte_bbdev_callback_unregister(uint16_t dev_id, enum rte_bbdev_event_type event,
@@ -895,0 +811 @@
+ __rte_experimental
@@ -897,2 +813 @@
- rte_bbdev_queue_intr_enable(uint16_t dev_id, uint16_t queue_id);
-@@ -798,7 +798,7 @@ rte_bbdev_queue_intr_enable(uint16_t dev_id, uint16_t queue_id);
+@@ -824,7 +824,7 @@ rte_bbdev_queue_intr_enable(uint16_t dev_id, uint16_t queue_id);
@@ -904,0 +820 @@
+ __rte_experimental
@@ -906,2 +822 @@
- rte_bbdev_queue_intr_disable(uint16_t dev_id, uint16_t queue_id);
-@@ -825,7 +825,7 @@ rte_bbdev_queue_intr_disable(uint16_t dev_id, uint16_t queue_id);
+@@ -852,7 +852,7 @@ rte_bbdev_queue_intr_disable(uint16_t dev_id, uint16_t queue_id);
@@ -913,0 +829 @@
+ __rte_experimental
@@ -915,2 +831 @@
- rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int op,
-diff --git a/lib/compressdev/rte_compressdev_pmd.h b/lib/compressdev/rte_compressdev_pmd.h
+diff --git a/lib/librte_compressdev/rte_compressdev_pmd.h b/lib/librte_compressdev/rte_compressdev_pmd.h
@@ -918,2 +833,2 @@
---- a/lib/compressdev/rte_compressdev_pmd.h
-+++ b/lib/compressdev/rte_compressdev_pmd.h
+--- a/lib/librte_compressdev/rte_compressdev_pmd.h
++++ b/lib/librte_compressdev/rte_compressdev_pmd.h
@@ -929,5 +844,5 @@
-diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
-index 1bca24e74e..b9146f652c 100644
---- a/lib/cryptodev/cryptodev_pmd.h
-+++ b/lib/cryptodev/cryptodev_pmd.h
-@@ -483,7 +483,7 @@ rte_cryptodev_pmd_release_device(struct rte_cryptodev *cryptodev);
+diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
+index 96bea17c92..6c46acf7c2 100644
+--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
++++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
+@@ -435,7 +435,7 @@ rte_cryptodev_pmd_release_device(struct rte_cryptodev *cryptodev);
@@ -942,17 +857,4 @@
-diff --git a/lib/dmadev/rte_dmadev_core.h b/lib/dmadev/rte_dmadev_core.h
-index e42d8739ab..064785686f 100644
---- a/lib/dmadev/rte_dmadev_core.h
-+++ b/lib/dmadev/rte_dmadev_core.h
-@@ -59,7 +59,7 @@ typedef uint16_t (*rte_dma_burst_capacity_t)(const void *dev_private, uint16_t v
-  * functions.
-  *
-  * The 'dev_private' field was placed in the first cache line to optimize
-- * performance because the PMD driver mainly depends on this field.
-+ * performance because the PMD mainly depends on this field.
-  */
- struct rte_dma_fp_object {
- 	/** PMD-specific private data. The driver should copy
-diff --git a/lib/eal/include/rte_dev.h b/lib/eal/include/rte_dev.h
-index 6c3f774672..448a41cb0e 100644
---- a/lib/eal/include/rte_dev.h
-+++ b/lib/eal/include/rte_dev.h
+diff --git a/lib/librte_eal/include/rte_dev.h b/lib/librte_eal/include/rte_dev.h
+index 6dd72c11a1..ef3ce849be 100644
+--- a/lib/librte_eal/include/rte_dev.h
++++ b/lib/librte_eal/include/rte_dev.h
@@ -968,27 +870,5 @@
-diff --git a/lib/eal/include/rte_devargs.h b/lib/eal/include/rte_devargs.h
-index 71c8af9df3..37a0f042ab 100644
---- a/lib/eal/include/rte_devargs.h
-+++ b/lib/eal/include/rte_devargs.h
-@@ -35,7 +35,7 @@ extern "C" {
- /**
-  * Class type key in global devargs syntax.
-  *
-- * Legacy devargs parser doesn't parse class type. PMD driver is
-+ * Legacy devargs parser doesn't parse class type. PMD is
-  * encouraged to use this key to resolve class type.
-  */
- #define RTE_DEVARGS_KEY_CLASS "class"
-@@ -43,7 +43,7 @@ extern "C" {
- /**
-  * Driver type key in global devargs syntax.
-  *
-- * Legacy devargs parser doesn't parse driver type. PMD driver is
-+ * Legacy devargs parser doesn't parse driver type. PMD is
-  * encouraged to use this key to resolve driver type.
-  */
- #define RTE_DEVARGS_KEY_DRIVER "driver"
-diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
-index 096b676fc1..fa299c8ad7 100644
---- a/lib/ethdev/rte_ethdev.h
-+++ b/lib/ethdev/rte_ethdev.h
-@@ -2610,7 +2610,7 @@ int rte_eth_tx_hairpin_queue_setup
+diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
+index 57a2edf363..8856648d11 100644
+--- a/lib/librte_ethdev/rte_ethdev.h
++++ b/lib/librte_ethdev/rte_ethdev.h
+@@ -2321,7 +2321,7 @@ int rte_eth_tx_hairpin_queue_setup
@@ -1003 +883 @@
-@@ -2636,7 +2636,7 @@ int rte_eth_hairpin_get_peer_ports(uint16_t port_id, uint16_t *peer_ports,
+@@ -2347,7 +2347,7 @@ int rte_eth_hairpin_get_peer_ports(uint16_t port_id, uint16_t *peer_ports,
@@ -1012 +892 @@
-@@ -2663,7 +2663,7 @@ int rte_eth_hairpin_bind(uint16_t tx_port, uint16_t rx_port);
+@@ -2374,7 +2374,7 @@ int rte_eth_hairpin_bind(uint16_t tx_port, uint16_t rx_port);
@@ -1021 +901 @@
-@@ -2706,7 +2706,7 @@ int rte_eth_dev_is_valid_port(uint16_t port_id);
+@@ -2417,7 +2417,7 @@ int rte_eth_dev_is_valid_port(uint16_t port_id);
@@ -1030 +910 @@
-@@ -2724,7 +2724,7 @@ int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id);
+@@ -2435,7 +2435,7 @@ int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id);
@@ -1039 +919 @@
-@@ -2743,7 +2743,7 @@ int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id);
+@@ -2454,7 +2454,7 @@ int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id);
@@ -1048 +928 @@
-@@ -2761,7 +2761,7 @@ int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id);
+@@ -2472,7 +2472,7 @@ int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id);
@@ -1057 +937 @@
-@@ -2963,7 +2963,7 @@ int rte_eth_allmulticast_get(uint16_t port_id);
+@@ -2674,7 +2674,7 @@ int rte_eth_allmulticast_get(uint16_t port_id);
@@ -1064 +943,0 @@
-  *   - (-EINVAL) if bad parameter.
@@ -1066 +945,2 @@
-@@ -2979,7 +2979,7 @@ int rte_eth_link_get(uint16_t port_id, struct rte_eth_link *link);
+ int rte_eth_link_get(uint16_t port_id, struct rte_eth_link *link);
+@@ -2689,7 +2689,7 @@ int rte_eth_link_get(uint16_t port_id, struct rte_eth_link *link);
@@ -1073 +952,0 @@
-  *   - (-EINVAL) if bad parameter.
@@ -1074,0 +954 @@
+ int rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *link);

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'doc: capitalise PMD' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (74 preceding siblings ...)
  2021-11-28 14:54   ` patch 'fix PMD wording' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'doc: fix typo in coding style' " Xueming Li
                     ` (2 subsequent siblings)
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Sean Morrissey
  Cc: Luca Boccassi, John McNamara, Conor Walsh, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e64e8b4505399decdc8097cbdb43aebabe231eec

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e64e8b4505399decdc8097cbdb43aebabe231eec Mon Sep 17 00:00:00 2001
From: Sean Morrissey <sean.morrissey@intel.com>
Date: Mon, 22 Nov 2021 10:50:46 +0000
Subject: [PATCH] doc: capitalise PMD
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 35bd0a5c5891a59eba4a5d3904ef2e6c471a520d ]

The doc's contain references to pmd but the proper use is to use PMD.

Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 doc/guides/cryptodevs/ccp.rst          | 2 +-
 doc/guides/cryptodevs/openssl.rst      | 2 +-
 doc/guides/cryptodevs/overview.rst     | 2 +-
 doc/guides/eventdevs/opdl.rst          | 2 +-
 doc/guides/nics/octeontx.rst           | 4 ++--
 doc/guides/nics/octeontx2.rst          | 6 +++---
 doc/guides/nics/thunderx.rst           | 2 +-
 doc/guides/prog_guide/compressdev.rst  | 6 +++---
 doc/guides/rel_notes/release_18_02.rst | 4 ++--
 doc/guides/rel_notes/release_2_1.rst   | 2 +-
 doc/guides/sample_app_ug/vhost.rst     | 4 ++--
 doc/guides/vdpadevs/ifc.rst            | 4 ++--
 12 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/doc/guides/cryptodevs/ccp.rst b/doc/guides/cryptodevs/ccp.rst
index 36dae090f9..52e98b0859 100644
--- a/doc/guides/cryptodevs/ccp.rst
+++ b/doc/guides/cryptodevs/ccp.rst
@@ -100,7 +100,7 @@ The following parameters (all optional) can be provided in the previous two call
 
 * ccp_auth_opt: Specify authentication operations to perform on CPU using openssl APIs.
 
-To validate ccp pmd, l2fwd-crypto example can be used with following command:
+To validate ccp PMD, l2fwd-crypto example can be used with following command:
 
 .. code-block:: console
 
diff --git a/doc/guides/cryptodevs/openssl.rst b/doc/guides/cryptodevs/openssl.rst
index 848a2e8eb8..03041ceda1 100644
--- a/doc/guides/cryptodevs/openssl.rst
+++ b/doc/guides/cryptodevs/openssl.rst
@@ -69,7 +69,7 @@ use version 1.1.1g or newer.
 Initialization
 --------------
 
-User can use app/test application to check how to use this pmd and to verify
+User can use app/test application to check how to use this PMD and to verify
 crypto processing.
 
 Test name is cryptodev_openssl_autotest.
diff --git a/doc/guides/cryptodevs/overview.rst b/doc/guides/cryptodevs/overview.rst
index e2a1e08ec1..f9a58fbd3d 100644
--- a/doc/guides/cryptodevs/overview.rst
+++ b/doc/guides/cryptodevs/overview.rst
@@ -19,7 +19,7 @@ Supported Feature Flags
 
    - "OOP SGL In SGL Out" feature flag stands for
      "Out-of-place Scatter-gather list Input, Scatter-gather list Output",
-     which means pmd supports different scatter-gather styled input and output buffers
+     which means PMD supports different scatter-gather styled input and output buffers
      (i.e. both can consists of multiple segments).
 
    - "OOP SGL In LB Out" feature flag stands for
diff --git a/doc/guides/eventdevs/opdl.rst b/doc/guides/eventdevs/opdl.rst
index cbfd1f11b7..f220959249 100644
--- a/doc/guides/eventdevs/opdl.rst
+++ b/doc/guides/eventdevs/opdl.rst
@@ -87,7 +87,7 @@ due to the static nature of the underlying queues. It is because of this
 that the implementation can achieve such high throughput and low latency
 
 The following list is a comprehensive outline of the what is supported and
-the limitations / restrictions imposed by the opdl pmd
+the limitations / restrictions imposed by the opdl PMD
 
  - The order in which packets moved between queues is static and fixed \
    (dynamic scheduling is not supported).
diff --git a/doc/guides/nics/octeontx.rst b/doc/guides/nics/octeontx.rst
index b1a868b054..c348dfce74 100644
--- a/doc/guides/nics/octeontx.rst
+++ b/doc/guides/nics/octeontx.rst
@@ -108,7 +108,7 @@ for details.
 Initialization
 --------------
 
-The OCTEON TX ethdev pmd is exposed as a vdev device which consists of a set
+The OCTEON TX ethdev PMD is exposed as a vdev device which consists of a set
 of PKI and PKO PCIe VF devices. On EAL initialization,
 PKI/PKO PCIe VF devices will be probed and then the vdev device can be created
 from the application code, or from the EAL command line based on
@@ -126,7 +126,7 @@ the number of interesting ports with ``nr_ports`` argument.
 
 Dependency
 ~~~~~~~~~~
-``eth_octeontx`` pmd is depend on ``event_octeontx`` eventdev device and
+``eth_octeontx`` PMD is depend on ``event_octeontx`` eventdev device and
 ``octeontx_fpavf`` external mempool handler.
 
 Example:
diff --git a/doc/guides/nics/octeontx2.rst b/doc/guides/nics/octeontx2.rst
index 7b86cf5461..31d1cb5688 100644
--- a/doc/guides/nics/octeontx2.rst
+++ b/doc/guides/nics/octeontx2.rst
@@ -256,7 +256,7 @@ Limitations
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 The OCTEON TX2 SoC family NIC has inbuilt HW assisted external mempool manager.
-``net_octeontx2`` pmd only works with ``mempool_octeontx2`` mempool handler
+``net_octeontx2`` PMD only works with ``mempool_octeontx2`` mempool handler
 as it is performance wise most effective way for packet allocation and Tx buffer
 recycling on OCTEON TX2 SoC platform.
 
@@ -269,7 +269,7 @@ the host interface irrespective of the offload configuration.
 Multicast MAC filtering
 ~~~~~~~~~~~~~~~~~~~~~~~
 
-``net_octeontx2`` pmd supports multicast mac filtering feature only on physical
+``net_octeontx2`` PMD supports multicast mac filtering feature only on physical
 function devices.
 
 SDP interface support
@@ -278,7 +278,7 @@ OCTEON TX2 SDP interface support is limited to PF device, No VF support.
 
 Inline Protocol Processing
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
-``net_octeontx2`` pmd doesn't support the following features for packets to be
+``net_octeontx2`` PMD doesn't support the following features for packets to be
 inline protocol processed.
 - TSO offload
 - VLAN/QinQ offload
diff --git a/doc/guides/nics/thunderx.rst b/doc/guides/nics/thunderx.rst
index f233504ba3..f5d7d20576 100644
--- a/doc/guides/nics/thunderx.rst
+++ b/doc/guides/nics/thunderx.rst
@@ -371,7 +371,7 @@ Module params
 skip_data_bytes
 ~~~~~~~~~~~~~~~
 This feature is used to create a hole between HEADROOM and actual data. Size of hole is specified
-in bytes as module param("skip_data_bytes") to pmd.
+in bytes as module param("skip_data_bytes") to PMD.
 This scheme is useful when application would like to insert vlan header without disturbing HEADROOM.
 
 Example:
diff --git a/doc/guides/prog_guide/compressdev.rst b/doc/guides/prog_guide/compressdev.rst
index 231687d891..07d1a62a63 100644
--- a/doc/guides/prog_guide/compressdev.rst
+++ b/doc/guides/prog_guide/compressdev.rst
@@ -28,7 +28,7 @@ From the command line using the --vdev EAL option
 
 .. code-block:: console
 
-   --vdev  '<pmd name>,socket_id=0'
+   --vdev  '<PMD name>,socket_id=0'
 
 .. Note::
 
@@ -332,7 +332,7 @@ using priv_xform would look like:
      * pseudocode for stateless compression
      */
 
-    uint8_t cdev_id = rte_compressdev_get_dev_id(<pmd name>);
+    uint8_t cdev_id = rte_compressdev_get_dev_id(<PMD name>);
 
     /* configure the device. */
     if (rte_compressdev_configure(cdev_id, &conf) < 0)
@@ -475,7 +475,7 @@ An example pseudocode to set up and process a stream having NUM_CHUNKS with each
      * pseudocode for stateful compression
      */
 
-    uint8_t cdev_id = rte_compressdev_get_dev_id(<pmd name>);
+    uint8_t cdev_id = rte_compressdev_get_dev_id(<PMD name>);
 
     /* configure the  device. */
     if (rte_compressdev_configure(cdev_id, &conf) < 0)
diff --git a/doc/guides/rel_notes/release_18_02.rst b/doc/guides/rel_notes/release_18_02.rst
index 3523ea7fdc..4a1b8a92db 100644
--- a/doc/guides/rel_notes/release_18_02.rst
+++ b/doc/guides/rel_notes/release_18_02.rst
@@ -142,9 +142,9 @@ New Features
   * ``VIRTIO_NET_F_GUEST_UFO``, ``VIRTIO_NET_F_HOST_UFO``
   * ``VIRTIO_NET_F_GSO``
 
-  Also added ``VIRTIO_NET_F_GUEST_ANNOUNCE`` feature support in virtio pmd.
+  Also added ``VIRTIO_NET_F_GUEST_ANNOUNCE`` feature support in virtio PMD.
   In a scenario where the vhost backend doesn't have the ability to generate
-  RARP packets, the VM running virtio pmd can still be live migrated if
+  RARP packets, the VM running virtio PMD can still be live migrated if
   ``VIRTIO_NET_F_GUEST_ANNOUNCE`` feature is negotiated.
 
 * **Updated the AESNI-MB PMD.**
diff --git a/doc/guides/rel_notes/release_2_1.rst b/doc/guides/rel_notes/release_2_1.rst
index beadc51ba4..eb390a0941 100644
--- a/doc/guides/rel_notes/release_2_1.rst
+++ b/doc/guides/rel_notes/release_2_1.rst
@@ -243,7 +243,7 @@ New Features
 * **Added fm10k jumbo frame support.**
 
   Added support for jumbo frame less than 15K in both VF and PF functions in the
-  fm10k pmd.
+  fm10k PMD.
 
 
 * **Added fm10k mac vlan filtering support.**
diff --git a/doc/guides/sample_app_ug/vhost.rst b/doc/guides/sample_app_ug/vhost.rst
index d00693b293..fa2cf4e3a6 100644
--- a/doc/guides/sample_app_ug/vhost.rst
+++ b/doc/guides/sample_app_ug/vhost.rst
@@ -206,11 +206,11 @@ Common Issues
 * Option "builtin-net-driver" is incompatible with QEMU
 
   QEMU vhost net device start will fail if protocol feature is not negotiated.
-  DPDK virtio-user pmd can be the replacement of QEMU.
+  DPDK virtio-user PMD can be the replacement of QEMU.
 
 * Device start fails when enabling "builtin-net-driver" without memory
   pre-allocation
 
   The builtin example doesn't support dynamic memory allocation. When vhost
   backend enables "builtin-net-driver", "--socket-mem" option should be
-  added at virtio-user pmd side as a startup item.
+  added at virtio-user PMD side as a startup item.
diff --git a/doc/guides/vdpadevs/ifc.rst b/doc/guides/vdpadevs/ifc.rst
index f968489a75..706dbf740e 100644
--- a/doc/guides/vdpadevs/ifc.rst
+++ b/doc/guides/vdpadevs/ifc.rst
@@ -17,9 +17,9 @@ IFCVF vDPA Implementation
 IFCVF's vendor ID and device ID are same as that of virtio net pci device,
 with its specific subsystem vendor ID and device ID. To let the device be
 probed by IFCVF driver, adding "vdpa=1" parameter helps to specify that this
-device is to be used in vDPA mode, rather than polling mode, virtio pmd will
+device is to be used in vDPA mode, rather than polling mode, virtio PMD will
 skip when it detects this message. If no this parameter specified, device
-will not be used as a vDPA device, and it will be driven by virtio pmd.
+will not be used as a vDPA device, and it will be driven by virtio PMD.
 
 Different VF devices serve different virtio frontends which are in different
 VMs, so each VF needs to have its own DMA address translation service. During
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:07.154975080 +0800
+++ 0076-doc-capitalise-PMD.patch	2021-11-28 22:41:03.556870029 +0800
@@ -1 +1 @@
-From 35bd0a5c5891a59eba4a5d3904ef2e6c471a520d Mon Sep 17 00:00:00 2001
+From e64e8b4505399decdc8097cbdb43aebabe231eec Mon Sep 17 00:00:00 2001
@@ -4,0 +5 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
@@ -6 +7 @@
-The doc's contain references to pmd but the proper use is to use PMD.
+[ upstream commit 35bd0a5c5891a59eba4a5d3904ef2e6c471a520d ]
@@ -8 +9 @@
-Cc: stable@dpdk.org
+The doc's contain references to pmd but the proper use is to use PMD.
@@ -19 +19,0 @@
- doc/guides/nics/cnxk.rst               | 2 +-
@@ -28 +28 @@
- 13 files changed, 21 insertions(+), 21 deletions(-)
+ 12 files changed, 20 insertions(+), 20 deletions(-)
@@ -57 +57 @@
-index 1172297915..d754b0cfc6 100644
+index e2a1e08ec1..f9a58fbd3d 100644
@@ -82,13 +81,0 @@
-diff --git a/doc/guides/nics/cnxk.rst b/doc/guides/nics/cnxk.rst
-index 837ffc02b4..84f9865654 100644
---- a/doc/guides/nics/cnxk.rst
-+++ b/doc/guides/nics/cnxk.rst
-@@ -289,7 +289,7 @@ Limitations
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 
- The OCTEON CN9K/CN10K SoC family NIC has inbuilt HW assisted external mempool manager.
--``net_cnxk`` pmd only works with ``mempool_cnxk`` mempool handler
-+``net_cnxk`` PMD only works with ``mempool_cnxk`` mempool handler
- as it is performance wise most effective way for packet allocation and Tx buffer
- recycling on OCTEON TX2 SoC platform.
- 
@@ -96 +83 @@
-index 8236cc3e93..092120815d 100644
+index b1a868b054..c348dfce74 100644
@@ -118 +105 @@
-index eae32f0afe..4ce067f2c5 100644
+index 7b86cf5461..31d1cb5688 100644
@@ -149 +136 @@
-index d96395dafa..5ae7e607de 100644
+index f233504ba3..f5d7d20576 100644
@@ -193 +180 @@
-index 989017786b..af437e4153 100644
+index 3523ea7fdc..4a1b8a92db 100644
@@ -196 +183 @@
-@@ -105,9 +105,9 @@ New Features
+@@ -142,9 +142,9 @@ New Features
@@ -209 +196 @@
-index 0c34458316..35e6c88884 100644
+index beadc51ba4..eb390a0941 100644
@@ -212 +199 @@
-@@ -242,7 +242,7 @@ New Features
+@@ -243,7 +243,7 @@ New Features
@@ -222 +209 @@
-index 9afde9c7f5..a6ce4bc8ac 100644
+index d00693b293..fa2cf4e3a6 100644

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'doc: fix typo in coding style' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (75 preceding siblings ...)
  2021-11-28 14:54   ` patch 'doc: capitalise PMD' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'net/mlx5: fix devargs validation for multi-class probing' " Xueming Li
  2021-11-28 14:54   ` patch 'doc: fix a typo in EAL guide' " Xueming Li
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Dariusz Sosnowski; +Cc: Luca Boccassi, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7cc903a217422453fa97d505621aa5e1c4565c59

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7cc903a217422453fa97d505621aa5e1c4565c59 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Fri, 29 Oct 2021 16:19:02 +0300
Subject: [PATCH] doc: fix typo in coding style
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6965091e0bf15134328ed0038b03a7700dc17245 ]

This patch fixes a typo in DPDK Coding Style, in Return Values section,
i.e. replaces "indicated may" with "indicated by".

Fixes: 36032e46be40 ("doc: add coding style")

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/contributing/coding_style.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
index a2a8130c6b..baa366c218 100644
--- a/doc/guides/contributing/coding_style.rst
+++ b/doc/guides/contributing/coding_style.rst
@@ -619,7 +619,7 @@ Return Value
 ~~~~~~~~~~~~
 
 * Functions which create objects, or allocate memory, should return pointer types, and NULL on error.
-  The error type should be indicated may setting the variable ``rte_errno`` appropriately.
+  The error type should be indicated by setting the variable ``rte_errno`` appropriately.
 * Functions which work on bursts of packets, such as RX-like or TX-like functions, should return the number of packets handled.
 * Other functions returning int should generally behave like system calls:
   returning 0 on success and -1 on error, setting ``rte_errno`` to indicate the specific type of error.
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:07.197354472 +0800
+++ 0077-doc-fix-typo-in-coding-style.patch	2021-11-28 22:41:03.560203302 +0800
@@ -1 +1 @@
-From 6965091e0bf15134328ed0038b03a7700dc17245 Mon Sep 17 00:00:00 2001
+From 7cc903a217422453fa97d505621aa5e1c4565c59 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6965091e0bf15134328ed0038b03a7700dc17245 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 1ce5d00e36..0ec37c019b 100644
+index a2a8130c6b..baa366c218 100644

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'net/mlx5: fix devargs validation for multi-class probing' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (76 preceding siblings ...)
  2021-11-28 14:54   ` patch 'doc: fix typo in coding style' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  2021-11-28 14:54   ` patch 'doc: fix a typo in EAL guide' " Xueming Li
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Michael Baum; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f22425186efbea2a330270a76baa9ce1cdef6d12

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f22425186efbea2a330270a76baa9ce1cdef6d12 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Thu, 25 Nov 2021 08:16:55 +0200
Subject: [PATCH] net/mlx5: fix devargs validation for multi-class probing
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 8648fa2f4688c2ef2d7991bcc3bfa20753862e8e ]

The mlx5_args function reads the devargs and checks if they are valid
for this driver and if not it returns an error.

This was normal behavior as long as all the devargs come to this driver,
but since it is possible to run several drivers together, the function
may return an error for another driver's devarg even though it is
completely valid.
In addition the function does not allow the user to know which of the
devargs is incorrect, but returns an error without printing the
unknown devarg.

This patch eliminates the error return in the case of an unknown devarg,
and prints a warning for each such devarg specifically.

Fixes: 7b4f1e6bd367 ("common/mlx5: introduce common library")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5.c | 64 ++++++-----------------------------------
 1 file changed, 9 insertions(+), 55 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 800ca6af0a..0953561802 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1745,9 +1745,9 @@ mlx5_args_check(const char *key, const char *val, void *opaque)
 	} else if (strcmp(MLX5_DECAP_EN, key) == 0) {
 		config->decap_en = !!tmp;
 	} else {
-		DRV_LOG(WARNING, "%s: unknown parameter", key);
-		rte_errno = EINVAL;
-		return -rte_errno;
+		DRV_LOG(WARNING,
+			"%s: unknown parameter, maybe it's for another class.",
+			key);
 	}
 	return 0;
 }
@@ -1766,71 +1766,25 @@ mlx5_args_check(const char *key, const char *val, void *opaque)
 int
 mlx5_args(struct mlx5_dev_config *config, struct rte_devargs *devargs)
 {
-	const char **params = (const char *[]){
-		MLX5_RXQ_CQE_COMP_EN,
-		MLX5_RXQ_PKT_PAD_EN,
-		MLX5_RX_MPRQ_EN,
-		MLX5_RX_MPRQ_LOG_STRIDE_NUM,
-		MLX5_RX_MPRQ_LOG_STRIDE_SIZE,
-		MLX5_RX_MPRQ_MAX_MEMCPY_LEN,
-		MLX5_RXQS_MIN_MPRQ,
-		MLX5_TXQ_INLINE,
-		MLX5_TXQ_INLINE_MIN,
-		MLX5_TXQ_INLINE_MAX,
-		MLX5_TXQ_INLINE_MPW,
-		MLX5_TXQS_MIN_INLINE,
-		MLX5_TXQS_MAX_VEC,
-		MLX5_TXQ_MPW_EN,
-		MLX5_TXQ_MPW_HDR_DSEG_EN,
-		MLX5_TXQ_MAX_INLINE_LEN,
-		MLX5_TX_DB_NC,
-		MLX5_TX_PP,
-		MLX5_TX_SKEW,
-		MLX5_TX_VEC_EN,
-		MLX5_RX_VEC_EN,
-		MLX5_L3_VXLAN_EN,
-		MLX5_VF_NL_EN,
-		MLX5_DV_ESW_EN,
-		MLX5_DV_FLOW_EN,
-		MLX5_DV_XMETA_EN,
-		MLX5_LACP_BY_USER,
-		MLX5_MR_EXT_MEMSEG_EN,
-		MLX5_REPRESENTOR,
-		MLX5_MAX_DUMP_FILES_NUM,
-		MLX5_LRO_TIMEOUT_USEC,
-		MLX5_CLASS_ARG_NAME,
-		MLX5_HP_BUF_SIZE,
-		MLX5_RECLAIM_MEM,
-		MLX5_SYS_MEM_EN,
-		MLX5_DECAP_EN,
-		NULL,
-	};
 	struct rte_kvargs *kvlist;
 	int ret = 0;
-	int i;
 
 	if (devargs == NULL)
 		return 0;
 	/* Following UGLY cast is done to pass checkpatch. */
-	kvlist = rte_kvargs_parse(devargs->args, params);
+	kvlist = rte_kvargs_parse(devargs->args, NULL);
 	if (kvlist == NULL) {
 		rte_errno = EINVAL;
 		return -rte_errno;
 	}
 	/* Process parameters. */
-	for (i = 0; (params[i] != NULL); ++i) {
-		if (rte_kvargs_count(kvlist, params[i])) {
-			ret = rte_kvargs_process(kvlist, params[i],
-						 mlx5_args_check, config);
-			if (ret) {
-				rte_errno = EINVAL;
-				rte_kvargs_free(kvlist);
-				return -rte_errno;
-			}
-		}
+	ret = rte_kvargs_process(kvlist, NULL, mlx5_args_check, config);
+	if (ret) {
+		rte_errno = EINVAL;
+		ret = -rte_errno;
 	}
 	rte_kvargs_free(kvlist);
-	return 0;
+	return ret;
 }
 
 /**
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:07.236902258 +0800
+++ 0078-net-mlx5-fix-devargs-validation-for-multi-class-prob.patch	2021-11-28 22:41:03.560203302 +0800
@@ -1 +1 @@
-From 8648fa2f4688c2ef2d7991bcc3bfa20753862e8e Mon Sep 17 00:00:00 2001
+From f22425186efbea2a330270a76baa9ce1cdef6d12 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8648fa2f4688c2ef2d7991bcc3bfa20753862e8e ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -26,2 +28,2 @@
- drivers/net/mlx5/mlx5.c | 68 ++++++-----------------------------------
- 1 file changed, 9 insertions(+), 59 deletions(-)
+ drivers/net/mlx5/mlx5.c | 64 ++++++-----------------------------------
+ 1 file changed, 9 insertions(+), 55 deletions(-)
@@ -30 +32 @@
-index 4e04817d11..aa5f313c1a 100644
+index 800ca6af0a..0953561802 100644
@@ -33,3 +35,3 @@
-@@ -1975,9 +1975,9 @@ mlx5_args_check(const char *key, const char *val, void *opaque)
- 		config->std_delay_drop = !!(tmp & MLX5_DELAY_DROP_STANDARD);
- 		config->hp_delay_drop = !!(tmp & MLX5_DELAY_DROP_HAIRPIN);
+@@ -1745,9 +1745,9 @@ mlx5_args_check(const char *key, const char *val, void *opaque)
+ 	} else if (strcmp(MLX5_DECAP_EN, key) == 0) {
+ 		config->decap_en = !!tmp;
@@ -46 +48 @@
-@@ -1996,75 +1996,25 @@ mlx5_args_check(const char *key, const char *val, void *opaque)
+@@ -1766,71 +1766,25 @@ mlx5_args_check(const char *key, const char *val, void *opaque)
@@ -51 +52,0 @@
--		MLX5_DRIVER_KEY,
@@ -83 +84 @@
--		RTE_DEVARGS_KEY_CLASS,
+-		MLX5_CLASS_ARG_NAME,
@@ -88,3 +88,0 @@
--		MLX5_ALLOW_DUPLICATE_PATTERN,
--		MLX5_MR_MEMPOOL_REG_EN,
--		MLX5_DELAY_DROP,

^ permalink raw reply	[flat|nested] 345+ messages in thread

* patch 'doc: fix a typo in EAL guide' has been queued to stable release 20.11.4
  2021-11-28 14:53 ` your patch " Xueming Li
                     ` (77 preceding siblings ...)
  2021-11-28 14:54   ` patch 'net/mlx5: fix devargs validation for multi-class probing' " Xueming Li
@ 2021-11-28 14:54   ` Xueming Li
  78 siblings, 0 replies; 345+ messages in thread
From: Xueming Li @ 2021-11-28 14:54 UTC (permalink / raw)
  To: Kefu Chai; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f0ff3aa20e2a04582ae5f13d6a402a459a7f97b5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f0ff3aa20e2a04582ae5f13d6a402a459a7f97b5 Mon Sep 17 00:00:00 2001
From: Kefu Chai <tchaikov@gmail.com>
Date: Mon, 18 Oct 2021 22:29:23 +0800
Subject: [PATCH] doc: fix a typo in EAL guide
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit 6c16a05c8c03a1f78c16e468eed3480c6ddb0349 ]

Change from "how many segments each segment can have" to
"how many segments each segment list can have".

Fixes: b31739328354 ("doc: update guides for memory subsystem")

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
---
 doc/guides/prog_guide/env_abstraction_layer.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guides/prog_guide/env_abstraction_layer.rst b/doc/guides/prog_guide/env_abstraction_layer.rst
index d124eb0e9a..29f6fefc48 100644
--- a/doc/guides/prog_guide/env_abstraction_layer.rst
+++ b/doc/guides/prog_guide/env_abstraction_layer.rst
@@ -204,8 +204,8 @@ variables:
 * ``RTE_MAX_MEMSEG_LISTS`` controls how many segment lists can DPDK have
 * ``RTE_MAX_MEM_MB_PER_LIST`` controls how much megabytes of memory each
   segment list can address
-* ``RTE_MAX_MEMSEG_PER_LIST`` controls how many segments each segment can
-  have
+* ``RTE_MAX_MEMSEG_PER_LIST`` controls how many segments each segment list
+  can have
 * ``RTE_MAX_MEMSEG_PER_TYPE`` controls how many segments each memory type
   can have (where "type" is defined as "page size + NUMA node" combination)
 * ``RTE_MAX_MEM_MB_PER_TYPE`` controls how much megabytes of memory each
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:07.277412786 +0800
+++ 0079-doc-fix-a-typo-in-EAL-guide.patch	2021-11-28 22:41:03.560203302 +0800
@@ -1 +1 @@
-From 6c16a05c8c03a1f78c16e468eed3480c6ddb0349 Mon Sep 17 00:00:00 2001
+From f0ff3aa20e2a04582ae5f13d6a402a459a7f97b5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6c16a05c8c03a1f78c16e468eed3480c6ddb0349 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 345+ messages in thread

* Re: patch 'crypto/ipsec_mb: fix cipher key setting' has been queued to stable release 20.11.4
  2021-11-28 14:54   ` patch 'crypto/ipsec_mb: fix cipher key setting' " Xueming Li
@ 2021-12-06 12:45     ` Xueming(Steven) Li
  0 siblings, 0 replies; 345+ messages in thread
From: Xueming(Steven) Li @ 2021-12-06 12:45 UTC (permalink / raw)
  To: pablo.de.lara.guarch; +Cc: stable, ciara.power, roy.fan.zhang, bluca

Hi Pablo,

On Sun, 2021-11-28 at 22:54 +0800, Xueming Li wrote:
> Hi,
> 
> FYI, your patch has been queued to stable release 20.11.4
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 11/30/21. So please
> shout if anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
> 
> Queued patches are on a temporary branch at:
> https://github.com/steevenlee/dpdk
> 
> This queued commit can be viewed at:
> https://github.com/steevenlee/dpdk/commit/6096e4200509865f35a2cf9383da0af76bc68aff
> 
> Thanks.
> 
> Xueming Li <xuemingl@nvidia.com>
> 
> ---
> From 6096e4200509865f35a2cf9383da0af76bc68aff Mon Sep 17 00:00:00 2001
> From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> Date: Mon, 22 Nov 2021 17:47:29 +0000
> Subject: [PATCH] crypto/ipsec_mb: fix cipher key setting
> Cc: Xueming Li <xuemingl@nvidia.com>
> 
> [ upstream commit b0a37e8cd2ac559202086d88c1761e0b6406b445 ]
> 
> When authenticating with SNOW3G, KASUMI and ZUC,
> the pointers for encryption/decryption keys is not set.
> If a cipher algorithm such as AES-CBC is also used,
> the application would seg fault.
> Hence, these pointers should be set to some value by default.
> 
> Command line to replicate the issue:
> ./build/app/dpdk-test-crypto-perf -l 4,5 -n 6 --vdev="crypto_aesni_mb" -- \
>  --devtype="crypto_aesni_mb" --optype=cipher-then-auth --auth-algo \
>  snow3g-uia2 --auth-key-sz 16 --auth-iv-sz 16 --digest-sz 4 --silent \
>  --total-ops 1000000 --auth-op generate --burst-sz 32 \
>  --cipher-algo aes-ctr --cipher-key-sz 16 --cipher-iv-sz 16
> 
> Fixes: ae8e085c608d ("crypto/aesni_mb: support KASUMI F8/F9")
> Fixes: 6c42e0cf4d12 ("crypto/aesni_mb: support SNOW3G-UEA2/UIA2")
> Fixes: fd8df85487c4 ("crypto/aesni_mb: support ZUC-EEA3/EIA3")
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> Acked-by: Ciara Power <ciara.power@intel.com>
> Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
>  drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 19 ++++++++-----------
>  1 file changed, 8 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> index 03186485f9..6e14788fd0 100644
> --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> @@ -1267,6 +1267,14 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
>  
>  	const int aead = is_aead_algo(job->hash_alg, job->cipher_mode);
>  
> +	if (job->cipher_mode == IMB_CIPHER_DES3) {

In 20.11, intel-ipsec-mb 0.52 is required, IMB_CIPHER_DES3 not defined,
comiple error happens in server with lower verison.
Changed it to DES3, please let me know if wrong.

Regards,
Xueming

> +		job->enc_keys = session->cipher.exp_3des_keys.ks_ptr;
> +		job->dec_keys = session->cipher.exp_3des_keys.ks_ptr;
> +	} else {
> +		job->enc_keys = session->cipher.expanded_aes_keys.encode;
> +		job->dec_keys = session->cipher.expanded_aes_keys.decode;
> +	}
> +
>  	switch (job->hash_alg) {
>  	case AES_XCBC:
>  		job->u.XCBC._k1_expanded = session->auth.xcbc.k1_expanded;
> @@ -1339,17 +1347,6 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
>  		job->u.HMAC._hashed_auth_key_xor_ipad = session->auth.pads.inner;
>  		job->u.HMAC._hashed_auth_key_xor_opad = session->auth.pads.outer;
>  
> -		if (job->cipher_mode == DES3) {
> -			job->aes_enc_key_expanded =
> -				session->cipher.exp_3des_keys.ks_ptr;
> -			job->aes_dec_key_expanded =
> -				session->cipher.exp_3des_keys.ks_ptr;
> -		} else {
> -			job->aes_enc_key_expanded =
> -				session->cipher.expanded_aes_keys.encode;
> -			job->aes_dec_key_expanded =
> -				session->cipher.expanded_aes_keys.decode;
> -		}
>  	}
>  
>  	if (aead)


^ permalink raw reply	[flat|nested] 345+ messages in thread

end of thread, other threads:[~2021-12-06 12:45 UTC | newest]

Thread overview: 345+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-10  6:28 [dpdk-stable] patches queued to stable release 20.11.4 Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/i40e: support 25G AOC/ACC cables' has been " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'examples/performance-thread: fix build with clang 12.0.1' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'drivers/net: fix typo in vector Rx comment' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'drivers/net: fix vector Rx comments' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice/base: fix typo in comment' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice: fix max entry number for ACL normal priority' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/txgbe: fix reading SFP module SFF-8472 data' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/mlx5: fix mbuf replenishment check for zipped CQE' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/mlx5: fix eCPRI matching' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/bnxt: update ring group after ring stop start' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'app/testpmd: fix Tx retry in flowgen engine' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/bnxt: fix crash after port stop/start' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'app/testpmd: fix check without outer checksum' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'app/testpmd: fix dump of Tx offload flags' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'crypto/octeontx2: fix unaligned access to device memory' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'eal/ppc: ignore GCC 10 stringop-overflow warnings' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'config/ppc: ignore GCC 11 psabi " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'crypto/openssl: fix CCM processing 0 length source' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'common/dpaax/caamflib: fix IV for short MAC-I in SNOW3G' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/nfp: fix minimum descriptor sizes' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice: fix memzone leak after device init failure' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice: fix RXDID default value in DCF' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice: fix deadlock on flow query' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice: fix queue config in DCF' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/iavf: fix overflow in maximum packet length config' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/ixgbe: fix Rx multicast statistics after reset' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/bnxt: fix mbuf VLAN in scalar Rx' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/bnxt: check FW capability for VLAN offloads' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/bnxt: fix ring group free' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/bnxt: fix double allocation of ring groups' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/af_xdp: fix zero-copy Tx queue drain' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'doc: fix bonding driver name' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/axgbe: fix unreleased lock in I2C transfer' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/pcap: fix resource leakage on port probe' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/hns3: fix queue flow action validation' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/hns3: fix taskqueue pair reset command' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/sfc: set FDIR bit for flow mark in EF100 Rx' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/ixgbe: fix hash handle leak' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/ixgbe: fix queue resource " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/ixgbe: fix MAC " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/ixgbe: fix mbuf " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/ice: fix performance with writeback policy' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'build: propagate Windows system dependencies to pkg-config' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'test/func_reentrancy: free memzones after test' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'examples/service_cores: fix lcore count check' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'eal: fix memory leak when saving arguments' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'ethdev: fix typo in Rx queue setup API comment' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net: fix checksum offload for outer IPv4' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/virtio: fix mbuf count on Rx queue setup' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/virtio: fix split queue vectorized Rx' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/virtio: avoid unneeded link interrupt configuration' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/virtio-user: fix Rx interrupts with multi-queue' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'vhost: fix crash on port deletion' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'net/virtio: fix repeated freeing of virtqueue' " Xueming Li
2021-11-10  6:28 ` [dpdk-stable] patch 'vhost: log socket path on adding connection' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/virtio: fix device configure without jumbo Rx offload' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/octeontx2: fix MTU when PTP is enabled' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/i40e: fix mbuf leak' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/i40e: fix device startup resource release' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/ice/base: fix PF ID for DCF' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/iavf: fix mbuf leak' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/i40e/base: fix resource leakage' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/iavf: fix Rx queue buffer size alignment' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'doc: fix numbers power of 2 in LPM6 guide' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'bus/pci: fix unknown NUMA node value on Windows' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'sched: get 64-bit greatest common divisor' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'vdpa/mlx5: fix large VM memory region registration' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'stack: fix reload head when pop fails' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix parsing of flow queue' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'test/compress: fix buffer overflow' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/bonding: fix memory leak on closing device' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/ice/base: calculate logical PF ID' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/iavf: fix mbuf leak' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/octeontx: fix access to indirect buffers' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/mlx5: fix memory leak on context allocation failure' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/mlx5: fix shared RSS destruction' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/memif: fix chained mbuf determination' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'kvargs: fix comments style' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'bus/pci: fix unknown NUMA node value on Windows' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'eal/windows: export version function' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'eal: remove Windows-specific list of common files' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'ring: fix Doxygen comment of internal function' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'bitrate: fix registration to match API description' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'bitrate: fix calculation " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'usertools: fix handling EOF for telemetry input pipe' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'eal/freebsd: lock memory device to prevent conflicts' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'test/mem: fix memory autotests on FreeBSD' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'vhost: clean IOTLB cache on vring stop' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/virtio: fix Tx cleanup functions to have same signature' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/virtio: fix Tx completed mbuf leak on device stop' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/virtio: do not use PMD log type' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/iavf: fix high CPU usage on frequent command' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/ice: fix double free ACL flow entry' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/iavf: fix Rx queue IRQ resource leak' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'common/iavf: fix ARQ " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/ice: retry getting VF VSI map after failure' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/bnxt: fix function driver register/unregister' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/bnxt: fix Tx queue startup state' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/bnxt: fix memzone free for Tx and Rx rings' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/bnxt: fix tunnel port accounting' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/mlx5: fix flow tables double release' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'bus/vmbus: fix leak on device scan' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'test/latency: fix loop boundary' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'raw/ifpga/base: fix linking with librt' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'common/dpaax: fix physical address conversion' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'ethdev: fix xstats by ID API documentation' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/e1000: fix memzone leak on queue re-configure' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/ice: " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/i40e: " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/ixgbe: " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net/hns3: fix input parameters of MAC functions' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'net: fix checksum API documentation' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'eal/windows: fix CPU cores counting' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'eal/windows: do not install virt2phys header' " Xueming Li
2021-11-10  6:29 ` [dpdk-stable] patch 'examples/fips_validation: remove unused allocation' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'examples/fips_validation: fix resetting pointer' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'test/event_crypto: fix event crypto metadata write' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'test/service: fix some comment' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'test/service: fix race in attr check' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'eal/x86: fix some CPU extended features definitions' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'bus/vmbus: fix ring buffer mapping in secondary process' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'eal/freebsd: ignore in-memory option' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'telemetry: fix JSON output buffer length' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'mbuf: fix typo in comment' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'ip_frag: fix fragmenting IPv4 fragment' " Xueming Li
2021-11-10  6:57   ` Huichao Cai
2021-11-10  8:02     ` Xueming(Steven) Li
2021-11-10  6:30 ` [dpdk-stable] patch 'test/atomic: fix 128-bit atomic test with many cores' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'mbuf: enforce no option for dynamic fields and flags' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'mempool: deprecate unused physical page defines' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'app/crypto-perf: fix AAD template copy overrun' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'cryptodev: fix multi-segment raw vector processing' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'test/bpf: fix undefined behavior with clang' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/af_xdp: disable secondary process support' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'app/testpmd: update forward engine beginning' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'app/testpmd: fix txonly forwarding' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/bonding: fix dedicated queue mode in vector burst' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/bonding: fix RSS key length' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'app/testpmd: retain all original dev conf when config DCB' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/sfc: free MAE lock once switch domain is assigned' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/sfc: update comment about representor support' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e: fix Rx packet statistics' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/ixgbe: fix queue release' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix PF reset' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix update link data for X722' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix AOC media type' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix function name in comments' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix potentially uninitialized variables' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e/base: fix using checksum before check' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/mlx5: fix software parsing support query' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/mlx5: fix tunneling " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/enic: fix filter mode detection' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/softnic: fix useless address check' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'app/testpmd: fix hex string parser in flow commands' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/txgbe: fix to get interrupt status' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'drivers/net: remove queue xstats auto-fill flag' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/ice: fix deadlock on flow redirect' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'doc: fix emulated device names in e1000 guide' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net: fix aliasing in checksum computation' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/ena: fix offload capabilities verification' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/ena: fix per-queue offload capabilities' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/ena: advertise scattered Rx capability' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'app/testpmd: fix access to DSCP table entries' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'app/testpmd: add tunnel types' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/mlx5: support more " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/ice: fix generic build on FreeBSD' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/i40e: fix risk in descriptor read in NEON Rx' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'ethdev: forbid closing started device' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'test/hash: fix buffer overflow with jhash' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'mbuf: fix reset on mbuf free' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'app/eventdev: fix terminal colour after control-c exit' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'eventdev/eth_rx: fix WRR buffer overrun' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'bpf: allow self-xor operation' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'devtools: fix letter case check in commit title' " Xueming Li
2021-11-10  6:30 ` [dpdk-stable] patch 'cmdline: free on exit' " Xueming Li
2021-11-10  7:23   ` Peng, ZhihongX
2021-11-10  8:29     ` Xueming(Steven) Li
2021-11-10  6:30 ` [dpdk-stable] patch 'net/mlx5: fix Rx queue resource cleanup' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net/mlx5: close tools socket with last device' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net/virtio: fix check scatter on all Rx queues' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'vdpa/mlx5: workaround FW first completion in start' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'vdpa/mlx5: retry VAR allocation during vDPA restart' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'vhost: add sanity check on inflight last index' " Xueming Li
2021-11-10 10:54   ` Li Feng
2021-11-10  6:31 ` [dpdk-stable] patch 'net/virtio: fix indirect descriptor reconnection' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net/virtio: fix avail descriptor ID' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'ethdev: fix PCI device release in secondary process' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'app/testpmd: fix packet burst spreading stats' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'test/event: fix timer adapter creation test' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'pipeline: fix instruction label check' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'usertools/pmdinfo: fix plugin auto scan' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'doc: fix default mempool option in guides' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net: avoid cast-align warning in VLAN insert function' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'mbuf: avoid cast-align warning in data offset macro' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'eal/x86: avoid cast-align warning in memcpy functions' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'eal: reset lcore task callback and argument' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'hash: fix Doxygen comment of Toeplitz file' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'lpm6: fix buffer overflow' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'rib: fix IPv6 depth mask' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'eal/windows: fix IOVA mode detection and handling' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'common/mlx5: fix physical port name recognition' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net/i40e: fix buffer size alignment' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net/i40evf: extend the polling times of vf reset' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'test: fix ring PMD initialisation' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'pipeline: fix build with ASan' " Xueming Li
2021-11-10  7:27   ` Peng, ZhihongX
2021-11-10  8:33     ` Xueming(Steven) Li
2021-11-10  6:31 ` [dpdk-stable] patch 'examples/performance-thread: " Xueming Li
2021-11-10  7:27   ` Peng, ZhihongX
2021-11-10  8:35     ` Xueming(Steven) Li
2021-11-10  6:31 ` [dpdk-stable] patch 'eal/freebsd: fix IOVA mode selection' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'test/cmdline: fix memory leak' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'test/mbuf: fix access to freed memory' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'eal: fix device iterator when no bus is selected' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'eal/linux: remove unused variable for socket memory' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'eal/linux: fix uevent message parsing' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'malloc: fix allocation with unknown socket ID' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'mem: fix dynamic hugepage mapping in container' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net/ice: fix function pointer in multi-process' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net/iavf: fix shared data " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'doc: update NIC feature matrix for bnxt' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'app/testpmd: fix RSS key length' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'app/testpmd: fix RSS type display' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net/mlx5: fix RSS RETA update' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net/virtio: fix link update in speed feature' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net/hns3: fix mailbox communication with HW' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net/i40e: fix 32-bit build' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net/bnxt: fix firmware version query' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net/enic: avoid error message when no advanced filtering' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net/ice: save rule on switch filter creation' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net/ice: fix flow redirect' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net/hns3: fix secondary process reference count' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net/hns3: fix multi-process action register and unregister' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net/hns3: unregister MP action on close for secondary' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'net/txgbe: fix packet statistics' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'test/crypto: fix max length for raw data path' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'crypto/qat: fix status in RSA decryption' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'crypto/qat: fix uncleared cookies after operation' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'examples/fips_validation: fix device start' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'test/compress-perf: remove unused variable' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'examples/ipsec-secgw: move global array from header' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'common/qat: fix queue pairs number' " Xueming Li
2021-11-10  6:31 ` [dpdk-stable] patch 'common/mlx5: fix flex parser DevX creation routine' " Xueming Li
2021-11-10  6:32 ` [dpdk-stable] patch 'net/mlx5: fix Altivec Rx' " Xueming Li
2021-11-10  6:32 ` [dpdk-stable] patch 'net/mlx5: fix Rx queue memory allocation return value' " Xueming Li
2021-11-10  6:32 ` [dpdk-stable] patch 'net/i40e: fix forward outer IPv6 VXLAN' " Xueming Li
2021-11-10  6:32 ` [dpdk-stable] patch 'ethdev: fix crash on owner delete' " Xueming Li
2021-11-10  6:32 ` [dpdk-stable] patch 'common/sfc_efx: fix debug compilation control' " Xueming Li
2021-11-10  6:32 ` [dpdk-stable] patch 'app/testpmd: remove double dependency on bitrate lib' " Xueming Li
2021-11-10  6:32 ` [dpdk-stable] patch 'common/mlx5: remove unreachable branch in UAR allocation' " Xueming Li
2021-11-10  6:32 ` [dpdk-stable] patch 'common/mlx5: fix UAR allocation diagnostics messages' " Xueming Li
2021-11-10  6:32 ` [dpdk-stable] patch 'net/mlx5: remove duplicated reference of Tx doorbell' " Xueming Li
2021-11-10  6:32 ` [dpdk-stable] patch 'kni: check error code of allmulticast mode switch' " Xueming Li
2021-11-10  6:32 ` [dpdk-stable] patch 'vfio: fix FreeBSD clear group stub' " Xueming Li
2021-11-10  6:32 ` [dpdk-stable] patch 'vfio: fix FreeBSD documentation' " Xueming Li
2021-11-10  6:32 ` [dpdk-stable] patch 'vfio: set errno on unsupported OS' " Xueming Li
2021-11-10  6:32 ` [dpdk-stable] patch 'interrupt: fix request notifier interrupt processing' " Xueming Li
2021-11-10  6:32 ` [dpdk-stable] patch 'net/hns3: simplify queue DMA address arithmetic' " Xueming Li
2021-11-10  6:32 ` [dpdk-stable] patch 'app/testpmd: remove unused header file' " Xueming Li
2021-11-10  6:32 ` [dpdk-stable] patch 'ip_frag: revert fix fragmenting IPv4 fragment' " Xueming Li
2021-11-10  7:09   ` Huichao Cai
2021-11-10  8:38     ` Xueming(Steven) Li
2021-11-28 14:53 ` your patch " Xueming Li
2021-11-28 14:53   ` patch 'common/mlx5: glue MR registration with IOVA' " Xueming Li
2021-11-28 14:53   ` patch 'common/mlx5: create wrapped MR' " Xueming Li
2021-11-28 14:53   ` patch 'vdpa/mlx5: workaround dirty bitmap MR creation' " Xueming Li
2021-11-28 14:53   ` patch 'vdpa/mlx5: workaround guest MR registrations' " Xueming Li
2021-11-28 14:53   ` patch 'net/mlx5: workaround MR creation for flow counter' " Xueming Li
2021-11-28 14:53   ` patch 'power: fix build with clang 13' " Xueming Li
2021-11-28 14:53   ` patch 'net/mlx5: fix tunnel offload validation' " Xueming Li
2021-11-28 14:53   ` patch 'net/mlx5: fix tag ID conflict with sample action' " Xueming Li
2021-11-28 14:53   ` patch 'net/mlx5: fix RETA update without stopping device' " Xueming Li
2021-11-28 14:53   ` patch 'common/mlx5: fix build for zero-length headroom array' " Xueming Li
2021-11-28 14:53   ` patch 'doc: describe timestamp limitations for mlx5' " Xueming Li
2021-11-28 14:53   ` patch 'net/i40e: fix risk in descriptor read in scalar Rx' " Xueming Li
2021-11-28 14:53   ` patch 'net/iavf: fix pointer of meta data' " Xueming Li
2021-11-28 14:53   ` patch 'net/mlx5: fix Tx scheduling check' " Xueming Li
2021-11-28 14:53   ` patch 'app/testpmd: fix DCB in VT configuration' " Xueming Li
2021-11-28 14:53   ` patch 'ethdev: fix typos' " Xueming Li
2021-11-28 14:53   ` patch 'test/red: fix typo in test description' " Xueming Li
2021-11-28 14:53   ` patch 'net/hinic/base: remove some unused variables' " Xueming Li
2021-11-28 14:53   ` patch 'net/octeontx: remove unused packet length' " Xueming Li
2021-11-28 14:53   ` patch 'bus/fslmc: remove unused device count' " Xueming Li
2021-11-28 14:53   ` patch 'event/sw: remove unused inflight events " Xueming Li
2021-11-28 14:53   ` patch 'net/bnxt: remove some unused variables' " Xueming Li
2021-11-28 14:53   ` patch 'net/liquidio: remove unused counter' " Xueming Li
2021-11-28 14:53   ` patch 'net/nfp: remove unused message length' " Xueming Li
2021-11-28 14:53   ` patch 'net/qede/base: remove unused message size' " Xueming Li
2021-11-28 14:53   ` patch 'net/vmxnet3: fix build with clang 13' " Xueming Li
2021-11-28 14:53   ` patch 'test/distributor: remove unused counter' " Xueming Li
2021-11-28 14:53   ` patch 'examples/performance-thread: remove unused hits count' " Xueming Li
2021-11-28 14:53   ` patch 'eventdev/eth_tx: fix queue delete logic' " Xueming Li
2021-11-28 14:53   ` patch 'event/dlb2: fix delayed pop test in selftest' " Xueming Li
2021-11-28 14:53   ` patch 'test/crypto: skip plain text compare for null cipher' " Xueming Li
2021-11-28 14:53   ` patch 'test/crypto: fix data lengths' " Xueming Li
2021-11-28 14:53   ` patch 'test/crypto: fix missing return checks' " Xueming Li
2021-11-28 14:53   ` patch 'common/cpt: fix KASUMI input length' " Xueming Li
2021-11-28 14:53   ` patch 'test/crypto: remove unnecessary stats retrieval' " Xueming Li
2021-11-28 14:53   ` patch 'examples/l3fwd-power: fix early shutdown' " Xueming Li
2021-11-28 14:53   ` patch 'examples/multi_process: fix Rx packets distribution' " Xueming Li
2021-11-28 14:53   ` patch 'fix spelling in comments and doxygen' " Xueming Li
2021-11-28 14:53   ` patch 'config/x86: skip GNU binutils bug check for LLVM' " Xueming Li
2021-11-28 14:53   ` patch 'examples/ntb: fix build dependency' " Xueming Li
2021-11-28 14:53   ` patch 'app/flow-perf: fix parsing of invalid option' " Xueming Li
2021-11-28 14:53   ` patch 'doc: fix Doxygen examples build on FreeBSD' " Xueming Li
2021-11-28 14:53   ` patch 'vdpa/mlx5: fix mkey creation check' " Xueming Li
2021-11-28 14:53   ` patch 'net/mlx5: fix VXLAN-GPE next protocol translation' " Xueming Li
2021-11-28 14:53   ` patch 'net/mlx5: add Ethernet header to GENEVE RSS expansion' " Xueming Li
2021-11-28 14:53   ` patch 'net/mlx5: fix RSS expansion scheme for GRE header' " Xueming Li
2021-11-28 14:53   ` patch 'net/mlx5: fix GENEVE protocol type translation' " Xueming Li
2021-11-28 14:53   ` patch 'net/mlx5: fix GRE " Xueming Li
2021-11-28 14:53   ` patch 'net/hns3: optimize Tx performance by mbuf fast free' " Xueming Li
2021-11-28 14:53   ` patch 'net/mlx5: fix mutex unlock in Tx packet pacing cleanup' " Xueming Li
2021-11-28 14:53   ` patch 'net/bnxt: fix Rx next consumer index in mbuf alloc fail' " Xueming Li
2021-11-28 14:53   ` patch 'net/failsafe: fix secondary process probe' " Xueming Li
2021-11-28 14:53   ` patch 'app/testpmd: fix tunnel offload validation' " Xueming Li
2021-11-28 14:53   ` patch 'net/mlx5: fix partial inline of fine grain packets' " Xueming Li
2021-11-28 14:53   ` patch 'net/mlx5: fix MPLS tunnel outer layer overwrite' " Xueming Li
2021-11-28 14:54   ` patch 'common/mlx5: fix user mode register access attribute' " Xueming Li
2021-11-28 14:54   ` patch 'crypto/ipsec_mb: fix cipher key setting' " Xueming Li
2021-12-06 12:45     ` Xueming(Steven) Li
2021-11-28 14:54   ` patch 'drivers/crypto: fix IPsec TTL decrement option' " Xueming Li
2021-11-28 14:54   ` patch 'kni: restrict bifurcated device support' " Xueming Li
2021-11-28 14:54   ` patch 'mbuf: fix dump of dynamic fields and flags' " Xueming Li
2021-11-28 14:54   ` patch 'doc: strip build artefacts for examples file list' " Xueming Li
2021-11-28 14:54   ` patch 'examples/ptpclient: fix delay request message' " Xueming Li
2021-11-28 14:54   ` patch 'doc: remove repeated repeated words' " Xueming Li
2021-11-28 14:54   ` patch 'net/bnxt: fix autoneg on PAM4 links' " Xueming Li
2021-11-28 14:54   ` patch 'net/mlx5: fix metadata and meter split shared tag' " Xueming Li
2021-11-28 14:54   ` patch 'net/mlx4: fix empty Ethernet spec with VLAN' " Xueming Li
2021-11-28 14:54   ` patch 'net/mlx5: fix flow mark with sampling and metering' " Xueming Li
2021-11-28 14:54   ` patch 'net/mlx5: fix multi-segment packet wraparound' " Xueming Li
2021-11-28 14:54   ` patch 'net/memif: allow stopping and closing device' " Xueming Li
2021-11-28 14:54   ` patch 'doc: fix memif driver acronyms' " Xueming Li
2021-11-28 14:54   ` patch 'app/testpmd: fix hexadecimal parser with odd length' " Xueming Li
2021-11-28 14:54   ` patch 'net/mlx5: fix GRE flow item matching' " Xueming Li
2021-11-28 14:54   ` patch 'net/mlx5: fix GENEVE and VXLAN-GPE " Xueming Li
2021-11-28 14:54   ` patch 'remove repeated 'the' in the code' " Xueming Li
2021-11-28 14:54   ` patch 'fix PMD wording' " Xueming Li
2021-11-28 14:54   ` patch 'doc: capitalise PMD' " Xueming Li
2021-11-28 14:54   ` patch 'doc: fix typo in coding style' " Xueming Li
2021-11-28 14:54   ` patch 'net/mlx5: fix devargs validation for multi-class probing' " Xueming Li
2021-11-28 14:54   ` patch 'doc: fix a typo in EAL guide' " Xueming Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).