Merge ~arif-ali/ubuntu/+source/dpdk:ubuntu/jammy-devel-lp2067480 into ubuntu/+source/dpdk:ubuntu/jammy-devel

Proposed by Arif Ali
Status: Merged
Merged at revision: 7405bf90b95f630c59735a1c4ecdb9644c616545
Proposed branch: ~arif-ali/ubuntu/+source/dpdk:ubuntu/jammy-devel-lp2067480
Merge into: ubuntu/+source/dpdk:ubuntu/jammy-devel
Diff against target: 11874 lines (+3625/-1514)
269 files modified
.mailmap (+19/-3)
VERSION (+1/-1)
app/dumpcap/main.c (+12/-4)
app/pdump/main.c (+15/-8)
app/proc-info/main.c (+2/-1)
app/test-bbdev/test_bbdev_perf.c (+34/-34)
app/test-pmd/bpf_cmd.c (+1/-1)
app/test-pmd/cmdline.c (+286/-292)
app/test-pmd/cmdline_flow.c (+3/-12)
app/test-pmd/config.c (+9/-6)
app/test-pmd/csumonly.c (+6/-11)
app/test-pmd/ieee1588fwd.c (+12/-3)
app/test-pmd/parameters.c (+2/-2)
app/test-pmd/testpmd.c (+38/-41)
app/test-pmd/testpmd.h (+2/-1)
app/test/test_common.c (+17/-14)
app/test/test_cryptodev.c (+16/-3)
app/test/test_cryptodev_asym.c (+18/-15)
app/test/test_eal_flags.c (+3/-3)
app/test/test_event_crypto_adapter.c (+10/-14)
app/test/test_fbarray.c (+186/-21)
app/test/test_link_bonding.c (+1/-1)
app/test/test_link_bonding_rssconf.c (+0/-1)
app/test/test_power_cpufreq.c (+18/-3)
buildtools/pmdinfogen.py (+7/-6)
config/arm/arm32_armv8_linux_gcc (+1/-0)
config/arm/arm64_armada_linux_gcc (+1/-0)
config/arm/arm64_armv8_linux_clang_ubuntu (+1/-0)
config/arm/arm64_armv8_linux_gcc (+1/-0)
config/arm/arm64_bluefield_linux_gcc (+1/-0)
config/arm/arm64_centriq2400_linux_gcc (+1/-0)
config/arm/arm64_cn10k_linux_gcc (+1/-0)
config/arm/arm64_dpaa_linux_gcc (+1/-0)
config/arm/arm64_emag_linux_gcc (+1/-0)
config/arm/arm64_graviton2_linux_gcc (+1/-0)
config/arm/arm64_kunpeng920_linux_gcc (+1/-0)
config/arm/arm64_kunpeng930_linux_gcc (+1/-0)
config/arm/arm64_n1sdp_linux_gcc (+1/-0)
config/arm/arm64_n2_linux_gcc (+1/-0)
config/arm/arm64_octeontx2_linux_gcc (+1/-0)
config/arm/arm64_stingray_linux_gcc (+1/-0)
config/arm/arm64_thunderx2_linux_gcc (+1/-0)
config/arm/arm64_thunderxt88_linux_gcc (+1/-0)
config/x86/cross-mingw (+1/-0)
debian/changelog (+8/-0)
devtools/git-log-fixes.sh (+1/-1)
doc/guides/nics/features.rst (+20/-14)
doc/guides/prog_guide/img/mbuf1.svg (+1/-1)
doc/guides/prog_guide/img/mbuf2.svg (+3/-3)
doc/guides/prog_guide/mbuf_lib.rst (+4/-4)
doc/guides/rel_notes/release_21_11.rst (+639/-0)
doc/guides/sample_app_ug/l2_forward_crypto.rst (+1/-1)
doc/guides/sample_app_ug/l3_forward_power_man.rst (+3/-0)
doc/guides/testpmd_app_ug/testpmd_funcs.rst (+1/-1)
drivers/baseband/la12xx/bbdev_la12xx.c (+4/-0)
drivers/bus/dpaa/base/fman/fman.c (+27/-2)
drivers/bus/dpaa/base/fman/fman_hw.c (+5/-4)
drivers/bus/dpaa/base/qbman/process.c (+4/-3)
drivers/bus/dpaa/base/qbman/qman.c (+31/-23)
drivers/bus/dpaa/dpaa_bus.c (+4/-1)
drivers/bus/fslmc/qbman/qbman_debug.c (+32/-17)
drivers/bus/pci/linux/pci_uio.c (+4/-1)
drivers/bus/pci/linux/pci_vfio.c (+14/-14)
drivers/bus/pci/pci_common_uio.c (+29/-19)
drivers/bus/vdev/vdev.c (+1/-1)
drivers/common/cnxk/roc_irq.c (+1/-1)
drivers/common/cnxk/roc_npc.c (+26/-7)
drivers/common/cnxk/roc_platform.c (+1/-1)
drivers/common/cnxk/roc_platform.h (+2/-1)
drivers/common/dpaax/caamflib/desc/pdcp.h (+20/-0)
drivers/common/dpaax/caamflib/desc/sdap.h (+9/-1)
drivers/common/dpaax/dpaax_iova_table.c (+6/-7)
drivers/common/iavf/iavf_prototype.h (+1/-0)
drivers/common/iavf/version.map (+1/-0)
drivers/common/mlx5/mlx5_common_utils.h (+1/-1)
drivers/common/mlx5/mlx5_devx_cmds.c (+3/-3)
drivers/common/mlx5/mlx5_devx_cmds.h (+1/-0)
drivers/common/mlx5/mlx5_prm.h (+30/-3)
drivers/common/mlx5/windows/mlx5_win_defs.h (+0/-12)
drivers/compress/mlx5/mlx5_compress.c (+2/-2)
drivers/crypto/bcmfs/bcmfs_device.c (+2/-2)
drivers/crypto/cnxk/cnxk_ae.h (+21/-9)
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c (+2/-1)
drivers/crypto/ipsec_mb/meson.build (+1/-1)
drivers/crypto/mlx5/mlx5_crypto.c (+1/-1)
drivers/crypto/openssl/rte_openssl_pmd.c (+20/-29)
drivers/dma/idxd/dpdk_idxd_cfg.py (+35/-11)
drivers/dma/idxd/idxd_pci.c (+1/-1)
drivers/event/cnxk/cnxk_eventdev.c (+1/-1)
drivers/event/octeontx/ssovf_evdev.c (+13/-3)
drivers/event/sw/iq_chunk.h (+0/-2)
drivers/event/sw/sw_evdev.c (+1/-4)
drivers/net/af_packet/rte_eth_af_packet.c (+3/-2)
drivers/net/af_xdp/rte_eth_af_xdp.c (+10/-0)
drivers/net/ark/ark_ethdev_tx.c (+15/-9)
drivers/net/axgbe/axgbe_common.h (+0/-2)
drivers/net/axgbe/axgbe_dev.c (+40/-27)
drivers/net/axgbe/axgbe_ethdev.c (+5/-0)
drivers/net/axgbe/axgbe_ethdev.h (+2/-0)
drivers/net/axgbe/axgbe_mdio.c (+38/-6)
drivers/net/axgbe/axgbe_phy_impl.c (+21/-13)
drivers/net/bnx2x/bnx2x.c (+7/-12)
drivers/net/bnx2x/bnx2x_stats.c (+0/-4)
drivers/net/bnxt/bnxt_ethdev.c (+0/-1)
drivers/net/bnxt/bnxt_txr.c (+12/-5)
drivers/net/bnxt/tf_core/tf_msg.c (+1/-1)
drivers/net/cnxk/cn10k_ethdev.c (+16/-2)
drivers/net/cnxk/cn10k_tx.h (+2/-1)
drivers/net/cnxk/cn9k_ethdev.c (+15/-2)
drivers/net/cnxk/cnxk_ethdev.c (+8/-1)
drivers/net/cnxk/cnxk_ethdev.h (+7/-0)
drivers/net/cnxk/cnxk_ethdev_ops.c (+7/-0)
drivers/net/dpaa/dpaa_ethdev.c (+4/-2)
drivers/net/dpaa/dpaa_rxtx.c (+1/-1)
drivers/net/e1000/base/e1000_base.c (+1/-1)
drivers/net/e1000/em_ethdev.c (+3/-0)
drivers/net/e1000/igb_ethdev.c (+2/-2)
drivers/net/ena/base/ena_plat_dpdk.h (+0/-6)
drivers/net/ena/ena_ethdev.c (+5/-10)
drivers/net/fm10k/fm10k_ethdev.c (+33/-6)
drivers/net/hns3/hns3_common.c (+1/-1)
drivers/net/hns3/hns3_ethdev.c (+3/-1)
drivers/net/hns3/hns3_ethdev.h (+8/-0)
drivers/net/hns3/hns3_ethdev_vf.c (+2/-0)
drivers/net/hns3/hns3_fdir.c (+1/-0)
drivers/net/hns3/hns3_flow.c (+6/-1)
drivers/net/hns3/hns3_intr.c (+6/-0)
drivers/net/hns3/hns3_regs.c (+3/-11)
drivers/net/hns3/hns3_rss.c (+2/-4)
drivers/net/hns3/hns3_rss.h (+2/-4)
drivers/net/hns3/hns3_rxtx.c (+64/-76)
drivers/net/i40e/base/i40e_adminq.c (+17/-2)
drivers/net/i40e/base/i40e_common.c (+4/-38)
drivers/net/i40e/base/i40e_diag.c (+6/-6)
drivers/net/i40e/base/i40e_nvm.c (+8/-8)
drivers/net/i40e/i40e_ethdev.c (+5/-1)
drivers/net/i40e/i40e_flow.c (+65/-12)
drivers/net/i40e/i40e_rxtx.c (+9/-0)
drivers/net/i40e/i40e_rxtx_vec_avx512.c (+7/-0)
drivers/net/iavf/iavf_ethdev.c (+6/-14)
drivers/net/iavf/iavf_rxtx.c (+5/-1)
drivers/net/iavf/iavf_rxtx_vec_avx512.c (+7/-0)
drivers/net/iavf/iavf_vchnl.c (+3/-2)
drivers/net/ice/base/ice_adminq_cmd.h (+3/-3)
drivers/net/ice/base/ice_bitops.h (+2/-2)
drivers/net/ice/base/ice_common.c (+4/-4)
drivers/net/ice/base/ice_controlq.c (+21/-2)
drivers/net/ice/base/ice_flex_pipe.c (+3/-5)
drivers/net/ice/base/ice_lan_tx_rx.h (+3/-4)
drivers/net/ice/base/ice_nvm.c (+54/-16)
drivers/net/ice/base/ice_sched.c (+4/-5)
drivers/net/ice/base/ice_switch.c (+4/-5)
drivers/net/ice/ice_hash.c (+15/-9)
drivers/net/ice/ice_rxtx.c (+8/-3)
drivers/net/ice/ice_rxtx_vec_avx512.c (+7/-0)
drivers/net/ionic/ionic_osdep.h (+22/-8)
drivers/net/ixgbe/base/ixgbe_82599.c (+5/-3)
drivers/net/ixgbe/base/ixgbe_phy.c (+5/-2)
drivers/net/ixgbe/base/ixgbe_type.h (+1/-0)
drivers/net/ixgbe/base/ixgbe_vf.c (+3/-3)
drivers/net/ixgbe/ixgbe_ethdev.c (+17/-13)
drivers/net/memif/rte_eth_memif.c (+9/-1)
drivers/net/mlx5/linux/mlx5_ethdev_os.c (+13/-10)
drivers/net/mlx5/linux/mlx5_os.c (+6/-5)
drivers/net/mlx5/mlx5.c (+1/-1)
drivers/net/mlx5/mlx5.h (+6/-1)
drivers/net/mlx5/mlx5_ethdev.c (+10/-0)
drivers/net/mlx5/mlx5_flow_aso.c (+3/-3)
drivers/net/mlx5/mlx5_flow_dv.c (+7/-2)
drivers/net/mlx5/mlx5_flow_flex.c (+19/-13)
drivers/net/mlx5/mlx5_flow_meter.c (+2/-2)
drivers/net/mlx5/mlx5_rx.c (+1/-1)
drivers/net/mlx5/mlx5_rx.h (+1/-0)
drivers/net/mlx5/mlx5_rxq.c (+12/-1)
drivers/net/mlx5/mlx5_rxtx_vec_altivec.h (+7/-8)
drivers/net/mlx5/mlx5_rxtx_vec_neon.h (+13/-14)
drivers/net/mlx5/mlx5_rxtx_vec_sse.h (+4/-5)
drivers/net/mlx5/mlx5_tx.c (+4/-4)
drivers/net/mlx5/mlx5_txq.c (+8/-0)
drivers/net/mlx5/mlx5_utils.c (+2/-1)
drivers/net/mlx5/windows/mlx5_os.c (+5/-3)
drivers/net/mvneta/mvneta_ethdev.c (+6/-0)
drivers/net/netvsc/hn_ethdev.c (+9/-0)
drivers/net/netvsc/hn_rxtx.c (+79/-10)
drivers/net/nfb/nfb_rx.c (+1/-1)
drivers/net/nfb/nfb_tx.c (+1/-1)
drivers/net/nfp/meson.build (+1/-0)
drivers/net/nfp/nfp_ethdev.c (+19/-6)
drivers/net/ngbe/base/ngbe_devids.h (+1/-0)
drivers/net/ngbe/base/ngbe_hw.c (+3/-0)
drivers/net/ngbe/base/ngbe_regs.h (+2/-0)
drivers/net/ngbe/ngbe_ethdev.c (+48/-31)
drivers/net/ngbe/ngbe_ethdev.h (+1/-0)
drivers/net/ngbe/ngbe_rxtx.c (+5/-0)
drivers/net/ngbe/ngbe_rxtx.h (+2/-0)
drivers/net/pcap/pcap_ethdev.c (+23/-16)
drivers/net/sfc/sfc_mae.c (+5/-8)
drivers/net/softnic/rte_eth_softnic_meter.c (+1/-0)
drivers/net/tap/rte_eth_tap.c (+1/-1)
drivers/net/tap/tap_flow.c (+1/-1)
drivers/net/tap/tap_netlink.c (+2/-1)
drivers/net/txgbe/base/meson.build (+1/-1)
drivers/net/txgbe/base/txgbe_hw.c (+51/-9)
drivers/net/txgbe/base/txgbe_hw.h (+1/-0)
drivers/net/txgbe/base/txgbe_mng.c (+1/-0)
drivers/net/txgbe/base/txgbe_osdep.h (+1/-0)
drivers/net/txgbe/base/txgbe_regs.h (+6/-1)
drivers/net/txgbe/base/txgbe_type.h (+1/-0)
drivers/net/txgbe/txgbe_ethdev.c (+79/-50)
drivers/net/txgbe/txgbe_ethdev.h (+1/-1)
drivers/net/txgbe/txgbe_ethdev_vf.c (+18/-3)
drivers/net/txgbe/txgbe_fdir.c (+3/-0)
drivers/net/txgbe/txgbe_rxtx.c (+50/-35)
drivers/net/txgbe/txgbe_rxtx.h (+2/-0)
drivers/net/virtio/virtio_ethdev.c (+2/-0)
drivers/net/virtio/virtio_user/vhost_user.c (+2/-1)
drivers/net/virtio/virtio_user_ethdev.c (+1/-0)
drivers/net/vmxnet3/vmxnet3_ethdev.c (+1/-0)
drivers/net/vmxnet3/vmxnet3_logs.h (+1/-1)
drivers/raw/ifpga/base/opae_intel_max10.c (+9/-2)
drivers/raw/ifpga/ifpga_rawdev.c (+4/-4)
drivers/vdpa/sfc/sfc_vdpa_hw.c (+0/-2)
examples/eventdev_pipeline/pipeline_worker_generic.c (+8/-4)
examples/l2fwd-event/l2fwd_event.c (+1/-0)
examples/ntb/ntb_fwd.c (+4/-1)
examples/vhost_blk/vhost_blk.c (+1/-1)
kernel/linux/kni/compat.h (+4/-0)
lib/bpf/bpf_convert.c (+1/-1)
lib/bpf/bpf_validate.c (+261/-54)
lib/cmdline/cmdline.c (+1/-0)
lib/cmdline/cmdline_os_unix.c (+6/-0)
lib/cmdline/cmdline_os_windows.c (+14/-0)
lib/cmdline/cmdline_private.h (+4/-1)
lib/cryptodev/rte_cryptodev.c (+14/-0)
lib/cryptodev/rte_cryptodev.h (+2/-2)
lib/dmadev/rte_dmadev.c (+14/-5)
lib/eal/common/eal_common_dev.c (+7/-6)
lib/eal/common/eal_common_fbarray.c (+22/-8)
lib/eal/common/eal_common_options.c (+4/-4)
lib/eal/common/malloc_mp.c (+2/-1)
lib/eal/linux/eal_memalloc.c (+1/-1)
lib/eal/unix/eal_firmware.c (+19/-6)
lib/eal/windows/include/meson.build (+1/-0)
lib/eal/x86/include/rte_io.h (+1/-1)
lib/ethdev/ethdev_pci.h (+15/-3)
lib/ethdev/rte_ethdev.c (+29/-8)
lib/ethdev/rte_flow.c (+25/-4)
lib/eventdev/rte_event_eth_rx_adapter.c (+1/-1)
lib/fib/dir24_8.c (+2/-2)
lib/fib/trie.c (+6/-4)
lib/hash/rte_cuckoo_hash.c (+2/-0)
lib/hash/rte_hash.h (+8/-8)
lib/hash/rte_thash.c (+25/-1)
lib/latencystats/rte_latencystats.c (+1/-1)
lib/member/rte_member_ht.c (+1/-1)
lib/net/rte_net.h (+17/-1)
lib/pcapng/rte_pcapng.c (+2/-1)
lib/power/power_acpi_cpufreq.c (+5/-1)
lib/power/power_common.c (+23/-0)
lib/power/power_common.h (+1/-0)
lib/power/power_cppc_cpufreq.c (+6/-2)
lib/power/power_pstate_cpufreq.c (+5/-1)
lib/power/rte_power_pmd_mgmt.c (+7/-5)
lib/rcu/rte_rcu_qsbr.c (+9/-8)
lib/telemetry/telemetry.c (+1/-1)
lib/telemetry/telemetry_legacy.c (+1/-1)
lib/vhost/vdpa.c (+1/-0)
lib/vhost/vhost_user.c (+2/-1)
lib/vhost/virtio_net.c (+5/-2)
Reviewer Review Type Date Requested Status
Christian Ehrhardt (community) Approve
git-ubuntu import Pending
Review via email: mp+485499@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt (paelzer) wrote :

Review Symbols:
+ = OK
! = Not OK
? = Question
N = Not applicable
S = Skipped

* Changelog:
  - [+] Changelog entry has correct version and targeted codename
  - [+] Correct formatting of changelog items
  - [+] Bug references correct
  - [N] Old content and logical tag match as expected (Package Merge)

* Git/maintenance:
  - [+] Commits are properly split (more important on -dev than on SRUs)

* New patches:
  - [+] No new patches added or dropped (it is odd that the security fix of Oracular isn't here, but it would now be in the new stable release, so it is fine to go forward)

* Many other sections are skipped as they do not apply
* I've compared the content with 23.11.4 upstream content to ensure the source was updates nice, and git can be so nice ... :-)

lappi 12:30:20 ~/work/dpdk/deb_dpdk (detached*) git diff v21.11.9 --dirstat
 100.0% debian/

* Build/Test:
  - we do not have a PPA, but Arif has tested those elsewhere IIRC and we will run testing on both sides so this is fine

This LGTM, thanks for also pulling the upstream release notes into the changelog as I usually did.

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

The former stuck in proposed upload was a stable backport itself and pointing to the same release, hence we should use just the latest changelog stanza (no -v to include both) as the new supersedes the old (leaving the old in there still is correct as it IMHO represents the history of how this went)

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

Without a PPA and without a repo that has the pristine tar for it I need to ensure I get the right/your tarball. For this one I've fetched from upstream via debian/watch again and ensured all matches (it does).

But only after a detour realizing that the old d/watch was broken and pointing at latest. Fixed used, and reset to the former (not something we'd SRU change and it is good in the new releases). Changing it to https://fast.dpdk.org/rel/dpdk-(22.11.*)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) gave me 22.11.8 but I know that 22.11.9 exists. https://fast.dpdk.org/rel/ does not list it and that is what d/watch picks up, but the direct link from https://core.dpdk.org/download/ works. This is just an odd setup of their server, but made me once more check checksums (good) and vs the git tag (matches as well). I've raise this upstream, but I think it isn't more than a lovely riddle (https://dpdkproject.slack.com/archives/CB2UPBU48/p1747997702897519).

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

The riddle is typing right 22.11 != 21.11, all sorted :-) and ready for an upload

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

Uploading dpdk_21.11.9-0ubuntu0.22.04.1.dsc
Uploading dpdk_21.11.9.orig.tar.xz
Uploading dpdk_21.11.9-0ubuntu0.22.04.1.debian.tar.xz
Uploading dpdk_21.11.9-0ubuntu0.22.04.1_source.buildinfo
Uploading dpdk_21.11.9-0ubuntu0.22.04.1_source.changes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/.mailmap b/.mailmap
index 434b0b5..0317d15 100644
--- a/.mailmap
+++ b/.mailmap
@@ -2,7 +2,7 @@ Aakash Sasidharan <asasidharan@marvell.com>
2Aaro Koskinen <aaro.koskinen@nsn.com>2Aaro Koskinen <aaro.koskinen@nsn.com>
3Aaron Campbell <aaron@arbor.net>3Aaron Campbell <aaron@arbor.net>
4Aaron Conole <aconole@redhat.com>4Aaron Conole <aconole@redhat.com>
5Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>5Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr> <aomeryamac@gmail.com>
6Abdullah Sevincer <abdullah.sevincer@intel.com>6Abdullah Sevincer <abdullah.sevincer@intel.com>
7Abed Kamaluddin <akamaluddin@marvell.com>7Abed Kamaluddin <akamaluddin@marvell.com>
8Abhijit Sinha <abhijit.sinha@intel.com>8Abhijit Sinha <abhijit.sinha@intel.com>
@@ -164,6 +164,7 @@ Bert van Leeuwen <bert.vanleeuwen@netronome.com>
164Bhagyada Modali <bhagyada.modali@amd.com>164Bhagyada Modali <bhagyada.modali@amd.com>
165Bharat Mota <bmota@vmware.com>165Bharat Mota <bmota@vmware.com>
166Bill Hong <bhong@brocade.com>166Bill Hong <bhong@brocade.com>
167Bill Xiang <xiangwencheng@dayudpu.com>
167Billy McFall <bmcfall@redhat.com>168Billy McFall <bmcfall@redhat.com>
168Billy O'Mahony <billy.o.mahony@intel.com>169Billy O'Mahony <billy.o.mahony@intel.com>
169Bing Zhao <bingz@nvidia.com> <bingz@mellanox.com> <bing.zhao@hxt-semitech.com>170Bing Zhao <bingz@nvidia.com> <bingz@mellanox.com> <bing.zhao@hxt-semitech.com>
@@ -212,6 +213,8 @@ Cheng Liu <liucheng11@huawei.com>
212Cheng Peng <cheng.peng5@zte.com.cn>213Cheng Peng <cheng.peng5@zte.com.cn>
213Chengwen Feng <fengchengwen@huawei.com>214Chengwen Feng <fengchengwen@huawei.com>
214Chenmin Sun <chenmin.sun@intel.com>215Chenmin Sun <chenmin.sun@intel.com>
216Chenming Chang <ccm@ccm.ink>
217Chenxingyu Wang <wangchenxingyu@huawei.com>
215Chenxu Di <chenxux.di@intel.com>218Chenxu Di <chenxux.di@intel.com>
216Cheryl Houser <chouser@vmware.com>219Cheryl Houser <chouser@vmware.com>
217Chinh T Cao <chinh.t.cao@intel.com>220Chinh T Cao <chinh.t.cao@intel.com>
@@ -470,6 +473,7 @@ Hanoch Haim <hhaim@cisco.com>
470Hanumanth Pothula <hpothula@marvell.com>473Hanumanth Pothula <hpothula@marvell.com>
471Hao Chen <chenh@yusur.tech> <chenhao164@huawei.com>474Hao Chen <chenh@yusur.tech> <chenhao164@huawei.com>
472Hao Wu <hao.wu@intel.com>475Hao Wu <hao.wu@intel.com>
476Haoqian He <haoqian.he@smartx.com>
473Hari Kumar Vemula <hari.kumarx.vemula@intel.com>477Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
474Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>478Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>
475Hariprasad Govindharajan <hariprasad.govindharajan@intel.com>479Hariprasad Govindharajan <hariprasad.govindharajan@intel.com>
@@ -685,6 +689,7 @@ Junjie Wan <wanjunjie@bytedance.com>
685Jun Qiu <jun.qiu@jaguarmicro.com>689Jun Qiu <jun.qiu@jaguarmicro.com>
686Jun W Zhou <junx.w.zhou@intel.com>690Jun W Zhou <junx.w.zhou@intel.com>
687Junxiao Shi <git@mail1.yoursunny.com>691Junxiao Shi <git@mail1.yoursunny.com>
692Jun Wang <junwang01@cestc.cn>
688Jun Yang <jun.yang@nxp.com>693Jun Yang <jun.yang@nxp.com>
689Junyu Jiang <junyux.jiang@intel.com>694Junyu Jiang <junyux.jiang@intel.com>
690Juraj Linkeš <juraj.linkes@pantheon.tech>695Juraj Linkeš <juraj.linkes@pantheon.tech>
@@ -818,6 +823,7 @@ Mahesh Adulla <mahesh.adulla@amd.com>
818Mahipal Challa <mchalla@marvell.com>823Mahipal Challa <mchalla@marvell.com>
819Mah Yock Gen <yock.gen.mah@intel.com>824Mah Yock Gen <yock.gen.mah@intel.com>
820Mairtin o Loingsigh <mairtin.oloingsigh@intel.com>825Mairtin o Loingsigh <mairtin.oloingsigh@intel.com>
826Malcolm Bumgardner <mbumgard@cisco.com>
821Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>827Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
822Mallesh Koujalagi <malleshx.koujalagi@intel.com>828Mallesh Koujalagi <malleshx.koujalagi@intel.com>
823Malvika Gupta <malvika.gupta@arm.com>829Malvika Gupta <malvika.gupta@arm.com>
@@ -826,7 +832,6 @@ Mandeep Rohilla <mrohilla@brocade.com>
826Manish Chopra <manishc@marvell.com>832Manish Chopra <manishc@marvell.com>
827Manish Tomar <manish.tomar@nxp.com>833Manish Tomar <manish.tomar@nxp.com>
828Mao Jiang <maox.jiang@intel.com>834Mao Jiang <maox.jiang@intel.com>
829Mao YingMing <maoyingming@baidu.com>
830Marcel Apfelbaum <marcel@redhat.com>835Marcel Apfelbaum <marcel@redhat.com>
831Marcel Cornu <marcel.d.cornu@intel.com>836Marcel Cornu <marcel.d.cornu@intel.com>
832Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>837Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
@@ -843,6 +848,7 @@ Marcin Wojtas <mw@semihalf.com>
843Marcin Zapolski <marcinx.a.zapolski@intel.com>848Marcin Zapolski <marcinx.a.zapolski@intel.com>
844Marco Varlese <mvarlese@suse.de>849Marco Varlese <mvarlese@suse.de>
845Marc Sune <marcdevel@gmail.com> <marc.sune@bisdn.de>850Marc Sune <marcdevel@gmail.com> <marc.sune@bisdn.de>
851Marek Mical <marekx.mical@intel.com>
846Maria Lingemark <maria.lingemark@ericsson.com>852Maria Lingemark <maria.lingemark@ericsson.com>
847Mario Carrillo <mario.alfredo.c.arevalo@intel.com>853Mario Carrillo <mario.alfredo.c.arevalo@intel.com>
848Mário Kuka <kuka@cesnet.cz>854Mário Kuka <kuka@cesnet.cz>
@@ -910,6 +916,7 @@ Michael Santana <maicolgabriel@hotmail.com> <msantana@redhat.com>
910Michael Savisko <michaelsav@nvidia.com>916Michael Savisko <michaelsav@nvidia.com>
911Michael Shamis <michaelsh@marvell.com>917Michael Shamis <michaelsh@marvell.com>
912Michael S. Tsirkin <mst@redhat.com>918Michael S. Tsirkin <mst@redhat.com>
919Michael Theodore Stolarchuk <mike.stolarchuk@arista.com>
913Michael Wildt <michael.wildt@broadcom.com>920Michael Wildt <michael.wildt@broadcom.com>
914Michal Berger <michallinuxstuff@gmail.com>921Michal Berger <michallinuxstuff@gmail.com>
915Michal Jastrzebski <michalx.k.jastrzebski@intel.com>922Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
@@ -924,6 +931,7 @@ Michal Swiatkowski <michal.swiatkowski@intel.com>
924Michal Wilczynski <michal.wilczynski@intel.com>931Michal Wilczynski <michal.wilczynski@intel.com>
925Michel Machado <michel@digirati.com.br>932Michel Machado <michel@digirati.com.br>
926Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>933Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
934Mihai Brodschi <mihai.brodschi@broadcom.com>
927Mihai Pogonaru <pogonarumihai@gmail.com>935Mihai Pogonaru <pogonarumihai@gmail.com>
928Mike Baucom <michael.baucom@broadcom.com>936Mike Baucom <michael.baucom@broadcom.com>
929Mike Pattrick <mkp@redhat.com>937Mike Pattrick <mkp@redhat.com>
@@ -981,8 +989,9 @@ Nelson Escobar <neescoba@cisco.com>
981Nemanja Marjanovic <nemanja.marjanovic@intel.com>989Nemanja Marjanovic <nemanja.marjanovic@intel.com>
982Netanel Belgazal <netanel@amazon.com>990Netanel Belgazal <netanel@amazon.com>
983Netanel Gonen <netanelg@mellanox.com>991Netanel Gonen <netanelg@mellanox.com>
992Niall Meade <niall.meade@intel.com>
984Niall Power <niall.power@intel.com>993Niall Power <niall.power@intel.com>
985Nick Connolly <nick.connolly@mayadata.io>994Nick Connolly <nick.connolly@arm.com> <nick.connolly@mayadata.io>
986Nick Nunley <nicholas.d.nunley@intel.com>995Nick Nunley <nicholas.d.nunley@intel.com>
987Niclas Storm <niclas.storm@ericsson.com>996Niclas Storm <niclas.storm@ericsson.com>
988Nicolas Chautru <nicolas.chautru@intel.com>997Nicolas Chautru <nicolas.chautru@intel.com>
@@ -1007,6 +1016,7 @@ Noa Ezra <noae@mellanox.com>
1007Nobuhiro Miki <nmiki@yahoo-corp.jp>1016Nobuhiro Miki <nmiki@yahoo-corp.jp>
1008Norbert Ciosek <norbertx.ciosek@intel.com>1017Norbert Ciosek <norbertx.ciosek@intel.com>
1009Odi Assli <odia@nvidia.com>1018Odi Assli <odia@nvidia.com>
1019Ofer Dagan <ofer.d@claroty.com>
1010Ognjen Joldzic <ognjen.joldzic@gmail.com>1020Ognjen Joldzic <ognjen.joldzic@gmail.com>
1011Ola Liljedahl <ola.liljedahl@arm.com>1021Ola Liljedahl <ola.liljedahl@arm.com>
1012Oleg Polyakov <olegp123@walla.co.il>1022Oleg Polyakov <olegp123@walla.co.il>
@@ -1066,6 +1076,7 @@ Peng Yu <penyu@amazon.com>
1066Peng Zhang <peng.zhang@corigine.com> <peng1x.zhang@intel.com>1076Peng Zhang <peng.zhang@corigine.com> <peng1x.zhang@intel.com>
1067Pengzhen Liu <liupengzhen3@huawei.com>1077Pengzhen Liu <liupengzhen3@huawei.com>
1068Peter Mccarthy <peter.mccarthy@intel.com>1078Peter Mccarthy <peter.mccarthy@intel.com>
1079Peter Morrow <peter@graphiant.com>
1069Peter Spreadborough <peter.spreadborough@broadcom.com>1080Peter Spreadborough <peter.spreadborough@broadcom.com>
1070Petr Houska <t-pehous@microsoft.com>1081Petr Houska <t-pehous@microsoft.com>
1071Phanendra Vukkisala <pvukkisala@marvell.com>1082Phanendra Vukkisala <pvukkisala@marvell.com>
@@ -1108,6 +1119,7 @@ Quentin Armitage <quentin@armitage.org.uk>
1108Qun Wan <qun.wan@intel.com>1119Qun Wan <qun.wan@intel.com>
1109Radha Mohan Chintakuntla <radhac@marvell.com>1120Radha Mohan Chintakuntla <radhac@marvell.com>
1110Radoslaw Biernacki <rad@semihalf.com> <radoslaw.biernacki@linaro.org>1121Radoslaw Biernacki <rad@semihalf.com> <radoslaw.biernacki@linaro.org>
1122Radoslaw Tyl <radoslawx.tyl@intel.com>
1111Radu Bulie <radu-andrei.bulie@nxp.com>1123Radu Bulie <radu-andrei.bulie@nxp.com>
1112Radu Nicolau <radu.nicolau@intel.com>1124Radu Nicolau <radu.nicolau@intel.com>
1113Rafael Ávila de Espíndola <espindola@scylladb.com>1125Rafael Ávila de Espíndola <espindola@scylladb.com>
@@ -1265,6 +1277,7 @@ Shuanglin Wang <shuanglin.wang@broadcom.com>
1265Shuki Katzenelson <shuki@lightbitslabs.com>1277Shuki Katzenelson <shuki@lightbitslabs.com>
1266Shun Hao <shunh@nvidia.com>1278Shun Hao <shunh@nvidia.com>
1267Shu Shen <shu.shen@radisys.com>1279Shu Shen <shu.shen@radisys.com>
1280Shuo Li <lishuo02@baidu.com>
1268Shweta Choudaha <shweta.choudaha@att.com>1281Shweta Choudaha <shweta.choudaha@att.com>
1269Shyam Kumar Shrivastav <shrivastav.shyam@gmail.com>1282Shyam Kumar Shrivastav <shrivastav.shyam@gmail.com>
1270Shy Shyman <shys@nvidia.com> <shys@mellanox.com>1283Shy Shyman <shys@nvidia.com> <shys@mellanox.com>
@@ -1413,6 +1426,7 @@ Vadim Suraev <vadim.suraev@gmail.com>
1413Vakul Garg <vakul.garg@nxp.com>1426Vakul Garg <vakul.garg@nxp.com>
1414Vamsi Attunuru <vattunuru@marvell.com>1427Vamsi Attunuru <vattunuru@marvell.com>
1415Vanshika Shukla <vanshika.shukla@nxp.com>1428Vanshika Shukla <vanshika.shukla@nxp.com>
1429Varun Sethi <v.sethi@nxp.com>
1416Vasily Philipov <vasilyf@mellanox.com>1430Vasily Philipov <vasilyf@mellanox.com>
1417Veerasenareddy Burru <vburru@marvell.com>1431Veerasenareddy Burru <vburru@marvell.com>
1418Venkata Suresh Kumar P <venkata.suresh.kumar.p@intel.com>1432Venkata Suresh Kumar P <venkata.suresh.kumar.p@intel.com>
@@ -1442,6 +1456,7 @@ Vincent Jardin <vincent.jardin@6wind.com>
1442Vincent Li <vincent.mc.li@gmail.com>1456Vincent Li <vincent.mc.li@gmail.com>
1443Vincent S. Cojot <vcojot@redhat.com>1457Vincent S. Cojot <vcojot@redhat.com>
1444Vinh Tran <vinh.t.tran10@gmail.com>1458Vinh Tran <vinh.t.tran10@gmail.com>
1459Vipin Padmam Ramesh <vipinp@vmware.com>
1445Vipin Varghese <vipin.varghese@amd.com> <vipin.varghese@intel.com>1460Vipin Varghese <vipin.varghese@amd.com> <vipin.varghese@intel.com>
1446Vipul Ashri <vipul.ashri@oracle.com>1461Vipul Ashri <vipul.ashri@oracle.com>
1447Visa Hankala <visa@hankala.org>1462Visa Hankala <visa@hankala.org>
@@ -1558,6 +1573,7 @@ Yi Lu <luyi68@live.com>
1558Yilun Xu <yilun.xu@intel.com>1573Yilun Xu <yilun.xu@intel.com>
1559Yinan Wang <yinan.wang@intel.com>1574Yinan Wang <yinan.wang@intel.com>
1560Ying A Wang <ying.a.wang@intel.com>1575Ying A Wang <ying.a.wang@intel.com>
1576Yingming Mao <maoyingming@baidu.com>
1561Yingya Han <yingyax.han@intel.com>1577Yingya Han <yingyax.han@intel.com>
1562Yinjun Zhang <yinjun.zhang@corigine.com>1578Yinjun Zhang <yinjun.zhang@corigine.com>
1563Yipeng Wang <yipeng1.wang@intel.com>1579Yipeng Wang <yipeng1.wang@intel.com>
diff --git a/VERSION b/VERSION
index cb47ea8..7d69c8e 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
121.11.7121.11.9
diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index 44576be..76db233 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -78,8 +78,6 @@ struct interface {
78 TAILQ_ENTRY(interface) next;78 TAILQ_ENTRY(interface) next;
79 uint16_t port;79 uint16_t port;
80 char name[RTE_ETH_NAME_MAX_LEN];80 char name[RTE_ETH_NAME_MAX_LEN];
81
82 struct rte_rxtx_callback *rx_cb[RTE_MAX_QUEUES_PER_PORT];
83};81};
8482
85TAILQ_HEAD(interface_list, interface);83TAILQ_HEAD(interface_list, interface);
@@ -789,6 +787,11 @@ int main(int argc, char **argv)
789{787{
790 struct rte_ring *r;788 struct rte_ring *r;
791 struct rte_mempool *mp;789 struct rte_mempool *mp;
790 struct sigaction action = {
791 .sa_flags = SA_RESTART,
792 .sa_handler = signal_handler,
793 };
794 struct sigaction origaction;
792 dumpcap_out_t out;795 dumpcap_out_t out;
793 char *p;796 char *p;
794797
@@ -814,8 +817,13 @@ int main(int argc, char **argv)
814 start_time = create_timestamp();817 start_time = create_timestamp();
815 enable_pdump(r, mp);818 enable_pdump(r, mp);
816819
817 signal(SIGINT, signal_handler);820 sigemptyset(&action.sa_mask);
818 signal(SIGPIPE, SIG_IGN);821 sigaction(SIGTERM, &action, NULL);
822 sigaction(SIGINT, &action, NULL);
823 sigaction(SIGPIPE, &action, NULL);
824 sigaction(SIGHUP, NULL, &origaction);
825 if (origaction.sa_handler == SIG_DFL)
826 sigaction(SIGHUP, &action, NULL);
819827
820 enable_primary_monitor();828 enable_primary_monitor();
821829
diff --git a/app/pdump/main.c b/app/pdump/main.c
index 71fd83d..0986034 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -573,13 +573,9 @@ disable_primary_monitor(void)
573}573}
574574
575static void575static void
576signal_handler(int sig_num)576signal_handler(int sig_num __rte_unused)
577{577{
578 if (sig_num == SIGINT) {578 quit_signal = 1;
579 printf("\n\nSignal %d received, preparing to exit...\n",
580 sig_num);
581 quit_signal = 1;
582 }
583}579}
584580
585static inline int581static inline int
@@ -976,6 +972,11 @@ enable_primary_monitor(void)
976int972int
977main(int argc, char **argv)973main(int argc, char **argv)
978{974{
975 struct sigaction action = {
976 .sa_flags = SA_RESTART,
977 .sa_handler = signal_handler,
978 };
979 struct sigaction origaction;
979 int diag;980 int diag;
980 int ret;981 int ret;
981 int i;982 int i;
@@ -984,8 +985,14 @@ main(int argc, char **argv)
984 char mp_flag[] = "--proc-type=secondary";985 char mp_flag[] = "--proc-type=secondary";
985 char *argp[argc + 2];986 char *argp[argc + 2];
986987
987 /* catch ctrl-c so we can print on exit */988 /* catch ctrl-c so we can cleanup on exit */
988 signal(SIGINT, signal_handler);989 sigemptyset(&action.sa_mask);
990 sigaction(SIGTERM, &action, NULL);
991 sigaction(SIGINT, &action, NULL);
992 sigaction(SIGPIPE, &action, NULL);
993 sigaction(SIGHUP, NULL, &origaction);
994 if (origaction.sa_handler == SIG_DFL)
995 sigaction(SIGHUP, &action, NULL);
989996
990 argp[0] = argv[0];997 argp[0] = argv[0];
991 argp[1] = n_flag;998 argp[1] = n_flag;
diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index b52c3ff..8030c10 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -1499,7 +1499,7 @@ main(int argc, char **argv)
14991499
1500 if (mem_info) {1500 if (mem_info) {
1501 meminfo_display();1501 meminfo_display();
1502 return 0;1502 goto cleanup;
1503 }1503 }
15041504
1505 nb_ports = rte_eth_dev_count_avail();1505 nb_ports = rte_eth_dev_count_avail();
@@ -1567,6 +1567,7 @@ main(int argc, char **argv)
1567 RTE_ETH_FOREACH_DEV(i)1567 RTE_ETH_FOREACH_DEV(i)
1568 rte_eth_dev_close(i);1568 rte_eth_dev_close(i);
15691569
1570cleanup:
1570 ret = rte_eal_cleanup();1571 ret = rte_eal_cleanup();
1571 if (ret)1572 if (ret)
1572 printf("Error from rte_eal_cleanup(), %d\n", ret);1573 printf("Error from rte_eal_cleanup(), %d\n", ret);
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 3f2bac6..c15ed34 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -2819,15 +2819,6 @@ throughput_intr_lcore_ldpc_dec(void *arg)
2819 if (unlikely(num_to_process - enqueued < num_to_enq))2819 if (unlikely(num_to_process - enqueued < num_to_enq))
2820 num_to_enq = num_to_process - enqueued;2820 num_to_enq = num_to_process - enqueued;
28212821
2822 enq = 0;
2823 do {
2824 enq += rte_bbdev_enqueue_ldpc_dec_ops(
2825 tp->dev_id,
2826 queue_id, &ops[enqueued],
2827 num_to_enq);
2828 } while (unlikely(num_to_enq != enq));
2829 enqueued += enq;
2830
2831 /* Write to thread burst_sz current number of enqueued2822 /* Write to thread burst_sz current number of enqueued
2832 * descriptors. It ensures that proper number of2823 * descriptors. It ensures that proper number of
2833 * descriptors will be dequeued in callback2824 * descriptors will be dequeued in callback
@@ -2837,6 +2828,15 @@ throughput_intr_lcore_ldpc_dec(void *arg)
2837 */2828 */
2838 __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);2829 __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
28392830
2831 enq = 0;
2832 do {
2833 enq += rte_bbdev_enqueue_ldpc_dec_ops(
2834 tp->dev_id,
2835 queue_id, &ops[enqueued],
2836 num_to_enq);
2837 } while (unlikely(num_to_enq != enq));
2838 enqueued += enq;
2839
2840 /* Wait until processing of previous batch is2840 /* Wait until processing of previous batch is
2841 * completed2841 * completed
2842 */2842 */
@@ -2907,14 +2907,6 @@ throughput_intr_lcore_dec(void *arg)
2907 if (unlikely(num_to_process - enqueued < num_to_enq))2907 if (unlikely(num_to_process - enqueued < num_to_enq))
2908 num_to_enq = num_to_process - enqueued;2908 num_to_enq = num_to_process - enqueued;
29092909
2910 enq = 0;
2911 do {
2912 enq += rte_bbdev_enqueue_dec_ops(tp->dev_id,
2913 queue_id, &ops[enqueued],
2914 num_to_enq);
2915 } while (unlikely(num_to_enq != enq));
2916 enqueued += enq;
2917
2918 /* Write to thread burst_sz current number of enqueued2910 /* Write to thread burst_sz current number of enqueued
2919 * descriptors. It ensures that proper number of2911 * descriptors. It ensures that proper number of
2920 * descriptors will be dequeued in callback2912 * descriptors will be dequeued in callback
@@ -2924,6 +2916,14 @@ throughput_intr_lcore_dec(void *arg)
2924 */2916 */
2925 __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);2917 __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
29262918
2919 enq = 0;
2920 do {
2921 enq += rte_bbdev_enqueue_dec_ops(tp->dev_id,
2922 queue_id, &ops[enqueued],
2923 num_to_enq);
2924 } while (unlikely(num_to_enq != enq));
2925 enqueued += enq;
2926
2927 /* Wait until processing of previous batch is2927 /* Wait until processing of previous batch is
2928 * completed2928 * completed
2929 */2929 */
@@ -2993,14 +2993,6 @@ throughput_intr_lcore_enc(void *arg)
2993 if (unlikely(num_to_process - enqueued < num_to_enq))2993 if (unlikely(num_to_process - enqueued < num_to_enq))
2994 num_to_enq = num_to_process - enqueued;2994 num_to_enq = num_to_process - enqueued;
29952995
2996 enq = 0;
2997 do {
2998 enq += rte_bbdev_enqueue_enc_ops(tp->dev_id,
2999 queue_id, &ops[enqueued],
3000 num_to_enq);
3001 } while (unlikely(enq != num_to_enq));
3002 enqueued += enq;
3003
3004 /* Write to thread burst_sz current number of enqueued2996 /* Write to thread burst_sz current number of enqueued
3005 * descriptors. It ensures that proper number of2997 * descriptors. It ensures that proper number of
3006 * descriptors will be dequeued in callback2998 * descriptors will be dequeued in callback
@@ -3010,6 +3002,14 @@ throughput_intr_lcore_enc(void *arg)
3010 */3002 */
3011 __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);3003 __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
30123004
3005 enq = 0;
3006 do {
3007 enq += rte_bbdev_enqueue_enc_ops(tp->dev_id,
3008 queue_id, &ops[enqueued],
3009 num_to_enq);
3010 } while (unlikely(enq != num_to_enq));
3011 enqueued += enq;
3012
3013 /* Wait until processing of previous batch is3013 /* Wait until processing of previous batch is
3014 * completed3014 * completed
3015 */3015 */
@@ -3081,15 +3081,6 @@ throughput_intr_lcore_ldpc_enc(void *arg)
3081 if (unlikely(num_to_process - enqueued < num_to_enq))3081 if (unlikely(num_to_process - enqueued < num_to_enq))
3082 num_to_enq = num_to_process - enqueued;3082 num_to_enq = num_to_process - enqueued;
30833083
3084 enq = 0;
3085 do {
3086 enq += rte_bbdev_enqueue_ldpc_enc_ops(
3087 tp->dev_id,
3088 queue_id, &ops[enqueued],
3089 num_to_enq);
3090 } while (unlikely(enq != num_to_enq));
3091 enqueued += enq;
3092
3093 /* Write to thread burst_sz current number of enqueued3084 /* Write to thread burst_sz current number of enqueued
3094 * descriptors. It ensures that proper number of3085 * descriptors. It ensures that proper number of
3095 * descriptors will be dequeued in callback3086 * descriptors will be dequeued in callback
@@ -3099,6 +3090,15 @@ throughput_intr_lcore_ldpc_enc(void *arg)
3099 */3090 */
3100 __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);3091 __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
31013092
3093 enq = 0;
3094 do {
3095 enq += rte_bbdev_enqueue_ldpc_enc_ops(
3096 tp->dev_id,
3097 queue_id, &ops[enqueued],
3098 num_to_enq);
3099 } while (unlikely(enq != num_to_enq));
3100 enqueued += enq;
3101
3102 /* Wait until processing of previous batch is3102 /* Wait until processing of previous batch is
3103 * completed3103 * completed
3104 */3104 */
diff --git a/app/test-pmd/bpf_cmd.c b/app/test-pmd/bpf_cmd.c
index 09c8aec..e3bfd97 100644
--- a/app/test-pmd/bpf_cmd.c
+++ b/app/test-pmd/bpf_cmd.c
@@ -137,7 +137,7 @@ cmdline_parse_token_string_t cmd_load_bpf_prm =
137cmdline_parse_inst_t cmd_operate_bpf_ld_parse = {137cmdline_parse_inst_t cmd_operate_bpf_ld_parse = {
138 .f = cmd_operate_bpf_ld_parsed,138 .f = cmd_operate_bpf_ld_parsed,
139 .data = NULL,139 .data = NULL,
140 .help_str = "bpf-load rx|tx <port> <queue> <J|M|B> <file_name>",140 .help_str = "bpf-load rx|tx <port> <queue> <J|M|-> <file_name>",
141 .tokens = {141 .tokens = {
142 (void *)&cmd_load_bpf_start,142 (void *)&cmd_load_bpf_start,
143 (void *)&cmd_load_bpf_dir,143 (void *)&cmd_load_bpf_dir,
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 43857c8..aa4acdc 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -68,10 +68,10 @@
68#include "cmdline_tm.h"68#include "cmdline_tm.h"
69#include "bpf_cmd.h"69#include "bpf_cmd.h"
7070
71static struct cmdline *testpmd_cl;
72
73static void cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue);71static void cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue);
7472
73static struct cmdline *testpmd_cl;
74
75/* *** Help command with introduction. *** */75/* *** Help command with introduction. *** */
76struct cmd_help_brief_result {76struct cmd_help_brief_result {
77 cmdline_fixed_string_t help;77 cmdline_fixed_string_t help;
@@ -17733,289 +17733,289 @@ cmdline_parse_inst_t cmd_show_port_flow_transfer_proxy = {
1773317733
17734/* list of instructions */17734/* list of instructions */
17735cmdline_parse_ctx_t main_ctx[] = {17735cmdline_parse_ctx_t main_ctx[] = {
17736 (cmdline_parse_inst_t *)&cmd_help_brief,17736 &cmd_help_brief,
17737 (cmdline_parse_inst_t *)&cmd_help_long,17737 &cmd_help_long,
17738 (cmdline_parse_inst_t *)&cmd_quit,17738 &cmd_quit,
17739 (cmdline_parse_inst_t *)&cmd_load_from_file,17739 &cmd_load_from_file,
17740 (cmdline_parse_inst_t *)&cmd_showport,17740 &cmd_showport,
17741 (cmdline_parse_inst_t *)&cmd_showqueue,17741 &cmd_showqueue,
17742 (cmdline_parse_inst_t *)&cmd_showeeprom,17742 &cmd_showeeprom,
17743 (cmdline_parse_inst_t *)&cmd_showportall,17743 &cmd_showportall,
17744 (cmdline_parse_inst_t *)&cmd_representor_info,17744 &cmd_representor_info,
17745 (cmdline_parse_inst_t *)&cmd_showdevice,17745 &cmd_showdevice,
17746 (cmdline_parse_inst_t *)&cmd_showcfg,17746 &cmd_showcfg,
17747 (cmdline_parse_inst_t *)&cmd_showfwdall,17747 &cmd_showfwdall,
17748 (cmdline_parse_inst_t *)&cmd_start,17748 &cmd_start,
17749 (cmdline_parse_inst_t *)&cmd_start_tx_first,17749 &cmd_start_tx_first,
17750 (cmdline_parse_inst_t *)&cmd_start_tx_first_n,17750 &cmd_start_tx_first_n,
17751 (cmdline_parse_inst_t *)&cmd_set_link_up,17751 &cmd_set_link_up,
17752 (cmdline_parse_inst_t *)&cmd_set_link_down,17752 &cmd_set_link_down,
17753 (cmdline_parse_inst_t *)&cmd_reset,17753 &cmd_reset,
17754 (cmdline_parse_inst_t *)&cmd_set_numbers,17754 &cmd_set_numbers,
17755 (cmdline_parse_inst_t *)&cmd_set_log,17755 &cmd_set_log,
17756 (cmdline_parse_inst_t *)&cmd_set_rxoffs,17756 &cmd_set_rxoffs,
17757 (cmdline_parse_inst_t *)&cmd_set_rxpkts,17757 &cmd_set_rxpkts,
17758 (cmdline_parse_inst_t *)&cmd_set_txpkts,17758 &cmd_set_txpkts,
17759 (cmdline_parse_inst_t *)&cmd_set_txsplit,17759 &cmd_set_txsplit,
17760 (cmdline_parse_inst_t *)&cmd_set_txtimes,17760 &cmd_set_txtimes,
17761 (cmdline_parse_inst_t *)&cmd_set_fwd_list,17761 &cmd_set_fwd_list,
17762 (cmdline_parse_inst_t *)&cmd_set_fwd_mask,17762 &cmd_set_fwd_mask,
17763 (cmdline_parse_inst_t *)&cmd_set_fwd_mode,17763 &cmd_set_fwd_mode,
17764 (cmdline_parse_inst_t *)&cmd_set_fwd_retry_mode,17764 &cmd_set_fwd_retry_mode,
17765 (cmdline_parse_inst_t *)&cmd_set_burst_tx_retry,17765 &cmd_set_burst_tx_retry,
17766 (cmdline_parse_inst_t *)&cmd_set_promisc_mode_one,17766 &cmd_set_promisc_mode_one,
17767 (cmdline_parse_inst_t *)&cmd_set_promisc_mode_all,17767 &cmd_set_promisc_mode_all,
17768 (cmdline_parse_inst_t *)&cmd_set_allmulti_mode_one,17768 &cmd_set_allmulti_mode_one,
17769 (cmdline_parse_inst_t *)&cmd_set_allmulti_mode_all,17769 &cmd_set_allmulti_mode_all,
17770 (cmdline_parse_inst_t *)&cmd_set_flush_rx,17770 &cmd_set_flush_rx,
17771 (cmdline_parse_inst_t *)&cmd_set_link_check,17771 &cmd_set_link_check,
17772 (cmdline_parse_inst_t *)&cmd_set_bypass_mode,17772 &cmd_set_bypass_mode,
17773 (cmdline_parse_inst_t *)&cmd_set_bypass_event,17773 &cmd_set_bypass_event,
17774 (cmdline_parse_inst_t *)&cmd_set_bypass_timeout,17774 &cmd_set_bypass_timeout,
17775 (cmdline_parse_inst_t *)&cmd_show_bypass_config,17775 &cmd_show_bypass_config,
17776#ifdef RTE_NET_BOND17776#ifdef RTE_NET_BOND
17777 (cmdline_parse_inst_t *) &cmd_set_bonding_mode,17777 &cmd_set_bonding_mode,
17778 (cmdline_parse_inst_t *) &cmd_show_bonding_config,17778 &cmd_show_bonding_config,
17779 (cmdline_parse_inst_t *) &cmd_show_bonding_lacp_info,17779 &cmd_show_bonding_lacp_info,
17780 (cmdline_parse_inst_t *) &cmd_set_bonding_primary,17780 &cmd_set_bonding_primary,
17781 (cmdline_parse_inst_t *) &cmd_add_bonding_slave,17781 &cmd_add_bonding_slave,
17782 (cmdline_parse_inst_t *) &cmd_remove_bonding_slave,17782 &cmd_remove_bonding_slave,
17783 (cmdline_parse_inst_t *) &cmd_create_bonded_device,17783 &cmd_create_bonded_device,
17784 (cmdline_parse_inst_t *) &cmd_set_bond_mac_addr,17784 &cmd_set_bond_mac_addr,
17785 (cmdline_parse_inst_t *) &cmd_set_balance_xmit_policy,17785 &cmd_set_balance_xmit_policy,
17786 (cmdline_parse_inst_t *) &cmd_set_bond_mon_period,17786 &cmd_set_bond_mon_period,
17787 (cmdline_parse_inst_t *) &cmd_set_lacp_dedicated_queues,17787 &cmd_set_lacp_dedicated_queues,
17788 (cmdline_parse_inst_t *) &cmd_set_bonding_agg_mode_policy,17788 &cmd_set_bonding_agg_mode_policy,
17789#endif17789#endif
17790 (cmdline_parse_inst_t *)&cmd_vlan_offload,17790 &cmd_vlan_offload,
17791 (cmdline_parse_inst_t *)&cmd_vlan_tpid,17791 &cmd_vlan_tpid,
17792 (cmdline_parse_inst_t *)&cmd_rx_vlan_filter_all,17792 &cmd_rx_vlan_filter_all,
17793 (cmdline_parse_inst_t *)&cmd_rx_vlan_filter,17793 &cmd_rx_vlan_filter,
17794 (cmdline_parse_inst_t *)&cmd_tx_vlan_set,17794 &cmd_tx_vlan_set,
17795 (cmdline_parse_inst_t *)&cmd_tx_vlan_set_qinq,17795 &cmd_tx_vlan_set_qinq,
17796 (cmdline_parse_inst_t *)&cmd_tx_vlan_reset,17796 &cmd_tx_vlan_reset,
17797 (cmdline_parse_inst_t *)&cmd_tx_vlan_set_pvid,17797 &cmd_tx_vlan_set_pvid,
17798 (cmdline_parse_inst_t *)&cmd_csum_set,17798 &cmd_csum_set,
17799 (cmdline_parse_inst_t *)&cmd_csum_show,17799 &cmd_csum_show,
17800 (cmdline_parse_inst_t *)&cmd_csum_tunnel,17800 &cmd_csum_tunnel,
17801 (cmdline_parse_inst_t *)&cmd_csum_mac_swap,17801 &cmd_csum_mac_swap,
17802 (cmdline_parse_inst_t *)&cmd_tso_set,17802 &cmd_tso_set,
17803 (cmdline_parse_inst_t *)&cmd_tso_show,17803 &cmd_tso_show,
17804 (cmdline_parse_inst_t *)&cmd_tunnel_tso_set,17804 &cmd_tunnel_tso_set,
17805 (cmdline_parse_inst_t *)&cmd_tunnel_tso_show,17805 &cmd_tunnel_tso_show,
17806#ifdef RTE_LIB_GRO17806#ifdef RTE_LIB_GRO
17807 (cmdline_parse_inst_t *)&cmd_gro_enable,17807 &cmd_gro_enable,
17808 (cmdline_parse_inst_t *)&cmd_gro_flush,17808 &cmd_gro_flush,
17809 (cmdline_parse_inst_t *)&cmd_gro_show,17809 &cmd_gro_show,
17810#endif17810#endif
17811#ifdef RTE_LIB_GSO17811#ifdef RTE_LIB_GSO
17812 (cmdline_parse_inst_t *)&cmd_gso_enable,17812 &cmd_gso_enable,
17813 (cmdline_parse_inst_t *)&cmd_gso_size,17813 &cmd_gso_size,
17814 (cmdline_parse_inst_t *)&cmd_gso_show,17814 &cmd_gso_show,
17815#endif17815#endif
17816 (cmdline_parse_inst_t *)&cmd_link_flow_control_set,17816 &cmd_link_flow_control_set,
17817 (cmdline_parse_inst_t *)&cmd_link_flow_control_set_rx,17817 &cmd_link_flow_control_set_rx,
17818 (cmdline_parse_inst_t *)&cmd_link_flow_control_set_tx,17818 &cmd_link_flow_control_set_tx,
17819 (cmdline_parse_inst_t *)&cmd_link_flow_control_set_hw,17819 &cmd_link_flow_control_set_hw,
17820 (cmdline_parse_inst_t *)&cmd_link_flow_control_set_lw,17820 &cmd_link_flow_control_set_lw,
17821 (cmdline_parse_inst_t *)&cmd_link_flow_control_set_pt,17821 &cmd_link_flow_control_set_pt,
17822 (cmdline_parse_inst_t *)&cmd_link_flow_control_set_xon,17822 &cmd_link_flow_control_set_xon,
17823 (cmdline_parse_inst_t *)&cmd_link_flow_control_set_macfwd,17823 &cmd_link_flow_control_set_macfwd,
17824 (cmdline_parse_inst_t *)&cmd_link_flow_control_set_autoneg,17824 &cmd_link_flow_control_set_autoneg,
17825 (cmdline_parse_inst_t *)&cmd_link_flow_control_show,17825 &cmd_link_flow_control_show,
17826 (cmdline_parse_inst_t *)&cmd_priority_flow_control_set,17826 &cmd_priority_flow_control_set,
17827 (cmdline_parse_inst_t *)&cmd_config_dcb,17827 &cmd_config_dcb,
17828 (cmdline_parse_inst_t *)&cmd_read_reg,17828 &cmd_read_reg,
17829 (cmdline_parse_inst_t *)&cmd_read_reg_bit_field,17829 &cmd_read_reg_bit_field,
17830 (cmdline_parse_inst_t *)&cmd_read_reg_bit,17830 &cmd_read_reg_bit,
17831 (cmdline_parse_inst_t *)&cmd_write_reg,17831 &cmd_write_reg,
17832 (cmdline_parse_inst_t *)&cmd_write_reg_bit_field,17832 &cmd_write_reg_bit_field,
17833 (cmdline_parse_inst_t *)&cmd_write_reg_bit,17833 &cmd_write_reg_bit,
17834 (cmdline_parse_inst_t *)&cmd_read_rxd_txd,17834 &cmd_read_rxd_txd,
17835 (cmdline_parse_inst_t *)&cmd_stop,17835 &cmd_stop,
17836 (cmdline_parse_inst_t *)&cmd_mac_addr,17836 &cmd_mac_addr,
17837 (cmdline_parse_inst_t *)&cmd_set_fwd_eth_peer,17837 &cmd_set_fwd_eth_peer,
17838 (cmdline_parse_inst_t *)&cmd_set_qmap,17838 &cmd_set_qmap,
17839 (cmdline_parse_inst_t *)&cmd_set_xstats_hide_zero,17839 &cmd_set_xstats_hide_zero,
17840 (cmdline_parse_inst_t *)&cmd_set_record_core_cycles,17840 &cmd_set_record_core_cycles,
17841 (cmdline_parse_inst_t *)&cmd_set_record_burst_stats,17841 &cmd_set_record_burst_stats,
17842 (cmdline_parse_inst_t *)&cmd_operate_port,17842 &cmd_operate_port,
17843 (cmdline_parse_inst_t *)&cmd_operate_specific_port,17843 &cmd_operate_specific_port,
17844 (cmdline_parse_inst_t *)&cmd_operate_attach_port,17844 &cmd_operate_attach_port,
17845 (cmdline_parse_inst_t *)&cmd_operate_detach_port,17845 &cmd_operate_detach_port,
17846 (cmdline_parse_inst_t *)&cmd_operate_detach_device,17846 &cmd_operate_detach_device,
17847 (cmdline_parse_inst_t *)&cmd_set_port_setup_on,17847 &cmd_set_port_setup_on,
17848 (cmdline_parse_inst_t *)&cmd_config_speed_all,17848 &cmd_config_speed_all,
17849 (cmdline_parse_inst_t *)&cmd_config_speed_specific,17849 &cmd_config_speed_specific,
17850 (cmdline_parse_inst_t *)&cmd_config_loopback_all,17850 &cmd_config_loopback_all,
17851 (cmdline_parse_inst_t *)&cmd_config_loopback_specific,17851 &cmd_config_loopback_specific,
17852 (cmdline_parse_inst_t *)&cmd_config_rx_tx,17852 &cmd_config_rx_tx,
17853 (cmdline_parse_inst_t *)&cmd_config_mtu,17853 &cmd_config_mtu,
17854 (cmdline_parse_inst_t *)&cmd_config_max_pkt_len,17854 &cmd_config_max_pkt_len,
17855 (cmdline_parse_inst_t *)&cmd_config_max_lro_pkt_size,17855 &cmd_config_max_lro_pkt_size,
17856 (cmdline_parse_inst_t *)&cmd_config_rx_mode_flag,17856 &cmd_config_rx_mode_flag,
17857 (cmdline_parse_inst_t *)&cmd_config_rss,17857 &cmd_config_rss,
17858 (cmdline_parse_inst_t *)&cmd_config_rxtx_ring_size,17858 &cmd_config_rxtx_ring_size,
17859 (cmdline_parse_inst_t *)&cmd_config_rxtx_queue,17859 &cmd_config_rxtx_queue,
17860 (cmdline_parse_inst_t *)&cmd_config_deferred_start_rxtx_queue,17860 &cmd_config_deferred_start_rxtx_queue,
17861 (cmdline_parse_inst_t *)&cmd_setup_rxtx_queue,17861 &cmd_setup_rxtx_queue,
17862 (cmdline_parse_inst_t *)&cmd_config_rss_reta,17862 &cmd_config_rss_reta,
17863 (cmdline_parse_inst_t *)&cmd_showport_reta,17863 &cmd_showport_reta,
17864 (cmdline_parse_inst_t *)&cmd_showport_macs,17864 &cmd_showport_macs,
17865 (cmdline_parse_inst_t *)&cmd_show_port_flow_transfer_proxy,17865 &cmd_show_port_flow_transfer_proxy,
17866 (cmdline_parse_inst_t *)&cmd_config_burst,17866 &cmd_config_burst,
17867 (cmdline_parse_inst_t *)&cmd_config_thresh,17867 &cmd_config_thresh,
17868 (cmdline_parse_inst_t *)&cmd_config_threshold,17868 &cmd_config_threshold,
17869 (cmdline_parse_inst_t *)&cmd_set_uc_hash_filter,17869 &cmd_set_uc_hash_filter,
17870 (cmdline_parse_inst_t *)&cmd_set_uc_all_hash_filter,17870 &cmd_set_uc_all_hash_filter,
17871 (cmdline_parse_inst_t *)&cmd_vf_mac_addr_filter,17871 &cmd_vf_mac_addr_filter,
17872 (cmdline_parse_inst_t *)&cmd_queue_rate_limit,17872 &cmd_queue_rate_limit,
17873 (cmdline_parse_inst_t *)&cmd_tunnel_udp_config,17873 &cmd_tunnel_udp_config,
17874 (cmdline_parse_inst_t *)&cmd_showport_rss_hash,17874 &cmd_showport_rss_hash,
17875 (cmdline_parse_inst_t *)&cmd_showport_rss_hash_key,17875 &cmd_showport_rss_hash_key,
17876 (cmdline_parse_inst_t *)&cmd_config_rss_hash_key,17876 &cmd_config_rss_hash_key,
17877 (cmdline_parse_inst_t *)&cmd_cleanup_txq_mbufs,17877 &cmd_cleanup_txq_mbufs,
17878 (cmdline_parse_inst_t *)&cmd_dump,17878 &cmd_dump,
17879 (cmdline_parse_inst_t *)&cmd_dump_one,17879 &cmd_dump_one,
17880#ifdef RTE_NET_I40E17880#ifdef RTE_NET_I40E
17881 (cmdline_parse_inst_t *)&cmd_add_del_raw_flow_director,17881 &cmd_add_del_raw_flow_director,
17882#endif17882#endif
17883 (cmdline_parse_inst_t *)&cmd_set_flow_director_ip_mask,17883 &cmd_set_flow_director_ip_mask,
17884 (cmdline_parse_inst_t *)&cmd_set_flow_director_mac_vlan_mask,17884 &cmd_set_flow_director_mac_vlan_mask,
17885 (cmdline_parse_inst_t *)&cmd_set_flow_director_tunnel_mask,17885 &cmd_set_flow_director_tunnel_mask,
17886 (cmdline_parse_inst_t *)&cmd_set_flow_director_flex_payload,17886 &cmd_set_flow_director_flex_payload,
17887 (cmdline_parse_inst_t *)&cmd_flow,17887 &cmd_flow,
17888 (cmdline_parse_inst_t *)&cmd_show_port_meter_cap,17888 &cmd_show_port_meter_cap,
17889 (cmdline_parse_inst_t *)&cmd_add_port_meter_profile_srtcm,17889 &cmd_add_port_meter_profile_srtcm,
17890 (cmdline_parse_inst_t *)&cmd_add_port_meter_profile_trtcm,17890 &cmd_add_port_meter_profile_trtcm,
17891 (cmdline_parse_inst_t *)&cmd_add_port_meter_profile_trtcm_rfc4115,17891 &cmd_add_port_meter_profile_trtcm_rfc4115,
17892 (cmdline_parse_inst_t *)&cmd_del_port_meter_profile,17892 &cmd_del_port_meter_profile,
17893 (cmdline_parse_inst_t *)&cmd_create_port_meter,17893 &cmd_create_port_meter,
17894 (cmdline_parse_inst_t *)&cmd_enable_port_meter,17894 &cmd_enable_port_meter,
17895 (cmdline_parse_inst_t *)&cmd_disable_port_meter,17895 &cmd_disable_port_meter,
17896 (cmdline_parse_inst_t *)&cmd_del_port_meter,17896 &cmd_del_port_meter,
17897 (cmdline_parse_inst_t *)&cmd_del_port_meter_policy,17897 &cmd_del_port_meter_policy,
17898 (cmdline_parse_inst_t *)&cmd_set_port_meter_profile,17898 &cmd_set_port_meter_profile,
17899 (cmdline_parse_inst_t *)&cmd_set_port_meter_dscp_table,17899 &cmd_set_port_meter_dscp_table,
17900 (cmdline_parse_inst_t *)&cmd_set_port_meter_stats_mask,17900 &cmd_set_port_meter_stats_mask,
17901 (cmdline_parse_inst_t *)&cmd_show_port_meter_stats,17901 &cmd_show_port_meter_stats,
17902 (cmdline_parse_inst_t *)&cmd_mcast_addr,17902 &cmd_mcast_addr,
17903 (cmdline_parse_inst_t *)&cmd_set_vf_vlan_anti_spoof,17903 &cmd_set_vf_vlan_anti_spoof,
17904 (cmdline_parse_inst_t *)&cmd_set_vf_mac_anti_spoof,17904 &cmd_set_vf_mac_anti_spoof,
17905 (cmdline_parse_inst_t *)&cmd_set_vf_vlan_stripq,17905 &cmd_set_vf_vlan_stripq,
17906 (cmdline_parse_inst_t *)&cmd_set_vf_vlan_insert,17906 &cmd_set_vf_vlan_insert,
17907 (cmdline_parse_inst_t *)&cmd_set_tx_loopback,17907 &cmd_set_tx_loopback,
17908 (cmdline_parse_inst_t *)&cmd_set_all_queues_drop_en,17908 &cmd_set_all_queues_drop_en,
17909 (cmdline_parse_inst_t *)&cmd_set_vf_split_drop_en,17909 &cmd_set_vf_split_drop_en,
17910 (cmdline_parse_inst_t *)&cmd_set_macsec_offload_on,17910 &cmd_set_macsec_offload_on,
17911 (cmdline_parse_inst_t *)&cmd_set_macsec_offload_off,17911 &cmd_set_macsec_offload_off,
17912 (cmdline_parse_inst_t *)&cmd_set_macsec_sc,17912 &cmd_set_macsec_sc,
17913 (cmdline_parse_inst_t *)&cmd_set_macsec_sa,17913 &cmd_set_macsec_sa,
17914 (cmdline_parse_inst_t *)&cmd_set_vf_traffic,17914 &cmd_set_vf_traffic,
17915 (cmdline_parse_inst_t *)&cmd_set_vf_rxmode,17915 &cmd_set_vf_rxmode,
17916 (cmdline_parse_inst_t *)&cmd_vf_rate_limit,17916 &cmd_vf_rate_limit,
17917 (cmdline_parse_inst_t *)&cmd_vf_rxvlan_filter,17917 &cmd_vf_rxvlan_filter,
17918 (cmdline_parse_inst_t *)&cmd_set_vf_mac_addr,17918 &cmd_set_vf_mac_addr,
17919 (cmdline_parse_inst_t *)&cmd_set_vf_promisc,17919 &cmd_set_vf_promisc,
17920 (cmdline_parse_inst_t *)&cmd_set_vf_allmulti,17920 &cmd_set_vf_allmulti,
17921 (cmdline_parse_inst_t *)&cmd_set_vf_broadcast,17921 &cmd_set_vf_broadcast,
17922 (cmdline_parse_inst_t *)&cmd_set_vf_vlan_tag,17922 &cmd_set_vf_vlan_tag,
17923 (cmdline_parse_inst_t *)&cmd_vf_max_bw,17923 &cmd_vf_max_bw,
17924 (cmdline_parse_inst_t *)&cmd_vf_tc_min_bw,17924 &cmd_vf_tc_min_bw,
17925 (cmdline_parse_inst_t *)&cmd_vf_tc_max_bw,17925 &cmd_vf_tc_max_bw,
17926 (cmdline_parse_inst_t *)&cmd_strict_link_prio,17926 &cmd_strict_link_prio,
17927 (cmdline_parse_inst_t *)&cmd_tc_min_bw,17927 &cmd_tc_min_bw,
17928 (cmdline_parse_inst_t *)&cmd_set_vxlan,17928 &cmd_set_vxlan,
17929 (cmdline_parse_inst_t *)&cmd_set_vxlan_tos_ttl,17929 &cmd_set_vxlan_tos_ttl,
17930 (cmdline_parse_inst_t *)&cmd_set_vxlan_with_vlan,17930 &cmd_set_vxlan_with_vlan,
17931 (cmdline_parse_inst_t *)&cmd_set_nvgre,17931 &cmd_set_nvgre,
17932 (cmdline_parse_inst_t *)&cmd_set_nvgre_with_vlan,17932 &cmd_set_nvgre_with_vlan,
17933 (cmdline_parse_inst_t *)&cmd_set_l2_encap,17933 &cmd_set_l2_encap,
17934 (cmdline_parse_inst_t *)&cmd_set_l2_encap_with_vlan,17934 &cmd_set_l2_encap_with_vlan,
17935 (cmdline_parse_inst_t *)&cmd_set_l2_decap,17935 &cmd_set_l2_decap,
17936 (cmdline_parse_inst_t *)&cmd_set_l2_decap_with_vlan,17936 &cmd_set_l2_decap_with_vlan,
17937 (cmdline_parse_inst_t *)&cmd_set_mplsogre_encap,17937 &cmd_set_mplsogre_encap,
17938 (cmdline_parse_inst_t *)&cmd_set_mplsogre_encap_with_vlan,17938 &cmd_set_mplsogre_encap_with_vlan,
17939 (cmdline_parse_inst_t *)&cmd_set_mplsogre_decap,17939 &cmd_set_mplsogre_decap,
17940 (cmdline_parse_inst_t *)&cmd_set_mplsogre_decap_with_vlan,17940 &cmd_set_mplsogre_decap_with_vlan,
17941 (cmdline_parse_inst_t *)&cmd_set_mplsoudp_encap,17941 &cmd_set_mplsoudp_encap,
17942 (cmdline_parse_inst_t *)&cmd_set_mplsoudp_encap_with_vlan,17942 &cmd_set_mplsoudp_encap_with_vlan,
17943 (cmdline_parse_inst_t *)&cmd_set_mplsoudp_decap,17943 &cmd_set_mplsoudp_decap,
17944 (cmdline_parse_inst_t *)&cmd_set_mplsoudp_decap_with_vlan,17944 &cmd_set_mplsoudp_decap_with_vlan,
17945 (cmdline_parse_inst_t *)&cmd_set_conntrack_common,17945 &cmd_set_conntrack_common,
17946 (cmdline_parse_inst_t *)&cmd_set_conntrack_dir,17946 &cmd_set_conntrack_dir,
17947 (cmdline_parse_inst_t *)&cmd_ddp_add,17947 &cmd_ddp_add,
17948 (cmdline_parse_inst_t *)&cmd_ddp_del,17948 &cmd_ddp_del,
17949 (cmdline_parse_inst_t *)&cmd_ddp_get_list,17949 &cmd_ddp_get_list,
17950 (cmdline_parse_inst_t *)&cmd_ddp_get_info,17950 &cmd_ddp_get_info,
17951 (cmdline_parse_inst_t *)&cmd_cfg_input_set,17951 &cmd_cfg_input_set,
17952 (cmdline_parse_inst_t *)&cmd_clear_input_set,17952 &cmd_clear_input_set,
17953 (cmdline_parse_inst_t *)&cmd_show_vf_stats,17953 &cmd_show_vf_stats,
17954 (cmdline_parse_inst_t *)&cmd_clear_vf_stats,17954 &cmd_clear_vf_stats,
17955 (cmdline_parse_inst_t *)&cmd_show_port_supported_ptypes,17955 &cmd_show_port_supported_ptypes,
17956 (cmdline_parse_inst_t *)&cmd_set_port_ptypes,17956 &cmd_set_port_ptypes,
17957 (cmdline_parse_inst_t *)&cmd_ptype_mapping_get,17957 &cmd_ptype_mapping_get,
17958 (cmdline_parse_inst_t *)&cmd_ptype_mapping_replace,17958 &cmd_ptype_mapping_replace,
17959 (cmdline_parse_inst_t *)&cmd_ptype_mapping_reset,17959 &cmd_ptype_mapping_reset,
17960 (cmdline_parse_inst_t *)&cmd_ptype_mapping_update,17960 &cmd_ptype_mapping_update,
1796117961
17962 (cmdline_parse_inst_t *)&cmd_pctype_mapping_get,17962 &cmd_pctype_mapping_get,
17963 (cmdline_parse_inst_t *)&cmd_pctype_mapping_reset,17963 &cmd_pctype_mapping_reset,
17964 (cmdline_parse_inst_t *)&cmd_pctype_mapping_update,17964 &cmd_pctype_mapping_update,
17965 (cmdline_parse_inst_t *)&cmd_queue_region,17965 &cmd_queue_region,
17966 (cmdline_parse_inst_t *)&cmd_region_flowtype,17966 &cmd_region_flowtype,
17967 (cmdline_parse_inst_t *)&cmd_user_priority_region,17967 &cmd_user_priority_region,
17968 (cmdline_parse_inst_t *)&cmd_flush_queue_region,17968 &cmd_flush_queue_region,
17969 (cmdline_parse_inst_t *)&cmd_show_queue_region_info_all,17969 &cmd_show_queue_region_info_all,
17970 (cmdline_parse_inst_t *)&cmd_show_port_tm_cap,17970 &cmd_show_port_tm_cap,
17971 (cmdline_parse_inst_t *)&cmd_show_port_tm_level_cap,17971 &cmd_show_port_tm_level_cap,
17972 (cmdline_parse_inst_t *)&cmd_show_port_tm_node_cap,17972 &cmd_show_port_tm_node_cap,
17973 (cmdline_parse_inst_t *)&cmd_show_port_tm_node_type,17973 &cmd_show_port_tm_node_type,
17974 (cmdline_parse_inst_t *)&cmd_show_port_tm_node_stats,17974 &cmd_show_port_tm_node_stats,
17975 (cmdline_parse_inst_t *)&cmd_add_port_tm_node_shaper_profile,17975 &cmd_add_port_tm_node_shaper_profile,
17976 (cmdline_parse_inst_t *)&cmd_del_port_tm_node_shaper_profile,17976 &cmd_del_port_tm_node_shaper_profile,
17977 (cmdline_parse_inst_t *)&cmd_add_port_tm_node_shared_shaper,17977 &cmd_add_port_tm_node_shared_shaper,
17978 (cmdline_parse_inst_t *)&cmd_del_port_tm_node_shared_shaper,17978 &cmd_del_port_tm_node_shared_shaper,
17979 (cmdline_parse_inst_t *)&cmd_add_port_tm_node_wred_profile,17979 &cmd_add_port_tm_node_wred_profile,
17980 (cmdline_parse_inst_t *)&cmd_del_port_tm_node_wred_profile,17980 &cmd_del_port_tm_node_wred_profile,
17981 (cmdline_parse_inst_t *)&cmd_set_port_tm_node_shaper_profile,17981 &cmd_set_port_tm_node_shaper_profile,
17982 (cmdline_parse_inst_t *)&cmd_add_port_tm_nonleaf_node,17982 &cmd_add_port_tm_nonleaf_node,
17983 (cmdline_parse_inst_t *)&cmd_add_port_tm_nonleaf_node_pmode,17983 &cmd_add_port_tm_nonleaf_node_pmode,
17984 (cmdline_parse_inst_t *)&cmd_add_port_tm_leaf_node,17984 &cmd_add_port_tm_leaf_node,
17985 (cmdline_parse_inst_t *)&cmd_del_port_tm_node,17985 &cmd_del_port_tm_node,
17986 (cmdline_parse_inst_t *)&cmd_set_port_tm_node_parent,17986 &cmd_set_port_tm_node_parent,
17987 (cmdline_parse_inst_t *)&cmd_suspend_port_tm_node,17987 &cmd_suspend_port_tm_node,
17988 (cmdline_parse_inst_t *)&cmd_resume_port_tm_node,17988 &cmd_resume_port_tm_node,
17989 (cmdline_parse_inst_t *)&cmd_port_tm_hierarchy_commit,17989 &cmd_port_tm_hierarchy_commit,
17990 (cmdline_parse_inst_t *)&cmd_port_tm_mark_ip_ecn,17990 &cmd_port_tm_mark_ip_ecn,
17991 (cmdline_parse_inst_t *)&cmd_port_tm_mark_ip_dscp,17991 &cmd_port_tm_mark_ip_dscp,
17992 (cmdline_parse_inst_t *)&cmd_port_tm_mark_vlan_dei,17992 &cmd_port_tm_mark_vlan_dei,
17993 (cmdline_parse_inst_t *)&cmd_cfg_tunnel_udp_port,17993 &cmd_cfg_tunnel_udp_port,
17994 (cmdline_parse_inst_t *)&cmd_rx_offload_get_capa,17994 &cmd_rx_offload_get_capa,
17995 (cmdline_parse_inst_t *)&cmd_rx_offload_get_configuration,17995 &cmd_rx_offload_get_configuration,
17996 (cmdline_parse_inst_t *)&cmd_config_per_port_rx_offload,17996 &cmd_config_per_port_rx_offload,
17997 (cmdline_parse_inst_t *)&cmd_config_per_queue_rx_offload,17997 &cmd_config_per_queue_rx_offload,
17998 (cmdline_parse_inst_t *)&cmd_tx_offload_get_capa,17998 &cmd_tx_offload_get_capa,
17999 (cmdline_parse_inst_t *)&cmd_tx_offload_get_configuration,17999 &cmd_tx_offload_get_configuration,
18000 (cmdline_parse_inst_t *)&cmd_config_per_port_tx_offload,18000 &cmd_config_per_port_tx_offload,
18001 (cmdline_parse_inst_t *)&cmd_config_per_queue_tx_offload,18001 &cmd_config_per_queue_tx_offload,
18002#ifdef RTE_LIB_BPF18002#ifdef RTE_LIB_BPF
18003 (cmdline_parse_inst_t *)&cmd_operate_bpf_ld_parse,18003 &cmd_operate_bpf_ld_parse,
18004 (cmdline_parse_inst_t *)&cmd_operate_bpf_unld_parse,18004 &cmd_operate_bpf_unld_parse,
18005#endif18005#endif
18006 (cmdline_parse_inst_t *)&cmd_config_tx_metadata_specific,18006 &cmd_config_tx_metadata_specific,
18007 (cmdline_parse_inst_t *)&cmd_show_tx_metadata,18007 &cmd_show_tx_metadata,
18008 (cmdline_parse_inst_t *)&cmd_show_rx_tx_desc_status,18008 &cmd_show_rx_tx_desc_status,
18009 (cmdline_parse_inst_t *)&cmd_show_rx_queue_desc_used_count,18009 &cmd_show_rx_queue_desc_used_count,
18010 (cmdline_parse_inst_t *)&cmd_set_raw,18010 &cmd_set_raw,
18011 (cmdline_parse_inst_t *)&cmd_show_set_raw,18011 &cmd_show_set_raw,
18012 (cmdline_parse_inst_t *)&cmd_show_set_raw_all,18012 &cmd_show_set_raw_all,
18013 (cmdline_parse_inst_t *)&cmd_config_tx_dynf_specific,18013 &cmd_config_tx_dynf_specific,
18014 (cmdline_parse_inst_t *)&cmd_show_fec_mode,18014 &cmd_show_fec_mode,
18015 (cmdline_parse_inst_t *)&cmd_set_fec_mode,18015 &cmd_set_fec_mode,
18016 (cmdline_parse_inst_t *)&cmd_show_capability,18016 &cmd_show_capability,
18017 (cmdline_parse_inst_t *)&cmd_set_flex_is_pattern,18017 &cmd_set_flex_is_pattern,
18018 (cmdline_parse_inst_t *)&cmd_set_flex_spec_pattern,18018 &cmd_set_flex_spec_pattern,
18019 NULL,18019 NULL,
18020};18020};
1802118021
@@ -18041,35 +18041,29 @@ cmdline_read_from_file(const char *filename)
18041 printf("Read CLI commands from %s\n", filename);18041 printf("Read CLI commands from %s\n", filename);
18042}18042}
1804318043
18044void
18045prompt_exit(void)
18046{
18047 cmdline_quit(testpmd_cl);
18048}
18049
18044/* prompt function, called from main on MAIN lcore */18050/* prompt function, called from main on MAIN lcore */
18045void18051void
18046prompt(void)18052prompt(void)
18047{18053{
18048 int ret;
18049 /* initialize non-constant commands */18054 /* initialize non-constant commands */
18050 cmd_set_fwd_mode_init();18055 cmd_set_fwd_mode_init();
18051 cmd_set_fwd_retry_mode_init();18056 cmd_set_fwd_retry_mode_init();
1805218057
18053 testpmd_cl = cmdline_stdin_new(main_ctx, "testpmd> ");18058 testpmd_cl = cmdline_stdin_new(main_ctx, "testpmd> ");
18054 if (testpmd_cl == NULL)18059 if (testpmd_cl == NULL) {
18060 fprintf(stderr,
18061 "Failed to create stdin based cmdline context\n");
18055 return;18062 return;
1805618063 }
18057 ret = atexit(prompt_exit);
18058 if (ret != 0)
18059 fprintf(stderr, "Cannot set exit function for cmdline\n");
1806018064
18061 cmdline_interact(testpmd_cl);18065 cmdline_interact(testpmd_cl);
18062 if (ret != 0)18066 cmdline_stdin_exit(testpmd_cl);
18063 cmdline_stdin_exit(testpmd_cl);
18064}
18065
18066void
18067prompt_exit(void)
18068{
18069 if (testpmd_cl != NULL) {
18070 cmdline_quit(testpmd_cl);
18071 cmdline_stdin_exit(testpmd_cl);
18072 }
18073}18067}
1807418068
18075static void18069static void
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 5c4544a..cf12463 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -86,7 +86,6 @@ enum index {
86 FLEX,86 FLEX,
8787
88 /* Flex arguments */88 /* Flex arguments */
89 FLEX_ITEM_INIT,
90 FLEX_ITEM_CREATE,89 FLEX_ITEM_CREATE,
91 FLEX_ITEM_DESTROY,90 FLEX_ITEM_DESTROY,
9291
@@ -921,7 +920,6 @@ struct parse_action_priv {
921 })920 })
922921
923static const enum index next_flex_item[] = {922static const enum index next_flex_item[] = {
924 FLEX_ITEM_INIT,
925 FLEX_ITEM_CREATE,923 FLEX_ITEM_CREATE,
926 FLEX_ITEM_DESTROY,924 FLEX_ITEM_DESTROY,
927 ZERO,925 ZERO,
@@ -2316,15 +2314,6 @@ static const struct token token_list[] = {
2316 .next = NEXT(next_flex_item),2314 .next = NEXT(next_flex_item),
2317 .call = parse_flex,2315 .call = parse_flex,
2318 },2316 },
2319 [FLEX_ITEM_INIT] = {
2320 .name = "init",
2321 .help = "flex item init",
2322 .args = ARGS(ARGS_ENTRY(struct buffer, args.flex.token),
2323 ARGS_ENTRY(struct buffer, port)),
2324 .next = NEXT(NEXT_ENTRY(COMMON_FLEX_TOKEN),
2325 NEXT_ENTRY(COMMON_PORT_ID)),
2326 .call = parse_flex
2327 },
2328 [FLEX_ITEM_CREATE] = {2317 [FLEX_ITEM_CREATE] = {
2329 .name = "create",2318 .name = "create",
2330 .help = "flex item create",2319 .help = "flex item create",
@@ -3781,9 +3770,12 @@ static const struct token token_list[] = {
3781 [ITEM_CONNTRACK] = {3770 [ITEM_CONNTRACK] = {
3782 .name = "conntrack",3771 .name = "conntrack",
3783 .help = "conntrack state",3772 .help = "conntrack state",
3773 .priv = PRIV_ITEM(CONNTRACK,
3774 sizeof(struct rte_flow_item_conntrack)),
3784 .next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(COMMON_UNSIGNED),3775 .next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(COMMON_UNSIGNED),
3785 item_param),3776 item_param),
3786 .args = ARGS(ARGS_ENTRY(struct rte_flow_item_conntrack, flags)),3777 .args = ARGS(ARGS_ENTRY(struct rte_flow_item_conntrack, flags)),
3778 .call = parse_vc,
3787 },3779 },
3788 [ITEM_PORT_REPRESENTOR] = {3780 [ITEM_PORT_REPRESENTOR] = {
3789 .name = "port_representor",3781 .name = "port_representor",
@@ -7491,7 +7483,6 @@ parse_flex(struct context *ctx, const struct token *token,
7491 switch (ctx->curr) {7483 switch (ctx->curr) {
7492 default:7484 default:
7493 break;7485 break;
7494 case FLEX_ITEM_INIT:
7495 case FLEX_ITEM_CREATE:7486 case FLEX_ITEM_CREATE:
7496 case FLEX_ITEM_DESTROY:7487 case FLEX_ITEM_DESTROY:
7497 out->command = ctx->curr;7488 out->command = ctx->curr;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index cb57673..ad215c7 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2063,7 +2063,7 @@ port_meter_policy_add(portid_t port_id, uint32_t policy_id,
2063 for (act_n = 0, start = act;2063 for (act_n = 0, start = act;
2064 act->type != RTE_FLOW_ACTION_TYPE_END; act++)2064 act->type != RTE_FLOW_ACTION_TYPE_END; act++)
2065 act_n++;2065 act_n++;
2066 if (act_n && act->type == RTE_FLOW_ACTION_TYPE_END)2066 if (act_n > 0)
2067 policy.actions[i] = start;2067 policy.actions[i] = start;
2068 else2068 else
2069 policy.actions[i] = NULL;2069 policy.actions[i] = NULL;
@@ -2450,8 +2450,10 @@ port_flow_aged(portid_t port_id, uint8_t destroy)
2450 }2450 }
2451 type = (enum age_action_context_type *)contexts[idx];2451 type = (enum age_action_context_type *)contexts[idx];
2452 switch (*type) {2452 switch (*type) {
2453 case ACTION_AGE_CONTEXT_TYPE_FLOW:2453 case ACTION_AGE_CONTEXT_TYPE_FLOW: {
2454 uint32_t flow_id;
2454 ctx.pf = container_of(type, struct port_flow, age_type);2455 ctx.pf = container_of(type, struct port_flow, age_type);
2456 flow_id = ctx.pf->id;
2455 printf("%-20s\t%" PRIu32 "\t%" PRIu32 "\t%" PRIu322457 printf("%-20s\t%" PRIu32 "\t%" PRIu32 "\t%" PRIu32
2456 "\t%c%c%c\t\n",2458 "\t%c%c%c\t\n",
2457 "Flow",2459 "Flow",
@@ -2462,9 +2464,10 @@ port_flow_aged(portid_t port_id, uint8_t destroy)
2462 ctx.pf->rule.attr->egress ? 'e' : '-',2464 ctx.pf->rule.attr->egress ? 'e' : '-',
2463 ctx.pf->rule.attr->transfer ? 't' : '-');2465 ctx.pf->rule.attr->transfer ? 't' : '-');
2464 if (destroy && !port_flow_destroy(port_id, 1,2466 if (destroy && !port_flow_destroy(port_id, 1,
2465 &ctx.pf->id))2467 &flow_id))
2466 total++;2468 total++;
2467 break;2469 break;
2470 }
2468 case ACTION_AGE_CONTEXT_TYPE_INDIRECT_ACTION:2471 case ACTION_AGE_CONTEXT_TYPE_INDIRECT_ACTION:
2469 ctx.pia = container_of(type,2472 ctx.pia = container_of(type,
2470 struct port_indirect_action, age_type);2473 struct port_indirect_action, age_type);
@@ -3144,9 +3147,9 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc,
3144 continue;3147 continue;
3145 printf("Shared Rx queue group %u queue %hu can't be scheduled on different cores:\n",3148 printf("Shared Rx queue group %u queue %hu can't be scheduled on different cores:\n",
3146 share_group, share_rxq);3149 share_group, share_rxq);
3147 printf(" lcore %hhu Port %hu queue %hu\n",3150 printf(" lcore %u Port %hu queue %hu\n",
3148 src_lc, src_port, src_rxq);3151 src_lc, src_port, src_rxq);
3149 printf(" lcore %hhu Port %hu queue %hu\n",3152 printf(" lcore %u Port %hu queue %hu\n",
3150 lc_id, fs->rx_port, fs->rx_queue);3153 lc_id, fs->rx_port, fs->rx_queue);
3151 printf("Please use --nb-cores=%hu to limit number of forwarding cores\n",3154 printf("Please use --nb-cores=%hu to limit number of forwarding cores\n",
3152 nb_rxq);3155 nb_rxq);
@@ -3518,7 +3521,7 @@ icmp_echo_config_setup(void)
3518 lcoreid_t lc_id;3521 lcoreid_t lc_id;
3519 uint16_t sm_id;3522 uint16_t sm_id;
35203523
3521 if ((nb_txq * nb_fwd_ports) < nb_fwd_lcores)3524 if ((lcoreid_t)(nb_txq * nb_fwd_ports) < nb_fwd_lcores)
3522 cur_fwd_config.nb_fwd_lcores = (lcoreid_t)3525 cur_fwd_config.nb_fwd_lcores = (lcoreid_t)
3523 (nb_txq * nb_fwd_ports);3526 (nb_txq * nb_fwd_ports);
3524 else3527 else
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 5e494c4..37cddf4 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -562,15 +562,17 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
562 uint64_t ol_flags = 0;562 uint64_t ol_flags = 0;
563563
564 if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IPV4)) {564 if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IPV4)) {
565 ipv4_hdr->hdr_checksum = 0;
566 ol_flags |= RTE_MBUF_F_TX_OUTER_IPV4;565 ol_flags |= RTE_MBUF_F_TX_OUTER_IPV4;
567566
568 if (tx_offloads & RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM)567 if (tx_offloads & RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM) {
569 ol_flags |= RTE_MBUF_F_TX_OUTER_IP_CKSUM;568 ol_flags |= RTE_MBUF_F_TX_OUTER_IP_CKSUM;
570 else569 } else {
570 ipv4_hdr->hdr_checksum = 0;
571 ipv4_hdr->hdr_checksum = rte_ipv4_cksum(ipv4_hdr);571 ipv4_hdr->hdr_checksum = rte_ipv4_cksum(ipv4_hdr);
572 } else572 }
573 } else {
573 ol_flags |= RTE_MBUF_F_TX_OUTER_IPV6;574 ol_flags |= RTE_MBUF_F_TX_OUTER_IPV6;
575 }
574576
575 if (info->outer_l4_proto != IPPROTO_UDP)577 if (info->outer_l4_proto != IPPROTO_UDP)
576 return ol_flags;578 return ol_flags;
@@ -583,13 +585,6 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
583585
584 /* Skip SW outer UDP checksum generation if HW supports it */586 /* Skip SW outer UDP checksum generation if HW supports it */
585 if (tx_offloads & RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM) {587 if (tx_offloads & RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM) {
586 if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IPV4))
587 udp_hdr->dgram_cksum
588 = rte_ipv4_phdr_cksum(ipv4_hdr, ol_flags);
589 else
590 udp_hdr->dgram_cksum
591 = rte_ipv6_phdr_cksum(ipv6_hdr, ol_flags);
592
593 ol_flags |= RTE_MBUF_F_TX_OUTER_UDP_CKSUM;588 ol_flags |= RTE_MBUF_F_TX_OUTER_UDP_CKSUM;
594 return ol_flags;589 return ol_flags;
595 }590 }
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index 896d5ef..8d9ce4d 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -201,14 +201,23 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
201static int201static int
202port_ieee1588_fwd_begin(portid_t pi)202port_ieee1588_fwd_begin(portid_t pi)
203{203{
204 rte_eth_timesync_enable(pi);204 int ret;
205 return 0;205
206 ret = rte_eth_timesync_enable(pi);
207 if (ret)
208 printf("Port %u enable PTP failed, ret = %d\n", pi, ret);
209
210 return ret;
206}211}
207212
208static void213static void
209port_ieee1588_fwd_end(portid_t pi)214port_ieee1588_fwd_end(portid_t pi)
210{215{
211 rte_eth_timesync_disable(pi);216 int ret;
217
218 ret = rte_eth_timesync_disable(pi);
219 if (ret)
220 printf("Port %u disable PTP failed, ret = %d\n", pi, ret);
212}221}
213222
214static void223static void
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index a6a4bf8..411c07c 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -869,8 +869,8 @@ launch_args_parse(int argc, char** argv)
869 }869 }
870 if (!strcmp(lgopts[opt_idx].name, "nb-cores")) {870 if (!strcmp(lgopts[opt_idx].name, "nb-cores")) {
871 n = atoi(optarg);871 n = atoi(optarg);
872 if (n > 0 && n <= nb_lcores)872 if (n > 0 && (lcoreid_t)n <= nb_lcores)
873 nb_fwd_lcores = (uint8_t) n;873 nb_fwd_lcores = (lcoreid_t) n;
874 else874 else
875 rte_exit(EXIT_FAILURE,875 rte_exit(EXIT_FAILURE,
876 "nb-cores should be > 0 and <= %d\n",876 "nb-cores should be > 0 and <= %d\n",
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 5f34641..fbfc090 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -228,7 +228,7 @@ unsigned int xstats_display_num; /**< Size of extended statistics to show */
228 * In container, it cannot terminate the process which running with 'stats-period'228 * In container, it cannot terminate the process which running with 'stats-period'
229 * option. Set flag to exit stats period loop after received SIGINT/SIGTERM.229 * option. Set flag to exit stats period loop after received SIGINT/SIGTERM.
230 */230 */
231static volatile uint8_t f_quit;231volatile uint8_t f_quit;
232uint8_t cl_quit; /* Quit testpmd from cmdline. */232uint8_t cl_quit; /* Quit testpmd from cmdline. */
233233
234/*234/*
@@ -4301,13 +4301,6 @@ init_port(void)
4301}4301}
43024302
4303static void4303static void
4304force_quit(void)
4305{
4306 pmd_test_exit();
4307 prompt_exit();
4308}
4309
4310static void
4311print_stats(void)4304print_stats(void)
4312{4305{
4313 uint8_t i;4306 uint8_t i;
@@ -4325,28 +4318,10 @@ print_stats(void)
4325}4318}
43264319
4327static void4320static void
4328signal_handler(int signum)4321signal_handler(int signum __rte_unused)
4329{4322{
4330 if (signum == SIGINT || signum == SIGTERM) {4323 f_quit = 1;
4331 fprintf(stderr, "\nSignal %d received, preparing to exit...\n",4324 prompt_exit();
4332 signum);
4333#ifdef RTE_LIB_PDUMP
4334 /* uninitialize packet capture framework */
4335 rte_pdump_uninit();
4336#endif
4337#ifdef RTE_LIB_LATENCYSTATS
4338 if (latencystats_enabled != 0)
4339 rte_latencystats_uninit();
4340#endif
4341 force_quit();
4342 /* Set flag to indicate the force termination. */
4343 f_quit = 1;
4344 /* exit with the expected status */
4345#ifndef RTE_EXEC_ENV_WINDOWS
4346 signal(signum, SIG_DFL);
4347 kill(getpid(), signum);
4348#endif
4349 }
4350}4325}
43514326
4352int4327int
@@ -4357,8 +4332,18 @@ main(int argc, char** argv)
4357 uint16_t count;4332 uint16_t count;
4358 int ret;4333 int ret;
43594334
4335#ifdef RTE_EXEC_ENV_WINDOWS
4360 signal(SIGINT, signal_handler);4336 signal(SIGINT, signal_handler);
4361 signal(SIGTERM, signal_handler);4337 signal(SIGTERM, signal_handler);
4338#else
4339 /* Want read() not to be restarted on signal */
4340 struct sigaction action = {
4341 .sa_handler = signal_handler,
4342 };
4343
4344 sigaction(SIGINT, &action, NULL);
4345 sigaction(SIGTERM, &action, NULL);
4346#endif
43624347
4363 testpmd_logtype = rte_log_register("testpmd");4348 testpmd_logtype = rte_log_register("testpmd");
4364 if (testpmd_logtype < 0)4349 if (testpmd_logtype < 0)
@@ -4522,15 +4507,9 @@ main(int argc, char** argv)
4522 start_packet_forwarding(0);4507 start_packet_forwarding(0);
4523 }4508 }
4524 prompt();4509 prompt();
4525 pmd_test_exit();
4526 } else4510 } else
4527#endif4511#endif
4528 {4512 {
4529 char c;
4530 int rc;
4531
4532 f_quit = 0;
4533
4534 printf("No commandline core given, start packet forwarding\n");4513 printf("No commandline core given, start packet forwarding\n");
4535 start_packet_forwarding(tx_first);4514 start_packet_forwarding(tx_first);
4536 if (stats_period != 0) {4515 if (stats_period != 0) {
@@ -4553,15 +4532,33 @@ main(int argc, char** argv)
4553 prev_time = cur_time;4532 prev_time = cur_time;
4554 rte_delay_us_sleep(US_PER_S);4533 rte_delay_us_sleep(US_PER_S);
4555 }4534 }
4556 }4535 } else {
4536 char c;
45574537
4558 printf("Press enter to exit\n");4538 printf("Press enter to exit\n");
4559 rc = read(0, &c, 1);4539 while (f_quit == 0) {
4560 pmd_test_exit();4540 /* end-of-file or any character exits loop */
4561 if (rc < 0)4541 if (read(0, &c, 1) >= 0)
4562 return 1;4542 break;
4543 if (errno == EINTR)
4544 continue;
4545 rte_exit(EXIT_FAILURE, "Read failed: %s\n",
4546 strerror(errno));
4547 }
4548 }
4563 }4549 }
45644550
4551 pmd_test_exit();
4552
4553#ifdef RTE_LIB_PDUMP
4554 /* uninitialize packet capture framework */
4555 rte_pdump_uninit();
4556#endif
4557#ifdef RTE_LIB_LATENCYSTATS
4558 if (latencystats_enabled != 0)
4559 rte_latencystats_uninit();
4560#endif
4561
4565 ret = rte_eal_cleanup();4562 ret = rte_eal_cleanup();
4566 if (ret != 0)4563 if (ret != 0)
4567 rte_exit(EXIT_FAILURE,4564 rte_exit(EXIT_FAILURE,
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index e53320e..e161810 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -33,6 +33,7 @@
33#define RTE_PORT_HANDLING (uint16_t)333#define RTE_PORT_HANDLING (uint16_t)3
3434
35extern uint8_t cl_quit;35extern uint8_t cl_quit;
36extern volatile uint8_t f_quit;
3637
37/*38/*
38 * It is used to allocate the memory for hash key.39 * It is used to allocate the memory for hash key.
@@ -76,7 +77,7 @@ extern uint8_t cl_quit;
7677
77#define MIN_TOTAL_NUM_MBUFS 102478#define MIN_TOTAL_NUM_MBUFS 1024
7879
79typedef uint8_t lcoreid_t;80typedef uint32_t lcoreid_t;
80typedef uint16_t portid_t;81typedef uint16_t portid_t;
81typedef uint16_t queueid_t;82typedef uint16_t queueid_t;
82typedef uint16_t streamid_t;83typedef uint16_t streamid_t;
diff --git a/app/test/test_common.c b/app/test/test_common.c
index f89e1eb..372bb8f 100644
--- a/app/test/test_common.c
+++ b/app/test/test_common.c
@@ -8,11 +8,12 @@
8#include <math.h>8#include <math.h>
9#include <rte_common.h>9#include <rte_common.h>
10#include <rte_hexdump.h>10#include <rte_hexdump.h>
11#include <rte_random.h>
11#include <rte_pause.h>12#include <rte_pause.h>
1213
13#include "test.h"14#include "test.h"
1415
15#define MAX_NUM 1 << 2016#define MAX_NUM (1 << 20)
1617
17#define FAIL(x)\18#define FAIL(x)\
18 {printf(x "() test failed!\n");\19 {printf(x "() test failed!\n");\
@@ -217,19 +218,21 @@ test_align(void)
217 }218 }
218 }219 }
219220
220 for (p = 1; p <= MAX_NUM / 2; p++) {221 /* testing the whole space of 2^20^2 takes too long. */
221 for (i = 1; i <= MAX_NUM / 2; i++) {222 for (j = 1; j <= MAX_NUM ; j++) {
222 val = RTE_ALIGN_MUL_CEIL(i, p);223 i = rte_rand_max(MAX_NUM - 1) + 1;
223 if (val % p != 0 || val < i)224 p = rte_rand_max(MAX_NUM - 1) + 1;
224 FAIL_ALIGN("RTE_ALIGN_MUL_CEIL", i, p);225
225 val = RTE_ALIGN_MUL_FLOOR(i, p);226 val = RTE_ALIGN_MUL_CEIL(i, p);
226 if (val % p != 0 || val > i)227 if (val % p != 0 || val < i)
227 FAIL_ALIGN("RTE_ALIGN_MUL_FLOOR", i, p);228 FAIL_ALIGN("RTE_ALIGN_MUL_CEIL", i, p);
228 val = RTE_ALIGN_MUL_NEAR(i, p);229 val = RTE_ALIGN_MUL_FLOOR(i, p);
229 if (val % p != 0 || ((val != RTE_ALIGN_MUL_CEIL(i, p))230 if (val % p != 0 || val > i)
230 & (val != RTE_ALIGN_MUL_FLOOR(i, p))))231 FAIL_ALIGN("RTE_ALIGN_MUL_FLOOR", i, p);
231 FAIL_ALIGN("RTE_ALIGN_MUL_NEAR", i, p);232 val = RTE_ALIGN_MUL_NEAR(i, p);
232 }233 if (val % p != 0 || ((val != RTE_ALIGN_MUL_CEIL(i, p))
234 & (val != RTE_ALIGN_MUL_FLOOR(i, p))))
235 FAIL_ALIGN("RTE_ALIGN_MUL_NEAR", i, p);
233 }236 }
234237
235 return 0;238 return 0;
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 0bd4517..245d514 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -6,6 +6,7 @@
6#include <time.h>6#include <time.h>
77
8#include <rte_common.h>8#include <rte_common.h>
9#include <rte_errno.h>
9#include <rte_hexdump.h>10#include <rte_hexdump.h>
10#include <rte_mbuf.h>11#include <rte_mbuf.h>
11#include <rte_malloc.h>12#include <rte_malloc.h>
@@ -8414,7 +8415,7 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc,
8414 /* Out of place support */8415 /* Out of place support */
8415 if (oop) {8416 if (oop) {
8416 /*8417 /*
8417 * For out-op-place we need to alloc another mbuf8418 * For out-of-place we need to alloc another mbuf
8418 */8419 */
8419 ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);8420 ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
8420 rte_pktmbuf_append(ut_params->obuf, output_vec_len);8421 rte_pktmbuf_append(ut_params->obuf, output_vec_len);
@@ -8616,7 +8617,7 @@ test_pdcp_proto_SGL(int i, int oop,
8616 /* Out of place support */8617 /* Out of place support */
8617 if (oop) {8618 if (oop) {
8618 /*8619 /*
8619 * For out-op-place we need to alloc another mbuf8620 * For out-of-place we need to alloc another mbuf
8620 */8621 */
8621 ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);8622 ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
8622 rte_pktmbuf_append(ut_params->obuf, frag_size_oop);8623 rte_pktmbuf_append(ut_params->obuf, frag_size_oop);
@@ -11830,6 +11831,12 @@ test_enq_callback_setup(void)
11830 /* Test with invalid crypto device */11831 /* Test with invalid crypto device */
11831 cb = rte_cryptodev_add_enq_callback(RTE_CRYPTO_MAX_DEVS,11832 cb = rte_cryptodev_add_enq_callback(RTE_CRYPTO_MAX_DEVS,
11832 qp_id, test_enq_callback, NULL);11833 qp_id, test_enq_callback, NULL);
11834 if (rte_errno == ENOTSUP) {
11835 RTE_LOG(ERR, USER1, "%s line %d: "
11836 "rte_cryptodev_add_enq_callback() "
11837 "Not supported, skipped\n", __func__, __LINE__);
11838 return TEST_SKIPPED;
11839 }
11833 TEST_ASSERT_NULL(cb, "Add callback on qp %u on "11840 TEST_ASSERT_NULL(cb, "Add callback on qp %u on "
11834 "cryptodev %u did not fail",11841 "cryptodev %u did not fail",
11835 qp_id, RTE_CRYPTO_MAX_DEVS);11842 qp_id, RTE_CRYPTO_MAX_DEVS);
@@ -11930,6 +11937,12 @@ test_deq_callback_setup(void)
11930 /* Test with invalid crypto device */11937 /* Test with invalid crypto device */
11931 cb = rte_cryptodev_add_deq_callback(RTE_CRYPTO_MAX_DEVS,11938 cb = rte_cryptodev_add_deq_callback(RTE_CRYPTO_MAX_DEVS,
11932 qp_id, test_deq_callback, NULL);11939 qp_id, test_deq_callback, NULL);
11940 if (rte_errno == ENOTSUP) {
11941 RTE_LOG(ERR, USER1, "%s line %d: "
11942 "rte_cryptodev_add_deq_callback() "
11943 "Not supported, skipped\n", __func__, __LINE__);
11944 return TEST_SKIPPED;
11945 }
11933 TEST_ASSERT_NULL(cb, "Add callback on qp %u on "11946 TEST_ASSERT_NULL(cb, "Add callback on qp %u on "
11934 "cryptodev %u did not fail",11947 "cryptodev %u did not fail",
11935 qp_id, RTE_CRYPTO_MAX_DEVS);11948 qp_id, RTE_CRYPTO_MAX_DEVS);
@@ -13713,7 +13726,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
13713 }13726 }
1371413727
13715 /*13728 /*
13716 * For out-op-place we need to alloc another mbuf13729 * For out-of-place we need to alloc another mbuf
13717 */13730 */
13718 if (oop) {13731 if (oop) {
13719 ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);13732 ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index 952b927..68cfc64 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -54,11 +54,15 @@ union test_case_structure {
54 struct rsa_test_data_2 rsa_data;54 struct rsa_test_data_2 rsa_data;
55};55};
5656
57struct vector_details {
58 uint32_t vector_size;
59 const void *address;
60};
57struct test_cases_array {61struct test_cases_array {
58 uint32_t size;62 uint32_t size;
59 const void *address[TEST_VECTOR_SIZE];63 struct vector_details details[TEST_VECTOR_SIZE];
60};64};
61static struct test_cases_array test_vector = {0, { NULL } };65static struct test_cases_array test_vector = {0, {} };
6266
63static uint32_t test_index;67static uint32_t test_index;
6468
@@ -525,14 +529,14 @@ error_exit:
525}529}
526530
527static int531static int
528test_one_case(const void *test_case, int sessionless)532test_one_case(struct vector_details test_case, int sessionless)
529{533{
530 int status = TEST_SUCCESS, i = 0;534 int status = TEST_SUCCESS, i = 0;
531 char test_msg[ASYM_TEST_MSG_LEN + 1];535 char test_msg[ASYM_TEST_MSG_LEN + 1];
532536
533 /* Map the case to union */537 /* Map the case to union */
534 union test_case_structure tc;538 union test_case_structure tc;
535 memcpy(&tc, test_case, sizeof(tc));539 rte_memcpy(&tc, test_case.address, RTE_MIN(sizeof(tc), test_case.vector_size));
536540
537 if (tc.modex.xform_type == RTE_CRYPTO_ASYM_XFORM_MODEX541 if (tc.modex.xform_type == RTE_CRYPTO_ASYM_XFORM_MODEX
538 || tc.modex.xform_type == RTE_CRYPTO_ASYM_XFORM_MODINV) {542 || tc.modex.xform_type == RTE_CRYPTO_ASYM_XFORM_MODINV) {
@@ -584,7 +588,8 @@ load_test_vectors(void)
584 "TEST_VECTOR_SIZE too small\n");588 "TEST_VECTOR_SIZE too small\n");
585 return -1;589 return -1;
586 }590 }
587 test_vector.address[test_vector.size] = &modex_test_case[i];591 test_vector.details[test_vector.size].address = &modex_test_case[i];
592 test_vector.details[test_vector.size].vector_size = sizeof(modex_test_case[i]);
588 test_vector.size++;593 test_vector.size++;
589 }594 }
590 /* Load MODINV vector*/595 /* Load MODINV vector*/
@@ -595,7 +600,8 @@ load_test_vectors(void)
595 "TEST_VECTOR_SIZE too small\n");600 "TEST_VECTOR_SIZE too small\n");
596 return -1;601 return -1;
597 }602 }
598 test_vector.address[test_vector.size] = &modinv_test_case[i];603 test_vector.details[test_vector.size].address = &modinv_test_case[i];
604 test_vector.details[test_vector.size].vector_size = sizeof(modinv_test_case[i]);
599 test_vector.size++;605 test_vector.size++;
600 }606 }
601 /* Load RSA vector*/607 /* Load RSA vector*/
@@ -606,7 +612,8 @@ load_test_vectors(void)
606 "TEST_VECTOR_SIZE too small\n");612 "TEST_VECTOR_SIZE too small\n");
607 return -1;613 return -1;
608 }614 }
609 test_vector.address[test_vector.size] = &rsa_test_case_list[i];615 test_vector.details[test_vector.size].address = &rsa_test_case_list[i];
616 test_vector.details[test_vector.size].vector_size = sizeof(rsa_test_case_list[i]);
610 test_vector.size++;617 test_vector.size++;
611 }618 }
612 return 0;619 return 0;
@@ -631,12 +638,12 @@ test_one_by_one(void)
631 /* Go through all test cases */638 /* Go through all test cases */
632 test_index = 0;639 test_index = 0;
633 for (i = 0; i < test_vector.size; i++) {640 for (i = 0; i < test_vector.size; i++) {
634 if (test_one_case(test_vector.address[i], 0) != TEST_SUCCESS)641 if (test_one_case(test_vector.details[i], 0) != TEST_SUCCESS)
635 status = TEST_FAILED;642 status = TEST_FAILED;
636 }643 }
637 if (sessionless) {644 if (sessionless) {
638 for (i = 0; i < test_vector.size; i++) {645 for (i = 0; i < test_vector.size; i++) {
639 if (test_one_case(test_vector.address[i], 1)646 if (test_one_case(test_vector.details[i], 1)
640 != TEST_SUCCESS)647 != TEST_SUCCESS)
641 status = TEST_FAILED;648 status = TEST_FAILED;
642 }649 }
@@ -996,8 +1003,6 @@ ut_setup_asym(void)
996 qp_id, ts_params->valid_devs[0]);1003 qp_id, ts_params->valid_devs[0]);
997 }1004 }
9981005
999 rte_cryptodev_stats_reset(ts_params->valid_devs[0]);
1000
1001 /* Start the device */1006 /* Start the device */
1002 TEST_ASSERT_SUCCESS(rte_cryptodev_start(ts_params->valid_devs[0]),1007 TEST_ASSERT_SUCCESS(rte_cryptodev_start(ts_params->valid_devs[0]),
1003 "Failed to start cryptodev %u",1008 "Failed to start cryptodev %u",
@@ -1010,9 +1015,6 @@ static void
1010ut_teardown_asym(void)1015ut_teardown_asym(void)
1011{1016{
1012 struct crypto_testsuite_params_asym *ts_params = &testsuite_params;1017 struct crypto_testsuite_params_asym *ts_params = &testsuite_params;
1013 struct rte_cryptodev_stats stats;
1014
1015 rte_cryptodev_stats_get(ts_params->valid_devs[0], &stats);
10161018
1017 /* Stop the device */1019 /* Stop the device */
1018 rte_cryptodev_stop(ts_params->valid_devs[0]);1020 rte_cryptodev_stop(ts_params->valid_devs[0]);
@@ -1068,7 +1070,7 @@ test_capability(void)
1068 RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO)) {1070 RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO)) {
1069 RTE_LOG(INFO, USER1,1071 RTE_LOG(INFO, USER1,
1070 "Device doesn't support asymmetric. Test Skipped\n");1072 "Device doesn't support asymmetric. Test Skipped\n");
1071 return TEST_SUCCESS;1073 return TEST_SKIPPED;
1072 }1074 }
10731075
1074 /* print xform capability */1076 /* print xform capability */
@@ -1083,6 +1085,7 @@ test_capability(void)
1083 capa = rte_cryptodev_asym_capability_get(dev_id,1085 capa = rte_cryptodev_asym_capability_get(dev_id,
1084 (const struct1086 (const struct
1085 rte_cryptodev_asym_capability_idx *) &idx);1087 rte_cryptodev_asym_capability_idx *) &idx);
1088 TEST_ASSERT_NOT_NULL(capa, "Failed to get asymmetric capability");
1086 print_asym_capa(capa);1089 print_asym_capa(capa);
1087 }1090 }
1088 }1091 }
diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index d7f4c2c..860e11e 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -583,14 +583,14 @@ test_missing_c_flag(void)
583 launch_proc(argv26) == 0 || launch_proc(argv27) == 0 ||583 launch_proc(argv26) == 0 || launch_proc(argv27) == 0 ||
584 launch_proc(argv28) == 0 || launch_proc(argv30) == 0) {584 launch_proc(argv28) == 0 || launch_proc(argv30) == 0) {
585 printf("Error - "585 printf("Error - "
586 "process ran without error with invalid --lcore flag\n");586 "process ran without error with invalid --lcores flag\n");
587 return -1;587 return -1;
588 }588 }
589589
590 if (rte_lcore_is_enabled(0) && rte_lcore_is_enabled(1) &&590 if (rte_lcore_is_enabled(0) && rte_lcore_is_enabled(1) &&
591 rte_lcore_is_enabled(2) && rte_lcore_is_enabled(3) &&591 rte_lcore_is_enabled(2) && rte_lcore_is_enabled(3) &&
592 rte_lcore_is_enabled(3) && rte_lcore_is_enabled(5) &&592 rte_lcore_is_enabled(4) && rte_lcore_is_enabled(5) &&
593 rte_lcore_is_enabled(4) && rte_lcore_is_enabled(7) &&593 rte_lcore_is_enabled(6) && rte_lcore_is_enabled(7) &&
594 launch_proc(argv29) != 0) {594 launch_proc(argv29) != 0) {
595 printf("Error - "595 printf("Error - "
596 "process did not run ok with valid corelist value\n");596 "process did not run ok with valid corelist value\n");
diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index ea14094..3dab1ac 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -589,21 +589,17 @@ configure_cryptodev(void)
589589
590static inline void590static inline void
591evdev_set_conf_values(struct rte_event_dev_config *dev_conf,591evdev_set_conf_values(struct rte_event_dev_config *dev_conf,
592 struct rte_event_dev_info *info)592 const struct rte_event_dev_info *info)
593{593{
594 memset(dev_conf, 0, sizeof(struct rte_event_dev_config));594 *dev_conf = (struct rte_event_dev_config) {
595 dev_conf->dequeue_timeout_ns = info->min_dequeue_timeout_ns;595 .dequeue_timeout_ns = info->min_dequeue_timeout_ns,
596 dev_conf->nb_event_ports = NB_TEST_PORTS;596 .nb_event_ports = NB_TEST_PORTS,
597 dev_conf->nb_event_queues = NB_TEST_QUEUES;597 .nb_event_queues = NB_TEST_QUEUES,
598 dev_conf->nb_event_queue_flows = info->max_event_queue_flows;598 .nb_event_queue_flows = info->max_event_queue_flows,
599 dev_conf->nb_event_port_dequeue_depth =599 .nb_event_port_dequeue_depth = info->max_event_port_dequeue_depth,
600 info->max_event_port_dequeue_depth;600 .nb_event_port_enqueue_depth = info->max_event_port_enqueue_depth,
601 dev_conf->nb_event_port_enqueue_depth =601 .nb_events_limit = info->max_num_events,
602 info->max_event_port_enqueue_depth;602 };
603 dev_conf->nb_event_port_enqueue_depth =
604 info->max_event_port_enqueue_depth;
605 dev_conf->nb_events_limit =
606 info->max_num_events;
607}603}
608604
609static int605static int
diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index a691bf4..8a3a3d7 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -21,23 +21,41 @@ struct fbarray_testsuite_params {
21};21};
2222
23static struct fbarray_testsuite_params param;23static struct fbarray_testsuite_params param;
24static struct fbarray_testsuite_params unaligned;
2425
25#define FBARRAY_TEST_ARR_NAME "fbarray_autotest"26#define FBARRAY_TEST_ARR_NAME "fbarray_autotest"
26#define FBARRAY_TEST_LEN 25627#define FBARRAY_TEST_LEN 256
28#define FBARRAY_UNALIGNED_TEST_ARR_NAME "fbarray_unaligned_autotest"
29#define FBARRAY_UNALIGNED_TEST_LEN 60
27#define FBARRAY_TEST_ELT_SZ (sizeof(int))30#define FBARRAY_TEST_ELT_SZ (sizeof(int))
2831
29static int autotest_setup(void)32static int autotest_setup(void)
30{33{
31 return rte_fbarray_init(&param.arr, FBARRAY_TEST_ARR_NAME,34 int ret;
35
36 ret = rte_fbarray_init(&param.arr, FBARRAY_TEST_ARR_NAME,
32 FBARRAY_TEST_LEN, FBARRAY_TEST_ELT_SZ);37 FBARRAY_TEST_LEN, FBARRAY_TEST_ELT_SZ);
38 if (ret) {
39 printf("Failed to initialize test array\n");
40 return -1;
41 }
42 ret = rte_fbarray_init(&unaligned.arr, FBARRAY_UNALIGNED_TEST_ARR_NAME,
43 FBARRAY_UNALIGNED_TEST_LEN, FBARRAY_TEST_ELT_SZ);
44 if (ret) {
45 printf("Failed to initialize unaligned test array\n");
46 rte_fbarray_destroy(&param.arr);
47 return -1;
48 }
49 return 0;
33}50}
3451
35static void autotest_teardown(void)52static void autotest_teardown(void)
36{53{
37 rte_fbarray_destroy(&param.arr);54 rte_fbarray_destroy(&param.arr);
55 rte_fbarray_destroy(&unaligned.arr);
38}56}
3957
40static int init_array(void)58static int init_aligned(void)
41{59{
42 int i;60 int i;
43 for (i = param.start; i <= param.end; i++) {61 for (i = param.start; i <= param.end; i++) {
@@ -47,11 +65,35 @@ static int init_array(void)
47 return 0;65 return 0;
48}66}
4967
50static void reset_array(void)68static int init_unaligned(void)
69{
70 int i;
71 for (i = unaligned.start; i <= unaligned.end; i++) {
72 if (rte_fbarray_set_used(&unaligned.arr, i))
73 return -1;
74 }
75 return 0;
76}
77
78static void reset_aligned(void)
51{79{
52 int i;80 int i;
53 for (i = 0; i < FBARRAY_TEST_LEN; i++)81 for (i = 0; i < FBARRAY_TEST_LEN; i++)
54 rte_fbarray_set_free(&param.arr, i);82 rte_fbarray_set_free(&param.arr, i);
83 /* reset param as well */
84 param.start = -1;
85 param.end = -1;
86}
87
88static void reset_unaligned(void)
89{
90 int i;
91 for (i = 0; i < FBARRAY_UNALIGNED_TEST_LEN; i++)
92 rte_fbarray_set_free(&unaligned.arr, i);
93 /* reset param as well */
94 unaligned.start = -1;
95 unaligned.end = -1;
96
55}97}
5698
57static int first_msk_test_setup(void)99static int first_msk_test_setup(void)
@@ -59,7 +101,7 @@ static int first_msk_test_setup(void)
59 /* put all within first mask */101 /* put all within first mask */
60 param.start = 3;102 param.start = 3;
61 param.end = 10;103 param.end = 10;
62 return init_array();104 return init_aligned();
63}105}
64106
65static int cross_msk_test_setup(void)107static int cross_msk_test_setup(void)
@@ -67,7 +109,7 @@ static int cross_msk_test_setup(void)
67 /* put all within second and third mask */109 /* put all within second and third mask */
68 param.start = 70;110 param.start = 70;
69 param.end = 160;111 param.end = 160;
70 return init_array();112 return init_aligned();
71}113}
72114
73static int multi_msk_test_setup(void)115static int multi_msk_test_setup(void)
@@ -75,7 +117,7 @@ static int multi_msk_test_setup(void)
75 /* put all within first and last mask */117 /* put all within first and last mask */
76 param.start = 3;118 param.start = 3;
77 param.end = FBARRAY_TEST_LEN - 20;119 param.end = FBARRAY_TEST_LEN - 20;
78 return init_array();120 return init_aligned();
79}121}
80122
81static int last_msk_test_setup(void)123static int last_msk_test_setup(void)
@@ -83,7 +125,7 @@ static int last_msk_test_setup(void)
83 /* put all within last mask */125 /* put all within last mask */
84 param.start = FBARRAY_TEST_LEN - 20;126 param.start = FBARRAY_TEST_LEN - 20;
85 param.end = FBARRAY_TEST_LEN - 1;127 param.end = FBARRAY_TEST_LEN - 1;
86 return init_array();128 return init_aligned();
87}129}
88130
89static int full_msk_test_setup(void)131static int full_msk_test_setup(void)
@@ -91,16 +133,31 @@ static int full_msk_test_setup(void)
91 /* fill entire mask */133 /* fill entire mask */
92 param.start = 0;134 param.start = 0;
93 param.end = FBARRAY_TEST_LEN - 1;135 param.end = FBARRAY_TEST_LEN - 1;
94 return init_array();136 return init_aligned();
95}137}
96138
97static int empty_msk_test_setup(void)139static int lookahead_test_setup(void)
98{140{
99 /* do not fill anything in */141 /* set index 64 as used */
100 reset_array();142 param.start = 64;
101 param.start = -1;143 param.end = 64;
102 param.end = -1;144 return init_aligned();
103 return 0;145}
146
147static int lookbehind_test_setup(void)
148{
149 /* set index 63 as used */
150 param.start = 63;
151 param.end = 63;
152 return init_aligned();
153}
154
155static int unaligned_test_setup(void)
156{
157 unaligned.start = 0;
158 /* leave one free bit at the end */
159 unaligned.end = FBARRAY_UNALIGNED_TEST_LEN - 2;
160 return init_unaligned();
104}161}
105162
106static int test_invalid(void)163static int test_invalid(void)
@@ -454,7 +511,7 @@ static int test_basic(void)
454 if (check_free())511 if (check_free())
455 return TEST_FAILED;512 return TEST_FAILED;
456513
457 reset_array();514 reset_aligned();
458515
459 return TEST_SUCCESS;516 return TEST_SUCCESS;
460}517}
@@ -697,6 +754,26 @@ static int test_find(void)
697 return TEST_SUCCESS;754 return TEST_SUCCESS;
698}755}
699756
757static int test_find_unaligned(void)
758{
759 TEST_ASSERT_EQUAL((int)unaligned.arr.count, unaligned.end - unaligned.start + 1,
760 "Wrong element count\n");
761 /* ensure space is free before start */
762 if (ensure_correct(&unaligned.arr, 0, unaligned.start - 1, false))
763 return TEST_FAILED;
764 /* ensure space is occupied where it's supposed to be */
765 if (ensure_correct(&unaligned.arr, unaligned.start, unaligned.end, true))
766 return TEST_FAILED;
767 /* ensure space after end is free as well */
768 if (ensure_correct(&unaligned.arr, unaligned.end + 1, FBARRAY_UNALIGNED_TEST_LEN - 1,
769 false))
770 return TEST_FAILED;
771 /* test if find_biggest API's work correctly */
772 if (test_biggest(&unaligned.arr, unaligned.start, unaligned.end))
773 return TEST_FAILED;
774 return TEST_SUCCESS;
775}
776
700static int test_empty(void)777static int test_empty(void)
701{778{
702 TEST_ASSERT_EQUAL((int)param.arr.count, 0, "Wrong element count\n");779 TEST_ASSERT_EQUAL((int)param.arr.count, 0, "Wrong element count\n");
@@ -709,6 +786,87 @@ static int test_empty(void)
709 return TEST_SUCCESS;786 return TEST_SUCCESS;
710}787}
711788
789static int test_lookahead(void)
790{
791 int ret;
792
793 /* run regular test first */
794 ret = test_find();
795 if (ret != TEST_SUCCESS)
796 return ret;
797
798 /* test if we can find free chunk while not starting with 0 */
799 TEST_ASSERT_EQUAL(rte_fbarray_find_next_n_free(&param.arr, 1, param.start),
800 param.start + 1, "Free chunk index is wrong\n");
801 return TEST_SUCCESS;
802}
803
804static int test_lookbehind(void)
805{
806 int ret, free_len = 2;
807
808 /* run regular test first */
809 ret = test_find();
810 if (ret != TEST_SUCCESS)
811 return ret;
812
813 /* test if we can find free chunk while crossing mask boundary */
814 TEST_ASSERT_EQUAL(rte_fbarray_find_prev_n_free(&param.arr, param.start + 1, free_len),
815 param.start - free_len, "Free chunk index is wrong\n");
816 return TEST_SUCCESS;
817}
818
819static int test_lookahead_mask(void)
820{
821 /*
822 * There is a certain type of lookahead behavior we want to test here,
823 * namely masking of bits that were scanned with lookahead but that we
824 * know do not match our criteria. This is achieved in following steps:
825 *
826 * 0. Look for a big enough chunk of free space (say, 62 elements)
827 * 1. Trigger lookahead by breaking a run somewhere inside mask 0
828 * (indices 0-63)
829 * 2. Fail lookahead by breaking the run somewhere inside mask 1
830 * (indices 64-127)
831 * 3. Ensure that we can still find free space in mask 1 afterwards
832 */
833
834 /* break run on first mask */
835 rte_fbarray_set_used(&param.arr, 61);
836 /* break run on second mask */
837 rte_fbarray_set_used(&param.arr, 70);
838
839 /* we expect to find free space at 71 */
840 TEST_ASSERT_EQUAL(rte_fbarray_find_next_n_free(&param.arr, 0, 62),
841 71, "Free chunk index is wrong\n");
842 return TEST_SUCCESS;
843}
844
845static int test_lookbehind_mask(void)
846{
847 /*
848 * There is a certain type of lookbehind behavior we want to test here,
849 * namely masking of bits that were scanned with lookbehind but that we
850 * know do not match our criteria. This is achieved in two steps:
851 *
852 * 0. Look for a big enough chunk of free space (say, 62 elements)
853 * 1. Trigger lookbehind by breaking a run somewhere inside mask 2
854 * (indices 128-191)
855 * 2. Fail lookbehind by breaking the run somewhere inside mask 1
856 * (indices 64-127)
857 * 3. Ensure that we can still find free space in mask 1 afterwards
858 */
859
860 /* break run on mask 2 */
861 rte_fbarray_set_used(&param.arr, 130);
862 /* break run on mask 1 */
863 rte_fbarray_set_used(&param.arr, 70);
864
865 /* start from 190, we expect to find free space at 8 */
866 TEST_ASSERT_EQUAL(rte_fbarray_find_prev_n_free(&param.arr, 190, 62),
867 8, "Free chunk index is wrong\n");
868 return TEST_SUCCESS;
869}
712870
713static struct unit_test_suite fbarray_test_suite = {871static struct unit_test_suite fbarray_test_suite = {
714 .suite_name = "fbarray autotest",872 .suite_name = "fbarray autotest",
@@ -717,12 +875,19 @@ static struct unit_test_suite fbarray_test_suite = {
717 .unit_test_cases = {875 .unit_test_cases = {
718 TEST_CASE(test_invalid),876 TEST_CASE(test_invalid),
719 TEST_CASE(test_basic),877 TEST_CASE(test_basic),
720 TEST_CASE_ST(first_msk_test_setup, reset_array, test_find),878 TEST_CASE_ST(first_msk_test_setup, reset_aligned, test_find),
721 TEST_CASE_ST(cross_msk_test_setup, reset_array, test_find),879 TEST_CASE_ST(cross_msk_test_setup, reset_aligned, test_find),
722 TEST_CASE_ST(multi_msk_test_setup, reset_array, test_find),880 TEST_CASE_ST(multi_msk_test_setup, reset_aligned, test_find),
723 TEST_CASE_ST(last_msk_test_setup, reset_array, test_find),881 TEST_CASE_ST(last_msk_test_setup, reset_aligned, test_find),
724 TEST_CASE_ST(full_msk_test_setup, reset_array, test_find),882 TEST_CASE_ST(full_msk_test_setup, reset_aligned, test_find),
725 TEST_CASE_ST(empty_msk_test_setup, reset_array, test_empty),883 /* empty test does not need setup */
884 TEST_CASE_ST(NULL, reset_aligned, test_empty),
885 TEST_CASE_ST(lookahead_test_setup, reset_aligned, test_lookahead),
886 TEST_CASE_ST(lookbehind_test_setup, reset_aligned, test_lookbehind),
887 /* setup for these tests is more complex so do it in test func */
888 TEST_CASE_ST(NULL, reset_aligned, test_lookahead_mask),
889 TEST_CASE_ST(NULL, reset_aligned, test_lookbehind_mask),
890 TEST_CASE_ST(unaligned_test_setup, reset_unaligned, test_find_unaligned),
726 TEST_CASES_END()891 TEST_CASES_END()
727 }892 }
728};893};
diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
index 0d5cfd4..39d4ad0 100644
--- a/app/test/test_link_bonding.c
+++ b/app/test/test_link_bonding.c
@@ -787,7 +787,7 @@ test_set_primary_slave(void)
787 TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),787 TEST_ASSERT_SUCCESS(rte_eth_macaddr_get(test_params->bonded_port_id, &read_mac_addr),
788 "Failed to get mac address (port %d)",788 "Failed to get mac address (port %d)",
789 test_params->bonded_port_id);789 test_params->bonded_port_id);
790 TEST_ASSERT_SUCCESS(memcmp(&read_mac_addr, &read_mac_addr,790 TEST_ASSERT_SUCCESS(memcmp(expected_mac_addr, &read_mac_addr,
791 sizeof(read_mac_addr)),791 sizeof(read_mac_addr)),
792 "bonded port mac address not set to that of primary port\n");792 "bonded port mac address not set to that of primary port\n");
793793
diff --git a/app/test/test_link_bonding_rssconf.c b/app/test/test_link_bonding_rssconf.c
index 6eb473b..9f11804 100644
--- a/app/test/test_link_bonding_rssconf.c
+++ b/app/test/test_link_bonding_rssconf.c
@@ -618,7 +618,6 @@ test_setup(void)
618 mac_addr.addr_bytes[5] = 0x10 + port->port_id;618 mac_addr.addr_bytes[5] = 0x10 + port->port_id;
619 rte_eth_dev_default_mac_addr_set(port->port_id, &mac_addr);619 rte_eth_dev_default_mac_addr_set(port->port_id, &mac_addr);
620620
621 rte_eth_dev_info_get(port->port_id, &port->dev_info);
622 retval = rte_eth_dev_info_get(port->port_id, &port->dev_info);621 retval = rte_eth_dev_info_get(port->port_id, &port->dev_info);
623 TEST_ASSERT((retval == 0),622 TEST_ASSERT((retval == 0),
624 "Error during getting device (port %u) info: %s\n",623 "Error during getting device (port %u) info: %s\n",
diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
index 4d013cd..051b903 100644
--- a/app/test/test_power_cpufreq.c
+++ b/app/test/test_power_cpufreq.c
@@ -9,6 +9,7 @@
9#include <string.h>9#include <string.h>
10#include <inttypes.h>10#include <inttypes.h>
11#include <rte_cycles.h>11#include <rte_cycles.h>
12#include <rte_lcore.h>
1213
13#include "test.h"14#include "test.h"
1415
@@ -46,9 +47,10 @@ test_power_caps(void)
4647
47static uint32_t total_freq_num;48static uint32_t total_freq_num;
48static uint32_t freqs[TEST_POWER_FREQS_NUM_MAX];49static uint32_t freqs[TEST_POWER_FREQS_NUM_MAX];
50static uint32_t cpu_id;
4951
50static int52static int
51check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo)53check_cur_freq(__rte_unused unsigned int lcore_id, uint32_t idx, bool turbo)
52{54{
53#define TEST_POWER_CONVERT_TO_DECIMAL 1055#define TEST_POWER_CONVERT_TO_DECIMAL 10
54#define MAX_LOOP 10056#define MAX_LOOP 100
@@ -62,13 +64,13 @@ check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo)
62 int i;64 int i;
6365
64 if (snprintf(fullpath, sizeof(fullpath),66 if (snprintf(fullpath, sizeof(fullpath),
65 TEST_POWER_SYSFILE_CPUINFO_FREQ, lcore_id) < 0) {67 TEST_POWER_SYSFILE_CPUINFO_FREQ, cpu_id) < 0) {
66 return 0;68 return 0;
67 }69 }
68 f = fopen(fullpath, "r");70 f = fopen(fullpath, "r");
69 if (f == NULL) {71 if (f == NULL) {
70 if (snprintf(fullpath, sizeof(fullpath),72 if (snprintf(fullpath, sizeof(fullpath),
71 TEST_POWER_SYSFILE_SCALING_FREQ, lcore_id) < 0) {73 TEST_POWER_SYSFILE_SCALING_FREQ, cpu_id) < 0) {
72 return 0;74 return 0;
73 }75 }
74 f = fopen(fullpath, "r");76 f = fopen(fullpath, "r");
@@ -486,6 +488,19 @@ test_power_cpufreq(void)
486{488{
487 int ret = -1;489 int ret = -1;
488 enum power_management_env env;490 enum power_management_env env;
491 rte_cpuset_t lcore_cpus;
492
493 lcore_cpus = rte_lcore_cpuset(TEST_POWER_LCORE_ID);
494 if (CPU_COUNT(&lcore_cpus) != 1) {
495 printf("Power management doesn't support lcore %u mapping to %u CPUs\n",
496 TEST_POWER_LCORE_ID,
497 CPU_COUNT(&lcore_cpus));
498 return TEST_SKIPPED;
499 }
500 for (cpu_id = 0; cpu_id < CPU_SETSIZE; cpu_id++) {
501 if (CPU_ISSET(cpu_id, &lcore_cpus))
502 break;
503 }
489504
490 /* Test initialisation of a valid lcore */505 /* Test initialisation of a valid lcore */
491 ret = rte_power_init(TEST_POWER_LCORE_ID);506 ret = rte_power_init(TEST_POWER_LCORE_ID);
diff --git a/buildtools/pmdinfogen.py b/buildtools/pmdinfogen.py
index 2a44f17..dfb8950 100755
--- a/buildtools/pmdinfogen.py
+++ b/buildtools/pmdinfogen.py
@@ -6,6 +6,7 @@
6import argparse6import argparse
7import ctypes7import ctypes
8import json8import json
9import re
9import sys10import sys
10import tempfile11import tempfile
1112
@@ -66,11 +67,11 @@ class ELFImage:
66 return [symbol]67 return [symbol]
67 return None68 return None
6869
69 def find_by_prefix(self, prefix):70 def find_by_pattern(self, pattern):
70 prefix = prefix.encode("utf-8") if self._legacy_elftools else prefix71 pattern = pattern.encode("utf-8") if self._legacy_elftools else pattern
71 for i in range(self._symtab.num_symbols()):72 for i in range(self._symtab.num_symbols()):
72 symbol = self._symtab.get_symbol(i)73 symbol = self._symtab.get_symbol(i)
73 if symbol.name.startswith(prefix):74 if re.match(pattern, symbol.name):
74 yield ELFSymbol(self._image, symbol)75 yield ELFSymbol(self._image, symbol)
7576
7677
@@ -97,9 +98,9 @@ class COFFImage:
97 def is_big_endian(self):98 def is_big_endian(self):
98 return False99 return False
99100
100 def find_by_prefix(self, prefix):101 def find_by_pattern(self, pattern):
101 for symbol in self._image.symbols:102 for symbol in self._image.symbols:
102 if symbol.name.startswith(prefix):103 if re.match(pattern, symbol.name):
103 yield COFFSymbol(self._image, symbol)104 yield COFFSymbol(self._image, symbol)
104105
105 def find_by_name(self, name):106 def find_by_name(self, name):
@@ -199,7 +200,7 @@ class Driver:
199200
200def load_drivers(image):201def load_drivers(image):
201 drivers = []202 drivers = []
202 for symbol in image.find_by_prefix("this_pmd_name"):203 for symbol in image.find_by_pattern("^this_pmd_name[0-9]+$"):
203 drivers.append(Driver.load(image, symbol))204 drivers.append(Driver.load(image, symbol))
204 return drivers205 return drivers
205206
diff --git a/config/arm/arm32_armv8_linux_gcc b/config/arm/arm32_armv8_linux_gcc
index 0d4618e..6879047 100644
--- a/config/arm/arm32_armv8_linux_gcc
+++ b/config/arm/arm32_armv8_linux_gcc
@@ -4,6 +4,7 @@ cpp = 'arm-linux-gnueabihf-g++'
4ar = 'arm-linux-gnueabihf-gcc-ar'4ar = 'arm-linux-gnueabihf-gcc-ar'
5strip = 'arm-linux-gnueabihf-strip'5strip = 'arm-linux-gnueabihf-strip'
6pkgconfig = 'arm-linux-gnueabihf-pkg-config'6pkgconfig = 'arm-linux-gnueabihf-pkg-config'
7pkg-config = 'arm-linux-gnueabihf-pkg-config'
7pcap-config = ''8pcap-config = ''
89
9[host_machine]10[host_machine]
diff --git a/config/arm/arm64_armada_linux_gcc b/config/arm/arm64_armada_linux_gcc
index 5043b82..64d702c 100644
--- a/config/arm/arm64_armada_linux_gcc
+++ b/config/arm/arm64_armada_linux_gcc
@@ -5,6 +5,7 @@ ar = 'aarch64-linux-gnu-ar'
5as = 'aarch64-linux-gnu-as'5as = 'aarch64-linux-gnu-as'
6strip = 'aarch64-linux-gnu-strip'6strip = 'aarch64-linux-gnu-strip'
7pkgconfig = 'aarch64-linux-gnu-pkg-config'7pkgconfig = 'aarch64-linux-gnu-pkg-config'
8pkg-config = 'aarch64-linux-gnu-pkg-config'
8pcap-config = ''9pcap-config = ''
910
10[host_machine]11[host_machine]
diff --git a/config/arm/arm64_armv8_linux_clang_ubuntu b/config/arm/arm64_armv8_linux_clang_ubuntu
index db488d7..e857774 100644
--- a/config/arm/arm64_armv8_linux_clang_ubuntu
+++ b/config/arm/arm64_armv8_linux_clang_ubuntu
@@ -6,6 +6,7 @@ strip = 'llvm-strip'
6llvm-config = 'llvm-config'6llvm-config = 'llvm-config'
7pcap-config = 'llvm-config'7pcap-config = 'llvm-config'
8pkgconfig = 'aarch64-linux-gnu-pkg-config'8pkgconfig = 'aarch64-linux-gnu-pkg-config'
9pkg-config = 'aarch64-linux-gnu-pkg-config'
910
10[host_machine]11[host_machine]
11system = 'linux'12system = 'linux'
diff --git a/config/arm/arm64_armv8_linux_gcc b/config/arm/arm64_armv8_linux_gcc
index 5c32f6b..b0654f3 100644
--- a/config/arm/arm64_armv8_linux_gcc
+++ b/config/arm/arm64_armv8_linux_gcc
@@ -4,6 +4,7 @@ cpp = 'aarch64-linux-gnu-g++'
4ar = 'aarch64-linux-gnu-gcc-ar'4ar = 'aarch64-linux-gnu-gcc-ar'
5strip = 'aarch64-linux-gnu-strip'5strip = 'aarch64-linux-gnu-strip'
6pkgconfig = 'aarch64-linux-gnu-pkg-config'6pkgconfig = 'aarch64-linux-gnu-pkg-config'
7pkg-config = 'aarch64-linux-gnu-pkg-config'
7pcap-config = ''8pcap-config = ''
89
9[host_machine]10[host_machine]
diff --git a/config/arm/arm64_bluefield_linux_gcc b/config/arm/arm64_bluefield_linux_gcc
index df6eccc..347864d 100644
--- a/config/arm/arm64_bluefield_linux_gcc
+++ b/config/arm/arm64_bluefield_linux_gcc
@@ -4,6 +4,7 @@ cpp = 'aarch64-linux-gnu-g++'
4ar = 'aarch64-linux-gnu-gcc-ar'4ar = 'aarch64-linux-gnu-gcc-ar'
5strip = 'aarch64-linux-gnu-strip'5strip = 'aarch64-linux-gnu-strip'
6pkgconfig = 'aarch64-linux-gnu-pkg-config'6pkgconfig = 'aarch64-linux-gnu-pkg-config'
7pkg-config = 'aarch64-linux-gnu-pkg-config'
7pcap-config = ''8pcap-config = ''
89
9[host_machine]10[host_machine]
diff --git a/config/arm/arm64_centriq2400_linux_gcc b/config/arm/arm64_centriq2400_linux_gcc
index ddffc05..bdc1e59 100644
--- a/config/arm/arm64_centriq2400_linux_gcc
+++ b/config/arm/arm64_centriq2400_linux_gcc
@@ -4,6 +4,7 @@ cpp = 'aarch64-linux-gnu-g++'
4ar = 'aarch64-linux-gnu-gcc-ar'4ar = 'aarch64-linux-gnu-gcc-ar'
5strip = 'aarch64-linux-gnu-strip'5strip = 'aarch64-linux-gnu-strip'
6pkgconfig = 'aarch64-linux-gnu-pkg-config'6pkgconfig = 'aarch64-linux-gnu-pkg-config'
7pkg-config = 'aarch64-linux-gnu-pkg-config'
7pcap-config = ''8pcap-config = ''
89
9[host_machine]10[host_machine]
diff --git a/config/arm/arm64_cn10k_linux_gcc b/config/arm/arm64_cn10k_linux_gcc
index 19068f0..7834d8d 100644
--- a/config/arm/arm64_cn10k_linux_gcc
+++ b/config/arm/arm64_cn10k_linux_gcc
@@ -4,6 +4,7 @@ cpp = 'aarch64-linux-gnu-g++'
4ar = 'aarch64-linux-gnu-gcc-ar'4ar = 'aarch64-linux-gnu-gcc-ar'
5strip = 'aarch64-linux-gnu-strip'5strip = 'aarch64-linux-gnu-strip'
6pkgconfig = 'aarch64-linux-gnu-pkg-config'6pkgconfig = 'aarch64-linux-gnu-pkg-config'
7pkg-config = 'aarch64-linux-gnu-pkg-config'
7pcap-config = ''8pcap-config = ''
89
9[host_machine]10[host_machine]
diff --git a/config/arm/arm64_dpaa_linux_gcc b/config/arm/arm64_dpaa_linux_gcc
index 70df99f..eeaff59 100644
--- a/config/arm/arm64_dpaa_linux_gcc
+++ b/config/arm/arm64_dpaa_linux_gcc
@@ -5,6 +5,7 @@ ar = 'aarch64-linux-gnu-ar'
5as = 'aarch64-linux-gnu-as'5as = 'aarch64-linux-gnu-as'
6strip = 'aarch64-linux-gnu-strip'6strip = 'aarch64-linux-gnu-strip'
7pkgconfig = 'aarch64-linux-gnu-pkg-config'7pkgconfig = 'aarch64-linux-gnu-pkg-config'
8pkg-config = 'aarch64-linux-gnu-pkg-config'
8pcap-config = ''9pcap-config = ''
910
10[host_machine]11[host_machine]
diff --git a/config/arm/arm64_emag_linux_gcc b/config/arm/arm64_emag_linux_gcc
index 06f5eae..d7e58c3 100644
--- a/config/arm/arm64_emag_linux_gcc
+++ b/config/arm/arm64_emag_linux_gcc
@@ -4,6 +4,7 @@ cpp = 'aarch64-linux-gnu-g++'
4ar = 'aarch64-linux-gnu-gcc-ar'4ar = 'aarch64-linux-gnu-gcc-ar'
5strip = 'aarch64-linux-gnu-strip'5strip = 'aarch64-linux-gnu-strip'
6pkgconfig = 'aarch64-linux-gnu-pkg-config'6pkgconfig = 'aarch64-linux-gnu-pkg-config'
7pkg-config = 'aarch64-linux-gnu-pkg-config'
7pcap-config = ''8pcap-config = ''
89
9[host_machine]10[host_machine]
diff --git a/config/arm/arm64_graviton2_linux_gcc b/config/arm/arm64_graviton2_linux_gcc
index 24b2dbc..75f7919 100644
--- a/config/arm/arm64_graviton2_linux_gcc
+++ b/config/arm/arm64_graviton2_linux_gcc
@@ -4,6 +4,7 @@ cpp = 'aarch64-linux-gnu-g++'
4ar = 'aarch64-linux-gnu-gcc-ar'4ar = 'aarch64-linux-gnu-gcc-ar'
5strip = 'aarch64-linux-gnu-strip'5strip = 'aarch64-linux-gnu-strip'
6pkgconfig = 'aarch64-linux-gnu-pkg-config'6pkgconfig = 'aarch64-linux-gnu-pkg-config'
7pkg-config = 'aarch64-linux-gnu-pkg-config'
7pcap-config = ''8pcap-config = ''
89
9[host_machine]10[host_machine]
diff --git a/config/arm/arm64_kunpeng920_linux_gcc b/config/arm/arm64_kunpeng920_linux_gcc
index 4a71531..5671b66 100644
--- a/config/arm/arm64_kunpeng920_linux_gcc
+++ b/config/arm/arm64_kunpeng920_linux_gcc
@@ -4,6 +4,7 @@ cpp = 'aarch64-linux-gnu-g++'
4ar = 'aarch64-linux-gnu-gcc-ar'4ar = 'aarch64-linux-gnu-gcc-ar'
5strip = 'aarch64-linux-gnu-strip'5strip = 'aarch64-linux-gnu-strip'
6pkgconfig = 'aarch64-linux-gnu-pkg-config'6pkgconfig = 'aarch64-linux-gnu-pkg-config'
7pkg-config = 'aarch64-linux-gnu-pkg-config'
7pcap-config = ''8pcap-config = ''
89
9[host_machine]10[host_machine]
diff --git a/config/arm/arm64_kunpeng930_linux_gcc b/config/arm/arm64_kunpeng930_linux_gcc
index 383f0b0..9ead4b1 100644
--- a/config/arm/arm64_kunpeng930_linux_gcc
+++ b/config/arm/arm64_kunpeng930_linux_gcc
@@ -4,6 +4,7 @@ cpp = 'aarch64-linux-gnu-g++'
4ar = 'aarch64-linux-gnu-gcc-ar'4ar = 'aarch64-linux-gnu-gcc-ar'
5strip = 'aarch64-linux-gnu-strip'5strip = 'aarch64-linux-gnu-strip'
6pkgconfig = 'aarch64-linux-gnu-pkg-config'6pkgconfig = 'aarch64-linux-gnu-pkg-config'
7pkg-config = 'aarch64-linux-gnu-pkg-config'
7pcap-config = ''8pcap-config = ''
89
9[host_machine]10[host_machine]
diff --git a/config/arm/arm64_n1sdp_linux_gcc b/config/arm/arm64_n1sdp_linux_gcc
index 5f6356c..3432ead 100644
--- a/config/arm/arm64_n1sdp_linux_gcc
+++ b/config/arm/arm64_n1sdp_linux_gcc
@@ -4,6 +4,7 @@ cpp = 'aarch64-linux-gnu-g++'
4ar = 'aarch64-linux-gnu-gcc-ar'4ar = 'aarch64-linux-gnu-gcc-ar'
5strip = 'aarch64-linux-gnu-strip'5strip = 'aarch64-linux-gnu-strip'
6pkgconfig = 'aarch64-linux-gnu-pkg-config'6pkgconfig = 'aarch64-linux-gnu-pkg-config'
7pkg-config = 'aarch64-linux-gnu-pkg-config'
7pcap-config = ''8pcap-config = ''
89
9[host_machine]10[host_machine]
diff --git a/config/arm/arm64_n2_linux_gcc b/config/arm/arm64_n2_linux_gcc
index 82806ba..f02780d 100644
--- a/config/arm/arm64_n2_linux_gcc
+++ b/config/arm/arm64_n2_linux_gcc
@@ -4,6 +4,7 @@ cpp = 'aarch64-linux-gnu-g++'
4ar = 'aarch64-linux-gnu-gcc-ar'4ar = 'aarch64-linux-gnu-gcc-ar'
5strip = 'aarch64-linux-gnu-strip'5strip = 'aarch64-linux-gnu-strip'
6pkgconfig = 'aarch64-linux-gnu-pkg-config'6pkgconfig = 'aarch64-linux-gnu-pkg-config'
7pkg-config = 'aarch64-linux-gnu-pkg-config'
7pcap-config = ''8pcap-config = ''
89
9[host_machine]10[host_machine]
diff --git a/config/arm/arm64_octeontx2_linux_gcc b/config/arm/arm64_octeontx2_linux_gcc
index d23b652..a854086 100644
--- a/config/arm/arm64_octeontx2_linux_gcc
+++ b/config/arm/arm64_octeontx2_linux_gcc
@@ -4,6 +4,7 @@ cpp = 'aarch64-linux-gnu-g++'
4ar = 'aarch64-linux-gnu-gcc-ar'4ar = 'aarch64-linux-gnu-gcc-ar'
5strip = 'aarch64-linux-gnu-strip'5strip = 'aarch64-linux-gnu-strip'
6pkgconfig = 'aarch64-linux-gnu-pkg-config'6pkgconfig = 'aarch64-linux-gnu-pkg-config'
7pkg-config = 'aarch64-linux-gnu-pkg-config'
7pcap-config = ''8pcap-config = ''
89
9[host_machine]10[host_machine]
diff --git a/config/arm/arm64_stingray_linux_gcc b/config/arm/arm64_stingray_linux_gcc
index cf98337..4e9ebc5 100644
--- a/config/arm/arm64_stingray_linux_gcc
+++ b/config/arm/arm64_stingray_linux_gcc
@@ -4,6 +4,7 @@ cpp = 'aarch64-linux-gnu-g++'
4ar = 'aarch64-linux-gnu-gcc-ar'4ar = 'aarch64-linux-gnu-gcc-ar'
5strip = 'aarch64-linux-gnu-strip'5strip = 'aarch64-linux-gnu-strip'
6pkgconfig = 'aarch64-linux-gnu-pkg-config'6pkgconfig = 'aarch64-linux-gnu-pkg-config'
7pkg-config = 'aarch64-linux-gnu-pkg-config'
7pcap-config = ''8pcap-config = ''
89
9[host_machine]10[host_machine]
diff --git a/config/arm/arm64_thunderx2_linux_gcc b/config/arm/arm64_thunderx2_linux_gcc
index 616f6c2..8c4ee77 100644
--- a/config/arm/arm64_thunderx2_linux_gcc
+++ b/config/arm/arm64_thunderx2_linux_gcc
@@ -4,6 +4,7 @@ cpp = 'aarch64-linux-gnu-g++'
4ar = 'aarch64-linux-gnu-gcc-ar'4ar = 'aarch64-linux-gnu-gcc-ar'
5strip = 'aarch64-linux-gnu-strip'5strip = 'aarch64-linux-gnu-strip'
6pkgconfig = 'aarch64-linux-gnu-pkg-config'6pkgconfig = 'aarch64-linux-gnu-pkg-config'
7pkg-config = 'aarch64-linux-gnu-pkg-config'
7pcap-config = ''8pcap-config = ''
89
9[host_machine]10[host_machine]
diff --git a/config/arm/arm64_thunderxt88_linux_gcc b/config/arm/arm64_thunderxt88_linux_gcc
index 131f564..9f2af4c 100644
--- a/config/arm/arm64_thunderxt88_linux_gcc
+++ b/config/arm/arm64_thunderxt88_linux_gcc
@@ -4,6 +4,7 @@ cpp = 'aarch64-linux-gnu-g++'
4ar = 'aarch64-linux-gnu-gcc-ar'4ar = 'aarch64-linux-gnu-gcc-ar'
5strip = 'aarch64-linux-gnu-strip'5strip = 'aarch64-linux-gnu-strip'
6pkgconfig = 'aarch64-linux-gnu-pkg-config'6pkgconfig = 'aarch64-linux-gnu-pkg-config'
7pkg-config = 'aarch64-linux-gnu-pkg-config'
7pcap-config = ''8pcap-config = ''
89
9[host_machine]10[host_machine]
diff --git a/config/x86/cross-mingw b/config/x86/cross-mingw
index 09f7af0..fab1a70 100644
--- a/config/x86/cross-mingw
+++ b/config/x86/cross-mingw
@@ -5,6 +5,7 @@ ld = 'x86_64-w64-mingw32-ld'
5ar = 'x86_64-w64-mingw32-ar'5ar = 'x86_64-w64-mingw32-ar'
6strip = 'x86_64-w64-mingw32-strip'6strip = 'x86_64-w64-mingw32-strip'
7pkgconfig = 'x86_64-w64-mingw32-pkg-config'7pkgconfig = 'x86_64-w64-mingw32-pkg-config'
8pkg-config = 'x86_64-w64-mingw32-pkg-config'
8objdump = 'x86_64-w64-mingw32-objdump'9objdump = 'x86_64-w64-mingw32-objdump'
910
10[host_machine]11[host_machine]
diff --git a/debian/changelog b/debian/changelog
index 93692d0..67adbed 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
1dpdk (21.11.9-0ubuntu0.22.04.1) jammy; urgency=medium
2
3 * Merge LTS stable release 21.11.9 (LP: #2067480)
4 - Full release notes are available at:
5 https://doc.dpdk.org/guides-21.11/rel_notes/release_21_11.html#id32
6
7 -- Arif Ali <arif.ali@canonical.com> Tue, 06 May 2025 06:56:35 +0000
8
1dpdk (21.11.7-0ubuntu0.22.04.1) jammy; urgency=medium9dpdk (21.11.7-0ubuntu0.22.04.1) jammy; urgency=medium
210
3 * Merge LTS stable release 21.11.7 (LP: #2067480)11 * Merge LTS stable release 21.11.7 (LP: #2067480)
diff --git a/devtools/git-log-fixes.sh b/devtools/git-log-fixes.sh
index 210c8dc..0cac34c 100755
--- a/devtools/git-log-fixes.sh
+++ b/devtools/git-log-fixes.sh
@@ -68,7 +68,7 @@ origin_version () # <origin_hash> ...
68{68{
69 for origin in $* ; do69 for origin in $* ; do
70 # check hash is valid70 # check hash is valid
71 git rev-parse -q --verify $1 >&- || continue71 git rev-parse -q --verify $origin >&- || continue
72 # get version of this bug origin72 # get version of this bug origin
73 local origver=$(commit_version $origin)73 local origver=$(commit_version $origin)
74 local roothashes="$(origin_filter $origin)"74 local roothashes="$(origin_filter $origin)"
diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index 841f370..adbf118 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -688,14 +688,32 @@ Basic stats
688Support basic statistics such as: ipackets, opackets, ibytes, obytes,688Support basic statistics such as: ipackets, opackets, ibytes, obytes,
689imissed, ierrors, oerrors, rx_nombuf.689imissed, ierrors, oerrors, rx_nombuf.
690690
691And per queue stats: q_ipackets, q_opackets, q_ibytes, q_obytes, q_errors.
692
693These apply to all drivers.691These apply to all drivers.
694692
695* **[implements] eth_dev_ops**: ``stats_get``, ``stats_reset``.693* **[implements] eth_dev_ops**: ``stats_get``, ``stats_reset``.
696* **[related] API**: ``rte_eth_stats_get``, ``rte_eth_stats_reset()``.694* **[related] API**: ``rte_eth_stats_get``, ``rte_eth_stats_reset()``.
697695
698696
697.. _nic_features_stats_per_queue:
698
699Stats per queue
700---------------
701
702Supports per queue stats: q_ipackets, q_opackets, q_ibytes, q_obytes, q_errors.
703Statistics only supplied for first ``RTE_ETHDEV_QUEUE_STAT_CNTRS`` (16) queues.
704If driver does not support this feature the per queue stats will be zero.
705
706* **[implements] eth_dev_ops**: ``stats_get``, ``stats_reset``.
707* **[related] API**: ``rte_eth_stats_get``, ``rte_eth_stats_reset()``.
708
709May also support configuring per-queue stat counter mapping.
710Used by some drivers to workaround HW limitations.
711
712* **[implements] eth_dev_ops**: ``queue_stats_mapping_set``.
713* **[related] API**: ``rte_eth_dev_set_rx_queue_stats_mapping()``,
714 ``rte_eth_dev_set_tx_queue_stats_mapping()``.
715
716
699.. _nic_features_extended_stats:717.. _nic_features_extended_stats:
700718
701Extended stats719Extended stats
@@ -710,18 +728,6 @@ Supports Extended Statistics, changes from driver to driver.
710 ``rte_eth_xstats_get_names_by_id()``, ``rte_eth_xstats_get_id_by_name()``.728 ``rte_eth_xstats_get_names_by_id()``, ``rte_eth_xstats_get_id_by_name()``.
711729
712730
713.. _nic_features_stats_per_queue:
714
715Stats per queue
716---------------
717
718Supports configuring per-queue stat counter mapping.
719
720* **[implements] eth_dev_ops**: ``queue_stats_mapping_set``.
721* **[related] API**: ``rte_eth_dev_set_rx_queue_stats_mapping()``,
722 ``rte_eth_dev_set_tx_queue_stats_mapping()``.
723
724
725.. _nic_features_traffic_manager:731.. _nic_features_traffic_manager:
726732
727Traffic manager733Traffic manager
diff --git a/doc/guides/prog_guide/img/mbuf1.svg b/doc/guides/prog_guide/img/mbuf1.svg
index a08bf3b..111a874 100644
--- a/doc/guides/prog_guide/img/mbuf1.svg
+++ b/doc/guides/prog_guide/img/mbuf1.svg
@@ -487,7 +487,7 @@
487 sodipodi:role="line"487 sodipodi:role="line"
488 id="tspan5256"488 id="tspan5256"
489 x="59.842155"489 x="59.842155"
490 y="282.37683">m-&gt;pkt.next = NULL</tspan></text>490 y="282.37683">m-&gt;next = NULL</tspan></text>
491 <text491 <text
492 xml:space="preserve"492 xml:space="preserve"
493 style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"493 style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
diff --git a/doc/guides/prog_guide/img/mbuf2.svg b/doc/guides/prog_guide/img/mbuf2.svg
index f6fdb54..6a80cbc 100644
--- a/doc/guides/prog_guide/img/mbuf2.svg
+++ b/doc/guides/prog_guide/img/mbuf2.svg
@@ -1074,7 +1074,7 @@
1074 sodipodi:role="line"1074 sodipodi:role="line"
1075 id="tspan5256-8"1075 id="tspan5256-8"
1076 x="527.19458"1076 x="527.19458"
1077 y="628.45935">m-&gt;pkt.next = NULL</tspan></text>1077 y="628.45935">m-&gt;next = NULL</tspan></text>
1078 <text1078 <text
1079 xml:space="preserve"1079 xml:space="preserve"
1080 style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"1080 style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
@@ -1084,7 +1084,7 @@
1084 sodipodi:role="line"1084 sodipodi:role="line"
1085 id="tspan5256-8-3"1085 id="tspan5256-8-3"
1086 x="330.50363"1086 x="330.50363"
1087 y="628.45935">m-&gt;pkt.next = mseg3</tspan></text>1087 y="628.45935">m-&gt;next = mseg3</tspan></text>
1088 <text1088 <text
1089 xml:space="preserve"1089 xml:space="preserve"
1090 style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"1090 style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
@@ -1094,7 +1094,7 @@
1094 sodipodi:role="line"1094 sodipodi:role="line"
1095 id="tspan5256-8-3-4"1095 id="tspan5256-8-3-4"
1096 x="144.79388"1096 x="144.79388"
1097 y="628.45935">m-&gt;pkt.next = mseg2</tspan></text>1097 y="628.45935">m-&gt;next = mseg2</tspan></text>
1098 <text1098 <text
1099 xml:space="preserve"1099 xml:space="preserve"
1100 style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"1100 style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
diff --git a/doc/guides/prog_guide/mbuf_lib.rst b/doc/guides/prog_guide/mbuf_lib.rst
index 049357c..749f9c9 100644
--- a/doc/guides/prog_guide/mbuf_lib.rst
+++ b/doc/guides/prog_guide/mbuf_lib.rst
@@ -134,7 +134,7 @@ a vxlan-encapsulated tcp packet:
134134
135 mb->l2_len = len(out_eth)135 mb->l2_len = len(out_eth)
136 mb->l3_len = len(out_ip)136 mb->l3_len = len(out_ip)
137 mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CSUM137 mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CKSUM
138 set out_ip checksum to 0 in the packet138 set out_ip checksum to 0 in the packet
139139
140 This is supported on hardware advertising RTE_ETH_TX_OFFLOAD_IPV4_CKSUM.140 This is supported on hardware advertising RTE_ETH_TX_OFFLOAD_IPV4_CKSUM.
@@ -143,7 +143,7 @@ a vxlan-encapsulated tcp packet:
143143
144 mb->l2_len = len(out_eth)144 mb->l2_len = len(out_eth)
145 mb->l3_len = len(out_ip)145 mb->l3_len = len(out_ip)
146 mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CSUM | RTE_MBUF_F_TX_UDP_CKSUM146 mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_UDP_CKSUM
147 set out_ip checksum to 0 in the packet147 set out_ip checksum to 0 in the packet
148 set out_udp checksum to pseudo header using rte_ipv4_phdr_cksum()148 set out_udp checksum to pseudo header using rte_ipv4_phdr_cksum()
149149
@@ -154,7 +154,7 @@ a vxlan-encapsulated tcp packet:
154154
155 mb->l2_len = len(out_eth + out_ip + out_udp + vxlan + in_eth)155 mb->l2_len = len(out_eth + out_ip + out_udp + vxlan + in_eth)
156 mb->l3_len = len(in_ip)156 mb->l3_len = len(in_ip)
157 mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CSUM157 mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CKSUM
158 set in_ip checksum to 0 in the packet158 set in_ip checksum to 0 in the packet
159159
160 This is similar to case 1), but l2_len is different. It is supported160 This is similar to case 1), but l2_len is different. It is supported
@@ -165,7 +165,7 @@ a vxlan-encapsulated tcp packet:
165165
166 mb->l2_len = len(out_eth + out_ip + out_udp + vxlan + in_eth)166 mb->l2_len = len(out_eth + out_ip + out_udp + vxlan + in_eth)
167 mb->l3_len = len(in_ip)167 mb->l3_len = len(in_ip)
168 mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CSUM | RTE_MBUF_F_TX_TCP_CKSUM168 mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_TCP_CKSUM
169 set in_ip checksum to 0 in the packet169 set in_ip checksum to 0 in the packet
170 set in_tcp checksum to pseudo header using rte_ipv4_phdr_cksum()170 set in_tcp checksum to pseudo header using rte_ipv4_phdr_cksum()
171171
diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst
index 66bf6fb..9a9fdf2 100644
--- a/doc/guides/rel_notes/release_21_11.rst
+++ b/doc/guides/rel_notes/release_21_11.rst
@@ -3483,3 +3483,642 @@ Tested Platforms
3483* df33fb53e4 rcu: fix acked token in debug log3483* df33fb53e4 rcu: fix acked token in debug log
3484* 063cddfc74 rcu: use atomic operation on acked token3484* 063cddfc74 rcu: use atomic operation on acked token
3485* 63bf81a617 test: fix named test macro3485* 63bf81a617 test: fix named test macro
3486
348721.11.8 Release Notes
3488---------------------
3489
3490
349121.11.8 Fixes
3492~~~~~~~~~~~~~
3493
3494* app/bbdev: fix interrupt tests
3495* app/dumpcap: handle SIGTERM and SIGHUP
3496* app/pdump: handle SIGTERM and SIGHUP
3497* app/testpmd: cleanup cleanly from signal
3498* app/testpmd: fix build on signed comparison
3499* app/testpmd: fix early exit from signal
3500* app/testpmd: fix help string of BPF load command
3501* app/testpmd: fix interactive mode on Windows
3502* app/testpmd: fix lcore ID restriction
3503* app/testpmd: fix outer IP checksum offload
3504* app/testpmd: fix parsing for connection tracking item
3505* app/testpmd: handle IEEE1588 init failure
3506* baseband/la12xx: forbid secondary process
3507* bpf: fix load hangs with six IPv6 addresses
3508* bpf: fix MOV instruction evaluation
3509* buildtools: fix build with clang 17 and ASan
3510* bus/dpaa: fix bus scan for DMA devices
3511* bus/dpaa: fix memory leak in bus scan
3512* bus/dpaa: remove redundant file descriptor check
3513* bus/pci: fix build with musl 1.2.4 / Alpine 3.19
3514* bus/pci: fix FD in secondary process
3515* bus/pci: fix UIO resource mapping in secondary process
3516* bus/vdev: fix device reinitialization
3517* common/dpaax/caamflib: fix PDCP AES-AES watchdog error
3518* common/dpaax/caamflib: fix PDCP-SDAP watchdog error
3519* common/dpaax: fix IOVA table cleanup
3520* common/dpaax: fix node array overrun
3521* common/mlx5: fix unsigned/signed mismatch
3522* common/mlx5: remove unneeded field when modify RQ table
3523* config: fix warning for cross build with meson >= 1.3.0
3524* crypto/cnxk: fix minimal input normalization
3525* cryptodev: fix build without crypto callbacks
3526* cryptodev: validate crypto callbacks from next node
3527* crypto/dpaa2_sec: fix event queue user context
3528* crypto/openssl: optimize 3DES-CTR context init
3529* dmadev: fix structure alignment
3530* dma/idxd: add generic option for queue config
3531* dma/idxd: add verbose option to config script
3532* dma/idxd: fix default for workqueue options
3533* dma/idxd: fix setup with Ubuntu 24.04
3534* doc: add baseline mode in l3fwd-power guide
3535* doc: fix mbuf flags
3536* doc: fix testpmd ring size command
3537* doc: fix typo in l2fwd-crypto guide
3538* doc: remove reference to mbuf pkt field
3539* eal: fix logs for '--lcores'
3540* eal/linux: lower log level on allocation attempt failure
3541* eal/unix: support ZSTD compression for firmware
3542* eal/windows: install sched.h file
3543* ethdev: fix device init without socket-local memory
3544* ethdev: fix GENEVE option item conversion
3545* event/sw: fix warning from useless snprintf
3546* fbarray: fix finding for unaligned length
3547* fbarray: fix incorrect lookahead behavior
3548* fbarray: fix incorrect lookbehind behavior
3549* fbarray: fix lookahead ignore mask handling
3550* fbarray: fix lookbehind ignore mask handling
3551* hash: check name when creating a hash
3552* hash: fix RCU reclamation size
3553* hash: fix return code description in Doxygen
3554* kni: use strscpy
3555* latencystats: fix literal float suffix
3556* malloc: fix multi-process wait condition handling
3557* net/af_packet: align Rx/Tx structs to cache line
3558* net/af_xdp: count mbuf allocation failures
3559* net/af_xdp: fix port ID in Rx mbuf
3560* net/ark: fix index arithmetic
3561* net/axgbe: check only minimum speed for cables
3562* net/axgbe: delay AN timeout during KR training
3563* net/axgbe: disable interrupts during device removal
3564* net/axgbe: fix connection for SFP+ active cables
3565* net/axgbe: fix fluctuations for 1G Bel Fuse SFP
3566* net/axgbe: fix linkup in PHY status
3567* net/axgbe: fix MDIO access for non-zero ports and CL45 PHYs
3568* net/axgbe: fix SFP codes check for DAC cables
3569* net/axgbe: fix Tx flow on 30H HW
3570* net/axgbe: reset link when link never comes back
3571* net/axgbe: update DMA coherency values
3572* net/cnxk: fix outbound security with higher packet burst
3573* net/cnxk: fix promiscuous state after MAC change
3574* net/cnxk: fix RSS config
3575* net/e1000/base: fix link power down
3576* net/ena: fix bad checksum handling
3577* net/ena: fix checksum handling
3578* net/ena: fix return value check
3579* net: fix outer UDP checksum in Intel prepare helper
3580* net/fm10k: fix cleanup during init failure
3581* net/hns3: check Rx DMA address alignmnent
3582* net/hns3: disable SCTP verification tag for RSS hash input
3583* net/hns3: fix double free for Rx/Tx queue
3584* net/hns3: fix offload flag of IEEE 1588
3585* net/hns3: fix Rx timestamp flag
3586* net/hns3: fix uninitialized variable in FEC query
3587* net/hns3: fix variable overflow
3588* net/i40e: fix outer UDP checksum offload for X710
3589* net/ice/base: fix board type definition
3590* net/ice/base: fix check for existing switch rule
3591* net/ice/base: fix GCS descriptor field offsets
3592* net/ice/base: fix masking when reading context
3593* net/ice/base: fix pointer to variable outside scope
3594* net/ice/base: fix potential TLV length overflow
3595* net/ice/base: fix return type of bitmap hamming weight
3596* net/ice/base: fix sign extension
3597* net/ice/base: fix size when allocating children arrays
3598* net/ice/base: fix temporary failures reading NVM
3599* net/ice: fix check for outer UDP checksum offload
3600* net/ice: fix memory leaks in raw pattern parsing
3601* net/ice: fix return value for raw pattern parsing
3602* net/ixgbe/base: fix 5G link speed reported on VF
3603* net/ixgbe/base: fix PHY ID for X550
3604* net/ixgbe/base: revert advertising for X550 2.5G/5G
3605* net/ixgbe: do not create delayed interrupt handler twice
3606* net/ixgbe: do not update link status in secondary process
3607* net/mlx5: fix Arm build with GCC 9.1
3608* net/mlx5: fix end condition of reading xstats
3609* net/mlx5: fix hash Rx queue release in flow sample
3610* net/mlx5: fix indexed pool with invalid index
3611* net/mlx5: fix MTU configuration
3612* net/mlx5: fix uplink port probing in bonding mode
3613* net/nfp: fix disabling 32-bit build
3614* net/ngbe: fix hotplug remove
3615* net/ngbe: fix memory leaks
3616* net/ngbe: fix MTU range
3617* net/ngbe: keep PHY power down while device probing
3618* net/softnic: fix maybe-uninitialized warning
3619* net/tap: fix file descriptor check in isolated flow
3620* net/txgbe: fix flow filters in VT mode
3621* net/txgbe: fix hotplug remove
3622* net/txgbe: fix memory leaks
3623* net/txgbe: fix MTU range
3624* net/txgbe: fix Rx interrupt
3625* net/txgbe: fix tunnel packet parsing
3626* net/txgbe: fix Tx hang on queue disable
3627* net/txgbe: fix VF promiscuous and allmulticast
3628* net/txgbe: reconfigure more MAC Rx registers
3629* net/txgbe: restrict configuration of VLAN strip offload
3630* net/virtio: fix MAC table update
3631* net/virtio-user: add memcpy check
3632* net/vmxnet3: fix init logs
3633* pcapng: add memcpy check
3634* telemetry: fix connection parameter parsing
3635* telemetry: lower log level on socket error
3636* test/crypto: fix allocation comment
3637* test/crypto: fix asymmetric capability test
3638* test/crypto: fix vector global buffer overflow
3639* test/crypto: remove unused stats in setup
3640* vdpa/sfc: remove dead code
3641* version: 21.11.8-rc1
3642* vhost: cleanup resubmit info before inflight setup
3643* vhost: fix build with GCC 13
3644
364521.11.8 Validation
3646~~~~~~~~~~~~~~~~~~
3647
3648* `Red Hat(R) Testing <https://mails.dpdk.org/archives/stable/2024-September/049938.html>`__
3649
3650 * Platform
3651
3652 * RHEL 9
3653 * Kernel 5.14
3654 * Qemu 8.2
3655 * X540-AT2 NIC(ixgbe, 10G)
3656
3657 * Functionality
3658
3659 * Guest with device assignment(PF) throughput testing(1G hugepage size)
3660 * Guest with device assignment(PF) throughput testing(2M hugepage size)
3661 * Guest with device assignment(VF) throughput testing
3662 * PVP (host dpdk testpmd as vswitch) 1Q: throughput testing
3663 * PVP vhost-user 2Q throughput testing
3664 * PVP vhost-user 1Q cross numa node throughput testing
3665 * Guest with vhost-user 2 queues throughput testing
3666 * vhost-user reconnect with dpdk-client, qemu-server: qemu reconnect
3667 * vhost-user reconnect with dpdk-client, qemu-server: ovs reconnect
3668 * PVP 1Q live migration testing
3669 * PVP 1Q cross numa node live migration testing
3670 * Guest with ovs+dpdk+vhost-user 1Q live migration testing
3671 * Guest with ovs+dpdk+vhost-user 1Q live migration testing (2M)
3672 * Guest with ovs+dpdk+vhost-user 2Q live migration testing
3673 * Guest with ovs+dpdk+vhost-user 4Q live migration testing
3674 * Host PF + DPDK testing
3675 * Host VF + DPDK testing
3676
3677
3678* `Intel(R) Testing <https://mails.dpdk.org/archives/stable/2024-September/049940.html>`__
3679
3680 * Basic Intel(R) NIC(ixgbe, i40e and ice) testing
3681
3682 * PF (i40e, ixgbe)
3683 * VF (i40e, ixgbe)
3684 * PF/VF (ice)
3685 * Compile Testing
3686 * Intel NIC single core/NIC performance
3687 * IPsec
3688
3689 * Basic cryptodev and virtio testing
3690
3691 * vhost/virtio basic loopback, PVP and performance test
3692 * cryptodev Function/Performance
3693
3694
3695* `Nvidia(R) Testing <https://mails.dpdk.org/archives/stable/2024-September/049948.html>`__
3696
3697 * Basic functionality with testpmd
3698
3699 * Tx/Rx
3700 * xstats
3701 * Timestamps
3702 * Link status
3703 * RTE flow
3704 * RSS
3705 * VLAN filtering, stripping and insertion
3706 * Checksum/TSO
3707 * ptype
3708 * link_status_interrupt example application
3709 * l3fwd-power example application
3710 * Multi-process example applications
3711 * Hardware LRO tests
3712 * Regex application
3713 * Buffer Split
3714 * Tx scheduling
3715
3716 * Build tests
3717 * ConnectX-6 Dx
3718 * ConnectX-7
3719 * BlueField-2
3720
372121.11.8 Known Issues
3722~~~~~~~~~~~~~~~~~~~~
3723
3724* DPDK 21.11.8 contains fixes up to DPDK 24.07
3725* Issues identified/fixed in DPDK main branch after DPDK 24.07 may be present in DPDK 21.11.8
3726
372721.11.8 Fixes skipped and status unresolved
3728~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3729
3730* c5b531d6ee app/crypto-perf: fix session freeing
3731* 61b52e7edb app/test: fix reference to master in bonding test
3732* 7bdf7a13ae app/testpmd: fix encap/decap size calculation
3733* 461c287ab5 app/testpmd: fix GRO packets flush on timeout
3734* ecf408d2aa app/testpmd: fix indirect action flush
3735* 4edbcc7b53 bpf: disable on 32-bit x86
3736* 4edbcc7b53 bpf: disable on 32-bit x86
3737* 5d8c1f6253 common/cnxk: check error in MAC address set
3738* a6f639e079 common/cnxk: fix BP threshold calculation
3739* 772e30281a common/cnxk: fix CPT backpressure disable on LBK
3740* 48054ca384 common/cnxk: fix link config for SDP
3741* 1c7a4d37e7 common/cnxk: fix mailbox timeout due to deadlock
3742* 59ceaa72d5 common/cnxk: fix part number for CN10K
3743* 5781638519 common/cnxk: fix RQ mask config for CN10KB chip
3744* 56fa6f92e9 common/cnxk: fix RSS key configuration
3745* 37ca457d3f common/mlx5: fix obtaining IB device in LAG mode
3746* cedb44dc87 common/mlx5: improve AES-XTS tweak capability check
3747* 7be74edb90 common/mlx5: use just sufficient barrier for Arm
3748* 046341575b crypto/dpaa_sec: fix IPsec descriptor
3749* 9d91c3047d crypto/openssl: fix memory leaks in asym operations
3750* 17d5bc6135 crypto/openssl: make per-QP auth context clones
3751* b1d7112602 crypto/openssl: make per-QP cipher context clones
3752* 3dd3115078 dma/cnxk: fix chunk buffer failure return code
3753* ba39a261a7 dma/cnxk: fix completion ring tail wrap
3754* 95a955e3e0 dma/cnxk: fix device reconfigure
3755* 2a3f42942a dma/hisilicon: remove support for HIP09 platform
3756* b9a87346b0 ethdev: fix strict aliasing in link up
3757* 694e8e643d event/cnxk: fix CASP usage for clang
3758* b37fe88a2c event/cnxk: fix LMTST write for single event mode
3759* 3fe71706ab event/cnxk: fix stale data in workslot
3760* 04dac73643 eventdev/crypto: fix enqueue count
3761* 4b04134cbb eventdev/crypto: fix failed events
3762* da73a2a0d1 eventdev/crypto: fix offset used while flushing events
3763* ad12d08f05 eventdev/crypto: fix opaque field handling
3764* f442c04001 eventdev/crypto: fix overflow in circular buffer
3765* 4b97893816 examples: fix lcore ID restriction
3766* 548de9091c examples: fix port ID restriction
3767* b23c5bd71a examples: fix queue ID restriction
3768* 9a518054b5 examples/l3fwd: fix duplicate expression for default nexthop
3769* 927cb43fe9 examples/l3fwd: fix port group mask with AltiVec
3770* 547f294357 gro: fix reordering of packets
3771* 6df1bc6b3b mempool/cnxk: avoid hang when counting batch allocs
3772* b3ddd649ad mempool/cnxk: fix alloc from non-EAL threads
3773* 97039941b2 net/af_xdp: parse UMEM map info from mempool
3774* abdabad636 net/af_xdp: remove unused local statistic
3775* e82b0fe097 net/axgbe: disable RRC for yellow carp devices
3776* a78a1ed8ba net/bonding: fix failover time of LACP with mode 4
3777* 02a2accb5f net/bonding: fix flow count query
3778* 26a6bda9df net/cnxk: add cookies check for multi-segment offload
3779* 5a0f64d84b net/cnxk: fix configuring large Rx/Tx queues
3780* 3232c95d2c net/cnxk: fix indirect mbuf handling in Tx
3781* 8ed5ca4dda net/cnxk: fix mbuf fields in multi-segment Tx
3782* 7752f14026 net/cnxk: fix Rx flush on CN10k
3783* 4c2f14bc6d net/cnxk: fix xstats reset
3784* ee0fa7552a net/dpaa: forbid MTU configuration for shared interface
3785* 0f044b6681 net/iavf: fix refine protocol header
3786* 0b241667cc net/iavf: fix tainted scalar
3787* b125c0e721 net/iavf: fix tainted scalar
3788* 92a16af450 net/iavf: fix virtchnl command called in interrupt
3789* df44ba7a3c net/ice/base: fix preparing PHY for timesync command
3790* e2072ba1b0 net/ice/base: fix resource leak
3791* 9749dffe23 net/ice: fix MAC type of E822 and E823
3792* 87e4384d26 net/mlx5: fix condition of LACP miss flow
3793* 2ece3b7186 net/mlx5: fix flow workspace double free in Windows
3794* 1cfb78d2c4 net/mlx5: fix meter policy priority
3795* 48adbc80ba net/mlx5: remove GENEVE options length limitation
3796* a74c5001e9 net/ngbe: add proper memory barriers in Rx
3797* 79be49dd2d net/ngbe: add special config for YT8531SH-CA PHY
3798* 31a28a99fd net/ngbe: add spinlock protection on YT PHY
3799* 21f702d556 net/ngbe: fix link status in no LSC mode
3800* 659cfce01e net/ngbe: remove redundant codes
3801* 44a8635459 net/thunderx: fix DMAC control register update
3802* 12011b11a3 net/txgbe: adapt to MNG veto bit setting
3803* 5e170dd8b6 net/txgbe: fix blocking system events
3804* 166591931b pcapng: modify timestamp calculation
3805* df33fb53e4 rcu: fix acked token in debug log
3806* 063cddfc74 rcu: use atomic operation on acked token
3807* 4ad17a1c8f test/crypto: fix enqueue/dequeue callback case
3808* 63bf81a617 test: fix named test macro
3809
381021.11.9 Release Notes
3811---------------------
3812
3813
381421.11.9 Fixes
3815~~~~~~~~~~~~~
3816
3817* app/dumpcap: remove unused struct array
3818* app/procinfo: fix leak on exit
3819* app/testpmd: fix aged flow destroy
3820* app/testpmd: remove flex item init command leftover
3821* app/testpmd: remove redundant policy action condition
3822* app/testpmd: remove unnecessary cast
3823* baseband/la12xx: fix use after free in modem config
3824* bpf: fix free function mismatch if convert fails
3825* build: remove version check on compiler links function
3826* bus/dpaa: fix lock condition during error handling
3827* bus/dpaa: fix PFDRs leaks due to FQRNIs
3828* bus/dpaa: fix the fman details status
3829* bus/dpaa: fix VSP for 1G fm1-mac9 and 10
3830* bus/fslmc: fix Coverity warnings in QBMAN
3831* common/cnxk: fix base log level
3832* common/cnxk: fix build on Ubuntu 24.04
3833* common/cnxk: fix RSS key configuration
3834* common/dpaax/caamflib: fix PDCP SNOW-ZUC watchdog
3835* common/mlx5: fix error CQE handling for 128 bytes CQE
3836* common/mlx5: fix misalignment
3837* crypto/bcmfs: fix free function mismatch
3838* crypto/dpaa2_sec: fix memory leak
3839* crypto/openssl: fix 3DES-CTR with big endian CPUs
3840* dev: fix callback lookup when unregistering device
3841* devtools: fix check of multiple commits fixed at once
3842* dmadev: fix potential null pointer access
3843* dma/idxd: fix free function mismatch in device probe
3844* doc: correct definition of stats per queue feature
3845* eal/x86: fix 32-bit write combining store
3846* ethdev: fix overflow in descriptor count
3847* ethdev: verify queue ID in Tx done cleanup
3848* event/cnxk: fix free function mismatch in port config
3849* eventdev: fix possible array underflow/overflow
3850* event/octeontx: fix possible integer overflow
3851* examples/eventdev: fix queue crash with generic pipeline
3852* examples/l2fwd-event: fix spinlock handling
3853* examples/ntb: check info query return
3854* examples/vhost: fix free function mismatch
3855* fib6: add runtime checks in AVX512 lookup
3856* fib: fix AVX512 lookup
3857* hash: fix thash LFSR initialization
3858* member: fix choice of bucket for displacement
3859* net/bnx2x: fix always true expression
3860* net/bnx2x: fix duplicate branch
3861* net/bnx2x: fix possible infinite loop at startup
3862* net/bnx2x: remove dead conditional
3863* net/bnxt: fix bad action offset in Tx BD
3864* net/bnxt: fix reading SFF-8436 SFP EEPROMs
3865* net/bnxt: fix TCP and UDP checksum flags
3866* net/bnxt/tf_core: fix Thor TF EM key size check
3867* net/cnxk: fix Rx offloads to handle timestamp
3868* net/cnxk: fix Rx timestamp handling for VF
3869* net/dpaa: fix reallocate mbuf handling
3870* net/dpaa: fix typecasting channel ID
3871* net/e1000: fix link status crash in secondary process
3872* net/e1000: fix use after free in filter flush
3873* net/ena: revert redefining memcpy
3874* net/hns3: fix dump counter of registers
3875* net/hns3: fix error code for repeatedly create counter
3876* net/hns3: fix fully use hardware flow director table
3877* net/hns3: remove some basic address dump
3878* net/hns3: restrict tunnel flow rule to one header
3879* net/hns3: verify reset type from firmware
3880* net/i40e/base: fix blinking X722 with X557 PHY
3881* net/i40e/base: fix DDP loading with reserved track ID
3882* net/i40e/base: fix loop bounds
3883* net/i40e/base: fix misleading debug logs and comments
3884* net/i40e/base: fix repeated register dumps
3885* net/i40e/base: fix setting flags in init function
3886* net/i40e/base: fix unchecked return value
3887* net/i40e: check register read for outer VLAN
3888* net/i40e: fix AVX-512 pointer copy on 32-bit
3889* net/iavf: add segment-length check to Tx prep
3890* net/iavf: fix AVX-512 pointer copy on 32-bit
3891* net/iavf: fix crash when link is unstable
3892* net/iavf: fix VF reset when using DCF
3893* net/iavf: preserve MAC address with i40e PF Linux driver
3894* net/ice/base: add bounds check
3895* net/ice/base: fix iteration of TLVs in Preserved Fields Area
3896* net/ice/base: fix link speed for 200G
3897* net/ice/base: fix VLAN replay after reset
3898* net/ice: detect stopping a flow director queue twice
3899* net/ice: fix AVX-512 pointer copy on 32-bit
3900* net/ionic: fix build with Fedora Rawhide
3901* net/ixgbe/base: fix unchecked return value
3902* net/ixgbe: fix link status delay on FreeBSD
3903* net/memif: fix buffer overflow in zero copy Rx
3904* net/mlx5: fix memory leak in metering
3905* net/mlx5: fix miniCQEs number calculation
3906* net/mlx5: fix next protocol validation after flex item
3907* net/mlx5: fix non full word sample fields in flex item
3908* net/mlx5: fix number of supported flex parsers
3909* net/mlx5: fix reported Rx/Tx descriptor limits
3910* net/mlx5: fix shared queue port number in vector Rx
3911* net/mlx5: workaround list management of Rx queue control
3912* net/mvneta: fix possible out-of-bounds write
3913* net/netvsc: fix using Tx queue higher than Rx queues
3914* net/netvsc: force Tx VLAN offload on 801.2Q packet
3915* net/nfb: fix use after free
3916* net/nfp: fix link change return value
3917* net/ngbe: fix driver load bit to inform firmware
3918* net/ngbe: fix interrupt lost in legacy or MSI mode
3919* net/ngbe: reconfigure more MAC Rx registers
3920* net/ngbe: restrict configuration of VLAN strip offload
3921* net/pcap: fix blocking Rx
3922* net/pcap: set live interface as non-blocking
3923* net/sfc: fix use after free in debug logs
3924* net/tap: avoid memcpy with null argument
3925* net/tap: restrict maximum number of MP FDs
3926* net/txgbe: fix driver load bit to inform firmware
3927* net/txgbe: fix SWFW mbox
3928* net/txgbe: fix VF-PF mbox interrupt
3929* net/txgbe: remove outer UDP checksum capability
3930* net/virtio: fix Rx checksum calculation
3931* net/virtio-user: reset used index counter
3932* net/vmxnet3: fix crash after configuration failure
3933* power: enable CPPC
3934* power: fix log message when checking lcore ID
3935* power: fix log message when checking power modes
3936* power: fix mapped lcore ID
3937* raw/ifpga/base: fix use after free
3938* raw/ifpga: fix free function mismatch in interrupt config
3939* rcu: fix implicit conversion in bit shift
3940* Revert "test/bonding: fix loop on members"
3941* test/bonding: fix loop on members
3942* test/bonding: fix MAC address comparison
3943* test/bonding: remove redundant info query
3944* test/eal: fix lcore check
3945* test/eal: fix loop coverage for alignment macros
3946* test/event: avoid duplicate initialization
3947* vdpa: update used flags in used ring relay
3948* version: 21.11.9-rc1
3949* vhost: fix offset while mapping log base address
3950
395121.11.9 Validation
3952~~~~~~~~~~~~~~~~~~
3953
3954* `Red Hat(R) Testing <https://mails.dpdk.org/archives/dev/2024-December/310322.html>`__
3955
3956 * Platform
3957
3958 * RHEL 9
3959 * Kernel 5.14
3960 * Qemu 7.2
3961 * X540-AT2 NIC(ixgbe, 10G)
3962
3963 * Functionality
3964
3965 * Guest with device assignment(PF) throughput testing(1G hugepage size)
3966 * Guest with device assignment(PF) throughput testing(2M hugepage size)
3967 * Guest with device assignment(VF) throughput testing
3968 * PVP (host dpdk testpmd as vswitch) 1Q: throughput testing
3969 * PVP vhost-user 2Q throughput testing
3970 * PVP vhost-user 1Q cross numa node throughput testing
3971 * Guest with vhost-user 2 queues throughput testing
3972 * vhost-user reconnect with dpdk-client, qemu-server: qemu reconnect
3973 * vhost-user reconnect with dpdk-client, qemu-server: ovs reconnect
3974 * PVP 1Q live migration testing
3975 * PVP 1Q cross numa node live migration testing
3976 * Guest with ovs+dpdk+vhost-user 1Q live migration testing
3977 * Guest with ovs+dpdk+vhost-user 1Q live migration testing (2M)
3978 * Guest with ovs+dpdk+vhost-user 2Q live migration testing
3979 * Guest with ovs+dpdk+vhost-user 4Q live migration testing
3980 * Host PF + DPDK testing
3981 * Host VF + DPDK testing
3982
3983
3984* `Nvidia(R) Testing <https://mails.dpdk.org/archives/stable/2024-December/051225.html>`__
3985
3986 * Basic functionality with testpmd
3987
3988 * Tx/Rx
3989 * xstats
3990 * Timestamps
3991 * Link status
3992 * RTE flow
3993 * RSS
3994 * VLAN filtering, stripping and insertion
3995 * Checksum/TSO
3996 * ptype
3997 * link_status_interrupt example application
3998 * l3fwd-power example application
3999 * Multi-process example applications
4000 * Hardware LRO tests
4001 * Regex application
4002 * Buffer Split
4003 * Tx scheduling
4004
4005 * Build tests
4006 * ConnectX-6 Dx
4007 * ConnectX-7
4008 * BlueField-2
4009
4010
4011* `Intel(R) Testing <https://mails.dpdk.org/archives/stable/2024-December/051231.html>`__
4012
4013 * Basic Intel(R) NIC(ixgbe, i40e and ice) testing
4014
4015 * PF (i40e, ixgbe)
4016 * VF (i40e, ixgbe)
4017 * PF/VF (ice)
4018 * Compile Testing
4019 * Intel NIC single core/NIC performance - partial testing
4020 * IPseca - partial testing
4021
4022 * Basic cryptodev and virtio testing
4023
4024 * vhost/virtio basic loopback, PVP and performance test
4025 * cryptodev Function/Performance - partial testing
4026
402721.11.9 Known Issues
4028~~~~~~~~~~~~~~~~~~~~
4029
4030* DPDK 21.11.9 contains fixes up to DPDK 24.11 and CVE-2024-11614
4031* Issues identified/fixed in DPDK main branch after DPDK 24.11 may be present in DPDK 21.11.9
4032* Ubuntu 24.04 with gcc 13.2.0 running at optimisation -O1 shows a maybe-uninitialized warning for iavf driver
4033* Some validation was ongoing at time of release
4034
403521.11.9 Fixes skipped and status unresolved
4036~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4037
4038* c5b531d6ee app/crypto-perf: fix session freeing
4039* 7bdf7a13ae app/testpmd: fix encap/decap size calculation
4040* 461c287ab5 app/testpmd: fix GRO packets flush on timeout
4041* ecf408d2aa app/testpmd: fix indirect action flush
4042* 0c5709824b baseband/acc: fix ring memory allocation
4043* 4edbcc7b53 bpf: disable on 32-bit x86
4044* 4edbcc7b53 bpf: disable on 32-bit x86
4045* 5d8c1f6253 common/cnxk: check error in MAC address set
4046* a6f639e079 common/cnxk: fix BP threshold calculation
4047* 772e30281a common/cnxk: fix CPT backpressure disable on LBK
4048* 6c3de40af8 common/cnxk: fix inline CTX write
4049* 48054ca384 common/cnxk: fix link config for SDP
4050* 2d4505dc6d common/cnxk: fix MAC address change with active VF
4051* 1c7a4d37e7 common/cnxk: fix mailbox timeout due to deadlock
4052* 59ceaa72d5 common/cnxk: fix part number for CN10K
4053* 5781638519 common/cnxk: fix RQ mask config for CN10KB chip
4054* 37ca457d3f common/mlx5: fix obtaining IB device in LAG mode
4055* cedb44dc87 common/mlx5: improve AES-XTS tweak capability check
4056* 7be74edb90 common/mlx5: use just sufficient barrier for Arm
4057* 046341575b crypto/dpaa_sec: fix IPsec descriptor
4058* 17d5bc6135 crypto/openssl: make per-QP auth context clones
4059* b1d7112602 crypto/openssl: make per-QP cipher context clones
4060* 3dd3115078 dma/cnxk: fix chunk buffer failure return code
4061* ba39a261a7 dma/cnxk: fix completion ring tail wrap
4062* 95a955e3e0 dma/cnxk: fix device reconfigure
4063* 2a3f42942a dma/hisilicon: remove support for HIP09 platform
4064* b9a87346b0 ethdev: fix strict aliasing in link up
4065* 694e8e643d event/cnxk: fix CASP usage for clang
4066* b37fe88a2c event/cnxk: fix LMTST write for single event mode
4067* 3fe71706ab event/cnxk: fix stale data in workslot
4068* 04dac73643 eventdev/crypto: fix enqueue count
4069* 4b04134cbb eventdev/crypto: fix failed events
4070* da73a2a0d1 eventdev/crypto: fix offset used while flushing events
4071* ad12d08f05 eventdev/crypto: fix opaque field handling
4072* f442c04001 eventdev/crypto: fix overflow in circular buffer
4073* 9a518054b5 examples/l3fwd: fix duplicate expression for default nexthop
4074* 927cb43fe9 examples/l3fwd: fix port group mask with AltiVec
4075* ebab0e8b22 examples/l3fwd: fix read beyond boundaries
4076* ebab0e8b22 examples/l3fwd: fix read beyond boundaries
4077* 547f294357 gro: fix reordering of packets
4078* 6df1bc6b3b mempool/cnxk: avoid hang when counting batch allocs
4079* b3ddd649ad mempool/cnxk: fix alloc from non-EAL threads
4080* 97039941b2 net/af_xdp: parse UMEM map info from mempool
4081* abdabad636 net/af_xdp: remove unused local statistic
4082* e82b0fe097 net/axgbe: disable RRC for yellow carp devices
4083* 78dcdb821c net/bnxt/tf_core: fix WC TCAM multi-slice delete
4084* 8782e4de3e net/bnxt/tf_ulp: fix parent child DB counters
4085* a78a1ed8ba net/bonding: fix failover time of LACP with mode 4
4086* 02a2accb5f net/bonding: fix flow count query
4087* 26a6bda9df net/cnxk: add cookies check for multi-segment offload
4088* 5a0f64d84b net/cnxk: fix configuring large Rx/Tx queues
4089* 3232c95d2c net/cnxk: fix indirect mbuf handling in Tx
4090* 8ed5ca4dda net/cnxk: fix mbuf fields in multi-segment Tx
4091* 7752f14026 net/cnxk: fix Rx flush on CN10k
4092* 4c2f14bc6d net/cnxk: fix xstats reset
4093* ee0fa7552a net/dpaa: forbid MTU configuration for shared interface
4094* 0f044b6681 net/iavf: fix refine protocol header
4095* 0b241667cc net/iavf: fix tainted scalar
4096* b125c0e721 net/iavf: fix tainted scalar
4097* 92a16af450 net/iavf: fix virtchnl command called in interrupt
4098* df44ba7a3c net/ice/base: fix preparing PHY for timesync command
4099* e2072ba1b0 net/ice/base: fix resource leak
4100* 9749dffe23 net/ice: fix MAC type of E822 and E823
4101* 87e4384d26 net/mlx5: fix condition of LACP miss flow
4102* b04b06f4cb net/mlx5: fix flex item header length field translation
4103* 2ece3b7186 net/mlx5: fix flow workspace double free in Windows
4104* 1cfb78d2c4 net/mlx5: fix meter policy priority
4105* 27918f0d53 net/mlx5: fix real time counter reading from PCI BAR
4106* 3c9a82fa6e net/mlx5: fix Rx queue control management
4107* f8f294c66b net/mlx5: fix shared Rx queue control release
4108* 48adbc80ba net/mlx5: remove GENEVE options length limitation
4109* a74c5001e9 net/ngbe: add proper memory barriers in Rx
4110* 79be49dd2d net/ngbe: add special config for YT8531SH-CA PHY
4111* 31a28a99fd net/ngbe: add spinlock protection on YT PHY
4112* 21f702d556 net/ngbe: fix link status in no LSC mode
4113* 659cfce01e net/ngbe: remove redundant codes
4114* 44a8635459 net/thunderx: fix DMAC control register update
4115* 12011b11a3 net/txgbe: adapt to MNG veto bit setting
4116* 916aa13f4a net/txgbe: fix a mass of interrupts
4117* 5e170dd8b6 net/txgbe: fix blocking system events
4118* 6db358536f pcapng: fix handling of chained mbufs
4119* 166591931b pcapng: modify timestamp calculation
4120* df33fb53e4 rcu: fix acked token in debug log
4121* 063cddfc74 rcu: use atomic operation on acked token
4122* 4ad17a1c8f test/crypto: fix enqueue/dequeue callback case
4123* 251fdc592d test/crypto: fix synchronous API calls
4124* 63bf81a617 test: fix named test macro
diff --git a/doc/guides/sample_app_ug/l2_forward_crypto.rst b/doc/guides/sample_app_ug/l2_forward_crypto.rst
index ce49eab..7ff304d 100644
--- a/doc/guides/sample_app_ug/l2_forward_crypto.rst
+++ b/doc/guides/sample_app_ug/l2_forward_crypto.rst
@@ -30,7 +30,7 @@ Compiling the Application
3030
31To compile the sample application see :doc:`compiling`.31To compile the sample application see :doc:`compiling`.
3232
33The application is located in the ``l2fwd-crypt`` sub-directory.33The application is located in the ``l2fwd-crypto`` sub-directory.
3434
35Running the Application35Running the Application
36-----------------------36-----------------------
diff --git a/doc/guides/sample_app_ug/l3_forward_power_man.rst b/doc/guides/sample_app_ug/l3_forward_power_man.rst
index 2e350c4..bb39cac 100644
--- a/doc/guides/sample_app_ug/l3_forward_power_man.rst
+++ b/doc/guides/sample_app_ug/l3_forward_power_man.rst
@@ -336,6 +336,9 @@ will use automatic PMD power management.
336This mode is limited to one queue per core,336This mode is limited to one queue per core,
337and has three available power management schemes:337and has three available power management schemes:
338338
339``baseline``
340 This mode will not enable any power saving features.
341
339``monitor``342``monitor``
340 This will use ``rte_power_monitor()`` function to enter343 This will use ``rte_power_monitor()`` function to enter
341 a power-optimized state (subject to platform support).344 a power-optimized state (subject to platform support).
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 3a522a8..6902b7b 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -2207,7 +2207,7 @@ port config - queue ring size
22072207
2208Configure a rx/tx queue ring size::2208Configure a rx/tx queue ring size::
22092209
2210 testpmd> port (port_id) (rxq|txq) (queue_id) ring_size (value)2210 testpmd> port config (port_id) (rxq|txq) (queue_id) ring_size (value)
22112211
2212Only take effect after command that (re-)start the port or command that setup specific queue.2212Only take effect after command that (re-)start the port or command that setup specific queue.
22132213
diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c
index 4b05b5d..0ac0888 100644
--- a/drivers/baseband/la12xx/bbdev_la12xx.c
+++ b/drivers/baseband/la12xx/bbdev_la12xx.c
@@ -780,6 +780,7 @@ setup_la12xx_dev(struct rte_bbdev *dev)
780 ipc_priv->hugepg_start.size = hp->len;780 ipc_priv->hugepg_start.size = hp->len;
781781
782 rte_free(hp);782 rte_free(hp);
783 hp = NULL;
783 }784 }
784785
785 dev_ipc = open_ipc_dev(priv->modem_id);786 dev_ipc = open_ipc_dev(priv->modem_id);
@@ -1076,6 +1077,9 @@ la12xx_bbdev_remove(struct rte_vdev_device *vdev)
10761077
1077 PMD_INIT_FUNC_TRACE();1078 PMD_INIT_FUNC_TRACE();
10781079
1080 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
1081 return 0;
1082
1079 if (vdev == NULL)1083 if (vdev == NULL)
1080 return -EINVAL;1084 return -EINVAL;
10811085
diff --git a/drivers/bus/dpaa/base/fman/fman.c b/drivers/bus/dpaa/base/fman/fman.c
index 1814372..8263d42 100644
--- a/drivers/bus/dpaa/base/fman/fman.c
+++ b/drivers/bus/dpaa/base/fman/fman.c
@@ -153,7 +153,7 @@ static void fman_if_vsp_init(struct __fman_if *__if)
153 size_t lenp;153 size_t lenp;
154 const uint8_t mac_idx[] = {-1, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1};154 const uint8_t mac_idx[] = {-1, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1};
155155
156 if (__if->__if.mac_type == fman_mac_1g) {156 if (__if->__if.mac_idx <= 8) {
157 for_each_compatible_node(dev, NULL,157 for_each_compatible_node(dev, NULL,
158 "fsl,fman-port-1g-rx-extended-args") {158 "fsl,fman-port-1g-rx-extended-args") {
159 prop = of_get_property(dev, "cell-index", &lenp);159 prop = of_get_property(dev, "cell-index", &lenp);
@@ -176,7 +176,32 @@ static void fman_if_vsp_init(struct __fman_if *__if)
176 }176 }
177 }177 }
178 }178 }
179 } else if (__if->__if.mac_type == fman_mac_10g) {179
180 for_each_compatible_node(dev, NULL,
181 "fsl,fman-port-op-extended-args") {
182 prop = of_get_property(dev, "cell-index", &lenp);
183
184 if (prop) {
185 cell_index = of_read_number(&prop[0],
186 lenp / sizeof(phandle));
187
188 if (cell_index == __if->__if.mac_idx) {
189 prop = of_get_property(dev,
190 "vsp-window",
191 &lenp);
192
193 if (prop) {
194 __if->__if.num_profiles =
195 of_read_number(&prop[0],
196 1);
197 __if->__if.base_profile_id =
198 of_read_number(&prop[1],
199 1);
200 }
201 }
202 }
203 }
204 } else {
180 for_each_compatible_node(dev, NULL,205 for_each_compatible_node(dev, NULL,
181 "fsl,fman-port-10g-rx-extended-args") {206 "fsl,fman-port-10g-rx-extended-args") {
182 prop = of_get_property(dev, "cell-index", &lenp);207 prop = of_get_property(dev, "cell-index", &lenp);
diff --git a/drivers/bus/dpaa/base/fman/fman_hw.c b/drivers/bus/dpaa/base/fman/fman_hw.c
index af9bac7..1559d3c 100644
--- a/drivers/bus/dpaa/base/fman/fman_hw.c
+++ b/drivers/bus/dpaa/base/fman/fman_hw.c
@@ -243,10 +243,11 @@ fman_if_stats_get_all(struct fman_if *p, uint64_t *value, int n)
243 int i;243 int i;
244 uint64_t base_offset = offsetof(struct memac_regs, reoct_l);244 uint64_t base_offset = offsetof(struct memac_regs, reoct_l);
245245
246 for (i = 0; i < n; i++)246 for (i = 0; i < n; i++) {
247 value[i] = (((u64)in_be32((char *)regs + base_offset + 8 * i) |247 uint64_t a = in_be32((char *)regs + base_offset + 8 * i);
248 (u64)in_be32((char *)regs + base_offset +248 uint64_t b = in_be32((char *)regs + base_offset + 8 * i + 4);
249 8 * i + 4)) << 32);249 value[i] = a | b << 32;
250 }
250}251}
251252
252void253void
diff --git a/drivers/bus/dpaa/base/qbman/process.c b/drivers/bus/dpaa/base/qbman/process.c
index 9bc9268..72fa639 100644
--- a/drivers/bus/dpaa/base/qbman/process.c
+++ b/drivers/bus/dpaa/base/qbman/process.c
@@ -1,7 +1,7 @@
1/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)1/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
2 *2 *
3 * Copyright 2011-2016 Freescale Semiconductor Inc.3 * Copyright 2011-2016 Freescale Semiconductor Inc.
4 * Copyright 2017,2020 NXP4 * Copyright 2017,2020,2022,2024 NXP
5 *5 *
6 */6 */
7#include <assert.h>7#include <assert.h>
@@ -27,15 +27,16 @@ static int check_fd(void)
27{27{
28 int ret;28 int ret;
2929
30 if (fd >= 0)
31 return 0;
32 ret = pthread_mutex_lock(&fd_init_lock);30 ret = pthread_mutex_lock(&fd_init_lock);
33 assert(!ret);31 assert(!ret);
32
34 /* check again with the lock held */33 /* check again with the lock held */
35 if (fd < 0)34 if (fd < 0)
36 fd = open(PROCESS_PATH, O_RDWR);35 fd = open(PROCESS_PATH, O_RDWR);
36
37 ret = pthread_mutex_unlock(&fd_init_lock);37 ret = pthread_mutex_unlock(&fd_init_lock);
38 assert(!ret);38 assert(!ret);
39
39 return (fd >= 0) ? 0 : -ENODEV;40 return (fd >= 0) ? 0 : -ENODEV;
40}41}
4142
diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c
index aa8da96..098bfd6 100644
--- a/drivers/bus/dpaa/base/qbman/qman.c
+++ b/drivers/bus/dpaa/base/qbman/qman.c
@@ -294,10 +294,32 @@ static inline void qman_stop_dequeues_ex(struct qman_portal *p)
294 qm_dqrr_set_maxfill(&p->p, 0);294 qm_dqrr_set_maxfill(&p->p, 0);
295}295}
296296
297static inline void qm_mr_pvb_update(struct qm_portal *portal)
298{
299 register struct qm_mr *mr = &portal->mr;
300 const struct qm_mr_entry *res = qm_cl(mr->ring, mr->pi);
301
302#ifdef RTE_LIBRTE_DPAA_HWDEBUG
303 DPAA_ASSERT(mr->pmode == qm_mr_pvb);
304#endif
305 /* when accessing 'verb', use __raw_readb() to ensure that compiler
306 * inlining doesn't try to optimise out "excess reads".
307 */
308 if ((__raw_readb(&res->ern.verb) & QM_MR_VERB_VBIT) == mr->vbit) {
309 mr->pi = (mr->pi + 1) & (QM_MR_SIZE - 1);
310 if (!mr->pi)
311 mr->vbit ^= QM_MR_VERB_VBIT;
312 mr->fill++;
313 res = MR_INC(res);
314 }
315 dcbit_ro(res);
316}
317
297static int drain_mr_fqrni(struct qm_portal *p)318static int drain_mr_fqrni(struct qm_portal *p)
298{319{
299 const struct qm_mr_entry *msg;320 const struct qm_mr_entry *msg;
300loop:321loop:
322 qm_mr_pvb_update(p);
301 msg = qm_mr_current(p);323 msg = qm_mr_current(p);
302 if (!msg) {324 if (!msg) {
303 /*325 /*
@@ -319,6 +341,7 @@ loop:
319 do {341 do {
320 now = mfatb();342 now = mfatb();
321 } while ((then + 10000) > now);343 } while ((then + 10000) > now);
344 qm_mr_pvb_update(p);
322 msg = qm_mr_current(p);345 msg = qm_mr_current(p);
323 if (!msg)346 if (!msg)
324 return 0;347 return 0;
@@ -481,27 +504,6 @@ static inline int qm_mr_init(struct qm_portal *portal,
481 return 0;504 return 0;
482}505}
483506
484static inline void qm_mr_pvb_update(struct qm_portal *portal)
485{
486 register struct qm_mr *mr = &portal->mr;
487 const struct qm_mr_entry *res = qm_cl(mr->ring, mr->pi);
488
489#ifdef RTE_LIBRTE_DPAA_HWDEBUG
490 DPAA_ASSERT(mr->pmode == qm_mr_pvb);
491#endif
492 /* when accessing 'verb', use __raw_readb() to ensure that compiler
493 * inlining doesn't try to optimise out "excess reads".
494 */
495 if ((__raw_readb(&res->ern.verb) & QM_MR_VERB_VBIT) == mr->vbit) {
496 mr->pi = (mr->pi + 1) & (QM_MR_SIZE - 1);
497 if (!mr->pi)
498 mr->vbit ^= QM_MR_VERB_VBIT;
499 mr->fill++;
500 res = MR_INC(res);
501 }
502 dcbit_ro(res);
503}
504
505struct qman_portal *507struct qman_portal *
506qman_init_portal(struct qman_portal *portal,508qman_init_portal(struct qman_portal *portal,
507 const struct qm_portal_config *c,509 const struct qm_portal_config *c,
@@ -1825,6 +1827,8 @@ int qman_retire_fq(struct qman_fq *fq, u32 *flags)
1825 }1827 }
1826out:1828out:
1827 FQUNLOCK(fq);1829 FQUNLOCK(fq);
1830 /* Draining FQRNIs, if any */
1831 drain_mr_fqrni(&p->p);
1828 return rval;1832 return rval;
1829}1833}
18301834
@@ -2165,8 +2169,10 @@ int qman_set_vdq(struct qman_fq *fq, u16 num, uint32_t vdqcr_flags)
21652169
2166 if (!p->vdqcr_owned) {2170 if (!p->vdqcr_owned) {
2167 FQLOCK(fq);2171 FQLOCK(fq);
2168 if (fq_isset(fq, QMAN_FQ_STATE_VDQCR))2172 if (fq_isset(fq, QMAN_FQ_STATE_VDQCR)) {
2173 FQUNLOCK(fq);
2169 goto escape;2174 goto escape;
2175 }
2170 fq_set(fq, QMAN_FQ_STATE_VDQCR);2176 fq_set(fq, QMAN_FQ_STATE_VDQCR);
2171 FQUNLOCK(fq);2177 FQUNLOCK(fq);
2172 p->vdqcr_owned = fq;2178 p->vdqcr_owned = fq;
@@ -2199,8 +2205,10 @@ int qman_volatile_dequeue(struct qman_fq *fq, u32 flags __maybe_unused,
21992205
2200 if (!p->vdqcr_owned) {2206 if (!p->vdqcr_owned) {
2201 FQLOCK(fq);2207 FQLOCK(fq);
2202 if (fq_isset(fq, QMAN_FQ_STATE_VDQCR))2208 if (fq_isset(fq, QMAN_FQ_STATE_VDQCR)) {
2209 FQUNLOCK(fq);
2203 goto escape;2210 goto escape;
2211 }
2204 fq_set(fq, QMAN_FQ_STATE_VDQCR);2212 fq_set(fq, QMAN_FQ_STATE_VDQCR);
2205 FQUNLOCK(fq);2213 FQUNLOCK(fq);
2206 p->vdqcr_owned = fq;2214 p->vdqcr_owned = fq;
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 7fba928..81ac971 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -178,6 +178,7 @@ dpaa_create_device_list(void)
178 if (dev->intr_handle == NULL) {178 if (dev->intr_handle == NULL) {
179 DPAA_BUS_LOG(ERR, "Failed to allocate intr handle");179 DPAA_BUS_LOG(ERR, "Failed to allocate intr handle");
180 ret = -ENOMEM;180 ret = -ENOMEM;
181 free(dev);
181 goto cleanup;182 goto cleanup;
182 }183 }
183184
@@ -211,7 +212,7 @@ dpaa_create_device_list(void)
211212
212 if (dpaa_sec_available()) {213 if (dpaa_sec_available()) {
213 DPAA_BUS_LOG(INFO, "DPAA SEC devices are not available");214 DPAA_BUS_LOG(INFO, "DPAA SEC devices are not available");
214 return 0;215 goto qdma_dpaa;
215 }216 }
216217
217 /* Creating SEC Devices */218 /* Creating SEC Devices */
@@ -229,6 +230,7 @@ dpaa_create_device_list(void)
229 if (dev->intr_handle == NULL) {230 if (dev->intr_handle == NULL) {
230 DPAA_BUS_LOG(ERR, "Failed to allocate intr handle");231 DPAA_BUS_LOG(ERR, "Failed to allocate intr handle");
231 ret = -ENOMEM;232 ret = -ENOMEM;
233 free(dev);
232 goto cleanup;234 goto cleanup;
233 }235 }
234236
@@ -250,6 +252,7 @@ dpaa_create_device_list(void)
250252
251 rte_dpaa_bus.device_count += i;253 rte_dpaa_bus.device_count += i;
252254
255qdma_dpaa:
253 /* Creating QDMA Device */256 /* Creating QDMA Device */
254 for (i = 0; i < RTE_DPAA_QDMA_DEVICES; i++) {257 for (i = 0; i < RTE_DPAA_QDMA_DEVICES; i++) {
255 dev = calloc(1, sizeof(struct rte_dpaa_device));258 dev = calloc(1, sizeof(struct rte_dpaa_device));
diff --git a/drivers/bus/fslmc/qbman/qbman_debug.c b/drivers/bus/fslmc/qbman/qbman_debug.c
index eea0698..0e471ec 100644
--- a/drivers/bus/fslmc/qbman/qbman_debug.c
+++ b/drivers/bus/fslmc/qbman/qbman_debug.c
@@ -1,6 +1,6 @@
1/* SPDX-License-Identifier: BSD-3-Clause1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (C) 2015 Freescale Semiconductor, Inc.2 * Copyright (C) 2015 Freescale Semiconductor, Inc.
3 * Copyright 2018-2020 NXP3 * Copyright 2018-2020,2022 NXP
4 */4 */
55
6#include "compat.h"6#include "compat.h"
@@ -37,6 +37,7 @@ int qbman_bp_query(struct qbman_swp *s, uint32_t bpid,
37 struct qbman_bp_query_rslt *r)37 struct qbman_bp_query_rslt *r)
38{38{
39 struct qbman_bp_query_desc *p;39 struct qbman_bp_query_desc *p;
40 struct qbman_bp_query_rslt *bp_query_rslt;
4041
41 /* Start the management command */42 /* Start the management command */
42 p = (struct qbman_bp_query_desc *)qbman_swp_mc_start(s);43 p = (struct qbman_bp_query_desc *)qbman_swp_mc_start(s);
@@ -47,14 +48,16 @@ int qbman_bp_query(struct qbman_swp *s, uint32_t bpid,
47 p->bpid = bpid;48 p->bpid = bpid;
4849
49 /* Complete the management command */50 /* Complete the management command */
50 *r = *(struct qbman_bp_query_rslt *)qbman_swp_mc_complete(s, p,51 bp_query_rslt = (struct qbman_bp_query_rslt *)qbman_swp_mc_complete(s,
51 QBMAN_BP_QUERY);52 p, QBMAN_BP_QUERY);
52 if (!r) {53 if (!bp_query_rslt) {
53 pr_err("qbman: Query BPID %d failed, no response\n",54 pr_err("qbman: Query BPID %d failed, no response\n",
54 bpid);55 bpid);
55 return -EIO;56 return -EIO;
56 }57 }
5758
59 *r = *bp_query_rslt;
60
58 /* Decode the outcome */61 /* Decode the outcome */
59 QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_BP_QUERY);62 QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_BP_QUERY);
6063
@@ -202,20 +205,23 @@ int qbman_fq_query(struct qbman_swp *s, uint32_t fqid,
202 struct qbman_fq_query_rslt *r)205 struct qbman_fq_query_rslt *r)
203{206{
204 struct qbman_fq_query_desc *p;207 struct qbman_fq_query_desc *p;
208 struct qbman_fq_query_rslt *fq_query_rslt;
205209
206 p = (struct qbman_fq_query_desc *)qbman_swp_mc_start(s);210 p = (struct qbman_fq_query_desc *)qbman_swp_mc_start(s);
207 if (!p)211 if (!p)
208 return -EBUSY;212 return -EBUSY;
209213
210 p->fqid = fqid;214 p->fqid = fqid;
211 *r = *(struct qbman_fq_query_rslt *)qbman_swp_mc_complete(s, p,215 fq_query_rslt = (struct qbman_fq_query_rslt *)qbman_swp_mc_complete(s,
212 QBMAN_FQ_QUERY);216 p, QBMAN_FQ_QUERY);
213 if (!r) {217 if (!fq_query_rslt) {
214 pr_err("qbman: Query FQID %d failed, no response\n",218 pr_err("qbman: Query FQID %d failed, no response\n",
215 fqid);219 fqid);
216 return -EIO;220 return -EIO;
217 }221 }
218222
223 *r = *fq_query_rslt;
224
219 /* Decode the outcome */225 /* Decode the outcome */
220 QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_FQ_QUERY);226 QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_FQ_QUERY);
221227
@@ -398,20 +404,23 @@ int qbman_cgr_query(struct qbman_swp *s, uint32_t cgid,
398 struct qbman_cgr_query_rslt *r)404 struct qbman_cgr_query_rslt *r)
399{405{
400 struct qbman_cgr_query_desc *p;406 struct qbman_cgr_query_desc *p;
407 struct qbman_cgr_query_rslt *cgr_query_rslt;
401408
402 p = (struct qbman_cgr_query_desc *)qbman_swp_mc_start(s);409 p = (struct qbman_cgr_query_desc *)qbman_swp_mc_start(s);
403 if (!p)410 if (!p)
404 return -EBUSY;411 return -EBUSY;
405412
406 p->cgid = cgid;413 p->cgid = cgid;
407 *r = *(struct qbman_cgr_query_rslt *)qbman_swp_mc_complete(s, p,414 cgr_query_rslt = (struct qbman_cgr_query_rslt *)qbman_swp_mc_complete(s,
408 QBMAN_CGR_QUERY);415 p, QBMAN_CGR_QUERY);
409 if (!r) {416 if (!cgr_query_rslt) {
410 pr_err("qbman: Query CGID %d failed, no response\n",417 pr_err("qbman: Query CGID %d failed, no response\n",
411 cgid);418 cgid);
412 return -EIO;419 return -EIO;
413 }420 }
414421
422 *r = *cgr_query_rslt;
423
415 /* Decode the outcome */424 /* Decode the outcome */
416 QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_CGR_QUERY);425 QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_CGR_QUERY);
417426
@@ -473,20 +482,23 @@ int qbman_cgr_wred_query(struct qbman_swp *s, uint32_t cgid,
473 struct qbman_wred_query_rslt *r)482 struct qbman_wred_query_rslt *r)
474{483{
475 struct qbman_cgr_query_desc *p;484 struct qbman_cgr_query_desc *p;
485 struct qbman_wred_query_rslt *wred_query_rslt;
476486
477 p = (struct qbman_cgr_query_desc *)qbman_swp_mc_start(s);487 p = (struct qbman_cgr_query_desc *)qbman_swp_mc_start(s);
478 if (!p)488 if (!p)
479 return -EBUSY;489 return -EBUSY;
480490
481 p->cgid = cgid;491 p->cgid = cgid;
482 *r = *(struct qbman_wred_query_rslt *)qbman_swp_mc_complete(s, p,492 wred_query_rslt = (struct qbman_wred_query_rslt *)qbman_swp_mc_complete(
483 QBMAN_WRED_QUERY);493 s, p, QBMAN_WRED_QUERY);
484 if (!r) {494 if (!wred_query_rslt) {
485 pr_err("qbman: Query CGID WRED %d failed, no response\n",495 pr_err("qbman: Query CGID WRED %d failed, no response\n",
486 cgid);496 cgid);
487 return -EIO;497 return -EIO;
488 }498 }
489499
500 *r = *wred_query_rslt;
501
490 /* Decode the outcome */502 /* Decode the outcome */
491 QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_WRED_QUERY);503 QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_WRED_QUERY);
492504
@@ -527,7 +539,7 @@ void qbman_cgr_attr_wred_dp_decompose(uint32_t dp, uint64_t *minth,
527 if (mn == 0)539 if (mn == 0)
528 *maxth = ma;540 *maxth = ma;
529 else541 else
530 *maxth = ((ma+256) * (1<<(mn-1)));542 *maxth = ((uint64_t)(ma+256) * (1<<(mn-1)));
531543
532 if (step_s == 0)544 if (step_s == 0)
533 *minth = *maxth - step_i;545 *minth = *maxth - step_i;
@@ -630,6 +642,7 @@ int qbman_wqchan_query(struct qbman_swp *s, uint16_t chanid,
630 struct qbman_wqchan_query_rslt *r)642 struct qbman_wqchan_query_rslt *r)
631{643{
632 struct qbman_wqchan_query_desc *p;644 struct qbman_wqchan_query_desc *p;
645 struct qbman_wqchan_query_rslt *wqchan_query_rslt;
633646
634 /* Start the management command */647 /* Start the management command */
635 p = (struct qbman_wqchan_query_desc *)qbman_swp_mc_start(s);648 p = (struct qbman_wqchan_query_desc *)qbman_swp_mc_start(s);
@@ -640,14 +653,16 @@ int qbman_wqchan_query(struct qbman_swp *s, uint16_t chanid,
640 p->chid = chanid;653 p->chid = chanid;
641654
642 /* Complete the management command */655 /* Complete the management command */
643 *r = *(struct qbman_wqchan_query_rslt *)qbman_swp_mc_complete(s, p,656 wqchan_query_rslt = (struct qbman_wqchan_query_rslt *)qbman_swp_mc_complete(
644 QBMAN_WQ_QUERY);657 s, p, QBMAN_WQ_QUERY);
645 if (!r) {658 if (!wqchan_query_rslt) {
646 pr_err("qbman: Query WQ Channel %d failed, no response\n",659 pr_err("qbman: Query WQ Channel %d failed, no response\n",
647 chanid);660 chanid);
648 return -EIO;661 return -EIO;
649 }662 }
650663
664 *r = *wqchan_query_rslt;
665
651 /* Decode the outcome */666 /* Decode the outcome */
652 QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_WQ_QUERY);667 QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_WQ_QUERY);
653668
diff --git a/drivers/bus/pci/linux/pci_uio.c b/drivers/bus/pci/linux/pci_uio.c
index d52125e..81a1ed6 100644
--- a/drivers/bus/pci/linux/pci_uio.c
+++ b/drivers/bus/pci/linux/pci_uio.c
@@ -245,7 +245,7 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
245 }245 }
246 snprintf(devname, sizeof(devname), "/dev/uio%u", uio_num);246 snprintf(devname, sizeof(devname), "/dev/uio%u", uio_num);
247247
248 /* save fd if in primary process */248 /* save fd */
249 fd = open(devname, O_RDWR);249 fd = open(devname, O_RDWR);
250 if (fd < 0) {250 if (fd < 0) {
251 RTE_LOG(ERR, EAL, "Cannot open %s: %s\n",251 RTE_LOG(ERR, EAL, "Cannot open %s: %s\n",
@@ -283,6 +283,9 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
283 }283 }
284 }284 }
285285
286 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
287 return 0;
288
286 /* allocate the mapping details for secondary processes*/289 /* allocate the mapping details for secondary processes*/
287 *uio_res = rte_zmalloc("UIO_RES", sizeof(**uio_res), 0);290 *uio_res = rte_zmalloc("UIO_RES", sizeof(**uio_res), 0);
288 if (*uio_res == NULL) {291 if (*uio_res == NULL) {
diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index 822aa41..847b95f 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -53,7 +53,7 @@ pci_vfio_read_config(const struct rte_intr_handle *intr_handle,
53 if (vfio_dev_fd < 0)53 if (vfio_dev_fd < 0)
54 return -1;54 return -1;
5555
56 return pread64(vfio_dev_fd, buf, len,56 return pread(vfio_dev_fd, buf, len,
57 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) + offs);57 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) + offs);
58}58}
5959
@@ -66,7 +66,7 @@ pci_vfio_write_config(const struct rte_intr_handle *intr_handle,
66 if (vfio_dev_fd < 0)66 if (vfio_dev_fd < 0)
67 return -1;67 return -1;
6868
69 return pwrite64(vfio_dev_fd, buf, len,69 return pwrite(vfio_dev_fd, buf, len,
70 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) + offs);70 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) + offs);
71}71}
7272
@@ -80,7 +80,7 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
80 uint8_t cap_id, cap_offset;80 uint8_t cap_id, cap_offset;
8181
82 /* read PCI capability pointer from config space */82 /* read PCI capability pointer from config space */
83 ret = pread64(fd, &reg, sizeof(reg),83 ret = pread(fd, &reg, sizeof(reg),
84 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +84 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
85 PCI_CAPABILITY_LIST);85 PCI_CAPABILITY_LIST);
86 if (ret != sizeof(reg)) {86 if (ret != sizeof(reg)) {
@@ -95,7 +95,7 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
95 while (cap_offset) {95 while (cap_offset) {
9696
97 /* read PCI capability ID */97 /* read PCI capability ID */
98 ret = pread64(fd, &reg, sizeof(reg),98 ret = pread(fd, &reg, sizeof(reg),
99 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +99 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
100 cap_offset);100 cap_offset);
101 if (ret != sizeof(reg)) {101 if (ret != sizeof(reg)) {
@@ -109,7 +109,7 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
109109
110 /* if we haven't reached MSI-X, check next capability */110 /* if we haven't reached MSI-X, check next capability */
111 if (cap_id != PCI_CAP_ID_MSIX) {111 if (cap_id != PCI_CAP_ID_MSIX) {
112 ret = pread64(fd, &reg, sizeof(reg),112 ret = pread(fd, &reg, sizeof(reg),
113 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +113 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
114 cap_offset);114 cap_offset);
115 if (ret != sizeof(reg)) {115 if (ret != sizeof(reg)) {
@@ -126,7 +126,7 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
126 /* else, read table offset */126 /* else, read table offset */
127 else {127 else {
128 /* table offset resides in the next 4 bytes */128 /* table offset resides in the next 4 bytes */
129 ret = pread64(fd, &reg, sizeof(reg),129 ret = pread(fd, &reg, sizeof(reg),
130 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +130 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
131 cap_offset + 4);131 cap_offset + 4);
132 if (ret != sizeof(reg)) {132 if (ret != sizeof(reg)) {
@@ -135,7 +135,7 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
135 return -1;135 return -1;
136 }136 }
137137
138 ret = pread64(fd, &flags, sizeof(flags),138 ret = pread(fd, &flags, sizeof(flags),
139 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +139 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
140 cap_offset + 2);140 cap_offset + 2);
141 if (ret != sizeof(flags)) {141 if (ret != sizeof(flags)) {
@@ -162,7 +162,7 @@ pci_vfio_enable_bus_memory(int dev_fd)
162 uint16_t cmd;162 uint16_t cmd;
163 int ret;163 int ret;
164164
165 ret = pread64(dev_fd, &cmd, sizeof(cmd),165 ret = pread(dev_fd, &cmd, sizeof(cmd),
166 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +166 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
167 PCI_COMMAND);167 PCI_COMMAND);
168168
@@ -175,7 +175,7 @@ pci_vfio_enable_bus_memory(int dev_fd)
175 return 0;175 return 0;
176176
177 cmd |= PCI_COMMAND_MEMORY;177 cmd |= PCI_COMMAND_MEMORY;
178 ret = pwrite64(dev_fd, &cmd, sizeof(cmd),178 ret = pwrite(dev_fd, &cmd, sizeof(cmd),
179 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +179 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
180 PCI_COMMAND);180 PCI_COMMAND);
181181
@@ -194,7 +194,7 @@ pci_vfio_set_bus_master(int dev_fd, bool op)
194 uint16_t reg;194 uint16_t reg;
195 int ret;195 int ret;
196196
197 ret = pread64(dev_fd, &reg, sizeof(reg),197 ret = pread(dev_fd, &reg, sizeof(reg),
198 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +198 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
199 PCI_COMMAND);199 PCI_COMMAND);
200 if (ret != sizeof(reg)) {200 if (ret != sizeof(reg)) {
@@ -208,7 +208,7 @@ pci_vfio_set_bus_master(int dev_fd, bool op)
208 else208 else
209 reg &= ~(PCI_COMMAND_MASTER);209 reg &= ~(PCI_COMMAND_MASTER);
210210
211 ret = pwrite64(dev_fd, &reg, sizeof(reg),211 ret = pwrite(dev_fd, &reg, sizeof(reg),
212 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +212 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
213 PCI_COMMAND);213 PCI_COMMAND);
214214
@@ -464,7 +464,7 @@ pci_vfio_is_ioport_bar(int vfio_dev_fd, int bar_index)
464 uint32_t ioport_bar;464 uint32_t ioport_bar;
465 int ret;465 int ret;
466466
467 ret = pread64(vfio_dev_fd, &ioport_bar, sizeof(ioport_bar),467 ret = pread(vfio_dev_fd, &ioport_bar, sizeof(ioport_bar),
468 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX)468 VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX)
469 + PCI_BASE_ADDRESS_0 + bar_index*4);469 + PCI_BASE_ADDRESS_0 + bar_index*4);
470 if (ret != sizeof(ioport_bar)) {470 if (ret != sizeof(ioport_bar)) {
@@ -1133,7 +1133,7 @@ pci_vfio_ioport_read(struct rte_pci_ioport *p,
1133 if (vfio_dev_fd < 0)1133 if (vfio_dev_fd < 0)
1134 return;1134 return;
11351135
1136 if (pread64(vfio_dev_fd, data,1136 if (pread(vfio_dev_fd, data,
1137 len, p->base + offset) <= 0)1137 len, p->base + offset) <= 0)
1138 RTE_LOG(ERR, EAL,1138 RTE_LOG(ERR, EAL,
1139 "Can't read from PCI bar (%" PRIu64 ") : offset (%x)\n",1139 "Can't read from PCI bar (%" PRIu64 ") : offset (%x)\n",
@@ -1150,7 +1150,7 @@ pci_vfio_ioport_write(struct rte_pci_ioport *p,
1150 if (vfio_dev_fd < 0)1150 if (vfio_dev_fd < 0)
1151 return;1151 return;
11521152
1153 if (pwrite64(vfio_dev_fd, data,1153 if (pwrite(vfio_dev_fd, data,
1154 len, p->base + offset) <= 0)1154 len, p->base + offset) <= 0)
1155 RTE_LOG(ERR, EAL,1155 RTE_LOG(ERR, EAL,
1156 "Can't write to PCI bar (%" PRIu64 ") : offset (%x)\n",1156 "Can't write to PCI bar (%" PRIu64 ") : offset (%x)\n",
diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_common_uio.c
index 76c661f..a06378b 100644
--- a/drivers/bus/pci/pci_common_uio.c
+++ b/drivers/bus/pci/pci_common_uio.c
@@ -26,7 +26,7 @@ EAL_REGISTER_TAILQ(rte_uio_tailq)
26static int26static int
27pci_uio_map_secondary(struct rte_pci_device *dev)27pci_uio_map_secondary(struct rte_pci_device *dev)
28{28{
29 int fd, i, j;29 int fd, i = 0, j, res_idx;
30 struct mapped_pci_resource *uio_res;30 struct mapped_pci_resource *uio_res;
31 struct mapped_pci_res_list *uio_res_list =31 struct mapped_pci_res_list *uio_res_list =
32 RTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list);32 RTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list);
@@ -37,7 +37,15 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
37 if (rte_pci_addr_cmp(&uio_res->pci_addr, &dev->addr))37 if (rte_pci_addr_cmp(&uio_res->pci_addr, &dev->addr))
38 continue;38 continue;
3939
40 for (i = 0; i != uio_res->nb_maps; i++) {40 /* Map all BARs */
41 for (res_idx = 0; res_idx != PCI_MAX_RESOURCE; res_idx++) {
42 /* skip empty BAR */
43 if (dev->mem_resource[res_idx].phys_addr == 0)
44 continue;
45
46 if (i >= uio_res->nb_maps)
47 return -1;
48
41 /*49 /*
42 * open devname, to mmap it50 * open devname, to mmap it
43 */51 */
@@ -71,7 +79,9 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
71 }79 }
72 return -1;80 return -1;
73 }81 }
74 dev->mem_resource[i].addr = mapaddr;82 dev->mem_resource[res_idx].addr = mapaddr;
83
84 i++;
75 }85 }
76 return 0;86 return 0;
77 }87 }
@@ -96,15 +106,15 @@ pci_uio_map_resource(struct rte_pci_device *dev)
96 if (rte_intr_dev_fd_set(dev->intr_handle, -1))106 if (rte_intr_dev_fd_set(dev->intr_handle, -1))
97 return -1;107 return -1;
98108
99 /* secondary processes - use already recorded details */
100 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
101 return pci_uio_map_secondary(dev);
102
103 /* allocate uio resource */109 /* allocate uio resource */
104 ret = pci_uio_alloc_resource(dev, &uio_res);110 ret = pci_uio_alloc_resource(dev, &uio_res);
105 if (ret)111 if (ret)
106 return ret;112 return ret;
107113
114 /* secondary processes - use already recorded details */
115 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
116 return pci_uio_map_secondary(dev);
117
108 /* Map all BARs */118 /* Map all BARs */
109 for (i = 0; i != PCI_MAX_RESOURCE; i++) {119 for (i = 0; i != PCI_MAX_RESOURCE; i++) {
110 /* skip empty BAR */120 /* skip empty BAR */
@@ -220,6 +230,18 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
220 if (uio_res == NULL)230 if (uio_res == NULL)
221 return;231 return;
222232
233 /* close fd */
234 if (rte_intr_fd_get(dev->intr_handle) >= 0)
235 close(rte_intr_fd_get(dev->intr_handle));
236 uio_cfg_fd = rte_intr_dev_fd_get(dev->intr_handle);
237 if (uio_cfg_fd >= 0) {
238 close(uio_cfg_fd);
239 rte_intr_dev_fd_set(dev->intr_handle, -1);
240 }
241
242 rte_intr_fd_set(dev->intr_handle, -1);
243 rte_intr_type_set(dev->intr_handle, RTE_INTR_HANDLE_UNKNOWN);
244
223 /* secondary processes - just free maps */245 /* secondary processes - just free maps */
224 if (rte_eal_process_type() != RTE_PROC_PRIMARY)246 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
225 return pci_uio_unmap(uio_res);247 return pci_uio_unmap(uio_res);
@@ -231,16 +253,4 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
231253
232 /* free uio resource */254 /* free uio resource */
233 rte_free(uio_res);255 rte_free(uio_res);
234
235 /* close fd if in primary process */
236 if (rte_intr_fd_get(dev->intr_handle) >= 0)
237 close(rte_intr_fd_get(dev->intr_handle));
238 uio_cfg_fd = rte_intr_dev_fd_get(dev->intr_handle);
239 if (uio_cfg_fd >= 0) {
240 close(uio_cfg_fd);
241 rte_intr_dev_fd_set(dev->intr_handle, -1);
242 }
243
244 rte_intr_fd_set(dev->intr_handle, -1);
245 rte_intr_type_set(dev->intr_handle, RTE_INTR_HANDLE_UNKNOWN);
246}256}
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 272ea70..c040a6d 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -289,7 +289,6 @@ insert_vdev(const char *name, const char *args,
289289
290 dev->device.bus = &rte_vdev_bus;290 dev->device.bus = &rte_vdev_bus;
291 dev->device.numa_node = SOCKET_ID_ANY;291 dev->device.numa_node = SOCKET_ID_ANY;
292 dev->device.name = devargs->name;
293292
294 if (find_vdev(name)) {293 if (find_vdev(name)) {
295 /*294 /*
@@ -304,6 +303,7 @@ insert_vdev(const char *name, const char *args,
304 if (init)303 if (init)
305 rte_devargs_insert(&devargs);304 rte_devargs_insert(&devargs);
306 dev->device.devargs = devargs;305 dev->device.devargs = devargs;
306 dev->device.name = devargs->name;
307 TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);307 TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
308308
309 if (p_dev)309 if (p_dev)
diff --git a/drivers/common/cnxk/roc_irq.c b/drivers/common/cnxk/roc_irq.c
index 010b121..fb11bcb 100644
--- a/drivers/common/cnxk/roc_irq.c
+++ b/drivers/common/cnxk/roc_irq.c
@@ -15,7 +15,7 @@
1515
16#define MSIX_IRQ_SET_BUF_LEN \16#define MSIX_IRQ_SET_BUF_LEN \
17 (sizeof(struct vfio_irq_set) + sizeof(int) * \17 (sizeof(struct vfio_irq_set) + sizeof(int) * \
18 (plt_intr_max_intr_get(intr_handle)))18 ((uint32_t)plt_intr_max_intr_get(intr_handle)))
1919
20static int20static int
21irq_get_info(struct plt_intr_handle *intr_handle)21irq_get_info(struct plt_intr_handle *intr_handle)
diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c
index 9422a42..5183d30 100644
--- a/drivers/common/cnxk/roc_npc.c
+++ b/drivers/common/cnxk/roc_npc.c
@@ -716,9 +716,35 @@ npc_rss_action_configure(struct roc_npc *roc_npc,
716 uint8_t key[ROC_NIX_RSS_KEY_LEN];716 uint8_t key[ROC_NIX_RSS_KEY_LEN];
717 const uint8_t *key_ptr;717 const uint8_t *key_ptr;
718 uint8_t flowkey_algx;718 uint8_t flowkey_algx;
719 uint32_t key_len;
719 uint16_t *reta;720 uint16_t *reta;
720 int rc;721 int rc;
721722
723 roc_nix_rss_key_get(roc_nix, key);
724 if (rss->key == NULL) {
725 key_ptr = key;
726 } else {
727 key_len = rss->key_len;
728 if (key_len > ROC_NIX_RSS_KEY_LEN)
729 key_len = ROC_NIX_RSS_KEY_LEN;
730
731 for (i = 0; i < key_len; i++) {
732 if (key[i] != rss->key[i]) {
733 plt_err("RSS key config not supported");
734 plt_err("New Key:");
735 for (i = 0; i < key_len; i++)
736 plt_dump_no_nl("0x%.2x ", rss->key[i]);
737 plt_dump_no_nl("\n");
738 plt_err("Configured Key:");
739 for (i = 0; i < ROC_NIX_RSS_KEY_LEN; i++)
740 plt_dump_no_nl("0x%.2x ", key[i]);
741 plt_dump_no_nl("\n");
742 return -ENOTSUP;
743 }
744 }
745 key_ptr = rss->key;
746 }
747
722 rc = npc_rss_free_grp_get(npc, &rss_grp_idx);748 rc = npc_rss_free_grp_get(npc, &rss_grp_idx);
723 /* RSS group :0 is not usable for flow rss action */749 /* RSS group :0 is not usable for flow rss action */
724 if (rc < 0 || rss_grp_idx == 0)750 if (rc < 0 || rss_grp_idx == 0)
@@ -733,13 +759,6 @@ npc_rss_action_configure(struct roc_npc *roc_npc,
733759
734 *rss_grp = rss_grp_idx;760 *rss_grp = rss_grp_idx;
735761
736 if (rss->key == NULL) {
737 roc_nix_rss_key_default_fill(roc_nix, key);
738 key_ptr = key;
739 } else {
740 key_ptr = rss->key;
741 }
742
743 roc_nix_rss_key_set(roc_nix, key_ptr);762 roc_nix_rss_key_set(roc_nix, key_ptr);
744763
745 /* If queue count passed in the rss action is less than764 /* If queue count passed in the rss action is less than
diff --git a/drivers/common/cnxk/roc_platform.c b/drivers/common/cnxk/roc_platform.c
index 6cf0c41..e5fab69 100644
--- a/drivers/common/cnxk/roc_platform.c
+++ b/drivers/common/cnxk/roc_platform.c
@@ -60,7 +60,7 @@ roc_plt_init(void)
60 return 0;60 return 0;
61}61}
6262
63RTE_LOG_REGISTER(cnxk_logtype_base, pmd.cnxk.base, NOTICE);63RTE_LOG_REGISTER(cnxk_logtype_base, pmd.cnxk.base, INFO);
64RTE_LOG_REGISTER(cnxk_logtype_mbox, pmd.cnxk.mbox, NOTICE);64RTE_LOG_REGISTER(cnxk_logtype_mbox, pmd.cnxk.mbox, NOTICE);
65RTE_LOG_REGISTER(cnxk_logtype_cpt, pmd.crypto.cnxk, NOTICE);65RTE_LOG_REGISTER(cnxk_logtype_cpt, pmd.crypto.cnxk, NOTICE);
66RTE_LOG_REGISTER(cnxk_logtype_npa, pmd.mempool.cnxk, NOTICE);66RTE_LOG_REGISTER(cnxk_logtype_npa, pmd.mempool.cnxk, NOTICE);
diff --git a/drivers/common/cnxk/roc_platform.h b/drivers/common/cnxk/roc_platform.h
index 61d4781..c79c5fd 100644
--- a/drivers/common/cnxk/roc_platform.h
+++ b/drivers/common/cnxk/roc_platform.h
@@ -203,7 +203,8 @@ extern int cnxk_logtype_tm;
203#define plt_info(fmt, args...) RTE_LOG(INFO, PMD, fmt "\n", ##args)203#define plt_info(fmt, args...) RTE_LOG(INFO, PMD, fmt "\n", ##args)
204#define plt_warn(fmt, args...) RTE_LOG(WARNING, PMD, fmt "\n", ##args)204#define plt_warn(fmt, args...) RTE_LOG(WARNING, PMD, fmt "\n", ##args)
205#define plt_print(fmt, args...) RTE_LOG(INFO, PMD, fmt "\n", ##args)205#define plt_print(fmt, args...) RTE_LOG(INFO, PMD, fmt "\n", ##args)
206#define plt_dump(fmt, ...) fprintf(stderr, fmt "\n", ##__VA_ARGS__)206#define plt_dump(fmt, ...) fprintf(stderr, fmt "\n", ##__VA_ARGS__)
207#define plt_dump_no_nl(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)
207208
208/**209/**
209 * Log debug message if given subsystem logging is enabled.210 * Log debug message if given subsystem logging is enabled.
diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h
index 2c9c631..fc2db20 100644
--- a/drivers/common/dpaax/caamflib/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -1303,6 +1303,11 @@ pdcp_insert_uplane_aes_aes_op(struct program *p,
1303 SEQFIFOLOAD(p, MSG1, 0, VLF | LAST1 | FLUSH1);1303 SEQFIFOLOAD(p, MSG1, 0, VLF | LAST1 | FLUSH1);
1304 MOVEB(p, CONTEXT1, 0, MATH3, 0, 4, WAITCOMP | IMMED);1304 MOVEB(p, CONTEXT1, 0, MATH3, 0, 4, WAITCOMP | IMMED);
13051305
1306 /* conditional jump with calm added to ensure that the
1307 * previous processing has been completed
1308 */
1309 JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
1310
1306 LOAD(p, CLRW_RESET_CLS1_CHA |1311 LOAD(p, CLRW_RESET_CLS1_CHA |
1307 CLRW_CLR_C1KEY |1312 CLRW_CLR_C1KEY |
1308 CLRW_CLR_C1CTX |1313 CLRW_CLR_C1CTX |
@@ -1350,6 +1355,11 @@ pdcp_insert_uplane_aes_aes_op(struct program *p,
13501355
1351 MOVEB(p, OFIFO, 0, MATH3, 0, 4, IMMED);1356 MOVEB(p, OFIFO, 0, MATH3, 0, 4, IMMED);
13521357
1358 /* conditional jump with calm added to ensure that the
1359 * previous processing has been completed
1360 */
1361 JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
1362
1353 LOAD(p, CLRW_RESET_CLS1_CHA |1363 LOAD(p, CLRW_RESET_CLS1_CHA |
1354 CLRW_CLR_C1KEY |1364 CLRW_CLR_C1KEY |
1355 CLRW_CLR_C1CTX |1365 CLRW_CLR_C1CTX |
@@ -1564,6 +1574,11 @@ pdcp_insert_cplane_snow_aes_op(struct program *p,
1564 CLRW_CLR_C1MODE,1574 CLRW_CLR_C1MODE,
1565 CLRW, 0, 4, IMMED);1575 CLRW, 0, 4, IMMED);
15661576
1577 /* conditional jump with calm added to ensure that the
1578 * previous processing has been completed
1579 */
1580 JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
1581
1567 if (rta_sec_era <= RTA_SEC_ERA_3)1582 if (rta_sec_era <= RTA_SEC_ERA_3)
1568 LOAD(p, CCTRL_RESET_CHA_ALL, CCTRL, 0, 4, IMMED);1583 LOAD(p, CCTRL_RESET_CHA_ALL, CCTRL, 0, 4, IMMED);
15691584
@@ -2409,6 +2424,11 @@ pdcp_insert_cplane_zuc_aes_op(struct program *p,
24092424
2410 MOVEB(p, OFIFO, 0, MATH3, 0, 4, IMMED);2425 MOVEB(p, OFIFO, 0, MATH3, 0, 4, IMMED);
24112426
2427 /* conditional jump with calm added to ensure that the
2428 * previous processing has been completed
2429 */
2430 JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
2431
2412 LOAD(p, CLRW_RESET_CLS1_CHA |2432 LOAD(p, CLRW_RESET_CLS1_CHA |
2413 CLRW_CLR_C1KEY |2433 CLRW_CLR_C1KEY |
2414 CLRW_CLR_C1CTX |2434 CLRW_CLR_C1CTX |
diff --git a/drivers/common/dpaax/caamflib/desc/sdap.h b/drivers/common/dpaax/caamflib/desc/sdap.h
index 07f55b5..084392d 100644
--- a/drivers/common/dpaax/caamflib/desc/sdap.h
+++ b/drivers/common/dpaax/caamflib/desc/sdap.h
@@ -1,5 +1,5 @@
1/* SPDX-License-Identifier: BSD-3-Clause1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2020-2021 NXP2 * Copyright 2020-2023 NXP
3 */3 */
44
5#ifndef __DESC_SDAP_H__5#ifndef __DESC_SDAP_H__
@@ -704,6 +704,10 @@ static inline int pdcp_sdap_insert_no_snoop_op(
704 /* Save the ICV generated */704 /* Save the ICV generated */
705 MOVEB(p, CONTEXT1, 0, MATH3, 0, 4, WAITCOMP | IMMED);705 MOVEB(p, CONTEXT1, 0, MATH3, 0, 4, WAITCOMP | IMMED);
706706
707 /* conditional jump with calm added to ensure that the
708 * previous processing has been completed
709 */
710 JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
707 /* The CHA will be reused so we need to clear it */711 /* The CHA will be reused so we need to clear it */
708 LOAD(p, CLRW_RESET_CLS1_CHA |712 LOAD(p, CLRW_RESET_CLS1_CHA |
709 CLRW_CLR_C1KEY |713 CLRW_CLR_C1KEY |
@@ -794,6 +798,10 @@ static inline int pdcp_sdap_insert_no_snoop_op(
794 /* Save the ICV which is stalling in output FIFO to MATH3 */798 /* Save the ICV which is stalling in output FIFO to MATH3 */
795 MOVEB(p, OFIFO, 0, MATH3, 0, 4, IMMED);799 MOVEB(p, OFIFO, 0, MATH3, 0, 4, IMMED);
796800
801 /* conditional jump with calm added to ensure that the
802 * previous processing has been completed
803 */
804 JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
797 /* Reset class 1 CHA */805 /* Reset class 1 CHA */
798 LOAD(p, CLRW_RESET_CLS1_CHA |806 LOAD(p, CLRW_RESET_CLS1_CHA |
799 CLRW_CLR_C1KEY |807 CLRW_CLR_C1KEY |
diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index 9daac4b..860e702 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -1,5 +1,5 @@
1/* SPDX-License-Identifier: BSD-3-Clause1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2018 NXP2 * Copyright 2018-2023 NXP
3 */3 */
44
5#include <rte_memory.h>5#include <rte_memory.h>
@@ -139,10 +139,12 @@ read_memory_node(unsigned int *count)
139 }139 }
140140
141 DPAAX_DEBUG("Device-tree memory node data:");141 DPAAX_DEBUG("Device-tree memory node data:");
142 do {142
143 while (j > 0) {
144 --j;
143 DPAAX_DEBUG(" %08" PRIx64 " %08zu",145 DPAAX_DEBUG(" %08" PRIx64 " %08zu",
144 nodes[j].addr, nodes[j].len);146 nodes[j].addr, nodes[j].len);
145 } while (--j);147 }
146148
147cleanup:149cleanup:
148 close(fd);150 close(fd);
@@ -255,10 +257,7 @@ dpaax_iova_table_populate(void)
255void257void
256dpaax_iova_table_depopulate(void)258dpaax_iova_table_depopulate(void)
257{259{
258 if (dpaax_iova_table_p == NULL)260 rte_free(dpaax_iova_table_p);
259 return;
260
261 rte_free(dpaax_iova_table_p->entries);
262 dpaax_iova_table_p = NULL;261 dpaax_iova_table_p = NULL;
263262
264 DPAAX_DEBUG("IOVA Table cleaned");263 DPAAX_DEBUG("IOVA Table cleaned");
diff --git a/drivers/common/iavf/iavf_prototype.h b/drivers/common/iavf/iavf_prototype.h
index 1c125d1..b327549 100644
--- a/drivers/common/iavf/iavf_prototype.h
+++ b/drivers/common/iavf/iavf_prototype.h
@@ -83,6 +83,7 @@ void iavf_destroy_spinlock(struct iavf_spinlock *sp);
83__rte_internal83__rte_internal
84void iavf_vf_parse_hw_config(struct iavf_hw *hw,84void iavf_vf_parse_hw_config(struct iavf_hw *hw,
85 struct virtchnl_vf_resource *msg);85 struct virtchnl_vf_resource *msg);
86__rte_internal
86enum iavf_status iavf_vf_reset(struct iavf_hw *hw);87enum iavf_status iavf_vf_reset(struct iavf_hw *hw);
87__rte_internal88__rte_internal
88enum iavf_status iavf_aq_send_msg_to_pf(struct iavf_hw *hw,89enum iavf_status iavf_aq_send_msg_to_pf(struct iavf_hw *hw,
diff --git a/drivers/common/iavf/version.map b/drivers/common/iavf/version.map
index e0f1171..6c1427c 100644
--- a/drivers/common/iavf/version.map
+++ b/drivers/common/iavf/version.map
@@ -7,6 +7,7 @@ INTERNAL {
7 iavf_set_mac_type;7 iavf_set_mac_type;
8 iavf_shutdown_adminq;8 iavf_shutdown_adminq;
9 iavf_vf_parse_hw_config;9 iavf_vf_parse_hw_config;
10 iavf_vf_reset;
1011
11 local: *;12 local: *;
12};13};
diff --git a/drivers/common/mlx5/mlx5_common_utils.h b/drivers/common/mlx5/mlx5_common_utils.h
index 98e487e..2b01325 100644
--- a/drivers/common/mlx5/mlx5_common_utils.h
+++ b/drivers/common/mlx5/mlx5_common_utils.h
@@ -130,7 +130,7 @@ struct mlx5_list_inconst {
130 * For huge amount of entries, please consider hash list.130 * For huge amount of entries, please consider hash list.
131 *131 *
132 */132 */
133struct mlx5_list {133struct __rte_aligned(16) mlx5_list {
134 struct mlx5_list_const l_const;134 struct mlx5_list_const l_const;
135 struct mlx5_list_inconst l_inconst;135 struct mlx5_list_inconst l_inconst;
136};136};
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index d9585bf..9684e37 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -919,6 +919,7 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
919 attr->log_max_qp = MLX5_GET(cmd_hca_cap, hcattr, log_max_qp);919 attr->log_max_qp = MLX5_GET(cmd_hca_cap, hcattr, log_max_qp);
920 attr->log_max_cq_sz = MLX5_GET(cmd_hca_cap, hcattr, log_max_cq_sz);920 attr->log_max_cq_sz = MLX5_GET(cmd_hca_cap, hcattr, log_max_cq_sz);
921 attr->log_max_qp_sz = MLX5_GET(cmd_hca_cap, hcattr, log_max_qp_sz);921 attr->log_max_qp_sz = MLX5_GET(cmd_hca_cap, hcattr, log_max_qp_sz);
922 attr->log_max_wq_sz = MLX5_GET(cmd_hca_cap, hcattr, log_max_wq_sz);
922 attr->log_max_mrw_sz = MLX5_GET(cmd_hca_cap, hcattr, log_max_mrw_sz);923 attr->log_max_mrw_sz = MLX5_GET(cmd_hca_cap, hcattr, log_max_mrw_sz);
923 attr->log_max_pd = MLX5_GET(cmd_hca_cap, hcattr, log_max_pd);924 attr->log_max_pd = MLX5_GET(cmd_hca_cap, hcattr, log_max_pd);
924 attr->log_max_srq = MLX5_GET(cmd_hca_cap, hcattr, log_max_srq);925 attr->log_max_srq = MLX5_GET(cmd_hca_cap, hcattr, log_max_srq);
@@ -1558,7 +1559,7 @@ mlx5_devx_cmd_create_rqt(void *ctx,
1558 uint32_t out[MLX5_ST_SZ_DW(create_rqt_out)] = {0};1559 uint32_t out[MLX5_ST_SZ_DW(create_rqt_out)] = {0};
1559 void *rqt_ctx;1560 void *rqt_ctx;
1560 struct mlx5_devx_obj *rqt = NULL;1561 struct mlx5_devx_obj *rqt = NULL;
1561 int i;1562 unsigned int i;
15621563
1563 in = mlx5_malloc(MLX5_MEM_ZERO, inlen, 0, SOCKET_ID_ANY);1564 in = mlx5_malloc(MLX5_MEM_ZERO, inlen, 0, SOCKET_ID_ANY);
1564 if (!in) {1565 if (!in) {
@@ -1612,7 +1613,7 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
1612 uint32_t out[MLX5_ST_SZ_DW(modify_rqt_out)] = {0};1613 uint32_t out[MLX5_ST_SZ_DW(modify_rqt_out)] = {0};
1613 uint32_t *in = mlx5_malloc(MLX5_MEM_ZERO, inlen, 0, SOCKET_ID_ANY);1614 uint32_t *in = mlx5_malloc(MLX5_MEM_ZERO, inlen, 0, SOCKET_ID_ANY);
1614 void *rqt_ctx;1615 void *rqt_ctx;
1615 int i;1616 unsigned int i;
1616 int ret;1617 int ret;
16171618
1618 if (!in) {1619 if (!in) {
@@ -1625,7 +1626,6 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
1625 MLX5_SET64(modify_rqt_in, in, modify_bitmask, 0x1);1626 MLX5_SET64(modify_rqt_in, in, modify_bitmask, 0x1);
1626 rqt_ctx = MLX5_ADDR_OF(modify_rqt_in, in, rqt_context);1627 rqt_ctx = MLX5_ADDR_OF(modify_rqt_in, in, rqt_context);
1627 MLX5_SET(rqtc, rqt_ctx, list_q_type, rqt_attr->rq_type);1628 MLX5_SET(rqtc, rqt_ctx, list_q_type, rqt_attr->rq_type);
1628 MLX5_SET(rqtc, rqt_ctx, rqt_max_size, rqt_attr->rqt_max_size);
1629 MLX5_SET(rqtc, rqt_ctx, rqt_actual_size, rqt_attr->rqt_actual_size);1629 MLX5_SET(rqtc, rqt_ctx, rqt_actual_size, rqt_attr->rqt_actual_size);
1630 for (i = 0; i < rqt_attr->rqt_actual_size; i++)1630 for (i = 0; i < rqt_attr->rqt_actual_size; i++)
1631 MLX5_SET(rqtc, rqt_ctx, rq_num[i], rqt_attr->rq_list[i]);1631 MLX5_SET(rqtc, rqt_ctx, rq_num[i], rqt_attr->rq_list[i]);
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index 4373761..6e76528 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -228,6 +228,7 @@ struct mlx5_hca_attr {
228 struct mlx5_hca_vdpa_attr vdpa;228 struct mlx5_hca_vdpa_attr vdpa;
229 struct mlx5_hca_flow_attr flow;229 struct mlx5_hca_flow_attr flow;
230 struct mlx5_hca_flex_attr flex;230 struct mlx5_hca_flex_attr flex;
231 uint8_t log_max_wq_sz;
231 int log_max_qp_sz;232 int log_max_qp_sz;
232 int log_max_cq_sz;233 int log_max_cq_sz;
233 int log_max_qp;234 int log_max_qp;
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index 58aa72d..f561e53 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -249,8 +249,12 @@
249/* Maximum number of DS in WQE. Limited by 6-bit field. */249/* Maximum number of DS in WQE. Limited by 6-bit field. */
250#define MLX5_DSEG_MAX 63250#define MLX5_DSEG_MAX 63
251251
252/* The 32 bit syndrome offset in struct mlx5_err_cqe. */252/* The 32 bit syndrome offset in struct mlx5_error_cqe. */
253#if (RTE_CACHE_LINE_SIZE == 128)
254#define MLX5_ERROR_CQE_SYNDROME_OFFSET 116
255#else
253#define MLX5_ERROR_CQE_SYNDROME_OFFSET 52256#define MLX5_ERROR_CQE_SYNDROME_OFFSET 52
257#endif
254258
255/* The completion mode offset in the WQE control segment line 2. */259/* The completion mode offset in the WQE control segment line 2. */
256#define MLX5_COMP_MODE_OFFSET 2260#define MLX5_COMP_MODE_OFFSET 2
@@ -379,6 +383,29 @@ struct mlx5_wqe_mprq {
379383
380#define MLX5_MPRQ_STRIDE_SHIFT_BYTE 2384#define MLX5_MPRQ_STRIDE_SHIFT_BYTE 2
381385
386struct mlx5_error_cqe {
387#if (RTE_CACHE_LINE_SIZE == 128)
388 uint8_t padding[64];
389#endif
390 uint8_t rsvd0[2];
391 uint16_t eth_wqe_id;
392 uint8_t rsvd1[16];
393 uint16_t ib_stride_index;
394 uint8_t rsvd2[10];
395 uint32_t srqn;
396 uint8_t rsvd3[8];
397 uint32_t byte_cnt;
398 uint8_t rsvd4[4];
399 uint8_t hw_err_synd;
400 uint8_t hw_synd_type;
401 uint8_t vendor_err_synd;
402 uint8_t syndrome;
403 uint32_t s_wqe_opcode_qpn;
404 uint16_t wqe_counter;
405 uint8_t signature;
406 uint8_t op_own;
407};
408
382/* CQ element structure - should be equal to the cache line size */409/* CQ element structure - should be equal to the cache line size */
383struct mlx5_cqe {410struct mlx5_cqe {
384#if (RTE_CACHE_LINE_SIZE == 128)411#if (RTE_CACHE_LINE_SIZE == 128)
@@ -753,7 +780,7 @@ struct mlx5_modification_cmd {
753 unsigned int field:12;780 unsigned int field:12;
754 unsigned int action_type:4;781 unsigned int action_type:4;
755 };782 };
756 };783 } __rte_packed;
757 union {784 union {
758 uint32_t data1;785 uint32_t data1;
759 uint8_t data[4];786 uint8_t data[4];
@@ -764,7 +791,7 @@ struct mlx5_modification_cmd {
764 unsigned int dst_field:12;791 unsigned int dst_field:12;
765 unsigned int rsvd4:4;792 unsigned int rsvd4:4;
766 };793 };
767 };794 } __rte_packed;
768};795};
769796
770typedef uint64_t u64;797typedef uint64_t u64;
diff --git a/drivers/common/mlx5/windows/mlx5_win_defs.h b/drivers/common/mlx5/windows/mlx5_win_defs.h
index 0c09325..d79728b 100644
--- a/drivers/common/mlx5/windows/mlx5_win_defs.h
+++ b/drivers/common/mlx5/windows/mlx5_win_defs.h
@@ -223,18 +223,6 @@ struct mlx5_action {
223 } dest_tir;223 } dest_tir;
224};224};
225225
226struct mlx5_err_cqe {
227 uint8_t rsvd0[32];
228 uint32_t srqn;
229 uint8_t rsvd1[18];
230 uint8_t vendor_err_synd;
231 uint8_t syndrome;
232 uint32_t s_wqe_opcode_qpn;
233 uint16_t wqe_counter;
234 uint8_t signature;
235 uint8_t op_own;
236};
237
238struct mlx5_wqe_srq_next_seg {226struct mlx5_wqe_srq_next_seg {
239 uint8_t rsvd0[2];227 uint8_t rsvd0[2];
240 rte_be16_t next_wqe_index;228 rte_be16_t next_wqe_index;
diff --git a/drivers/compress/mlx5/mlx5_compress.c b/drivers/compress/mlx5/mlx5_compress.c
index 515b5df..e1ca777 100644
--- a/drivers/compress/mlx5/mlx5_compress.c
+++ b/drivers/compress/mlx5/mlx5_compress.c
@@ -537,7 +537,7 @@ mlx5_compress_dump_err_objs(volatile uint32_t *cqe, volatile uint32_t *wqe,
537 size_t i;537 size_t i;
538538
539 DRV_LOG(ERR, "Error cqe:");539 DRV_LOG(ERR, "Error cqe:");
540 for (i = 0; i < sizeof(struct mlx5_err_cqe) >> 2; i += 4)540 for (i = 0; i < sizeof(struct mlx5_error_cqe) >> 2; i += 4)
541 DRV_LOG(ERR, "%08X %08X %08X %08X", cqe[i], cqe[i + 1],541 DRV_LOG(ERR, "%08X %08X %08X %08X", cqe[i], cqe[i + 1],
542 cqe[i + 2], cqe[i + 3]);542 cqe[i + 2], cqe[i + 3]);
543 DRV_LOG(ERR, "\nError wqe:");543 DRV_LOG(ERR, "\nError wqe:");
@@ -555,7 +555,7 @@ mlx5_compress_cqe_err_handle(struct mlx5_compress_qp *qp,
555 struct rte_comp_op *op)555 struct rte_comp_op *op)
556{556{
557 const uint32_t idx = qp->ci & (qp->entries_n - 1);557 const uint32_t idx = qp->ci & (qp->entries_n - 1);
558 volatile struct mlx5_err_cqe *cqe = (volatile struct mlx5_err_cqe *)558 volatile struct mlx5_error_cqe *cqe = (volatile struct mlx5_error_cqe *)
559 &qp->cq.cqes[idx];559 &qp->cq.cqes[idx];
560 volatile struct mlx5_gga_wqe *wqes = (volatile struct mlx5_gga_wqe *)560 volatile struct mlx5_gga_wqe *wqes = (volatile struct mlx5_gga_wqe *)
561 qp->qp.wqes;561 qp->qp.wqes;
diff --git a/drivers/crypto/bcmfs/bcmfs_device.c b/drivers/crypto/bcmfs/bcmfs_device.c
index 27720e4..0d43a9b 100644
--- a/drivers/crypto/bcmfs/bcmfs_device.c
+++ b/drivers/crypto/bcmfs/bcmfs_device.c
@@ -138,7 +138,7 @@ fsdev_allocate_one_dev(struct rte_vdev_device *vdev,
138 return fsdev;138 return fsdev;
139139
140cleanup:140cleanup:
141 free(fsdev);141 rte_free(fsdev);
142142
143 return NULL;143 return NULL;
144}144}
@@ -162,7 +162,7 @@ fsdev_release(struct bcmfs_device *fsdev)
162 return;162 return;
163163
164 TAILQ_REMOVE(&fsdev_list, fsdev, next);164 TAILQ_REMOVE(&fsdev_list, fsdev, next);
165 free(fsdev);165 rte_free(fsdev);
166}166}
167167
168static int168static int
diff --git a/drivers/crypto/cnxk/cnxk_ae.h b/drivers/crypto/cnxk/cnxk_ae.h
index 6222171..16d67a8 100644
--- a/drivers/crypto/cnxk/cnxk_ae.h
+++ b/drivers/crypto/cnxk/cnxk_ae.h
@@ -25,13 +25,22 @@ struct cnxk_ae_sess {
25};25};
2626
27static __rte_always_inline void27static __rte_always_inline void
28cnxk_ae_modex_param_normalize(uint8_t **data, size_t *len)28cnxk_ae_modex_param_normalize(uint8_t **data, size_t *len, size_t max)
29{29{
30 uint8_t msw_len = *len % 8;
31 uint64_t msw_val = 0;
30 size_t i;32 size_t i;
3133
32 /* Strip leading NUL bytes */34 if (*len <= 8)
33 for (i = 0; i < *len; i++) {35 return;
34 if ((*data)[i] != 0)36
37 memcpy(&msw_val, *data, msw_len);
38 if (msw_val != 0)
39 return;
40
41 for (i = msw_len; i < *len && (*len - i) < max; i += 8) {
42 memcpy(&msw_val, &(*data)[i], 8);
43 if (msw_val != 0)
35 break;44 break;
36 }45 }
37 *data += i;46 *data += i;
@@ -48,8 +57,8 @@ cnxk_ae_fill_modex_params(struct cnxk_ae_sess *sess,
48 uint8_t *exp = xform->modex.exponent.data;57 uint8_t *exp = xform->modex.exponent.data;
49 uint8_t *mod = xform->modex.modulus.data;58 uint8_t *mod = xform->modex.modulus.data;
5059
51 cnxk_ae_modex_param_normalize(&mod, &mod_len);60 cnxk_ae_modex_param_normalize(&mod, &mod_len, SIZE_MAX);
52 cnxk_ae_modex_param_normalize(&exp, &exp_len);61 cnxk_ae_modex_param_normalize(&exp, &exp_len, mod_len);
5362
54 if (unlikely(exp_len == 0 || mod_len == 0))63 if (unlikely(exp_len == 0 || mod_len == 0))
55 return -EINVAL;64 return -EINVAL;
@@ -222,7 +231,7 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
222 struct rte_crypto_mod_op_param mod_op;231 struct rte_crypto_mod_op_param mod_op;
223 uint64_t total_key_len;232 uint64_t total_key_len;
224 union cpt_inst_w4 w4;233 union cpt_inst_w4 w4;
225 uint32_t base_len;234 size_t base_len;
226 uint32_t dlen;235 uint32_t dlen;
227 uint8_t *dptr;236 uint8_t *dptr;
228237
@@ -230,8 +239,11 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
230239
231 base_len = mod_op.base.length;240 base_len = mod_op.base.length;
232 if (unlikely(base_len > mod_len)) {241 if (unlikely(base_len > mod_len)) {
233 op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;242 cnxk_ae_modex_param_normalize(&mod_op.base.data, &base_len, mod_len);
234 return -ENOTSUP;243 if (base_len > mod_len) {
244 op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
245 return -ENOTSUP;
246 }
235 }247 }
236248
237 total_key_len = mod_len + exp_len;249 total_key_len = mod_len + exp_len;
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index c9745f1..90bc9ad 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -3186,6 +3186,7 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
3186 }3186 }
3187 } else {3187 } else {
3188 DPAA2_SEC_ERR("Invalid crypto type");3188 DPAA2_SEC_ERR("Invalid crypto type");
3189 rte_free(priv);
3189 return -EINVAL;3190 return -EINVAL;
3190 }3191 }
31913192
@@ -3814,7 +3815,7 @@ dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
3814 cfg.dest_cfg.priority = priority;3815 cfg.dest_cfg.priority = priority;
38153816
3816 cfg.options |= DPSECI_QUEUE_OPT_USER_CTX;3817 cfg.options |= DPSECI_QUEUE_OPT_USER_CTX;
3817 cfg.user_ctx = (size_t)(qp);3818 cfg.user_ctx = (size_t)(&qp->rx_vq);
3818 if (event->sched_type == RTE_SCHED_TYPE_ATOMIC) {3819 if (event->sched_type == RTE_SCHED_TYPE_ATOMIC) {
3819 cfg.options |= DPSECI_QUEUE_OPT_ORDER_PRESERVATION;3820 cfg.options |= DPSECI_QUEUE_OPT_ORDER_PRESERVATION;
3820 cfg.order_preservation_en = 1;3821 cfg.order_preservation_en = 1;
diff --git a/drivers/crypto/ipsec_mb/meson.build b/drivers/crypto/ipsec_mb/meson.build
index e644853..a017ebd 100644
--- a/drivers/crypto/ipsec_mb/meson.build
+++ b/drivers/crypto/ipsec_mb/meson.build
@@ -13,7 +13,7 @@ if not lib.found()
13 build = false13 build = false
14 reason = 'missing dependency, "libIPSec_MB"'14 reason = 'missing dependency, "libIPSec_MB"'
15# if the lib is found, check it's the right format15# if the lib is found, check it's the right format
16elif meson.version().version_compare('>=0.60') and not cc.links(16elif not cc.links(
17 'int main(void) {return 0;}', dependencies: lib)17 'int main(void) {return 0;}', dependencies: lib)
18 build = false18 build = false
19 reason = 'incompatible dependency, "libIPSec_MB"'19 reason = 'incompatible dependency, "libIPSec_MB"'
diff --git a/drivers/crypto/mlx5/mlx5_crypto.c b/drivers/crypto/mlx5/mlx5_crypto.c
index 36db31a..8a53af8 100644
--- a/drivers/crypto/mlx5/mlx5_crypto.c
+++ b/drivers/crypto/mlx5/mlx5_crypto.c
@@ -472,7 +472,7 @@ static __rte_noinline void
472mlx5_crypto_cqe_err_handle(struct mlx5_crypto_qp *qp, struct rte_crypto_op *op)472mlx5_crypto_cqe_err_handle(struct mlx5_crypto_qp *qp, struct rte_crypto_op *op)
473{473{
474 const uint32_t idx = qp->ci & (qp->entries_n - 1);474 const uint32_t idx = qp->ci & (qp->entries_n - 1);
475 volatile struct mlx5_err_cqe *cqe = (volatile struct mlx5_err_cqe *)475 volatile struct mlx5_error_cqe *cqe = (volatile struct mlx5_error_cqe *)
476 &qp->cq_obj.cqes[idx];476 &qp->cq_obj.cqes[idx];
477477
478 op->status = RTE_CRYPTO_OP_STATUS_ERROR;478 op->status = RTE_CRYPTO_OP_STATUS_ERROR;
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 514e932..a75fb09 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -4,6 +4,7 @@
44
5#define OPENSSL_API_COMPAT 0x10100000L5#define OPENSSL_API_COMPAT 0x10100000L
66
7#include <rte_byteorder.h>
7#include <rte_common.h>8#include <rte_common.h>
8#include <rte_hexdump.h>9#include <rte_hexdump.h>
9#include <rte_cryptodev.h>10#include <rte_cryptodev.h>
@@ -43,22 +44,6 @@ static void HMAC_CTX_free(HMAC_CTX *ctx)
4344
44static int cryptodev_openssl_remove(struct rte_vdev_device *vdev);45static int cryptodev_openssl_remove(struct rte_vdev_device *vdev);
4546
46/*----------------------------------------------------------------------------*/
47
48/**
49 * Increment counter by 1
50 * Counter is 64 bit array, big-endian
51 */
52static void
53ctr_inc(uint8_t *ctr)
54{
55 uint64_t *ctr64 = (uint64_t *)ctr;
56
57 *ctr64 = __builtin_bswap64(*ctr64);
58 (*ctr64)++;
59 *ctr64 = __builtin_bswap64(*ctr64);
60}
61
62/*47/*
63 *------------------------------------------------------------------------------48 *------------------------------------------------------------------------------
64 * Session Prepare49 * Session Prepare
@@ -465,6 +450,15 @@ openssl_set_session_cipher_parameters(struct openssl_session *sess,
465 sess->cipher.key.length,450 sess->cipher.key.length,
466 sess->cipher.key.data) != 0)451 sess->cipher.key.data) != 0)
467 return -EINVAL;452 return -EINVAL;
453
454
455 /* We use 3DES encryption also for decryption.
456 * IV is not important for 3DES ECB.
457 */
458 if (EVP_EncryptInit_ex(sess->cipher.ctx, EVP_des_ede3_ecb(),
459 NULL, sess->cipher.key.data, NULL) != 1)
460 return -EINVAL;
461
468 break;462 break;
469463
470 case RTE_CRYPTO_CIPHER_DES_CBC:464 case RTE_CRYPTO_CIPHER_DES_CBC:
@@ -1001,10 +995,10 @@ process_cipher_decrypt_err:
1001/** Process cipher des 3 ctr encryption, decryption algorithm */995/** Process cipher des 3 ctr encryption, decryption algorithm */
1002static int996static int
1003process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,997process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,
1004 int offset, uint8_t *iv, uint8_t *key, int srclen,998 int offset, uint8_t *iv, int srclen, EVP_CIPHER_CTX *ctx)
1005 EVP_CIPHER_CTX *ctx)
1006{999{
1007 uint8_t ebuf[8], ctr[8];1000 uint8_t ebuf[8];
1001 uint64_t ctr;
1008 int unused, n;1002 int unused, n;
1009 struct rte_mbuf *m;1003 struct rte_mbuf *m;
1010 uint8_t *src;1004 uint8_t *src;
@@ -1020,21 +1014,19 @@ process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,
1020 src = rte_pktmbuf_mtod_offset(m, uint8_t *, offset);1014 src = rte_pktmbuf_mtod_offset(m, uint8_t *, offset);
1021 l = rte_pktmbuf_data_len(m) - offset;1015 l = rte_pktmbuf_data_len(m) - offset;
10221016
1023 /* We use 3DES encryption also for decryption.1017 memcpy(&ctr, iv, 8);
1024 * IV is not important for 3DES ecb
1025 */
1026 if (EVP_EncryptInit_ex(ctx, EVP_des_ede3_ecb(), NULL, key, NULL) <= 0)
1027 goto process_cipher_des3ctr_err;
1028
1029 memcpy(ctr, iv, 8);
10301018
1031 for (n = 0; n < srclen; n++) {1019 for (n = 0; n < srclen; n++) {
1032 if (n % 8 == 0) {1020 if (n % 8 == 0) {
1021 uint64_t cpu_ctr;
1022
1033 if (EVP_EncryptUpdate(ctx,1023 if (EVP_EncryptUpdate(ctx,
1034 (unsigned char *)&ebuf, &unused,1024 (unsigned char *)&ebuf, &unused,
1035 (const unsigned char *)&ctr, 8) <= 0)1025 (const unsigned char *)&ctr, 8) <= 0)
1036 goto process_cipher_des3ctr_err;1026 goto process_cipher_des3ctr_err;
1037 ctr_inc(ctr);1027 cpu_ctr = rte_be_to_cpu_64(ctr);
1028 cpu_ctr++;
1029 ctr = rte_cpu_to_be_64(cpu_ctr);
1038 }1030 }
1039 dst[n] = *(src++) ^ ebuf[n % 8];1031 dst[n] = *(src++) ^ ebuf[n % 8];
10401032
@@ -1460,8 +1452,7 @@ process_openssl_cipher_op
1460 srclen, ctx_copy, inplace);1452 srclen, ctx_copy, inplace);
1461 else1453 else
1462 status = process_openssl_cipher_des3ctr(mbuf_src, dst,1454 status = process_openssl_cipher_des3ctr(mbuf_src, dst,
1463 op->sym->cipher.data.offset, iv,1455 op->sym->cipher.data.offset, iv, srclen,
1464 sess->cipher.key.data, srclen,
1465 ctx_copy);1456 ctx_copy);
14661457
1467 EVP_CIPHER_CTX_free(ctx_copy);1458 EVP_CIPHER_CTX_free(ctx_copy);
diff --git a/drivers/dma/idxd/dpdk_idxd_cfg.py b/drivers/dma/idxd/dpdk_idxd_cfg.py
index 3f5d5ee..5c9572b 100755
--- a/drivers/dma/idxd/dpdk_idxd_cfg.py
+++ b/drivers/dma/idxd/dpdk_idxd_cfg.py
@@ -13,18 +13,24 @@ import os.path
1313
1414
15class SysfsDir:15class SysfsDir:
16 verbose = False
17
16 "Used to read/write paths in a sysfs directory"18 "Used to read/write paths in a sysfs directory"
17 def __init__(self, path):19 def __init__(self, path):
18 self.path = path20 self.path = path
1921
20 def read_int(self, filename):22 def read_int(self, filename):
21 "Return a value from sysfs file"23 "Return a value from sysfs file"
24 if SysfsDir.verbose:
25 print(f"Reading '{filename}' in {self.path}")
22 with open(os.path.join(self.path, filename)) as f:26 with open(os.path.join(self.path, filename)) as f:
23 return int(f.readline())27 return int(f.readline())
2428
25 def write_values(self, values):29 def write_values(self, values):
26 "write dictionary, where key is filename and value is value to write"30 "write dictionary, where key is filename and value is value to write"
27 for filename, contents in values.items():31 for filename, contents in values.items():
32 if SysfsDir.verbose:
33 print(f"Writing '{contents}' to '{filename}' in {self.path}")
28 with open(os.path.join(self.path, filename), "w") as f:34 with open(os.path.join(self.path, filename), "w") as f:
29 f.write(str(contents))35 f.write(str(contents))
3036
@@ -63,7 +69,15 @@ def get_dsa_id(pci):
63 sys.exit(f"Could not get device ID for device {pci}")69 sys.exit(f"Could not get device ID for device {pci}")
6470
6571
66def configure_dsa(dsa_id, queues, prefix):72def parse_wq_opts(wq_opts):
73 "Parse user-specified queue configuration, creating a dict of options"
74 try:
75 return {o.split('=')[0]: o.split('=')[1] for o in wq_opts}
76 except ValueError:
77 sys.exit("Invalid --wq-option format, use format 'option=value'")
78
79
80def configure_dsa(dsa_id, args):
67 "Configure the DSA instance with appropriate number of queues"81 "Configure the DSA instance with appropriate number of queues"
68 dsa_dir = SysfsDir(f"/sys/bus/dsa/devices/dsa{dsa_id}")82 dsa_dir = SysfsDir(f"/sys/bus/dsa/devices/dsa{dsa_id}")
6983
@@ -72,8 +86,8 @@ def configure_dsa(dsa_id, queues, prefix):
72 max_queues = dsa_dir.read_int("max_work_queues")86 max_queues = dsa_dir.read_int("max_work_queues")
73 max_work_queues_size = dsa_dir.read_int("max_work_queues_size")87 max_work_queues_size = dsa_dir.read_int("max_work_queues_size")
7488
75 nb_queues = min(queues, max_queues)89 nb_queues = min(args.q, max_queues)
76 if queues > nb_queues:90 if args.q > nb_queues:
77 print(f"Setting number of queues to max supported value: {max_queues}")91 print(f"Setting number of queues to max supported value: {max_queues}")
7892
79 # we want one engine per group, and no more engines than queues93 # we want one engine per group, and no more engines than queues
@@ -83,14 +97,18 @@ def configure_dsa(dsa_id, queues, prefix):
8397
84 # configure each queue98 # configure each queue
85 for q in range(nb_queues):99 for q in range(nb_queues):
100 wqcfg = {"group_id": q % nb_groups,
101 "type": "user",
102 "mode": "dedicated",
103 "name": f"{args.prefix}_wq{dsa_id}.{q}",
104 "priority": 1,
105 "max_batch_size": 1024,
106 "size": int(max_work_queues_size / nb_queues)}
86 wq_dir = SysfsDir(os.path.join(dsa_dir.path, f"wq{dsa_id}.{q}"))107 wq_dir = SysfsDir(os.path.join(dsa_dir.path, f"wq{dsa_id}.{q}"))
87 wq_dir.write_values({"group_id": q % nb_groups,108 if os.path.exists(os.path.join(wq_dir.path, f"driver_name")):
88 "type": "user",109 wqcfg.update({"driver_name": "user"})
89 "mode": "dedicated",110 wqcfg.update(parse_wq_opts(args.wq_option))
90 "name": f"{prefix}_wq{dsa_id}.{q}",111 wq_dir.write_values(wqcfg)
91 "priority": 1,
92 "max_batch_size": 1024,
93 "size": int(max_work_queues_size / nb_queues)})
94112
95 # enable device and then queues113 # enable device and then queues
96 idxd_dir = SysfsDir(get_drv_dir("idxd"))114 idxd_dir = SysfsDir(get_drv_dir("idxd"))
@@ -112,16 +130,22 @@ def main(args):
112 arg_p.add_argument('--name-prefix', metavar='prefix', dest='prefix',130 arg_p.add_argument('--name-prefix', metavar='prefix', dest='prefix',
113 default="dpdk",131 default="dpdk",
114 help="Prefix for workqueue name to mark for DPDK use [default: 'dpdk']")132 help="Prefix for workqueue name to mark for DPDK use [default: 'dpdk']")
133 arg_p.add_argument('--wq-option', action='append', default=[],
134 help="Provide additional config option for queues (format 'x=y')")
135 arg_p.add_argument('--verbose', '-v', action='store_true',
136 help="Provide addition info on tasks being performed")
115 arg_p.add_argument('--reset', action='store_true',137 arg_p.add_argument('--reset', action='store_true',
116 help="Reset DSA device and its queues")138 help="Reset DSA device and its queues")
117 parsed_args = arg_p.parse_args(args[1:])139 parsed_args = arg_p.parse_args(args[1:])
118140
119 dsa_id = parsed_args.dsa_id141 dsa_id = parsed_args.dsa_id
120 dsa_id = get_dsa_id(dsa_id) if ':' in dsa_id else dsa_id142 dsa_id = get_dsa_id(dsa_id) if ':' in dsa_id else dsa_id
143
144 SysfsDir.verbose = parsed_args.verbose
121 if parsed_args.reset:145 if parsed_args.reset:
122 reset_device(dsa_id)146 reset_device(dsa_id)
123 else:147 else:
124 configure_dsa(dsa_id, parsed_args.q, parsed_args.prefix)148 configure_dsa(dsa_id, parsed_args)
125149
126150
127if __name__ == "__main__":151if __name__ == "__main__":
diff --git a/drivers/dma/idxd/idxd_pci.c b/drivers/dma/idxd/idxd_pci.c
index 2f8ec06..3dd25bf 100644
--- a/drivers/dma/idxd/idxd_pci.c
+++ b/drivers/dma/idxd/idxd_pci.c
@@ -292,7 +292,7 @@ init_pci_device(struct rte_pci_device *dev, struct idxd_dmadev *idxd,
292 return nb_wqs;292 return nb_wqs;
293293
294err:294err:
295 free(pci);295 rte_free(pci);
296 return err_code;296 return err_code;
297}297}
298298
diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index 2d422ae..4ad16d2 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -202,8 +202,8 @@ cnxk_setup_event_ports(const struct rte_eventdev *event_dev,
202 return 0;202 return 0;
203hws_fini:203hws_fini:
204 for (i = i - 1; i >= 0; i--) {204 for (i = i - 1; i >= 0; i--) {
205 event_dev->data->ports[i] = NULL;
206 rte_free(cnxk_sso_hws_get_cookie(event_dev->data->ports[i]));205 rte_free(cnxk_sso_hws_get_cookie(event_dev->data->ports[i]));
206 event_dev->data->ports[i] = NULL;
207 }207 }
208 return -ENOMEM;208 return -ENOMEM;
209}209}
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index 634fa8a..42240d9 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -713,10 +713,20 @@ ssovf_close(struct rte_eventdev *dev)
713}713}
714714
715static int715static int
716ssovf_parsekv(const char *key __rte_unused, const char *value, void *opaque)716ssovf_parsekv(const char *key, const char *value, void *opaque)
717{717{
718 int *flag = opaque;718 uint8_t *flag = opaque;
719 *flag = !!atoi(value);719 uint64_t v;
720 char *end;
721
722 errno = 0;
723 v = strtoul(value, &end, 0);
724 if ((errno != 0) || (value == end) || *end != '\0' || v > 1) {
725 ssovf_log_err("invalid %s value %s", key, value);
726 return -EINVAL;
727 }
728
729 *flag = !!v;
720 return 0;730 return 0;
721}731}
722732
diff --git a/drivers/event/sw/iq_chunk.h b/drivers/event/sw/iq_chunk.h
index 31d013e..7820815 100644
--- a/drivers/event/sw/iq_chunk.h
+++ b/drivers/event/sw/iq_chunk.h
@@ -9,8 +9,6 @@
9#include <stdbool.h>9#include <stdbool.h>
10#include <rte_eventdev.h>10#include <rte_eventdev.h>
1111
12#define IQ_ROB_NAMESIZE 12
13
14struct sw_queue_chunk {12struct sw_queue_chunk {
15 struct rte_event events[SW_EVS_PER_Q_CHUNK];13 struct rte_event events[SW_EVS_PER_Q_CHUNK];
16 struct sw_queue_chunk *next;14 struct sw_queue_chunk *next;
diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index e43bf25..d1fd0ee 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -229,9 +229,7 @@ qid_init(struct sw_evdev *sw, unsigned int idx, int type,
229 const struct rte_event_queue_conf *queue_conf)229 const struct rte_event_queue_conf *queue_conf)
230{230{
231 unsigned int i;231 unsigned int i;
232 int dev_id = sw->data->dev_id;
233 int socket_id = sw->data->socket_id;232 int socket_id = sw->data->socket_id;
234 char buf[IQ_ROB_NAMESIZE];
235 struct sw_qid *qid = &sw->qids[idx];233 struct sw_qid *qid = &sw->qids[idx];
236234
237 /* Initialize the FID structures to no pinning (-1), and zero packets */235 /* Initialize the FID structures to no pinning (-1), and zero packets */
@@ -261,8 +259,7 @@ qid_init(struct sw_evdev *sw, unsigned int idx, int type,
261 goto cleanup;259 goto cleanup;
262 }260 }
263261
264 snprintf(buf, sizeof(buf), "sw%d_iq_%d_rob", dev_id, i);262 qid->reorder_buffer = rte_zmalloc_socket(NULL,
265 qid->reorder_buffer = rte_zmalloc_socket(buf,
266 window_size * sizeof(qid->reorder_buffer[0]),263 window_size * sizeof(qid->reorder_buffer[0]),
267 0, socket_id);264 0, socket_id);
268 if (!qid->reorder_buffer) {265 if (!qid->reorder_buffer) {
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 88cdc7e..164597d 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -6,6 +6,7 @@
6 * All rights reserved.6 * All rights reserved.
7 */7 */
88
9#include <rte_common.h>
9#include <rte_string_fns.h>10#include <rte_string_fns.h>
10#include <rte_mbuf.h>11#include <rte_mbuf.h>
11#include <ethdev_driver.h>12#include <ethdev_driver.h>
@@ -38,7 +39,7 @@
38#define DFLT_FRAME_SIZE (1 << 11)39#define DFLT_FRAME_SIZE (1 << 11)
39#define DFLT_FRAME_COUNT (1 << 9)40#define DFLT_FRAME_COUNT (1 << 9)
4041
41struct pkt_rx_queue {42struct __rte_cache_aligned pkt_rx_queue {
42 int sockfd;43 int sockfd;
4344
44 struct iovec *rd;45 struct iovec *rd;
@@ -54,7 +55,7 @@ struct pkt_rx_queue {
54 volatile unsigned long rx_bytes;55 volatile unsigned long rx_bytes;
55};56};
5657
57struct pkt_tx_queue {58struct __rte_cache_aligned pkt_tx_queue {
58 int sockfd;59 int sockfd;
59 unsigned int frame_data_size;60 unsigned int frame_data_size;
6061
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index d7214c2..5e2c239 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -100,6 +100,7 @@ struct pkt_rx_queue {
100 struct xsk_umem_info *umem;100 struct xsk_umem_info *umem;
101 struct xsk_socket *xsk;101 struct xsk_socket *xsk;
102 struct rte_mempool *mb_pool;102 struct rte_mempool *mb_pool;
103 uint16_t port;
103104
104 struct rx_stats stats;105 struct rx_stats stats;
105106
@@ -270,6 +271,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
270 unsigned long rx_bytes = 0;271 unsigned long rx_bytes = 0;
271 int i;272 int i;
272 struct rte_mbuf *fq_bufs[ETH_AF_XDP_RX_BATCH_SIZE];273 struct rte_mbuf *fq_bufs[ETH_AF_XDP_RX_BATCH_SIZE];
274 struct rte_eth_dev *dev = &rte_eth_devices[rxq->port];
273275
274 nb_pkts = xsk_ring_cons__peek(rx, nb_pkts, &idx_rx);276 nb_pkts = xsk_ring_cons__peek(rx, nb_pkts, &idx_rx);
275277
@@ -297,6 +299,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
297 * xsk_ring_cons__peek299 * xsk_ring_cons__peek
298 */300 */
299 rx->cached_cons -= nb_pkts;301 rx->cached_cons -= nb_pkts;
302 dev->data->rx_mbuf_alloc_failed += nb_pkts;
300 return 0;303 return 0;
301 }304 }
302305
@@ -319,6 +322,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
319 bufs[i]->data_off = offset - sizeof(struct rte_mbuf) -322 bufs[i]->data_off = offset - sizeof(struct rte_mbuf) -
320 rte_pktmbuf_priv_size(umem->mb_pool) -323 rte_pktmbuf_priv_size(umem->mb_pool) -
321 umem->mb_pool->header_size;324 umem->mb_pool->header_size;
325 bufs[i]->port = rxq->port;
322326
323 rte_pktmbuf_pkt_len(bufs[i]) = len;327 rte_pktmbuf_pkt_len(bufs[i]) = len;
324 rte_pktmbuf_data_len(bufs[i]) = len;328 rte_pktmbuf_data_len(bufs[i]) = len;
@@ -347,6 +351,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
347 int i;351 int i;
348 uint32_t free_thresh = fq->size >> 1;352 uint32_t free_thresh = fq->size >> 1;
349 struct rte_mbuf *mbufs[ETH_AF_XDP_RX_BATCH_SIZE];353 struct rte_mbuf *mbufs[ETH_AF_XDP_RX_BATCH_SIZE];
354 struct rte_eth_dev *dev = &rte_eth_devices[rxq->port];
350355
351 if (xsk_prod_nb_free(fq, free_thresh) >= free_thresh)356 if (xsk_prod_nb_free(fq, free_thresh) >= free_thresh)
352 (void)reserve_fill_queue(umem, nb_pkts, NULL, fq);357 (void)reserve_fill_queue(umem, nb_pkts, NULL, fq);
@@ -365,6 +370,8 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
365 * xsk_ring_cons__peek370 * xsk_ring_cons__peek
366 */371 */
367 rx->cached_cons -= nb_pkts;372 rx->cached_cons -= nb_pkts;
373 dev->data->rx_mbuf_alloc_failed += nb_pkts;
374
368 return 0;375 return 0;
369 }376 }
370377
@@ -385,6 +392,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
385 rte_pktmbuf_data_len(mbufs[i]) = len;392 rte_pktmbuf_data_len(mbufs[i]) = len;
386 rx_bytes += len;393 rx_bytes += len;
387 bufs[i] = mbufs[i];394 bufs[i] = mbufs[i];
395 bufs[i]->port = rxq->port;
388 }396 }
389397
390 xsk_ring_cons__release(rx, nb_pkts);398 xsk_ring_cons__release(rx, nb_pkts);
@@ -1447,6 +1455,8 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
1447 rxq->fds[0].fd = xsk_socket__fd(rxq->xsk);1455 rxq->fds[0].fd = xsk_socket__fd(rxq->xsk);
1448 rxq->fds[0].events = POLLIN;1456 rxq->fds[0].events = POLLIN;
14491457
1458 rxq->port = dev->data->port_id;
1459
1450 dev->data->rx_queues[rx_queue_id] = rxq;1460 dev->data->rx_queues[rx_queue_id] = rxq;
1451 return 0;1461 return 0;
14521462
diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
index 676e411..0914717 100644
--- a/drivers/net/ark/ark_ethdev_tx.c
+++ b/drivers/net/ark/ark_ethdev_tx.c
@@ -39,8 +39,8 @@ struct ark_tx_queue {
39 uint32_t queue_mask;39 uint32_t queue_mask;
4040
41 /* 3 indexes to the paired data rings. */41 /* 3 indexes to the paired data rings. */
42 int32_t prod_index; /* where to put the next one */42 uint32_t prod_index; /* where to put the next one */
43 int32_t free_index; /* mbuf has been freed */43 uint32_t free_index; /* mbuf has been freed */
4444
45 /* The queue Id is used to identify the HW Q */45 /* The queue Id is used to identify the HW Q */
46 uint16_t phys_qid;46 uint16_t phys_qid;
@@ -49,7 +49,7 @@ struct ark_tx_queue {
4949
50 /* next cache line - fields written by device */50 /* next cache line - fields written by device */
51 RTE_MARKER cacheline1 __rte_cache_min_aligned;51 RTE_MARKER cacheline1 __rte_cache_min_aligned;
52 volatile int32_t cons_index; /* hw is done, can be freed */52 volatile uint32_t cons_index; /* hw is done, can be freed */
53} __rte_cache_aligned;53} __rte_cache_aligned;
5454
55/* Forward declarations */55/* Forward declarations */
@@ -123,7 +123,7 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
123 uint32_t user_meta[5];123 uint32_t user_meta[5];
124124
125 int stat;125 int stat;
126 int32_t prod_index_limit;126 uint32_t prod_index_limit;
127 uint16_t nb;127 uint16_t nb;
128 uint8_t user_len = 0;128 uint8_t user_len = 0;
129 const uint32_t min_pkt_len = ARK_MIN_TX_PKTLEN;129 const uint32_t min_pkt_len = ARK_MIN_TX_PKTLEN;
@@ -138,8 +138,13 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
138 /* leave 4 elements mpu data */138 /* leave 4 elements mpu data */
139 prod_index_limit = queue->queue_size + queue->free_index - 4;139 prod_index_limit = queue->queue_size + queue->free_index - 4;
140140
141 /* Populate the buffer bringing prod_index up to or slightly beyond
142 * prod_index_limit. Prod_index will increment by 2 or more each
143 * iteration. Note: indexes are uint32_t, cast to (signed) int32_t
144 * to catch the slight overage case; e.g. (200 - 201)
145 */
141 for (nb = 0;146 for (nb = 0;
142 (nb < nb_pkts) && (prod_index_limit - queue->prod_index) > 0;147 (nb < nb_pkts) && (int32_t)(prod_index_limit - queue->prod_index) > 0;
143 ++nb) {148 ++nb) {
144 mbuf = tx_pkts[nb];149 mbuf = tx_pkts[nb];
145150
@@ -209,13 +214,13 @@ eth_ark_tx_jumbo(struct ark_tx_queue *queue, struct rte_mbuf *mbuf,
209 uint32_t *user_meta, uint8_t meta_cnt)214 uint32_t *user_meta, uint8_t meta_cnt)
210{215{
211 struct rte_mbuf *next;216 struct rte_mbuf *next;
212 int32_t free_queue_space;217 uint32_t free_queue_space;
213 uint8_t flags = ARK_DDM_SOP;218 uint8_t flags = ARK_DDM_SOP;
214219
215 free_queue_space = queue->queue_mask -220 free_queue_space = queue->queue_mask -
216 (queue->prod_index - queue->free_index);221 (queue->prod_index - queue->free_index);
217 /* We need up to 4 mbufs for first header and 2 for subsequent ones */222 /* We need up to 4 mbufs for first header and 2 for subsequent ones */
218 if (unlikely(free_queue_space < (2 + (2 * mbuf->nb_segs))))223 if (unlikely(free_queue_space < (2U + (2U * mbuf->nb_segs))))
219 return -1;224 return -1;
220225
221 while (mbuf != NULL) {226 while (mbuf != NULL) {
@@ -424,10 +429,11 @@ free_completed_tx(struct ark_tx_queue *queue)
424{429{
425 struct rte_mbuf *mbuf;430 struct rte_mbuf *mbuf;
426 union ark_tx_meta *meta;431 union ark_tx_meta *meta;
427 int32_t top_index;432 uint32_t top_index;
428433
429 top_index = queue->cons_index; /* read once */434 top_index = queue->cons_index; /* read once */
430 while ((top_index - queue->free_index) > 0) {435
436 while ((int32_t)(top_index - queue->free_index) > 0) {
431 meta = &queue->meta_q[queue->free_index & queue->queue_mask];437 meta = &queue->meta_q[queue->free_index & queue->queue_mask];
432 if (likely((meta->flags & ARK_DDM_SOP) != 0)) {438 if (likely((meta->flags & ARK_DDM_SOP) != 0)) {
433 mbuf = queue->bufs[queue->free_index &439 mbuf = queue->bufs[queue->free_index &
diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h
index df0aa21..9618d7e 100644
--- a/drivers/net/axgbe/axgbe_common.h
+++ b/drivers/net/axgbe/axgbe_common.h
@@ -407,8 +407,6 @@
407#define MAC_MDIOSCAR_PA_WIDTH 5407#define MAC_MDIOSCAR_PA_WIDTH 5
408#define MAC_MDIOSCAR_RA_INDEX 0408#define MAC_MDIOSCAR_RA_INDEX 0
409#define MAC_MDIOSCAR_RA_WIDTH 16409#define MAC_MDIOSCAR_RA_WIDTH 16
410#define MAC_MDIOSCAR_REG_INDEX 0
411#define MAC_MDIOSCAR_REG_WIDTH 21
412#define MAC_MDIOSCCDR_BUSY_INDEX 22410#define MAC_MDIOSCCDR_BUSY_INDEX 22
413#define MAC_MDIOSCCDR_BUSY_WIDTH 1411#define MAC_MDIOSCCDR_BUSY_WIDTH 1
414#define MAC_MDIOSCCDR_CMD_INDEX 16412#define MAC_MDIOSCCDR_CMD_INDEX 16
diff --git a/drivers/net/axgbe/axgbe_dev.c b/drivers/net/axgbe/axgbe_dev.c
index 6a7fddf..5233633 100644
--- a/drivers/net/axgbe/axgbe_dev.c
+++ b/drivers/net/axgbe/axgbe_dev.c
@@ -63,15 +63,27 @@ static int mdio_complete(struct axgbe_port *pdata)
63 return 0;63 return 0;
64}64}
6565
66static unsigned int axgbe_create_mdio_sca(int port, int reg)
67{
68 unsigned int mdio_sca, da;
69
70 da = (reg & MII_ADDR_C45) ? reg >> 16 : 0;
71
72 mdio_sca = 0;
73 AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, RA, reg);
74 AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, PA, port);
75 AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, DA, da);
76
77 return mdio_sca;
78}
79
66static int axgbe_write_ext_mii_regs(struct axgbe_port *pdata, int addr,80static int axgbe_write_ext_mii_regs(struct axgbe_port *pdata, int addr,
67 int reg, u16 val)81 int reg, u16 val)
68{82{
69 unsigned int mdio_sca, mdio_sccd;83 unsigned int mdio_sca, mdio_sccd;
70 uint64_t timeout;84 uint64_t timeout;
7185
72 mdio_sca = 0;86 mdio_sca = axgbe_create_mdio_sca(addr, reg);
73 AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, REG, reg);
74 AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, DA, addr);
75 AXGMAC_IOWRITE(pdata, MAC_MDIOSCAR, mdio_sca);87 AXGMAC_IOWRITE(pdata, MAC_MDIOSCAR, mdio_sca);
7688
77 mdio_sccd = 0;89 mdio_sccd = 0;
@@ -97,9 +109,7 @@ static int axgbe_read_ext_mii_regs(struct axgbe_port *pdata, int addr,
97 unsigned int mdio_sca, mdio_sccd;109 unsigned int mdio_sca, mdio_sccd;
98 uint64_t timeout;110 uint64_t timeout;
99111
100 mdio_sca = 0;112 mdio_sca = axgbe_create_mdio_sca(addr, reg);
101 AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, REG, reg);
102 AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, DA, addr);
103 AXGMAC_IOWRITE(pdata, MAC_MDIOSCAR, mdio_sca);113 AXGMAC_IOWRITE(pdata, MAC_MDIOSCAR, mdio_sca);
104114
105 mdio_sccd = 0;115 mdio_sccd = 0;
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches