Merge ~mirespace/ubuntu/+source/dpdk:mre-lunar-22.11.2 into ubuntu/+source/dpdk:ubuntu/lunar-devel

Proposed by Miriam España Acebal
Status: Merged
Approved by: git-ubuntu bot
Approved revision: not available
Merged at revision: 1208d2cd566adf319d4b420ef346a1743fca85cd
Proposed branch: ~mirespace/ubuntu/+source/dpdk:mre-lunar-22.11.2
Merge into: ubuntu/+source/dpdk:ubuntu/lunar-devel
Diff against target: 17173 lines (+5221/-2900)
286 files modified
.github/workflows/build.yml (+2/-1)
.mailmap (+17/-0)
.travis.yml (+2/-1)
MAINTAINERS (+1/-1)
VERSION (+1/-1)
app/dumpcap/main.c (+1/-0)
app/test-bbdev/test_bbdev_perf.c (+107/-17)
app/test-compress-perf/comp_perf_options.h (+3/-3)
app/test-compress-perf/comp_perf_options_parse.c (+4/-4)
app/test-compress-perf/comp_perf_test_common.c (+92/-35)
app/test-compress-perf/comp_perf_test_cyclecount.c (+44/-27)
app/test-compress-perf/comp_perf_test_throughput.c (+38/-26)
app/test-compress-perf/comp_perf_test_verify.c (+40/-24)
app/test-compress-perf/main.c (+8/-0)
app/test-crypto-perf/cperf_ops.c (+20/-17)
app/test-crypto-perf/cperf_options.h (+1/-0)
app/test-crypto-perf/cperf_options_parsing.c (+16/-0)
app/test-crypto-perf/cperf_test_common.c (+5/-3)
app/test-crypto-perf/cperf_test_latency.c (+20/-7)
app/test-crypto-perf/cperf_test_vector_parsing.c (+1/-0)
app/test-crypto-perf/cperf_test_verify.c (+19/-6)
app/test-flow-perf/main.c (+6/-1)
app/test-pmd/cmdline.c (+11/-18)
app/test-pmd/cmdline_flow.c (+24/-24)
app/test-pmd/csumonly.c (+10/-7)
app/test-pmd/ieee1588fwd.c (+1/-1)
app/test-pmd/noisy_vnf.c (+3/-2)
app/test-pmd/testpmd.c (+147/-59)
app/test-pmd/testpmd.h (+1/-0)
app/test/packet_burst_generator.c (+16/-10)
app/test/test_cryptodev.c (+38/-22)
app/test/test_cryptodev_aes_test_vectors.h (+8/-8)
app/test/test_cryptodev_security_pdcp_test_vectors.h (+4/-4)
app/test/test_mbuf.c (+2/-0)
app/test/test_reorder.c (+2/-0)
config/meson.build (+5/-4)
config/rte_config.h (+0/-1)
debian/changelog (+20/-0)
debian/librte-common-sfc-efx23.symbols (+1/-0)
debian/librte-eventdev23.symbols (+1/-0)
debian/not-installed (+5/-0)
debian/patches/disable-parallel-sphinx.patch (+20/-0)
debian/patches/series (+1/-0)
debian/rules (+6/-4)
dev/null (+0/-27)
devtools/check-git-log.sh (+16/-1)
devtools/checkpatches.sh (+0/-30)
doc/api/doxy-api-index.md (+1/-0)
doc/guides/linux_gsg/enable_func.rst (+2/-2)
doc/guides/linux_gsg/sys_reqs.rst (+1/-1)
doc/guides/nics/bnxt.rst (+1/-0)
doc/guides/nics/ice.rst (+4/-4)
doc/guides/nics/mana.rst (+3/-5)
doc/guides/nics/mlx5.rst (+3/-0)
doc/guides/prog_guide/cryptodev_lib.rst (+38/-125)
doc/guides/prog_guide/event_timer_adapter.rst (+1/-1)
doc/guides/prog_guide/rte_flow.rst (+3/-10)
doc/guides/rel_notes/release_22_11.rst (+371/-0)
doc/guides/sample_app_ug/l2_forward_cat.rst (+4/-5)
doc/guides/sample_app_ug/l3_forward.rst (+1/-2)
doc/guides/sample_app_ug/pipeline.rst (+1/-1)
drivers/baseband/acc/rte_acc100_pmd.c (+11/-8)
drivers/baseband/acc/rte_acc200_pmd.c (+46/-15)
drivers/baseband/turbo_sw/meson.build (+5/-5)
drivers/bus/fslmc/mc/mc_sys.c (+4/-1)
drivers/bus/ifpga/ifpga_bus.c (+2/-1)
drivers/bus/pci/pci_common.c (+2/-1)
drivers/bus/vdev/vdev.c (+3/-2)
drivers/common/cnxk/roc_io.h (+8/-4)
drivers/common/cnxk/roc_mbox.h (+1/-1)
drivers/common/cnxk/roc_nix_inl_dev.c (+1/-1)
drivers/common/cnxk/roc_npc.c (+7/-2)
drivers/common/cnxk/roc_npc.h (+11/-0)
drivers/common/cnxk/roc_npc_mcam.c (+43/-15)
drivers/common/cnxk/roc_npc_mcam_dump.c (+4/-2)
drivers/common/cnxk/roc_npc_parse.c (+298/-86)
drivers/common/cnxk/roc_npc_priv.h (+11/-9)
drivers/common/cnxk/roc_npc_utils.c (+1/-1)
drivers/common/cnxk/roc_se.h (+3/-4)
drivers/common/mlx5/meson.build (+7/-2)
drivers/common/mlx5/mlx5_common.h (+7/-1)
drivers/common/mlx5/mlx5_devx_cmds.c (+3/-1)
drivers/common/mlx5/mlx5_prm.h (+11/-5)
drivers/common/mlx5/version.map (+1/-0)
drivers/common/mlx5/windows/mlx5_win_defs.h (+56/-44)
drivers/common/sfc_efx/base/efx.h (+18/-0)
drivers/common/sfc_efx/base/efx_mae.c (+12/-0)
drivers/common/sfc_efx/version.map (+1/-0)
drivers/compress/mlx5/mlx5_compress.c (+5/-7)
drivers/compress/qat/dev/qat_comp_pmd_gen1.c (+1/-1)
drivers/compress/qat/dev/qat_comp_pmd_gen4.c (+1/-1)
drivers/crypto/ccp/ccp_crypto.c (+18/-88)
drivers/crypto/ccp/ccp_dev.c (+11/-92)
drivers/crypto/ccp/ccp_dev.h (+12/-19)
drivers/crypto/ccp/meson.build (+0/-1)
drivers/crypto/ccp/rte_ccp_pmd.c (+6/-16)
drivers/crypto/cnxk/cnxk_se.h (+18/-28)
drivers/crypto/ipsec_mb/ipsec_mb_ops.c (+1/-4)
drivers/crypto/ipsec_mb/ipsec_mb_private.c (+1/-1)
drivers/crypto/ipsec_mb/pmd_aesni_mb.c (+1/-1)
drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h (+1/-1)
drivers/crypto/openssl/rte_openssl_pmd.c (+3/-3)
drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c (+3/-0)
drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c (+3/-0)
drivers/crypto/qat/qat_sym_session.c (+7/-3)
drivers/dma/ioat/ioat_dmadev.c (+25/-6)
drivers/dma/skeleton/skeleton_dmadev.c (+7/-1)
drivers/event/cnxk/cn9k_worker.h (+1/-0)
drivers/event/cnxk/cnxk_eventdev.c (+1/-2)
drivers/event/cnxk/cnxk_tim_evdev.c (+7/-0)
drivers/event/cnxk/cnxk_tim_worker.h (+42/-39)
drivers/net/bnxt/bnxt_ethdev.c (+1/-1)
drivers/net/bnxt/bnxt_rxq.c (+6/-0)
drivers/net/bnxt/bnxt_rxr.c (+0/-1)
drivers/net/bnxt/bnxt_txr.c (+6/-0)
drivers/net/cnxk/cn9k_ethdev_sec.c (+1/-0)
drivers/net/cnxk/cn9k_rx.h (+7/-10)
drivers/net/cnxk/cn9k_tx.h (+10/-0)
drivers/net/cnxk/cnxk_ethdev.c (+28/-0)
drivers/net/cnxk/cnxk_ethdev_cman.c (+5/-0)
drivers/net/e1000/em_rxtx.c (+2/-1)
drivers/net/ena/ena_rss.c (+1/-0)
drivers/net/gve/gve_ethdev.c (+0/-1)
drivers/net/hns3/hns3_cmd.h (+1/-0)
drivers/net/hns3/hns3_common.c (+99/-4)
drivers/net/hns3/hns3_common.h (+2/-0)
drivers/net/hns3/hns3_ethdev.c (+4/-79)
drivers/net/hns3/hns3_ethdev.h (+0/-9)
drivers/net/hns3/hns3_ethdev_vf.c (+6/-78)
drivers/net/hns3/hns3_flow.c (+721/-352)
drivers/net/hns3/hns3_flow.h (+20/-1)
drivers/net/hns3/hns3_mp.c (+2/-2)
drivers/net/hns3/hns3_ptp.c (+8/-4)
drivers/net/hns3/hns3_rss.c (+496/-203)
drivers/net/hns3/hns3_rss.h (+111/-24)
drivers/net/hns3/hns3_rxtx.c (+67/-41)
drivers/net/hns3/hns3_rxtx.h (+2/-3)
drivers/net/i40e/i40e_ethdev.c (+23/-45)
drivers/net/i40e/i40e_ethdev.h (+4/-1)
drivers/net/i40e/i40e_flow.c (+8/-0)
drivers/net/i40e/i40e_rxtx_vec_avx512.c (+4/-8)
drivers/net/iavf/iavf.h (+1/-0)
drivers/net/iavf/iavf_ethdev.c (+3/-0)
drivers/net/iavf/iavf_generic_flow.c (+2/-1)
drivers/net/iavf/iavf_rxtx.c (+18/-4)
drivers/net/iavf/iavf_rxtx_vec_avx2.c (+4/-1)
drivers/net/iavf/iavf_vchnl.c (+62/-44)
drivers/net/ice/base/ice_common.c (+1/-3)
drivers/net/ice/ice_ethdev.c (+22/-14)
drivers/net/ice/ice_generic_flow.c (+8/-0)
drivers/net/ice/ice_rxtx.h (+6/-5)
drivers/net/idpf/idpf_ethdev.c (+5/-1)
drivers/net/idpf/idpf_rxtx.c (+21/-10)
drivers/net/ipn3ke/ipn3ke_ethdev.c (+1/-1)
drivers/net/ipn3ke/ipn3ke_representor.c (+1/-1)
drivers/net/ixgbe/ixgbe_ethdev.c (+20/-11)
drivers/net/ixgbe/ixgbe_flow.c (+6/-6)
drivers/net/mana/mana.c (+6/-6)
drivers/net/meson.build (+1/-0)
drivers/net/mlx5/hws/mlx5dr_cmd.c (+14/-2)
drivers/net/mlx5/hws/mlx5dr_definer.c (+8/-2)
drivers/net/mlx5/hws/mlx5dr_definer.h (+7/-2)
drivers/net/mlx5/hws/mlx5dr_pool.c (+0/-7)
drivers/net/mlx5/hws/mlx5dr_send.c (+2/-2)
drivers/net/mlx5/linux/mlx5_ethdev_os.c (+85/-2)
drivers/net/mlx5/linux/mlx5_os.c (+16/-0)
drivers/net/mlx5/mlx5.c (+7/-2)
drivers/net/mlx5/mlx5.h (+4/-0)
drivers/net/mlx5/mlx5_flow.c (+7/-2)
drivers/net/mlx5/mlx5_flow_dv.c (+6/-1)
drivers/net/mlx5/mlx5_flow_hw.c (+38/-25)
drivers/net/mlx5/mlx5_rx.c (+105/-28)
drivers/net/mlx5/mlx5_rx.h (+3/-1)
drivers/net/mlx5/mlx5_rxtx_vec.c (+8/-5)
drivers/net/mlx5/mlx5_rxtx_vec_altivec.h (+13/-3)
drivers/net/mlx5/mlx5_rxtx_vec_neon.h (+7/-3)
drivers/net/mlx5/mlx5_rxtx_vec_sse.h (+6/-3)
drivers/net/mlx5/mlx5_stats.c (+1/-2)
drivers/net/mlx5/mlx5_trigger.c (+1/-1)
drivers/net/mlx5/mlx5_tx.c (+1/-1)
drivers/net/mlx5/mlx5_tx.h (+1/-1)
drivers/net/mlx5/mlx5_txpp.c (+15/-4)
drivers/net/mlx5/windows/mlx5_ethdev_os.c (+30/-0)
drivers/net/mlx5/windows/mlx5_os.c (+2/-2)
drivers/net/nfp/flower/nfp_flower.c (+4/-9)
drivers/net/nfp/flower/nfp_flower_ctrl.c (+1/-1)
drivers/net/nfp/nfp_common.c (+22/-4)
drivers/net/nfp/nfp_common.h (+2/-0)
drivers/net/nfp/nfp_ethdev.c (+5/-9)
drivers/net/nfp/nfp_ethdev_vf.c (+4/-8)
drivers/net/nfp/nfp_flow.c (+70/-18)
drivers/net/nfp/nfp_flow.h (+1/-0)
drivers/net/nfp/nfp_rxtx.c (+24/-4)
drivers/net/nfp/nfp_rxtx.h (+2/-2)
drivers/net/ngbe/base/ngbe_phy_yt.c (+36/-0)
drivers/net/ngbe/base/ngbe_type.h (+1/-0)
drivers/net/ngbe/ngbe_rxtx.c (+23/-69)
drivers/net/sfc/sfc_mae.c (+21/-5)
drivers/net/sfc/sfc_repr.c (+28/-0)
drivers/net/sfc/sfc_switch.c (+12/-0)
drivers/net/txgbe/base/txgbe_phy.c (+4/-3)
drivers/net/txgbe/txgbe_ethdev.c (+2/-3)
drivers/net/txgbe/txgbe_rxtx.c (+18/-8)
drivers/net/vhost/rte_eth_vhost.c (+153/-202)
drivers/net/virtio/virtio_ethdev.c (+3/-0)
drivers/net/virtio/virtio_pci.c (+8/-20)
drivers/net/virtio/virtio_pci_ethdev.c (+3/-0)
drivers/net/virtio/virtio_rxtx.c (+16/-9)
drivers/net/virtio/virtio_user_ethdev.c (+8/-3)
drivers/raw/ifpga/base/opae_hw_api.c (+2/-2)
drivers/raw/skeleton/skeleton_rawdev.c (+4/-2)
drivers/raw/skeleton/skeleton_rawdev_test.c (+20/-26)
drivers/regex/cn9k/meson.build (+2/-2)
drivers/regex/mlx5/mlx5_regex.h (+1/-1)
drivers/regex/mlx5/mlx5_regex_fastpath.c (+8/-8)
drivers/vdpa/ifc/ifcvf_vdpa.c (+7/-0)
examples/cmdline/parse_obj_list.h (+2/-1)
examples/fips_validation/fips_validation.c (+21/-8)
examples/fips_validation/fips_validation.h (+1/-1)
examples/fips_validation/fips_validation_gcm.c (+5/-7)
examples/fips_validation/fips_validation_sha.c (+2/-6)
examples/fips_validation/fips_validation_xts.c (+9/-4)
examples/fips_validation/main.c (+5/-8)
examples/ipsec-secgw/sa.c (+5/-3)
examples/l2fwd-event/l2fwd_event.c (+2/-2)
examples/l3fwd/l3fwd.h (+0/-1)
examples/l3fwd/main.c (+1/-37)
examples/qos_sched/init.c (+12/-0)
examples/qos_sched/profile.cfg (+3/-3)
examples/qos_sched/profile_ov.cfg (+3/-3)
examples/qos_sched/profile_pie.cfg (+3/-3)
examples/qos_sched/profile_red.cfg (+3/-3)
kernel/linux/kni/compat.h (+3/-1)
lib/acl/acl_run_altivec.h (+1/-1)
lib/cmdline/cmdline.c (+9/-3)
lib/cmdline/cmdline.h (+6/-0)
lib/cmdline/cmdline_os_unix.c (+6/-0)
lib/cmdline/cmdline_os_windows.c (+14/-0)
lib/cmdline/cmdline_private.h (+4/-7)
lib/compressdev/rte_compressdev.h (+1/-1)
lib/compressdev/rte_compressdev_pmd.c (+6/-0)
lib/cryptodev/cryptodev_pmd.c (+7/-0)
lib/cryptodev/rte_crypto_sym.h (+4/-0)
lib/cryptodev/rte_cryptodev.c (+1/-1)
lib/cryptodev/rte_cryptodev.h (+16/-7)
lib/eal/common/eal_common_fbarray.c (+1/-2)
lib/eal/common/eal_common_memory.c (+5/-5)
lib/eal/freebsd/eal.c (+1/-1)
lib/eal/freebsd/eal_alarm.c (+3/-3)
lib/eal/freebsd/eal_hugepage_info.c (+1/-1)
lib/eal/include/generic/rte_atomic.h (+0/-12)
lib/eal/linux/eal.c (+2/-2)
lib/eal/linux/eal_hugepage_info.c (+12/-5)
lib/eal/unix/rte_thread.c (+45/-28)
lib/eal/windows/eal.c (+3/-0)
lib/eal/windows/include/pthread.h (+2/-1)
lib/eal/windows/rte_thread.c (+16/-3)
lib/ethdev/rte_class_eth.c (+1/-1)
lib/ethdev/rte_ethdev.c (+5/-7)
lib/eventdev/rte_event_crypto_adapter.c (+12/-13)
lib/eventdev/rte_event_crypto_adapter.h (+4/-0)
lib/eventdev/rte_event_eth_rx_adapter.c (+4/-8)
lib/eventdev/rte_event_eth_tx_adapter.c (+1/-1)
lib/eventdev/rte_event_timer_adapter.c (+59/-38)
lib/eventdev/rte_eventdev.c (+1/-1)
lib/eventdev/version.map (+1/-0)
lib/gpudev/gpudev.c (+4/-1)
lib/gpudev/gpudev_driver.h (+8/-0)
lib/gpudev/meson.build (+4/-0)
lib/graph/node.c (+4/-4)
lib/hash/rte_thash_x86_gfni.h (+4/-2)
lib/kni/rte_kni.c (+2/-2)
lib/kvargs/rte_kvargs.h (+13/-1)
lib/mempool/rte_mempool.c (+12/-12)
lib/pdump/rte_pdump.c (+1/-1)
lib/reorder/rte_reorder.c (+62/-34)
lib/reorder/rte_reorder.h (+1/-0)
lib/ring/rte_ring_elem_pvt.h (+10/-0)
lib/sched/rte_sched.c (+3/-3)
lib/table/rte_swx_table_selector.c (+1/-1)
lib/telemetry/rte_telemetry.h (+2/-3)
lib/telemetry/telemetry.c (+1/-1)
lib/vhost/socket.c (+5/-3)
lib/vhost/vhost.h (+4/-1)
lib/vhost/vhost_user.c (+28/-16)
lib/vhost/virtio_net.c (+7/-0)
Reviewer Review Type Date Requested Status
Lucas Kanashiro (community) Needs Information
git-ubuntu bot Approve
Canonical Server Reporter Pending
Review via email: mp+447198@code.launchpad.net

Description of the change

Hi team,

This is MRE MP for dpdk in Lunar.

PPA: ppa:mirespace/mre-dpdk-2026351
     https://launchpad.net/~mirespace/+archive/ubuntu/mre-dpdk-2026351

22.11.2 is on Debian unstable (22.11.2-3), so I took a look at the changes that might be incorporated. The following ones seem to me not qualifiable for a SRU process:

  - Drop old init script (8d03f51dd6de99883e3de7bcaa8915dd5ea4b4a3)
  - Add package for new librt-net-mana PMD (13ec8b536401c16e0aa0e5ec6213f00b9dee164e)

I picked the "stop using lsb-base functions" commit because I think it improves the package,
not showing anymore the Lintian error as explained in the commit description on Salsa:

"The sysV compatibility is not widely in use and we can see the lintian error
  E: dpdk: depends-on-obsolete-package Depends: lsb-base (>= 3.2-14)
as a chance to simplify the init script.

99+% of the people will use the .service anyway, those few (if any) using
the sysV script do not really degrade a lot by changing the custom log_
functions of lsb_base to normal echo calls.

That change allows to completely drop this dependency."

But is true that it introduces a change in the behaviour of how the sysV unit logs things.
I doubted here but I finally picked it due to being sysV related (only for compatibility with a low chance of impact).

Because I couldn't take all the changes from that Debian revision (-3), I didn't take that into the package version name.

Test passed locally:

autopkgtest [11:57:21]: @@@@@@@@@@@@@@@@@@@@ summary
test-initscripts PASS
test-linkage PASS
test-autotest PASS
test-fastsuite PASS
qemu-system-x86_64: terminating on signal 15 from pid 1191715 (/usr/bin/python3)

To post a comment you must log in.
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for this MP Miriam! I see most of the packaging changes here are backported from the dpdk's unstable salsa branch, so I am considering them fine. The change you added was to not install the MANA poll mode driver library. The Microsoft mana driver was added in this minor release (as stated by the upstream changelog) and I agree we shouldn't ship that, in Debian a new binary package will be added for that.

Regarding the sysV/init changes, I'd not bother with that, in Ubuntu we do not support that at all, so there is no reason to improve it, but since you want to keep it closer to the Debian changes I'd not bother either. However, I do not know if the SRU team will be happy with that because that's adding more changes, and more changes lead to a higher chance of a potential problem. Maybe we should drop that, not sure what is Christian's opinion about this.

Other than that I consider the packaging changes good enough to proceed with this MRE. Miriam is still working on the testing environment so we can move on with the SRU.

review: Needs Information
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

We usually stayed close to the latest version, unless it would be a problem.
In this case we have:
- test: path length
- test: disable-parallel-sphinx.patch
- init script changes
- mana pkg

Of those mana clearly is a non-SRU as already done.

Both test changes I'd keep as they just improve reliability and should not affect the end result consumed by the user in a negative way.

Init scripts are indeed a bit tricky, while we do not "support" that and have a systemd service that dominates. It is shipped based on the older "if easy ship both" approach in Debian.
So for SRU it would indeed be nice to revert that change as it comes from Salsa.

Another thing that is slighly complex is keeping the reader in mind in the changelog.
For example you mention:
   - d/not-installed, d/rules: MANA poll mode driver library is not being installed.
You say this correctly thinking in the new version as it is in mantic.
But a lunar-only reader might think, why is that taken away - was it there before?
I'd tend (preference, no rule) to maybe mention this as something like
   - d/not-installed, d/rules: MANA poll mode driver library is not being
     installed which would otherwise build by default in the new version

A warning of a similarly trap is there if you indeed decide to not-take the init-script changes.
You add a revert in git, right.
But in the changelog please just remove the respective lines instead of mentioning that to happen&revert.

Revision history for this message
Miriam España Acebal (mirespace) wrote :

Hi,

Thank you both for your comments and clarifications (inline and on meet!).

I've dropped the "d/control, d/dpdk.init: stop using lsb-base functions" commit finally. The rewording about the MANA driver in the changelog was also done.

I'm waiting for the packaging to be rebuilt on the PPA and setting up the horsea test environment again.

Stay tuned...

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks Christian for chiming in and shedding some light, and also Miriam for addressing the comments.

I think the commit bumping Standards-Version is also disposable, there is no benefit in backporting this change. In the same time it seems harmless. When I am working on SRUs I always try to minimize the changes needed, adding just the minimal necessary to fix the bug, but I'll leave this one to your discretion :)

I am approving the packaging changes for now, and the testing is pending from your side Miriam.

review: Approve
Revision history for this message
Miriam España Acebal (mirespace) wrote :

Hi Lucas!

I dropped the bump Standards-Version too (Christian had the same opinion on that). Learning new things about SRUs with this.

Updated the MP and rebuilding in ppa...

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

I triggered autopkgtest against the dpdk version in the PPA and I did not find any failure. All the logs are accessible here:

https://autopkgtest.ubuntu.com/results/autopkgtest-lunar-mirespace-mre-dpdk-2026351/?format=plain

For some reason, ppa-dev-tools is not working as expected for this PPA (at least for me).

Revision history for this message
Miriam España Acebal (mirespace) wrote :

Thank you Lucas!

The test on the horsea machine finished, but one didn't pass:

Finished, overall status:
+ cat dpdk-test.status

PHYS_TESTPMD
VIRT_SPAWNGUESTS
VIRT_TESTPMD
VIRT_L2FWD
BENCH_OVS
VUC_BENCH_OVSDPDK
VUC_ENDURANCE_STARTSTOP
VUC_ENDURANCE_ADDREMOVEPORT

1.0.0 (16:14:38): phys (BM) tests
  1.1.0 (16:14:38): initialize environment
    1.1.1 (16:16:13): testpmd => Pass
    1.1.2 (16:18:16): check testpmd output => Failed rc=unexpected error in testpmd log
2.0.0 (16:18:16): prep virtual test environment

1.0.0 (16:21:49): virt tests
  1.1.0 (16:21:49): initialize environment
3.0.0 (16:22:56): performance tests
  3.1.0 (16:22:56): prep benchmarks
  3.2.0 (16:24:33): performance tests
    3.2.1 (16:24:42): test guest-openvswitch for OVS-5CPU => Pass
    3.2.2 (16:44:48): test guest-dpdk-vhost-user-client-multiq for OVSDPDK-VUC => Pass
4.0.0 (17:04:46): VUC endurance checks
  4.1.0 (17:04:46): prep VUC endurance tests
    4.1.1 (17:19:59): start stop guests (client) => Pass
    4.1.2 (18:33:20): add/remove ports (client) => Pass
  4.2.0 (18:42:58): Final cleanup+ echo ''

I'm taking a look ...

Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: lucaskanashiro, mirespace
Uploaders: lucaskanashiro
MP auto-approved

review: Approve
Revision history for this message
Miriam España Acebal (mirespace) wrote :

Checking the failing test manually (https://git.launchpad.net/~ubuntu-server/ubuntu/+source/dpdk-testing/tree/test.sh#n1601), it seems not to be an error:

ubuntu@node-horsea:~/dpdk-testing$ awk 'BEGIN {sum=0} /RX-errors/ {sum+=$2} /TX-errors/ {sum+=$4} END {printf("sum of tx/rx errors %s\n",sum); exit sum}' testpmd.log
sum of tx/rx errors 0

ubuntu@node-horsea:~/dpdk-testing$ grep -v -e "RX-errors:" -e 'TX-errors:' -e '^PMD: gntalloc: ioctl error' -e '^EAL: Module /sys/module/vfio_iommu_type1 not found' -e 'preferred mempool ops' testpmd.log | grep -i 'err'
Device error handling mode: none
Device error handling mode: none

It matches a port characteristic:

Max segment number per MTU/TSO: 40
Device capabilities: 0x0( )
Device error handling mode: none

********************* Infos for port 1 *********************

I imagine this "Device error handling mode" should be added to the -v in the initial grep command.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

That seems to fix the issue but we do not want to do that blindly. Have you identified why the "Device error handling mode: none" is in the output? I do not know dpdk, I'd first understand the reason why that's popping up (maybe compare with the output of the execution of those tests in a previous upload?) and assess if this is a problem. If we reach a conclusion that's not a problem then we can implement a workaround for that like the one you mentioned. WDYT?

review: Needs Information
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

There now is a new line of output at show port info which we run.
This will print:
  Device error handling mode: none

It is a change to a mostly internal test tool (no behavior change critical to the SRU policy IMHO).

This is the upstream change adding that output:
 https://salsa.debian.org/debian/dpdk/-/commit/0d5c38bac7299ee739d58d4a3488a533cbb11cd0

It is *not* an actual error, but an info that is printed in 22.11.x

The execution in virtual environment had an issue for a while and was skipped as long as it worked on real machines. Recently that is good which allowed Miriam to run this, due to that she now sees this false positive.

Yes - please also remove this message as it is not a real issue we want to detect.

@Miriam - once it ran juts double check the log file (with me) that it actually executed something as intended.

Revision history for this message
Miriam España Acebal (mirespace) wrote :

Hi!

I made the changes to the test suite [1] -MP is not opened yet- and I reran the test in horsea. Results are ok:

PHYS_TESTPMD
VIRT_SPAWNGUESTS
VIRT_TESTPMD
VIRT_L2FWD
BENCH_OVS
VUC_BENCH_OVSDPDK
VUC_ENDURANCE_STARTSTOP
VUC_ENDURANCE_ADDREMOVEPORT

1.0.0 (13:26:24): phys (BM) tests
  1.1.0 (13:26:24): initialize environment
    1.1.1 (13:28:02): testpmd => Pass(B
    1.1.2 (13:28:56): check testpmd output => Pass(B
2.0.0 (13:28:56): prep virtual test environment

1.0.0 (13:31:33): virt tests
  1.1.0 (13:31:33): initialize environment
3.0.0 (13:32:44): performance tests
  3.1.0 (13:32:44): prep benchmarks
  3.2.0 (13:33:07): performance tests
    3.2.1 (13:33:17): test guest-openvswitch for OVS-5CPU => Pass(B
    3.2.2 (13:52:57): test guest-dpdk-vhost-user-client-multiq for OVSDPDK-VUC => Pass(B
4.0.0 (14:11:59): VUC endurance checks
  4.1.0 (14:11:59): prep VUC endurance tests
    4.1.1 (14:22:07): start stop guests (client) => Pass(B
    4.1.2 (15:35:23): add/remove ports (client) => Pass(B
  4.2.0 (15:44:59): Final cleanup

@Christian Full log is attached to the bug [2].

[1] https://git.launchpad.net/~ubuntu-server/ubuntu/+source/dpdk-testing/commit/?h=testpmd-output-grep-device-error-handling-mode&id=05cdbe71c6d9b1d71e571119b52a884a22afa0c1

[2] https://bugs.launchpad.net/ubuntu/jammy/+source/dpdk/+bug/2026351/+attachment/5691309/+files/dpdk_22.11.2-horseatests-lunar.log

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks Miriam! The change in the dpdk-testing is exactly what was discussed, so I think it is OK.

Christian also asked in his comment to double check the test log with him once it is executed, so I'll be waiting for that to perform the upload.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I've logged into horsea and found the logs of the test ending at ~15:45.
Testpmd as well as iperf/uperf runs really executed.

+1 to go on.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

... I used this chance to also merge Miriams fix to the testing repo
... and then I used that chance to do the inclusive master->main conversion there.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thank you all for the work and reviews, this appears ready for upload.

Uploading dpdk_22.11.2-0ubuntu0.23.04.1.dsc
Uploading dpdk_22.11.2.orig.tar.xz
Uploading dpdk_22.11.2-0ubuntu0.23.04.1.debian.tar.xz
Uploading dpdk_22.11.2-0ubuntu0.23.04.1_source.buildinfo
Uploading dpdk_22.11.2-0ubuntu0.23.04.1_source.changes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
2index 82d83f4..04a975c 100644
3--- a/.github/workflows/build.yml
4+++ b/.github/workflows/build.yml
5@@ -25,7 +25,8 @@ jobs:
6 MINGW: ${{ matrix.config.cross == 'mingw' }}
7 MINI: ${{ matrix.config.mini != '' }}
8 PPC64LE: ${{ matrix.config.cross == 'ppc64le' }}
9- REF_GIT_TAG: none
10+ REF_GIT_REPO: https://dpdk.org/git/dpdk-stable
11+ REF_GIT_TAG: v22.11.1
12 RISCV64: ${{ matrix.config.cross == 'riscv64' }}
13 RUN_TESTS: ${{ contains(matrix.config.checks, 'tests') }}
14
15diff --git a/.mailmap b/.mailmap
16index 75884b6..5dc95a9 100644
17--- a/.mailmap
18+++ b/.mailmap
19@@ -64,6 +64,7 @@ Ali Volkan Atli <volkan.atli@argela.com.tr>
20 Allain Legacy <allain.legacy@windriver.com>
21 Allen Hubbe <allen.hubbe@amd.com>
22 Alok Makhariya <alok.makhariya@nxp.com>
23+Alvaro Karsz <alvaro.karsz@solid-run.com>
24 Alvin Zhang <alvinx.zhang@intel.com>
25 Aman Singh <aman.deep.singh@intel.com>
26 Amaranath Somalapuram <asomalap@amd.com>
27@@ -166,7 +167,9 @@ Bin Huang <brian.huangbin@huawei.com> <bin.huang@hxt-semitech.com>
28 Bin Zheng <zhengbin.89740@bytedance.com>
29 Björn Töpel <bjorn.topel@intel.com>
30 Bo Chen <box.c.chen@intel.com>
31+Boleslav Stankevich <boleslav.stankevich@oktetlabs.ru>
32 Boon Ang <bang@vmware.com>
33+Boris Ouretskey <borisusun@gmail.com>
34 Boris Pismenny <borisp@mellanox.com>
35 Brandon Lo <blo@iol.unh.edu>
36 Brendan Ryan <brendan.ryan@intel.com>
37@@ -338,6 +341,7 @@ Dzmitry Sautsa <dzmitryx.sautsa@intel.com>
38 Ed Czeck <ed.czeck@atomicrules.com>
39 Eduard Serra <eserra@vmware.com>
40 Edward Makarov <makarov@kraftway.ru>
41+Edwin Brossette <edwin.brossette@6wind.com>
42 Eelco Chaudron <echaudro@redhat.com>
43 Elad Nachman <eladv6@gmail.com>
44 Elad Persiko <eladpe@mellanox.com>
45@@ -371,6 +375,7 @@ Farah Smith <farah.smith@broadcom.com>
46 Fei Chen <chenwei.0515@bytedance.com>
47 Feifei Wang <feifei.wang2@arm.com> <feifei.wang@arm.com>
48 Fei Qin <fei.qin@corigine.com>
49+Fengnan Chang <changfengnan@bytedance.com>
50 Fengtian Guo <fengtian.guo@6wind.com>
51 Ferdinand Thiessen <rpm@fthiessen.de>
52 Ferruh Yigit <ferruh.yigit@amd.com> <ferruh.yigit@intel.com> <ferruh.yigit@xilinx.com> <ferruhy@gmail.com>
53@@ -524,6 +529,7 @@ Ilya Maximets <i.maximets@ovn.org> <i.maximets@samsung.com>
54 Ilya V. Matveychikov <matvejchikov@gmail.com>
55 Ilyes Ben Hamouda <ilyes.ben_hamouda@6wind.com>
56 Intiyaz Basha <intiyaz.basha@caviumnetworks.com>
57+Isaac Boukris <iboukris@gmail.com>
58 Itsuro Oda <oda@valinux.co.jp>
59 Ivan Boule <ivan.boule@6wind.com>
60 Ivan Dyukov <i.dyukov@samsung.com>
61@@ -670,6 +676,7 @@ Kai Ji <kai.ji@intel.com>
62 Kaiwen Deng <kaiwenx.deng@intel.com>
63 Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
64 Kamalakannan R <kamalakannan.r@intel.com>
65+Kamalakshitha Aligeri <kamalakshitha.aligeri@arm.com>
66 Kamil Bednarczyk <kamil.bednarczyk@intel.com>
67 Kamil Chalupnik <kamilx.chalupnik@intel.com>
68 Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
69@@ -708,6 +715,7 @@ Konstantin Ananyev <konstantin.v.ananyev@yandex.ru> <konstantin.ananyev@huawei.c
70 Krishna Murthy <krishna.j.murthy@intel.com>
71 Krzysztof Galazka <krzysztof.galazka@intel.com>
72 Krzysztof Kanas <kkanas@marvell.com> <krzysztof.kanas@caviumnetworks.com>
73+Krzysztof Karas <krzysztof.karas@intel.com>
74 Krzysztof Witek <krzysztof.witek@6wind.com>
75 Kuba Kozak <kubax.kozak@intel.com>
76 Kumar Amber <kumar.amber@intel.com>
77@@ -886,6 +894,7 @@ Michal Litwicki <michalx.litwicki@intel.com>
78 Michal Mazurek <maz@semihalf.com>
79 Michal Michalik <michal.michalik@intel.com>
80 Michał Mirosław <michal.miroslaw@atendesoftware.pl> <mirq-linux@rere.qmqm.pl>
81+Michal Schmidt <mschmidt@redhat.com>
82 Michal Swiatkowski <michal.swiatkowski@intel.com>
83 Michal Wilczynski <michal.wilczynski@intel.com>
84 Michel Machado <michel@digirati.com.br>
85@@ -911,6 +920,7 @@ Mitch Williams <mitch.a.williams@intel.com>
86 Mit Matelske <mit@pt.net>
87 Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
88 Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
89+Mohammad Iqbal Ahmad <mahmad@marvell.com>
90 Mohammed Gamal <mgamal@redhat.com>
91 Mohsin Kazmi <mohsin.kazmi14@gmail.com>
92 Mohsin Mazhar Shaikh <mohsinmazhar_shaikh@trendmicro.com>
93@@ -1143,6 +1153,7 @@ Roy Franz <roy.franz@cavium.com>
94 Roy Pledge <roy.pledge@nxp.com>
95 Roy Shterman <roy.shterman@vastdata.com>
96 Ruifeng Wang <ruifeng.wang@arm.com>
97+Rushil Gupta <rushilg@google.com>
98 Ryan E Hall <ryan.e.hall@intel.com>
99 Sabyasachi Sengupta <sabyasg@hpe.com>
100 Sachin Saxena <sachin.saxena@nxp.com> <sachin.saxena@oss.nxp.com>
101@@ -1159,6 +1170,7 @@ Sangjin Han <sangjin@eecs.berkeley.edu>
102 Sankar Chokkalingam <sankarx.chokkalingam@intel.com>
103 Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
104 Santosh Shukla <santosh.shukla@caviumnetworks.com> <sshukla@mvista.com>
105+Saoirse O'Donovan <saoirse.odonovan@intel.com>
106 Saori Usami <susami@igel.co.jp>
107 Sarath Somasekharan <sarathx.somasekharan@intel.com>
108 Sarosh Arif <sarosh.arif@emumba.com>
109@@ -1210,6 +1222,7 @@ Shiqi Liu <835703180@qq.com>
110 Shiri Kuzin <shirik@nvidia.com> <shirik@mellanox.com>
111 Shivanshu Shukla <shivanshu.shukla@intel.com>
112 Shiweixian <shiweixian@huawei.com>
113+Shiyang He <shiyangx.he@intel.com>
114 Shlomi Gridish <sgridish@marvell.com>
115 Shougang Wang <shougangx.wang@intel.com>
116 Shraddha Joshi <jshraddha@vmware.com>
117@@ -1239,6 +1252,7 @@ Smadar Fuks <smadarf@marvell.com>
118 Solal Pirelli <solal.pirelli@gmail.com>
119 Solganik Alexander <sashas@lightbitslabs.com>
120 Somnath Kotur <somnath.kotur@broadcom.com>
121+Song Jiale <songx.jiale@intel.com>
122 Song Zhu <song.zhu@arm.com>
123 Sony Chacko <sony.chacko@qlogic.com>
124 Sotiris Salloumis <sotiris.salloumis@ericsson.com>
125@@ -1386,6 +1400,7 @@ Vijay Kumar Srivastava <vsrivast@xilinx.com>
126 Vijay Srivastava <vijays@solarflare.com>
127 Vikas Aggarwal <vikas.aggarwal@caviumnetworks.com>
128 Vikas Gupta <vikas.gupta@broadcom.com>
129+Vikash Poddar <vikash.chandrax.poddar@intel.com>
130 Vimal Chungath <vcchunga@amazon.com>
131 Vincent Guo <guopengfei160@163.com>
132 Vincent Jardin <vincent.jardin@6wind.com>
133@@ -1393,6 +1408,7 @@ Vincent Li <vincent.mc.li@gmail.com>
134 Vincent S. Cojot <vcojot@redhat.com>
135 Vipin Varghese <vipin.varghese@amd.com> <vipin.varghese@intel.com>
136 Vipul Ashri <vipul.ashri@oracle.com>
137+Visa Hankala <visa@hankala.org>
138 Vishal Kulkarni <vishal@chelsio.com>
139 Vishwas Danivas <vishwas@pensando.io>
140 Vitaliy Mysak <vitaliy.mysak@intel.com>
141@@ -1562,6 +1578,7 @@ Zhipeng Lu <luzhipeng@cestc.cn>
142 Zhirun Yan <zhirun.yan@intel.com>
143 Zhiwei He <zhiwei.he@intel.com>
144 Zhiyong Yang <zhiyong.yang@intel.com>
145+Zhuobin Huang <zobin1999@gmail.com>
146 Zi Hu <huzilucky@gmail.com>
147 Zijie Pan <zijie.pan@6wind.com>
148 Ziyang Xuan <xuanziyang2@huawei.com>
149diff --git a/.travis.yml b/.travis.yml
150index 4bb5bf6..0ea1242 100644
151--- a/.travis.yml
152+++ b/.travis.yml
153@@ -42,7 +42,8 @@ script: ./.ci/${TRAVIS_OS_NAME}-build.sh
154 env:
155 global:
156 - LIBABIGAIL_VERSION=libabigail-1.8
157- - REF_GIT_TAG=none
158+ - REF_GIT_REPO=https://dpdk.org/git/dpdk-stable
159+ - REF_GIT_TAG=v22.11.1
160
161 jobs:
162 include:
163diff --git a/MAINTAINERS b/MAINTAINERS
164index 22ef2ea..1338ca0 100644
165--- a/MAINTAINERS
166+++ b/MAINTAINERS
167@@ -850,7 +850,7 @@ F: buildtools/options-ibverbs-static.sh
168 F: doc/guides/nics/mlx5.rst
169 F: doc/guides/nics/features/mlx5.ini
170
171-Microsoft mana - EXPERIMENTAL
172+Microsoft mana
173 M: Long Li <longli@microsoft.com>
174 F: drivers/net/mana/
175 F: doc/guides/nics/mana.rst
176diff --git a/VERSION b/VERSION
177index 7378dd9..bd856b4 100644
178--- a/VERSION
179+++ b/VERSION
180@@ -1 +1 @@
181-22.11.1
182+22.11.2
183diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
184index 2eb8414..4751ca2 100644
185--- a/app/dumpcap/main.c
186+++ b/app/dumpcap/main.c
187@@ -202,6 +202,7 @@ static void add_interface(uint16_t port, const char *name)
188 rte_exit(EXIT_FAILURE, "no memory for interface\n");
189
190 memset(intf, 0, sizeof(*intf));
191+ intf->port = port;
192 rte_strscpy(intf->name, name, sizeof(intf->name));
193
194 printf("Capturing on '%s'\n", name);
195diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
196index b285d3f..f77ebc4 100644
197--- a/app/test-bbdev/test_bbdev_perf.c
198+++ b/app/test-bbdev/test_bbdev_perf.c
199@@ -78,13 +78,12 @@
200
201 #define SYNC_WAIT 0
202 #define SYNC_START 1
203-#define INVALID_OPAQUE -1
204
205 #define INVALID_QUEUE_ID -1
206 /* Increment for next code block in external HARQ memory */
207 #define HARQ_INCR 32768
208 /* Headroom for filler LLRs insertion in HARQ buffer */
209-#define FILLER_HEADROOM 1024
210+#define FILLER_HEADROOM 2048
211 /* Constants from K0 computation from 3GPP 38.212 Table 5.4.2.1-2 */
212 #define N_ZC_1 66 /* N = 66 Zc for BG 1 */
213 #define N_ZC_2 50 /* N = 50 Zc for BG 2 */
214@@ -95,6 +94,7 @@
215 #define K0_3_1 56 /* K0 fraction numerator for rv 3 and BG 1 */
216 #define K0_3_2 43 /* K0 fraction numerator for rv 3 and BG 2 */
217
218+#define HARQ_MEM_TOLERANCE 256
219 static struct test_bbdev_vector test_vector;
220
221 /* Switch between PMD and Interrupt for throughput TC */
222@@ -1952,10 +1952,9 @@ check_enc_status_and_ordering(struct rte_bbdev_enc_op *op,
223 "op_status (%d) != expected_status (%d)",
224 op->status, expected_status);
225
226- if (op->opaque_data != (void *)(uintptr_t)INVALID_OPAQUE)
227- TEST_ASSERT((void *)(uintptr_t)order_idx == op->opaque_data,
228- "Ordering error, expected %p, got %p",
229- (void *)(uintptr_t)order_idx, op->opaque_data);
230+ TEST_ASSERT((void *)(uintptr_t)order_idx == op->opaque_data,
231+ "Ordering error, expected %p, got %p",
232+ (void *)(uintptr_t)order_idx, op->opaque_data);
233
234 return TEST_SUCCESS;
235 }
236@@ -2092,13 +2091,17 @@ validate_op_harq_chain(struct rte_bbdev_op_data *op,
237 uint16_t data_len = rte_pktmbuf_data_len(m) - offset;
238 total_data_size += orig_op->segments[i].length;
239
240- TEST_ASSERT(orig_op->segments[i].length <
241- (uint32_t)(data_len + 64),
242+ TEST_ASSERT(orig_op->segments[i].length < (uint32_t)(data_len + HARQ_MEM_TOLERANCE),
243 "Length of segment differ in original (%u) and filled (%u) op",
244 orig_op->segments[i].length, data_len);
245 harq_orig = (int8_t *) orig_op->segments[i].addr;
246 harq_out = rte_pktmbuf_mtod_offset(m, int8_t *, offset);
247
248+ /* Cannot compare HARQ output data for such cases */
249+ if ((ldpc_llr_decimals > 1) && ((ops_ld->op_flags & RTE_BBDEV_LDPC_LLR_COMPRESSION)
250+ || (ops_ld->op_flags & RTE_BBDEV_LDPC_HARQ_6BIT_COMPRESSION)))
251+ break;
252+
253 if (!(ldpc_cap_flags &
254 RTE_BBDEV_LDPC_INTERNAL_HARQ_MEMORY_FILLERS
255 ) || (ops_ld->op_flags &
256@@ -2113,9 +2116,9 @@ validate_op_harq_chain(struct rte_bbdev_op_data *op,
257 ops_ld->n_filler;
258 if (data_len > deRmOutSize)
259 data_len = deRmOutSize;
260- if (data_len > orig_op->segments[i].length)
261- data_len = orig_op->segments[i].length;
262 }
263+ if (data_len > orig_op->segments[i].length)
264+ data_len = orig_op->segments[i].length;
265 /*
266 * HARQ output can have minor differences
267 * due to integer representation and related scaling
268@@ -2174,7 +2177,7 @@ validate_op_harq_chain(struct rte_bbdev_op_data *op,
269
270 /* Validate total mbuf pkt length */
271 uint32_t pkt_len = rte_pktmbuf_pkt_len(op->data) - op->offset;
272- TEST_ASSERT(total_data_size < pkt_len + 64,
273+ TEST_ASSERT(total_data_size < pkt_len + HARQ_MEM_TOLERANCE,
274 "Length of data differ in original (%u) and filled (%u) op",
275 total_data_size, pkt_len);
276
277@@ -4933,14 +4936,96 @@ get_bbdev_queue_stats(uint16_t dev_id, uint16_t queue_id,
278 stats->dequeued_count = q_stats->dequeued_count;
279 stats->enqueue_err_count = q_stats->enqueue_err_count;
280 stats->dequeue_err_count = q_stats->dequeue_err_count;
281- stats->enqueue_warning_count = q_stats->enqueue_warning_count;
282- stats->dequeue_warning_count = q_stats->dequeue_warning_count;
283+ stats->enqueue_warn_count = q_stats->enqueue_warn_count;
284+ stats->dequeue_warn_count = q_stats->dequeue_warn_count;
285 stats->acc_offload_cycles = q_stats->acc_offload_cycles;
286
287 return 0;
288 }
289
290 static int
291+offload_latency_test_fft(struct rte_mempool *mempool, struct test_buffers *bufs,
292+ struct rte_bbdev_fft_op *ref_op, uint16_t dev_id,
293+ uint16_t queue_id, const uint16_t num_to_process,
294+ uint16_t burst_sz, struct test_time_stats *time_st)
295+{
296+ int i, dequeued, ret;
297+ struct rte_bbdev_fft_op *ops_enq[MAX_BURST], *ops_deq[MAX_BURST];
298+ uint64_t enq_start_time, deq_start_time;
299+ uint64_t enq_sw_last_time, deq_last_time;
300+ struct rte_bbdev_stats stats;
301+
302+ for (i = 0, dequeued = 0; dequeued < num_to_process; ++i) {
303+ uint16_t enq = 0, deq = 0;
304+
305+ if (unlikely(num_to_process - dequeued < burst_sz))
306+ burst_sz = num_to_process - dequeued;
307+
308+ ret = rte_bbdev_fft_op_alloc_bulk(mempool, ops_enq, burst_sz);
309+ TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", burst_sz);
310+ if (test_vector.op_type != RTE_BBDEV_OP_NONE)
311+ copy_reference_fft_op(ops_enq, burst_sz, dequeued,
312+ bufs->inputs,
313+ bufs->hard_outputs, bufs->soft_outputs,
314+ ref_op);
315+
316+ /* Start time meas for enqueue function offload latency */
317+ enq_start_time = rte_rdtsc_precise();
318+ do {
319+ enq += rte_bbdev_enqueue_fft_ops(dev_id, queue_id,
320+ &ops_enq[enq], burst_sz - enq);
321+ } while (unlikely(burst_sz != enq));
322+
323+ ret = get_bbdev_queue_stats(dev_id, queue_id, &stats);
324+ TEST_ASSERT_SUCCESS(ret,
325+ "Failed to get stats for queue (%u) of device (%u)",
326+ queue_id, dev_id);
327+
328+ enq_sw_last_time = rte_rdtsc_precise() - enq_start_time -
329+ stats.acc_offload_cycles;
330+ time_st->enq_sw_max_time = RTE_MAX(time_st->enq_sw_max_time,
331+ enq_sw_last_time);
332+ time_st->enq_sw_min_time = RTE_MIN(time_st->enq_sw_min_time,
333+ enq_sw_last_time);
334+ time_st->enq_sw_total_time += enq_sw_last_time;
335+
336+ time_st->enq_acc_max_time = RTE_MAX(time_st->enq_acc_max_time,
337+ stats.acc_offload_cycles);
338+ time_st->enq_acc_min_time = RTE_MIN(time_st->enq_acc_min_time,
339+ stats.acc_offload_cycles);
340+ time_st->enq_acc_total_time += stats.acc_offload_cycles;
341+
342+ /* give time for device to process ops */
343+ rte_delay_us(WAIT_OFFLOAD_US);
344+
345+ /* Start time meas for dequeue function offload latency */
346+ deq_start_time = rte_rdtsc_precise();
347+ /* Dequeue one operation */
348+ do {
349+ deq += rte_bbdev_dequeue_fft_ops(dev_id, queue_id,
350+ &ops_deq[deq], enq);
351+ } while (unlikely(deq == 0));
352+
353+ deq_last_time = rte_rdtsc_precise() - deq_start_time;
354+ time_st->deq_max_time = RTE_MAX(time_st->deq_max_time,
355+ deq_last_time);
356+ time_st->deq_min_time = RTE_MIN(time_st->deq_min_time,
357+ deq_last_time);
358+ time_st->deq_total_time += deq_last_time;
359+
360+ /* Dequeue remaining operations if needed*/
361+ while (burst_sz != deq)
362+ deq += rte_bbdev_dequeue_fft_ops(dev_id, queue_id,
363+ &ops_deq[deq], burst_sz - deq);
364+
365+ rte_bbdev_fft_op_free_bulk(ops_enq, deq);
366+ dequeued += deq;
367+ }
368+
369+ return i;
370+}
371+
372+static int
373 offload_latency_test_dec(struct rte_mempool *mempool, struct test_buffers *bufs,
374 struct rte_bbdev_dec_op *ref_op, uint16_t dev_id,
375 uint16_t queue_id, const uint16_t num_to_process,
376@@ -4958,7 +5043,8 @@ offload_latency_test_dec(struct rte_mempool *mempool, struct test_buffers *bufs,
377 if (unlikely(num_to_process - dequeued < burst_sz))
378 burst_sz = num_to_process - dequeued;
379
380- rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq, burst_sz);
381+ ret = rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq, burst_sz);
382+ TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", burst_sz);
383 if (test_vector.op_type != RTE_BBDEV_OP_NONE)
384 copy_reference_dec_op(ops_enq, burst_sz, dequeued,
385 bufs->inputs,
386@@ -5043,7 +5129,8 @@ offload_latency_test_ldpc_dec(struct rte_mempool *mempool,
387 if (unlikely(num_to_process - dequeued < burst_sz))
388 burst_sz = num_to_process - dequeued;
389
390- rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq, burst_sz);
391+ ret = rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq, burst_sz);
392+ TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", burst_sz);
393 if (test_vector.op_type != RTE_BBDEV_OP_NONE)
394 copy_reference_ldpc_dec_op(ops_enq, burst_sz, dequeued,
395 bufs->inputs,
396@@ -5295,7 +5382,7 @@ offload_cost_test(struct active_device *ad,
397 printf("Set RTE_BBDEV_OFFLOAD_COST to 'y' to turn the test on.\n");
398 return TEST_SKIPPED;
399 #else
400- int iter;
401+ int iter, ret;
402 uint16_t burst_sz = op_params->burst_sz;
403 const uint16_t num_to_process = op_params->num_to_process;
404 const enum rte_bbdev_op_type op_type = test_vector.op_type;
405@@ -5390,7 +5477,10 @@ offload_cost_test(struct active_device *ad,
406 rte_get_tsc_hz());
407
408 struct rte_bbdev_stats stats = {0};
409- get_bbdev_queue_stats(ad->dev_id, queue_id, &stats);
410+ ret = get_bbdev_queue_stats(ad->dev_id, queue_id, &stats);
411+ TEST_ASSERT_SUCCESS(ret,
412+ "Failed to get stats for queue (%u) of device (%u)",
413+ queue_id, ad->dev_id);
414 if (op_type != RTE_BBDEV_OP_LDPC_DEC) {
415 TEST_ASSERT_SUCCESS(stats.enqueued_count != num_to_process,
416 "Mismatch in enqueue count %10"PRIu64" %d",
417diff --git a/app/test-compress-perf/comp_perf_options.h b/app/test-compress-perf/comp_perf_options.h
418index 57dd146..d00b299 100644
419--- a/app/test-compress-perf/comp_perf_options.h
420+++ b/app/test-compress-perf/comp_perf_options.h
421@@ -32,9 +32,9 @@ enum cperf_test_type {
422 };
423
424 enum comp_operation {
425- COMPRESS_ONLY,
426- DECOMPRESS_ONLY,
427- COMPRESS_DECOMPRESS
428+ COMPRESS = (1 << 0),
429+ DECOMPRESS = (1 << 1),
430+ COMPRESS_DECOMPRESS = (COMPRESS | DECOMPRESS),
431 };
432
433 struct range_list {
434diff --git a/app/test-compress-perf/comp_perf_options_parse.c b/app/test-compress-perf/comp_perf_options_parse.c
435index 019eddb..303e714 100644
436--- a/app/test-compress-perf/comp_perf_options_parse.c
437+++ b/app/test-compress-perf/comp_perf_options_parse.c
438@@ -446,11 +446,11 @@ parse_op_type(struct comp_test_data *test_data, const char *arg)
439 struct name_id_map optype_namemap[] = {
440 {
441 "comp",
442- COMPRESS_ONLY
443+ COMPRESS
444 },
445 {
446 "decomp",
447- DECOMPRESS_ONLY
448+ DECOMPRESS
449 },
450 {
451 "comp_and_decomp",
452@@ -491,7 +491,7 @@ parse_huffman_enc(struct comp_test_data *test_data, const char *arg)
453 int id = get_str_key_id_mapping(huffman_namemap,
454 RTE_DIM(huffman_namemap), arg);
455 if (id < 0) {
456- RTE_LOG(ERR, USER1, "Invalid Huffmane encoding specified\n");
457+ RTE_LOG(ERR, USER1, "Invalid Huffman encoding specified\n");
458 return -1;
459 }
460
461@@ -507,7 +507,7 @@ parse_level(struct comp_test_data *test_data, const char *arg)
462
463 /*
464 * Try parsing the argument as a range, if it fails,
465- * arse it as a list
466+ * parse it as a list
467 */
468 if (parse_range(arg, &test_data->level_lst.min,
469 &test_data->level_lst.max,
470diff --git a/app/test-compress-perf/comp_perf_test_common.c b/app/test-compress-perf/comp_perf_test_common.c
471index b402a0d..7848719 100644
472--- a/app/test-compress-perf/comp_perf_test_common.c
473+++ b/app/test-compress-perf/comp_perf_test_common.c
474@@ -227,23 +227,43 @@ comp_perf_allocate_memory(struct comp_test_data *test_data,
475 {
476 uint16_t comp_mbuf_size;
477 uint16_t decomp_mbuf_size;
478+ size_t comp_data_size;
479+ size_t decomp_data_size;
480+ size_t output_data_sz;
481
482 test_data->out_seg_sz = find_buf_size(test_data->seg_sz);
483
484- /* Number of segments for input and output
485- * (compression and decompression)
486- */
487- test_data->total_segs = DIV_CEIL(test_data->input_data_sz,
488- test_data->seg_sz);
489+ if (test_data->test_op & COMPRESS) {
490+ /*
491+ * Number of segments for input and output
492+ * (compression and decompression)
493+ */
494+ test_data->total_segs = DIV_CEIL(test_data->input_data_sz,
495+ test_data->seg_sz);
496+ } else {
497+ /*
498+ * When application does decompression only, input data is
499+ * compressed and smaller than the output. The expected size of
500+ * uncompressed data given by the user in segment size argument.
501+ */
502+ test_data->total_segs = test_data->max_sgl_segs;
503+ }
504+
505+ output_data_sz = (size_t) test_data->out_seg_sz * test_data->total_segs;
506+ output_data_sz =
507+ RTE_MAX(output_data_sz, (size_t) MIN_COMPRESSED_BUF_SIZE);
508
509 if (test_data->use_external_mbufs != 0) {
510 if (comp_perf_allocate_external_mbufs(test_data, mem) < 0)
511 return -1;
512 comp_mbuf_size = 0;
513 decomp_mbuf_size = 0;
514- } else {
515+ } else if (test_data->test_op & COMPRESS) {
516 comp_mbuf_size = test_data->out_seg_sz + RTE_PKTMBUF_HEADROOM;
517 decomp_mbuf_size = test_data->seg_sz + RTE_PKTMBUF_HEADROOM;
518+ } else {
519+ comp_mbuf_size = test_data->seg_sz + RTE_PKTMBUF_HEADROOM;
520+ decomp_mbuf_size = test_data->out_seg_sz + RTE_PKTMBUF_HEADROOM;
521 }
522
523 char pool_name[32] = "";
524@@ -287,26 +307,28 @@ comp_perf_allocate_memory(struct comp_test_data *test_data,
525 return -1;
526 }
527
528- /*
529- * Compressed data might be a bit larger than input data,
530- * if data cannot be compressed
531- */
532- mem->compressed_data = rte_zmalloc_socket(NULL,
533- RTE_MAX(
534- (size_t) test_data->out_seg_sz *
535- test_data->total_segs,
536- (size_t) MIN_COMPRESSED_BUF_SIZE),
537- 0,
538- rte_socket_id());
539+ if (test_data->test_op & COMPRESS) {
540+ /*
541+ * Compressed data might be a bit larger than input data,
542+ * if data cannot be compressed
543+ */
544+ comp_data_size = output_data_sz;
545+ decomp_data_size = test_data->input_data_sz;
546+ } else {
547+ comp_data_size = test_data->input_data_sz;
548+ decomp_data_size = output_data_sz;
549+ }
550+
551+ mem->compressed_data = rte_zmalloc_socket(NULL, comp_data_size, 0,
552+ rte_socket_id());
553 if (mem->compressed_data == NULL) {
554 RTE_LOG(ERR, USER1, "Memory to hold the data from the input "
555 "file could not be allocated\n");
556 return -1;
557 }
558
559- mem->decompressed_data = rte_zmalloc_socket(NULL,
560- test_data->input_data_sz, 0,
561- rte_socket_id());
562+ mem->decompressed_data = rte_zmalloc_socket(NULL, decomp_data_size, 0,
563+ rte_socket_id());
564 if (mem->decompressed_data == NULL) {
565 RTE_LOG(ERR, USER1, "Memory to hold the data from the input "
566 "file could not be allocated\n");
567@@ -344,6 +366,7 @@ int
568 prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
569 {
570 uint32_t remaining_data = test_data->input_data_sz;
571+ uint32_t remaining_data_decomp = test_data->input_data_sz;
572 uint8_t *input_data_ptr = test_data->input_data;
573 size_t data_sz = 0;
574 uint8_t *data_addr;
575@@ -351,6 +374,7 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
576 uint16_t segs_per_mbuf = 0;
577 uint32_t cmz = 0;
578 uint32_t dmz = 0;
579+ bool decompress_only = !!(test_data->test_op == DECOMPRESS);
580
581 for (i = 0; i < mem->total_bufs; i++) {
582 /* Allocate data in input mbuf and copy data from input file */
583@@ -361,8 +385,6 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
584 return -1;
585 }
586
587- data_sz = RTE_MIN(remaining_data, test_data->seg_sz);
588-
589 if (test_data->use_external_mbufs != 0) {
590 rte_pktmbuf_attach_extbuf(mem->decomp_bufs[i],
591 mem->decomp_memzones[dmz]->addr,
592@@ -372,16 +394,23 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
593 dmz++;
594 }
595
596+ if (!decompress_only)
597+ data_sz = RTE_MIN(remaining_data, test_data->seg_sz);
598+ else
599+ data_sz = test_data->out_seg_sz;
600+
601 data_addr = (uint8_t *) rte_pktmbuf_append(
602 mem->decomp_bufs[i], data_sz);
603 if (data_addr == NULL) {
604 RTE_LOG(ERR, USER1, "Could not append data\n");
605 return -1;
606 }
607- rte_memcpy(data_addr, input_data_ptr, data_sz);
608
609- input_data_ptr += data_sz;
610- remaining_data -= data_sz;
611+ if (!decompress_only) {
612+ rte_memcpy(data_addr, input_data_ptr, data_sz);
613+ input_data_ptr += data_sz;
614+ remaining_data -= data_sz;
615+ }
616
617 /* Already one segment in the mbuf */
618 segs_per_mbuf = 1;
619@@ -398,8 +427,6 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
620 return -1;
621 }
622
623- data_sz = RTE_MIN(remaining_data, test_data->seg_sz);
624-
625 if (test_data->use_external_mbufs != 0) {
626 rte_pktmbuf_attach_extbuf(
627 next_seg,
628@@ -410,6 +437,12 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
629 dmz++;
630 }
631
632+ if (!decompress_only)
633+ data_sz = RTE_MIN(remaining_data,
634+ test_data->seg_sz);
635+ else
636+ data_sz = test_data->out_seg_sz;
637+
638 data_addr = (uint8_t *)rte_pktmbuf_append(next_seg,
639 data_sz);
640
641@@ -418,9 +451,11 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
642 return -1;
643 }
644
645- rte_memcpy(data_addr, input_data_ptr, data_sz);
646- input_data_ptr += data_sz;
647- remaining_data -= data_sz;
648+ if (!decompress_only) {
649+ rte_memcpy(data_addr, input_data_ptr, data_sz);
650+ input_data_ptr += data_sz;
651+ remaining_data -= data_sz;
652+ }
653
654 if (rte_pktmbuf_chain(mem->decomp_bufs[i],
655 next_seg) < 0) {
656@@ -447,16 +482,26 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
657 cmz++;
658 }
659
660- data_addr = (uint8_t *) rte_pktmbuf_append(
661- mem->comp_bufs[i],
662- test_data->out_seg_sz);
663+ if (decompress_only)
664+ data_sz = RTE_MIN(remaining_data_decomp, test_data->seg_sz);
665+ else
666+ data_sz = test_data->out_seg_sz;
667+
668+ data_addr = (uint8_t *) rte_pktmbuf_append(mem->comp_bufs[i],
669+ data_sz);
670 if (data_addr == NULL) {
671 RTE_LOG(ERR, USER1, "Could not append data\n");
672 return -1;
673 }
674
675+ if (decompress_only) {
676+ rte_memcpy(data_addr, input_data_ptr, data_sz);
677+ input_data_ptr += data_sz;
678+ remaining_data_decomp -= data_sz;
679+ }
680+
681 /* Chain mbufs if needed for output mbufs */
682- for (j = 1; j < segs_per_mbuf; j++) {
683+ for (j = 1; j < segs_per_mbuf && remaining_data_decomp > 0; j++) {
684 struct rte_mbuf *next_seg =
685 rte_pktmbuf_alloc(mem->comp_buf_pool);
686
687@@ -476,13 +521,25 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
688 cmz++;
689 }
690
691+ if (decompress_only)
692+ data_sz = RTE_MIN(remaining_data_decomp,
693+ test_data->seg_sz);
694+ else
695+ data_sz = test_data->out_seg_sz;
696+
697 data_addr = (uint8_t *)rte_pktmbuf_append(next_seg,
698- test_data->out_seg_sz);
699+ data_sz);
700 if (data_addr == NULL) {
701 RTE_LOG(ERR, USER1, "Could not append data\n");
702 return -1;
703 }
704
705+ if (decompress_only) {
706+ rte_memcpy(data_addr, input_data_ptr, data_sz);
707+ input_data_ptr += data_sz;
708+ remaining_data_decomp -= data_sz;
709+ }
710+
711 if (rte_pktmbuf_chain(mem->comp_bufs[i],
712 next_seg) < 0) {
713 RTE_LOG(ERR, USER1, "Could not chain mbufs\n");
714diff --git a/app/test-compress-perf/comp_perf_test_cyclecount.c b/app/test-compress-perf/comp_perf_test_cyclecount.c
715index 7473cb6..ce6c4d7 100644
716--- a/app/test-compress-perf/comp_perf_test_cyclecount.c
717+++ b/app/test-compress-perf/comp_perf_test_cyclecount.c
718@@ -514,38 +514,55 @@ cperf_cyclecount_test_runner(void *test_ctx)
719 if (cperf_verify_test_runner(&ctx->ver))
720 return EXIT_FAILURE;
721
722- /*
723- * Run the tests twice, discarding the first performance
724- * results, before the cache is warmed up
725- */
726-
727- /* C O M P R E S S */
728- for (i = 0; i < 2; i++) {
729- if (main_loop(ctx, RTE_COMP_COMPRESS) < 0)
730- return EXIT_FAILURE;
731- }
732+ if (test_data->test_op & COMPRESS) {
733+ /*
734+ * Run the test twice, discarding the first performance
735+ * results, before the cache is warmed up
736+ */
737+ for (i = 0; i < 2; i++) {
738+ if (main_loop(ctx, RTE_COMP_COMPRESS) < 0)
739+ return EXIT_FAILURE;
740+ }
741
742- ops_enq_retries_comp = ctx->ops_enq_retries;
743- ops_deq_retries_comp = ctx->ops_deq_retries;
744+ ops_enq_retries_comp = ctx->ops_enq_retries;
745+ ops_deq_retries_comp = ctx->ops_deq_retries;
746
747- duration_enq_per_op_comp = ctx->duration_enq /
748- (ctx->ver.mem.total_bufs * test_data->num_iter);
749- duration_deq_per_op_comp = ctx->duration_deq /
750- (ctx->ver.mem.total_bufs * test_data->num_iter);
751+ duration_enq_per_op_comp = ctx->duration_enq /
752+ (ctx->ver.mem.total_bufs * test_data->num_iter);
753+ duration_deq_per_op_comp = ctx->duration_deq /
754+ (ctx->ver.mem.total_bufs * test_data->num_iter);
755+ } else {
756+ ops_enq_retries_comp = 0;
757+ ops_deq_retries_comp = 0;
758
759- /* D E C O M P R E S S */
760- for (i = 0; i < 2; i++) {
761- if (main_loop(ctx, RTE_COMP_DECOMPRESS) < 0)
762- return EXIT_FAILURE;
763+ duration_enq_per_op_comp = 0;
764+ duration_deq_per_op_comp = 0;
765 }
766
767- ops_enq_retries_decomp = ctx->ops_enq_retries;
768- ops_deq_retries_decomp = ctx->ops_deq_retries;
769+ if (test_data->test_op & DECOMPRESS) {
770+ /*
771+ * Run the test twice, discarding the first performance
772+ * results, before the cache is warmed up
773+ */
774+ for (i = 0; i < 2; i++) {
775+ if (main_loop(ctx, RTE_COMP_DECOMPRESS) < 0)
776+ return EXIT_FAILURE;
777+ }
778
779- duration_enq_per_op_decomp = ctx->duration_enq /
780- (ctx->ver.mem.total_bufs * test_data->num_iter);
781- duration_deq_per_op_decomp = ctx->duration_deq /
782- (ctx->ver.mem.total_bufs * test_data->num_iter);
783+ ops_enq_retries_decomp = ctx->ops_enq_retries;
784+ ops_deq_retries_decomp = ctx->ops_deq_retries;
785+
786+ duration_enq_per_op_decomp = ctx->duration_enq /
787+ (ctx->ver.mem.total_bufs * test_data->num_iter);
788+ duration_deq_per_op_decomp = ctx->duration_deq /
789+ (ctx->ver.mem.total_bufs * test_data->num_iter);
790+ } else {
791+ ops_enq_retries_decomp = 0;
792+ ops_deq_retries_decomp = 0;
793+
794+ duration_enq_per_op_decomp = 0;
795+ duration_deq_per_op_decomp = 0;
796+ }
797
798 duration_setup_per_op = ctx->duration_op /
799 (ctx->ver.mem.total_bufs * test_data->num_iter);
800@@ -563,7 +580,7 @@ cperf_cyclecount_test_runner(void *test_ctx)
801 " [D-e] - decompression enqueue\n"
802 " [D-d] - decompression dequeue\n"
803 " - Cycles section: number of cycles per 'op' for the following operations:\n"
804- " setup/op - memory allocation, op configuration and memory dealocation\n"
805+ " setup/op - memory allocation, op configuration and memory deallocation\n"
806 " [C-e] - compression enqueue\n"
807 " [C-d] - compression dequeue\n"
808 " [D-e] - decompression enqueue\n"
809diff --git a/app/test-compress-perf/comp_perf_test_throughput.c b/app/test-compress-perf/comp_perf_test_throughput.c
810index 79cd2b2..c9f8237 100644
811--- a/app/test-compress-perf/comp_perf_test_throughput.c
812+++ b/app/test-compress-perf/comp_perf_test_throughput.c
813@@ -359,41 +359,53 @@ cperf_throughput_test_runner(void *test_ctx)
814 * First the verification part is needed
815 */
816 if (cperf_verify_test_runner(&ctx->ver)) {
817- ret = EXIT_FAILURE;
818+ ret = EXIT_FAILURE;
819 goto end;
820 }
821
822- /*
823- * Run the tests twice, discarding the first performance
824- * results, before the cache is warmed up
825- */
826- for (i = 0; i < 2; i++) {
827- if (main_loop(ctx, RTE_COMP_COMPRESS) < 0) {
828- ret = EXIT_FAILURE;
829- goto end;
830+ if (test_data->test_op & COMPRESS) {
831+ /*
832+ * Run the test twice, discarding the first performance
833+ * results, before the cache is warmed up
834+ */
835+ for (i = 0; i < 2; i++) {
836+ if (main_loop(ctx, RTE_COMP_COMPRESS) < 0) {
837+ ret = EXIT_FAILURE;
838+ goto end;
839+ }
840 }
841- }
842
843- for (i = 0; i < 2; i++) {
844- if (main_loop(ctx, RTE_COMP_DECOMPRESS) < 0) {
845- ret = EXIT_FAILURE;
846- goto end;
847- }
848+ ctx->comp_tsc_byte =
849+ (double)(ctx->comp_tsc_duration[test_data->level]) /
850+ test_data->input_data_sz;
851+ ctx->comp_gbps = rte_get_tsc_hz() / ctx->comp_tsc_byte * 8 /
852+ 1000000000;
853+ } else {
854+ ctx->comp_tsc_byte = 0;
855+ ctx->comp_gbps = 0;
856 }
857
858- ctx->comp_tsc_byte =
859- (double)(ctx->comp_tsc_duration[test_data->level]) /
860- test_data->input_data_sz;
861+ if (test_data->test_op & DECOMPRESS) {
862+ /*
863+ * Run the test twice, discarding the first performance
864+ * results, before the cache is warmed up
865+ */
866+ for (i = 0; i < 2; i++) {
867+ if (main_loop(ctx, RTE_COMP_DECOMPRESS) < 0) {
868+ ret = EXIT_FAILURE;
869+ goto end;
870+ }
871+ }
872
873- ctx->decomp_tsc_byte =
874+ ctx->decomp_tsc_byte =
875 (double)(ctx->decomp_tsc_duration[test_data->level]) /
876- test_data->input_data_sz;
877-
878- ctx->comp_gbps = rte_get_tsc_hz() / ctx->comp_tsc_byte * 8 /
879- 1000000000;
880-
881- ctx->decomp_gbps = rte_get_tsc_hz() / ctx->decomp_tsc_byte * 8 /
882- 1000000000;
883+ test_data->input_data_sz;
884+ ctx->decomp_gbps = rte_get_tsc_hz() / ctx->decomp_tsc_byte * 8 /
885+ 1000000000;
886+ } else {
887+ ctx->decomp_tsc_byte = 0;
888+ ctx->decomp_gbps = 0;
889+ }
890
891 exp = 0;
892 if (__atomic_compare_exchange_n(&display_once, &exp, 1, 0,
893diff --git a/app/test-compress-perf/comp_perf_test_verify.c b/app/test-compress-perf/comp_perf_test_verify.c
894index 8964442..7d6b6ab 100644
895--- a/app/test-compress-perf/comp_perf_test_verify.c
896+++ b/app/test-compress-perf/comp_perf_test_verify.c
897@@ -114,7 +114,8 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)
898 output_data_sz = &ctx->decomp_data_sz;
899 input_bufs = mem->comp_bufs;
900 output_bufs = mem->decomp_bufs;
901- out_seg_sz = test_data->seg_sz;
902+ out_seg_sz = (test_data->test_op & COMPRESS) ?
903+ test_data->seg_sz : test_data->out_seg_sz;
904 }
905
906 /* Create private xform */
907@@ -226,7 +227,7 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)
908 op->status ==
909 RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE) {
910 RTE_LOG(ERR, USER1,
911-"Out of space error occurred due to uncompressible input data expanding to larger than destination buffer. Increase the EXPANSE_RATIO constant to use this data.\n");
912+"Out of space error occurred due to incompressible input data expanding to larger than destination buffer. Increase the EXPANSE_RATIO constant to use this data.\n");
913 res = -1;
914 goto end;
915 } else if (op->status !=
916@@ -311,7 +312,7 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)
917 op->status ==
918 RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE) {
919 RTE_LOG(ERR, USER1,
920-"Out of space error occurred due to uncompressible input data expanding to larger than destination buffer. Increase the EXPANSE_RATIO constant to use this data.\n");
921+"Out of space error occurred due to incompressible input data expanding to larger than destination buffer. Increase the EXPANSE_RATIO constant to use this data.\n");
922 res = -1;
923 goto end;
924 } else if (op->status !=
925@@ -392,44 +393,59 @@ cperf_verify_test_runner(void *test_ctx)
926 int ret = EXIT_SUCCESS;
927 static uint16_t display_once;
928 uint32_t lcore = rte_lcore_id();
929+ uint16_t exp = 0;
930
931 ctx->mem.lcore_id = lcore;
932
933 test_data->ratio = 0;
934
935- if (main_loop(ctx, RTE_COMP_COMPRESS) < 0) {
936- ret = EXIT_FAILURE;
937- goto end;
938+ if (test_data->test_op & COMPRESS) {
939+ if (main_loop(ctx, RTE_COMP_COMPRESS) < 0) {
940+ ret = EXIT_FAILURE;
941+ goto end;
942+ }
943 }
944
945- if (main_loop(ctx, RTE_COMP_DECOMPRESS) < 0) {
946- ret = EXIT_FAILURE;
947- goto end;
948- }
949+ if (test_data->test_op & DECOMPRESS) {
950+ if (main_loop(ctx, RTE_COMP_DECOMPRESS) < 0) {
951+ ret = EXIT_FAILURE;
952+ goto end;
953+ }
954
955- if (ctx->decomp_data_sz != test_data->input_data_sz) {
956- RTE_LOG(ERR, USER1,
957- "Decompressed data length not equal to input data length\n");
958- RTE_LOG(ERR, USER1,
959- "Decompressed size = %zu, expected = %zu\n",
960- ctx->decomp_data_sz, test_data->input_data_sz);
961- ret = EXIT_FAILURE;
962- goto end;
963- } else {
964- if (memcmp(ctx->mem.decompressed_data,
965- test_data->input_data,
966- test_data->input_data_sz) != 0) {
967+ if (!(test_data->test_op & COMPRESS)) {
968+ /*
969+ * For DECOMPRESS_ONLY mode there is no more
970+ * verifications, reset the 'ratio' and 'comp_data_sz'
971+ * fields for other tests report.
972+ */
973+ ctx->comp_data_sz = 0;
974+ ctx->ratio = 0;
975+ goto end;
976+ }
977+
978+ if (ctx->decomp_data_sz != test_data->input_data_sz) {
979+ RTE_LOG(ERR, USER1,
980+ "Decompressed data length not equal to input data length\n");
981 RTE_LOG(ERR, USER1,
982- "Decompressed data is not the same as file data\n");
983+ "Decompressed size = %zu, expected = %zu\n",
984+ ctx->decomp_data_sz, test_data->input_data_sz);
985 ret = EXIT_FAILURE;
986 goto end;
987+ } else {
988+ if (memcmp(ctx->mem.decompressed_data,
989+ test_data->input_data,
990+ test_data->input_data_sz) != 0) {
991+ RTE_LOG(ERR, USER1,
992+ "Decompressed data is not the same as file data\n");
993+ ret = EXIT_FAILURE;
994+ goto end;
995+ }
996 }
997 }
998
999 ctx->ratio = (double) ctx->comp_data_sz /
1000 test_data->input_data_sz * 100;
1001
1002- uint16_t exp = 0;
1003 if (!ctx->silent) {
1004 if (__atomic_compare_exchange_n(&display_once, &exp, 1, 0,
1005 __ATOMIC_RELAXED, __ATOMIC_RELAXED)) {
1006diff --git a/app/test-compress-perf/main.c b/app/test-compress-perf/main.c
1007index 41b8edc..bbb4c79 100644
1008--- a/app/test-compress-perf/main.c
1009+++ b/app/test-compress-perf/main.c
1010@@ -254,6 +254,14 @@ comp_perf_dump_input_data(struct comp_test_data *test_data)
1011 goto end;
1012 }
1013
1014+ if (!(test_data->test_op & COMPRESS) &&
1015+ test_data->input_data_sz >
1016+ (size_t) test_data->seg_sz * (size_t) test_data->max_sgl_segs) {
1017+ RTE_LOG(ERR, USER1,
1018+ "Size of input must be less than total segments\n");
1019+ goto end;
1020+ }
1021+
1022 test_data->input_data = rte_zmalloc_socket(NULL,
1023 test_data->input_data_sz, 0, rte_socket_id());
1024
1025diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c
1026index 61a3967..93b9bfb 100644
1027--- a/app/test-crypto-perf/cperf_ops.c
1028+++ b/app/test-crypto-perf/cperf_ops.c
1029@@ -42,8 +42,7 @@ test_ipsec_vec_populate(struct rte_mbuf *m, const struct cperf_options *options,
1030 {
1031 struct rte_ipv4_hdr *ip = rte_pktmbuf_mtod(m, struct rte_ipv4_hdr *);
1032
1033- if ((options->aead_op == RTE_CRYPTO_AEAD_OP_ENCRYPT) ||
1034- (options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT)) {
1035+ if (options->is_outbound) {
1036 memcpy(ip, test_vector->plaintext.data,
1037 sizeof(struct rte_ipv4_hdr));
1038
1039@@ -645,8 +644,9 @@ create_ipsec_session(struct rte_mempool *sess_mp,
1040 const struct cperf_test_vector *test_vector,
1041 uint16_t iv_offset)
1042 {
1043- struct rte_crypto_sym_xform xform = {0};
1044 struct rte_crypto_sym_xform auth_xform = {0};
1045+ struct rte_crypto_sym_xform *crypto_xform;
1046+ struct rte_crypto_sym_xform xform = {0};
1047
1048 if (options->aead_algo != 0) {
1049 /* Setup AEAD Parameters */
1050@@ -660,10 +660,10 @@ create_ipsec_session(struct rte_mempool *sess_mp,
1051 xform.aead.iv.length = test_vector->aead_iv.length;
1052 xform.aead.digest_length = options->digest_sz;
1053 xform.aead.aad_length = options->aead_aad_sz;
1054+ crypto_xform = &xform;
1055 } else if (options->cipher_algo != 0 && options->auth_algo != 0) {
1056 /* Setup Cipher Parameters */
1057 xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
1058- xform.next = NULL;
1059 xform.cipher.algo = options->cipher_algo;
1060 xform.cipher.op = options->cipher_op;
1061 xform.cipher.iv.offset = iv_offset;
1062@@ -680,7 +680,6 @@ create_ipsec_session(struct rte_mempool *sess_mp,
1063
1064 /* Setup Auth Parameters */
1065 auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
1066- auth_xform.next = NULL;
1067 auth_xform.auth.algo = options->auth_algo;
1068 auth_xform.auth.op = options->auth_op;
1069 auth_xform.auth.iv.offset = iv_offset +
1070@@ -699,7 +698,15 @@ create_ipsec_session(struct rte_mempool *sess_mp,
1071 auth_xform.auth.iv.length = 0;
1072 }
1073
1074- xform.next = &auth_xform;
1075+ if (options->is_outbound) {
1076+ crypto_xform = &xform;
1077+ xform.next = &auth_xform;
1078+ auth_xform.next = NULL;
1079+ } else {
1080+ crypto_xform = &auth_xform;
1081+ auth_xform.next = &xform;
1082+ xform.next = NULL;
1083+ }
1084 } else {
1085 return NULL;
1086 }
1087@@ -722,30 +729,26 @@ create_ipsec_session(struct rte_mempool *sess_mp,
1088 .action_type = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL,
1089 .protocol = RTE_SECURITY_PROTOCOL_IPSEC,
1090 {.ipsec = {
1091- .spi = rte_lcore_id(),
1092+ .spi = rte_lcore_id() + 1,
1093 /**< For testing sake, lcore_id is taken as SPI so that
1094 * for every core a different session is created.
1095 */
1096 .salt = CPERF_IPSEC_SALT,
1097 .options = { 0 },
1098 .replay_win_sz = 0,
1099- .direction =
1100- ((options->cipher_op ==
1101- RTE_CRYPTO_CIPHER_OP_ENCRYPT) &&
1102- (options->auth_op ==
1103- RTE_CRYPTO_AUTH_OP_GENERATE)) ||
1104- (options->aead_op ==
1105- RTE_CRYPTO_AEAD_OP_ENCRYPT) ?
1106- RTE_SECURITY_IPSEC_SA_DIR_EGRESS :
1107- RTE_SECURITY_IPSEC_SA_DIR_INGRESS,
1108 .proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,
1109 .mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,
1110 .tunnel = tunnel,
1111 } },
1112 .userdata = NULL,
1113- .crypto_xform = &xform
1114+ .crypto_xform = crypto_xform,
1115 };
1116
1117+ if (options->is_outbound)
1118+ sess_conf.ipsec.direction = RTE_SECURITY_IPSEC_SA_DIR_EGRESS;
1119+ else
1120+ sess_conf.ipsec.direction = RTE_SECURITY_IPSEC_SA_DIR_INGRESS;
1121+
1122 struct rte_security_ctx *ctx = (struct rte_security_ctx *)
1123 rte_cryptodev_get_sec_ctx(dev_id);
1124
1125diff --git a/app/test-crypto-perf/cperf_options.h b/app/test-crypto-perf/cperf_options.h
1126index 613d6d3..6966e0b 100644
1127--- a/app/test-crypto-perf/cperf_options.h
1128+++ b/app/test-crypto-perf/cperf_options.h
1129@@ -105,6 +105,7 @@ struct cperf_options {
1130 uint32_t out_of_place:1;
1131 uint32_t silent:1;
1132 uint32_t csv:1;
1133+ uint32_t is_outbound:1;
1134
1135 enum rte_crypto_cipher_algorithm cipher_algo;
1136 enum rte_crypto_cipher_operation cipher_op;
1137diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c
1138index bc5e312..1f06e15 100644
1139--- a/app/test-crypto-perf/cperf_options_parsing.c
1140+++ b/app/test-crypto-perf/cperf_options_parsing.c
1141@@ -519,6 +519,7 @@ parse_test_file(struct cperf_options *opts,
1142 if (access(opts->test_file, F_OK) != -1)
1143 return 0;
1144 RTE_LOG(ERR, USER1, "Test vector file doesn't exist\n");
1145+ free(opts->test_file);
1146
1147 return -1;
1148 }
1149@@ -1318,6 +1319,21 @@ cperf_options_check(struct cperf_options *options)
1150 if (check_docsis_buffer_length(options) < 0)
1151 return -EINVAL;
1152 }
1153+
1154+ if (options->op_type == CPERF_IPSEC) {
1155+ if (options->aead_algo) {
1156+ if (options->aead_op == RTE_CRYPTO_AEAD_OP_ENCRYPT)
1157+ options->is_outbound = 1;
1158+ else
1159+ options->is_outbound = 0;
1160+ } else {
1161+ if (options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT &&
1162+ options->auth_op == RTE_CRYPTO_AUTH_OP_GENERATE)
1163+ options->is_outbound = 1;
1164+ else
1165+ options->is_outbound = 0;
1166+ }
1167+ }
1168 #endif
1169
1170 return 0;
1171diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
1172index 27646cd..932aab1 100644
1173--- a/app/test-crypto-perf/cperf_test_common.c
1174+++ b/app/test-crypto-perf/cperf_test_common.c
1175@@ -197,9 +197,11 @@ cperf_alloc_common_memory(const struct cperf_options *options,
1176 RTE_CACHE_LINE_ROUNDUP(crypto_op_total_size);
1177 uint32_t mbuf_size = sizeof(struct rte_mbuf) + options->segment_sz;
1178 uint32_t max_size = options->max_buffer_size + options->digest_sz;
1179- uint16_t segments_nb = (max_size % options->segment_sz) ?
1180- (max_size / options->segment_sz) + 1 :
1181- max_size / options->segment_sz;
1182+ uint32_t segment_data_len = options->segment_sz - options->headroom_sz -
1183+ options->tailroom_sz;
1184+ uint16_t segments_nb = (max_size % segment_data_len) ?
1185+ (max_size / segment_data_len) + 1 :
1186+ (max_size / segment_data_len);
1187 uint32_t obj_size = crypto_op_total_size_padded +
1188 (mbuf_size * segments_nb);
1189
1190diff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c
1191index 49bf421..406e082 100644
1192--- a/app/test-crypto-perf/cperf_test_latency.c
1193+++ b/app/test-crypto-perf/cperf_test_latency.c
1194@@ -43,15 +43,28 @@ struct priv_op_data {
1195 static void
1196 cperf_latency_test_free(struct cperf_latency_ctx *ctx)
1197 {
1198- if (ctx) {
1199- if (ctx->sess)
1200- rte_cryptodev_sym_session_free(ctx->dev_id, ctx->sess);
1201-
1202- rte_mempool_free(ctx->pool);
1203+ if (ctx == NULL)
1204+ return;
1205
1206- rte_free(ctx->res);
1207- rte_free(ctx);
1208+ if (ctx->sess != NULL) {
1209+ if (ctx->options->op_type == CPERF_ASYM_MODEX)
1210+ rte_cryptodev_asym_session_free(ctx->dev_id, ctx->sess);
1211+#ifdef RTE_LIB_SECURITY
1212+ else if (ctx->options->op_type == CPERF_PDCP ||
1213+ ctx->options->op_type == CPERF_DOCSIS ||
1214+ ctx->options->op_type == CPERF_IPSEC) {
1215+ struct rte_security_ctx *sec_ctx =
1216+ rte_cryptodev_get_sec_ctx(ctx->dev_id);
1217+ rte_security_session_destroy(sec_ctx, ctx->sess);
1218+ }
1219+#endif
1220+ else
1221+ rte_cryptodev_sym_session_free(ctx->dev_id, ctx->sess);
1222 }
1223+
1224+ rte_mempool_free(ctx->pool);
1225+ rte_free(ctx->res);
1226+ rte_free(ctx);
1227 }
1228
1229 void *
1230diff --git a/app/test-crypto-perf/cperf_test_vector_parsing.c b/app/test-crypto-perf/cperf_test_vector_parsing.c
1231index 98e46c3..737d61d 100644
1232--- a/app/test-crypto-perf/cperf_test_vector_parsing.c
1233+++ b/app/test-crypto-perf/cperf_test_vector_parsing.c
1234@@ -30,6 +30,7 @@ free_test_vector(struct cperf_test_vector *vector, struct cperf_options *opts)
1235 rte_free(vector->cipher_key.data);
1236 rte_free(vector->auth_key.data);
1237 rte_free(vector->ciphertext.data);
1238+ free(opts->test_file);
1239 }
1240
1241 rte_free(vector);
1242diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c
1243index c03e1d5..8042c94 100644
1244--- a/app/test-crypto-perf/cperf_test_verify.c
1245+++ b/app/test-crypto-perf/cperf_test_verify.c
1246@@ -38,14 +38,27 @@ struct cperf_op_result {
1247 static void
1248 cperf_verify_test_free(struct cperf_verify_ctx *ctx)
1249 {
1250- if (ctx) {
1251- if (ctx->sess)
1252- rte_cryptodev_sym_session_free(ctx->dev_id, ctx->sess);
1253-
1254- rte_mempool_free(ctx->pool);
1255+ if (ctx == NULL)
1256+ return;
1257
1258- rte_free(ctx);
1259+ if (ctx->sess != NULL) {
1260+ if (ctx->options->op_type == CPERF_ASYM_MODEX)
1261+ rte_cryptodev_asym_session_free(ctx->dev_id, ctx->sess);
1262+#ifdef RTE_LIB_SECURITY
1263+ else if (ctx->options->op_type == CPERF_PDCP ||
1264+ ctx->options->op_type == CPERF_DOCSIS ||
1265+ ctx->options->op_type == CPERF_IPSEC) {
1266+ struct rte_security_ctx *sec_ctx =
1267+ rte_cryptodev_get_sec_ctx(ctx->dev_id);
1268+ rte_security_session_destroy(sec_ctx, ctx->sess);
1269+ }
1270+#endif
1271+ else
1272+ rte_cryptodev_sym_session_free(ctx->dev_id, ctx->sess);
1273 }
1274+
1275+ rte_mempool_free(ctx->pool);
1276+ rte_free(ctx);
1277 }
1278
1279 void *
1280diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
1281index 4a92068..e0ef78a 100644
1282--- a/app/test-flow-perf/main.c
1283+++ b/app/test-flow-perf/main.c
1284@@ -848,7 +848,12 @@ args_parse(int argc, char **argv)
1285 /* Control */
1286 if (strcmp(lgopts[opt_idx].name,
1287 "rules-batch") == 0) {
1288- rules_batch = atoi(optarg);
1289+ n = atoi(optarg);
1290+ if (n > 0)
1291+ rules_batch = n;
1292+ else
1293+ rte_exit(EXIT_FAILURE,
1294+ "flow rules-batch should be > 0\n");
1295 }
1296 if (strcmp(lgopts[opt_idx].name,
1297 "rules-count") == 0) {
1298diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
1299index b32dc8b..07432f3 100644
1300--- a/app/test-pmd/cmdline.c
1301+++ b/app/test-pmd/cmdline.c
1302@@ -12917,32 +12917,25 @@ cmdline_read_from_file(const char *filename)
1303 printf("Read CLI commands from %s\n", filename);
1304 }
1305
1306+void
1307+prompt_exit(void)
1308+{
1309+ cmdline_quit(testpmd_cl);
1310+}
1311+
1312 /* prompt function, called from main on MAIN lcore */
1313 void
1314 prompt(void)
1315 {
1316- int ret;
1317-
1318 testpmd_cl = cmdline_stdin_new(main_ctx, "testpmd> ");
1319- if (testpmd_cl == NULL)
1320+ if (testpmd_cl == NULL) {
1321+ fprintf(stderr,
1322+ "Failed to create stdin based cmdline context\n");
1323 return;
1324-
1325- ret = atexit(prompt_exit);
1326- if (ret != 0)
1327- fprintf(stderr, "Cannot set exit function for cmdline\n");
1328+ }
1329
1330 cmdline_interact(testpmd_cl);
1331- if (ret != 0)
1332- cmdline_stdin_exit(testpmd_cl);
1333-}
1334-
1335-void
1336-prompt_exit(void)
1337-{
1338- if (testpmd_cl != NULL) {
1339- cmdline_quit(testpmd_cl);
1340- cmdline_stdin_exit(testpmd_cl);
1341- }
1342+ cmdline_stdin_exit(testpmd_cl);
1343 }
1344
1345 void
1346diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
1347index 8810849..042da57 100644
1348--- a/app/test-pmd/cmdline_flow.c
1349+++ b/app/test-pmd/cmdline_flow.c
1350@@ -7737,15 +7737,15 @@ parse_vc_action_l2_encap(struct context *ctx, const struct token *token,
1351 l2_encap_conf.eth_dst, RTE_ETHER_ADDR_LEN);
1352 memcpy(eth.src.addr_bytes,
1353 l2_encap_conf.eth_src, RTE_ETHER_ADDR_LEN);
1354- memcpy(header, &eth, sizeof(eth));
1355- header += sizeof(eth);
1356+ memcpy(header, &eth.hdr, sizeof(struct rte_ether_hdr));
1357+ header += sizeof(struct rte_ether_hdr);
1358 if (l2_encap_conf.select_vlan) {
1359 if (l2_encap_conf.select_ipv4)
1360 vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
1361 else
1362 vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
1363- memcpy(header, &vlan, sizeof(vlan));
1364- header += sizeof(vlan);
1365+ memcpy(header, &vlan.hdr, sizeof(struct rte_vlan_hdr));
1366+ header += sizeof(struct rte_vlan_hdr);
1367 }
1368 action_encap_data->conf.size = header -
1369 action_encap_data->data;
1370@@ -7793,11 +7793,11 @@ parse_vc_action_l2_decap(struct context *ctx, const struct token *token,
1371 header = action_decap_data->data;
1372 if (l2_decap_conf.select_vlan)
1373 eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN);
1374- memcpy(header, &eth, sizeof(eth));
1375- header += sizeof(eth);
1376+ memcpy(header, &eth.hdr, sizeof(struct rte_ether_hdr));
1377+ header += sizeof(struct rte_ether_hdr);
1378 if (l2_decap_conf.select_vlan) {
1379- memcpy(header, &vlan, sizeof(vlan));
1380- header += sizeof(vlan);
1381+ memcpy(header, &vlan.hdr, sizeof(struct rte_vlan_hdr));
1382+ header += sizeof(struct rte_vlan_hdr);
1383 }
1384 action_decap_data->conf.size = header -
1385 action_decap_data->data;
1386@@ -7877,15 +7877,15 @@ parse_vc_action_mplsogre_encap(struct context *ctx, const struct token *token,
1387 mplsogre_encap_conf.eth_dst, RTE_ETHER_ADDR_LEN);
1388 memcpy(eth.src.addr_bytes,
1389 mplsogre_encap_conf.eth_src, RTE_ETHER_ADDR_LEN);
1390- memcpy(header, &eth, sizeof(eth));
1391- header += sizeof(eth);
1392+ memcpy(header, &eth.hdr, sizeof(struct rte_ether_hdr));
1393+ header += sizeof(struct rte_ether_hdr);
1394 if (mplsogre_encap_conf.select_vlan) {
1395 if (mplsogre_encap_conf.select_ipv4)
1396 vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
1397 else
1398 vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
1399- memcpy(header, &vlan, sizeof(vlan));
1400- header += sizeof(vlan);
1401+ memcpy(header, &vlan.hdr, sizeof(struct rte_vlan_hdr));
1402+ header += sizeof(struct rte_vlan_hdr);
1403 }
1404 if (mplsogre_encap_conf.select_ipv4) {
1405 memcpy(header, &ipv4, sizeof(ipv4));
1406@@ -7972,15 +7972,15 @@ parse_vc_action_mplsogre_decap(struct context *ctx, const struct token *token,
1407 mplsogre_encap_conf.eth_dst, RTE_ETHER_ADDR_LEN);
1408 memcpy(eth.src.addr_bytes,
1409 mplsogre_encap_conf.eth_src, RTE_ETHER_ADDR_LEN);
1410- memcpy(header, &eth, sizeof(eth));
1411- header += sizeof(eth);
1412+ memcpy(header, &eth.hdr, sizeof(struct rte_ether_hdr));
1413+ header += sizeof(struct rte_ether_hdr);
1414 if (mplsogre_encap_conf.select_vlan) {
1415 if (mplsogre_encap_conf.select_ipv4)
1416 vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
1417 else
1418 vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
1419- memcpy(header, &vlan, sizeof(vlan));
1420- header += sizeof(vlan);
1421+ memcpy(header, &vlan.hdr, sizeof(struct rte_vlan_hdr));
1422+ header += sizeof(struct rte_vlan_hdr);
1423 }
1424 if (mplsogre_encap_conf.select_ipv4) {
1425 memcpy(header, &ipv4, sizeof(ipv4));
1426@@ -8071,15 +8071,15 @@ parse_vc_action_mplsoudp_encap(struct context *ctx, const struct token *token,
1427 mplsoudp_encap_conf.eth_dst, RTE_ETHER_ADDR_LEN);
1428 memcpy(eth.src.addr_bytes,
1429 mplsoudp_encap_conf.eth_src, RTE_ETHER_ADDR_LEN);
1430- memcpy(header, &eth, sizeof(eth));
1431- header += sizeof(eth);
1432+ memcpy(header, &eth.hdr, sizeof(struct rte_ether_hdr));
1433+ header += sizeof(struct rte_ether_hdr);
1434 if (mplsoudp_encap_conf.select_vlan) {
1435 if (mplsoudp_encap_conf.select_ipv4)
1436 vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
1437 else
1438 vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
1439- memcpy(header, &vlan, sizeof(vlan));
1440- header += sizeof(vlan);
1441+ memcpy(header, &vlan.hdr, sizeof(struct rte_vlan_hdr));
1442+ header += sizeof(struct rte_vlan_hdr);
1443 }
1444 if (mplsoudp_encap_conf.select_ipv4) {
1445 memcpy(header, &ipv4, sizeof(ipv4));
1446@@ -8168,15 +8168,15 @@ parse_vc_action_mplsoudp_decap(struct context *ctx, const struct token *token,
1447 mplsoudp_encap_conf.eth_dst, RTE_ETHER_ADDR_LEN);
1448 memcpy(eth.src.addr_bytes,
1449 mplsoudp_encap_conf.eth_src, RTE_ETHER_ADDR_LEN);
1450- memcpy(header, &eth, sizeof(eth));
1451- header += sizeof(eth);
1452+ memcpy(header, &eth.hdr, sizeof(struct rte_ether_hdr));
1453+ header += sizeof(struct rte_ether_hdr);
1454 if (mplsoudp_encap_conf.select_vlan) {
1455 if (mplsoudp_encap_conf.select_ipv4)
1456 vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
1457 else
1458 vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
1459- memcpy(header, &vlan, sizeof(vlan));
1460- header += sizeof(vlan);
1461+ memcpy(header, &vlan.hdr, sizeof(struct rte_vlan_hdr));
1462+ header += sizeof(struct rte_vlan_hdr);
1463 }
1464 if (mplsoudp_encap_conf.select_ipv4) {
1465 memcpy(header, &ipv4, sizeof(ipv4));
1466diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
1467index 1c24598..90a59e0 100644
1468--- a/app/test-pmd/csumonly.c
1469+++ b/app/test-pmd/csumonly.c
1470@@ -1168,10 +1168,13 @@ tunnel_update:
1471
1472 nb_prep = rte_eth_tx_prepare(fs->tx_port, fs->tx_queue,
1473 tx_pkts_burst, nb_rx);
1474- if (nb_prep != nb_rx)
1475+ if (nb_prep != nb_rx) {
1476 fprintf(stderr,
1477 "Preparing packet burst to transmit failed: %s\n",
1478 rte_strerror(rte_errno));
1479+ fs->fwd_dropped += (nb_rx - nb_prep);
1480+ rte_pktmbuf_free_bulk(&tx_pkts_burst[nb_prep], nb_rx - nb_prep);
1481+ }
1482
1483 nb_tx = rte_eth_tx_burst(fs->tx_port, fs->tx_queue, tx_pkts_burst,
1484 nb_prep);
1485@@ -1179,12 +1182,12 @@ tunnel_update:
1486 /*
1487 * Retry if necessary
1488 */
1489- if (unlikely(nb_tx < nb_rx) && fs->retry_enabled) {
1490+ if (unlikely(nb_tx < nb_prep) && fs->retry_enabled) {
1491 retry = 0;
1492- while (nb_tx < nb_rx && retry++ < burst_tx_retry_num) {
1493+ while (nb_tx < nb_prep && retry++ < burst_tx_retry_num) {
1494 rte_delay_us(burst_tx_delay_time);
1495 nb_tx += rte_eth_tx_burst(fs->tx_port, fs->tx_queue,
1496- &tx_pkts_burst[nb_tx], nb_rx - nb_tx);
1497+ &tx_pkts_burst[nb_tx], nb_prep - nb_tx);
1498 }
1499 }
1500 fs->tx_packets += nb_tx;
1501@@ -1194,11 +1197,11 @@ tunnel_update:
1502 fs->rx_bad_outer_ip_csum += rx_bad_outer_ip_csum;
1503
1504 inc_tx_burst_stats(fs, nb_tx);
1505- if (unlikely(nb_tx < nb_rx)) {
1506- fs->fwd_dropped += (nb_rx - nb_tx);
1507+ if (unlikely(nb_tx < nb_prep)) {
1508+ fs->fwd_dropped += (nb_prep - nb_tx);
1509 do {
1510 rte_pktmbuf_free(tx_pkts_burst[nb_tx]);
1511- } while (++nb_tx < nb_rx);
1512+ } while (++nb_tx < nb_prep);
1513 }
1514
1515 get_end_cycles(fs, start_tsc);
1516diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
1517index fc4e2d0..896d5ef 100644
1518--- a/app/test-pmd/ieee1588fwd.c
1519+++ b/app/test-pmd/ieee1588fwd.c
1520@@ -184,13 +184,13 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
1521
1522 /* Forward PTP packet with hardware TX timestamp */
1523 mb->ol_flags |= RTE_MBUF_F_TX_IEEE1588_TMST;
1524- fs->tx_packets += 1;
1525 if (rte_eth_tx_burst(fs->rx_port, fs->tx_queue, &mb, 1) == 0) {
1526 printf("Port %u sent PTP packet dropped\n", fs->rx_port);
1527 fs->fwd_dropped += 1;
1528 rte_pktmbuf_free(mb);
1529 return;
1530 }
1531+ fs->tx_packets += 1;
1532
1533 /*
1534 * Check the TX timestamp.
1535diff --git a/app/test-pmd/noisy_vnf.c b/app/test-pmd/noisy_vnf.c
1536index c65ec6f..abd99a0 100644
1537--- a/app/test-pmd/noisy_vnf.c
1538+++ b/app/test-pmd/noisy_vnf.c
1539@@ -214,9 +214,10 @@ flush:
1540 sent = rte_eth_tx_burst(fs->tx_port, fs->tx_queue,
1541 tmp_pkts, nb_deqd);
1542 if (unlikely(sent < nb_deqd) && fs->retry_enabled)
1543- nb_tx += do_retry(nb_rx, nb_tx, tmp_pkts, fs);
1544- inc_tx_burst_stats(fs, nb_tx);
1545+ sent += do_retry(nb_deqd, sent, tmp_pkts, fs);
1546+ inc_tx_burst_stats(fs, sent);
1547 fs->fwd_dropped += drop_pkts(tmp_pkts, nb_deqd, sent);
1548+ nb_tx += sent;
1549 ncf->prev_time = rte_get_timer_cycles();
1550 }
1551 }
1552diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
1553index 134d79a..b69b248 100644
1554--- a/app/test-pmd/testpmd.c
1555+++ b/app/test-pmd/testpmd.c
1556@@ -11,6 +11,7 @@
1557 #include <fcntl.h>
1558 #ifndef RTE_EXEC_ENV_WINDOWS
1559 #include <sys/mman.h>
1560+#include <sys/select.h>
1561 #endif
1562 #include <sys/types.h>
1563 #include <errno.h>
1564@@ -231,7 +232,7 @@ unsigned int xstats_display_num; /**< Size of extended statistics to show */
1565 * In container, it cannot terminate the process which running with 'stats-period'
1566 * option. Set flag to exit stats period loop after received SIGINT/SIGTERM.
1567 */
1568-static volatile uint8_t f_quit;
1569+volatile uint8_t f_quit;
1570 uint8_t cl_quit; /* Quit testpmd from cmdline. */
1571
1572 /*
1573@@ -2056,6 +2057,8 @@ fwd_stats_display(void)
1574 fwd_cycles += fs->core_cycles;
1575 }
1576 for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) {
1577+ uint64_t tx_dropped = 0;
1578+
1579 pt_id = fwd_ports_ids[i];
1580 port = &ports[pt_id];
1581
1582@@ -2077,8 +2080,9 @@ fwd_stats_display(void)
1583 total_recv += stats.ipackets;
1584 total_xmit += stats.opackets;
1585 total_rx_dropped += stats.imissed;
1586- total_tx_dropped += ports_stats[pt_id].tx_dropped;
1587- total_tx_dropped += stats.oerrors;
1588+ tx_dropped += ports_stats[pt_id].tx_dropped;
1589+ tx_dropped += stats.oerrors;
1590+ total_tx_dropped += tx_dropped;
1591 total_rx_nombuf += stats.rx_nombuf;
1592
1593 printf("\n %s Forward statistics for port %-2d %s\n",
1594@@ -2105,8 +2109,8 @@ fwd_stats_display(void)
1595
1596 printf(" TX-packets: %-14"PRIu64" TX-dropped: %-14"PRIu64
1597 "TX-total: %-"PRIu64"\n",
1598- stats.opackets, ports_stats[pt_id].tx_dropped,
1599- stats.opackets + ports_stats[pt_id].tx_dropped);
1600+ stats.opackets, tx_dropped,
1601+ stats.opackets + tx_dropped);
1602
1603 if (record_burst_stats) {
1604 if (ports_stats[pt_id].rx_stream)
1605@@ -2339,6 +2343,70 @@ launch_packet_forwarding(lcore_function_t *pkt_fwd_on_lcore)
1606 }
1607 }
1608
1609+static void
1610+update_rx_queue_state(uint16_t port_id, uint16_t queue_id)
1611+{
1612+ struct rte_eth_rxq_info rx_qinfo;
1613+ int32_t rc;
1614+
1615+ rc = rte_eth_rx_queue_info_get(port_id,
1616+ queue_id, &rx_qinfo);
1617+ if (rc == 0) {
1618+ ports[port_id].rxq[queue_id].state =
1619+ rx_qinfo.queue_state;
1620+ } else if (rc == -ENOTSUP) {
1621+ /*
1622+ * Set the rxq state to RTE_ETH_QUEUE_STATE_STARTED
1623+ * to ensure that the PMDs do not implement
1624+ * rte_eth_rx_queue_info_get can forward.
1625+ */
1626+ ports[port_id].rxq[queue_id].state =
1627+ RTE_ETH_QUEUE_STATE_STARTED;
1628+ } else {
1629+ TESTPMD_LOG(WARNING,
1630+ "Failed to get rx queue info\n");
1631+ }
1632+}
1633+
1634+static void
1635+update_tx_queue_state(uint16_t port_id, uint16_t queue_id)
1636+{
1637+ struct rte_eth_txq_info tx_qinfo;
1638+ int32_t rc;
1639+
1640+ rc = rte_eth_tx_queue_info_get(port_id,
1641+ queue_id, &tx_qinfo);
1642+ if (rc == 0) {
1643+ ports[port_id].txq[queue_id].state =
1644+ tx_qinfo.queue_state;
1645+ } else if (rc == -ENOTSUP) {
1646+ /*
1647+ * Set the txq state to RTE_ETH_QUEUE_STATE_STARTED
1648+ * to ensure that the PMDs do not implement
1649+ * rte_eth_tx_queue_info_get can forward.
1650+ */
1651+ ports[port_id].txq[queue_id].state =
1652+ RTE_ETH_QUEUE_STATE_STARTED;
1653+ } else {
1654+ TESTPMD_LOG(WARNING,
1655+ "Failed to get tx queue info\n");
1656+ }
1657+}
1658+
1659+static void
1660+update_queue_state(void)
1661+{
1662+ portid_t pi;
1663+ queueid_t qi;
1664+
1665+ RTE_ETH_FOREACH_DEV(pi) {
1666+ for (qi = 0; qi < nb_rxq; qi++)
1667+ update_rx_queue_state(pi, qi);
1668+ for (qi = 0; qi < nb_txq; qi++)
1669+ update_tx_queue_state(pi, qi);
1670+ }
1671+}
1672+
1673 /*
1674 * Launch packet forwarding configuration.
1675 */
1676@@ -2378,9 +2446,12 @@ start_packet_forwarding(int with_tx_first)
1677 if (!pkt_fwd_shared_rxq_check())
1678 return;
1679
1680- if (stream_init != NULL)
1681+ if (stream_init != NULL) {
1682+ if (rte_eal_process_type() == RTE_PROC_SECONDARY)
1683+ update_queue_state();
1684 for (i = 0; i < cur_fwd_config.nb_fwd_streams; i++)
1685 stream_init(fwd_streams[i]);
1686+ }
1687
1688 port_fwd_begin = cur_fwd_config.fwd_eng->port_fwd_begin;
1689 if (port_fwd_begin != NULL) {
1690@@ -2880,7 +2951,7 @@ update_bonding_port_dev_conf(portid_t bond_pid)
1691 int
1692 start_port(portid_t pid)
1693 {
1694- int diag, need_check_link_status = -1;
1695+ int diag;
1696 portid_t pi;
1697 portid_t p_pi = RTE_MAX_ETHPORTS;
1698 portid_t pl[RTE_MAX_ETHPORTS];
1699@@ -2891,6 +2962,9 @@ start_port(portid_t pid)
1700 queueid_t qi;
1701 struct rte_port *port;
1702 struct rte_eth_hairpin_cap cap;
1703+ bool at_least_one_port_exist = false;
1704+ bool all_ports_already_started = true;
1705+ bool at_least_one_port_successfully_started = false;
1706
1707 if (port_id_is_invalid(pid, ENABLED_WARN))
1708 return 0;
1709@@ -2906,11 +2980,13 @@ start_port(portid_t pid)
1710 continue;
1711 }
1712
1713- need_check_link_status = 0;
1714+ at_least_one_port_exist = true;
1715+
1716 port = &ports[pi];
1717- if (port->port_status == RTE_PORT_STOPPED)
1718+ if (port->port_status == RTE_PORT_STOPPED) {
1719 port->port_status = RTE_PORT_HANDLING;
1720- else {
1721+ all_ports_already_started = false;
1722+ } else {
1723 fprintf(stderr, "Port %d is now not stopped\n", pi);
1724 continue;
1725 }
1726@@ -3130,15 +3206,17 @@ start_port(portid_t pid)
1727 printf("Port %d: " RTE_ETHER_ADDR_PRT_FMT "\n", pi,
1728 RTE_ETHER_ADDR_BYTES(&port->eth_addr));
1729
1730- /* at least one port started, need checking link status */
1731- need_check_link_status = 1;
1732+ at_least_one_port_successfully_started = true;
1733
1734 pl[cfg_pi++] = pi;
1735 }
1736
1737- if (need_check_link_status == 1 && !no_link_check)
1738+ if (rte_eal_process_type() == RTE_PROC_SECONDARY)
1739+ update_queue_state();
1740+
1741+ if (at_least_one_port_successfully_started && !no_link_check)
1742 check_all_ports_link_status(RTE_PORT_ALL);
1743- else if (need_check_link_status == 0)
1744+ else if (at_least_one_port_exist & all_ports_already_started)
1745 fprintf(stderr, "Please stop the ports first\n");
1746
1747 if (hairpin_mode & 0xf) {
1748@@ -4316,13 +4394,6 @@ init_port(void)
1749 }
1750
1751 static void
1752-force_quit(void)
1753-{
1754- pmd_test_exit();
1755- prompt_exit();
1756-}
1757-
1758-static void
1759 print_stats(void)
1760 {
1761 uint8_t i;
1762@@ -4340,28 +4411,10 @@ print_stats(void)
1763 }
1764
1765 static void
1766-signal_handler(int signum)
1767+signal_handler(int signum __rte_unused)
1768 {
1769- if (signum == SIGINT || signum == SIGTERM) {
1770- fprintf(stderr, "\nSignal %d received, preparing to exit...\n",
1771- signum);
1772-#ifdef RTE_LIB_PDUMP
1773- /* uninitialize packet capture framework */
1774- rte_pdump_uninit();
1775-#endif
1776-#ifdef RTE_LIB_LATENCYSTATS
1777- if (latencystats_enabled != 0)
1778- rte_latencystats_uninit();
1779-#endif
1780- force_quit();
1781- /* Set flag to indicate the force termination. */
1782- f_quit = 1;
1783- /* exit with the expected status */
1784-#ifndef RTE_EXEC_ENV_WINDOWS
1785- signal(signum, SIG_DFL);
1786- kill(getpid(), signum);
1787-#endif
1788- }
1789+ f_quit = 1;
1790+ prompt_exit();
1791 }
1792
1793 int
1794@@ -4372,8 +4425,18 @@ main(int argc, char** argv)
1795 uint16_t count;
1796 int ret;
1797
1798+#ifdef RTE_EXEC_ENV_WINDOWS
1799 signal(SIGINT, signal_handler);
1800 signal(SIGTERM, signal_handler);
1801+#else
1802+ /* Want read() not to be restarted on signal */
1803+ struct sigaction action = {
1804+ .sa_handler = signal_handler,
1805+ };
1806+
1807+ sigaction(SIGINT, &action, NULL);
1808+ sigaction(SIGTERM, &action, NULL);
1809+#endif
1810
1811 testpmd_logtype = rte_log_register("testpmd");
1812 if (testpmd_logtype < 0)
1813@@ -4385,6 +4448,9 @@ main(int argc, char** argv)
1814 rte_exit(EXIT_FAILURE, "Cannot init EAL: %s\n",
1815 rte_strerror(rte_errno));
1816
1817+ /* allocate port structures, and init them */
1818+ init_port();
1819+
1820 ret = register_eth_event_callback();
1821 if (ret != 0)
1822 rte_exit(EXIT_FAILURE, "Cannot register for ethdev events");
1823@@ -4403,9 +4469,6 @@ main(int argc, char** argv)
1824 if (nb_ports == 0)
1825 TESTPMD_LOG(WARNING, "No probed ethernet devices\n");
1826
1827- /* allocate port structures, and init them */
1828- init_port();
1829-
1830 set_def_fwd_config();
1831 if (nb_lcores == 0)
1832 rte_exit(EXIT_FAILURE, "No cores defined for forwarding\n"
1833@@ -4483,8 +4546,13 @@ main(int argc, char** argv)
1834 }
1835 }
1836
1837- if (!no_device_start && start_port(RTE_PORT_ALL) != 0)
1838- rte_exit(EXIT_FAILURE, "Start ports failed\n");
1839+ if (!no_device_start && start_port(RTE_PORT_ALL) != 0) {
1840+ if (!interactive) {
1841+ rte_eal_cleanup();
1842+ rte_exit(EXIT_FAILURE, "Start ports failed\n");
1843+ }
1844+ fprintf(stderr, "Start ports failed\n");
1845+ }
1846
1847 /* set all ports to promiscuous mode by default */
1848 RTE_ETH_FOREACH_DEV(port_id) {
1849@@ -4536,15 +4604,9 @@ main(int argc, char** argv)
1850 start_packet_forwarding(0);
1851 }
1852 prompt();
1853- pmd_test_exit();
1854 } else
1855 #endif
1856 {
1857- char c;
1858- int rc;
1859-
1860- f_quit = 0;
1861-
1862 printf("No commandline core given, start packet forwarding\n");
1863 start_packet_forwarding(tx_first);
1864 if (stats_period != 0) {
1865@@ -4567,15 +4629,41 @@ main(int argc, char** argv)
1866 prev_time = cur_time;
1867 rte_delay_us_sleep(US_PER_S);
1868 }
1869- }
1870+ } else {
1871+ char c;
1872+ fd_set fds;
1873+
1874+ printf("Press enter to exit\n");
1875+
1876+ FD_ZERO(&fds);
1877+ FD_SET(0, &fds);
1878+
1879+ /* wait for signal or enter */
1880+ ret = select(1, &fds, NULL, NULL, NULL);
1881+ if (ret < 0 && errno != EINTR)
1882+ rte_exit(EXIT_FAILURE,
1883+ "Select failed: %s\n",
1884+ strerror(errno));
1885
1886- printf("Press enter to exit\n");
1887- rc = read(0, &c, 1);
1888- pmd_test_exit();
1889- if (rc < 0)
1890- return 1;
1891+ /* if got enter then consume it */
1892+ if (ret == 1 && read(0, &c, 1) < 0)
1893+ rte_exit(EXIT_FAILURE,
1894+ "Read failed: %s\n",
1895+ strerror(errno));
1896+ }
1897 }
1898
1899+ pmd_test_exit();
1900+
1901+#ifdef RTE_LIB_PDUMP
1902+ /* uninitialize packet capture framework */
1903+ rte_pdump_uninit();
1904+#endif
1905+#ifdef RTE_LIB_LATENCYSTATS
1906+ if (latencystats_enabled != 0)
1907+ rte_latencystats_uninit();
1908+#endif
1909+
1910 ret = rte_eal_cleanup();
1911 if (ret != 0)
1912 rte_exit(EXIT_FAILURE,
1913diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
1914index 7d24d25..022210a 100644
1915--- a/app/test-pmd/testpmd.h
1916+++ b/app/test-pmd/testpmd.h
1917@@ -34,6 +34,7 @@
1918 #define RTE_PORT_HANDLING (uint16_t)3
1919
1920 extern uint8_t cl_quit;
1921+extern volatile uint8_t f_quit;
1922
1923 /*
1924 * It is used to allocate the memory for hash key.
1925diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
1926index 6b42b9b..867a88d 100644
1927--- a/app/test/packet_burst_generator.c
1928+++ b/app/test/packet_burst_generator.c
1929@@ -263,11 +263,11 @@ generate_packet_burst(struct rte_mempool *mp, struct rte_mbuf **pkts_burst,
1930 void *ip_hdr, uint8_t ipv4, struct rte_udp_hdr *udp_hdr,
1931 int nb_pkt_per_burst, uint8_t pkt_len, uint8_t nb_pkt_segs)
1932 {
1933- int i, nb_pkt = 0;
1934- size_t eth_hdr_size;
1935-
1936+ const uint8_t pkt_seg_data_len = pkt_len / nb_pkt_segs;
1937 struct rte_mbuf *pkt_seg;
1938 struct rte_mbuf *pkt;
1939+ size_t eth_hdr_size;
1940+ int i, nb_pkt = 0;
1941
1942 for (nb_pkt = 0; nb_pkt < nb_pkt_per_burst; nb_pkt++) {
1943 pkt = rte_pktmbuf_alloc(mp);
1944@@ -278,7 +278,7 @@ nomore_mbuf:
1945 break;
1946 }
1947
1948- pkt->data_len = pkt_len;
1949+ pkt->data_len = pkt_seg_data_len;
1950 pkt_seg = pkt;
1951 for (i = 1; i < nb_pkt_segs; i++) {
1952 pkt_seg->next = rte_pktmbuf_alloc(mp);
1953@@ -288,7 +288,10 @@ nomore_mbuf:
1954 goto nomore_mbuf;
1955 }
1956 pkt_seg = pkt_seg->next;
1957- pkt_seg->data_len = pkt_len;
1958+ if (i != nb_pkt_segs - 1)
1959+ pkt_seg->data_len = pkt_seg_data_len;
1960+ else
1961+ pkt_seg->data_len = pkt_seg_data_len + pkt_len % nb_pkt_segs;
1962 }
1963 pkt_seg->next = NULL; /* Last segment of packet. */
1964
1965@@ -344,11 +347,11 @@ generate_packet_burst_proto(struct rte_mempool *mp,
1966 uint8_t ipv4, uint8_t proto, void *proto_hdr,
1967 int nb_pkt_per_burst, uint8_t pkt_len, uint8_t nb_pkt_segs)
1968 {
1969- int i, nb_pkt = 0;
1970- size_t eth_hdr_size;
1971-
1972+ const uint8_t pkt_seg_data_len = pkt_len / nb_pkt_segs;
1973 struct rte_mbuf *pkt_seg;
1974 struct rte_mbuf *pkt;
1975+ size_t eth_hdr_size;
1976+ int i, nb_pkt = 0;
1977
1978 for (nb_pkt = 0; nb_pkt < nb_pkt_per_burst; nb_pkt++) {
1979 pkt = rte_pktmbuf_alloc(mp);
1980@@ -359,7 +362,7 @@ nomore_mbuf:
1981 break;
1982 }
1983
1984- pkt->data_len = pkt_len;
1985+ pkt->data_len = pkt_seg_data_len;
1986 pkt_seg = pkt;
1987 for (i = 1; i < nb_pkt_segs; i++) {
1988 pkt_seg->next = rte_pktmbuf_alloc(mp);
1989@@ -369,7 +372,10 @@ nomore_mbuf:
1990 goto nomore_mbuf;
1991 }
1992 pkt_seg = pkt_seg->next;
1993- pkt_seg->data_len = pkt_len;
1994+ if (i != nb_pkt_segs - 1)
1995+ pkt_seg->data_len = pkt_seg_data_len;
1996+ else
1997+ pkt_seg->data_len = pkt_seg_data_len + pkt_len % nb_pkt_segs;
1998 }
1999 pkt_seg->next = NULL; /* Last segment of packet. */
2000
2001diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
2002index d6ae762..0df4e9f 100644
2003--- a/app/test/test_cryptodev.c
2004+++ b/app/test/test_cryptodev.c
2005@@ -136,6 +136,17 @@ security_proto_supported(enum rte_security_session_action_type action,
2006 static int
2007 dev_configure_and_start(uint64_t ff_disable);
2008
2009+static int
2010+check_cipher_capability(const struct crypto_testsuite_params *ts_params,
2011+ const enum rte_crypto_cipher_algorithm cipher_algo,
2012+ const uint16_t key_size, const uint16_t iv_size);
2013+
2014+static int
2015+check_auth_capability(const struct crypto_testsuite_params *ts_params,
2016+ const enum rte_crypto_auth_algorithm auth_algo,
2017+ const uint16_t key_size, const uint16_t iv_size,
2018+ const uint16_t tag_size);
2019+
2020 static struct rte_mbuf *
2021 setup_test_string(struct rte_mempool *mpool,
2022 const char *string, size_t len, uint8_t blocksize)
2023@@ -4761,7 +4772,6 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata)
2024 unsigned int plaintext_len;
2025
2026 struct rte_cryptodev_info dev_info;
2027- struct rte_cryptodev_sym_capability_idx cap_idx;
2028
2029 rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
2030 uint64_t feat_flags = dev_info.feature_flags;
2031@@ -4783,19 +4793,14 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata)
2032 return TEST_SKIPPED;
2033
2034 /* Check if device supports ZUC EEA3 */
2035- cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
2036- cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_ZUC_EEA3;
2037-
2038- if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
2039- &cap_idx) == NULL)
2040+ if (check_cipher_capability(ts_params, RTE_CRYPTO_CIPHER_ZUC_EEA3,
2041+ tdata->key.len, tdata->cipher_iv.len) < 0)
2042 return TEST_SKIPPED;
2043
2044 /* Check if device supports ZUC EIA3 */
2045- cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH;
2046- cap_idx.algo.auth = RTE_CRYPTO_AUTH_ZUC_EIA3;
2047-
2048- if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
2049- &cap_idx) == NULL)
2050+ if (check_auth_capability(ts_params, RTE_CRYPTO_AUTH_ZUC_EIA3,
2051+ tdata->key.len, tdata->auth_iv.len,
2052+ tdata->digest.len) < 0)
2053 return TEST_SKIPPED;
2054
2055 /* Create ZUC session */
2056@@ -4853,7 +4858,7 @@ test_zuc_cipher_auth(const struct wireless_test_data *tdata)
2057 TEST_ASSERT_BUFFERS_ARE_EQUAL(
2058 ut_params->digest,
2059 tdata->digest.data,
2060- 4,
2061+ tdata->digest.len,
2062 "ZUC Generated auth tag not as expected");
2063 return 0;
2064 }
2065@@ -6415,7 +6420,7 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata,
2066 TEST_ASSERT_BUFFERS_ARE_EQUAL(
2067 ut_params->digest,
2068 tdata->digest.data,
2069- DIGEST_BYTE_LENGTH_KASUMI_F9,
2070+ tdata->digest.len,
2071 "ZUC Generated auth tag not as expected");
2072 }
2073 return 0;
2074@@ -6453,6 +6458,9 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,
2075 tdata->digest.len) < 0)
2076 return TEST_SKIPPED;
2077
2078+ if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO)
2079+ return TEST_SKIPPED;
2080+
2081 rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
2082
2083 uint64_t feat_flags = dev_info.feature_flags;
2084@@ -6622,7 +6630,7 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,
2085 TEST_ASSERT_BUFFERS_ARE_EQUAL(
2086 digest,
2087 tdata->digest.data,
2088- DIGEST_BYTE_LENGTH_KASUMI_F9,
2089+ tdata->digest.len,
2090 "ZUC Generated auth tag not as expected");
2091 }
2092 return 0;
2093@@ -7648,6 +7656,9 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata,
2094 }
2095 }
2096
2097+ if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO)
2098+ return TEST_SKIPPED;
2099+
2100 /* Create the session */
2101 if (verify)
2102 retval = create_wireless_algo_cipher_auth_session(
2103@@ -11981,11 +11992,11 @@ test_stats(void)
2104 TEST_ASSERT((stats.enqueued_count == 1),
2105 "rte_cryptodev_stats_get returned unexpected enqueued stat");
2106 TEST_ASSERT((stats.dequeued_count == 1),
2107- "rte_cryptodev_stats_get returned unexpected enqueued stat");
2108+ "rte_cryptodev_stats_get returned unexpected dequeued stat");
2109 TEST_ASSERT((stats.enqueue_err_count == 0),
2110- "rte_cryptodev_stats_get returned unexpected enqueued stat");
2111+ "rte_cryptodev_stats_get returned unexpected enqueued error count stat");
2112 TEST_ASSERT((stats.dequeue_err_count == 0),
2113- "rte_cryptodev_stats_get returned unexpected enqueued stat");
2114+ "rte_cryptodev_stats_get returned unexpected dequeued error count stat");
2115
2116 /* invalid device but should ignore and not reset device stats*/
2117 rte_cryptodev_stats_reset(ts_params->valid_devs[0] + 300);
2118@@ -11993,7 +12004,7 @@ test_stats(void)
2119 &stats),
2120 "rte_cryptodev_stats_get failed");
2121 TEST_ASSERT((stats.enqueued_count == 1),
2122- "rte_cryptodev_stats_get returned unexpected enqueued stat");
2123+ "rte_cryptodev_stats_get returned unexpected enqueued stat after invalid reset");
2124
2125 /* check that a valid reset clears stats */
2126 rte_cryptodev_stats_reset(ts_params->valid_devs[0]);
2127@@ -12001,9 +12012,9 @@ test_stats(void)
2128 &stats),
2129 "rte_cryptodev_stats_get failed");
2130 TEST_ASSERT((stats.enqueued_count == 0),
2131- "rte_cryptodev_stats_get returned unexpected enqueued stat");
2132+ "rte_cryptodev_stats_get returned unexpected enqueued stat after valid reset");
2133 TEST_ASSERT((stats.dequeued_count == 0),
2134- "rte_cryptodev_stats_get returned unexpected enqueued stat");
2135+ "rte_cryptodev_stats_get returned unexpected dequeued stat after valid reset");
2136
2137 return TEST_SUCCESS;
2138 }
2139@@ -14450,8 +14461,13 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
2140 &cap_idx) == NULL)
2141 return TEST_SKIPPED;
2142
2143- /* OOP not supported with CPU crypto */
2144- if (oop && gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO)
2145+ /*
2146+ * SGL not supported on AESNI_MB PMD CPU crypto,
2147+ * OOP not supported on AESNI_GCM CPU crypto
2148+ */
2149+ if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO &&
2150+ (gbl_driver_id == rte_cryptodev_driver_id_get(
2151+ RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD)) || oop))
2152 return TEST_SKIPPED;
2153
2154 /* Detailed check for the particular SGL support flag */
2155diff --git a/app/test/test_cryptodev_aes_test_vectors.h b/app/test/test_cryptodev_aes_test_vectors.h
2156index ea7b21c..f3686be 100644
2157--- a/app/test/test_cryptodev_aes_test_vectors.h
2158+++ b/app/test/test_cryptodev_aes_test_vectors.h
2159@@ -4969,7 +4969,7 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
2160 },
2161 {
2162 .test_descr = "AES-256-XTS Encryption (512-byte plaintext"
2163- " Dataunit 512) Scater gather OOP",
2164+ " Dataunit 512) Scatter gather OOP",
2165 .test_data = &aes_test_data_xts_wrapped_key_48_pt_512_du_512,
2166 .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
2167 .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP |
2168@@ -4979,7 +4979,7 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
2169 },
2170 {
2171 .test_descr = "AES-256-XTS Decryption (512-byte plaintext"
2172- " Dataunit 512) Scater gather OOP",
2173+ " Dataunit 512) Scatter gather OOP",
2174 .test_data = &aes_test_data_xts_wrapped_key_48_pt_512_du_512,
2175 .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
2176 .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP |
2177@@ -4989,7 +4989,7 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
2178 },
2179 {
2180 .test_descr = "AES-256-XTS Encryption (512-byte plaintext"
2181- " Dataunit 0) Scater gather OOP",
2182+ " Dataunit 0) Scatter gather OOP",
2183 .test_data = &aes_test_data_xts_wrapped_key_48_pt_512_du_0,
2184 .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
2185 .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP |
2186@@ -4999,7 +4999,7 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
2187 },
2188 {
2189 .test_descr = "AES-256-XTS Decryption (512-byte plaintext"
2190- " Dataunit 0) Scater gather OOP",
2191+ " Dataunit 0) Scatter gather OOP",
2192 .test_data = &aes_test_data_xts_wrapped_key_48_pt_512_du_0,
2193 .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
2194 .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP |
2195@@ -5009,7 +5009,7 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
2196 },
2197 {
2198 .test_descr = "AES-256-XTS Encryption (4096-byte plaintext"
2199- " Dataunit 4096) Scater gather OOP",
2200+ " Dataunit 4096) Scatter gather OOP",
2201 .test_data = &aes_test_data_xts_wrapped_key_48_pt_4096_du_4096,
2202 .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
2203 .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP |
2204@@ -5019,7 +5019,7 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
2205 },
2206 {
2207 .test_descr = "AES-256-XTS Decryption (4096-byte plaintext"
2208- " Dataunit 4096) Scater gather OOP",
2209+ " Dataunit 4096) Scatter gather OOP",
2210 .test_data = &aes_test_data_xts_wrapped_key_48_pt_4096_du_4096,
2211 .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
2212 .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP |
2213@@ -5029,7 +5029,7 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
2214 },
2215 {
2216 .test_descr = "AES-256-XTS Encryption (4096-byte plaintext"
2217- " Dataunit 0) Scater gather OOP",
2218+ " Dataunit 0) Scatter gather OOP",
2219 .test_data = &aes_test_data_xts_wrapped_key_48_pt_4096_du_0,
2220 .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
2221 .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP |
2222@@ -5039,7 +5039,7 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
2223 },
2224 {
2225 .test_descr = "AES-256-XTS Decryption (4096-byte plaintext"
2226- " Dataunit 0) Scater gather OOP",
2227+ " Dataunit 0) Scatter gather OOP",
2228 .test_data = &aes_test_data_xts_wrapped_key_48_pt_4096_du_0,
2229 .op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
2230 .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP |
2231diff --git a/app/test/test_cryptodev_security_pdcp_test_vectors.h b/app/test/test_cryptodev_security_pdcp_test_vectors.h
2232index 6fdc4cd..56d4884 100644
2233--- a/app/test/test_cryptodev_security_pdcp_test_vectors.h
2234+++ b/app/test/test_cryptodev_security_pdcp_test_vectors.h
2235@@ -5560,7 +5560,7 @@ static uint8_t *pdcp_test_data_out[] = {
2236 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70,
2237 0x33, 0x8A, 0x15, 0xD0, 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C,
2238 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46,
2239- 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD},
2240+ 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x00, 0x00, 0x00, 0x00},
2241 /* Control Plane w/NULL enc. + NULL int. DL LONG SN */
2242 (uint8_t[]){0xA0, 0x00, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82,
2243 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71,
2244@@ -5568,7 +5568,7 @@ static uint8_t *pdcp_test_data_out[] = {
2245 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70,
2246 0x33, 0x8A, 0x15, 0xD0, 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C,
2247 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46,
2248- 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD},
2249+ 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x00, 0x00, 0x00, 0x00},
2250 /* Control Plane w/NULL enc. + SNOW f9 int. UL LONG SN */
2251 (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82,
2252 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71,
2253@@ -5954,7 +5954,7 @@ static uint8_t *pdcp_test_data_out[] = {
2254 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70,
2255 0x33, 0x8A, 0x15, 0xD0, 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C,
2256 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46,
2257- 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD},
2258+ 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x00, 0x00, 0x00, 0x00},
2259 /* User Plane w/NULL enc. + NULL int. DL for 12-bit SN */
2260 (uint8_t[]){0xA0, 0x00, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82,
2261 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71,
2262@@ -5962,7 +5962,7 @@ static uint8_t *pdcp_test_data_out[] = {
2263 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70,
2264 0x33, 0x8A, 0x15, 0xD0, 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C,
2265 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46,
2266- 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD},
2267+ 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x00, 0x00, 0x00, 0x00},
2268 /* User Plane w/NULL enc. + SNOW f9 int. UL for 12-bit SN */
2269 (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82,
2270 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71,
2271diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
2272index 53fe898..1f4dd62 100644
2273--- a/app/test/test_mbuf.c
2274+++ b/app/test/test_mbuf.c
2275@@ -2744,6 +2744,7 @@ test_nb_segs_and_next_reset(void)
2276
2277 /* split m0 chain in two, between m1 and m2 */
2278 m0->nb_segs = 2;
2279+ m0->pkt_len -= m2->data_len;
2280 m1->next = NULL;
2281 m2->nb_segs = 1;
2282
2283@@ -2764,6 +2765,7 @@ test_nb_segs_and_next_reset(void)
2284 m2->nb_segs != 1 || m2->next != NULL)
2285 GOTO_FAIL("nb_segs or next was not reset properly");
2286
2287+ rte_mempool_free(pool);
2288 return 0;
2289
2290 fail:
2291diff --git a/app/test/test_reorder.c b/app/test/test_reorder.c
2292index f0714a5..7b5e590 100644
2293--- a/app/test/test_reorder.c
2294+++ b/app/test/test_reorder.c
2295@@ -278,6 +278,7 @@ test_reorder_drain(void)
2296 goto exit;
2297 }
2298 rte_pktmbuf_free(robufs[0]);
2299+ memset(robufs, 0, sizeof(robufs));
2300
2301 /* Insert more packets
2302 * RB[] = {NULL, NULL, NULL, NULL}
2303@@ -313,6 +314,7 @@ test_reorder_drain(void)
2304 for (i = 0; i < 3; i++) {
2305 rte_pktmbuf_free(robufs[i]);
2306 }
2307+ memset(robufs, 0, sizeof(robufs));
2308
2309 /*
2310 * RB[] = {NULL, NULL, NULL, NULL}
2311diff --git a/config/meson.build b/config/meson.build
2312index 6d9ffd4..fc3ac99 100644
2313--- a/config/meson.build
2314+++ b/config/meson.build
2315@@ -139,7 +139,7 @@ endif
2316
2317 toolchain = cc.get_id()
2318 dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain)
2319-dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
2320+dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper().underscorify(), 1)
2321
2322 dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
2323 dpdk_conf.set('RTE_ARCH_32', cc.sizeof('void *') == 4)
2324@@ -191,7 +191,7 @@ if find_libnuma
2325 endif
2326
2327 has_libfdt = 0
2328-fdt_dep = cc.find_library('libfdt', required: false)
2329+fdt_dep = cc.find_library('fdt', required: false)
2330 if fdt_dep.found() and cc.has_header('fdt.h')
2331 dpdk_conf.set10('RTE_HAS_LIBFDT', true)
2332 has_libfdt = 1
2333@@ -199,11 +199,12 @@ if fdt_dep.found() and cc.has_header('fdt.h')
2334 dpdk_extra_ldflags += '-lfdt'
2335 endif
2336
2337-libexecinfo = cc.find_library('libexecinfo', required: false)
2338-if libexecinfo.found() and cc.has_header('execinfo.h')
2339+libexecinfo = cc.find_library('execinfo', required: false)
2340+if libexecinfo.found()
2341 add_project_link_arguments('-lexecinfo', language: 'c')
2342 dpdk_extra_ldflags += '-lexecinfo'
2343 endif
2344+dpdk_conf.set('RTE_BACKTRACE', cc.has_header('execinfo.h') or is_windows)
2345
2346 libarchive = dependency('libarchive', required: false, method: 'pkg-config')
2347 if libarchive.found()
2348diff --git a/config/rte_config.h b/config/rte_config.h
2349index 3c4876d..7b8c85e 100644
2350--- a/config/rte_config.h
2351+++ b/config/rte_config.h
2352@@ -37,7 +37,6 @@
2353 #define RTE_MAX_MEMZONE 2560
2354 #define RTE_MAX_TAILQ 32
2355 #define RTE_LOG_DP_LEVEL RTE_LOG_INFO
2356-#define RTE_BACKTRACE 1
2357 #define RTE_MAX_VFIO_CONTAINERS 64
2358
2359 /* bsd module defines */
2360diff --git a/debian/changelog b/debian/changelog
2361index 7cacb5d..537f7c0 100644
2362--- a/debian/changelog
2363+++ b/debian/changelog
2364@@ -1,3 +1,23 @@
2365+dpdk (22.11.2-0ubuntu0.23.04.1) lunar; urgency=medium
2366+
2367+ * Merge LTS stable release 22.11.2 (LP: #2026351)
2368+ - Full release notes are available at:
2369+ https://doc.dpdk.org/guides-22.11/rel_notes/release_22_11.html#id1
2370+ - d/not-installed, d/rules: MANA poll mode driver library
2371+ is not being installed which would otherwise build by
2372+ default in the new version.
2373+
2374+ * Included changes from Debian unstable:
2375+ [ Christian Ehrhardt ]
2376+ - d/p/disable-parallel-sphinx.patch: fix reprotest for parallel
2377+ sphinx
2378+ - d/rules: avoid path length issues in build time test
2379+
2380+ [ Luca Boccassi ]
2381+ - Add new internal/experimental symbols
2382+
2383+ -- Miriam España Acebal <miriam.espana@canonical.com> Mon, 17 Jul 2023 11:46:01 +0200
2384+
2385 dpdk (22.11.1-2ubuntu1) lunar; urgency=medium
2386
2387 * d/t/test-fastsuite: test env before breaking tests for known issues
2388diff --git a/debian/librte-common-sfc-efx23.symbols b/debian/librte-common-sfc-efx23.symbols
2389index 8ac9a5f..31397f4 100644
2390--- a/debian/librte-common-sfc-efx23.symbols
2391+++ b/debian/librte-common-sfc-efx23.symbols
2392@@ -92,6 +92,7 @@ librte_common_sfc_efx.so.23 librte-common-sfc-efx23 #MINVER#
2393 efx_mae_action_set_populate_encap@INTERNAL 21.08
2394 efx_mae_action_set_populate_flag@INTERNAL 20.11~rc3
2395 efx_mae_action_set_populate_mark@INTERNAL 20.11~rc3
2396+ efx_mae_action_set_populate_mark_reset@INTERNAL 22.11.2
2397 efx_mae_action_set_populate_set_dst_mac@INTERNAL 21.11
2398 efx_mae_action_set_populate_set_src_mac@INTERNAL 21.11
2399 efx_mae_action_set_populate_vlan_pop@INTERNAL 20.11~rc3
2400diff --git a/debian/librte-eventdev23.symbols b/debian/librte-eventdev23.symbols
2401index 1c0592f..66ed10f 100644
2402--- a/debian/librte-eventdev23.symbols
2403+++ b/debian/librte-eventdev23.symbols
2404@@ -54,6 +54,7 @@ librte_eventdev.so.23 librte-eventdev23 #MINVER#
2405 rte_event_crypto_adapter_stats_get@DPDK_23 22.11
2406 rte_event_crypto_adapter_stats_reset@DPDK_23 22.11
2407 rte_event_crypto_adapter_stop@DPDK_23 22.11
2408+ rte_event_crypto_adapter_vector_limits_get@EXPERIMENTAL 22.11.2
2409 rte_event_dequeue_timeout_ticks@DPDK_23 22.11
2410 rte_event_dev_attr_get@DPDK_23 22.11
2411 rte_event_dev_close@DPDK_23 22.11
2412diff --git a/debian/not-installed b/debian/not-installed
2413index fb35eb5..2ef428a 100644
2414--- a/debian/not-installed
2415+++ b/debian/not-installed
2416@@ -4,3 +4,8 @@ usr/share/doc/dpdk/guides/_static/css/custom.css
2417 usr/share/doc/dpdk/guides/_static/fonts
2418 # installed manually as "ninja install doc" does not work
2419 usr/share/dpdk/examples
2420+# MANA poll mode driver library is not being installed (doesn't fit with MRE)
2421+usr/lib/*/dpdk/pmds-23.0/librte_net_mana.so.23
2422+usr/lib/*/dpdk/pmds-23.0/librte_net_mana.so.23.0
2423+usr/lib/*/librte_net_mana.so.23
2424+usr/lib/*/librte_net_mana.so.23.0
2425\ No newline at end of file
2426diff --git a/debian/patches/disable-parallel-sphinx.patch b/debian/patches/disable-parallel-sphinx.patch
2427new file mode 100644
2428index 0000000..c3cf2c9
2429--- /dev/null
2430+++ b/debian/patches/disable-parallel-sphinx.patch
2431@@ -0,0 +1,20 @@
2432+Description: parallelism breaks order and thereby reprotest
2433+ reprotest will flag searchindex.js which only differs in order
2434+ of the generated list elements.
2435+Forwarded: http://mails.dpdk.org/archives/dev/2023-June/272107.html
2436+Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
2437+Last-Update: 2023-06-28
2438+--- a/buildtools/call-sphinx-build.py
2439++++ b/buildtools/call-sphinx-build.py
2440+@@ -19,8 +19,9 @@ os.environ['DPDK_VERSION'] = version
2441+ ver = run([sphinx, '--version'], stdout=PIPE,
2442+ stderr=STDOUT).stdout.decode().split()[-1]
2443+ sphinx_cmd = [sphinx] + extra_args
2444+-if Version(ver) >= Version('1.7'):
2445+- sphinx_cmd += ['-j', 'auto']
2446++# Debian: parallelism breaks order in searchindex.js and thereby reprotest
2447++# if Version(ver) >= Version('1.7'):
2448++# sphinx_cmd += ['-j', 'auto']
2449+
2450+ # find all the files sphinx will process so we can write them as dependencies
2451+ srcfiles = []
2452diff --git a/debian/patches/series b/debian/patches/series
2453index a9595b5..1e3e2ed 100644
2454--- a/debian/patches/series
2455+++ b/debian/patches/series
2456@@ -3,3 +3,4 @@ disable_autopkgtest_buildtime_fails.patch
2457 disable_autopkgtest_fails.patch
2458 disable_armhf_autopkgtest_fails.patch
2459 disable_ppc64_autopkgtest_fails.patch
2460+disable-parallel-sphinx.patch
2461diff --git a/debian/rules b/debian/rules
2462index dd095b8..e906090 100755
2463--- a/debian/rules
2464+++ b/debian/rules
2465@@ -146,7 +146,7 @@ override_dh_auto_install-arch:
2466 override_dh_install:
2467 # only needed for doc conversions, not in the package (and breaks reproducible builds)
2468 rm -f $(CURDIR)/obj-*/doc/guides/html/objects.inv
2469- dh_install --exclude=fonts
2470+ dh_install --exclude=fonts --exclude=librte-net-mana23
2471
2472 override_dh_installinit:
2473 dh_installinit --no-start --no-stop-on-upgrade
2474@@ -164,10 +164,12 @@ override_dh_auto_test-arch:
2475 ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
2476 true
2477 else
2478-# bump up the timeout 3->6 as it had some issues (on autopkgtest)
2479 ifneq (,$(filter i386 amd64, $(DEB_HOST_ARCH)))
2480- mkdir -p $(CURDIR)/tmpdir
2481- XDG_RUNTIME_DIR=$(CURDIR)/tmpdir meson test -C obj-$(DEB_HOST_GNU_TYPE) --verbose --suite fast-tests -t 6
2482+ # shorten test path for max socket length
2483+ $(eval TESTDIR := $(shell mktemp -d /tmp/dpdk-build-test.XXXX))
2484+ # bump up the timeout 3->6 as it had some issues (on autopkgtest)
2485+ XDG_RUNTIME_DIR=$(TESTDIR) meson test -C obj-$(DEB_HOST_GNU_TYPE) --verbose --suite fast-tests -t 6
2486+ rm -rf $(TESTDIR)
2487 endif
2488 endif
2489
2490diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh
2491index 01d8aa0..af751e4 100755
2492--- a/devtools/check-git-log.sh
2493+++ b/devtools/check-git-log.sh
2494@@ -120,7 +120,7 @@ words="$selfdir/words-case.txt"
2495 for word in $(cat $words); do
2496 bad=$(echo "$headlines" | grep -iw $word | grep -vw $word)
2497 if [ "$word" = "Tx" ]; then
2498- bad=$(echo $bad | grep -v 'OCTEON\ TX')
2499+ bad=$(echo $bad | grep -v 'OCTEON TX')
2500 fi
2501 for bad_line in $bad; do
2502 bad_word=$(echo $bad_line | cut -d":" -f2 | grep -iwo $word)
2503@@ -259,6 +259,21 @@ done)
2504 [ -z "$bad" ] || { printf "Missing 'Signed-off-by:' tag: \n$bad\n"\
2505 && failure=true;}
2506
2507+# check names
2508+names=$(git log --format='From: %an <%ae>%n%b' --reverse $range |
2509+ sed -rn 's,.*: (.*<.*@.*>),\1,p' |
2510+ sort -u)
2511+bad=$(for contributor in $names ; do
2512+ ! grep -qE "^$contributor($| <)" $selfdir/../.mailmap || continue
2513+ if grep -q "^${contributor%% <*} <" .mailmap ; then
2514+ printf "\t$contributor is not the primary email address\n"
2515+ else
2516+ printf "\t$contributor is unknown in .mailmap\n"
2517+ fi
2518+done)
2519+[ -z "$bad" ] || { printf "Contributor name/email mismatch with .mailmap: \n$bad\n"\
2520+ && failure=true;}
2521+
2522 total=$(echo "$commits" | wc -l)
2523 if $failure ; then
2524 printf "\nInvalid patch(es) found - checked $total patch"
2525diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
2526index be1cb03..a07bbc8 100755
2527--- a/devtools/checkpatches.sh
2528+++ b/devtools/checkpatches.sh
2529@@ -248,28 +248,6 @@ check_release_notes() { # <patch>
2530 grep -v $current_rel_notes
2531 }
2532
2533-check_names() { # <patch>
2534- res=0
2535-
2536- old_IFS=$IFS
2537- IFS='
2538-'
2539- for contributor in $(sed -rn '1,/^--- / {s/.*: (.*<.*@.*>)/\1/p}' $1); do
2540- ! grep -qE "^$contributor($| <)" .mailmap || continue
2541- name=${contributor%% <*}
2542- if grep -q "^$name <" .mailmap; then
2543- reason="$name mail differs from primary mail"
2544- else
2545- reason="$contributor is unknown"
2546- fi
2547- echo "$reason, please fix the commit message or update .mailmap."
2548- res=1
2549- done
2550- IFS=$old_IFS
2551-
2552- return $res
2553-}
2554-
2555 number=0
2556 range='origin/main..'
2557 quiet=false
2558@@ -378,14 +356,6 @@ check () { # <patch-file> <commit>
2559 ret=1
2560 fi
2561
2562- ! $verbose || printf '\nChecking names in commit log:\n'
2563- report=$(check_names "$tmpinput")
2564- if [ $? -ne 0 ] ; then
2565- $headline_printed || print_headline "$subject"
2566- printf '%s\n' "$report"
2567- ret=1
2568- fi
2569-
2570 if [ "$tmpinput" != "$1" ]; then
2571 rm -f "$tmpinput"
2572 trap - INT
2573diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md
2574index de488c7..bbca14b 100644
2575--- a/doc/api/doxy-api-index.md
2576+++ b/doc/api/doxy-api-index.md
2577@@ -22,6 +22,7 @@ The public API headers are grouped by topics:
2578 [compress](@ref rte_comp.h),
2579 [regexdev](@ref rte_regexdev.h),
2580 [dmadev](@ref rte_dmadev.h),
2581+ [gpudev](@ref rte_gpudev.h),
2582 [eventdev](@ref rte_eventdev.h),
2583 [event_eth_rx_adapter](@ref rte_event_eth_rx_adapter.h),
2584 [event_eth_tx_adapter](@ref rte_event_eth_tx_adapter.h),
2585diff --git a/doc/guides/linux_gsg/enable_func.rst b/doc/guides/linux_gsg/enable_func.rst
2586index 829084d..2344d97 100644
2587--- a/doc/guides/linux_gsg/enable_func.rst
2588+++ b/doc/guides/linux_gsg/enable_func.rst
2589@@ -55,12 +55,12 @@ Refer to the `documentation <https://www.kernel.org/doc/Documentation/vm/hugetlb
2590 If the driver requires using physical addresses (PA),
2591 the executable file must be granted additional capabilities:
2592
2593-* ``SYS_ADMIN`` to read ``/proc/self/pagemaps``
2594+* ``DAC_READ_SEARCH`` and ``SYS_ADMIN`` to read ``/proc/self/pagemaps``
2595 * ``IPC_LOCK`` to lock hugepages in memory
2596
2597 .. code-block:: console
2598
2599- setcap cap_ipc_lock,cap_sys_admin+ep <executable>
2600+ setcap cap_dac_read_search,cap_ipc_lock,cap_sys_admin+ep <executable>
2601
2602 If physical addresses are not accessible,
2603 the following message will appear during EAL initialization::
2604diff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst
2605index a7e8261..dfeaf4e 100644
2606--- a/doc/guides/linux_gsg/sys_reqs.rst
2607+++ b/doc/guides/linux_gsg/sys_reqs.rst
2608@@ -32,7 +32,7 @@ Compilation of the DPDK
2609
2610 * For RHEL/Fedora systems these can be installed using ``dnf groupinstall "Development Tools"``
2611 * For Ubuntu/Debian systems these can be installed using ``apt install build-essential``
2612- * For Alpine Linux, ``apk add alpine-sdk bsd-compat-headers libexecinfo-dev``
2613+ * For Alpine Linux, ``apk add alpine-sdk bsd-compat-headers``
2614
2615 .. note::
2616
2617diff --git a/doc/guides/nics/bnxt.rst b/doc/guides/nics/bnxt.rst
2618index 293eab8..0b09b0c 100644
2619--- a/doc/guides/nics/bnxt.rst
2620+++ b/doc/guides/nics/bnxt.rst
2621@@ -912,6 +912,7 @@ Shown below are Ethernet Network Adapters and their supported firmware versions
2622 * ``BCM57500 NetXtreme-E\ |reg| Family`` ... Firmware 219.0.0 or later
2623
2624 Shown below are DPDK LTS releases and their supported firmware versions:
2625+
2626 * ``DPDK Release 19.11`` ... Firmware 219.0.103 or later
2627 * ``DPDK Release 20.11`` ... Firmware 219.0.103 or later
2628 * ``DPDK Release 21.11`` ... Firmware 221.0.101 or later
2629diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst
2630index ce075e0..b3dc72d 100644
2631--- a/doc/guides/nics/ice.rst
2632+++ b/doc/guides/nics/ice.rst
2633@@ -331,18 +331,18 @@ Additional Options
2634
2635 ip link set dev enp24s0f0 vf 0 trust on
2636
2637-#. Bind the VF0, and run testpmd with 'cap=dcf' devarg::
2638+#. Bind the VF0, and run testpmd with 'cap=dcf' with port representor for VF 1 and 2::
2639
2640- dpdk-testpmd -l 22-25 -n 4 -a 18:01.0,cap=dcf -- -i
2641+ dpdk-testpmd -l 22-25 -n 4 -a 18:01.0,cap=dcf,representor=vf[1-2] -- -i
2642
2643 #. Monitor the VF2 interface network traffic::
2644
2645 tcpdump -e -nn -i enp24s1f2
2646
2647-#. Create one flow to redirect the traffic to VF2 by DCF::
2648+#. Create one flow to redirect the traffic to VF2 by DCF (assume the representor port ID is 5)::
2649
2650 flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 \
2651- dst is 192.168.0.3 / end actions vf id 2 / end
2652+ dst is 192.168.0.3 / end actions represented_port ethdev_port_id 5 / end
2653
2654 #. Send the packet, and it should be displayed on tcpdump::
2655
2656diff --git a/doc/guides/nics/mana.rst b/doc/guides/nics/mana.rst
2657index 005c0b2..341146c 100644
2658--- a/doc/guides/nics/mana.rst
2659+++ b/doc/guides/nics/mana.rst
2660@@ -29,6 +29,7 @@ and must be installed separately:
2661 It allows slow and privileged operations
2662 (context initialization, hardware resources allocations)
2663 to be managed by the kernel and fast operations to never leave user space.
2664+ The minimum required rdma-core version is v44.
2665
2666 In most cases, rdma-core is shipped as a package with an OS distribution.
2667 User can also install the upstream version of the rdma-core from
2668@@ -39,15 +40,14 @@ and must be installed separately:
2669 Low-level user space driver library
2670 for Microsoft Azure Network Adapter devices,
2671 it is automatically loaded by libibverbs.
2672-
2673- The support of MANA is not merged in rdma-core 42.
2674+ The minimum required version of rdma-core with libmana is v44.
2675
2676 - **Kernel modules**
2677
2678 They provide the kernel-side verbs API and low level device drivers
2679 that manage actual hardware initialization
2680 and resources sharing with user space processes.
2681- The minimum required Linux kernel version is 6.1.
2682+ The minimum required Linux kernel version is 6.2.
2683
2684 Unlike most other PMDs, these modules must remain loaded
2685 and bound to their devices:
2686@@ -56,8 +56,6 @@ and must be installed separately:
2687 - mana_ib: InifiniBand device driver.
2688 - ib_uverbs: user space driver for verbs (entry point for libibverbs).
2689
2690- The support of MANA is planned in Linux 6.2.
2691-
2692 Driver compilation and testing
2693 ------------------------------
2694
2695diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
2696index 51f5125..75ac2f1 100644
2697--- a/doc/guides/nics/mlx5.rst
2698+++ b/doc/guides/nics/mlx5.rst
2699@@ -1121,6 +1121,9 @@ for an additional list of options shared with other mlx5 drivers.
2700 - 0. If representor matching is disabled, then there will be no implicit
2701 item added. As a result, ingress flow rules will match traffic
2702 coming to any port, not only the port on which flow rule is created.
2703+ Because of that, default flow rules for ingress traffic cannot be created
2704+ and port starts in isolated mode by default. Port cannot be switched back
2705+ to non-isolated mode.
2706
2707 - 1. If representor matching is enabled (default setting),
2708 then each ingress pattern template has an implicit REPRESENTED_PORT
2709diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
2710index 01aad84..2b513bb 100644
2711--- a/doc/guides/prog_guide/cryptodev_lib.rst
2712+++ b/doc/guides/prog_guide/cryptodev_lib.rst
2713@@ -98,14 +98,10 @@ The rte_cryptodev_configure API is used to configure a Crypto device.
2714 The ``rte_cryptodev_config`` structure is used to pass the configuration
2715 parameters for socket selection and number of queue pairs.
2716
2717-.. code-block:: c
2718-
2719- struct rte_cryptodev_config {
2720- int socket_id;
2721- /**< Socket to allocate resources on */
2722- uint16_t nb_queue_pairs;
2723- /**< Number of queue pairs to configure on device */
2724- };
2725+.. literalinclude:: ../../../lib/cryptodev/rte_cryptodev.h
2726+ :language: c
2727+ :start-after: Structure rte_cryptodev_config 8<
2728+ :end-before: >8 End of structure rte_cryptodev_config.
2729
2730
2731 Configuration of Queue Pairs
2732@@ -121,11 +117,11 @@ Each queue pairs resources may be allocated on a specified socket.
2733 const struct rte_cryptodev_qp_conf *qp_conf,
2734 int socket_id)
2735
2736- struct rte_cryptodev_qp_conf {
2737- uint32_t nb_descriptors; /**< Number of descriptors per queue pair */
2738- struct rte_mempool *mp_session;
2739- /**< The mempool for creating session in sessionless mode */
2740- };
2741+
2742+.. literalinclude:: ../../../lib/cryptodev/rte_cryptodev.h
2743+ :language: c
2744+ :start-after: Structure rte_cryptodev_qp_conf 8<
2745+ :end-before: >8 End of structure rte_cryptodev_qp_conf.
2746
2747
2748 The field ``mp_session`` is used for creating temporary session to process
2749@@ -271,23 +267,10 @@ This allows the user to query a specific Crypto PMD and get all the device
2750 features and capabilities. The ``rte_cryptodev_info`` structure contains all the
2751 relevant information for the device.
2752
2753-.. code-block:: c
2754-
2755- struct rte_cryptodev_info {
2756- const char *driver_name;
2757- uint8_t driver_id;
2758- struct rte_device *device;
2759-
2760- uint64_t feature_flags;
2761-
2762- const struct rte_cryptodev_capabilities *capabilities;
2763-
2764- unsigned max_nb_queue_pairs;
2765-
2766- struct {
2767- unsigned max_nb_sessions;
2768- } sym;
2769- };
2770+.. literalinclude:: ../../../lib/cryptodev/rte_cryptodev.h
2771+ :language: c
2772+ :start-after: Structure rte_cryptodev_info 8<
2773+ :end-before: >8 End of structure rte_cryptodev_info.
2774
2775
2776 Operation Processing
2777@@ -499,37 +482,29 @@ a flow. Crypto sessions cache this immutable data in a optimal way for the
2778 underlying PMD and this allows further acceleration of the offload of
2779 Crypto workloads.
2780
2781-.. figure:: img/cryptodev_sym_sess.*
2782-
2783 The Crypto device framework provides APIs to create session mempool and allocate
2784 and initialize sessions for crypto devices, where sessions are mempool objects.
2785 The application has to use ``rte_cryptodev_sym_session_pool_create()`` to
2786-create the session header mempool that creates a mempool with proper element
2787-size automatically and stores necessary information for safely accessing the
2788-session in the mempool's private data field.
2789-
2790-To create a mempool for storing session private data, the application has two
2791-options. The first is to create another mempool with elt size equal to or
2792-bigger than the maximum session private data size of all crypto devices that
2793-will share the same session header. The creation of the mempool shall use the
2794-traditional ``rte_mempool_create()`` with the correct ``elt_size``. The other
2795-option is to change the ``elt_size`` parameter in
2796-``rte_cryptodev_sym_session_pool_create()`` to the correct value. The first
2797-option is more complex to implement but may result in better memory usage as
2798-a session header normally takes smaller memory footprint as the session private
2799-data.
2800+create the session mempool header and the private data with the size specified
2801+by the user through the ``elt_size`` parameter in the function.
2802+The session private data is for the driver to initialize and access
2803+during crypto operations, hence the ``elt_size`` should be big enough
2804+for all drivers that will share this mempool.
2805+To obtain the proper session private data size of a crypto device,
2806+the user can call ``rte_cryptodev_sym_get_private_session_size()`` function.
2807+In case of heterogeneous crypto devices which will share the same session mempool,
2808+the maximum session private data size of them should be passed.
2809
2810 Once the session mempools have been created, ``rte_cryptodev_sym_session_create()``
2811-is used to allocate an uninitialized session from the given mempool.
2812-The session then must be initialized using ``rte_cryptodev_sym_session_init()``
2813-for each of the required crypto devices. A symmetric transform chain
2814-is used to specify the operation and its parameters. See the section below for
2815-details on transforms.
2816+is used to allocate and initialize the session from the given mempool.
2817+The created session can ONLY be used by the crypto devices sharing the same driver ID
2818+as the device ID passed into the function as the parameter.
2819+In addition, a symmetric transform chain is used to specify the operation and its parameters.
2820+See the section below for details on transforms.
2821
2822-When a session is no longer used, user must call ``rte_cryptodev_sym_session_clear()``
2823-for each of the crypto devices that are using the session, to free all driver
2824-private session data. Once this is done, session should be freed using
2825-``rte_cryptodev_sym_session_free`` which returns them to their mempool.
2826+When a session is no longer used, user must call ``rte_cryptodev_sym_session_free()``
2827+to uninitialize the session data and return the session
2828+back to the mempool it belongs.
2829
2830
2831 Transforms and Transform Chaining
2832@@ -548,22 +523,10 @@ Currently there are three transforms types cipher, authentication and AEAD.
2833 Also it is important to note that the order in which the
2834 transforms are passed indicates the order of the chaining.
2835
2836-.. code-block:: c
2837-
2838- struct rte_crypto_sym_xform {
2839- struct rte_crypto_sym_xform *next;
2840- /**< next xform in chain */
2841- enum rte_crypto_sym_xform_type type;
2842- /**< xform type */
2843- union {
2844- struct rte_crypto_auth_xform auth;
2845- /**< Authentication / hash xform */
2846- struct rte_crypto_cipher_xform cipher;
2847- /**< Cipher xform */
2848- struct rte_crypto_aead_xform aead;
2849- /**< AEAD xform */
2850- };
2851- };
2852+.. literalinclude:: ../../../lib/cryptodev/rte_crypto_sym.h
2853+ :language: c
2854+ :start-after: Structure rte_crypto_sym_xform 8<
2855+ :end-before: >8 End of structure rte_crypto_sym_xform.
2856
2857 The API does not place a limit on the number of transforms that can be chained
2858 together but this will be limited by the underlying Crypto device poll mode
2859@@ -586,61 +549,11 @@ authentication/ cipher/ AEAD parameters required depending on the type of operat
2860 specified in the session or the transform
2861 chain.
2862
2863-.. code-block:: c
2864+.. literalinclude:: ../../../lib/cryptodev/rte_crypto_sym.h
2865+ :language: c
2866+ :start-after: Structure rte_crypto_sym_op 8<
2867+ :end-before: >8 End of structure rte_crypto_sym_op.
2868
2869- struct rte_crypto_sym_op {
2870- struct rte_mbuf *m_src;
2871- struct rte_mbuf *m_dst;
2872-
2873- union {
2874- void *session;
2875- /**< Handle for the initialised session context */
2876- struct rte_crypto_sym_xform *xform;
2877- /**< Session-less API Crypto operation parameters */
2878- };
2879-
2880- union {
2881- struct {
2882- struct {
2883- uint32_t offset;
2884- uint32_t length;
2885- } data; /**< Data offsets and length for AEAD */
2886-
2887- struct {
2888- uint8_t *data;
2889- rte_iova_t phys_addr;
2890- } digest; /**< Digest parameters */
2891-
2892- struct {
2893- uint8_t *data;
2894- rte_iova_t phys_addr;
2895- } aad;
2896- /**< Additional authentication parameters */
2897- } aead;
2898-
2899- struct {
2900- struct {
2901- struct {
2902- uint32_t offset;
2903- uint32_t length;
2904- } data; /**< Data offsets and length for ciphering */
2905- } cipher;
2906-
2907- struct {
2908- struct {
2909- uint32_t offset;
2910- uint32_t length;
2911- } data;
2912- /**< Data offsets and length for authentication */
2913-
2914- struct {
2915- uint8_t *data;
2916- rte_iova_t phys_addr;
2917- } digest; /**< Digest parameters */
2918- } auth;
2919- };
2920- };
2921- };
2922
2923 Synchronous mode
2924 ----------------
2925diff --git a/doc/guides/prog_guide/event_timer_adapter.rst b/doc/guides/prog_guide/event_timer_adapter.rst
2926index d7307a2..9106092 100644
2927--- a/doc/guides/prog_guide/event_timer_adapter.rst
2928+++ b/doc/guides/prog_guide/event_timer_adapter.rst
2929@@ -35,7 +35,7 @@ device upon timer expiration.
2930
2931 The Event Timer Adapter API represents each event timer with a generic struct,
2932 which contains an event and user metadata. The ``rte_event_timer`` struct is
2933-defined in ``lib/event/librte_event_timer_adapter.h``.
2934+defined in ``rte_event_timer_adapter.h``.
2935
2936 .. _timer_expiry_event:
2937
2938diff --git a/doc/guides/prog_guide/img/cryptodev_sym_sess.svg b/doc/guides/prog_guide/img/cryptodev_sym_sess.svg
2939deleted file mode 100644
2940index 9b52245..0000000
2941--- a/doc/guides/prog_guide/img/cryptodev_sym_sess.svg
2942+++ /dev/null
2943@@ -1,417 +0,0 @@
2944-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2945-<!-- Generated by Microsoft Visio, SVG Export cryptodev_sym_sess.svg Page-1 -->
2946-
2947-<svg
2948- xmlns:dc="http://purl.org/dc/elements/1.1/"
2949- xmlns:cc="http://creativecommons.org/ns#"
2950- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
2951- xmlns:svg="http://www.w3.org/2000/svg"
2952- xmlns="http://www.w3.org/2000/svg"
2953- xmlns:xlink="http://www.w3.org/1999/xlink"
2954- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
2955- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
2956- width="4.8933434in"
2957- height="3.8972795in"
2958- viewBox="0 0 352.31955 280.60496"
2959- xml:space="preserve"
2960- class="st10"
2961- version="1.1"
2962- id="svg70"
2963- sodipodi:docname="cryptodev_sym_sess.svg"
2964- style="font-size:12px;overflow:visible;color-interpolation-filters:sRGB;fill:none;fill-rule:evenodd;stroke-linecap:square;stroke-miterlimit:3"
2965- inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"><metadata
2966- id="metadata74"><rdf:RDF><cc:Work
2967- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
2968- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><sodipodi:namedview
2969- pagecolor="#ffffff"
2970- bordercolor="#666666"
2971- borderopacity="1"
2972- objecttolerance="10"
2973- gridtolerance="10"
2974- guidetolerance="10"
2975- inkscape:pageopacity="0"
2976- inkscape:pageshadow="2"
2977- inkscape:window-width="1920"
2978- inkscape:window-height="956"
2979- id="namedview72"
2980- showgrid="false"
2981- inkscape:zoom="1.7495789"
2982- inkscape:cx="208.74719"
2983- inkscape:cy="170.80248"
2984- inkscape:window-x="0"
2985- inkscape:window-y="27"
2986- inkscape:window-maximized="1"
2987- inkscape:current-layer="shape18-1-4" /><style
2988- type="text/css"
2989- id="style2"><![CDATA[
2990- .st1 {fill:url(#grad0-4);stroke:#386288;stroke-width:0.75}
2991- .st2 {fill:#386288;font-family:Calibri;font-size:0.833336em}
2992- .st3 {visibility:visible}
2993- .st4 {fill:#bdd0e9;fill-opacity:0.25;filter:url(#filter_2);stroke:#bdd0e9;stroke-opacity:0.25}
2994- .st5 {fill:#a6b6cd;stroke:#41719c;stroke-width:0.75}
2995- .st6 {fill:#41719c;font-family:Calibri;font-size:0.833336em}
2996- .st7 {fill:#ffffff;stroke:#41719c;stroke-width:0.75}
2997- .st8 {font-size:0.799995em}
2998- .st9 {font-size:0.799995em;font-weight:bold}
2999- .st10 {fill:none;fill-rule:evenodd;font-size:12px;overflow:visible;stroke-linecap:square;stroke-miterlimit:3}
3000- ]]></style><defs
3001- id="Patterns_And_Gradients"><marker
3002- inkscape:isstock="true"
3003- style="overflow:visible"
3004- id="marker5421"
3005- refX="0"
3006- refY="0"
3007- orient="auto"
3008- inkscape:stockid="Arrow2Lend"><path
3009- transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
3010- d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
3011- style="fill:#41719c;fill-opacity:1;fill-rule:evenodd;stroke:#41719c;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
3012- id="path5419"
3013- inkscape:connector-curvature="0" /></marker><marker
3014- inkscape:stockid="Arrow2Lend"
3015- orient="auto"
3016- refY="0"
3017- refX="0"
3018- id="Arrow2Lend"
3019- style="overflow:visible"
3020- inkscape:isstock="true"><path
3021- id="path5004"
3022- style="fill:#41719c;fill-opacity:1;fill-rule:evenodd;stroke:#41719c;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
3023- d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
3024- transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
3025- inkscape:connector-curvature="0" /></marker><marker
3026- inkscape:stockid="Arrow1Lend"
3027- orient="auto"
3028- refY="0"
3029- refX="0"
3030- id="Arrow1Lend"
3031- style="overflow:visible"
3032- inkscape:isstock="true"><path
3033- id="path4986"
3034- d="M 0,0 5,-5 -12.5,0 5,5 Z"
3035- style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
3036- transform="matrix(-0.8,0,0,-0.8,-10,0)"
3037- inkscape:connector-curvature="0" /></marker><linearGradient
3038- id="grad0-4"
3039- x1="0"
3040- y1="0"
3041- x2="1"
3042- y2="0"
3043- gradientTransform="rotate(60,0.5,0.5)"><stop
3044- offset="0"
3045- stop-color="#e8ebef"
3046- stop-opacity="1"
3047- id="stop4" /><stop
3048- offset="0.24"
3049- stop-color="#f4f5f7"
3050- stop-opacity="1"
3051- id="stop6" /><stop
3052- offset="0.54"
3053- stop-color="#feffff"
3054- stop-opacity="1"
3055- id="stop8" /></linearGradient><filter
3056- id="filter_2-4"><feGaussianBlur
3057- stdDeviation="2"
3058- id="feGaussianBlur12-0" /></filter><linearGradient
3059- inkscape:collect="always"
3060- xlink:href="#grad0-4"
3061- id="linearGradient189"
3062- gradientTransform="scale(0.8787489,1.1379815)"
3063- x1="-0.42674366"
3064- y1="0.98859203"
3065- x2="176.71146"
3066- y2="0.98859203"
3067- gradientUnits="userSpaceOnUse" /><filter
3068- id="filter_2-5"><feGaussianBlur
3069- stdDeviation="2"
3070- id="feGaussianBlur12-8" /></filter><filter
3071- id="filter_2-3"><feGaussianBlur
3072- stdDeviation="2"
3073- id="feGaussianBlur12-2" /></filter><linearGradient
3074- inkscape:collect="always"
3075- xlink:href="#grad0-4"
3076- id="linearGradient189-7"
3077- gradientTransform="scale(0.8787489,1.1379815)"
3078- x1="-0.42674366"
3079- y1="0.98859203"
3080- x2="176.71146"
3081- y2="0.98859203"
3082- gradientUnits="userSpaceOnUse" /><linearGradient
3083- inkscape:collect="always"
3084- xlink:href="#grad0-4"
3085- id="linearGradient500"
3086- gradientTransform="matrix(0.87785006,0,0,2.0116303,15.940232,20.619826)"
3087- x1="-0.42674366"
3088- y1="0.98859203"
3089- x2="176.71146"
3090- y2="0.98859203"
3091- gradientUnits="userSpaceOnUse" /></defs><defs
3092- id="Filters"><filter
3093- id="filter_2"><feGaussianBlur
3094- stdDeviation="2"
3095- id="feGaussianBlur12" /></filter></defs><g
3096- transform="matrix(1,0,0,0.46836022,-12.05774,-7.0354309)"
3097- id="shape18-1"><title
3098- id="title18">Rounded Rectangle.12</title><desc
3099- id="desc20">Crypto Symmetric Session</desc><path
3100- inkscape:connector-curvature="0"
3101- style="fill:url(#linearGradient500);stroke:#386288;stroke-width:0.99665654"
3102- id="path22"
3103- class="st1"
3104- d="M 22.713297,378.28219 H 163.92871 a 6.7704177,11.980443 0 0 0 6.76307,-11.96745 V 35.256532 A 6.7704177,11.980443 0 0 0 163.92871,23.271405 H 22.713297 A 6.7704177,11.980443 0 0 0 15.940232,35.256532 V 366.31474 a 6.7704177,11.980443 0 0 0 6.773065,11.96745 z" /></g><g
3105- transform="matrix(1,0,0,0.41409874,-2.136529,-9.5289258)"
3106- id="shape19-6"><title
3107- id="title27">Rounded Rectangle.13</title><desc
3108- id="desc29">Private Session Data</desc></g><path
3109- d="m 16.65204,162.41822 h 123.21341 a 5.9074955,17.266947 0 0 0 5.90824,-17.2399 V 38.904442 A 5.9074955,17.266947 0 0 0 139.86545,21.635299 H 16.65204 A 5.9074955,17.266947 0 0 0 10.743795,38.904442 V 145.17832 a 5.9074955,17.266947 0 0 0 5.908245,17.2399 z"
3110- class="st7"
3111- id="path43"
3112- inkscape:connector-curvature="0"
3113- style="fill:#ffffff;stroke:#41719c;stroke-width:1.28185344" /><rect
3114- style="fill:none;fill-opacity:1;stroke:#41719c;stroke-width:0.7760548;stroke-opacity:1"
3115- id="rect4604"
3116- width="15.963434"
3117- height="15.954105"
3118- x="25.091528"
3119- y="121.37455" /><rect
3120- style="font-size:12px;overflow:visible;color-interpolation-filters:sRGB;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#41719c;stroke-width:0.7760548;stroke-linecap:square;stroke-miterlimit:3;stroke-opacity:1"
3121- id="rect4604-7"
3122- width="15.963433"
3123- height="15.954105"
3124- x="41.054958"
3125- y="121.37455" /><rect
3126- style="font-size:12px;overflow:visible;color-interpolation-filters:sRGB;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#41719c;stroke-width:0.7760548;stroke-linecap:square;stroke-miterlimit:3;stroke-opacity:1"
3127- id="rect4604-7-6"
3128- width="15.963433"
3129- height="15.954105"
3130- x="57.018402"
3131- y="121.37455" /><rect
3132- style="font-size:12px;overflow:visible;color-interpolation-filters:sRGB;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#41719c;stroke-width:0.7760548;stroke-linecap:square;stroke-miterlimit:3;stroke-opacity:1"
3133- id="rect4604-7-6-9"
3134- width="15.963433"
3135- height="15.954105"
3136- x="72.981834"
3137- y="121.37455" /><rect
3138- style="font-size:12px;overflow:visible;color-interpolation-filters:sRGB;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#41719c;stroke-width:0.7760548;stroke-linecap:square;stroke-miterlimit:3;stroke-opacity:1"
3139- id="rect4604-7-6-9-8"
3140- width="15.963433"
3141- height="15.954105"
3142- x="88.945259"
3143- y="121.37455" /><rect
3144- style="font-size:12px;overflow:visible;color-interpolation-filters:sRGB;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#41719c;stroke-width:0.7760548;stroke-linecap:square;stroke-miterlimit:3;stroke-opacity:1"
3145- id="rect4604-7-6-9-8-9"
3146- width="15.963433"
3147- height="15.954105"
3148- x="104.90869"
3149- y="121.37455" /><rect
3150- style="font-size:12px;overflow:visible;color-interpolation-filters:sRGB;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#41719c;stroke-width:0.7760548;stroke-linecap:square;stroke-miterlimit:3;stroke-opacity:1"
3151- id="rect4604-7-6-9-8-9-6"
3152- width="15.963433"
3153- height="15.954105"
3154- x="120.87212"
3155- y="121.37455" /><text
3156- x="50.562523"
3157- y="49.898369"
3158- class="st6"
3159- id="text65-3"
3160- style="font-size:22.36531448px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#41719c;fill-rule:evenodd;stroke-width:2.23652411;stroke-linecap:square;stroke-miterlimit:3"
3161- transform="scale(0.47106923,2.1228302)" />
3162-<text
3163- id="text4129"
3164- y="80.842018"
3165- x="27.862804"
3166- style="font-style:normal;font-weight:normal;font-size:30.00008965px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.75000226"
3167- xml:space="preserve"><tspan
3168- style="stroke-width:0.75000226"
3169- y="107.38506"
3170- x="27.862804"
3171- id="tspan4127"
3172- sodipodi:role="line"></tspan></text>
3173-<text
3174- id="text4139"
3175- y="72.697174"
3176- x="25.290758"
3177- style="font-style:normal;font-weight:normal;font-size:30.00008965px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.75000226"
3178- xml:space="preserve"><tspan
3179- style="stroke-width:0.75000226"
3180- y="99.240219"
3181- x="25.290758"
3182- id="tspan4137"
3183- sodipodi:role="line"></tspan></text>
3184-<path
3185- style="fill:none;fill-opacity:1;stroke:#41719c;stroke-width:0.86738265px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Lend)"
3186- d="m 128.80127,137.90141 -0.20704,20.06801 44.6966,-0.10399 0.20705,-93.424256 16.84434,0.62379"
3187- id="path5030"
3188- inkscape:connector-curvature="0"
3189- sodipodi:nodetypes="ccccc" /><g
3190- transform="matrix(1,0,0,0.57815109,191.45876,-0.65041967)"
3191- id="shape18-1-4"><title
3192- id="title18-4">Rounded Rectangle.12</title><desc
3193- id="desc20-6">Crypto Symmetric Session</desc><path
3194- style="fill:url(#linearGradient189);stroke:#386288;stroke-width:0.75"
3195- id="path22-0"
3196- class="st1"
3197- d="m 6.78,202.33 h 141.36 a 6.77735,6.77735 -180 0 0 6.77,-6.77 V 8.28 A 6.77735,6.77735 -180 0 0 148.14,1.5 H 6.78 A 6.77735,6.77735 -180 0 0 0,8.28 v 187.28 a 6.77735,6.77735 -180 0 0 6.78,6.77 z"
3198- inkscape:connector-curvature="0" /><text
3199- transform="scale(0.71276665,1.4029837)"
3200- style="font-size:14.02988338px;font-family:Calibri;fill:#386288;stroke-width:1.40298378"
3201- id="text24-5"
3202- class="st2"
3203- y="17.335487"
3204- x="26.317923">Crypto Driver Private Session</text>
3205-<text
3206- transform="scale(0.71276665,1.4029837)"
3207- style="font-size:14.02988338px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#386288;fill-rule:evenodd;stroke-width:1.40298378;stroke-linecap:square;stroke-miterlimit:3"
3208- id="text24-5-3"
3209- class="st2"
3210- y="19.076277"
3211- x="-240.04274">Crypto Symmetric Session</text>
3212-<text
3213- transform="scale(0.71276665,1.4029837)"
3214- style="font-size:14.02988338px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#386288;fill-rule:evenodd;stroke-width:1.40298378;stroke-linecap:square;stroke-miterlimit:3"
3215- id="text24-5-5"
3216- class="st2"
3217- y="46.557648"
3218- x="-241.24557">uint16_t nb_drivers;</text>
3219-<text
3220- transform="scale(0.71276665,1.4029837)"
3221- style="font-size:14.02988338px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#386288;fill-rule:evenodd;stroke-width:1.40298378;stroke-linecap:square;stroke-miterlimit:3"
3222- id="text24-5-6"
3223- class="st2"
3224- y="98.349464"
3225- x="-240.04272">struct {</text>
3226-<text
3227- transform="scale(0.71276665,1.4029837)"
3228- style="font-size:14.02988338px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#386288;fill-rule:evenodd;stroke-width:1.40298378;stroke-linecap:square;stroke-miterlimit:3"
3229- id="text24-5-2"
3230- class="st2"
3231- y="115.26107"
3232- x="-204.55865">void *data;</text>
3233-<text
3234- transform="scale(0.71276665,1.4029837)"
3235- style="font-size:14.02988338px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#386288;fill-rule:evenodd;stroke-width:1.40298378;stroke-linecap:square;stroke-miterlimit:3"
3236- id="text24-5-9"
3237- class="st2"
3238- y="144.3279"
3239- x="-240.04274">} session_data[];</text>
3240-<text
3241- transform="scale(0.71276665,1.4029837)"
3242- style="font-size:14.02988338px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#386288;fill-rule:evenodd;stroke-width:1.40298378;stroke-linecap:square;stroke-miterlimit:3"
3243- id="text24-5-5-1"
3244- class="st2"
3245- y="58.945786"
3246- x="-240.51538">uint16_t user_data_sz;</text>
3247-<text
3248- transform="scale(0.71276665,1.4029837)"
3249- style="font-size:14.02988338px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#386288;fill-rule:evenodd;stroke-width:1.40298378;stroke-linecap:square;stroke-miterlimit:3"
3250- id="text24-5-5-2"
3251- class="st2"
3252- y="189.4823"
3253- x="-185.78569">user_data</text>
3254-<text
3255- transform="scale(0.71276665,1.4029837)"
3256- style="font-size:14.02988338px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#386288;fill-rule:evenodd;stroke-width:1.40298378;stroke-linecap:square;stroke-miterlimit:3"
3257- id="text24-5-5-1-4"
3258- class="st2"
3259- y="129.23468"
3260- x="-204.95244">uint16_t refcnt;</text>
3261-<text
3262- transform="scale(0.71276665,1.4029837)"
3263- style="font-size:14.02988338px;font-family:Calibri;overflow:visible;color-interpolation-filters:sRGB;fill:#386288;fill-rule:evenodd;stroke-width:1.40298378;stroke-linecap:square;stroke-miterlimit:3"
3264- id="text24-5-5-1-4-3"
3265- class="st2"
3266- y="72.641953"
3267- x="-242.00067">uint64_t opaque_data;</text>
3268-</g><g
3269- transform="matrix(1.022976,0,0,0.71529071,199.82034,-39.936699)"
3270- id="shape19-6-5"><title
3271- id="title27-2">Rounded Rectangle.13</title><desc
3272- id="desc29-0">Private Session Data</desc><g
3273- style="visibility:visible"
3274- class="st3"
3275- transform="translate(0.345598,1.97279)"
3276- id="shadow19-7-1"><path
3277- style="fill:#bdd0e9;fill-opacity:0.25;stroke:#bdd0e9;stroke-opacity:0.25;filter:url(#filter_2)"
3278- id="path31-8"
3279- class="st4"
3280- d="m 5.91,202.33 h 123.25 a 5.90925,5.90925 -180 0 0 5.91,-5.9 v -92.78 a 5.90925,5.90925 -180 0 0 -5.91,-5.91 H 5.91 A 5.90925,5.90925 -180 0 0 0,103.65 v 92.78 a 5.90925,5.90925 -180 0 0 5.91,5.9 z"
3281- inkscape:connector-curvature="0" /></g><path
3282- style="fill:#a6b6cd;stroke:#41719c;stroke-width:0.75"
3283- id="path34-8"
3284- class="st5"
3285- d="m 5.91,202.33 h 123.25 a 5.90925,5.90925 -180 0 0 5.91,-5.9 v -92.78 a 5.90925,5.90925 -180 0 0 -5.91,-5.91 H 5.91 A 5.90925,5.90925 -180 0 0 0,103.65 v 92.78 a 5.90925,5.90925 -180 0 0 5.91,5.9 z"
3286- inkscape:connector-curvature="0" /><text
3287- transform="scale(0.76039781,1.3151011)"
3288- style="font-size:13.15105343px;font-family:Calibri;fill:#41719c;stroke-width:1.31510115"
3289- id="text36-7"
3290- class="st6"
3291- y="119.96548"
3292- x="34.639763">Private Session Data</text>
3293-</g><g
3294- transform="matrix(1,0,0,0.57815109,191.61478,163.41083)"
3295- id="shape18-1-4-7"><title
3296- id="title18-4-3">Rounded Rectangle.12</title><desc
3297- id="desc20-6-5">Crypto Symmetric Session</desc><path
3298- style="fill:url(#linearGradient189-7);stroke:#386288;stroke-width:0.75"
3299- id="path22-0-8"
3300- class="st1"
3301- d="m 6.78,202.33 h 141.36 a 6.77735,6.77735 -180 0 0 6.77,-6.77 V 8.28 A 6.77735,6.77735 -180 0 0 148.14,1.5 H 6.78 A 6.77735,6.77735 -180 0 0 0,8.28 v 187.28 a 6.77735,6.77735 -180 0 0 6.78,6.77 z"
3302- inkscape:connector-curvature="0" /><text
3303- transform="scale(0.71276665,1.4029837)"
3304- style="font-size:14.02988338px;font-family:Calibri;fill:#386288;stroke-width:1.40298378"
3305- id="text24-5-1"
3306- class="st2"
3307- y="17.335487"
3308- x="26.317923">Crypto Driver Private Session</text>
3309-</g><g
3310- transform="matrix(1.022976,0,0,0.71529071,199.97637,124.12455)"
3311- id="shape19-6-5-1"><title
3312- id="title27-2-4">Rounded Rectangle.13</title><desc
3313- id="desc29-0-9">Private Session Data</desc><g
3314- style="visibility:visible"
3315- class="st3"
3316- transform="translate(0.345598,1.97279)"
3317- id="shadow19-7-1-8"><path
3318- style="fill:#bdd0e9;fill-opacity:0.25;stroke:#bdd0e9;stroke-opacity:0.25;filter:url(#filter_2-3)"
3319- id="path31-8-4"
3320- class="st4"
3321- d="m 5.91,202.33 h 123.25 a 5.90925,5.90925 -180 0 0 5.91,-5.9 v -92.78 a 5.90925,5.90925 -180 0 0 -5.91,-5.91 H 5.91 A 5.90925,5.90925 -180 0 0 0,103.65 v 92.78 a 5.90925,5.90925 -180 0 0 5.91,5.9 z"
3322- inkscape:connector-curvature="0" /></g><path
3323- style="fill:#a6b6cd;stroke:#41719c;stroke-width:0.75"
3324- id="path34-8-3"
3325- class="st5"
3326- d="m 5.91,202.33 h 123.25 a 5.90925,5.90925 -180 0 0 5.91,-5.9 v -92.78 a 5.90925,5.90925 -180 0 0 -5.91,-5.91 H 5.91 A 5.90925,5.90925 -180 0 0 0,103.65 v 92.78 a 5.90925,5.90925 -180 0 0 5.91,5.9 z"
3327- inkscape:connector-curvature="0" /><text
3328- transform="scale(0.76039781,1.3151011)"
3329- style="font-size:13.15105343px;font-family:Calibri;fill:#41719c;stroke-width:1.31510115"
3330- id="text36-7-6"
3331- class="st6"
3332- y="119.96548"
3333- x="34.639763">Private Session Data</text>
3334-</g><text
3335- id="text5070"
3336- y="145.4136"
3337- x="248.24945"
3338- style="font-style:normal;font-weight:normal;font-size:30.00008774px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.75000221"
3339- xml:space="preserve"><tspan
3340- style="stroke-width:0.75000221"
3341- y="171.95665"
3342- x="248.24945"
3343- id="tspan5068"
3344- sodipodi:role="line" /></text>
3345-<text
3346- id="text5074"
3347- y="142.68553"
3348- x="251.28064"
3349- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:22.00006485px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.75000221"
3350- xml:space="preserve"><tspan
3351- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:22.00006485px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.75000221"
3352- y="142.68553"
3353- x="251.28064"
3354- id="tspan5072"
3355- sodipodi:role="line">...</tspan></text>
3356-<path
3357- inkscape:connector-curvature="0"
3358- id="path5076"
3359- d="m 32.13263,137.96494 1.19624,93.60569 156.25849,0.0883"
3360- style="fill:none;stroke:#41719c;stroke-width:0.56864393px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker5421)" /></svg>
3361\ No newline at end of file
3362diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
3363index 3e62428..40d3f5b 100644
3364--- a/doc/guides/prog_guide/rte_flow.rst
3365+++ b/doc/guides/prog_guide/rte_flow.rst
3366@@ -1513,22 +1513,15 @@ rte_flow_flex_item_create() routine.
3367 value and mask.
3368
3369 Item: ``L2TPV2``
3370-^^^^^^^^^^^^^^^^^^^
3371+^^^^^^^^^^^^^^^^
3372
3373 Matches a L2TPv2 header.
3374
3375-- ``flags_version``: flags(12b), version(4b).
3376-- ``length``: total length of the message.
3377-- ``tunnel_id``: identifier for the control connection.
3378-- ``session_id``: identifier for a session within a tunnel.
3379-- ``ns``: sequence number for this date or control message.
3380-- ``nr``: sequence number expected in the next control message to be received.
3381-- ``offset_size``: offset of payload data.
3382-- ``offset_padding``: offset padding, variable length.
3383+- ``hdr``: header definition (``rte_l2tpv2.h``).
3384 - Default ``mask`` matches flags_version only.
3385
3386 Item: ``PPP``
3387-^^^^^^^^^^^^^^^^^^^
3388+^^^^^^^^^^^^^
3389
3390 Matches a PPP header.
3391
3392diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
3393index 26e0560..47b1716 100644
3394--- a/doc/guides/rel_notes/release_22_11.rst
3395+++ b/doc/guides/rel_notes/release_22_11.rst
3396@@ -805,3 +805,374 @@ Tested Platforms
3397 ~~~~~~~~~~~~~
3398
3399 * drivers: fix symbol exports when map is omitted
3400+
3401+22.11.2 Release Notes
3402+---------------------
3403+
3404+
3405+22.11.2 Fixes
3406+~~~~~~~~~~~~~
3407+
3408+* acl: fix crash on PPC64 with GCC 11
3409+* app/bbdev: add allocation checks
3410+* app/bbdev: check statistics failure
3411+* app/bbdev: fix build with optional flag
3412+* app/bbdev: fix build with optional flag
3413+* app/compress-perf: fix remaining data for ops
3414+* app/compress-perf: fix some typos
3415+* app/compress-perf: fix testing single operation
3416+* app/crypto-perf: fix IPsec direction
3417+* app/crypto-perf: fix number of segments
3418+* app/crypto-perf: fix session freeing
3419+* app/crypto-perf: fix SPI zero
3420+* app/crypto-perf: fix test file memory leak
3421+* app/dumpcap: fix storing port identifier
3422+* app/flow-perf: fix division or module by zero
3423+* app/testpmd: cleanup cleanly from signal
3424+* app/testpmd: fix crash on cleanup
3425+* app/testpmd: fix encap/decap size calculation
3426+* app/testpmd: fix forwarding stats for Tx dropped
3427+* app/testpmd: fix interactive mode on Windows
3428+* app/testpmd: fix interactive mode with no ports
3429+* app/testpmd: fix link check condition on port start
3430+* app/testpmd: fix packet count in IEEE 1588 engine
3431+* app/testpmd: fix packet transmission in noisy VNF engine
3432+* app/testpmd: fix secondary process packet forwarding
3433+* app/testpmd: fix Tx preparation in checksum engine
3434+* baseband/acc: add explicit mbuf append for soft output
3435+* baseband/acc: fix acc100 iteration counter in TB
3436+* baseband/acc: fix acc100 queue mapping to 64 bits
3437+* baseband/acc: fix check after deref and dead code
3438+* baseband/acc: fix iteration counter in TB mode
3439+* baseband/acc: fix memory leak on acc100 close
3440+* baseband/acc: fix multiplexing acc100 operations
3441+* baseband/acc: prevent to dequeue more than requested
3442+* baseband/acc: protect from TB negative scenario
3443+* build: detect backtrace availability
3444+* build: fix dependencies lookup
3445+* build: fix toolchain definition
3446+* bus/fslmc: fix deadlock on MC send command timeout
3447+* bus/ifpga: fix devargs handling
3448+* cmdline: handle EOF as quit
3449+* cmdline: make rdline status not private
3450+* common/cnxk: add memory clobber to steor and ldeor
3451+* common/cnxk: fix aura ID handling
3452+* common/cnxk: fix auth key length
3453+* common/cnxk: fix channel mask for SDP interfaces
3454+* common/cnxk: fix dual VLAN parsing
3455+* common/cnxk: fix IPv6 extension header parsing
3456+* common/cnxk: fix IPv6 extension matching
3457+* common/cnxk: fix second pass flow rule layer type
3458+* common/cnxk: reduce channel count per LMAC
3459+* common/mlx5: fix offset of a field
3460+* common/mlx5: improve AES-XTS tweak capability check
3461+* common/mlx5: use just sufficient barrier for Arm
3462+* common/sfc_efx/base: add MAE mark reset action
3463+* compressdev: fix empty devargs parsing
3464+* compressdev: fix end of driver list
3465+* compress/mlx5: fix decompress xform validation
3466+* compress/mlx5: fix output Adler-32 checksum offset
3467+* compress/mlx5: fix queue setup for partial transformations
3468+* crypto/ccp: fix IOVA handling
3469+* crypto/ccp: fix PCI probing
3470+* crypto/ccp: remove some dead code for UIO
3471+* crypto/ccp: remove some printf
3472+* crypto/cnxk: fix digest for empty input data
3473+* cryptodev: fix empty devargs parsing
3474+* cryptodev: fix sym session mempool creation description
3475+* cryptodev: fix telemetry data truncation
3476+* crypto/ipsec_mb: fix ZUC-256 maximum tag length
3477+* crypto/ipsec_mb: relax multi-process requirement
3478+* crypto/ipsec_mb: remove unnecessary null check
3479+* crypto/openssl: fix freeing in RSA EVP
3480+* crypto/openssl: fix warning on copy length
3481+* crypto/qat: fix build
3482+* crypto/qat: fix build for generic x86 with GCC 12
3483+* crypto/qat: fix SM3 auth mode
3484+* crypto/qat: fix stream cipher direction
3485+* devtools: fix escaped space in grep pattern
3486+* devtools: fix name check with mbox files
3487+* devtools: move mailmap check after patch applied
3488+* dma/ioat: fix device stop if no copies done
3489+* dma/ioat: fix error reporting on restart
3490+* dma/ioat: fix indexes after restart
3491+* dma/skeleton: fix empty devargs parsing
3492+* doc: add gpudev to the Doxygen index
3493+* doc: add Linux capability to access physical addresses
3494+* doc: fix code blocks in cryptodev guide
3495+* doc: fix DCF instructions in ice guide
3496+* doc: fix dependency setup in l2fwd-cat example guide
3497+* doc: fix description of L2TPV2 flow item
3498+* doc: fix firmware list in bnxt guide
3499+* doc: fix LPM support in l3forward guide
3500+* doc: fix pipeline example path in user guide
3501+* doc: fix reference to event timer header
3502+* drivers/bus: fix leak for devices without driver
3503+* drivers: fix symbol exports when map is omitted
3504+* eal: cleanup alarm and hotplug before memory detach
3505+* eal/freebsd: fix lock in alarm callback
3506+* eal/linux: fix hugetlbfs sub-directories discovery
3507+* eal/unix: fix thread creation
3508+* eal: use same atomic intrinsics for GCC and clang
3509+* eal/windows: fix pedantic build
3510+* eal/windows: fix thread creation
3511+* eal/windows: mark memory config as complete
3512+* ethdev: fix build with LTO
3513+* ethdev: fix telemetry data truncation
3514+* ethdev: remove telemetry Rx mbuf alloc failed field
3515+* event/cnxk: fix burst timer arm
3516+* event/cnxk: fix SSO cleanup
3517+* event/cnxk: fix timer operations in secondary process
3518+* event/cnxk: wait for CPT flow control on WQE path
3519+* eventdev/crypto: fix enqueue count
3520+* eventdev/crypto: fix failed events
3521+* eventdev/crypto: fix function symbol export
3522+* eventdev/crypto: fix offset used while flushing events
3523+* eventdev/crypto: fix overflow in circular buffer
3524+* eventdev/eth_rx: fix getting adapter instance
3525+* eventdev/eth_tx: fix devices loop
3526+* eventdev: fix memory size for telemetry
3527+* eventdev/timer: fix overflow
3528+* examples/cmdline: fix build with GCC 12
3529+* examples/fips_validation: add extra space in JSON buffer
3530+* examples/fips_validation: fix AES-GCM tests
3531+* examples/fips_validation: fix AES-XTS sequence number
3532+* examples/fips_validation: fix integer parsing
3533+* examples/fips_validation: fix MCT output for SHA
3534+* examples/ipsec-secgw: fix auth IV length
3535+* examples/ipsec-secgw: fix offload variable init
3536+* examples/l2fwd-event: fix worker cleanup
3537+* examples/l3fwd: remove hash entry number
3538+* examples/qos_sched: fix config entries in wrong sections
3539+* examples/qos_sched: fix debug mode
3540+* examples/qos_sched: fix Tx port config when link down
3541+* fbarray: fix metadata dump
3542+* gpudev: export header file for external drivers
3543+* gpudev: fix deadlocks when registering callback
3544+* graph: fix node shrink
3545+* hash: fix GFNI implementation build with GCC 12
3546+* kni: fix build on RHEL 9.1
3547+* kni: fix possible starvation when mbufs are exhausted
3548+* kvargs: add API documentation for process callback
3549+* mem: fix heap ID in telemetry
3550+* mem: fix hugepage info mapping
3551+* mem: fix telemetry data truncation
3552+* mempool: fix telemetry data truncation
3553+* net/bnxt: fix link state change interrupt config
3554+* net/bnxt: fix RSS hash in mbuf
3555+* net/bnxt: fix Rx queue stats after queue stop and start
3556+* net/bnxt: fix Tx queue stats after queue stop and start
3557+* net/cnxk: fix deadlock in security session creation
3558+* net/cnxk: fix LBK BPID usage
3559+* net/cnxk: fix packet type for IPv6 packets post decryption
3560+* net/cnxk: validate RED threshold config
3561+* net/e1000: fix saving of stripped VLAN TCI
3562+* net/ena: fix deadlock in RSS RETA update
3563+* net/gve: fix offloading capability
3564+* net/hns3: add debug info for Rx/Tx dummy function
3565+* net/hns3: add verification of RSS types
3566+* net/hns3: allow adding queue buffer size hash rule
3567+* net/hns3: declare flow rule keeping capability
3568+* net/hns3: extract common functions to set Rx/Tx
3569+* net/hns3: extract common function to query device
3570+* net/hns3: fix burst mode query with dummy function
3571+* net/hns3: fix clearing RSS configuration
3572+* net/hns3: fix config struct used for conversion
3573+* net/hns3: fix duplicate RSS rule check
3574+* net/hns3: fix empty devargs parsing
3575+* net/hns3: fix inaccurate RTC time to read
3576+* net/hns3: fix log about indirection table size
3577+* net/hns3: fix possible truncation of hash key when config
3578+* net/hns3: fix possible truncation of redirection table
3579+* net/hns3: fix RSS key size compatibility
3580+* net/hns3: fix warning on flush or destroy rule
3581+* net/hns3: make getting Tx function static
3582+* net/hns3: refactor set RSS hash algorithm and key interface
3583+* net/hns3: reimplement hash flow function
3584+* net/hns3: remove debug condition for Tx prepare
3585+* net/hns3: remove useless code when destroy valid RSS rule
3586+* net/hns3: save hash algo to RSS filter list node
3587+* net/hns3: separate flow RSS config from RSS conf
3588+* net/hns3: separate setting and clearing RSS rule
3589+* net/hns3: separate setting hash algorithm
3590+* net/hns3: separate setting hash key
3591+* net/hns3: separate setting redirection table
3592+* net/hns3: separate setting RSS types
3593+* net/hns3: separate Tx prepare from getting Tx function
3594+* net/hns3: use hardware config to report hash key
3595+* net/hns3: use hardware config to report hash types
3596+* net/hns3: use hardware config to report redirection table
3597+* net/hns3: use new RSS rule to configure hardware
3598+* net/hns3: use RSS filter list to check duplicated rule
3599+* net/i40e: fix AVX512 fast-free path
3600+* net/i40e: fix MAC loopback on X722
3601+* net/i40e: fix maximum frame size configuration
3602+* net/i40e: fix validation of flow transfer attribute
3603+* net/i40e: reduce interrupt interval in multi-driver mode
3604+* net/i40e: revert link status check on device start
3605+* net/iavf: add lock for VF commands
3606+* net/iavf: fix building data desc
3607+* net/iavf: fix device stop during reset
3608+* net/iavf: fix outer UDP checksum offload
3609+* net/iavf: fix VLAN offload with AVX2
3610+* net/iavf: protect insertion in flow list
3611+* net/ice: fix Rx timestamp
3612+* net/ice: fix validation of flow transfer attribute
3613+* net/idpf: fix driver infos
3614+* net/idpf: fix mbuf leak in split Tx
3615+* net/idpf: reset queue flag when queue is stopped
3616+* net/ipn3ke: fix representor name
3617+* net/ipn3ke: fix thread exit
3618+* net/ixgbe: enable IPv6 mask in flow rules
3619+* net/ixgbe: fix firmware version consistency
3620+* net/ixgbe: fix IPv6 mask in flow director
3621+* net/mana: enable driver by default
3622+* net/mana: fix stats counters
3623+* net/mlx5: check compressed CQE opcode in vectorized Rx
3624+* net/mlx5: fix available tag registers calculation for HWS
3625+* net/mlx5: fix build with GCC 12 and ASan
3626+* net/mlx5: fix CQE dump for Tx
3627+* net/mlx5: fix crash on action template failure
3628+* net/mlx5: fix egress group translation in HWS
3629+* net/mlx5: fix error CQE dumping for vectorized Rx
3630+* net/mlx5: fix flow sample with ConnectX-5
3631+* net/mlx5: fix GENEVE resource overwrite
3632+* net/mlx5: fix hairpin Tx queue reference count
3633+* net/mlx5: fix isolated mode if no representor matching
3634+* net/mlx5: fix read device clock in real time mode
3635+* net/mlx5: fix sysfs port name translation
3636+* net/mlx5: fix wait descriptor opcode for ConnectX-7
3637+* net/mlx5: fix warning for Tx scheduling option
3638+* net/mlx5: fix Windows build with MinGW GCC 12
3639+* net/mlx5/hws: fix error code of send queue action
3640+* net/mlx5/hws: fix IPv4 fragment matching
3641+* net/mlx5/hws: fix memory leak on general pool DB init
3642+* net/mlx5/hws: fix pattern creation
3643+* net/mlx5: ignore non-critical syndromes for Rx queue
3644+* net/nfp: fix 48-bit DMA support for NFDk
3645+* net/nfp: fix firmware name derived from PCI name
3646+* net/nfp: fix getting RSS configuration
3647+* net/nfp: fix max DMA length
3648+* net/nfp: fix MTU configuration order
3649+* net/nfp: fix offload of multiple output actions
3650+* net/nfp: fix set DSCP flow action
3651+* net/nfp: fix set IPv4 flow action
3652+* net/nfp: fix set IPv6 flow action
3653+* net/nfp: fix set MAC flow action
3654+* net/nfp: fix set TP flow action
3655+* net/nfp: fix set TTL flow action
3656+* net/nfp: fix teardown of flows sharing a mask ID
3657+* net/nfp: fix Tx packet drop for large data length
3658+* net/nfp: fix VNI of VXLAN encap action
3659+* net/nfp: restrict flow flush to the port
3660+* net/nfp: store counter reset before zeroing flow query
3661+* net/ngbe: add spinlock protection on YT PHY
3662+* net/ngbe: fix packet type to parse from offload flags
3663+* net/sfc: enforce fate action in transfer flow rules
3664+* net/sfc: export pick transfer proxy callback to representors
3665+* net/sfc: fix MAC address entry leak in transfer flow parsing
3666+* net/sfc: fix resetting mark in tunnel offload switch rules
3667+* net/sfc: invalidate switch port entry on representor unplug
3668+* net/txgbe: fix default signal quality value for KX/KX4
3669+* net/txgbe: fix interrupt loss
3670+* net/txgbe: fix packet type to parse from offload flags
3671+* net/txgbe: fix Rx buffer size in config register
3672+* net/vhost: add missing newline in logs
3673+* net/vhost: fix leak in interrupt handle setup
3674+* net/vhost: fix Rx interrupt
3675+* net/virtio: deduce IP length for TSO checksum
3676+* net/virtio: fix empty devargs parsing
3677+* net/virtio: remove address width limit for modern devices
3678+* net/virtio-user: fix device starting failure handling
3679+* pdump: fix build with GCC 12
3680+* raw/ifpga/base: fix init with multi-process
3681+* raw/skeleton: fix empty devargs parsing
3682+* raw/skeleton: fix selftest
3683+* regex/mlx5: fix doorbell record
3684+* regex/mlx5: utilize all available queue pairs
3685+* reorder: fix sequence number mbuf field register
3686+* reorder: invalidate buffer from ready queue in drain
3687+* ring: silence GCC 12 warnings
3688+* sched: fix alignment of structs in subport
3689+* table: fix action selector group size log2 setting
3690+* telemetry: fix repeat display when callback don't init dict
3691+* telemetry: move include after guard
3692+* test/bbdev: extend HARQ tolerance
3693+* test/bbdev: fix crash for non supported HARQ length
3694+* test/bbdev: remove check for invalid opaque data
3695+* test/crypto: add missing MAC-I to PDCP vectors
3696+* test/crypto: fix capability check for ZUC cipher-auth
3697+* test/crypto: fix skip condition for CPU crypto SGL
3698+* test/crypto: fix statistics error messages
3699+* test/crypto: fix typo in AES test
3700+* test/crypto: fix ZUC digest length in comparison
3701+* test: fix segment length in packet generator
3702+* test/mbuf: fix mbuf reset test
3703+* test/mbuf: fix test with mbuf debug enabled
3704+* test/reorder: fix double free of drained buffers
3705+* vdpa/ifc: fix argument compatibility check
3706+* vdpa/ifc: fix reconnection in SW-assisted live migration
3707+* version: 22.11.2-rc1
3708+* vhost: decrease log level for unimplemented requests
3709+* vhost: fix net header settings in datapath
3710+* vhost: fix OOB access for invalid vhost ID
3711+* vhost: fix possible FD leaks
3712+* vhost: fix possible FD leaks on truncation
3713+* vhost: fix slot index in async split virtqueue Tx
3714+
3715+22.11.2 Validation
3716+~~~~~~~~~~~~~~~~~~
3717+
3718+* Intel(R) Testing
3719+
3720+ * Basic Intel(R) NIC testing
3721+
3722+ * Build & CFLAG compile: cover the build test combination with latest GCC/Clang version and the popular OS revision such as Ubuntu20.04, Ubuntu22.04, Fedora35, Fedora37, RHEL8.6, RHEL8.4, FreeBSD13.1, SUSE15, CentOS7.9, openEuler22.03-SP1 etc.
3723+ * PF(i40e, ixgbe): test scenarios including RTE_FLOW/TSO/Jumboframe/checksum offload/VLAN/VXLAN, etc.
3724+ * VF(i40e, ixgbe): test scenarios including VF-RTE_FLOW/TSO/Jumboframe/checksum offload/VLAN/VXLAN, etc.
3725+ * PF/VF(ice): test scenarios including Switch features/Package Management/Flow Director/Advanced Tx/Advanced RSS/ACL/DCF/Flexible Descriptor, etc.
3726+ * Intel NIC single core/NIC performance: test scenarios including PF/VF single core performance test, etc.
3727+ * IPsec: test scenarios including ipsec/ipsec-gw/ipsec library basic test - QAT&SW/FIB library, etc.
3728+
3729+ * Basic cryptodev and virtio testing
3730+
3731+ * Virtio: both function and performance test are covered. Such as PVP/Virtio_loopback/virtio-user loopback/virtio-net VM2VM perf testing/VMAWARE ESXI 7.0u3, etc.
3732+ * Cryptodev:
3733+
3734+ * Function test: test scenarios including Cryptodev API testing/CompressDev ISA-L/QAT/ZLIB PMD Testing/FIPS, etc.
3735+ * Performance test: test scenarios including Thoughput Performance/Cryptodev Latency, etc.
3736+
3737+* Nvidia(R) Testing
3738+
3739+ * Basic functionality
3740+
3741+ * Tx/Rx, xstats, timestamps, link status, RTE flow, RSS, VLAN, checksum and TSO, ptype...
3742+ * link_status interrupt, l3fwd-power, multi-process.
3743+ * LRO, regEx, buffer split, Tx scheduling.
3744+
3745+ * Build tests
3746+
3747+ * Ubuntu 20.04.6 with MLNX_OFED_LINUX-5.9-0.5.6.0.
3748+ * Ubuntu 20.04.6 with rdma-core master (d2dbc88).
3749+ * Ubuntu 20.04.6 with rdma-core v28.0.
3750+ * Ubuntu 18.04.6 with rdma-core v17.1.
3751+ * Ubuntu 18.04.6 with rdma-core master (d2dbc88) (i386).
3752+ * Fedora 38 with rdma-core v44.0.
3753+ * Fedora 39 (Rawhide) with rdma-core v44.0.
3754+ * CentOS 7 7.9.2009 with rdma-core master (d2dbc88).
3755+ * CentOS 7 7.9.2009 with MLNX_OFED_LINUX-5.9-0.5.6.0.
3756+ * CentOS 8 8.4.2105 with rdma-core master (d2dbc88).
3757+ * OpenSUSE Leap 15.4 with rdma-core v38.1.
3758+ * Windows Server 2019 with Clang 11.0.0.
3759+
3760+ * Test platform
3761+
3762+ * NIC: ConnectX-5 / OS: Ubuntu 20.04 / Kernel: 6.3.0 / Driver: rdma-core v45.0 / Firmware: 16.35.2000
3763+ * NIC: ConnectX-6 Dx / OS: Ubuntu 20.04 / Driver: MLNX_OFED_LINUX-5.9-0.5.6.0 / Firmware: 22.36.1010
3764+ * NIC: ConnectX-7 / OS: Ubuntu 20.04 / Driver: MLNX_OFED_LINUX-5.9-0.5.6.0 / Firmware: 22.36.1010
3765+ * DPU: BlueField-2 / DOCA SW version: 1.5.1 / Firmware: 24.35.2000
3766+
3767+22.11.2 Known Issues
3768+~~~~~~~~~~~~~~~~~~~~
3769+
3770+
3771diff --git a/doc/guides/sample_app_ug/l2_forward_cat.rst b/doc/guides/sample_app_ug/l2_forward_cat.rst
3772index 3ada357..51621b6 100644
3773--- a/doc/guides/sample_app_ug/l2_forward_cat.rst
3774+++ b/doc/guides/sample_app_ug/l2_forward_cat.rst
3775@@ -50,13 +50,12 @@ Compiling the Application
3776 * https://github.com/01org/intel-cmt-cat
3777
3778
3779-#. To compile the application export the path to PQoS lib
3780- and the DPDK source tree and go to the example directory:
3781+To compile the application, export the path to PQoS lib:
3782
3783- .. code-block:: console
3784-
3785- export PQOS_INSTALL_PATH=/path/to/libpqos
3786+.. code-block:: console
3787
3788+ export CFLAGS=-I/path/to/intel-cmt-cat/include
3789+ export LDFLAGS=-L/path/to/intel-cmt-cat/lib
3790
3791 To compile the sample application see :doc:`compiling`.
3792
3793diff --git a/doc/guides/sample_app_ug/l3_forward.rst b/doc/guides/sample_app_ug/l3_forward.rst
3794index 94b22da..1cc2c1d 100644
3795--- a/doc/guides/sample_app_ug/l3_forward.rst
3796+++ b/doc/guides/sample_app_ug/l3_forward.rst
3797@@ -56,9 +56,8 @@ for the IPv4/IPv6 5-tuple syntax specifically.
3798 The 5-tuple syntax consists of a source IP address, a destination IP address,
3799 a source port, a destination port and a protocol identifier.
3800
3801-In the sample application, hash-based, FIB-based and ACL-based forwarding supports
3802+In the sample application, hash-based, LPM-based, FIB-based and ACL-based forwarding supports
3803 both IPv4 and IPv6.
3804-LPM-based forwarding supports IPv4 only.
3805 During the initialization phase route rules for IPv4 and IPv6 are read from rule files.
3806
3807 Compiling the Application
3808diff --git a/doc/guides/sample_app_ug/pipeline.rst b/doc/guides/sample_app_ug/pipeline.rst
3809index 49d5013..7c86bf4 100644
3810--- a/doc/guides/sample_app_ug/pipeline.rst
3811+++ b/doc/guides/sample_app_ug/pipeline.rst
3812@@ -58,7 +58,7 @@ The following is an example command to run the application configured for the VX
3813
3814 .. code-block:: console
3815
3816- $ ./<build_dir>/examples/dpdk-pipeline -c 0x3 -- -s examples/vxlan.cli
3817+ $ ./<build_dir>/examples/dpdk-pipeline -c 0x3 -- -s examples/pipeline/examples/vxlan.cli
3818
3819 The application should start successfully and display as follows:
3820
3821diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
3822index ba8247d..7757db8 100644
3823--- a/drivers/baseband/acc/rte_acc100_pmd.c
3824+++ b/drivers/baseband/acc/rte_acc100_pmd.c
3825@@ -622,6 +622,7 @@ acc100_dev_close(struct rte_bbdev *dev)
3826 rte_free(d->tail_ptrs);
3827 rte_free(d->info_ring);
3828 rte_free(d->sw_rings_base);
3829+ rte_free(d->harq_layout);
3830 d->sw_rings_base = NULL;
3831 d->tail_ptrs = NULL;
3832 d->info_ring = NULL;
3833@@ -663,7 +664,7 @@ acc100_find_free_queue_idx(struct rte_bbdev *dev,
3834 for (aq_idx = 0; aq_idx < qtop->num_aqs_per_groups; aq_idx++) {
3835 if (((d->q_assigned_bit_map[group_idx] >> aq_idx) & 0x1) == 0) {
3836 /* Mark the Queue as assigned */
3837- d->q_assigned_bit_map[group_idx] |= (1 << aq_idx);
3838+ d->q_assigned_bit_map[group_idx] |= (1ULL << aq_idx);
3839 /* Report the AQ Index */
3840 return (group_idx << ACC100_GRP_ID_SHIFT) + aq_idx;
3841 }
3842@@ -3422,9 +3423,9 @@ acc100_enqueue_ldpc_enc_cb(struct rte_bbdev_queue_data *q_data,
3843 }
3844 avail--;
3845 enq = RTE_MIN(left, ACC_MUX_5GDL_DESC);
3846- if (check_mux(&ops[i], enq)) {
3847- ret = enqueue_ldpc_enc_n_op_cb(q, &ops[i],
3848- desc_idx, enq);
3849+ enq = check_mux(&ops[i], enq);
3850+ if (enq > 1) {
3851+ ret = enqueue_ldpc_enc_n_op_cb(q, &ops[i], desc_idx, enq);
3852 if (ret < 0) {
3853 acc_enqueue_invalid(q_data);
3854 break;
3855@@ -4034,8 +4035,12 @@ dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
3856 /* CRC invalid if error exists */
3857 if (!op->status)
3858 op->status |= rsp.crc_status << RTE_BBDEV_CRC_ERROR;
3859- op->turbo_dec.iter_count = RTE_MAX((uint8_t) rsp.iter_cnt,
3860- op->turbo_dec.iter_count);
3861+ if (q->op_type == RTE_BBDEV_OP_LDPC_DEC)
3862+ op->ldpc_dec.iter_count = RTE_MAX((uint8_t) rsp.iter_cnt,
3863+ op->ldpc_dec.iter_count);
3864+ else
3865+ op->turbo_dec.iter_count = RTE_MAX((uint8_t) rsp.iter_cnt,
3866+ op->turbo_dec.iter_count);
3867
3868 /* Check if this is the last desc in batch (Atomic Queue) */
3869 if (desc->req.last_desc_in_batch) {
3870@@ -4119,8 +4124,6 @@ acc100_dequeue_ldpc_enc(struct rte_bbdev_queue_data *q_data,
3871 struct rte_bbdev_enc_op *op;
3872 union acc_dma_desc *desc;
3873
3874- if (q == NULL)
3875- return 0;
3876 #ifdef RTE_LIBRTE_BBDEV_DEBUG
3877 if (unlikely(ops == 0))
3878 return 0;
3879diff --git a/drivers/baseband/acc/rte_acc200_pmd.c b/drivers/baseband/acc/rte_acc200_pmd.c
3880index c5123cf..b25a83a 100644
3881--- a/drivers/baseband/acc/rte_acc200_pmd.c
3882+++ b/drivers/baseband/acc/rte_acc200_pmd.c
3883@@ -1848,6 +1848,9 @@ enqueue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
3884 r = op->turbo_enc.tb_params.r;
3885
3886 while (mbuf_total_left > 0 && r < c) {
3887+ if (unlikely((input == NULL) || (output == NULL)))
3888+ return -1;
3889+
3890 seg_total_left = rte_pktmbuf_data_len(input) - in_offset;
3891 /* Set up DMA descriptor */
3892 desc = acc_desc(q, total_enqueued_cbs);
3893@@ -1882,6 +1885,10 @@ enqueue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op *op,
3894 r++;
3895 }
3896
3897+ /* In case the number of CB doesn't match, the configuration was invalid. */
3898+ if (unlikely(current_enqueued_cbs != cbs_in_tb))
3899+ return -1;
3900+
3901 /* Set SDone on last CB descriptor for TB mode. */
3902 desc->req.sdone_enable = 1;
3903
3904@@ -2079,6 +2086,10 @@ enqueue_ldpc_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
3905 }
3906 }
3907
3908+ if (op->ldpc_dec.soft_output.length > 0)
3909+ mbuf_append(op->ldpc_dec.soft_output.data, op->ldpc_dec.soft_output.data,
3910+ op->ldpc_dec.soft_output.length);
3911+
3912 #ifdef RTE_LIBRTE_BBDEV_DEBUG
3913 rte_memdump(stderr, "FCW", &desc->req.fcw_ld,
3914 sizeof(desc->req.fcw_ld) - 8);
3915@@ -2128,6 +2139,9 @@ enqueue_ldpc_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
3916 }
3917
3918 while (mbuf_total_left > 0 && r < c) {
3919+ if (unlikely((input == NULL) || (h_output == NULL)))
3920+ return -1;
3921+
3922 if (check_bit(op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_DEC_SCATTER_GATHER))
3923 seg_total_left = rte_pktmbuf_data_len(input) - in_offset;
3924 else
3925@@ -2173,6 +2187,10 @@ enqueue_ldpc_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
3926 r++;
3927 }
3928
3929+ /* In case the number of CB doesn't match, the configuration was invalid. */
3930+ if (unlikely(current_enqueued_cbs != cbs_in_tb))
3931+ return -1;
3932+
3933 #ifdef RTE_LIBRTE_BBDEV_DEBUG
3934 if (check_mbuf_total_left(mbuf_total_left) != 0)
3935 return -EINVAL;
3936@@ -2215,6 +2233,8 @@ enqueue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
3937 r = op->turbo_dec.tb_params.r;
3938
3939 while (mbuf_total_left > 0 && r < c) {
3940+ if (unlikely((input == NULL) || (h_output == NULL)))
3941+ return -1;
3942
3943 seg_total_left = rte_pktmbuf_data_len(input) - in_offset;
3944
3945@@ -2265,6 +2285,10 @@ enqueue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
3946 r++;
3947 }
3948
3949+ /* In case the number of CB doesn't match, the configuration was invalid. */
3950+ if (unlikely(current_enqueued_cbs != cbs_in_tb))
3951+ return -1;
3952+
3953 /* Set SDone on last CB descriptor for TB mode */
3954 desc->req.sdone_enable = 1;
3955
3956@@ -2636,7 +2660,8 @@ acc200_enqueue_ldpc_dec(struct rte_bbdev_queue_data *q_data,
3957 /* Dequeue one encode operations from ACC200 device in CB mode. */
3958 static inline int
3959 dequeue_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
3960- uint16_t *dequeued_ops, uint32_t *aq_dequeued, uint16_t *dequeued_descs)
3961+ uint16_t *dequeued_ops, uint32_t *aq_dequeued, uint16_t *dequeued_descs,
3962+ uint16_t max_requested_ops)
3963 {
3964 union acc_dma_desc *desc, atom_desc;
3965 union acc_dma_rsp_desc rsp;
3966@@ -2649,6 +2674,9 @@ dequeue_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
3967 desc = q->ring_addr + desc_idx;
3968 atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc, __ATOMIC_RELAXED);
3969
3970+ if (*dequeued_ops + desc->req.numCBs > max_requested_ops)
3971+ return -1;
3972+
3973 /* Check fdone bit. */
3974 if (!(atom_desc.rsp.val & ACC_FDONE))
3975 return -1;
3976@@ -2690,7 +2718,7 @@ dequeue_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
3977 static inline int
3978 dequeue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
3979 uint16_t *dequeued_ops, uint32_t *aq_dequeued,
3980- uint16_t *dequeued_descs)
3981+ uint16_t *dequeued_descs, uint16_t max_requested_ops)
3982 {
3983 union acc_dma_desc *desc, *last_desc, atom_desc;
3984 union acc_dma_rsp_desc rsp;
3985@@ -2701,6 +2729,9 @@ dequeue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
3986 desc = acc_desc_tail(q, *dequeued_descs);
3987 atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc, __ATOMIC_RELAXED);
3988
3989+ if (*dequeued_ops + 1 > max_requested_ops)
3990+ return -1;
3991+
3992 /* Check fdone bit. */
3993 if (!(atom_desc.rsp.val & ACC_FDONE))
3994 return -1;
3995@@ -2864,7 +2895,7 @@ dequeue_ldpc_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
3996 return 1;
3997 }
3998
3999-/* Dequeue one decode operations from ACC200 device in TB mode. */
4000+/* Dequeue one decode operations from device in TB mode for 4G or 5G. */
4001 static inline int
4002 dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
4003 uint16_t dequeued_cbs, uint32_t *aq_dequeued)
4004@@ -2918,8 +2949,12 @@ dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
4005 /* CRC invalid if error exists. */
4006 if (!op->status)
4007 op->status |= rsp.crc_status << RTE_BBDEV_CRC_ERROR;
4008- op->turbo_dec.iter_count = RTE_MAX((uint8_t) rsp.iter_cnt,
4009- op->turbo_dec.iter_count);
4010+ if (q->op_type == RTE_BBDEV_OP_LDPC_DEC)
4011+ op->ldpc_dec.iter_count = RTE_MAX((uint8_t) rsp.iter_cnt,
4012+ op->ldpc_dec.iter_count);
4013+ else
4014+ op->turbo_dec.iter_count = RTE_MAX((uint8_t) rsp.iter_cnt,
4015+ op->turbo_dec.iter_count);
4016
4017 /* Check if this is the last desc in batch (Atomic Queue). */
4018 if (desc->req.last_desc_in_batch) {
4019@@ -2961,25 +2996,23 @@ acc200_dequeue_enc(struct rte_bbdev_queue_data *q_data,
4020
4021 cbm = op->turbo_enc.code_block_mode;
4022
4023- for (i = 0; i < num; i++) {
4024+ for (i = 0; i < avail; i++) {
4025 if (cbm == RTE_BBDEV_TRANSPORT_BLOCK)
4026 ret = dequeue_enc_one_op_tb(q, &ops[dequeued_ops],
4027 &dequeued_ops, &aq_dequeued,
4028- &dequeued_descs);
4029+ &dequeued_descs, num);
4030 else
4031 ret = dequeue_enc_one_op_cb(q, &ops[dequeued_ops],
4032 &dequeued_ops, &aq_dequeued,
4033- &dequeued_descs);
4034+ &dequeued_descs, num);
4035 if (ret < 0)
4036 break;
4037- if (dequeued_ops >= num)
4038- break;
4039 }
4040
4041 q->aq_dequeued += aq_dequeued;
4042 q->sw_ring_tail += dequeued_descs;
4043
4044- /* Update enqueue stats */
4045+ /* Update enqueue stats. */
4046 q_data->queue_stats.dequeued_count += dequeued_ops;
4047
4048 return dequeued_ops;
4049@@ -3005,15 +3038,13 @@ acc200_dequeue_ldpc_enc(struct rte_bbdev_queue_data *q_data,
4050 if (cbm == RTE_BBDEV_TRANSPORT_BLOCK)
4051 ret = dequeue_enc_one_op_tb(q, &ops[dequeued_ops],
4052 &dequeued_ops, &aq_dequeued,
4053- &dequeued_descs);
4054+ &dequeued_descs, num);
4055 else
4056 ret = dequeue_enc_one_op_cb(q, &ops[dequeued_ops],
4057 &dequeued_ops, &aq_dequeued,
4058- &dequeued_descs);
4059+ &dequeued_descs, num);
4060 if (ret < 0)
4061 break;
4062- if (dequeued_ops >= num)
4063- break;
4064 }
4065
4066 q->aq_dequeued += aq_dequeued;
4067diff --git a/drivers/baseband/turbo_sw/meson.build b/drivers/baseband/turbo_sw/meson.build
4068index 417ec63..aeb9a76 100644
4069--- a/drivers/baseband/turbo_sw/meson.build
4070+++ b/drivers/baseband/turbo_sw/meson.build
4071@@ -6,11 +6,11 @@ dep_turbo = dependency('flexran_sdk_turbo', required: false)
4072 dep_dec5g = dependency('flexran_sdk_ldpc_decoder_5gnr', required: false)
4073
4074 if dep_turbo.found()
4075- ext_deps += cc.find_library('libstdc++', required: true)
4076- ext_deps += cc.find_library('libirc', required: true)
4077- ext_deps += cc.find_library('libimf', required: true)
4078- ext_deps += cc.find_library('libipps', required: true)
4079- ext_deps += cc.find_library('libsvml', required: true)
4080+ ext_deps += cc.find_library('stdc++', required: true)
4081+ ext_deps += cc.find_library('irc', required: true)
4082+ ext_deps += cc.find_library('imf', required: true)
4083+ ext_deps += cc.find_library('ipps', required: true)
4084+ ext_deps += cc.find_library('svml', required: true)
4085 ext_deps += dep_turbo
4086 ext_deps += dependency('flexran_sdk_crc', required: true)
4087 ext_deps += dependency('flexran_sdk_rate_matching', required: true)
4088diff --git a/drivers/bus/fslmc/mc/mc_sys.c b/drivers/bus/fslmc/mc/mc_sys.c
4089index ab9a074..76fdcd5 100644
4090--- a/drivers/bus/fslmc/mc/mc_sys.c
4091+++ b/drivers/bus/fslmc/mc/mc_sys.c
4092@@ -77,8 +77,11 @@ int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd)
4093 total_time = rte_get_timer_cycles() - start_time;
4094 } while (status == MC_CMD_STATUS_READY && total_time <= time_to_wait);
4095
4096- if (status == MC_CMD_STATUS_READY)
4097+ if (status == MC_CMD_STATUS_READY) {
4098+ rte_spinlock_unlock(&mc_portal_lock);
4099+
4100 return mc_status_to_error(MC_CMD_STATUS_TIMEOUT);
4101+ }
4102
4103 /* Read the response back into the command buffer */
4104 mc_read_response(mc_io->regs, cmd);
4105diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
4106index bb943b5..07e316b 100644
4107--- a/drivers/bus/ifpga/ifpga_bus.c
4108+++ b/drivers/bus/ifpga/ifpga_bus.c
4109@@ -135,6 +135,8 @@ ifpga_scan_one(struct rte_rawdev *rawdev,
4110 goto end;
4111 }
4112 afu_pr_conf.pr_enable = 1;
4113+ strlcpy(afu_pr_conf.bs_path, path,
4114+ sizeof(afu_pr_conf.bs_path));
4115 } else {
4116 afu_pr_conf.pr_enable = 0;
4117 }
4118@@ -174,7 +176,6 @@ ifpga_scan_one(struct rte_rawdev *rawdev,
4119 rawdev->dev_ops->dev_start(rawdev))
4120 goto end;
4121
4122- strlcpy(afu_pr_conf.bs_path, path, sizeof(afu_pr_conf.bs_path));
4123 if (rawdev->dev_ops &&
4124 rawdev->dev_ops->firmware_load &&
4125 rawdev->dev_ops->firmware_load(rawdev,
4126diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
4127index bc3a7f3..e32a9d5 100644
4128--- a/drivers/bus/pci/pci_common.c
4129+++ b/drivers/bus/pci/pci_common.c
4130@@ -448,7 +448,7 @@ pci_cleanup(void)
4131 int ret = 0;
4132
4133 if (drv == NULL || drv->remove == NULL)
4134- continue;
4135+ goto free;
4136
4137 ret = drv->remove(dev);
4138 if (ret < 0) {
4139@@ -458,6 +458,7 @@ pci_cleanup(void)
4140 dev->driver = NULL;
4141 dev->device.driver = NULL;
4142
4143+free:
4144 /* free interrupt handles */
4145 rte_intr_instance_free(dev->intr_handle);
4146 dev->intr_handle = NULL;
4147diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
4148index 41bc07d..7974b27 100644
4149--- a/drivers/bus/vdev/vdev.c
4150+++ b/drivers/bus/vdev/vdev.c
4151@@ -578,18 +578,19 @@ vdev_cleanup(void)
4152 int ret = 0;
4153
4154 if (dev->device.driver == NULL)
4155- continue;
4156+ goto free;
4157
4158 drv = container_of(dev->device.driver, const struct rte_vdev_driver, driver);
4159
4160 if (drv->remove == NULL)
4161- continue;
4162+ goto free;
4163
4164 ret = drv->remove(dev);
4165 if (ret < 0)
4166 error = -1;
4167
4168 dev->device.driver = NULL;
4169+free:
4170 free(dev);
4171 }
4172
4173diff --git a/drivers/common/cnxk/roc_io.h b/drivers/common/cnxk/roc_io.h
4174index 13f98ed..45cbb4e 100644
4175--- a/drivers/common/cnxk/roc_io.h
4176+++ b/drivers/common/cnxk/roc_io.h
4177@@ -125,7 +125,8 @@ roc_lmt_submit_ldeor(plt_iova_t io_address)
4178
4179 asm volatile(PLT_CPU_FEATURE_PREAMBLE "ldeor xzr, %x[rf], [%[rs]]"
4180 : [rf] "=r"(result)
4181- : [rs] "r"(io_address));
4182+ : [rs] "r"(io_address)
4183+ : "memory");
4184 return result;
4185 }
4186
4187@@ -136,7 +137,8 @@ roc_lmt_submit_ldeorl(plt_iova_t io_address)
4188
4189 asm volatile(PLT_CPU_FEATURE_PREAMBLE "ldeorl xzr,%x[rf],[%[rs]]"
4190 : [rf] "=r"(result)
4191- : [rs] "r"(io_address));
4192+ : [rs] "r"(io_address)
4193+ : "memory");
4194 return result;
4195 }
4196
4197@@ -145,7 +147,8 @@ roc_lmt_submit_steor(uint64_t data, plt_iova_t io_address)
4198 {
4199 asm volatile(PLT_CPU_FEATURE_PREAMBLE
4200 "steor %x[d], [%[rs]]" ::[d] "r"(data),
4201- [rs] "r"(io_address));
4202+ [rs] "r"(io_address)
4203+ : "memory");
4204 }
4205
4206 static __plt_always_inline void
4207@@ -153,7 +156,8 @@ roc_lmt_submit_steorl(uint64_t data, plt_iova_t io_address)
4208 {
4209 asm volatile(PLT_CPU_FEATURE_PREAMBLE
4210 "steorl %x[d], [%[rs]]" ::[d] "r"(data),
4211- [rs] "r"(io_address));
4212+ [rs] "r"(io_address)
4213+ : "memory");
4214 }
4215
4216 static __plt_always_inline void
4217diff --git a/drivers/common/cnxk/roc_mbox.h b/drivers/common/cnxk/roc_mbox.h
4218index 8b0384c..fd9d3e7 100644
4219--- a/drivers/common/cnxk/roc_mbox.h
4220+++ b/drivers/common/cnxk/roc_mbox.h
4221@@ -1169,7 +1169,7 @@ struct nix_bp_cfg_req {
4222 * so maximum 256 channels are possible.
4223 */
4224 #define NIX_MAX_CHAN 256
4225-#define NIX_CGX_MAX_CHAN 16
4226+#define NIX_CGX_MAX_CHAN 8
4227 #define NIX_LBK_MAX_CHAN 1
4228 struct nix_bp_cfg_rsp {
4229 struct mbox_msghdr hdr;
4230diff --git a/drivers/common/cnxk/roc_nix_inl_dev.c b/drivers/common/cnxk/roc_nix_inl_dev.c
4231index c3d94dd..4ab4209 100644
4232--- a/drivers/common/cnxk/roc_nix_inl_dev.c
4233+++ b/drivers/common/cnxk/roc_nix_inl_dev.c
4234@@ -265,7 +265,7 @@ nix_inl_sso_setup(struct nix_inl_dev *inl_dev)
4235 }
4236
4237 /* Setup xaq for hwgrps */
4238- rc = sso_hwgrp_alloc_xaq(dev, inl_dev->xaq.aura_handle, 1);
4239+ rc = sso_hwgrp_alloc_xaq(dev, roc_npa_aura_handle_to_aura(inl_dev->xaq.aura_handle), 1);
4240 if (rc) {
4241 plt_err("Failed to setup hwgrp xaq aura, rc=%d", rc);
4242 goto destroy_pool;
4243diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c
4244index b38389b..bf7fb90 100644
4245--- a/drivers/common/cnxk/roc_npc.c
4246+++ b/drivers/common/cnxk/roc_npc.c
4247@@ -1263,8 +1263,13 @@ roc_npc_flow_create(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,
4248 /* By default set the channel and mask to cover
4249 * the whole SDP channel range.
4250 */
4251- npc->sdp_channel = (uint16_t)NIX_CHAN_SDP_CH_START;
4252- npc->sdp_channel_mask = (uint16_t)NIX_CHAN_SDP_CH_START;
4253+ if (roc_model_is_cn10k()) {
4254+ npc->sdp_channel = (uint16_t)CN10K_SDP_CH_START;
4255+ npc->sdp_channel_mask = (uint16_t)CN10K_SDP_CH_MASK;
4256+ } else {
4257+ npc->sdp_channel = (uint16_t)NIX_CHAN_SDP_CH_START;
4258+ npc->sdp_channel_mask = (uint16_t)NIX_CHAN_SDP_CH_START;
4259+ }
4260 }
4261 }
4262
4263diff --git a/drivers/common/cnxk/roc_npc.h b/drivers/common/cnxk/roc_npc.h
4264index 1b4e552..60f9c5d 100644
4265--- a/drivers/common/cnxk/roc_npc.h
4266+++ b/drivers/common/cnxk/roc_npc.h
4267@@ -123,6 +123,17 @@ struct roc_ipv6_hdr {
4268 uint8_t dst_addr[16]; /**< IP address of destination host(s). */
4269 } __plt_packed;
4270
4271+struct roc_ipv6_fragment_ext {
4272+ uint8_t next_header; /**< Next header type */
4273+ uint8_t reserved; /**< Reserved */
4274+ uint16_t frag_data; /**< All fragmentation data */
4275+ uint32_t id; /**< Packet ID */
4276+} __plt_packed;
4277+
4278+struct roc_flow_item_ipv6_ext {
4279+ uint8_t next_hdr; /**< Next header. */
4280+};
4281+
4282 struct roc_npc_flow_item_ipv6 {
4283 struct roc_ipv6_hdr hdr; /**< IPv6 header definition. */
4284 uint32_t has_hop_ext : 1;
4285diff --git a/drivers/common/cnxk/roc_npc_mcam.c b/drivers/common/cnxk/roc_npc_mcam.c
4286index a725cab..3bf35cd 100644
4287--- a/drivers/common/cnxk/roc_npc_mcam.c
4288+++ b/drivers/common/cnxk/roc_npc_mcam.c
4289@@ -551,6 +551,8 @@ npc_mcam_alloc_and_write(struct npc *npc, struct roc_npc_flow *flow,
4290 struct idev_cfg *idev;
4291 uint16_t pf_func = 0;
4292 uint16_t ctr = ~(0);
4293+ uint32_t la_offset;
4294+ uint64_t mask;
4295 int rc, idx;
4296 int entry;
4297
4298@@ -617,17 +619,42 @@ npc_mcam_alloc_and_write(struct npc *npc, struct roc_npc_flow *flow,
4299 flow->npc_action &= ~(GENMASK(19, 4));
4300 flow->npc_action |= (uint64_t)pf_func << 4;
4301
4302- npc_mcam_set_channel(flow, req, inl_dev->channel,
4303- inl_dev->chan_mask, false);
4304+ npc_mcam_set_channel(flow, req, inl_dev->channel, inl_dev->chan_mask,
4305+ false);
4306 } else if (npc->is_sdp_link) {
4307- npc_mcam_set_channel(flow, req, npc->sdp_channel,
4308- npc->sdp_channel_mask,
4309+ npc_mcam_set_channel(flow, req, npc->sdp_channel, npc->sdp_channel_mask,
4310 pst->is_second_pass_rule);
4311 } else {
4312- npc_mcam_set_channel(flow, req, npc->channel,
4313- (BIT_ULL(12) - 1),
4314+ npc_mcam_set_channel(flow, req, npc->channel, (BIT_ULL(12) - 1),
4315 pst->is_second_pass_rule);
4316 }
4317+ /*
4318+ * For second pass rule, set LA LTYPE to CPT_HDR.
4319+ * For all other rules, set LA LTYPE to match both 1st pass and 2nd pass ltypes.
4320+ */
4321+ if (pst->is_second_pass_rule || (!pst->is_second_pass_rule && pst->has_eth_type)) {
4322+ la_offset = __builtin_popcount(npc->keyx_supp_nmask[flow->nix_intf] &
4323+ ((1ULL << 9 /* LA offset */) - 1));
4324+ la_offset *= 4;
4325+
4326+ mask = ~((0xfULL << la_offset));
4327+ req->entry_data.kw[0] &= mask;
4328+ req->entry_data.kw_mask[0] &= mask;
4329+ flow->mcam_data[0] &= mask;
4330+ flow->mcam_mask[0] &= mask;
4331+ if (pst->is_second_pass_rule) {
4332+ req->entry_data.kw[0] |= ((uint64_t)NPC_LT_LA_CPT_HDR) << la_offset;
4333+ req->entry_data.kw_mask[0] |= (0xFULL << la_offset);
4334+ flow->mcam_data[0] |= ((uint64_t)NPC_LT_LA_CPT_HDR) << la_offset;
4335+ flow->mcam_mask[0] |= (0xFULL << la_offset);
4336+ } else {
4337+ /* Mask ltype ETHER (0x2) and CPT_HDR (0xa) */
4338+ req->entry_data.kw[0] |= (0x2ULL << la_offset);
4339+ req->entry_data.kw_mask[0] |= (0x7ULL << la_offset);
4340+ flow->mcam_data[0] |= (0x2ULL << la_offset);
4341+ flow->mcam_mask[0] |= (0x7ULL << la_offset);
4342+ }
4343+ }
4344 } else {
4345 uint16_t pf_func = (flow->npc_action >> 4) & 0xffff;
4346
4347@@ -701,15 +728,16 @@ npc_set_ipv6ext_ltype_mask(struct npc_parse_state *pst)
4348 * because for AH and ESP, LC LFLAG is zero and we don't want to match
4349 * zero in LFLAG.
4350 */
4351- lcflag_offset =
4352- __builtin_popcount(pst->npc->keyx_supp_nmask[pst->nix_intf] &
4353- ((1ULL << NPC_LFLAG_LC_OFFSET) - 1));
4354- lcflag_offset *= 4;
4355-
4356- mask = (0xfULL << lcflag_offset);
4357- val = pst->flow->mcam_data[0] & mask;
4358- if (val)
4359- pst->flow->mcam_mask[0] |= mask;
4360+ if (pst->npc->keyx_supp_nmask[pst->nix_intf] & (1ULL << NPC_LFLAG_LC_OFFSET)) {
4361+ lcflag_offset = __builtin_popcount(pst->npc->keyx_supp_nmask[pst->nix_intf] &
4362+ ((1ULL << NPC_LFLAG_LC_OFFSET) - 1));
4363+ lcflag_offset *= 4;
4364+
4365+ mask = (0xfULL << lcflag_offset);
4366+ val = pst->flow->mcam_data[0] & mask;
4367+ if (val)
4368+ pst->flow->mcam_mask[0] |= mask;
4369+ }
4370 }
4371
4372 int
4373diff --git a/drivers/common/cnxk/roc_npc_mcam_dump.c b/drivers/common/cnxk/roc_npc_mcam_dump.c
4374index fe57811..cc1599e 100644
4375--- a/drivers/common/cnxk/roc_npc_mcam_dump.c
4376+++ b/drivers/common/cnxk/roc_npc_mcam_dump.c
4377@@ -69,8 +69,10 @@ static const char *const ltype_str[NPC_MAX_LID][NPC_MAX_LT] = {
4378 [NPC_LID_LA][NPC_LT_LA_IH_NIX_ETHER] = "LA_IH_NIX_ETHER",
4379 [NPC_LID_LA][NPC_LT_LA_HIGIG2_ETHER] = "LA_HIGIG2_ETHER",
4380 [NPC_LID_LA][NPC_LT_LA_IH_NIX_HIGIG2_ETHER] = "LA_IH_NIX_HIGIG2_ETHER",
4381- [NPC_LID_LA][NPC_LT_LA_CUSTOM_PRE_L2_ETHER] =
4382- "NPC_LT_LA_CUSTOM_PRE_L2_ETHER",
4383+ [NPC_LID_LA][NPC_LT_LA_CUSTOM_L2_90B_ETHER] = "LA_CUSTOM_L2_90B_ETHER",
4384+ [NPC_LID_LA][NPC_LT_LA_CPT_HDR] = "LA_CPT_HDR",
4385+ [NPC_LID_LA][NPC_LT_LA_CUSTOM_L2_24B_ETHER] = "LA_CUSTOM_L2_24B_ETHER",
4386+ [NPC_LID_LA][NPC_LT_LA_CUSTOM_PRE_L2_ETHER] = "NPC_LT_LA_CUSTOM_PRE_L2_ETHER",
4387 [NPC_LID_LB][0] = "NONE",
4388 [NPC_LID_LB][NPC_LT_LB_CTAG] = "LB_CTAG",
4389 [NPC_LID_LB][NPC_LT_LB_STAG_QINQ] = "LB_STAG_QINQ",
4390diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c
4391index ff00c74..50e6631 100644
4392--- a/drivers/common/cnxk/roc_npc_parse.c
4393+++ b/drivers/common/cnxk/roc_npc_parse.c
4394@@ -193,6 +193,7 @@ npc_parse_la(struct npc_parse_state *pst)
4395 if (pst->pattern->type != ROC_NPC_ITEM_TYPE_ETH)
4396 return 0;
4397
4398+ pst->has_eth_type = true;
4399 eth_item = pst->pattern->spec;
4400
4401 lid = NPC_LID_LA;
4402@@ -238,10 +239,185 @@ npc_parse_la(struct npc_parse_state *pst)
4403
4404 #define NPC_MAX_SUPPORTED_VLANS 3
4405
4406+static int
4407+npc_parse_vlan_count(const struct roc_npc_item_info *pattern,
4408+ const struct roc_npc_item_info **pattern_list,
4409+ const struct roc_npc_flow_item_vlan **vlan_items, int *vlan_count)
4410+{
4411+ *vlan_count = 0;
4412+ while (pattern->type == ROC_NPC_ITEM_TYPE_VLAN) {
4413+ if (*vlan_count > NPC_MAX_SUPPORTED_VLANS - 1)
4414+ return NPC_ERR_PATTERN_NOTSUP;
4415+
4416+ /* Don't support ranges */
4417+ if (pattern->last != NULL)
4418+ return NPC_ERR_INVALID_RANGE;
4419+
4420+ /* If spec is NULL, both mask and last must be NULL, this
4421+ * makes it to match ANY value (eq to mask = 0).
4422+ * Setting either mask or last without spec is an error
4423+ */
4424+ if (pattern->spec == NULL) {
4425+ if (pattern->last != NULL && pattern->mask != NULL)
4426+ return NPC_ERR_INVALID_SPEC;
4427+ }
4428+
4429+ pattern_list[*vlan_count] = pattern;
4430+ vlan_items[*vlan_count] = pattern->spec;
4431+ (*vlan_count)++;
4432+
4433+ pattern++;
4434+ pattern = npc_parse_skip_void_and_any_items(pattern);
4435+ }
4436+
4437+ return 0;
4438+}
4439+
4440+static int
4441+npc_parse_vlan_ltype_get(struct npc_parse_state *pst,
4442+ const struct roc_npc_flow_item_vlan **vlan_item, int vlan_count,
4443+ int *ltype, int *lflags)
4444+{
4445+ switch (vlan_count) {
4446+ case 1:
4447+ *ltype = NPC_LT_LB_CTAG;
4448+ if (vlan_item[0] && vlan_item[0]->has_more_vlan)
4449+ *ltype = NPC_LT_LB_STAG_QINQ;
4450+ break;
4451+ case 2:
4452+ if (vlan_item[1] && vlan_item[1]->has_more_vlan) {
4453+ if (!(pst->npc->keyx_supp_nmask[pst->nix_intf] &
4454+ 0x3ULL << NPC_LFLAG_LB_OFFSET))
4455+ return NPC_ERR_PATTERN_NOTSUP;
4456+
4457+ /* This lflag value will match either one of
4458+ * NPC_F_LB_L_WITH_STAG_STAG,
4459+ * NPC_F_LB_L_WITH_QINQ_CTAG,
4460+ * NPC_F_LB_L_WITH_QINQ_QINQ and
4461+ * NPC_F_LB_L_WITH_ITAG (0b0100 to 0b0111). For
4462+ * NPC_F_LB_L_WITH_ITAG, ltype is NPC_LT_LB_ETAG
4463+ * hence will not match.
4464+ */
4465+
4466+ *lflags = NPC_F_LB_L_WITH_QINQ_CTAG & NPC_F_LB_L_WITH_QINQ_QINQ &
4467+ NPC_F_LB_L_WITH_STAG_STAG;
4468+ }
4469+ *ltype = NPC_LT_LB_STAG_QINQ;
4470+ break;
4471+ case 3:
4472+ if (vlan_item[2] && vlan_item[2]->has_more_vlan)
4473+ return NPC_ERR_PATTERN_NOTSUP;
4474+ if (!(pst->npc->keyx_supp_nmask[pst->nix_intf] & 0x3ULL << NPC_LFLAG_LB_OFFSET))
4475+ return NPC_ERR_PATTERN_NOTSUP;
4476+ *ltype = NPC_LT_LB_STAG_QINQ;
4477+ *lflags = NPC_F_STAG_STAG_CTAG;
4478+ break;
4479+ default:
4480+ return NPC_ERR_PATTERN_NOTSUP;
4481+ }
4482+
4483+ return 0;
4484+}
4485+
4486+static int
4487+npc_update_vlan_parse_state(struct npc_parse_state *pst, const struct roc_npc_item_info *pattern,
4488+ int lid, int lt, uint8_t lflags, int vlan_count)
4489+{
4490+ uint8_t vlan_spec[NPC_MAX_SUPPORTED_VLANS * sizeof(struct roc_vlan_hdr)];
4491+ uint8_t vlan_mask[NPC_MAX_SUPPORTED_VLANS * sizeof(struct roc_vlan_hdr)];
4492+ int rc = 0, i, offset = NPC_TPID_LENGTH;
4493+ struct npc_parse_item_info parse_info;
4494+ char hw_mask[NPC_MAX_EXTRACT_HW_LEN];
4495+
4496+ memset(vlan_spec, 0, sizeof(struct roc_vlan_hdr) * NPC_MAX_SUPPORTED_VLANS);
4497+ memset(vlan_mask, 0, sizeof(struct roc_vlan_hdr) * NPC_MAX_SUPPORTED_VLANS);
4498+ memset(&parse_info, 0, sizeof(parse_info));
4499+
4500+ if (vlan_count > 2)
4501+ vlan_count = 2;
4502+
4503+ for (i = 0; i < vlan_count; i++) {
4504+ if (pattern[i].spec)
4505+ memcpy(vlan_spec + offset, pattern[i].spec, sizeof(struct roc_vlan_hdr));
4506+ if (pattern[i].mask)
4507+ memcpy(vlan_mask + offset, pattern[i].mask, sizeof(struct roc_vlan_hdr));
4508+
4509+ offset += 4;
4510+ }
4511+
4512+ parse_info.def_mask = NULL;
4513+ parse_info.spec = vlan_spec;
4514+ parse_info.mask = vlan_mask;
4515+ parse_info.def_mask = NULL;
4516+ parse_info.hw_hdr_len = 0;
4517+
4518+ lid = NPC_LID_LB;
4519+ parse_info.hw_mask = hw_mask;
4520+
4521+ if (lt == NPC_LT_LB_CTAG)
4522+ parse_info.len = sizeof(struct roc_vlan_hdr) + NPC_TPID_LENGTH;
4523+
4524+ if (lt == NPC_LT_LB_STAG_QINQ)
4525+ parse_info.len = sizeof(struct roc_vlan_hdr) * 2 + NPC_TPID_LENGTH;
4526+
4527+ memset(hw_mask, 0, sizeof(hw_mask));
4528+
4529+ parse_info.hw_mask = &hw_mask;
4530+ npc_get_hw_supp_mask(pst, &parse_info, lid, lt);
4531+
4532+ rc = npc_mask_is_supported(parse_info.mask, parse_info.hw_mask, parse_info.len);
4533+ if (!rc)
4534+ return NPC_ERR_INVALID_MASK;
4535+
4536+ /* Point pattern to last item consumed */
4537+ pst->pattern = pattern;
4538+ return npc_update_parse_state(pst, &parse_info, lid, lt, lflags);
4539+}
4540+
4541+static int
4542+npc_parse_lb_vlan(struct npc_parse_state *pst)
4543+{
4544+ const struct roc_npc_flow_item_vlan *vlan_items[NPC_MAX_SUPPORTED_VLANS];
4545+ const struct roc_npc_item_info *pattern_list[NPC_MAX_SUPPORTED_VLANS];
4546+ const struct roc_npc_item_info *last_pattern;
4547+ int vlan_count = 0, rc = 0;
4548+ int lid, lt, lflags;
4549+
4550+ lid = NPC_LID_LB;
4551+ lflags = 0;
4552+ last_pattern = pst->pattern;
4553+
4554+ rc = npc_parse_vlan_count(pst->pattern, pattern_list, vlan_items, &vlan_count);
4555+ if (rc)
4556+ return rc;
4557+
4558+ rc = npc_parse_vlan_ltype_get(pst, vlan_items, vlan_count, &lt, &lflags);
4559+ if (rc)
4560+ return rc;
4561+
4562+ if (vlan_count == 3) {
4563+ if (pattern_list[2]->spec != NULL && pattern_list[2]->mask != NULL &&
4564+ pattern_list[2]->last != NULL)
4565+ return NPC_ERR_PATTERN_NOTSUP;
4566+
4567+ /* Matching can be done only for two tags. */
4568+ vlan_count = 2;
4569+ last_pattern++;
4570+ }
4571+
4572+ rc = npc_update_vlan_parse_state(pst, pattern_list[0], lid, lt, lflags, vlan_count);
4573+ if (rc)
4574+ return rc;
4575+
4576+ if (vlan_count > 1)
4577+ pst->pattern = last_pattern + vlan_count;
4578+
4579+ return 0;
4580+}
4581+
4582 int
4583 npc_parse_lb(struct npc_parse_state *pst)
4584 {
4585- const struct roc_npc_flow_item_vlan *vlan_item[NPC_MAX_SUPPORTED_VLANS];
4586 const struct roc_npc_item_info *pattern = pst->pattern;
4587 const struct roc_npc_item_info *last_pattern;
4588 const struct roc_npc_flow_item_raw *raw_spec;
4589@@ -250,7 +426,6 @@ npc_parse_lb(struct npc_parse_state *pst)
4590 char hw_mask[NPC_MAX_EXTRACT_HW_LEN];
4591 struct npc_parse_item_info info;
4592 int lid, lt, lflags, len = 0;
4593- int nr_vlans = 0;
4594 int rc;
4595
4596 info.def_mask = NULL;
4597@@ -267,68 +442,10 @@ npc_parse_lb(struct npc_parse_state *pst)
4598 /* RTE vlan is either 802.1q or 802.1ad,
4599 * this maps to either CTAG/STAG. We need to decide
4600 * based on number of VLANS present. Matching is
4601- * supported on first tag only.
4602+ * supported on first two tags.
4603 */
4604- info.hw_mask = NULL;
4605- info.len = sizeof(vlan_item[0]->hdr);
4606-
4607- pattern = pst->pattern;
4608- while (pattern->type == ROC_NPC_ITEM_TYPE_VLAN) {
4609- if (nr_vlans > NPC_MAX_SUPPORTED_VLANS - 1)
4610- return NPC_ERR_PATTERN_NOTSUP;
4611-
4612- vlan_item[nr_vlans] = pattern->spec;
4613- nr_vlans++;
4614-
4615- /* Basic validation of Second/Third vlan item */
4616- if (nr_vlans > 1) {
4617- rc = npc_parse_item_basic(pattern, &info);
4618- if (rc != 0)
4619- return rc;
4620- }
4621- last_pattern = pattern;
4622- pattern++;
4623- pattern = npc_parse_skip_void_and_any_items(pattern);
4624- }
4625
4626- switch (nr_vlans) {
4627- case 1:
4628- lt = NPC_LT_LB_CTAG;
4629- if (vlan_item[0] && vlan_item[0]->has_more_vlan)
4630- lt = NPC_LT_LB_STAG_QINQ;
4631- break;
4632- case 2:
4633- if (vlan_item[1] && vlan_item[1]->has_more_vlan) {
4634- if (!(pst->npc->keyx_supp_nmask[pst->nix_intf] &
4635- 0x3ULL << NPC_LFLAG_LB_OFFSET))
4636- return NPC_ERR_PATTERN_NOTSUP;
4637-
4638- /* This lflag value will match either one of
4639- * NPC_F_LB_L_WITH_STAG_STAG,
4640- * NPC_F_LB_L_WITH_QINQ_CTAG,
4641- * NPC_F_LB_L_WITH_QINQ_QINQ and
4642- * NPC_F_LB_L_WITH_ITAG (0b0100 to 0b0111). For
4643- * NPC_F_LB_L_WITH_ITAG, ltype is NPC_LT_LB_ETAG
4644- * hence will not match.
4645- */
4646-
4647- lflags = NPC_F_LB_L_WITH_QINQ_CTAG &
4648- NPC_F_LB_L_WITH_QINQ_QINQ &
4649- NPC_F_LB_L_WITH_STAG_STAG;
4650- } else {
4651- lflags = NPC_F_LB_L_WITH_CTAG;
4652- }
4653- lt = NPC_LT_LB_STAG_QINQ;
4654- break;
4655- case 3:
4656- if (vlan_item[2] && vlan_item[2]->has_more_vlan)
4657- return NPC_ERR_PATTERN_NOTSUP;
4658- lt = NPC_LT_LB_STAG_QINQ;
4659- lflags = NPC_F_STAG_STAG_CTAG;
4660- break;
4661- default:
4662- return NPC_ERR_PATTERN_NOTSUP;
4663- }
4664+ return npc_parse_lb_vlan(pst);
4665 } else if (pst->pattern->type == ROC_NPC_ITEM_TYPE_E_TAG) {
4666 /* we can support ETAG and match a subsequent CTAG
4667 * without any matching support.
4668@@ -546,10 +663,125 @@ npc_handle_ipv6ext_attr(const struct roc_npc_flow_item_ipv6 *ipv6_spec,
4669 return 0;
4670 }
4671
4672+static int
4673+npc_process_ipv6_item(struct npc_parse_state *pst)
4674+{
4675+ uint8_t ipv6_hdr_mask[sizeof(struct roc_ipv6_hdr) + sizeof(struct roc_ipv6_fragment_ext)];
4676+ uint8_t ipv6_hdr_buf[sizeof(struct roc_ipv6_hdr) + sizeof(struct roc_ipv6_fragment_ext)];
4677+ const struct roc_npc_flow_item_ipv6 *ipv6_spec, *ipv6_mask;
4678+ const struct roc_npc_item_info *pattern = pst->pattern;
4679+ int offset = 0, rc = 0, lid, item_count = 0;
4680+ struct npc_parse_item_info parse_info;
4681+ char hw_mask[NPC_MAX_EXTRACT_HW_LEN];
4682+ uint8_t flags = 0, ltype;
4683+
4684+ memset(ipv6_hdr_buf, 0, sizeof(ipv6_hdr_buf));
4685+ memset(ipv6_hdr_mask, 0, sizeof(ipv6_hdr_mask));
4686+
4687+ ipv6_spec = pst->pattern->spec;
4688+ ipv6_mask = pst->pattern->mask;
4689+
4690+ parse_info.def_mask = NULL;
4691+ parse_info.spec = ipv6_hdr_buf;
4692+ parse_info.mask = ipv6_hdr_mask;
4693+ parse_info.def_mask = NULL;
4694+ parse_info.hw_hdr_len = 0;
4695+ parse_info.len = sizeof(ipv6_spec->hdr);
4696+
4697+ pst->set_ipv6ext_ltype_mask = true;
4698+
4699+ lid = NPC_LID_LC;
4700+ ltype = NPC_LT_LC_IP6;
4701+
4702+ if (pattern->type == ROC_NPC_ITEM_TYPE_IPV6) {
4703+ item_count++;
4704+ if (ipv6_spec) {
4705+ memcpy(ipv6_hdr_buf, &ipv6_spec->hdr, sizeof(struct roc_ipv6_hdr));
4706+ rc = npc_handle_ipv6ext_attr(ipv6_spec, pst, &flags);
4707+ if (rc)
4708+ return rc;
4709+ }
4710+ if (ipv6_mask)
4711+ memcpy(ipv6_hdr_mask, &ipv6_mask->hdr, sizeof(struct roc_ipv6_hdr));
4712+ }
4713+
4714+ offset = sizeof(struct roc_ipv6_hdr);
4715+
4716+ while (pattern->type != ROC_NPC_ITEM_TYPE_END) {
4717+ /* Don't support ranges */
4718+ if (pattern->last != NULL)
4719+ return NPC_ERR_INVALID_RANGE;
4720+
4721+ /* If spec is NULL, both mask and last must be NULL, this
4722+ * makes it to match ANY value (eq to mask = 0).
4723+ * Setting either mask or last without spec is
4724+ * an error
4725+ */
4726+ if (pattern->spec == NULL) {
4727+ if (pattern->last != NULL && pattern->mask != NULL)
4728+ return NPC_ERR_INVALID_SPEC;
4729+ }
4730+ /* Either one ROC_NPC_ITEM_TYPE_IPV6_EXT or
4731+ * one ROC_NPC_ITEM_TYPE_IPV6_FRAG_EXT is supported
4732+ * following an ROC_NPC_ITEM_TYPE_IPV6 item.
4733+ */
4734+ if (pattern->type == ROC_NPC_ITEM_TYPE_IPV6_EXT) {
4735+ item_count++;
4736+ ltype = NPC_LT_LC_IP6_EXT;
4737+ parse_info.len =
4738+ sizeof(struct roc_ipv6_hdr) + sizeof(struct roc_flow_item_ipv6_ext);
4739+ if (pattern->spec)
4740+ memcpy(ipv6_hdr_buf + offset, pattern->spec,
4741+ sizeof(struct roc_flow_item_ipv6_ext));
4742+ if (pattern->mask)
4743+ memcpy(ipv6_hdr_mask + offset, pattern->mask,
4744+ sizeof(struct roc_flow_item_ipv6_ext));
4745+ break;
4746+ } else if (pattern->type == ROC_NPC_ITEM_TYPE_IPV6_FRAG_EXT) {
4747+ item_count++;
4748+ ltype = NPC_LT_LC_IP6_EXT;
4749+ flags = NPC_F_LC_U_IP6_FRAG;
4750+ parse_info.len =
4751+ sizeof(struct roc_ipv6_hdr) + sizeof(struct roc_ipv6_fragment_ext);
4752+ if (pattern->spec)
4753+ memcpy(ipv6_hdr_buf + offset, pattern->spec,
4754+ sizeof(struct roc_ipv6_fragment_ext));
4755+ if (pattern->mask)
4756+ memcpy(ipv6_hdr_mask + offset, pattern->mask,
4757+ sizeof(struct roc_ipv6_fragment_ext));
4758+
4759+ break;
4760+ }
4761+
4762+ pattern++;
4763+ pattern = npc_parse_skip_void_and_any_items(pattern);
4764+ }
4765+
4766+ memset(hw_mask, 0, sizeof(hw_mask));
4767+
4768+ parse_info.hw_mask = &hw_mask;
4769+ npc_get_hw_supp_mask(pst, &parse_info, lid, ltype);
4770+
4771+ rc = npc_mask_is_supported(parse_info.mask, parse_info.hw_mask, parse_info.len);
4772+ if (!rc)
4773+ return NPC_ERR_INVALID_MASK;
4774+
4775+ rc = npc_update_parse_state(pst, &parse_info, lid, ltype, flags);
4776+ if (rc)
4777+ return rc;
4778+
4779+ /* npc_update_parse_state() increments pattern once.
4780+ * Check if additional increment is required.
4781+ */
4782+ if (item_count == 2)
4783+ pst->pattern++;
4784+
4785+ return 0;
4786+}
4787+
4788 int
4789 npc_parse_lc(struct npc_parse_state *pst)
4790 {
4791- const struct roc_npc_flow_item_ipv6 *ipv6_spec;
4792 const struct roc_npc_flow_item_raw *raw_spec;
4793 uint8_t raw_spec_buf[NPC_MAX_RAW_ITEM_LEN];
4794 uint8_t raw_mask_buf[NPC_MAX_RAW_ITEM_LEN];
4795@@ -574,32 +806,12 @@ npc_parse_lc(struct npc_parse_state *pst)
4796 info.len = pst->pattern->size;
4797 break;
4798 case ROC_NPC_ITEM_TYPE_IPV6:
4799- ipv6_spec = pst->pattern->spec;
4800- lid = NPC_LID_LC;
4801- lt = NPC_LT_LC_IP6;
4802- if (ipv6_spec) {
4803- rc = npc_handle_ipv6ext_attr(ipv6_spec, pst, &flags);
4804- if (rc)
4805- return rc;
4806- }
4807- info.len = sizeof(ipv6_spec->hdr);
4808- break;
4809- case ROC_NPC_ITEM_TYPE_ARP_ETH_IPV4:
4810- lt = NPC_LT_LC_ARP;
4811- info.len = pst->pattern->size;
4812- break;
4813 case ROC_NPC_ITEM_TYPE_IPV6_EXT:
4814- lid = NPC_LID_LC;
4815- lt = NPC_LT_LC_IP6_EXT;
4816- info.len = pst->pattern->size;
4817- info.hw_hdr_len = 40;
4818- break;
4819 case ROC_NPC_ITEM_TYPE_IPV6_FRAG_EXT:
4820- lid = NPC_LID_LC;
4821- lt = NPC_LT_LC_IP6_EXT;
4822- flags = NPC_F_LC_U_IP6_FRAG;
4823+ return npc_process_ipv6_item(pst);
4824+ case ROC_NPC_ITEM_TYPE_ARP_ETH_IPV4:
4825+ lt = NPC_LT_LC_ARP;
4826 info.len = pst->pattern->size;
4827- info.hw_hdr_len = 40;
4828 break;
4829 case ROC_NPC_ITEM_TYPE_L3_CUSTOM:
4830 lt = NPC_LT_LC_CUSTOM0;
4831diff --git a/drivers/common/cnxk/roc_npc_priv.h b/drivers/common/cnxk/roc_npc_priv.h
4832index 1a59728..1de3393 100644
4833--- a/drivers/common/cnxk/roc_npc_priv.h
4834+++ b/drivers/common/cnxk/roc_npc_priv.h
4835@@ -77,6 +77,9 @@
4836 #define NPC_LFLAG_LC_OFFSET (NPC_LTYPE_OFFSET_START + 6)
4837 #define NPC_LTYPE_LC_OFFSET (NPC_LTYPE_OFFSET_START + 8)
4838
4839+#define CN10K_SDP_CH_START 0x80
4840+#define CN10K_SDP_CH_MASK 0xF80
4841+
4842 struct npc_action_vtag_info {
4843 uint16_t vlan_id;
4844 uint16_t vlan_ethtype;
4845@@ -196,6 +199,7 @@ struct npc_parse_state {
4846 bool set_vlan_ltype_mask;
4847 bool set_ipv6ext_ltype_mask;
4848 bool is_second_pass_rule;
4849+ bool has_eth_type;
4850 };
4851
4852 enum npc_kpu_parser_flag {
4853@@ -416,17 +420,15 @@ int npc_mcam_alloc_entry(struct npc *npc, struct roc_npc_flow *mcam,
4854 int npc_mcam_alloc_entries(struct npc *npc, int ref_mcam, int *alloc_entry,
4855 int req_count, int prio, int *resp_count);
4856
4857-int npc_mcam_ena_dis_entry(struct npc *npc, struct roc_npc_flow *mcam,
4858- bool enable);
4859+int npc_mcam_ena_dis_entry(struct npc *npc, struct roc_npc_flow *mcam, bool enable);
4860 int npc_mcam_write_entry(struct npc *npc, struct roc_npc_flow *mcam);
4861 int npc_flow_enable_all_entries(struct npc *npc, bool enable);
4862-int npc_update_parse_state(struct npc_parse_state *pst,
4863- struct npc_parse_item_info *info, int lid, int lt,
4864- uint8_t flags);
4865-void npc_get_hw_supp_mask(struct npc_parse_state *pst,
4866- struct npc_parse_item_info *info, int lid, int lt);
4867-int npc_parse_item_basic(const struct roc_npc_item_info *item,
4868- struct npc_parse_item_info *info);
4869+int npc_update_parse_state(struct npc_parse_state *pst, struct npc_parse_item_info *info, int lid,
4870+ int lt, uint8_t flags);
4871+void npc_get_hw_supp_mask(struct npc_parse_state *pst, struct npc_parse_item_info *info, int lid,
4872+ int lt);
4873+int npc_mask_is_supported(const char *mask, const char *hw_mask, int len);
4874+int npc_parse_item_basic(const struct roc_npc_item_info *item, struct npc_parse_item_info *info);
4875 int npc_parse_meta_items(struct npc_parse_state *pst);
4876 int npc_parse_mark_item(struct npc_parse_state *pst);
4877 int npc_parse_pre_l2(struct npc_parse_state *pst);
4878diff --git a/drivers/common/cnxk/roc_npc_utils.c b/drivers/common/cnxk/roc_npc_utils.c
4879index 8bdabc1..fda3073 100644
4880--- a/drivers/common/cnxk/roc_npc_utils.c
4881+++ b/drivers/common/cnxk/roc_npc_utils.c
4882@@ -88,7 +88,7 @@ npc_get_hw_supp_mask(struct npc_parse_state *pst,
4883 }
4884 }
4885
4886-static inline int
4887+inline int
4888 npc_mask_is_supported(const char *mask, const char *hw_mask, int len)
4889 {
4890 /*
4891diff --git a/drivers/common/cnxk/roc_se.h b/drivers/common/cnxk/roc_se.h
4892index c357c19..5b0ddac 100644
4893--- a/drivers/common/cnxk/roc_se.h
4894+++ b/drivers/common/cnxk/roc_se.h
4895@@ -316,16 +316,15 @@ struct roc_se_ctx {
4896 uint64_t enc_cipher : 8;
4897 uint64_t hash_type : 8;
4898 uint64_t mac_len : 8;
4899- uint64_t auth_key_len : 8;
4900+ uint64_t auth_key_len : 16;
4901 uint64_t fc_type : 4;
4902 uint64_t hmac : 1;
4903 uint64_t zsk_flags : 3;
4904 uint64_t k_ecb : 1;
4905 uint64_t pdcp_ci_alg : 2;
4906 uint64_t pdcp_auth_alg : 2;
4907- uint16_t ciph_then_auth : 1;
4908- uint16_t auth_then_ciph : 1;
4909- uint64_t rsvd : 17;
4910+ uint64_t ciph_then_auth : 1;
4911+ uint64_t auth_then_ciph : 1;
4912 union cpt_inst_w4 template_w4;
4913 /* Below fields are accessed by hardware */
4914 union {
4915diff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build
4916index 60ccd95..9dc809f 100644
4917--- a/drivers/common/mlx5/meson.build
4918+++ b/drivers/common/mlx5/meson.build
4919@@ -1,9 +1,14 @@
4920 # SPDX-License-Identifier: BSD-3-Clause
4921 # Copyright 2019 Mellanox Technologies, Ltd
4922
4923-if not (is_linux or (is_windows and is_ms_linker))
4924+if not (is_linux or is_windows)
4925 build = false
4926- reason = 'only supported on Linux and Windows build with clang'
4927+ reason = 'only supported on Linux and Windows'
4928+ subdir_done()
4929+endif
4930+if is_windows and not is_ms_linker and not meson.is_cross_build()
4931+ build = false
4932+ reason = 'MinGW is supported only for cross-compilation test'
4933 subdir_done()
4934 endif
4935
4936diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h
4937index d6e91b5..1ff91f8 100644
4938--- a/drivers/common/mlx5/mlx5_common.h
4939+++ b/drivers/common/mlx5/mlx5_common.h
4940@@ -203,7 +203,12 @@ check_cqe(volatile struct mlx5_cqe *cqe, const uint16_t cqes_n,
4941
4942 if (unlikely((op_owner != (!!(idx))) || (op_code == MLX5_CQE_INVALID)))
4943 return MLX5_CQE_STATUS_HW_OWN;
4944- rte_io_rmb();
4945+
4946+ /* Prevent speculative reading of other fields in CQE until
4947+ * CQE is valid.
4948+ */
4949+ rte_atomic_thread_fence(__ATOMIC_ACQUIRE);
4950+
4951 if (unlikely(op_code == MLX5_CQE_RESP_ERR ||
4952 op_code == MLX5_CQE_REQ_ERR))
4953 return MLX5_CQE_STATUS_ERR;
4954@@ -221,6 +226,7 @@ check_cqe(volatile struct mlx5_cqe *cqe, const uint16_t cqes_n,
4955 * - 0 on success.
4956 * - Negative value and rte_errno is set otherwise.
4957 */
4958+__rte_internal
4959 int mlx5_dev_to_pci_str(const struct rte_device *dev, char *addr, size_t size);
4960
4961 /*
4962diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
4963index 59cebb5..e3a4927 100644
4964--- a/drivers/common/mlx5/mlx5_devx_cmds.c
4965+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
4966@@ -1013,7 +1013,9 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
4967 attr->flow_access_aso_opc_mod = MLX5_GET(cmd_hca_cap, hcattr,
4968 flow_access_aso_opc_mod);
4969 if (attr->crypto) {
4970- attr->aes_xts = MLX5_GET(cmd_hca_cap, hcattr, aes_xts);
4971+ attr->aes_xts = MLX5_GET(cmd_hca_cap, hcattr, aes_xts) ||
4972+ MLX5_GET(cmd_hca_cap, hcattr, aes_xts_multi_block_be_tweak) ||
4973+ MLX5_GET(cmd_hca_cap, hcattr, aes_xts_single_block_le_tweak);
4974 hcattr = mlx5_devx_get_hca_cap(ctx, in, out, &rc,
4975 MLX5_GET_HCA_CAP_OP_MOD_CRYPTO |
4976 MLX5_HCA_CAP_OPMOD_GET_CUR);
4977diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
4978index 2b5c43e..dab70b9 100644
4979--- a/drivers/common/mlx5/mlx5_prm.h
4980+++ b/drivers/common/mlx5/mlx5_prm.h
4981@@ -1679,7 +1679,9 @@ struct mlx5_ifc_cmd_hca_cap_bits {
4982 u8 log_min_hairpin_wq_data_sz[0x5];
4983 u8 reserved_at_3e8[0x3];
4984 u8 log_max_vlan_list[0x5];
4985- u8 reserved_at_3f0[0x3];
4986+ u8 reserved_at_3f0[0x1];
4987+ u8 aes_xts_single_block_le_tweak[1];
4988+ u8 aes_xts_multi_block_be_tweak[1];
4989 u8 log_max_current_mc_list[0x5];
4990 u8 reserved_at_3f8[0x3];
4991 u8 log_max_current_uc_list[0x5];
4992@@ -2121,10 +2123,11 @@ struct mlx5_ifc_cmd_hca_cap_2_bits {
4993 u8 hairpin_sq_wqe_bb_size[0x5];
4994 u8 hairpin_sq_wq_in_host_mem[0x1];
4995 u8 hairpin_data_buffer_locked[0x1];
4996- u8 reserved_at_16a[0x36];
4997- u8 reserved_at_1a0[0xb];
4998+ u8 reserved_at_16a[0x16];
4999+ u8 reserved_at_180[0x20];
5000+ u8 reserved_at_1a0[0xa];
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches