Merge ~paelzer/ubuntu/+source/dpdk:lp-1975764-MRE-Sept-2022-KINETIC into ubuntu/+source/dpdk:ubuntu/kinetic-devel
- Git
- lp:~paelzer/ubuntu/+source/dpdk
- lp-1975764-MRE-Sept-2022-KINETIC
- Merge into ubuntu/kinetic-devel
Status: | Merged |
---|---|
Approved by: | git-ubuntu bot |
Approved revision: | not available |
Merged at revision: | c3b86710a807f549e04ec2d204991432c4bb0428 |
Proposed branch: | ~paelzer/ubuntu/+source/dpdk:lp-1975764-MRE-Sept-2022-KINETIC |
Merge into: | ubuntu/+source/dpdk:ubuntu/kinetic-devel |
Diff against target: |
19559 lines (+6064/-3194) 328 files modified
VERSION (+1/-1) app/proc-info/main.c (+2/-2) app/test-flow-perf/main.c (+9/-39) app/test-pmd/5tswap.c (+13/-0) app/test-pmd/cmd_flex_item.c (+18/-12) app/test-pmd/cmdline.c (+30/-22) app/test-pmd/cmdline_flow.c (+10/-18) app/test-pmd/cmdline_mtr.c (+2/-2) app/test-pmd/config.c (+143/-20) app/test-pmd/csumonly.c (+39/-4) app/test-pmd/flowgen.c (+13/-0) app/test-pmd/icmpecho.c (+13/-0) app/test-pmd/ieee1588fwd.c (+13/-0) app/test-pmd/iofwd.c (+13/-0) app/test-pmd/macfwd.c (+13/-0) app/test-pmd/macswap.c (+13/-0) app/test-pmd/noisy_vnf.c (+13/-0) app/test-pmd/parameters.c (+6/-2) app/test-pmd/rxonly.c (+8/-0) app/test-pmd/shared_rxq_fwd.c (+8/-0) app/test-pmd/testpmd.c (+192/-43) app/test-pmd/testpmd.h (+27/-3) app/test-pmd/txonly.c (+8/-0) app/test-regex/main.c (+4/-2) app/test/meson.build (+0/-2) app/test/test_bpf.c (+12/-2) app/test/test_crc.c (+2/-0) app/test/test_cryptodev.c (+9/-7) app/test/test_cryptodev_snow3g_test_vectors.h (+71/-71) app/test/test_cryptodev_zuc_test_vectors.h (+27/-27) app/test/test_hash_readwrite_lf_perf.c (+1/-1) app/test/test_ipsec.c (+22/-13) app/test/test_ipsec_perf.c (+2/-2) app/test/test_link_bonding_rssconf.c (+73/-5) app/test/test_memory.c (+5/-0) app/test/test_pmd_perf.c (+12/-0) app/test/test_table_tables.c (+5/-5) config/arm/arm32_armv8_linux_gcc (+1/-1) config/arm/arm64_armada_linux_gcc (+1/-1) config/arm/arm64_armv8_linux_gcc (+1/-1) config/arm/arm64_bluefield_linux_gcc (+1/-1) config/arm/arm64_centriq2400_linux_gcc (+1/-1) config/arm/arm64_cn10k_linux_gcc (+1/-1) config/arm/arm64_dpaa_linux_gcc (+1/-1) config/arm/arm64_emag_linux_gcc (+1/-1) config/arm/arm64_graviton2_linux_gcc (+1/-1) config/arm/arm64_kunpeng920_linux_gcc (+1/-1) config/arm/arm64_kunpeng930_linux_gcc (+1/-1) config/arm/arm64_n1sdp_linux_gcc (+1/-1) config/arm/arm64_n2_linux_gcc (+1/-1) config/arm/arm64_octeontx2_linux_gcc (+1/-1) config/arm/arm64_stingray_linux_gcc (+1/-1) config/arm/arm64_thunderx2_linux_gcc (+1/-1) config/arm/arm64_thunderxt88_linux_gcc (+1/-1) config/ppc/ppc64le-power8-linux-gcc (+1/-1) debian/changelog (+11/-0) devtools/test-null.sh (+2/-1) doc/api/doxy-api-index.md (+183/-183) doc/guides/eventdevs/features/dlb2.ini (+2/-1) doc/guides/linux_gsg/enable_func.rst (+58/-27) doc/guides/nics/af_xdp.rst (+2/-4) doc/guides/nics/i40e.rst (+23/-0) doc/guides/nics/ice.rst (+2/-0) doc/guides/nics/ixgbe.rst (+17/-0) doc/guides/nics/mlx5.rst (+10/-3) doc/guides/prog_guide/bpf_lib.rst (+4/-4) doc/guides/prog_guide/compressdev.rst (+148/-135) doc/guides/prog_guide/event_ethernet_rx_adapter.rst (+2/-2) doc/guides/prog_guide/vhost_lib.rst (+9/-9) doc/guides/rel_notes/known_issues.rst (+4/-3) doc/guides/rel_notes/release_21_11.rst (+455/-1) doc/guides/sample_app_ug/ipsec_secgw.rst (+3/-1) doc/guides/sample_app_ug/l2_forward_crypto.rst (+36/-36) drivers/baseband/acc100/acc100_pf_enum.h (+18/-0) drivers/baseband/acc100/rte_acc100_pmd.c (+126/-43) drivers/baseband/acc100/rte_acc100_pmd.h (+15/-5) drivers/bus/fslmc/fslmc_vfio.c (+9/-1) drivers/bus/vmbus/private.h (+2/-0) drivers/bus/vmbus/vmbus_channel.c (+7/-8) drivers/common/cnxk/roc_bphy_cgx.c (+0/-3) drivers/common/cnxk/roc_cpt_debug.c (+1/-1) drivers/common/cnxk/roc_mbox.h (+33/-2) drivers/common/cnxk/roc_nix_tm.c (+7/-0) drivers/common/cnxk/roc_npc_parse.c (+2/-0) drivers/common/cnxk/roc_npc_utils.c (+4/-1) drivers/common/cnxk/roc_platform.c (+5/-1) drivers/common/cnxk/roc_se.c (+5/-2) drivers/common/cnxk/roc_se.h (+22/-0) drivers/common/cnxk/roc_sso.c (+2/-2) drivers/common/cpt/cpt_mcode_defines.h (+1/-1) drivers/common/cpt/cpt_ucode.h (+10/-11) drivers/common/dpaax/caamflib/desc/pdcp.h (+1/-1) drivers/common/mlx5/linux/mlx5_common_os.c (+19/-7) drivers/common/mlx5/mlx5_common.c (+30/-0) drivers/common/mlx5/mlx5_common_mr.c (+120/-45) drivers/common/mlx5/mlx5_common_mr.h (+4/-3) drivers/common/mlx5/mlx5_common_utils.c (+1/-3) drivers/common/sfc_efx/base/efx_impl.h (+6/-0) drivers/common/sfc_efx/base/efx_mcdi.c (+40/-4) drivers/crypto/ccp/ccp_crypto.c (+2/-0) drivers/crypto/cnxk/cnxk_se.h (+23/-21) drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c (+43/-8) drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c (+7/-3) drivers/crypto/dpaa_sec/dpaa_sec.c (+12/-12) drivers/crypto/dpaa_sec/dpaa_sec.h (+2/-2) drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c (+7/-3) drivers/crypto/ipsec_mb/pmd_snow3g.c (+4/-3) drivers/crypto/mlx5/mlx5_crypto.c (+1/-0) drivers/crypto/openssl/rte_openssl_pmd.c (+2/-0) drivers/crypto/openssl/rte_openssl_pmd_ops.c (+2/-0) drivers/crypto/qat/qat_sym.c (+2/-0) drivers/crypto/qat/qat_sym_session.c (+5/-1) drivers/crypto/scheduler/scheduler_failover.c (+3/-0) drivers/dma/hisilicon/hisi_dmadev.c (+15/-5) drivers/dma/hisilicon/hisi_dmadev.h (+2/-0) drivers/dma/idxd/idxd_common.c (+23/-0) drivers/dma/idxd/idxd_internal.h (+2/-0) drivers/dma/idxd/idxd_pci.c (+35/-14) drivers/dma/idxd/meson.build (+11/-1) drivers/dma/skeleton/skeleton_dmadev.c (+14/-3) drivers/dma/skeleton/skeleton_dmadev.h (+1/-0) drivers/event/cnxk/cn10k_worker.h (+1/-1) drivers/event/cnxk/cnxk_eventdev.c (+4/-4) drivers/event/cnxk/cnxk_eventdev_selftest.c (+12/-0) drivers/event/dlb2/dlb2.c (+5/-4) drivers/event/dlb2/pf/base/dlb2_hw_types.h (+1/-1) drivers/event/dlb2/pf/base/dlb2_resource.c (+37/-10) drivers/event/octeontx/ssovf_worker.h (+15/-9) drivers/net/af_xdp/compat.h (+44/-1) drivers/net/af_xdp/meson.build (+37/-7) drivers/net/af_xdp/rte_eth_af_xdp.c (+4/-6) drivers/net/axgbe/axgbe_ethdev.c (+4/-4) drivers/net/bnxt/bnxt.h (+2/-27) drivers/net/bnxt/bnxt_ethdev.c (+75/-76) drivers/net/bnxt/bnxt_filter.c (+2/-0) drivers/net/bnxt/bnxt_flow.c (+55/-20) drivers/net/bnxt/bnxt_hwrm.c (+40/-29) drivers/net/bnxt/bnxt_hwrm.h (+23/-0) drivers/net/bnxt/bnxt_reps.c (+2/-4) drivers/net/bnxt/bnxt_rxq.c (+45/-34) drivers/net/bnxt/bnxt_rxq.h (+1/-0) drivers/net/bnxt/bnxt_rxtx_vec_neon.c (+15/-2) drivers/net/bnxt/bnxt_txq.c (+29/-0) drivers/net/bnxt/bnxt_txq.h (+1/-0) drivers/net/bnxt/hsi_struct_def_dpdk.h (+60/-1) drivers/net/bnxt/tf_ulp/ulp_rte_parser.c (+1/-1) drivers/net/bonding/rte_eth_bond_pmd.c (+40/-15) drivers/net/cnxk/cn10k_rx.h (+4/-3) drivers/net/cnxk/cn10k_tx.h (+2/-2) drivers/net/cnxk/cn9k_tx.h (+2/-2) drivers/net/cnxk/cnxk_ethdev_telemetry.c (+2/-0) drivers/net/cnxk/cnxk_rte_flow.c (+8/-1) drivers/net/cxgbe/sge.c (+24/-16) drivers/net/dpaa/dpaa_ethdev.c (+4/-10) drivers/net/dpaa2/dpaa2_mux.c (+1/-1) drivers/net/ena/ena_rss.c (+3/-4) drivers/net/enetfec/enet_ethdev.c (+9/-0) drivers/net/failsafe/failsafe.c (+1/-1) drivers/net/hns3/hns3_cmd.c (+0/-33) drivers/net/hns3/hns3_cmd.h (+1/-1) drivers/net/hns3/hns3_ethdev.c (+38/-47) drivers/net/hns3/hns3_ethdev.h (+6/-1) drivers/net/hns3/hns3_ethdev_vf.c (+15/-14) drivers/net/hns3/hns3_fdir.c (+1/-1) drivers/net/hns3/hns3_flow.c (+2/-18) drivers/net/hns3/hns3_ptp.c (+1/-1) drivers/net/hns3/hns3_rss.c (+31/-97) drivers/net/hns3/hns3_rss.h (+3/-4) drivers/net/hns3/hns3_rxtx.c (+9/-6) drivers/net/hns3/hns3_rxtx.h (+2/-2) drivers/net/hns3/hns3_stats.c (+124/-48) drivers/net/hns3/hns3_stats.h (+3/-3) drivers/net/i40e/i40e_ethdev.c (+12/-8) drivers/net/i40e/i40e_flow.c (+5/-2) drivers/net/i40e/i40e_rxtx_vec_altivec.c (+107/-107) drivers/net/iavf/iavf.h (+2/-1) drivers/net/iavf/iavf_ethdev.c (+80/-18) drivers/net/iavf/iavf_fdir.c (+16/-2) drivers/net/iavf/iavf_ipsec_crypto.c (+73/-9) drivers/net/iavf/iavf_rxtx.c (+52/-27) drivers/net/iavf/iavf_rxtx.h (+11/-0) drivers/net/iavf/iavf_rxtx_vec_avx512.c (+2/-6) drivers/net/iavf/iavf_rxtx_vec_sse.c (+4/-12) drivers/net/iavf/iavf_vchnl.c (+17/-0) drivers/net/ice/base/ice_flex_pipe.c (+1/-1) drivers/net/ice/base/ice_flex_pipe.h (+1/-1) drivers/net/ice/base/ice_protocol_type.h (+5/-3) drivers/net/ice/base/ice_sched.c (+2/-2) drivers/net/ice/base/ice_switch.c (+26/-5) drivers/net/ice/base/ice_switch.h (+1/-1) drivers/net/ice/ice_dcf_ethdev.c (+2/-0) drivers/net/ice/ice_ethdev.c (+12/-1) drivers/net/ice/ice_ethdev.h (+1/-0) drivers/net/ice/ice_fdir_filter.c (+23/-16) drivers/net/ice/ice_generic_flow.c (+8/-0) drivers/net/ice/ice_hash.c (+4/-5) drivers/net/ice/ice_rxtx.c (+88/-35) drivers/net/ice/ice_rxtx.h (+3/-0) drivers/net/igc/igc_ethdev.c (+8/-1) drivers/net/igc/igc_txrx.c (+4/-4) drivers/net/igc/igc_txrx.h (+6/-0) drivers/net/ipn3ke/ipn3ke_representor.c (+0/-3) drivers/net/ixgbe/ixgbe_ethdev.c (+38/-1) drivers/net/ixgbe/ixgbe_ethdev.h (+3/-0) drivers/net/memif/rte_eth_memif.c (+1/-1) drivers/net/mlx5/linux/mlx5_ethdev_os.c (+6/-7) drivers/net/mlx5/linux/mlx5_os.c (+12/-12) drivers/net/mlx5/linux/mlx5_verbs.c (+1/-4) drivers/net/mlx5/mlx5_devx.c (+3/-1) drivers/net/mlx5/mlx5_flow.c (+114/-16) drivers/net/mlx5/mlx5_flow.h (+10/-0) drivers/net/mlx5/mlx5_flow_dv.c (+20/-41) drivers/net/mlx5/mlx5_rx.c (+24/-10) drivers/net/mlx5/mlx5_rx.h (+1/-0) drivers/net/mlx5/mlx5_rxq.c (+11/-1) drivers/net/mlx5/mlx5_rxtx_vec_altivec.h (+542/-542) drivers/net/mlx5/mlx5_stats.c (+24/-16) drivers/net/mlx5/mlx5_tx.h (+2/-1) drivers/net/mvpp2/mrvl_ethdev.c (+6/-5) drivers/net/netvsc/hn_ethdev.c (+65/-17) drivers/net/netvsc/hn_nvs.c (+7/-7) drivers/net/netvsc/hn_rxtx.c (+13/-8) drivers/net/netvsc/hn_var.h (+12/-4) drivers/net/netvsc/hn_vf.c (+4/-0) drivers/net/nfp/nfp_common.c (+39/-12) drivers/net/nfp/nfp_common.h (+3/-0) drivers/net/nfp/nfp_ethdev.c (+1/-0) drivers/net/nfp/nfp_ethdev_vf.c (+1/-0) drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c (+0/-3) drivers/net/ngbe/base/ngbe_hw.c (+19/-6) drivers/net/ngbe/base/ngbe_osdep.h (+4/-0) drivers/net/ngbe/base/ngbe_phy.c (+2/-5) drivers/net/ngbe/base/ngbe_regs.h (+7/-2) drivers/net/ngbe/ngbe_ethdev.c (+10/-1) drivers/net/octeontx/octeontx_ethdev.c (+12/-3) drivers/net/qede/base/bcm_osal.h (+1/-2) drivers/net/qede/qede_debug.c (+2/-1) drivers/net/qede/qede_ethdev.c (+1/-1) drivers/net/qede/qede_filter.c (+6/-10) drivers/net/qede/qede_main.c (+6/-7) drivers/net/qede/qede_sriov.c (+3/-3) drivers/net/tap/rte_eth_tap.c (+3/-1) drivers/net/tap/tap_intr.c (+0/-2) drivers/net/txgbe/base/txgbe_phy.c (+11/-1) drivers/net/txgbe/base/txgbe_regs.h (+8/-3) drivers/net/txgbe/txgbe_pf.c (+1/-1) drivers/net/vhost/rte_eth_vhost.c (+24/-13) drivers/net/virtio/meson.build (+3/-3) drivers/net/virtio/virtio_pci_ethdev.c (+11/-1) drivers/net/virtio/virtio_rxtx_simple_altivec.c (+35/-35) drivers/net/virtio/virtio_user/vhost_user.c (+1/-14) drivers/net/virtio/virtio_user/virtio_user_dev.c (+1/-1) drivers/net/vmxnet3/vmxnet3_ethdev.c (+5/-0) drivers/raw/ifpga/ifpga_rawdev.c (+140/-55) drivers/raw/ifpga/ifpga_rawdev.h (+8/-0) drivers/raw/ioat/ioat_common.c (+2/-0) drivers/raw/ioat/ioat_private.h (+2/-2) drivers/raw/ioat/ioat_rawdev.c (+0/-2) drivers/raw/ioat/rte_idxd_rawdev_fns.h (+1/-0) drivers/vdpa/ifc/base/ifcvf.c (+13/-4) drivers/vdpa/ifc/base/ifcvf_osdep.h (+1/-0) drivers/vdpa/ifc/ifcvf_vdpa.c (+2/-0) drivers/vdpa/mlx5/mlx5_vdpa.c (+3/-3) drivers/vdpa/mlx5/mlx5_vdpa_event.c (+20/-10) drivers/vdpa/mlx5/mlx5_vdpa_virtq.c (+23/-18) drivers/vdpa/sfc/sfc_vdpa_ops.c (+32/-18) drivers/vdpa/sfc/sfc_vdpa_ops.h (+1/-0) examples/bond/main.c (+7/-7) examples/distributor/main.c (+2/-2) examples/dma/dmafwd.c (+44/-26) examples/fips_validation/fips_validation.c (+1/-1) examples/ipsec-secgw/flow.c (+1/-1) examples/ipsec-secgw/ipsec-secgw.c (+1/-1) examples/ipsec-secgw/ipsec.c (+1/-1) examples/ipsec-secgw/sa.c (+9/-2) examples/l2fwd-crypto/main.c (+7/-9) examples/l3fwd/l3fwd_altivec.h (+44/-43) examples/l3fwd/l3fwd_lpm_altivec.h (+7/-7) examples/link_status_interrupt/main.c (+5/-2) examples/performance-thread/pthread_shim/pthread_shim.c (+9/-0) examples/vhost/main.c (+37/-46) kernel/linux/kni/compat.h (+8/-0) kernel/linux/kni/kni_misc.c (+9/-4) kernel/linux/kni/kni_net.c (+8/-0) lib/acl/acl_bld.c (+10/-4) lib/acl/acl_run_altivec.h (+18/-18) lib/eal/common/eal_common_dev.c (+3/-1) lib/eal/common/eal_common_trace_utils.c (+4/-2) lib/eal/common/malloc_elem.h (+5/-7) lib/eal/common/malloc_heap.c (+36/-1) lib/eal/common/malloc_mp.c (+1/-1) lib/eal/common/rte_service.c (+8/-1) lib/eal/freebsd/eal.c (+2/-2) lib/eal/freebsd/eal_memory.c (+2/-2) lib/eal/freebsd/include/rte_os.h (+16/-1) lib/eal/freebsd/meson.build (+11/-0) lib/eal/include/rte_common.h (+18/-0) lib/eal/include/rte_dev.h (+4/-4) lib/eal/linux/eal.c (+2/-2) lib/eal/linux/eal_memory.c (+2/-2) lib/eal/ppc/include/rte_cycles.h (+7/-0) lib/eal/ppc/include/rte_vect.h (+1/-1) lib/eal/ppc/rte_cycles.c (+39/-0) lib/eal/windows/eal_thread.c (+6/-1) lib/eal/windows/include/rte_windows.h (+8/-0) lib/eal/x86/include/rte_memcpy.h (+53/-82) lib/ethdev/ethdev_profile.h (+1/-0) lib/ethdev/rte_ethdev.c (+27/-2) lib/ethdev/rte_ethdev.h (+1/-1) lib/eventdev/rte_event_eth_rx_adapter.c (+1/-1) lib/eventdev/rte_event_eth_tx_adapter.c (+6/-2) lib/gro/rte_gro.c (+2/-0) lib/ipsec/esp_outb.c (+1/-1) lib/ipsec/sa.c (+2/-2) lib/lpm/rte_lpm_altivec.h (+3/-3) lib/mbuf/rte_mbuf.c (+3/-0) lib/net/rte_gtp.h (+9/-8) lib/pcapng/rte_pcapng.c (+42/-5) lib/pipeline/rte_swx_pipeline_internal.h (+15/-9) lib/rib/rte_rib.c (+2/-0) lib/rib/rte_rib6.h (+3/-3) lib/sched/rte_pie.h (+1/-1) lib/security/rte_security.h (+2/-2) lib/vhost/socket.c (+4/-4) lib/vhost/vhost.c (+14/-15) lib/vhost/vhost_crypto.c (+45/-77) lib/vhost/vhost_user.c (+12/-7) lib/vhost/virtio_net.c (+49/-35) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
git-ubuntu bot | Approve | ||
Sergio Durigan Junior (community) | Approve | ||
Canonical Server Reporter | Pending | ||
Review via email: mp+429623@code.launchpad.net |
Commit message
Description of the change
Christian Ehrhardt (paelzer) wrote : | # |
Sergio Durigan Junior (sergiodj) wrote : | # |
Taking a look.
Sergio Durigan Junior (sergiodj) wrote : | # |
Thanks, Christian.
The changes LGTM. I noticed that you hadn't triggered the autopkgtests for the package in the PPA, so I did that:
Results: (from http://
dpdk @ arm64:
08.09.22 19:01:01 Log 🗒️ ✅ Triggers: dpdk/21.
dpdk @ armhf:
08.09.22 18:28:48 Log 🗒️ ❌ Triggers: dpdk/21.
test-linkage FAIL 🟥
dpdk @ ppc64el:
08.09.22 18:54:19 Log 🗒️ ✅ Triggers: dpdk/21.
dpdk @ s390x:
08.09.22 18:10:21 Log 🗒️ ✅ Triggers: dpdk/21.
The armhf failure is already happening with the dpdk package currently in the archive.
Package builds fine. piuparts is also OK; there's one error but it's unrelated to dpdk.
+1
git-ubuntu bot (git-ubuntu-bot) wrote : | # |
Approvers: paelzer, sergiodj
Uploaders: paelzer, sergiodj
MP auto-approved
Sergio Durigan Junior (sergiodj) wrote : | # |
One more thing: I believe it'd be good to close the MRE bug in the changelog entry, WDYT?
Christian Ehrhardt (paelzer) wrote : | # |
Yeah the arm case we fixed later IIRC.
And - Thanks for the hint, will close the tracking bug as well.
Christian Ehrhardt (paelzer) wrote : | # |
Jammy/Kinetic tests on DPDK capable HW are good
Christian Ehrhardt (paelzer) wrote : | # |
Uploaded to Kinetic, mdeslaur will take care of the security updates to older releases.
Preview Diff
1 | diff --git a/VERSION b/VERSION |
2 | index dbf3686..63f795c 100644 |
3 | --- a/VERSION |
4 | +++ b/VERSION |
5 | @@ -1 +1 @@ |
6 | -21.11.1 |
7 | +21.11.2 |
8 | diff --git a/app/proc-info/main.c b/app/proc-info/main.c |
9 | index 56070a3..e1ccdbb 100644 |
10 | --- a/app/proc-info/main.c |
11 | +++ b/app/proc-info/main.c |
12 | @@ -1504,10 +1504,10 @@ main(int argc, char **argv) |
13 | if (nb_ports == 0) |
14 | rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n"); |
15 | |
16 | - /* If no port mask was specified, then show non-owned ports */ |
17 | + /* If no port mask was specified, then show all non-owned ports */ |
18 | if (enabled_port_mask == 0) { |
19 | RTE_ETH_FOREACH_DEV(i) |
20 | - enabled_port_mask = 1ul << i; |
21 | + enabled_port_mask |= 1ul << i; |
22 | } |
23 | |
24 | for (i = 0; i < RTE_MAX_ETHPORTS; i++) { |
25 | diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c |
26 | index 56d4373..f375097 100644 |
27 | --- a/app/test-flow-perf/main.c |
28 | +++ b/app/test-flow-perf/main.c |
29 | @@ -16,6 +16,7 @@ |
30 | * gives packet per second measurement. |
31 | */ |
32 | |
33 | +#include <locale.h> |
34 | #include <stdio.h> |
35 | #include <stdlib.h> |
36 | #include <string.h> |
37 | @@ -1713,36 +1714,6 @@ do_tx(struct lcore_info *li, uint16_t cnt, uint16_t tx_port, |
38 | rte_pktmbuf_free(li->pkts[i]); |
39 | } |
40 | |
41 | -/* |
42 | - * Method to convert numbers into pretty numbers that easy |
43 | - * to read. The design here is to add comma after each three |
44 | - * digits and set all of this inside buffer. |
45 | - * |
46 | - * For example if n = 1799321, the output will be |
47 | - * 1,799,321 after this method which is easier to read. |
48 | - */ |
49 | -static char * |
50 | -pretty_number(uint64_t n, char *buf) |
51 | -{ |
52 | - char p[6][4]; |
53 | - int i = 0; |
54 | - int off = 0; |
55 | - |
56 | - while (n > 1000) { |
57 | - sprintf(p[i], "%03d", (int)(n % 1000)); |
58 | - n /= 1000; |
59 | - i += 1; |
60 | - } |
61 | - |
62 | - sprintf(p[i++], "%d", (int)n); |
63 | - |
64 | - while (i--) |
65 | - off += sprintf(buf + off, "%s,", p[i]); |
66 | - buf[strlen(buf) - 1] = '\0'; |
67 | - |
68 | - return buf; |
69 | -} |
70 | - |
71 | static void |
72 | packet_per_second_stats(void) |
73 | { |
74 | @@ -1764,7 +1735,6 @@ packet_per_second_stats(void) |
75 | uint64_t total_rx_pkts = 0; |
76 | uint64_t total_tx_drops = 0; |
77 | uint64_t tx_delta, rx_delta, drops_delta; |
78 | - char buf[3][32]; |
79 | int nr_valid_core = 0; |
80 | |
81 | sleep(1); |
82 | @@ -1789,10 +1759,8 @@ packet_per_second_stats(void) |
83 | tx_delta = li->tx_pkts - oli->tx_pkts; |
84 | rx_delta = li->rx_pkts - oli->rx_pkts; |
85 | drops_delta = li->tx_drops - oli->tx_drops; |
86 | - printf("%6d %16s %16s %16s\n", i, |
87 | - pretty_number(tx_delta, buf[0]), |
88 | - pretty_number(drops_delta, buf[1]), |
89 | - pretty_number(rx_delta, buf[2])); |
90 | + printf("%6d %'16"PRId64" %'16"PRId64" %'16"PRId64"\n", |
91 | + i, tx_delta, drops_delta, rx_delta); |
92 | |
93 | total_tx_pkts += tx_delta; |
94 | total_rx_pkts += rx_delta; |
95 | @@ -1803,10 +1771,9 @@ packet_per_second_stats(void) |
96 | } |
97 | |
98 | if (nr_valid_core > 1) { |
99 | - printf("%6s %16s %16s %16s\n", "total", |
100 | - pretty_number(total_tx_pkts, buf[0]), |
101 | - pretty_number(total_tx_drops, buf[1]), |
102 | - pretty_number(total_rx_pkts, buf[2])); |
103 | + printf("%6s %'16"PRId64" %'16"PRId64" %'16"PRId64"\n", |
104 | + "total", total_tx_pkts, total_tx_drops, |
105 | + total_rx_pkts); |
106 | nr_lines += 1; |
107 | } |
108 | |
109 | @@ -2139,6 +2106,9 @@ main(int argc, char **argv) |
110 | if (argc > 1) |
111 | args_parse(argc, argv); |
112 | |
113 | + /* For more fancy, localised integer formatting. */ |
114 | + setlocale(LC_NUMERIC, ""); |
115 | + |
116 | init_port(); |
117 | |
118 | nb_lcores = rte_lcore_count(); |
119 | diff --git a/app/test-pmd/5tswap.c b/app/test-pmd/5tswap.c |
120 | index 629d3e0..f041a5e 100644 |
121 | --- a/app/test-pmd/5tswap.c |
122 | +++ b/app/test-pmd/5tswap.c |
123 | @@ -185,9 +185,22 @@ pkt_burst_5tuple_swap(struct fwd_stream *fs) |
124 | get_end_cycles(fs, start_tsc); |
125 | } |
126 | |
127 | +static void |
128 | +stream_init_5tuple_swap(struct fwd_stream *fs) |
129 | +{ |
130 | + bool rx_stopped, tx_stopped; |
131 | + |
132 | + rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state == |
133 | + RTE_ETH_QUEUE_STATE_STOPPED; |
134 | + tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state == |
135 | + RTE_ETH_QUEUE_STATE_STOPPED; |
136 | + fs->disabled = rx_stopped || tx_stopped; |
137 | +} |
138 | + |
139 | struct fwd_engine five_tuple_swap_fwd_engine = { |
140 | .fwd_mode_name = "5tswap", |
141 | .port_fwd_begin = NULL, |
142 | .port_fwd_end = NULL, |
143 | + .stream_init = stream_init_5tuple_swap, |
144 | .packet_fwd = pkt_burst_5tuple_swap, |
145 | }; |
146 | diff --git a/app/test-pmd/cmd_flex_item.c b/app/test-pmd/cmd_flex_item.c |
147 | index 1e8dc38..3e54724 100644 |
148 | --- a/app/test-pmd/cmd_flex_item.c |
149 | +++ b/app/test-pmd/cmd_flex_item.c |
150 | @@ -20,6 +20,8 @@ |
151 | struct flex_item *flex_items[RTE_MAX_ETHPORTS][FLEX_MAX_PARSERS_NUM]; |
152 | struct flex_pattern flex_patterns[FLEX_MAX_PATTERNS_NUM]; |
153 | |
154 | +#ifdef RTE_HAS_JANSSON |
155 | + |
156 | static struct flex_item * |
157 | flex_parser_fetch(uint16_t port_id, uint16_t flex_id) |
158 | { |
159 | @@ -34,7 +36,6 @@ flex_parser_fetch(uint16_t port_id, uint16_t flex_id) |
160 | return flex_items[port_id][flex_id]; |
161 | } |
162 | |
163 | -#ifdef RTE_HAS_JANSSON |
164 | static __rte_always_inline bool |
165 | match_strkey(const char *key, const char *pattern) |
166 | { |
167 | @@ -369,23 +370,12 @@ out: |
168 | free(fp); |
169 | } |
170 | |
171 | -#else /* RTE_HAS_JANSSON */ |
172 | -void flex_item_create(__rte_unused portid_t port_id, |
173 | - __rte_unused uint16_t flex_id, |
174 | - __rte_unused const char *filename) |
175 | -{ |
176 | - printf("cannot create flex item - no JSON library configured\n"); |
177 | -} |
178 | -#endif /* RTE_HAS_JANSSON */ |
179 | - |
180 | void |
181 | flex_item_destroy(portid_t port_id, uint16_t flex_id) |
182 | { |
183 | int ret; |
184 | struct rte_flow_error error; |
185 | struct flex_item *fp = flex_parser_fetch(port_id, flex_id); |
186 | - if (!flex_id) |
187 | - return; |
188 | if (fp == FLEX_PARSER_ERR) { |
189 | printf("Bad parameters: port_id=%u flex_id=%u\n", |
190 | port_id, flex_id); |
191 | @@ -406,6 +396,22 @@ flex_item_destroy(portid_t port_id, uint16_t flex_id) |
192 | } |
193 | } |
194 | |
195 | +#else /* RTE_HAS_JANSSON */ |
196 | +void flex_item_create(__rte_unused portid_t port_id, |
197 | + __rte_unused uint16_t flex_id, |
198 | + __rte_unused const char *filename) |
199 | +{ |
200 | + printf("cannot create flex item - no JSON library configured\n"); |
201 | +} |
202 | + |
203 | +void |
204 | +flex_item_destroy(__rte_unused portid_t port_id, __rte_unused uint16_t flex_id) |
205 | +{ |
206 | + |
207 | +} |
208 | + |
209 | +#endif /* RTE_HAS_JANSSON */ |
210 | + |
211 | void |
212 | port_flex_item_flush(portid_t port_id) |
213 | { |
214 | diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c |
215 | index 6f99590..d9bf0eb 100644 |
216 | --- a/app/test-pmd/cmdline.c |
217 | +++ b/app/test-pmd/cmdline.c |
218 | @@ -2045,10 +2045,6 @@ cmd_config_mtu_parsed(void *parsed_result, |
219 | { |
220 | struct cmd_config_mtu_result *res = parsed_result; |
221 | |
222 | - if (res->value < RTE_ETHER_MIN_LEN) { |
223 | - fprintf(stderr, "mtu cannot be less than %d\n", RTE_ETHER_MIN_LEN); |
224 | - return; |
225 | - } |
226 | port_mtu_set(res->port_id, res->value); |
227 | } |
228 | |
229 | @@ -2651,8 +2647,10 @@ cmd_config_rxtx_queue_parsed(void *parsed_result, |
230 | __rte_unused void *data) |
231 | { |
232 | struct cmd_config_rxtx_queue *res = parsed_result; |
233 | + struct rte_port *port; |
234 | uint8_t isrx; |
235 | uint8_t isstart; |
236 | + uint8_t *state; |
237 | int ret = 0; |
238 | |
239 | if (test_done == 0) { |
240 | @@ -2700,8 +2698,15 @@ cmd_config_rxtx_queue_parsed(void *parsed_result, |
241 | else |
242 | ret = rte_eth_dev_tx_queue_stop(res->portid, res->qid); |
243 | |
244 | - if (ret == -ENOTSUP) |
245 | + if (ret == -ENOTSUP) { |
246 | fprintf(stderr, "Function not supported in PMD\n"); |
247 | + return; |
248 | + } |
249 | + |
250 | + port = &ports[res->portid]; |
251 | + state = isrx ? &port->rxq[res->qid].state : &port->txq[res->qid].state; |
252 | + *state = isstart ? RTE_ETH_QUEUE_STATE_STARTED : |
253 | + RTE_ETH_QUEUE_STATE_STOPPED; |
254 | } |
255 | |
256 | cmdline_parse_token_string_t cmd_config_rxtx_queue_port = |
257 | @@ -2770,11 +2775,11 @@ cmd_config_deferred_start_rxtx_queue_parsed(void *parsed_result, |
258 | |
259 | ison = !strcmp(res->state, "on"); |
260 | |
261 | - if (isrx && port->rx_conf[res->qid].rx_deferred_start != ison) { |
262 | - port->rx_conf[res->qid].rx_deferred_start = ison; |
263 | + if (isrx && port->rxq[res->qid].conf.rx_deferred_start != ison) { |
264 | + port->rxq[res->qid].conf.rx_deferred_start = ison; |
265 | needreconfig = 1; |
266 | - } else if (!isrx && port->tx_conf[res->qid].tx_deferred_start != ison) { |
267 | - port->tx_conf[res->qid].tx_deferred_start = ison; |
268 | + } else if (!isrx && port->txq[res->qid].conf.tx_deferred_start != ison) { |
269 | + port->txq[res->qid].conf.tx_deferred_start = ison; |
270 | needreconfig = 1; |
271 | } |
272 | |
273 | @@ -2892,7 +2897,7 @@ cmd_setup_rxtx_queue_parsed( |
274 | res->qid, |
275 | port->nb_rx_desc[res->qid], |
276 | socket_id, |
277 | - &port->rx_conf[res->qid], |
278 | + &port->rxq[res->qid].conf, |
279 | mp); |
280 | if (ret) |
281 | fprintf(stderr, "Failed to setup RX queue\n"); |
282 | @@ -2910,7 +2915,7 @@ cmd_setup_rxtx_queue_parsed( |
283 | res->qid, |
284 | port->nb_tx_desc[res->qid], |
285 | socket_id, |
286 | - &port->tx_conf[res->qid]); |
287 | + &port->txq[res->qid].conf); |
288 | if (ret) |
289 | fprintf(stderr, "Failed to setup TX queue\n"); |
290 | } |
291 | @@ -4686,7 +4691,7 @@ cmd_config_queue_tx_offloads(struct rte_port *port) |
292 | |
293 | /* Apply queue tx offloads configuration */ |
294 | for (k = 0; k < port->dev_info.max_tx_queues; k++) |
295 | - port->tx_conf[k].offloads = |
296 | + port->txq[k].conf.offloads = |
297 | port->dev_conf.txmode.offloads; |
298 | } |
299 | |
300 | @@ -6664,6 +6669,7 @@ static void cmd_create_bonded_device_parsed(void *parsed_result, |
301 | "Failed to enable promiscuous mode for port %u: %s - ignore\n", |
302 | port_id, rte_strerror(-ret)); |
303 | |
304 | + ports[port_id].bond_flag = 1; |
305 | ports[port_id].need_setup = 0; |
306 | ports[port_id].port_status = RTE_PORT_STOPPED; |
307 | } |
308 | @@ -8767,6 +8773,7 @@ static void cmd_quit_parsed(__rte_unused void *parsed_result, |
309 | __rte_unused void *data) |
310 | { |
311 | cmdline_quit(cl); |
312 | + cl_quit = 1; |
313 | } |
314 | |
315 | cmdline_parse_token_string_t cmd_quit_quit = |
316 | @@ -16082,7 +16089,7 @@ cmd_rx_offload_get_configuration_parsed( |
317 | |
318 | nb_rx_queues = dev_info.nb_rx_queues; |
319 | for (q = 0; q < nb_rx_queues; q++) { |
320 | - queue_offloads = port->rx_conf[q].offloads; |
321 | + queue_offloads = port->rxq[q].conf.offloads; |
322 | printf(" Queue[%2d] :", q); |
323 | print_rx_offloads(queue_offloads); |
324 | printf("\n"); |
325 | @@ -16202,11 +16209,11 @@ cmd_config_per_port_rx_offload_parsed(void *parsed_result, |
326 | if (!strcmp(res->on_off, "on")) { |
327 | port->dev_conf.rxmode.offloads |= single_offload; |
328 | for (q = 0; q < nb_rx_queues; q++) |
329 | - port->rx_conf[q].offloads |= single_offload; |
330 | + port->rxq[q].conf.offloads |= single_offload; |
331 | } else { |
332 | port->dev_conf.rxmode.offloads &= ~single_offload; |
333 | for (q = 0; q < nb_rx_queues; q++) |
334 | - port->rx_conf[q].offloads &= ~single_offload; |
335 | + port->rxq[q].conf.offloads &= ~single_offload; |
336 | } |
337 | |
338 | cmd_reconfig_device_queue(port_id, 1, 1); |
339 | @@ -16312,9 +16319,9 @@ cmd_config_per_queue_rx_offload_parsed(void *parsed_result, |
340 | } |
341 | |
342 | if (!strcmp(res->on_off, "on")) |
343 | - port->rx_conf[queue_id].offloads |= single_offload; |
344 | + port->rxq[queue_id].conf.offloads |= single_offload; |
345 | else |
346 | - port->rx_conf[queue_id].offloads &= ~single_offload; |
347 | + port->rxq[queue_id].conf.offloads &= ~single_offload; |
348 | |
349 | cmd_reconfig_device_queue(port_id, 1, 1); |
350 | } |
351 | @@ -16501,7 +16508,7 @@ cmd_tx_offload_get_configuration_parsed( |
352 | |
353 | nb_tx_queues = dev_info.nb_tx_queues; |
354 | for (q = 0; q < nb_tx_queues; q++) { |
355 | - queue_offloads = port->tx_conf[q].offloads; |
356 | + queue_offloads = port->txq[q].conf.offloads; |
357 | printf(" Queue[%2d] :", q); |
358 | print_tx_offloads(queue_offloads); |
359 | printf("\n"); |
360 | @@ -16625,11 +16632,11 @@ cmd_config_per_port_tx_offload_parsed(void *parsed_result, |
361 | if (!strcmp(res->on_off, "on")) { |
362 | port->dev_conf.txmode.offloads |= single_offload; |
363 | for (q = 0; q < nb_tx_queues; q++) |
364 | - port->tx_conf[q].offloads |= single_offload; |
365 | + port->txq[q].conf.offloads |= single_offload; |
366 | } else { |
367 | port->dev_conf.txmode.offloads &= ~single_offload; |
368 | for (q = 0; q < nb_tx_queues; q++) |
369 | - port->tx_conf[q].offloads &= ~single_offload; |
370 | + port->txq[q].conf.offloads &= ~single_offload; |
371 | } |
372 | |
373 | cmd_reconfig_device_queue(port_id, 1, 1); |
374 | @@ -16738,9 +16745,9 @@ cmd_config_per_queue_tx_offload_parsed(void *parsed_result, |
375 | } |
376 | |
377 | if (!strcmp(res->on_off, "on")) |
378 | - port->tx_conf[queue_id].offloads |= single_offload; |
379 | + port->txq[queue_id].conf.offloads |= single_offload; |
380 | else |
381 | - port->tx_conf[queue_id].offloads &= ~single_offload; |
382 | + port->txq[queue_id].conf.offloads &= ~single_offload; |
383 | |
384 | cmd_reconfig_device_queue(port_id, 1, 1); |
385 | } |
386 | @@ -17843,6 +17850,7 @@ cmdline_parse_ctx_t main_ctx[] = { |
387 | (cmdline_parse_inst_t *)&cmd_show_port_meter_cap, |
388 | (cmdline_parse_inst_t *)&cmd_add_port_meter_profile_srtcm, |
389 | (cmdline_parse_inst_t *)&cmd_add_port_meter_profile_trtcm, |
390 | + (cmdline_parse_inst_t *)&cmd_add_port_meter_profile_trtcm_rfc4115, |
391 | (cmdline_parse_inst_t *)&cmd_del_port_meter_profile, |
392 | (cmdline_parse_inst_t *)&cmd_create_port_meter, |
393 | (cmdline_parse_inst_t *)&cmd_enable_port_meter, |
394 | diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c |
395 | index a8140ed..5c4544a 100644 |
396 | --- a/app/test-pmd/cmdline_flow.c |
397 | +++ b/app/test-pmd/cmdline_flow.c |
398 | @@ -7705,11 +7705,7 @@ parse_hex_string(const char *src, uint8_t *dst, uint32_t *size) |
399 | const uint8_t *head = dst; |
400 | uint32_t left; |
401 | |
402 | - /* Check input parameters */ |
403 | - if ((src == NULL) || |
404 | - (dst == NULL) || |
405 | - (size == NULL) || |
406 | - (*size == 0)) |
407 | + if (*size == 0) |
408 | return -1; |
409 | |
410 | left = *size; |
411 | @@ -9213,19 +9209,15 @@ cmd_set_raw_parsed(const struct buffer *in) |
412 | } else { |
413 | const struct rte_flow_item_gtp_psc |
414 | *opt = item->spec; |
415 | - struct { |
416 | - uint8_t len; |
417 | - uint8_t pdu_type:4; |
418 | - uint8_t qfi:6; |
419 | - uint8_t next; |
420 | - } psc; |
421 | - psc.len = sizeof(psc) / 4; |
422 | - psc.pdu_type = opt->hdr.type; |
423 | - psc.qfi = opt->hdr.qfi; |
424 | - psc.next = 0; |
425 | - *total_size += sizeof(psc); |
426 | - rte_memcpy(data_tail - (*total_size), |
427 | - &psc, sizeof(psc)); |
428 | + struct rte_gtp_psc_generic_hdr *hdr; |
429 | + size_t hdr_size = RTE_ALIGN(sizeof(*hdr), |
430 | + sizeof(int32_t)); |
431 | + |
432 | + *total_size += hdr_size; |
433 | + hdr = (typeof(hdr))(data_tail - (*total_size)); |
434 | + memset(hdr, 0, hdr_size); |
435 | + *hdr = opt->hdr; |
436 | + hdr->ext_hdr_len = 1; |
437 | gtp_psc = i; |
438 | size = 0; |
439 | } |
440 | diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c |
441 | index ad7ef6a..a0f885f 100644 |
442 | --- a/app/test-pmd/cmdline_mtr.c |
443 | +++ b/app/test-pmd/cmdline_mtr.c |
444 | @@ -817,8 +817,8 @@ static void cmd_create_port_meter_parsed(void *parsed_result, |
445 | cmdline_parse_inst_t cmd_create_port_meter = { |
446 | .f = cmd_create_port_meter_parsed, |
447 | .data = NULL, |
448 | - .help_str = "create port meter <port_id> <mtr_id> <profile_id> <meter_enable>(yes|no) " |
449 | - "<stats_mask> <shared> <use_pre_meter_color> " |
450 | + .help_str = "create port meter <port_id> <mtr_id> <profile_id> <policy_id> " |
451 | + "<meter_enable>(yes|no) <stats_mask> <shared> <use_pre_meter_color> " |
452 | "[<dscp_tbl_entry0> <dscp_tbl_entry1> ...<dscp_tbl_entry63>]", |
453 | .tokens = { |
454 | (void *)&cmd_create_port_meter_create, |
455 | diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c |
456 | index e812f57..ad1b5f5 100644 |
457 | --- a/app/test-pmd/config.c |
458 | +++ b/app/test-pmd/config.c |
459 | @@ -66,8 +66,6 @@ |
460 | |
461 | #define NS_PER_SEC 1E9 |
462 | |
463 | -static char *flowtype_to_str(uint16_t flow_type); |
464 | - |
465 | static const struct { |
466 | enum tx_pkt_split split; |
467 | const char *name; |
468 | @@ -248,14 +246,20 @@ nic_stats_display(portid_t port_id) |
469 | diff_ns; |
470 | uint64_t mpps_rx, mpps_tx, mbps_rx, mbps_tx; |
471 | struct rte_eth_stats stats; |
472 | - |
473 | static const char *nic_stats_border = "########################"; |
474 | + int ret; |
475 | |
476 | if (port_id_is_invalid(port_id, ENABLED_WARN)) { |
477 | print_valid_ports(); |
478 | return; |
479 | } |
480 | - rte_eth_stats_get(port_id, &stats); |
481 | + ret = rte_eth_stats_get(port_id, &stats); |
482 | + if (ret != 0) { |
483 | + fprintf(stderr, |
484 | + "%s: Error: failed to get stats (port %u): %d", |
485 | + __func__, port_id, ret); |
486 | + return; |
487 | + } |
488 | printf("\n %s NIC statistics for port %-2d %s\n", |
489 | nic_stats_border, port_id, nic_stats_border); |
490 | |
491 | @@ -668,6 +672,19 @@ print_dev_capabilities(uint64_t capabilities) |
492 | } |
493 | } |
494 | |
495 | +const char * |
496 | +rsstypes_to_str(uint64_t rss_type) |
497 | +{ |
498 | + uint16_t i; |
499 | + |
500 | + for (i = 0; rss_type_table[i].str != NULL; i++) { |
501 | + if (rss_type_table[i].rss_type == rss_type) |
502 | + return rss_type_table[i].str; |
503 | + } |
504 | + |
505 | + return NULL; |
506 | +} |
507 | + |
508 | void |
509 | port_infos_display(portid_t port_id) |
510 | { |
511 | @@ -772,19 +789,20 @@ port_infos_display(portid_t port_id) |
512 | if (!dev_info.flow_type_rss_offloads) |
513 | printf("No RSS offload flow type is supported.\n"); |
514 | else { |
515 | + uint64_t rss_offload_types = dev_info.flow_type_rss_offloads; |
516 | uint16_t i; |
517 | - char *p; |
518 | |
519 | printf("Supported RSS offload flow types:\n"); |
520 | - for (i = RTE_ETH_FLOW_UNKNOWN + 1; |
521 | - i < sizeof(dev_info.flow_type_rss_offloads) * CHAR_BIT; i++) { |
522 | - if (!(dev_info.flow_type_rss_offloads & (1ULL << i))) |
523 | - continue; |
524 | - p = flowtype_to_str(i); |
525 | - if (p) |
526 | - printf(" %s\n", p); |
527 | - else |
528 | - printf(" user defined %d\n", i); |
529 | + for (i = 0; i < sizeof(rss_offload_types) * CHAR_BIT; i++) { |
530 | + uint64_t rss_offload = RTE_BIT64(i); |
531 | + if ((rss_offload_types & rss_offload) != 0) { |
532 | + const char *p = rsstypes_to_str(rss_offload); |
533 | + if (p) |
534 | + printf(" %s\n", p); |
535 | + else |
536 | + printf(" user defined %u\n", |
537 | + i); |
538 | + } |
539 | } |
540 | } |
541 | |
542 | @@ -1247,6 +1265,57 @@ port_reg_set(portid_t port_id, uint32_t reg_off, uint32_t reg_v) |
543 | display_port_reg_value(port_id, reg_off, reg_v); |
544 | } |
545 | |
546 | +static uint32_t |
547 | +eth_dev_get_overhead_len(uint32_t max_rx_pktlen, uint16_t max_mtu) |
548 | +{ |
549 | + uint32_t overhead_len; |
550 | + |
551 | + if (max_mtu != UINT16_MAX && max_rx_pktlen > max_mtu) |
552 | + overhead_len = max_rx_pktlen - max_mtu; |
553 | + else |
554 | + overhead_len = RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN; |
555 | + |
556 | + return overhead_len; |
557 | +} |
558 | + |
559 | +static int |
560 | +eth_dev_validate_mtu(uint16_t port_id, uint16_t mtu) |
561 | +{ |
562 | + struct rte_eth_dev_info dev_info; |
563 | + uint32_t overhead_len; |
564 | + uint32_t frame_size; |
565 | + int ret; |
566 | + |
567 | + ret = rte_eth_dev_info_get(port_id, &dev_info); |
568 | + if (ret != 0) |
569 | + return ret; |
570 | + |
571 | + if (mtu < dev_info.min_mtu) { |
572 | + fprintf(stderr, |
573 | + "MTU (%u) < device min MTU (%u) for port_id %u\n", |
574 | + mtu, dev_info.min_mtu, port_id); |
575 | + return -EINVAL; |
576 | + } |
577 | + if (mtu > dev_info.max_mtu) { |
578 | + fprintf(stderr, |
579 | + "MTU (%u) > device max MTU (%u) for port_id %u\n", |
580 | + mtu, dev_info.max_mtu, port_id); |
581 | + return -EINVAL; |
582 | + } |
583 | + |
584 | + overhead_len = eth_dev_get_overhead_len(dev_info.max_rx_pktlen, |
585 | + dev_info.max_mtu); |
586 | + frame_size = mtu + overhead_len; |
587 | + if (frame_size > dev_info.max_rx_pktlen) { |
588 | + fprintf(stderr, |
589 | + "Frame size (%u) > device max frame size (%u) for port_id %u\n", |
590 | + frame_size, dev_info.max_rx_pktlen, port_id); |
591 | + return -EINVAL; |
592 | + } |
593 | + |
594 | + return 0; |
595 | +} |
596 | + |
597 | void |
598 | port_mtu_set(portid_t port_id, uint16_t mtu) |
599 | { |
600 | @@ -1256,6 +1325,10 @@ port_mtu_set(portid_t port_id, uint16_t mtu) |
601 | if (port_id_is_invalid(port_id, ENABLED_WARN)) |
602 | return; |
603 | |
604 | + diag = eth_dev_validate_mtu(port_id, mtu); |
605 | + if (diag != 0) |
606 | + return; |
607 | + |
608 | if (port->need_reconfig == 0) { |
609 | diag = rte_eth_dev_set_mtu(port_id, mtu); |
610 | if (diag != 0) { |
611 | @@ -1696,6 +1769,37 @@ port_action_handle_destroy(portid_t port_id, |
612 | return ret; |
613 | } |
614 | |
615 | +int |
616 | +port_action_handle_flush(portid_t port_id) |
617 | +{ |
618 | + struct rte_port *port; |
619 | + struct port_indirect_action **tmp; |
620 | + int ret = 0; |
621 | + |
622 | + if (port_id_is_invalid(port_id, ENABLED_WARN) || |
623 | + port_id == (portid_t)RTE_PORT_ALL) |
624 | + return -EINVAL; |
625 | + port = &ports[port_id]; |
626 | + tmp = &port->actions_list; |
627 | + while (*tmp != NULL) { |
628 | + struct rte_flow_error error; |
629 | + struct port_indirect_action *pia = *tmp; |
630 | + |
631 | + /* Poisoning to make sure PMDs update it in case of error. */ |
632 | + memset(&error, 0x44, sizeof(error)); |
633 | + if (pia->handle != NULL && |
634 | + rte_flow_action_handle_destroy |
635 | + (port_id, pia->handle, &error) != 0) { |
636 | + printf("Indirect action #%u not destroyed\n", pia->id); |
637 | + ret = port_flow_complain(&error); |
638 | + tmp = &pia->next; |
639 | + } else { |
640 | + *tmp = pia->next; |
641 | + free(pia); |
642 | + } |
643 | + } |
644 | + return ret; |
645 | +} |
646 | |
647 | /** Get indirect action by port + id */ |
648 | struct rte_flow_action_handle * |
649 | @@ -2772,8 +2876,8 @@ rxtx_config_display(void) |
650 | nb_fwd_lcores, nb_fwd_ports); |
651 | |
652 | RTE_ETH_FOREACH_DEV(pid) { |
653 | - struct rte_eth_rxconf *rx_conf = &ports[pid].rx_conf[0]; |
654 | - struct rte_eth_txconf *tx_conf = &ports[pid].tx_conf[0]; |
655 | + struct rte_eth_rxconf *rx_conf = &ports[pid].rxq[0].conf; |
656 | + struct rte_eth_txconf *tx_conf = &ports[pid].txq[0].conf; |
657 | uint16_t *nb_rx_desc = &ports[pid].nb_rx_desc[0]; |
658 | uint16_t *nb_tx_desc = &ports[pid].nb_tx_desc[0]; |
659 | struct rte_eth_rxq_info rx_qinfo; |
660 | @@ -3031,7 +3135,7 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc, |
661 | fs = fwd_streams[sm_id]; |
662 | port = &ports[fs->rx_port]; |
663 | dev_info = &port->dev_info; |
664 | - rxq_conf = &port->rx_conf[fs->rx_queue]; |
665 | + rxq_conf = &port->rxq[fs->rx_queue].conf; |
666 | if ((dev_info->dev_capa & RTE_ETH_DEV_CAPA_RXQ_SHARE) |
667 | == 0 || rxq_conf->share_group == 0) |
668 | /* Not shared rxq. */ |
669 | @@ -3091,7 +3195,7 @@ pkt_fwd_shared_rxq_check(void) |
670 | fs->lcore = fwd_lcores[lc_id]; |
671 | port = &ports[fs->rx_port]; |
672 | dev_info = &port->dev_info; |
673 | - rxq_conf = &port->rx_conf[fs->rx_queue]; |
674 | + rxq_conf = &port->rxq[fs->rx_queue].conf; |
675 | if ((dev_info->dev_capa & RTE_ETH_DEV_CAPA_RXQ_SHARE) |
676 | == 0 || rxq_conf->share_group == 0) |
677 | /* Not shared rxq. */ |
678 | @@ -4733,6 +4837,8 @@ set_record_burst_stats(uint8_t on_off) |
679 | record_burst_stats = on_off; |
680 | } |
681 | |
682 | +#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) |
683 | + |
684 | static char* |
685 | flowtype_to_str(uint16_t flow_type) |
686 | { |
687 | @@ -4776,8 +4882,6 @@ flowtype_to_str(uint16_t flow_type) |
688 | return NULL; |
689 | } |
690 | |
691 | -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) |
692 | - |
693 | static inline void |
694 | print_fdir_mask(struct rte_eth_fdir_masks *mask) |
695 | { |
696 | @@ -5199,6 +5303,25 @@ mcast_addr_pool_remove(struct rte_port *port, uint32_t addr_idx) |
697 | sizeof(struct rte_ether_addr) * (port->mc_addr_nb - addr_idx)); |
698 | } |
699 | |
700 | +int |
701 | +mcast_addr_pool_destroy(portid_t port_id) |
702 | +{ |
703 | + struct rte_port *port; |
704 | + |
705 | + if (port_id_is_invalid(port_id, ENABLED_WARN) || |
706 | + port_id == (portid_t)RTE_PORT_ALL) |
707 | + return -EINVAL; |
708 | + port = &ports[port_id]; |
709 | + |
710 | + if (port->mc_addr_nb != 0) { |
711 | + /* free the pool of multicast addresses. */ |
712 | + free(port->mc_addr_pool); |
713 | + port->mc_addr_pool = NULL; |
714 | + port->mc_addr_nb = 0; |
715 | + } |
716 | + return 0; |
717 | +} |
718 | + |
719 | static int |
720 | eth_port_multicast_addr_list_set(portid_t port_id) |
721 | { |
722 | diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c |
723 | index f0c69c5..d661e21 100644 |
724 | --- a/app/test-pmd/csumonly.c |
725 | +++ b/app/test-pmd/csumonly.c |
726 | @@ -768,6 +768,28 @@ pkt_copy_split(const struct rte_mbuf *pkt) |
727 | return md[0]; |
728 | } |
729 | |
730 | +#if defined(RTE_LIB_GRO) || defined(RTE_LIB_GSO) |
731 | +/* |
732 | + * Re-calculate IP checksum for merged/fragmented packets. |
733 | + */ |
734 | +static void |
735 | +pkts_ip_csum_recalc(struct rte_mbuf **pkts_burst, const uint16_t nb_pkts, uint64_t tx_offloads) |
736 | +{ |
737 | + int i; |
738 | + struct rte_ipv4_hdr *ipv4_hdr; |
739 | + for (i = 0; i < nb_pkts; i++) { |
740 | + if ((pkts_burst[i]->ol_flags & RTE_MBUF_F_TX_IPV4) && |
741 | + (tx_offloads & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM) == 0) { |
742 | + ipv4_hdr = rte_pktmbuf_mtod_offset(pkts_burst[i], |
743 | + struct rte_ipv4_hdr *, |
744 | + pkts_burst[i]->l2_len); |
745 | + ipv4_hdr->hdr_checksum = 0; |
746 | + ipv4_hdr->hdr_checksum = rte_ipv4_cksum(ipv4_hdr); |
747 | + } |
748 | + } |
749 | +} |
750 | +#endif |
751 | + |
752 | /* |
753 | * Receive a burst of packets, and for each packet: |
754 | * - parse packet, and try to recognize a supported packet type (1) |
755 | @@ -884,10 +906,6 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) |
756 | * and inner headers */ |
757 | |
758 | eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *); |
759 | - rte_ether_addr_copy(&peer_eth_addrs[fs->peer_addr], |
760 | - ð_hdr->dst_addr); |
761 | - rte_ether_addr_copy(&ports[fs->tx_port].eth_addr, |
762 | - ð_hdr->src_addr); |
763 | parse_ethernet(eth_hdr, &info); |
764 | l3_hdr = (char *)eth_hdr + info.l2_len; |
765 | |
766 | @@ -1091,6 +1109,8 @@ tunnel_update: |
767 | fs->gro_times = 0; |
768 | } |
769 | } |
770 | + |
771 | + pkts_ip_csum_recalc(pkts_burst, nb_rx, tx_offloads); |
772 | } |
773 | #endif |
774 | |
775 | @@ -1124,6 +1144,8 @@ tunnel_update: |
776 | |
777 | tx_pkts_burst = gso_segments; |
778 | nb_rx = nb_segments; |
779 | + |
780 | + pkts_ip_csum_recalc(tx_pkts_burst, nb_rx, tx_offloads); |
781 | } else |
782 | #endif |
783 | tx_pkts_burst = pkts_burst; |
784 | @@ -1166,9 +1188,22 @@ tunnel_update: |
785 | get_end_cycles(fs, start_tsc); |
786 | } |
787 | |
788 | +static void |
789 | +stream_init_checksum_forward(struct fwd_stream *fs) |
790 | +{ |
791 | + bool rx_stopped, tx_stopped; |
792 | + |
793 | + rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state == |
794 | + RTE_ETH_QUEUE_STATE_STOPPED; |
795 | + tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state == |
796 | + RTE_ETH_QUEUE_STATE_STOPPED; |
797 | + fs->disabled = rx_stopped || tx_stopped; |
798 | +} |
799 | + |
800 | struct fwd_engine csum_fwd_engine = { |
801 | .fwd_mode_name = "csum", |
802 | .port_fwd_begin = NULL, |
803 | .port_fwd_end = NULL, |
804 | + .stream_init = stream_init_checksum_forward, |
805 | .packet_fwd = pkt_burst_checksum_forward, |
806 | }; |
807 | diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c |
808 | index 9ceef3b..1e01120 100644 |
809 | --- a/app/test-pmd/flowgen.c |
810 | +++ b/app/test-pmd/flowgen.c |
811 | @@ -207,9 +207,22 @@ flowgen_begin(portid_t pi) |
812 | return 0; |
813 | } |
814 | |
815 | +static void |
816 | +flowgen_stream_init(struct fwd_stream *fs) |
817 | +{ |
818 | + bool rx_stopped, tx_stopped; |
819 | + |
820 | + rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state == |
821 | + RTE_ETH_QUEUE_STATE_STOPPED; |
822 | + tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state == |
823 | + RTE_ETH_QUEUE_STATE_STOPPED; |
824 | + fs->disabled = rx_stopped || tx_stopped; |
825 | +} |
826 | + |
827 | struct fwd_engine flow_gen_engine = { |
828 | .fwd_mode_name = "flowgen", |
829 | .port_fwd_begin = flowgen_begin, |
830 | .port_fwd_end = NULL, |
831 | + .stream_init = flowgen_stream_init, |
832 | .packet_fwd = pkt_burst_flow_gen, |
833 | }; |
834 | diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c |
835 | index 99c94cb..066f2a3 100644 |
836 | --- a/app/test-pmd/icmpecho.c |
837 | +++ b/app/test-pmd/icmpecho.c |
838 | @@ -512,9 +512,22 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs) |
839 | get_end_cycles(fs, start_tsc); |
840 | } |
841 | |
842 | +static void |
843 | +icmpecho_stream_init(struct fwd_stream *fs) |
844 | +{ |
845 | + bool rx_stopped, tx_stopped; |
846 | + |
847 | + rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state == |
848 | + RTE_ETH_QUEUE_STATE_STOPPED; |
849 | + tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state == |
850 | + RTE_ETH_QUEUE_STATE_STOPPED; |
851 | + fs->disabled = rx_stopped || tx_stopped; |
852 | +} |
853 | + |
854 | struct fwd_engine icmp_echo_engine = { |
855 | .fwd_mode_name = "icmpecho", |
856 | .port_fwd_begin = NULL, |
857 | .port_fwd_end = NULL, |
858 | + .stream_init = icmpecho_stream_init, |
859 | .packet_fwd = reply_to_icmp_echo_rqsts, |
860 | }; |
861 | diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c |
862 | index 9ff817a..fc4e2d0 100644 |
863 | --- a/app/test-pmd/ieee1588fwd.c |
864 | +++ b/app/test-pmd/ieee1588fwd.c |
865 | @@ -211,9 +211,22 @@ port_ieee1588_fwd_end(portid_t pi) |
866 | rte_eth_timesync_disable(pi); |
867 | } |
868 | |
869 | +static void |
870 | +port_ieee1588_stream_init(struct fwd_stream *fs) |
871 | +{ |
872 | + bool rx_stopped, tx_stopped; |
873 | + |
874 | + rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state == |
875 | + RTE_ETH_QUEUE_STATE_STOPPED; |
876 | + tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state == |
877 | + RTE_ETH_QUEUE_STATE_STOPPED; |
878 | + fs->disabled = rx_stopped || tx_stopped; |
879 | +} |
880 | + |
881 | struct fwd_engine ieee1588_fwd_engine = { |
882 | .fwd_mode_name = "ieee1588", |
883 | .port_fwd_begin = port_ieee1588_fwd_begin, |
884 | .port_fwd_end = port_ieee1588_fwd_end, |
885 | + .stream_init = port_ieee1588_stream_init, |
886 | .packet_fwd = ieee1588_packet_fwd, |
887 | }; |
888 | diff --git a/app/test-pmd/iofwd.c b/app/test-pmd/iofwd.c |
889 | index 19cd920..71849aa 100644 |
890 | --- a/app/test-pmd/iofwd.c |
891 | +++ b/app/test-pmd/iofwd.c |
892 | @@ -88,9 +88,22 @@ pkt_burst_io_forward(struct fwd_stream *fs) |
893 | get_end_cycles(fs, start_tsc); |
894 | } |
895 | |
896 | +static void |
897 | +stream_init_forward(struct fwd_stream *fs) |
898 | +{ |
899 | + bool rx_stopped, tx_stopped; |
900 | + |
901 | + rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state == |
902 | + RTE_ETH_QUEUE_STATE_STOPPED; |
903 | + tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state == |
904 | + RTE_ETH_QUEUE_STATE_STOPPED; |
905 | + fs->disabled = rx_stopped || tx_stopped; |
906 | +} |
907 | + |
908 | struct fwd_engine io_fwd_engine = { |
909 | .fwd_mode_name = "io", |
910 | .port_fwd_begin = NULL, |
911 | .port_fwd_end = NULL, |
912 | + .stream_init = stream_init_forward, |
913 | .packet_fwd = pkt_burst_io_forward, |
914 | }; |
915 | diff --git a/app/test-pmd/macfwd.c b/app/test-pmd/macfwd.c |
916 | index 812a0c7..79c9241 100644 |
917 | --- a/app/test-pmd/macfwd.c |
918 | +++ b/app/test-pmd/macfwd.c |
919 | @@ -119,9 +119,22 @@ pkt_burst_mac_forward(struct fwd_stream *fs) |
920 | get_end_cycles(fs, start_tsc); |
921 | } |
922 | |
923 | +static void |
924 | +stream_init_mac_forward(struct fwd_stream *fs) |
925 | +{ |
926 | + bool rx_stopped, tx_stopped; |
927 | + |
928 | + rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state == |
929 | + RTE_ETH_QUEUE_STATE_STOPPED; |
930 | + tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state == |
931 | + RTE_ETH_QUEUE_STATE_STOPPED; |
932 | + fs->disabled = rx_stopped || tx_stopped; |
933 | +} |
934 | + |
935 | struct fwd_engine mac_fwd_engine = { |
936 | .fwd_mode_name = "mac", |
937 | .port_fwd_begin = NULL, |
938 | .port_fwd_end = NULL, |
939 | + .stream_init = stream_init_mac_forward, |
940 | .packet_fwd = pkt_burst_mac_forward, |
941 | }; |
942 | diff --git a/app/test-pmd/macswap.c b/app/test-pmd/macswap.c |
943 | index 4627ff8..acb0fd7 100644 |
944 | --- a/app/test-pmd/macswap.c |
945 | +++ b/app/test-pmd/macswap.c |
946 | @@ -97,9 +97,22 @@ pkt_burst_mac_swap(struct fwd_stream *fs) |
947 | get_end_cycles(fs, start_tsc); |
948 | } |
949 | |
950 | +static void |
951 | +stream_init_mac_swap(struct fwd_stream *fs) |
952 | +{ |
953 | + bool rx_stopped, tx_stopped; |
954 | + |
955 | + rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state == |
956 | + RTE_ETH_QUEUE_STATE_STOPPED; |
957 | + tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state == |
958 | + RTE_ETH_QUEUE_STATE_STOPPED; |
959 | + fs->disabled = rx_stopped || tx_stopped; |
960 | +} |
961 | + |
962 | struct fwd_engine mac_swap_engine = { |
963 | .fwd_mode_name = "macswap", |
964 | .port_fwd_begin = NULL, |
965 | .port_fwd_end = NULL, |
966 | + .stream_init = stream_init_mac_swap, |
967 | .packet_fwd = pkt_burst_mac_swap, |
968 | }; |
969 | diff --git a/app/test-pmd/noisy_vnf.c b/app/test-pmd/noisy_vnf.c |
970 | index e4434be..a92e810 100644 |
971 | --- a/app/test-pmd/noisy_vnf.c |
972 | +++ b/app/test-pmd/noisy_vnf.c |
973 | @@ -277,9 +277,22 @@ noisy_fwd_begin(portid_t pi) |
974 | return 0; |
975 | } |
976 | |
977 | +static void |
978 | +stream_init_noisy_vnf(struct fwd_stream *fs) |
979 | +{ |
980 | + bool rx_stopped, tx_stopped; |
981 | + |
982 | + rx_stopped = ports[fs->rx_port].rxq[fs->rx_queue].state == |
983 | + RTE_ETH_QUEUE_STATE_STOPPED; |
984 | + tx_stopped = ports[fs->tx_port].txq[fs->tx_queue].state == |
985 | + RTE_ETH_QUEUE_STATE_STOPPED; |
986 | + fs->disabled = rx_stopped || tx_stopped; |
987 | +} |
988 | + |
989 | struct fwd_engine noisy_vnf_engine = { |
990 | .fwd_mode_name = "noisy", |
991 | .port_fwd_begin = noisy_fwd_begin, |
992 | .port_fwd_end = noisy_fwd_end, |
993 | + .stream_init = stream_init_noisy_vnf, |
994 | .packet_fwd = pkt_burst_noisy_vnf, |
995 | }; |
996 | diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c |
997 | index daf6a31..e3c9757 100644 |
998 | --- a/app/test-pmd/parameters.c |
999 | +++ b/app/test-pmd/parameters.c |
1000 | @@ -61,6 +61,9 @@ usage(char* progname) |
1001 | "extended statistics to show. Used with --stats-period " |
1002 | "specified or interactive commands that show Rx/Tx statistics " |
1003 | "(i.e. 'show port stats').\n"); |
1004 | + printf(" --num-procs=N: set the total number of multi-process instances.\n"); |
1005 | + printf(" --proc-id=id: set the id of the current process from " |
1006 | + "multi-process instances (0 <= id < num-procs).\n"); |
1007 | printf(" --nb-cores=N: set the number of forwarding cores " |
1008 | "(1 <= N <= %d).\n", nb_lcores); |
1009 | printf(" --nb-ports=N: set the number of forwarding ports " |
1010 | @@ -940,11 +943,12 @@ launch_args_parse(int argc, char** argv) |
1011 | } |
1012 | if (!strcmp(lgopts[opt_idx].name, "total-num-mbufs")) { |
1013 | n = atoi(optarg); |
1014 | - if (n > 1024) |
1015 | + if (n > MIN_TOTAL_NUM_MBUFS) |
1016 | param_total_num_mbufs = (unsigned)n; |
1017 | else |
1018 | rte_exit(EXIT_FAILURE, |
1019 | - "total-num-mbufs should be > 1024\n"); |
1020 | + "total-num-mbufs should be > %d\n", |
1021 | + MIN_TOTAL_NUM_MBUFS); |
1022 | } |
1023 | if (!strcmp(lgopts[opt_idx].name, "max-pkt-len")) { |
1024 | n = atoi(optarg); |
1025 | diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c |
1026 | index d1a579d..0445701 100644 |
1027 | --- a/app/test-pmd/rxonly.c |
1028 | +++ b/app/test-pmd/rxonly.c |
1029 | @@ -68,9 +68,17 @@ pkt_burst_receive(struct fwd_stream *fs) |
1030 | get_end_cycles(fs, start_tsc); |
1031 | } |
1032 | |
1033 | +static void |
1034 | +stream_init_receive(struct fwd_stream *fs) |
1035 | +{ |
1036 | + fs->disabled = ports[fs->rx_port].rxq[fs->rx_queue].state == |
1037 | + RTE_ETH_QUEUE_STATE_STOPPED; |
1038 | +} |
1039 | + |
1040 | struct fwd_engine rx_only_engine = { |
1041 | .fwd_mode_name = "rxonly", |
1042 | .port_fwd_begin = NULL, |
1043 | .port_fwd_end = NULL, |
1044 | + .stream_init = stream_init_receive, |
1045 | .packet_fwd = pkt_burst_receive, |
1046 | }; |
1047 | diff --git a/app/test-pmd/shared_rxq_fwd.c b/app/test-pmd/shared_rxq_fwd.c |
1048 | index da54a38..2e90478 100644 |
1049 | --- a/app/test-pmd/shared_rxq_fwd.c |
1050 | +++ b/app/test-pmd/shared_rxq_fwd.c |
1051 | @@ -107,9 +107,17 @@ shared_rxq_fwd(struct fwd_stream *fs) |
1052 | get_end_cycles(fs, start_tsc); |
1053 | } |
1054 | |
1055 | +static void |
1056 | +shared_rxq_stream_init(struct fwd_stream *fs) |
1057 | +{ |
1058 | + fs->disabled = ports[fs->rx_port].rxq[fs->rx_queue].state == |
1059 | + RTE_ETH_QUEUE_STATE_STOPPED; |
1060 | +} |
1061 | + |
1062 | struct fwd_engine shared_rxq_engine = { |
1063 | .fwd_mode_name = "shared_rxq", |
1064 | .port_fwd_begin = NULL, |
1065 | .port_fwd_end = NULL, |
1066 | + .stream_init = shared_rxq_stream_init, |
1067 | .packet_fwd = shared_rxq_fwd, |
1068 | }; |
1069 | diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c |
1070 | index 2387cc1..3699c5f 100644 |
1071 | --- a/app/test-pmd/testpmd.c |
1072 | +++ b/app/test-pmd/testpmd.c |
1073 | @@ -66,6 +66,9 @@ |
1074 | #ifdef RTE_EXEC_ENV_WINDOWS |
1075 | #include <process.h> |
1076 | #endif |
1077 | +#ifdef RTE_NET_BOND |
1078 | +#include <rte_eth_bond.h> |
1079 | +#endif |
1080 | |
1081 | #include "testpmd.h" |
1082 | |
1083 | @@ -226,6 +229,7 @@ unsigned int xstats_display_num; /**< Size of extended statistics to show */ |
1084 | * option. Set flag to exit stats period loop after received SIGINT/SIGTERM. |
1085 | */ |
1086 | uint8_t f_quit; |
1087 | +uint8_t cl_quit; /* Quit testpmd from cmdline. */ |
1088 | |
1089 | /* |
1090 | * Max Rx frame size, set by '--max-pkt-len' parameter. |
1091 | @@ -598,10 +602,57 @@ eth_dev_configure_mp(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, |
1092 | } |
1093 | |
1094 | static int |
1095 | +change_bonding_slave_port_status(portid_t bond_pid, bool is_stop) |
1096 | +{ |
1097 | +#ifdef RTE_NET_BOND |
1098 | + |
1099 | + portid_t slave_pids[RTE_MAX_ETHPORTS]; |
1100 | + struct rte_port *port; |
1101 | + int num_slaves; |
1102 | + portid_t slave_pid; |
1103 | + int i; |
1104 | + |
1105 | + num_slaves = rte_eth_bond_slaves_get(bond_pid, slave_pids, |
1106 | + RTE_MAX_ETHPORTS); |
1107 | + if (num_slaves < 0) { |
1108 | + fprintf(stderr, "Failed to get slave list for port = %u\n", |
1109 | + bond_pid); |
1110 | + return num_slaves; |
1111 | + } |
1112 | + |
1113 | + for (i = 0; i < num_slaves; i++) { |
1114 | + slave_pid = slave_pids[i]; |
1115 | + port = &ports[slave_pid]; |
1116 | + port->port_status = |
1117 | + is_stop ? RTE_PORT_STOPPED : RTE_PORT_STARTED; |
1118 | + } |
1119 | +#else |
1120 | + RTE_SET_USED(bond_pid); |
1121 | + RTE_SET_USED(is_stop); |
1122 | +#endif |
1123 | + return 0; |
1124 | +} |
1125 | + |
1126 | +static int |
1127 | eth_dev_start_mp(uint16_t port_id) |
1128 | { |
1129 | - if (is_proc_primary()) |
1130 | - return rte_eth_dev_start(port_id); |
1131 | + int ret; |
1132 | + |
1133 | + if (is_proc_primary()) { |
1134 | + ret = rte_eth_dev_start(port_id); |
1135 | + if (ret != 0) |
1136 | + return ret; |
1137 | + |
1138 | + struct rte_port *port = &ports[port_id]; |
1139 | + |
1140 | + /* |
1141 | + * Starting a bonded port also starts all slaves under the bonded |
1142 | + * device. So if this port is bond device, we need to modify the |
1143 | + * port status of these slaves. |
1144 | + */ |
1145 | + if (port->bond_flag == 1) |
1146 | + return change_bonding_slave_port_status(port_id, false); |
1147 | + } |
1148 | |
1149 | return 0; |
1150 | } |
1151 | @@ -609,8 +660,23 @@ eth_dev_start_mp(uint16_t port_id) |
1152 | static int |
1153 | eth_dev_stop_mp(uint16_t port_id) |
1154 | { |
1155 | - if (is_proc_primary()) |
1156 | - return rte_eth_dev_stop(port_id); |
1157 | + int ret; |
1158 | + |
1159 | + if (is_proc_primary()) { |
1160 | + ret = rte_eth_dev_stop(port_id); |
1161 | + if (ret != 0) |
1162 | + return ret; |
1163 | + |
1164 | + struct rte_port *port = &ports[port_id]; |
1165 | + |
1166 | + /* |
1167 | + * Stopping a bonded port also stops all slaves under the bonded |
1168 | + * device. So if this port is bond device, we need to modify the |
1169 | + * port status of these slaves. |
1170 | + */ |
1171 | + if (port->bond_flag == 1) |
1172 | + return change_bonding_slave_port_status(port_id, true); |
1173 | + } |
1174 | |
1175 | return 0; |
1176 | } |
1177 | @@ -1574,10 +1640,10 @@ init_config_port_offloads(portid_t pid, uint32_t socket_id) |
1178 | |
1179 | /* Apply Rx offloads configuration */ |
1180 | for (i = 0; i < port->dev_info.max_rx_queues; i++) |
1181 | - port->rx_conf[i].offloads = port->dev_conf.rxmode.offloads; |
1182 | + port->rxq[i].conf.offloads = port->dev_conf.rxmode.offloads; |
1183 | /* Apply Tx offloads configuration */ |
1184 | for (i = 0; i < port->dev_info.max_tx_queues; i++) |
1185 | - port->tx_conf[i].offloads = port->dev_conf.txmode.offloads; |
1186 | + port->txq[i].conf.offloads = port->dev_conf.txmode.offloads; |
1187 | |
1188 | if (eth_link_speed) |
1189 | port->dev_conf.link_speeds = eth_link_speed; |
1190 | @@ -1764,7 +1830,6 @@ reconfig(portid_t new_port_id, unsigned socket_id) |
1191 | init_port_config(); |
1192 | } |
1193 | |
1194 | - |
1195 | int |
1196 | init_fwd_streams(void) |
1197 | { |
1198 | @@ -1983,6 +2048,7 @@ fwd_stats_display(void) |
1199 | struct rte_port *port; |
1200 | streamid_t sm_id; |
1201 | portid_t pt_id; |
1202 | + int ret; |
1203 | int i; |
1204 | |
1205 | memset(ports_stats, 0, sizeof(ports_stats)); |
1206 | @@ -2014,7 +2080,13 @@ fwd_stats_display(void) |
1207 | pt_id = fwd_ports_ids[i]; |
1208 | port = &ports[pt_id]; |
1209 | |
1210 | - rte_eth_stats_get(pt_id, &stats); |
1211 | + ret = rte_eth_stats_get(pt_id, &stats); |
1212 | + if (ret != 0) { |
1213 | + fprintf(stderr, |
1214 | + "%s: Error: failed to get stats (port %u): %d", |
1215 | + __func__, pt_id, ret); |
1216 | + continue; |
1217 | + } |
1218 | stats.ipackets -= port->stats.ipackets; |
1219 | stats.opackets -= port->stats.opackets; |
1220 | stats.ibytes -= port->stats.ibytes; |
1221 | @@ -2109,11 +2181,16 @@ fwd_stats_reset(void) |
1222 | { |
1223 | streamid_t sm_id; |
1224 | portid_t pt_id; |
1225 | + int ret; |
1226 | int i; |
1227 | |
1228 | for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) { |
1229 | pt_id = fwd_ports_ids[i]; |
1230 | - rte_eth_stats_get(pt_id, &ports[pt_id].stats); |
1231 | + ret = rte_eth_stats_get(pt_id, &ports[pt_id].stats); |
1232 | + if (ret != 0) |
1233 | + fprintf(stderr, |
1234 | + "%s: Error: failed to clear stats (port %u):%d", |
1235 | + __func__, pt_id, ret); |
1236 | } |
1237 | for (sm_id = 0; sm_id < cur_fwd_config.nb_fwd_streams; sm_id++) { |
1238 | struct fwd_stream *fs = fwd_streams[sm_id]; |
1239 | @@ -2157,6 +2234,12 @@ flush_fwd_rx_queues(void) |
1240 | for (rxp = 0; rxp < cur_fwd_config.nb_fwd_ports; rxp++) { |
1241 | for (rxq = 0; rxq < nb_rxq; rxq++) { |
1242 | port_id = fwd_ports_ids[rxp]; |
1243 | + |
1244 | + /* Polling stopped queues is prohibited. */ |
1245 | + if (ports[port_id].rxq[rxq].state == |
1246 | + RTE_ETH_QUEUE_STATE_STOPPED) |
1247 | + continue; |
1248 | + |
1249 | /** |
1250 | * testpmd can stuck in the below do while loop |
1251 | * if rte_eth_rx_burst() always returns nonzero |
1252 | @@ -2202,7 +2285,8 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd) |
1253 | nb_fs = fc->stream_nb; |
1254 | do { |
1255 | for (sm_id = 0; sm_id < nb_fs; sm_id++) |
1256 | - (*pkt_fwd)(fsm[sm_id]); |
1257 | + if (!fsm[sm_id]->disabled) |
1258 | + (*pkt_fwd)(fsm[sm_id]); |
1259 | #ifdef RTE_LIB_BITRATESTATS |
1260 | if (bitrate_enabled != 0 && |
1261 | bitrate_lcore_id == rte_lcore_id()) { |
1262 | @@ -2284,6 +2368,7 @@ start_packet_forwarding(int with_tx_first) |
1263 | { |
1264 | port_fwd_begin_t port_fwd_begin; |
1265 | port_fwd_end_t port_fwd_end; |
1266 | + stream_init_t stream_init = cur_fwd_eng->stream_init; |
1267 | unsigned int i; |
1268 | |
1269 | if (strcmp(cur_fwd_eng->fwd_mode_name, "rxonly") == 0 && !nb_rxq) |
1270 | @@ -2314,6 +2399,10 @@ start_packet_forwarding(int with_tx_first) |
1271 | if (!pkt_fwd_shared_rxq_check()) |
1272 | return; |
1273 | |
1274 | + if (stream_init != NULL) |
1275 | + for (i = 0; i < cur_fwd_config.nb_fwd_streams; i++) |
1276 | + stream_init(fwd_streams[i]); |
1277 | + |
1278 | port_fwd_begin = cur_fwd_config.fwd_eng->port_fwd_begin; |
1279 | if (port_fwd_begin != NULL) { |
1280 | for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++) { |
1281 | @@ -2575,7 +2664,7 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, |
1282 | ret = rte_eth_rx_queue_setup(port_id, rx_queue_id, |
1283 | nb_rx_desc, socket_id, |
1284 | rx_conf, mp); |
1285 | - return ret; |
1286 | + goto exit; |
1287 | } |
1288 | for (i = 0; i < rx_pkt_nb_segs; i++) { |
1289 | struct rte_eth_rxseg_split *rx_seg = &rx_useg[i].split; |
1290 | @@ -2584,7 +2673,7 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, |
1291 | * Use last valid pool for the segments with number |
1292 | * exceeding the pool index. |
1293 | */ |
1294 | - mp_n = (i > mbuf_data_size_n) ? mbuf_data_size_n - 1 : i; |
1295 | + mp_n = (i >= mbuf_data_size_n) ? mbuf_data_size_n - 1 : i; |
1296 | mpx = mbuf_pool_find(socket_id, mp_n); |
1297 | /* Handle zero as mbuf data buffer size. */ |
1298 | rx_seg->length = rx_pkt_seg_lengths[i] ? |
1299 | @@ -2600,6 +2689,10 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, |
1300 | socket_id, rx_conf, NULL); |
1301 | rx_conf->rx_seg = NULL; |
1302 | rx_conf->rx_nseg = 0; |
1303 | +exit: |
1304 | + ports[port_id].rxq[rx_queue_id].state = rx_conf->rx_deferred_start ? |
1305 | + RTE_ETH_QUEUE_STATE_STOPPED : |
1306 | + RTE_ETH_QUEUE_STATE_STARTED; |
1307 | return ret; |
1308 | } |
1309 | |
1310 | @@ -2802,7 +2895,7 @@ start_port(portid_t pid) |
1311 | for (k = 0; |
1312 | k < port->dev_info.max_rx_queues; |
1313 | k++) |
1314 | - port->rx_conf[k].offloads |= |
1315 | + port->rxq[k].conf.offloads |= |
1316 | dev_conf.rxmode.offloads; |
1317 | } |
1318 | /* Apply Tx offloads configuration */ |
1319 | @@ -2813,7 +2906,7 @@ start_port(portid_t pid) |
1320 | for (k = 0; |
1321 | k < port->dev_info.max_tx_queues; |
1322 | k++) |
1323 | - port->tx_conf[k].offloads |= |
1324 | + port->txq[k].conf.offloads |= |
1325 | dev_conf.txmode.offloads; |
1326 | } |
1327 | } |
1328 | @@ -2821,20 +2914,28 @@ start_port(portid_t pid) |
1329 | port->need_reconfig_queues = 0; |
1330 | /* setup tx queues */ |
1331 | for (qi = 0; qi < nb_txq; qi++) { |
1332 | + struct rte_eth_txconf *conf = |
1333 | + &port->txq[qi].conf; |
1334 | + |
1335 | if ((numa_support) && |
1336 | (txring_numa[pi] != NUMA_NO_CONFIG)) |
1337 | diag = rte_eth_tx_queue_setup(pi, qi, |
1338 | port->nb_tx_desc[qi], |
1339 | txring_numa[pi], |
1340 | - &(port->tx_conf[qi])); |
1341 | + &(port->txq[qi].conf)); |
1342 | else |
1343 | diag = rte_eth_tx_queue_setup(pi, qi, |
1344 | port->nb_tx_desc[qi], |
1345 | port->socket_id, |
1346 | - &(port->tx_conf[qi])); |
1347 | + &(port->txq[qi].conf)); |
1348 | |
1349 | - if (diag == 0) |
1350 | + if (diag == 0) { |
1351 | + port->txq[qi].state = |
1352 | + conf->tx_deferred_start ? |
1353 | + RTE_ETH_QUEUE_STATE_STOPPED : |
1354 | + RTE_ETH_QUEUE_STATE_STARTED; |
1355 | continue; |
1356 | + } |
1357 | |
1358 | /* Fail to setup tx queue, return */ |
1359 | if (port->port_status == RTE_PORT_HANDLING) |
1360 | @@ -2867,7 +2968,7 @@ start_port(portid_t pid) |
1361 | diag = rx_queue_setup(pi, qi, |
1362 | port->nb_rx_desc[qi], |
1363 | rxring_numa[pi], |
1364 | - &(port->rx_conf[qi]), |
1365 | + &(port->rxq[qi].conf), |
1366 | mp); |
1367 | } else { |
1368 | struct rte_mempool *mp = |
1369 | @@ -2882,7 +2983,7 @@ start_port(portid_t pid) |
1370 | diag = rx_queue_setup(pi, qi, |
1371 | port->nb_rx_desc[qi], |
1372 | port->socket_id, |
1373 | - &(port->rx_conf[qi]), |
1374 | + &(port->rxq[qi].conf), |
1375 | mp); |
1376 | } |
1377 | if (diag == 0) |
1378 | @@ -3102,11 +3203,48 @@ remove_invalid_ports(void) |
1379 | nb_cfg_ports = nb_fwd_ports; |
1380 | } |
1381 | |
1382 | +static void |
1383 | +flush_port_owned_resources(portid_t pi) |
1384 | +{ |
1385 | + mcast_addr_pool_destroy(pi); |
1386 | + port_flow_flush(pi); |
1387 | + port_flex_item_flush(pi); |
1388 | + port_action_handle_flush(pi); |
1389 | +} |
1390 | + |
1391 | +static void |
1392 | +clear_bonding_slave_device(portid_t *slave_pids, uint16_t num_slaves) |
1393 | +{ |
1394 | + struct rte_port *port; |
1395 | + portid_t slave_pid; |
1396 | + uint16_t i; |
1397 | + |
1398 | + for (i = 0; i < num_slaves; i++) { |
1399 | + slave_pid = slave_pids[i]; |
1400 | + if (port_is_started(slave_pid) == 1) { |
1401 | + if (rte_eth_dev_stop(slave_pid) != 0) |
1402 | + fprintf(stderr, "rte_eth_dev_stop failed for port %u\n", |
1403 | + slave_pid); |
1404 | + |
1405 | + port = &ports[slave_pid]; |
1406 | + port->port_status = RTE_PORT_STOPPED; |
1407 | + } |
1408 | + |
1409 | + clear_port_slave_flag(slave_pid); |
1410 | + |
1411 | + /* Close slave device when testpmd quit or is killed. */ |
1412 | + if (cl_quit == 1 || f_quit == 1) |
1413 | + rte_eth_dev_close(slave_pid); |
1414 | + } |
1415 | +} |
1416 | + |
1417 | void |
1418 | close_port(portid_t pid) |
1419 | { |
1420 | portid_t pi; |
1421 | struct rte_port *port; |
1422 | + portid_t slave_pids[RTE_MAX_ETHPORTS]; |
1423 | + int num_slaves = 0; |
1424 | |
1425 | if (port_id_is_invalid(pid, ENABLED_WARN)) |
1426 | return; |
1427 | @@ -3138,9 +3276,20 @@ close_port(portid_t pid) |
1428 | } |
1429 | |
1430 | if (is_proc_primary()) { |
1431 | - port_flow_flush(pi); |
1432 | - port_flex_item_flush(pi); |
1433 | + flush_port_owned_resources(pi); |
1434 | +#ifdef RTE_NET_BOND |
1435 | + if (port->bond_flag == 1) |
1436 | + num_slaves = rte_eth_bond_slaves_get(pi, |
1437 | + slave_pids, RTE_MAX_ETHPORTS); |
1438 | +#endif |
1439 | rte_eth_dev_close(pi); |
1440 | + /* |
1441 | + * If this port is bonded device, all slaves under the |
1442 | + * device need to be removed or closed. |
1443 | + */ |
1444 | + if (port->bond_flag == 1 && num_slaves > 0) |
1445 | + clear_bonding_slave_device(slave_pids, |
1446 | + num_slaves); |
1447 | } |
1448 | |
1449 | free_xstats_display_info(pi); |
1450 | @@ -3284,7 +3433,7 @@ detach_device(struct rte_device *dev) |
1451 | sibling); |
1452 | return; |
1453 | } |
1454 | - port_flow_flush(sibling); |
1455 | + flush_port_owned_resources(sibling); |
1456 | } |
1457 | } |
1458 | |
1459 | @@ -3351,7 +3500,7 @@ detach_devargs(char *identifier) |
1460 | rte_devargs_reset(&da); |
1461 | return; |
1462 | } |
1463 | - port_flow_flush(port_id); |
1464 | + flush_port_owned_resources(port_id); |
1465 | } |
1466 | } |
1467 | |
1468 | @@ -3657,59 +3806,59 @@ rxtx_port_config(portid_t pid) |
1469 | struct rte_port *port = &ports[pid]; |
1470 | |
1471 | for (qid = 0; qid < nb_rxq; qid++) { |
1472 | - offloads = port->rx_conf[qid].offloads; |
1473 | - port->rx_conf[qid] = port->dev_info.default_rxconf; |
1474 | + offloads = port->rxq[qid].conf.offloads; |
1475 | + port->rxq[qid].conf = port->dev_info.default_rxconf; |
1476 | |
1477 | if (rxq_share > 0 && |
1478 | (port->dev_info.dev_capa & RTE_ETH_DEV_CAPA_RXQ_SHARE)) { |
1479 | /* Non-zero share group to enable RxQ share. */ |
1480 | - port->rx_conf[qid].share_group = pid / rxq_share + 1; |
1481 | - port->rx_conf[qid].share_qid = qid; /* Equal mapping. */ |
1482 | + port->rxq[qid].conf.share_group = pid / rxq_share + 1; |
1483 | + port->rxq[qid].conf.share_qid = qid; /* Equal mapping. */ |
1484 | } |
1485 | |
1486 | if (offloads != 0) |
1487 | - port->rx_conf[qid].offloads = offloads; |
1488 | + port->rxq[qid].conf.offloads = offloads; |
1489 | |
1490 | /* Check if any Rx parameters have been passed */ |
1491 | if (rx_pthresh != RTE_PMD_PARAM_UNSET) |
1492 | - port->rx_conf[qid].rx_thresh.pthresh = rx_pthresh; |
1493 | + port->rxq[qid].conf.rx_thresh.pthresh = rx_pthresh; |
1494 | |
1495 | if (rx_hthresh != RTE_PMD_PARAM_UNSET) |
1496 | - port->rx_conf[qid].rx_thresh.hthresh = rx_hthresh; |
1497 | + port->rxq[qid].conf.rx_thresh.hthresh = rx_hthresh; |
1498 | |
1499 | if (rx_wthresh != RTE_PMD_PARAM_UNSET) |
1500 | - port->rx_conf[qid].rx_thresh.wthresh = rx_wthresh; |
1501 | + port->rxq[qid].conf.rx_thresh.wthresh = rx_wthresh; |
1502 | |
1503 | if (rx_free_thresh != RTE_PMD_PARAM_UNSET) |
1504 | - port->rx_conf[qid].rx_free_thresh = rx_free_thresh; |
1505 | + port->rxq[qid].conf.rx_free_thresh = rx_free_thresh; |
1506 | |
1507 | if (rx_drop_en != RTE_PMD_PARAM_UNSET) |
1508 | - port->rx_conf[qid].rx_drop_en = rx_drop_en; |
1509 | + port->rxq[qid].conf.rx_drop_en = rx_drop_en; |
1510 | |
1511 | port->nb_rx_desc[qid] = nb_rxd; |
1512 | } |
1513 | |
1514 | for (qid = 0; qid < nb_txq; qid++) { |
1515 | - offloads = port->tx_conf[qid].offloads; |
1516 | - port->tx_conf[qid] = port->dev_info.default_txconf; |
1517 | + offloads = port->txq[qid].conf.offloads; |
1518 | + port->txq[qid].conf = port->dev_info.default_txconf; |
1519 | if (offloads != 0) |
1520 | - port->tx_conf[qid].offloads = offloads; |
1521 | + port->txq[qid].conf.offloads = offloads; |
1522 | |
1523 | /* Check if any Tx parameters have been passed */ |
1524 | if (tx_pthresh != RTE_PMD_PARAM_UNSET) |
1525 | - port->tx_conf[qid].tx_thresh.pthresh = tx_pthresh; |
1526 | + port->txq[qid].conf.tx_thresh.pthresh = tx_pthresh; |
1527 | |
1528 | if (tx_hthresh != RTE_PMD_PARAM_UNSET) |
1529 | - port->tx_conf[qid].tx_thresh.hthresh = tx_hthresh; |
1530 | + port->txq[qid].conf.tx_thresh.hthresh = tx_hthresh; |
1531 | |
1532 | if (tx_wthresh != RTE_PMD_PARAM_UNSET) |
1533 | - port->tx_conf[qid].tx_thresh.wthresh = tx_wthresh; |
1534 | + port->txq[qid].conf.tx_thresh.wthresh = tx_wthresh; |
1535 | |
1536 | if (tx_rs_thresh != RTE_PMD_PARAM_UNSET) |
1537 | - port->tx_conf[qid].tx_rs_thresh = tx_rs_thresh; |
1538 | + port->txq[qid].conf.tx_rs_thresh = tx_rs_thresh; |
1539 | |
1540 | if (tx_free_thresh != RTE_PMD_PARAM_UNSET) |
1541 | - port->tx_conf[qid].tx_free_thresh = tx_free_thresh; |
1542 | + port->txq[qid].conf.tx_free_thresh = tx_free_thresh; |
1543 | |
1544 | port->nb_tx_desc[qid] = nb_txd; |
1545 | } |
1546 | @@ -3790,7 +3939,7 @@ init_port_config(void) |
1547 | for (i = 0; |
1548 | i < port->dev_info.nb_rx_queues; |
1549 | i++) |
1550 | - port->rx_conf[i].offloads &= |
1551 | + port->rxq[i].conf.offloads &= |
1552 | ~RTE_ETH_RX_OFFLOAD_RSS_HASH; |
1553 | } |
1554 | } |
1555 | @@ -3964,7 +4113,7 @@ init_port_dcb_config(portid_t pid, |
1556 | if (port_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_VMDQ_DCB) { |
1557 | port_conf.rxmode.offloads &= ~RTE_ETH_RX_OFFLOAD_RSS_HASH; |
1558 | for (i = 0; i < nb_rxq; i++) |
1559 | - rte_port->rx_conf[i].offloads &= |
1560 | + rte_port->rxq[i].conf.offloads &= |
1561 | ~RTE_ETH_RX_OFFLOAD_RSS_HASH; |
1562 | } |
1563 | |
1564 | diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h |
1565 | index 9967825..18abee9 100644 |
1566 | --- a/app/test-pmd/testpmd.h |
1567 | +++ b/app/test-pmd/testpmd.h |
1568 | @@ -32,6 +32,8 @@ |
1569 | #define RTE_PORT_CLOSED (uint16_t)2 |
1570 | #define RTE_PORT_HANDLING (uint16_t)3 |
1571 | |
1572 | +extern uint8_t cl_quit; |
1573 | + |
1574 | /* |
1575 | * It is used to allocate the memory for hash key. |
1576 | * The hash key size is NIC dependent. |
1577 | @@ -72,6 +74,8 @@ |
1578 | #define NUMA_NO_CONFIG 0xFF |
1579 | #define UMA_NO_CONFIG 0xFF |
1580 | |
1581 | +#define MIN_TOTAL_NUM_MBUFS 1024 |
1582 | + |
1583 | typedef uint8_t lcoreid_t; |
1584 | typedef uint16_t portid_t; |
1585 | typedef uint16_t queueid_t; |
1586 | @@ -134,6 +138,7 @@ struct fwd_stream { |
1587 | portid_t tx_port; /**< forwarding port of received packets */ |
1588 | queueid_t tx_queue; /**< TX queue to send forwarded packets */ |
1589 | streamid_t peer_addr; /**< index of peer ethernet address of packets */ |
1590 | + bool disabled; /**< the stream is disabled and should not run */ |
1591 | |
1592 | unsigned int retry_enabled; |
1593 | |
1594 | @@ -217,6 +222,18 @@ struct xstat_display_info { |
1595 | bool allocated; |
1596 | }; |
1597 | |
1598 | +/** RX queue configuration and state. */ |
1599 | +struct port_rxqueue { |
1600 | + struct rte_eth_rxconf conf; |
1601 | + uint8_t state; /**< RTE_ETH_QUEUE_STATE_* value. */ |
1602 | +}; |
1603 | + |
1604 | +/** TX queue configuration and state. */ |
1605 | +struct port_txqueue { |
1606 | + struct rte_eth_txconf conf; |
1607 | + uint8_t state; /**< RTE_ETH_QUEUE_STATE_* value. */ |
1608 | +}; |
1609 | + |
1610 | /** |
1611 | * The data structure associated with each port. |
1612 | */ |
1613 | @@ -239,11 +256,12 @@ struct rte_port { |
1614 | uint8_t dcb_flag; /**< enable dcb */ |
1615 | uint16_t nb_rx_desc[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue rx desc number */ |
1616 | uint16_t nb_tx_desc[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue tx desc number */ |
1617 | - struct rte_eth_rxconf rx_conf[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue rx configuration */ |
1618 | - struct rte_eth_txconf tx_conf[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue tx configuration */ |
1619 | + struct port_rxqueue rxq[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue Rx config and state */ |
1620 | + struct port_txqueue txq[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue Tx config and state */ |
1621 | struct rte_ether_addr *mc_addr_pool; /**< pool of multicast addrs */ |
1622 | uint32_t mc_addr_nb; /**< nb. of addr. in mc_addr_pool */ |
1623 | - uint8_t slave_flag; /**< bonding slave port */ |
1624 | + uint8_t slave_flag : 1, /**< bonding slave port */ |
1625 | + bond_flag : 1; /**< port is bond device */ |
1626 | struct port_flow *flow_list; /**< Associated flows. */ |
1627 | struct port_indirect_action *actions_list; |
1628 | /**< Associated indirect actions. */ |
1629 | @@ -297,12 +315,14 @@ struct fwd_lcore { |
1630 | */ |
1631 | typedef int (*port_fwd_begin_t)(portid_t pi); |
1632 | typedef void (*port_fwd_end_t)(portid_t pi); |
1633 | +typedef void (*stream_init_t)(struct fwd_stream *fs); |
1634 | typedef void (*packet_fwd_t)(struct fwd_stream *fs); |
1635 | |
1636 | struct fwd_engine { |
1637 | const char *fwd_mode_name; /**< Forwarding mode name. */ |
1638 | port_fwd_begin_t port_fwd_begin; /**< NULL if nothing special to do. */ |
1639 | port_fwd_end_t port_fwd_end; /**< NULL if nothing special to do. */ |
1640 | + stream_init_t stream_init; /**< NULL if nothing special to do. */ |
1641 | packet_fwd_t packet_fwd; /**< Mandatory. */ |
1642 | }; |
1643 | |
1644 | @@ -881,6 +901,7 @@ int port_action_handle_create(portid_t port_id, uint32_t id, |
1645 | const struct rte_flow_action *action); |
1646 | int port_action_handle_destroy(portid_t port_id, |
1647 | uint32_t n, const uint32_t *action); |
1648 | +int port_action_handle_flush(portid_t port_id); |
1649 | struct rte_flow_action_handle *port_action_handle_get_by_id(portid_t port_id, |
1650 | uint32_t id); |
1651 | int port_action_handle_update(portid_t port_id, uint32_t id, |
1652 | @@ -898,6 +919,7 @@ int port_flow_create(portid_t port_id, |
1653 | int port_action_handle_query(portid_t port_id, uint32_t id); |
1654 | void update_age_action_context(const struct rte_flow_action *actions, |
1655 | struct port_flow *pf); |
1656 | +int mcast_addr_pool_destroy(portid_t port_id); |
1657 | int port_flow_destroy(portid_t port_id, uint32_t n, const uint32_t *rule); |
1658 | int port_flow_flush(portid_t port_id); |
1659 | int port_flow_dump(portid_t port_id, bool dump_all, |
1660 | @@ -1102,6 +1124,8 @@ extern int flow_parse(const char *src, void *result, unsigned int size, |
1661 | struct rte_flow_item **pattern, |
1662 | struct rte_flow_action **actions); |
1663 | |
1664 | +const char *rsstypes_to_str(uint64_t rss_type); |
1665 | + |
1666 | /* |
1667 | * Work-around of a compilation error with ICC on invocations of the |
1668 | * rte_be_to_cpu_16() function. |
1669 | diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c |
1670 | index fc039a6..e1bc78b 100644 |
1671 | --- a/app/test-pmd/txonly.c |
1672 | +++ b/app/test-pmd/txonly.c |
1673 | @@ -504,9 +504,17 @@ tx_only_begin(portid_t pi) |
1674 | return 0; |
1675 | } |
1676 | |
1677 | +static void |
1678 | +tx_only_stream_init(struct fwd_stream *fs) |
1679 | +{ |
1680 | + fs->disabled = ports[fs->tx_port].txq[fs->tx_queue].state == |
1681 | + RTE_ETH_QUEUE_STATE_STOPPED; |
1682 | +} |
1683 | + |
1684 | struct fwd_engine tx_only_engine = { |
1685 | .fwd_mode_name = "txonly", |
1686 | .port_fwd_begin = tx_only_begin, |
1687 | .port_fwd_end = NULL, |
1688 | + .stream_init = tx_only_stream_init, |
1689 | .packet_fwd = pkt_burst_transmit, |
1690 | }; |
1691 | diff --git a/app/test-regex/main.c b/app/test-regex/main.c |
1692 | index 756726f..ca0b0a5 100644 |
1693 | --- a/app/test-regex/main.c |
1694 | +++ b/app/test-regex/main.c |
1695 | @@ -415,8 +415,8 @@ run_regex(void *args) |
1696 | mbuf_mp = rte_pktmbuf_pool_create(mbuf_pool, |
1697 | rte_align32pow2(nb_jobs * nb_qps * nb_segs), |
1698 | 0, 0, (nb_segs == 1) ? MBUF_SIZE : |
1699 | - (rte_align32pow2(job_len) / nb_segs + |
1700 | - RTE_PKTMBUF_HEADROOM), |
1701 | + (rte_align32pow2(job_len + (data_len % nb_jobs)) / |
1702 | + nb_segs + RTE_PKTMBUF_HEADROOM), |
1703 | rte_socket_id()); |
1704 | if (mbuf_mp == NULL) { |
1705 | printf("Error, can't create memory pool\n"); |
1706 | @@ -732,6 +732,8 @@ main(int argc, char **argv) |
1707 | rte_exit(EXIT_FAILURE, "Number of QPs must be greater than 0\n"); |
1708 | if (nb_lcores == 0) |
1709 | rte_exit(EXIT_FAILURE, "Number of lcores must be greater than 0\n"); |
1710 | + if (nb_jobs == 0) |
1711 | + rte_exit(EXIT_FAILURE, "Number of jobs must be greater than 0\n"); |
1712 | if (distribute_qps_to_lcores(nb_lcores, nb_qps, &qps_per_lcore) < 0) |
1713 | rte_exit(EXIT_FAILURE, "Failed to distribute queues to lcores!\n"); |
1714 | ret = init_port(&nb_max_payload, rules_file, |
1715 | diff --git a/app/test/meson.build b/app/test/meson.build |
1716 | index f7ee8eb..c13776c 100644 |
1717 | --- a/app/test/meson.build |
1718 | +++ b/app/test/meson.build |
1719 | @@ -288,8 +288,6 @@ fast_tests = [ |
1720 | # Tests known to have issues or which don't belong in other tests lists. |
1721 | extra_test_names = [ |
1722 | 'alarm_autotest', # ee00af60170b ("test: remove strict timing requirements some tests") |
1723 | - 'cycles_autotest', # ee00af60170b ("test: remove strict timing requirements some tests") |
1724 | - 'delay_us_sleep_autotest', # ee00af60170b ("test: remove strict timing requirements some tests") |
1725 | 'red_autotest', # https://bugs.dpdk.org/show_bug.cgi?id=826 |
1726 | ] |
1727 | |
1728 | diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c |
1729 | index c422fed..d70bb0f 100644 |
1730 | --- a/app/test/test_bpf.c |
1731 | +++ b/app/test/test_bpf.c |
1732 | @@ -3250,7 +3250,16 @@ test_bpf(void) |
1733 | |
1734 | REGISTER_TEST_COMMAND(bpf_autotest, test_bpf); |
1735 | |
1736 | -#ifdef RTE_HAS_LIBPCAP |
1737 | +#ifndef RTE_HAS_LIBPCAP |
1738 | + |
1739 | +static int |
1740 | +test_bpf_convert(void) |
1741 | +{ |
1742 | + printf("BPF convert RTE_HAS_LIBPCAP is undefined, skipping test\n"); |
1743 | + return TEST_SKIPPED; |
1744 | +} |
1745 | + |
1746 | +#else |
1747 | #include <pcap/pcap.h> |
1748 | |
1749 | static void |
1750 | @@ -3448,5 +3457,6 @@ test_bpf_convert(void) |
1751 | return rc; |
1752 | } |
1753 | |
1754 | -REGISTER_TEST_COMMAND(bpf_convert_autotest, test_bpf_convert); |
1755 | #endif /* RTE_HAS_LIBPCAP */ |
1756 | + |
1757 | +REGISTER_TEST_COMMAND(bpf_convert_autotest, test_bpf_convert); |
1758 | diff --git a/app/test/test_crc.c b/app/test/test_crc.c |
1759 | index bf1d344..8231f81 100644 |
1760 | --- a/app/test/test_crc.c |
1761 | +++ b/app/test/test_crc.c |
1762 | @@ -80,6 +80,8 @@ test_crc_calc(void) |
1763 | |
1764 | /* 32-bit ethernet CRC: Test 2 */ |
1765 | test_data = rte_zmalloc(NULL, CRC32_VEC_LEN1, 0); |
1766 | + if (test_data == NULL) |
1767 | + return -7; |
1768 | |
1769 | for (i = 0; i < CRC32_VEC_LEN1; i += 12) |
1770 | rte_memcpy(&test_data[i], crc32_vec1, 12); |
1771 | diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c |
1772 | index 16431ef..b11be73 100644 |
1773 | --- a/app/test/test_cryptodev.c |
1774 | +++ b/app/test/test_cryptodev.c |
1775 | @@ -6030,7 +6030,7 @@ test_zuc_encryption(const struct wireless_test_data *tdata) |
1776 | retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data, |
1777 | tdata->cipher_iv.len, |
1778 | tdata->plaintext.len, |
1779 | - 0); |
1780 | + tdata->validCipherOffsetInBits.len); |
1781 | if (retval < 0) |
1782 | return retval; |
1783 | |
1784 | @@ -6125,7 +6125,7 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata) |
1785 | /* Create ZUC operation */ |
1786 | retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data, |
1787 | tdata->cipher_iv.len, tdata->plaintext.len, |
1788 | - 0); |
1789 | + tdata->validCipherOffsetInBits.len); |
1790 | if (retval < 0) |
1791 | return retval; |
1792 | |
1793 | @@ -6233,8 +6233,8 @@ test_zuc_authentication(const struct wireless_test_data *tdata) |
1794 | else |
1795 | ut_params->op = process_crypto_request(ts_params->valid_devs[0], |
1796 | ut_params->op); |
1797 | - ut_params->obuf = ut_params->op->sym->m_src; |
1798 | TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf"); |
1799 | + ut_params->obuf = ut_params->op->sym->m_src; |
1800 | ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *) |
1801 | + plaintext_pad_len; |
1802 | |
1803 | @@ -6560,7 +6560,7 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata, |
1804 | retval = create_wireless_algo_auth_cipher_operation( |
1805 | tdata->digest.data, tdata->digest.len, |
1806 | tdata->cipher_iv.data, tdata->cipher_iv.len, |
1807 | - NULL, 0, |
1808 | + tdata->auth_iv.data, tdata->auth_iv.len, |
1809 | (tdata->digest.offset_bytes == 0 ? |
1810 | (verify ? ciphertext_pad_len : plaintext_pad_len) |
1811 | : tdata->digest.offset_bytes), |
1812 | @@ -10547,9 +10547,11 @@ test_authenticated_encryption_oop(const struct aead_test_data *tdata) |
1813 | rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); |
1814 | uint64_t feat_flags = dev_info.feature_flags; |
1815 | |
1816 | - if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) && |
1817 | - (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) |
1818 | + if ((global_api_test_type == CRYPTODEV_RAW_API_TEST) || |
1819 | + (!(feat_flags & RTE_CRYPTODEV_FF_SYM_RAW_DP))) { |
1820 | + printf("Device does not support RAW data-path APIs.\n"); |
1821 | return TEST_SKIPPED; |
1822 | + } |
1823 | |
1824 | /* not supported with CPU crypto */ |
1825 | if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO) |
1826 | @@ -15697,7 +15699,7 @@ test_cryptodev_dpaa2_sec_raw_api(void) |
1827 | static int |
1828 | test_cryptodev_dpaa_sec_raw_api(void) |
1829 | { |
1830 | - static const char *pmd_name = RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD); |
1831 | + static const char *pmd_name = RTE_STR(CRYPTODEV_NAME_DPAA_SEC_PMD); |
1832 | int ret; |
1833 | |
1834 | ret = require_feature_flag(pmd_name, RTE_CRYPTODEV_FF_SYM_RAW_DP, |
1835 | diff --git a/app/test/test_cryptodev_snow3g_test_vectors.h b/app/test/test_cryptodev_snow3g_test_vectors.h |
1836 | index bbe0566..b49a07b 100644 |
1837 | --- a/app/test/test_cryptodev_snow3g_test_vectors.h |
1838 | +++ b/app/test/test_cryptodev_snow3g_test_vectors.h |
1839 | @@ -138,11 +138,11 @@ struct snow3g_test_data snow3g_test_case_2 = { |
1840 | .len = 16 |
1841 | }, |
1842 | .cipher_iv = { |
1843 | - .data = { |
1844 | + .data = { |
1845 | 0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00, |
1846 | 0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00 |
1847 | }, |
1848 | - .len = 16 |
1849 | + .len = 16 |
1850 | }, |
1851 | .plaintext = { |
1852 | .data = { |
1853 | @@ -359,8 +359,8 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_1 = { |
1854 | }, |
1855 | .cipher_iv = { |
1856 | .data = { |
1857 | - 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD, |
1858 | - 0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD |
1859 | + 0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00, |
1860 | + 0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00 |
1861 | }, |
1862 | .len = 16 |
1863 | }, |
1864 | @@ -383,13 +383,13 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_1 = { |
1865 | .len = 384 |
1866 | }, |
1867 | .ciphertext = { |
1868 | - .data = { |
1869 | - 0x95, 0x2E, 0x5A, 0xE1, 0x50, 0xB8, 0x59, 0x2A, |
1870 | - 0x9B, 0xA0, 0x38, 0xA9, 0x8E, 0x2F, 0xED, 0xAB, |
1871 | - 0xFD, 0xC8, 0x3B, 0x47, 0x46, 0x0B, 0x50, 0x16, |
1872 | - 0xEC, 0x88, 0x45, 0xB6, 0x05, 0xC7, 0x54, 0xF8, |
1873 | - 0xBD, 0x91, 0xAA, 0xB6, 0xA4, 0xDC, 0x64, 0xB4, |
1874 | - 0xCB, 0xEB, 0x97, 0x06, 0x4C, 0xF7, 0x02, 0x3D |
1875 | + .data = { |
1876 | + 0x86, 0x4F, 0x4D, 0xE8, 0x86, 0xE6, 0x3E, 0x66, |
1877 | + 0x52, 0x97, 0xC7, 0x62, 0xAE, 0x8E, 0xA2, 0xDB, |
1878 | + 0x01, 0xD6, 0x33, 0xA9, 0xA4, 0xCE, 0x02, 0xD5, |
1879 | + 0xC2, 0xC5, 0x5F, 0x90, 0xE0, 0x89, 0x48, 0xD4, |
1880 | + 0x92, 0xF4, 0xE5, 0x9A, 0xDA, 0x13, 0x76, 0xFF, |
1881 | + 0x6E, 0x76, 0x6B, 0x71, 0x62, 0x28, 0xB2, 0xEC |
1882 | }, |
1883 | .len = 384 |
1884 | }, |
1885 | @@ -428,15 +428,15 @@ struct snow3g_test_data snow3g_test_case_7 = { |
1886 | }, |
1887 | .cipher_iv = { |
1888 | .data = { |
1889 | - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
1890 | - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 |
1891 | + 0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00, |
1892 | + 0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00 |
1893 | }, |
1894 | .len = 16 |
1895 | }, |
1896 | .auth_iv = { |
1897 | .data = { |
1898 | - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
1899 | - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
1900 | + 0x36, 0xAF, 0x61, 0x44, 0x98, 0x38, 0xF0, 0x3A, |
1901 | + 0x36, 0xAF, 0x61, 0x44, 0x98, 0x38, 0xF0, 0x3A |
1902 | }, |
1903 | .len = 16 |
1904 | }, |
1905 | @@ -457,28 +457,28 @@ struct snow3g_test_data snow3g_test_case_7 = { |
1906 | 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, |
1907 | 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, |
1908 | 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, |
1909 | - 0x5A, 0x5A, 0x5A, 0x5A, 0xF1, 0x9E, 0x2B, 0x6F, |
1910 | + 0x5A, 0x5A, 0x5A, 0x5A, 0xBB, 0x2B, 0x8B, 0x15, |
1911 | }, |
1912 | .len = 128 << 3 |
1913 | }, |
1914 | .ciphertext = { |
1915 | .data = { |
1916 | - 0x5A, 0x5A, 0xE4, 0xAD, 0x29, 0xA2, 0x6A, 0xA6, |
1917 | - 0x20, 0x1D, 0xCD, 0x08, 0x50, 0xD6, 0xE6, 0x47, |
1918 | - 0xBC, 0x88, 0x08, 0x01, 0x17, 0xFA, 0x47, 0x5B, |
1919 | - 0x90, 0x40, 0xBA, 0x0C, 0xB5, 0x58, 0xF3, 0x0C, |
1920 | - 0xA0, 0xD4, 0x98, 0x83, 0x1B, 0xCE, 0x54, 0xE3, |
1921 | - 0x29, 0x00, 0x3C, 0xA4, 0xAD, 0x74, 0xEE, 0x05, |
1922 | - 0xA3, 0x6C, 0xD4, 0xAC, 0xC6, 0x30, 0x33, 0xC9, |
1923 | - 0x37, 0x57, 0x41, 0x9B, 0xD4, 0x73, 0xB9, 0x77, |
1924 | - 0x70, 0x8B, 0x63, 0xDD, 0x22, 0xB8, 0xE1, 0x85, |
1925 | - 0xB2, 0x92, 0x7C, 0x37, 0xD3, 0x2E, 0xD9, 0xF4, |
1926 | - 0x4A, 0x69, 0x25, 0x30, 0xE3, 0x5B, 0x8B, 0xF6, |
1927 | - 0x0F, 0xDE, 0x0B, 0x92, 0xD5, 0x25, 0x52, 0x6D, |
1928 | - 0x26, 0xEB, 0x2F, 0x8A, 0x3B, 0x8B, 0x38, 0xE2, |
1929 | - 0x48, 0xD3, 0x4A, 0x98, 0xF7, 0x3A, 0xC2, 0x46, |
1930 | - 0x69, 0x8D, 0x73, 0x3E, 0x57, 0x88, 0x2C, 0x80, |
1931 | - 0xF0, 0xF2, 0x75, 0xB8, 0x7D, 0x27, 0xC6, 0xDA, |
1932 | + 0x5A, 0x5A, 0x8A, 0x35, 0xF7, 0x36, 0xDA, 0xD7, |
1933 | + 0xC4, 0x2C, 0x10, 0xEA, 0x92, 0x9C, 0x00, 0xF0, |
1934 | + 0xAE, 0x35, 0x5E, 0x8D, 0xB6, 0x88, 0x30, 0x66, |
1935 | + 0x74, 0x8B, 0xA2, 0x82, 0x5C, 0xA7, 0xF3, 0x54, |
1936 | + 0x75, 0x02, 0xA9, 0x90, 0x6B, 0x4B, 0x6A, 0x63, |
1937 | + 0xFF, 0x4B, 0x08, 0xFE, 0x11, 0x3C, 0x5A, 0x53, |
1938 | + 0xEE, 0x68, 0x14, 0x41, 0x17, 0xCD, 0x7B, 0x27, |
1939 | + 0x88, 0xAF, 0x99, 0xE2, 0x9C, 0x86, 0x42, 0x12, |
1940 | + 0x97, 0x93, 0xF0, 0xE6, 0xE2, 0xB2, 0x2D, 0xDA, |
1941 | + 0x2C, 0x59, 0xB0, 0xA7, 0x09, 0xF6, 0x32, 0xC0, |
1942 | + 0x35, 0x9A, 0xD3, 0xBA, 0xDC, 0x8F, 0x2E, 0x18, |
1943 | + 0x97, 0x87, 0x44, 0xD6, 0x43, 0xFA, 0x86, 0x5A, |
1944 | + 0xB0, 0xA2, 0x5A, 0xB8, 0x5F, 0x57, 0xE3, 0x2F, |
1945 | + 0x73, 0x9C, 0x01, 0x3A, 0x02, 0x08, 0x8C, 0xEB, |
1946 | + 0xA0, 0x5D, 0x74, 0x58, 0x5A, 0xA1, 0x58, 0x17, |
1947 | + 0x5E, 0x86, 0x96, 0xE6, 0x9C, 0xEE, 0x8C, 0xA8 |
1948 | |
1949 | }, |
1950 | .len = 128 << 3 |
1951 | @@ -493,7 +493,7 @@ struct snow3g_test_data snow3g_test_case_7 = { |
1952 | }, |
1953 | .digest = { |
1954 | .data = { |
1955 | - 0x7D, 0x27, 0xC6, 0xDA |
1956 | + 0x9C, 0xEE, 0x8C, 0xA8 |
1957 | }, |
1958 | .len = 4, |
1959 | .offset_bytes = 124 |
1960 | @@ -520,15 +520,15 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_2 = { |
1961 | }, |
1962 | .cipher_iv = { |
1963 | .data = { |
1964 | - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
1965 | - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 |
1966 | + 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00, |
1967 | + 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00 |
1968 | }, |
1969 | .len = 16 |
1970 | }, |
1971 | .auth_iv = { |
1972 | .data = { |
1973 | - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
1974 | - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
1975 | + 0x3E, 0xDC, 0x87, 0xE2, 0xA4, 0xF2, 0xD8, 0xE2, |
1976 | + 0x3E, 0xDC, 0x87, 0xE2, 0xA4, 0xF2, 0xD8, 0xE2 |
1977 | }, |
1978 | .len = 16 |
1979 | }, |
1980 | @@ -556,22 +556,22 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_2 = { |
1981 | }, |
1982 | .ciphertext = { |
1983 | .data = { |
1984 | - 0x5A, 0x5A, 0xE4, 0xAD, 0x29, 0xA2, 0x6A, 0xA6, |
1985 | - 0x20, 0x1D, 0xCD, 0x08, 0x50, 0xD6, 0xE6, 0x47, |
1986 | - 0xBC, 0x88, 0x08, 0x01, 0x17, 0xFA, 0x47, 0x5B, |
1987 | - 0x90, 0x40, 0xBA, 0x0C, 0xB5, 0x58, 0xF3, 0x0C, |
1988 | - 0xA0, 0xD4, 0x98, 0x83, 0x1B, 0xCE, 0x54, 0xE3, |
1989 | - 0x29, 0x00, 0x3C, 0xA4, 0xAD, 0x74, 0xEE, 0x05, |
1990 | - 0xA3, 0x6C, 0xD4, 0xAC, 0xC6, 0x30, 0x33, 0xC9, |
1991 | - 0x37, 0x57, 0x41, 0x9B, 0xD4, 0x73, 0xB9, 0x77, |
1992 | - 0x70, 0x8B, 0x63, 0xDD, 0x22, 0xB8, 0xE1, 0x85, |
1993 | - 0xB2, 0x92, 0x7C, 0x37, 0xD3, 0x2E, 0xD9, 0xF4, |
1994 | - 0x4A, 0x69, 0x25, 0x30, 0xE3, 0x5B, 0x8B, 0xF6, |
1995 | - 0x0F, 0xDE, 0x0B, 0x92, 0xD5, 0x25, 0x52, 0x6D, |
1996 | - 0x26, 0xEB, 0x2F, 0x8A, 0x3B, 0x8B, 0x38, 0xE2, |
1997 | - 0x48, 0xD3, 0x4A, 0x98, 0xF7, 0x3A, 0xC2, 0x46, |
1998 | - 0x69, 0x8D, 0x73, 0x3E, 0x57, 0x88, 0x2C, 0x80, |
1999 | - 0xF0, 0xF2, 0x75, 0xB8, 0x7D, 0x27, 0xC6, 0xDA, |
2000 | + 0x5A, 0x5A, 0xCF, 0xCF, 0x3D, 0x11, 0xBF, 0xD9, |
2001 | + 0xC3, 0x7F, 0x7C, 0xA8, 0x1A, 0x9F, 0x9F, 0x34, |
2002 | + 0xC5, 0x6E, 0x1B, 0x2C, 0xE0, 0x81, 0x4B, 0x66, |
2003 | + 0x87, 0xCB, 0xD5, 0x61, 0x04, 0xED, 0xBC, 0x69, |
2004 | + 0x79, 0x86, 0x73, 0x48, 0x69, 0x4A, 0xBA, 0x55, |
2005 | + 0x44, 0x6C, 0xEF, 0xD9, 0x34, 0x61, 0x59, 0x67, |
2006 | + 0x80, 0x4E, 0x03, 0x95, 0x0A, 0xA1, 0x6C, 0xBA, |
2007 | + 0x74, 0xBD, 0xAF, 0x11, 0x4B, 0xE6, 0x98, 0x61, |
2008 | + 0x4E, 0xD4, 0x3E, 0xE4, 0x99, 0x55, 0x5C, 0x3A, |
2009 | + 0x8C, 0x3E, 0xC0, 0x01, 0x6E, 0x15, 0xE1, 0x0E, |
2010 | + 0x71, 0x4C, 0x89, 0x43, 0x8A, 0x48, 0x69, 0x6D, |
2011 | + 0x02, 0x10, 0xC6, 0x54, 0x37, 0x18, 0xAA, 0x10, |
2012 | + 0x90, 0x80, 0x0B, 0x69, 0x08, 0xB4, 0xF9, 0x4D, |
2013 | + 0xD1, 0x2E, 0x43, 0xD9, 0x92, 0xAF, 0x06, 0x4A, |
2014 | + 0xAF, 0x26, 0x25, 0x77, 0x37, 0xD0, 0xFC, 0x3C, |
2015 | + 0xA0, 0xCB, 0xAF, 0x06, 0x95, 0x26, 0x30, 0x38, |
2016 | |
2017 | }, |
2018 | .len = 128 << 3 |
2019 | @@ -586,7 +586,7 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_2 = { |
2020 | }, |
2021 | .digest = { |
2022 | .data = { |
2023 | - 0x7D, 0x27, 0xC6, 0xDA |
2024 | + 0x95, 0x26, 0x30, 0x38 |
2025 | }, |
2026 | .len = 4, |
2027 | .offset_bytes = 124 |
2028 | @@ -613,15 +613,15 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_3 = { |
2029 | }, |
2030 | .cipher_iv = { |
2031 | .data = { |
2032 | - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
2033 | - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 |
2034 | + 0x39, 0x8A, 0x59, 0xB4, 0x2C, 0x00, 0x00, 0x00, |
2035 | + 0x39, 0x8A, 0x59, 0xB4, 0x2C, 0x00, 0x00, 0x00 |
2036 | }, |
2037 | .len = 16 |
2038 | }, |
2039 | .auth_iv = { |
2040 | .data = { |
2041 | - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
2042 | - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
2043 | + 0x29, 0x6F, 0x39, 0x3C, 0x6B, 0x22, 0x77, 0x37, |
2044 | + 0x29, 0x6F, 0x39, 0x3C, 0x6B, 0x22, 0x77, 0x37 |
2045 | }, |
2046 | .len = 16 |
2047 | }, |
2048 | @@ -636,10 +636,10 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_3 = { |
2049 | }, |
2050 | .ciphertext = { |
2051 | .data = { |
2052 | - 0x5A, 0x5A, 0xE4, 0xAD, 0x29, 0xA2, 0x6A, 0xA6, |
2053 | - 0x20, 0x1D, 0xCD, 0x08, 0x50, 0xD6, 0xE6, 0x47, |
2054 | - 0xBC, 0x88, 0x08, 0x01, 0x17, 0xFA, 0x47, 0x5B, |
2055 | - 0x90, 0x40, 0xBA, 0x0C, 0xBA, 0x6D, 0x6A, 0x5E, |
2056 | + 0x5A, 0x5A, 0x93, 0xB0, 0x3F, 0xA4, 0xEB, 0xD4, |
2057 | + 0x51, 0x12, 0x3B, 0x95, 0x93, 0x12, 0xBF, 0xBE, |
2058 | + 0xF2, 0xFE, 0xA5, 0xAE, 0xE7, 0xF4, 0x80, 0x3E, |
2059 | + 0xB2, 0xD1, 0xFF, 0x5F, 0xD9, 0x32, 0x72, 0xFE, |
2060 | }, |
2061 | .len = 32 << 3 |
2062 | }, |
2063 | @@ -653,7 +653,7 @@ struct snow3g_test_data snow3g_auth_cipher_test_case_3 = { |
2064 | }, |
2065 | .digest = { |
2066 | .data = { |
2067 | - 0xBA, 0x6D, 0x6A, 0x5E |
2068 | + 0xD9, 0x32, 0x72, 0xFE |
2069 | }, |
2070 | .len = 4, |
2071 | .offset_bytes = 28 |
2072 | @@ -680,15 +680,15 @@ struct snow3g_test_data snow3g_auth_cipher_partial_digest_encryption = { |
2073 | }, |
2074 | .cipher_iv = { |
2075 | .data = { |
2076 | - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
2077 | - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 |
2078 | + 0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00, |
2079 | + 0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00 |
2080 | }, |
2081 | .len = 16 |
2082 | }, |
2083 | .auth_iv = { |
2084 | .data = { |
2085 | - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
2086 | - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
2087 | + 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD, |
2088 | + 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD |
2089 | }, |
2090 | .len = 16 |
2091 | }, |
2092 | @@ -704,9 +704,9 @@ struct snow3g_test_data snow3g_auth_cipher_partial_digest_encryption = { |
2093 | .ciphertext = { |
2094 | .data = { |
2095 | 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, |
2096 | - 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0xE4, 0xAD, |
2097 | - 0x29, 0xA2, 0x6A, 0xA6, 0x20, 0x1D, 0xCD, 0x08, |
2098 | - 0x50, 0xD6, 0xE6, 0x47, 0xB3, 0xBD, 0xC3, 0x08 |
2099 | + 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0xA2, 0xB7, |
2100 | + 0xDF, 0xA7, 0x98, 0xA1, 0xD8, 0xD4, 0x9B, 0x6E, |
2101 | + 0x2C, 0x7A, 0x66, 0x15, 0xCC, 0x4C, 0xE5, 0xE0 |
2102 | }, |
2103 | .len = 32 << 3 |
2104 | }, |
2105 | @@ -720,7 +720,7 @@ struct snow3g_test_data snow3g_auth_cipher_partial_digest_encryption = { |
2106 | }, |
2107 | .digest = { |
2108 | .data = { |
2109 | - 0xB3, 0xBD, 0xC3, 0x08 |
2110 | + 0xCC, 0x4C, 0xE5, 0xE0 |
2111 | }, |
2112 | .len = 4, |
2113 | .offset_bytes = 28 |
2114 | diff --git a/app/test/test_cryptodev_zuc_test_vectors.h b/app/test/test_cryptodev_zuc_test_vectors.h |
2115 | index 5d1d264..299d764 100644 |
2116 | --- a/app/test/test_cryptodev_zuc_test_vectors.h |
2117 | +++ b/app/test/test_cryptodev_zuc_test_vectors.h |
2118 | @@ -558,13 +558,13 @@ static struct wireless_test_data zuc_test_case_cipher_200b_auth_200b = { |
2119 | }, |
2120 | .auth_iv = { |
2121 | .data = { |
2122 | - 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00, |
2123 | - 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00 |
2124 | + 0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00, |
2125 | + 0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00 |
2126 | }, |
2127 | .len = 16 |
2128 | }, |
2129 | .digest = { |
2130 | - .data = {0x01, 0xFE, 0x5E, 0x38}, |
2131 | + .data = {0x2F, 0x45, 0x7D, 0x7B}, |
2132 | .len = 4 |
2133 | }, |
2134 | .validAuthLenInBits = { |
2135 | @@ -631,13 +631,13 @@ static struct wireless_test_data zuc_test_case_cipher_800b_auth_120b = { |
2136 | }, |
2137 | .auth_iv = { |
2138 | .data = { |
2139 | - 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00, |
2140 | - 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00 |
2141 | + 0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00, |
2142 | + 0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00 |
2143 | }, |
2144 | .len = 16 |
2145 | }, |
2146 | .digest = { |
2147 | - .data = {0x9D, 0x42, 0x1C, 0xEA}, |
2148 | + .data = {0xCA, 0xBB, 0x8D, 0x94}, |
2149 | .len = 4 |
2150 | }, |
2151 | .validAuthLenInBits = { |
2152 | @@ -1166,15 +1166,15 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = { |
2153 | }, |
2154 | .cipher_iv = { |
2155 | .data = { |
2156 | - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
2157 | - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
2158 | + 0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00, |
2159 | + 0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00 |
2160 | }, |
2161 | .len = 16 |
2162 | }, |
2163 | .auth_iv = { |
2164 | .data = { |
2165 | - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
2166 | - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
2167 | + 0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00, |
2168 | + 0xFA, 0x55, 0x6B, 0x26, 0x18, 0x00, 0x00, 0x00 |
2169 | }, |
2170 | .len = 16 |
2171 | }, |
2172 | @@ -1201,22 +1201,22 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = { |
2173 | }, |
2174 | .ciphertext = { |
2175 | .data = { |
2176 | - 0x5A, 0x5A, 0xDB, 0x3D, 0xD5, 0xB7, 0xB9, 0x58, |
2177 | - 0xA5, 0xD3, 0xE3, 0xF9, 0x18, 0x73, 0xB4, 0x74, |
2178 | - 0x05, 0xF0, 0xE9, 0xB6, 0x5D, 0x9A, 0xE3, 0xFA, |
2179 | - 0x5D, 0xFD, 0x24, 0x51, 0xAD, 0x73, 0xCA, 0x64, |
2180 | - 0x91, 0xD5, 0xB3, 0x94, 0x10, 0x91, 0x89, 0xEA, |
2181 | - 0x73, 0x6F, 0xB0, 0x2A, 0x0A, 0x63, 0x0F, 0x8D, |
2182 | - 0x64, 0x87, 0xA3, 0x14, 0x6B, 0x93, 0x31, 0x0F, |
2183 | - 0x14, 0xAD, 0xEA, 0x62, 0x80, 0x3F, 0x44, 0xDD, |
2184 | - 0x4E, 0x30, 0xFA, 0xC8, 0x0E, 0x5F, 0x46, 0xE7, |
2185 | - 0x60, 0xEC, 0xDF, 0x8B, 0x94, 0x7D, 0x2E, 0x63, |
2186 | - 0x48, 0xD9, 0x69, 0x06, 0x13, 0xF2, 0x20, 0x49, |
2187 | - 0x54, 0xA6, 0xD4, 0x98, 0xF4, 0xF6, 0x1D, 0x4A, |
2188 | - 0xC9, 0xA5, 0xDA, 0x46, 0x3D, 0xD9, 0x02, 0x47, |
2189 | - 0x1C, 0x20, 0x73, 0x35, 0x17, 0x1D, 0x81, 0x8D, |
2190 | - 0x2E, 0xCD, 0x70, 0x37, 0x22, 0x55, 0x3C, 0xF3, |
2191 | - 0xDA, 0x70, 0x42, 0x12, 0x0E, 0xAA, 0xC4, 0xAB |
2192 | + 0x5A, 0x5A, 0x94, 0xE7, 0xB8, 0xD7, 0x4E, 0xBB, |
2193 | + 0x4C, 0xC3, 0xD1, 0x16, 0xFC, 0x8C, 0xE4, 0x27, |
2194 | + 0x44, 0xEC, 0x04, 0x26, 0x60, 0x9C, 0xFF, 0x81, |
2195 | + 0xB6, 0x2B, 0x48, 0x1D, 0xEE, 0x26, 0xF7, 0x58, |
2196 | + 0x40, 0x38, 0x58, 0xEA, 0x22, 0x23, 0xE6, 0x34, |
2197 | + 0x9A, 0x69, 0x32, 0x68, 0xBD, 0xDD, 0x7D, 0xA3, |
2198 | + 0xC0, 0x04, 0x79, 0xF0, 0xF1, 0x58, 0x78, 0x5E, |
2199 | + 0xD0, 0xDF, 0x27, 0x9A, 0x53, 0x70, 0x5D, 0xFB, |
2200 | + 0x1B, 0xCA, 0xBA, 0x97, 0x12, 0x1F, 0x59, 0x6B, |
2201 | + 0x75, 0x7B, 0x94, 0xF6, 0xE7, 0xFA, 0x49, 0x6B, |
2202 | + 0x7D, 0x7F, 0x8F, 0x0F, 0x78, 0x56, 0x40, 0x52, |
2203 | + 0x84, 0x3E, 0xA9, 0xE8, 0x84, 0x6F, 0xEF, 0xFB, |
2204 | + 0x4A, 0x48, 0x3A, 0x4C, 0x81, 0x98, 0xDD, 0x17, |
2205 | + 0x89, 0x66, 0x3B, 0xC0, 0xEC, 0x71, 0xDB, 0xF6, |
2206 | + 0x44, 0xDF, 0xA7, 0x97, 0xB2, 0x9B, 0x84, 0xA7, |
2207 | + 0x2D, 0x2D, 0xC1, 0x93, 0x12, 0x37, 0xEA, 0xD2 |
2208 | }, |
2209 | .len = 128 << 3 |
2210 | }, |
2211 | @@ -1233,7 +1233,7 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = { |
2212 | .len = 2 << 3 |
2213 | }, |
2214 | .digest = { |
2215 | - .data = {0x0E, 0xAA, 0xC4, 0xAB}, |
2216 | + .data = {0x12, 0x37, 0xEA, 0xD2}, |
2217 | .len = 4, |
2218 | .offset_bytes = 124 |
2219 | } |
2220 | diff --git a/app/test/test_hash_readwrite_lf_perf.c b/app/test/test_hash_readwrite_lf_perf.c |
2221 | index 8120cf4..32f9ec9 100644 |
2222 | --- a/app/test/test_hash_readwrite_lf_perf.c |
2223 | +++ b/app/test/test_hash_readwrite_lf_perf.c |
2224 | @@ -59,7 +59,7 @@ struct rwc_perf { |
2225 | uint32_t w_ks_r_hit_nsp[2][NUM_TEST]; |
2226 | uint32_t w_ks_r_hit_sp[2][NUM_TEST]; |
2227 | uint32_t w_ks_r_miss[2][NUM_TEST]; |
2228 | - uint32_t multi_rw[NUM_TEST - 1][2][NUM_TEST]; |
2229 | + uint32_t multi_rw[NUM_TEST][2][NUM_TEST]; |
2230 | uint32_t w_ks_r_hit_extbkt[2][NUM_TEST]; |
2231 | uint32_t writer_add_del[NUM_TEST]; |
2232 | }; |
2233 | diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c |
2234 | index bc2a3db..3c6dcdc 100644 |
2235 | --- a/app/test/test_ipsec.c |
2236 | +++ b/app/test/test_ipsec.c |
2237 | @@ -543,12 +543,14 @@ struct rte_ipv4_hdr ipv4_outer = { |
2238 | }; |
2239 | |
2240 | static struct rte_mbuf * |
2241 | -setup_test_string(struct rte_mempool *mpool, |
2242 | - const char *string, size_t len, uint8_t blocksize) |
2243 | +setup_test_string(struct rte_mempool *mpool, const char *string, |
2244 | + size_t string_len, size_t len, uint8_t blocksize) |
2245 | { |
2246 | struct rte_mbuf *m = rte_pktmbuf_alloc(mpool); |
2247 | size_t t_len = len - (blocksize ? (len % blocksize) : 0); |
2248 | |
2249 | + RTE_VERIFY(len <= string_len); |
2250 | + |
2251 | if (m) { |
2252 | memset(m->buf_addr, 0, m->buf_len); |
2253 | char *dst = rte_pktmbuf_append(m, t_len); |
2254 | @@ -1354,7 +1356,8 @@ test_ipsec_crypto_outb_burst_null_null(int i) |
2255 | /* Generate input mbuf data */ |
2256 | for (j = 0; j < num_pkts && rc == 0; j++) { |
2257 | ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool, |
2258 | - null_plain_data, test_cfg[i].pkt_sz, 0); |
2259 | + null_plain_data, sizeof(null_plain_data), |
2260 | + test_cfg[i].pkt_sz, 0); |
2261 | if (ut_params->ibuf[j] == NULL) |
2262 | rc = TEST_FAILED; |
2263 | else { |
2264 | @@ -1472,7 +1475,8 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i) |
2265 | /* Generate test mbuf data */ |
2266 | ut_params->obuf[j] = setup_test_string( |
2267 | ts_params->mbuf_pool, |
2268 | - null_plain_data, test_cfg[i].pkt_sz, 0); |
2269 | + null_plain_data, sizeof(null_plain_data), |
2270 | + test_cfg[i].pkt_sz, 0); |
2271 | if (ut_params->obuf[j] == NULL) |
2272 | rc = TEST_FAILED; |
2273 | } |
2274 | @@ -1540,16 +1544,17 @@ test_ipsec_inline_proto_inb_burst_null_null(int i) |
2275 | |
2276 | /* Generate inbound mbuf data */ |
2277 | for (j = 0; j < num_pkts && rc == 0; j++) { |
2278 | - ut_params->ibuf[j] = setup_test_string( |
2279 | - ts_params->mbuf_pool, |
2280 | - null_plain_data, test_cfg[i].pkt_sz, 0); |
2281 | + ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool, |
2282 | + null_plain_data, sizeof(null_plain_data), |
2283 | + test_cfg[i].pkt_sz, 0); |
2284 | if (ut_params->ibuf[j] == NULL) |
2285 | rc = TEST_FAILED; |
2286 | else { |
2287 | /* Generate test mbuf data */ |
2288 | ut_params->obuf[j] = setup_test_string( |
2289 | ts_params->mbuf_pool, |
2290 | - null_plain_data, test_cfg[i].pkt_sz, 0); |
2291 | + null_plain_data, sizeof(null_plain_data), |
2292 | + test_cfg[i].pkt_sz, 0); |
2293 | if (ut_params->obuf[j] == NULL) |
2294 | rc = TEST_FAILED; |
2295 | } |
2296 | @@ -1649,7 +1654,8 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i) |
2297 | /* Generate test mbuf data */ |
2298 | for (j = 0; j < num_pkts && rc == 0; j++) { |
2299 | ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool, |
2300 | - null_plain_data, test_cfg[i].pkt_sz, 0); |
2301 | + null_plain_data, sizeof(null_plain_data), |
2302 | + test_cfg[i].pkt_sz, 0); |
2303 | if (ut_params->ibuf[0] == NULL) |
2304 | rc = TEST_FAILED; |
2305 | |
2306 | @@ -1727,15 +1733,17 @@ test_ipsec_inline_proto_outb_burst_null_null(int i) |
2307 | /* Generate test mbuf data */ |
2308 | for (j = 0; j < num_pkts && rc == 0; j++) { |
2309 | ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool, |
2310 | - null_plain_data, test_cfg[i].pkt_sz, 0); |
2311 | + null_plain_data, sizeof(null_plain_data), |
2312 | + test_cfg[i].pkt_sz, 0); |
2313 | if (ut_params->ibuf[0] == NULL) |
2314 | rc = TEST_FAILED; |
2315 | |
2316 | if (rc == 0) { |
2317 | /* Generate test tunneled mbuf data for comparison */ |
2318 | ut_params->obuf[j] = setup_test_string( |
2319 | - ts_params->mbuf_pool, |
2320 | - null_plain_data, test_cfg[i].pkt_sz, 0); |
2321 | + ts_params->mbuf_pool, null_plain_data, |
2322 | + sizeof(null_plain_data), test_cfg[i].pkt_sz, |
2323 | + 0); |
2324 | if (ut_params->obuf[j] == NULL) |
2325 | rc = TEST_FAILED; |
2326 | } |
2327 | @@ -1804,7 +1812,8 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i) |
2328 | for (j = 0; j < num_pkts && rc == 0; j++) { |
2329 | /* packet with sequence number 0 is invalid */ |
2330 | ut_params->ibuf[j] = setup_test_string(ts_params->mbuf_pool, |
2331 | - null_encrypted_data, test_cfg[i].pkt_sz, 0); |
2332 | + null_encrypted_data, sizeof(null_encrypted_data), |
2333 | + test_cfg[i].pkt_sz, 0); |
2334 | if (ut_params->ibuf[j] == NULL) |
2335 | rc = TEST_FAILED; |
2336 | } |
2337 | diff --git a/app/test/test_ipsec_perf.c b/app/test/test_ipsec_perf.c |
2338 | index 92106bf..7e07805 100644 |
2339 | --- a/app/test/test_ipsec_perf.c |
2340 | +++ b/app/test/test_ipsec_perf.c |
2341 | @@ -580,8 +580,8 @@ testsuite_teardown(void) |
2342 | static int |
2343 | test_libipsec_perf(void) |
2344 | { |
2345 | - struct ipsec_sa sa_out; |
2346 | - struct ipsec_sa sa_in; |
2347 | + struct ipsec_sa sa_out = { .sa_prm = { 0 } }; |
2348 | + struct ipsec_sa sa_in = { .sa_prm = { 0 } }; |
2349 | uint32_t i; |
2350 | int ret; |
2351 | |
2352 | diff --git a/app/test/test_link_bonding_rssconf.c b/app/test/test_link_bonding_rssconf.c |
2353 | index 7228965..b3d71c6 100644 |
2354 | --- a/app/test/test_link_bonding_rssconf.c |
2355 | +++ b/app/test/test_link_bonding_rssconf.c |
2356 | @@ -468,15 +468,85 @@ test_rss(void) |
2357 | |
2358 | TEST_ASSERT_SUCCESS(test_propagate(), "Propagation test failed"); |
2359 | |
2360 | - TEST_ASSERT(slave_remove_and_add() == 1, "New slave should be synced"); |
2361 | + TEST_ASSERT(slave_remove_and_add() == 1, "remove and add slaves success."); |
2362 | |
2363 | remove_slaves_and_stop_bonded_device(); |
2364 | |
2365 | return TEST_SUCCESS; |
2366 | } |
2367 | |
2368 | + |
2369 | +/** |
2370 | + * Test RSS configuration over bonded and slaves. |
2371 | + */ |
2372 | +static int |
2373 | +test_rss_config_lazy(void) |
2374 | +{ |
2375 | + struct rte_eth_rss_conf bond_rss_conf = {0}; |
2376 | + struct slave_conf *port; |
2377 | + uint8_t rss_key[40]; |
2378 | + uint64_t rss_hf; |
2379 | + int retval; |
2380 | + uint16_t i; |
2381 | + uint8_t n; |
2382 | + |
2383 | + retval = rte_eth_dev_info_get(test_params.bond_port_id, |
2384 | + &test_params.bond_dev_info); |
2385 | + TEST_ASSERT((retval == 0), "Error during getting device (port %u) info: %s\n", |
2386 | + test_params.bond_port_id, strerror(-retval)); |
2387 | + |
2388 | + rss_hf = test_params.bond_dev_info.flow_type_rss_offloads; |
2389 | + if (rss_hf != 0) { |
2390 | + bond_rss_conf.rss_key = NULL; |
2391 | + bond_rss_conf.rss_hf = rss_hf; |
2392 | + retval = rte_eth_dev_rss_hash_update(test_params.bond_port_id, |
2393 | + &bond_rss_conf); |
2394 | + TEST_ASSERT(retval != 0, "Succeeded in setting bonded port hash function"); |
2395 | + } |
2396 | + |
2397 | + /* Set all keys to zero for all slaves */ |
2398 | + FOR_EACH_PORT(n, port) { |
2399 | + port = &test_params.slave_ports[n]; |
2400 | + retval = rte_eth_dev_rss_hash_conf_get(port->port_id, |
2401 | + &port->rss_conf); |
2402 | + TEST_ASSERT_SUCCESS(retval, "Cannot get slaves RSS configuration"); |
2403 | + memset(port->rss_key, 0, sizeof(port->rss_key)); |
2404 | + port->rss_conf.rss_key = port->rss_key; |
2405 | + port->rss_conf.rss_key_len = sizeof(port->rss_key); |
2406 | + retval = rte_eth_dev_rss_hash_update(port->port_id, |
2407 | + &port->rss_conf); |
2408 | + TEST_ASSERT(retval != 0, "Succeeded in setting slaves RSS keys"); |
2409 | + } |
2410 | + |
2411 | + /* Set RSS keys for bonded port */ |
2412 | + memset(rss_key, 1, sizeof(rss_key)); |
2413 | + bond_rss_conf.rss_hf = rss_hf; |
2414 | + bond_rss_conf.rss_key = rss_key; |
2415 | + bond_rss_conf.rss_key_len = sizeof(rss_key); |
2416 | + |
2417 | + retval = rte_eth_dev_rss_hash_update(test_params.bond_port_id, |
2418 | + &bond_rss_conf); |
2419 | + TEST_ASSERT(retval != 0, "Succeeded in setting bonded port RSS keys"); |
2420 | + |
2421 | + /* Test RETA propagation */ |
2422 | + for (i = 0; i < RXTX_QUEUE_COUNT; i++) { |
2423 | + FOR_EACH_PORT(n, port) { |
2424 | + port = &test_params.slave_ports[n]; |
2425 | + retval = reta_set(port->port_id, (i + 1) % RXTX_QUEUE_COUNT, |
2426 | + port->dev_info.reta_size); |
2427 | + TEST_ASSERT(retval != 0, "Succeeded in setting slaves RETA"); |
2428 | + } |
2429 | + |
2430 | + retval = reta_set(test_params.bond_port_id, i % RXTX_QUEUE_COUNT, |
2431 | + test_params.bond_dev_info.reta_size); |
2432 | + TEST_ASSERT(retval != 0, "Succeeded in setting bonded port RETA"); |
2433 | + } |
2434 | + |
2435 | + return TEST_SUCCESS; |
2436 | +} |
2437 | + |
2438 | /** |
2439 | - * Test propagation logic, when RX_RSS mq_mode is turned off for bonding port |
2440 | + * Test RSS function logic, when RX_RSS mq_mode is turned off for bonding port |
2441 | */ |
2442 | static int |
2443 | test_rss_lazy(void) |
2444 | @@ -497,9 +567,7 @@ test_rss_lazy(void) |
2445 | TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params.bond_port_id), |
2446 | "Failed to start bonding port (%d).", test_params.bond_port_id); |
2447 | |
2448 | - TEST_ASSERT_SUCCESS(test_propagate(), "Propagation test failed"); |
2449 | - |
2450 | - TEST_ASSERT(slave_remove_and_add() == 0, "New slave shouldn't be synced"); |
2451 | + TEST_ASSERT_SUCCESS(test_rss_config_lazy(), "Succeeded in setting RSS hash when RX_RSS mq_mode is turned off"); |
2452 | |
2453 | remove_slaves_and_stop_bonded_device(); |
2454 | |
2455 | diff --git a/app/test/test_memory.c b/app/test/test_memory.c |
2456 | index 140ac3f..440e5ef 100644 |
2457 | --- a/app/test/test_memory.c |
2458 | +++ b/app/test/test_memory.c |
2459 | @@ -25,6 +25,11 @@ |
2460 | * - Try to read all memory; it should not segfault. |
2461 | */ |
2462 | |
2463 | +/* |
2464 | + * ASan complains about accessing unallocated memory. |
2465 | + * See: https://bugs.dpdk.org/show_bug.cgi?id=880 |
2466 | + */ |
2467 | +__rte_no_asan |
2468 | static int |
2469 | check_mem(const struct rte_memseg_list *msl __rte_unused, |
2470 | const struct rte_memseg *ms, void *arg __rte_unused) |
2471 | diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c |
2472 | index 0aa9dc1..4094057 100644 |
2473 | --- a/app/test/test_pmd_perf.c |
2474 | +++ b/app/test/test_pmd_perf.c |
2475 | @@ -454,6 +454,7 @@ main_loop(__rte_unused void *args) |
2476 | #define PACKET_SIZE 64 |
2477 | #define FRAME_GAP 12 |
2478 | #define MAC_PREAMBLE 8 |
2479 | +#define MAX_RETRY_COUNT 5 |
2480 | struct rte_mbuf *pkts_burst[MAX_PKT_BURST]; |
2481 | unsigned lcore_id; |
2482 | unsigned i, portid, nb_rx = 0, nb_tx = 0; |
2483 | @@ -461,6 +462,8 @@ main_loop(__rte_unused void *args) |
2484 | int pkt_per_port; |
2485 | uint64_t diff_tsc; |
2486 | uint64_t packets_per_second, total_packets; |
2487 | + int retry_cnt = 0; |
2488 | + int free_pkt = 0; |
2489 | |
2490 | lcore_id = rte_lcore_id(); |
2491 | conf = &lcore_conf[lcore_id]; |
2492 | @@ -478,10 +481,19 @@ main_loop(__rte_unused void *args) |
2493 | nb_tx = RTE_MIN(MAX_PKT_BURST, num); |
2494 | nb_tx = rte_eth_tx_burst(portid, 0, |
2495 | &tx_burst[idx], nb_tx); |
2496 | + if (nb_tx == 0) |
2497 | + retry_cnt++; |
2498 | num -= nb_tx; |
2499 | idx += nb_tx; |
2500 | + if (retry_cnt == MAX_RETRY_COUNT) { |
2501 | + retry_cnt = 0; |
2502 | + break; |
2503 | + } |
2504 | } |
2505 | } |
2506 | + for (free_pkt = idx; free_pkt < (MAX_TRAFFIC_BURST * conf->nb_ports); |
2507 | + free_pkt++) |
2508 | + rte_pktmbuf_free(tx_burst[free_pkt]); |
2509 | printf("Total packets inject to prime ports = %u\n", idx); |
2510 | |
2511 | packets_per_second = (link_mbps * 1000 * 1000) / |
2512 | diff --git a/app/test/test_table_tables.c b/app/test/test_table_tables.c |
2513 | index 4ff6ab1..494fb6f 100644 |
2514 | --- a/app/test/test_table_tables.c |
2515 | +++ b/app/test/test_table_tables.c |
2516 | @@ -290,10 +290,10 @@ test_table_lpm(void) |
2517 | struct rte_mbuf *mbufs[RTE_PORT_IN_BURST_SIZE_MAX]; |
2518 | void *table; |
2519 | char *entries[RTE_PORT_IN_BURST_SIZE_MAX]; |
2520 | - char entry; |
2521 | + uint64_t entry; |
2522 | void *entry_ptr; |
2523 | int key_found; |
2524 | - uint32_t entry_size = 1; |
2525 | + uint32_t entry_size = sizeof(entry); |
2526 | |
2527 | /* Initialize params and create tables */ |
2528 | struct rte_table_lpm_params lpm_params = { |
2529 | @@ -355,7 +355,7 @@ test_table_lpm(void) |
2530 | struct rte_table_lpm_key lpm_key; |
2531 | lpm_key.ip = 0xadadadad; |
2532 | |
2533 | - table = rte_table_lpm_ops.f_create(&lpm_params, 0, 1); |
2534 | + table = rte_table_lpm_ops.f_create(&lpm_params, 0, entry_size); |
2535 | if (table == NULL) |
2536 | return -9; |
2537 | |
2538 | @@ -456,10 +456,10 @@ test_table_lpm_ipv6(void) |
2539 | struct rte_mbuf *mbufs[RTE_PORT_IN_BURST_SIZE_MAX]; |
2540 | void *table; |
2541 | char *entries[RTE_PORT_IN_BURST_SIZE_MAX]; |
2542 | - char entry; |
2543 | + uint64_t entry; |
2544 | void *entry_ptr; |
2545 | int key_found; |
2546 | - uint32_t entry_size = 1; |
2547 | + uint32_t entry_size = sizeof(entry); |
2548 | |
2549 | /* Initialize params and create tables */ |
2550 | struct rte_table_lpm_ipv6_params lpm_params = { |
2551 | diff --git a/config/arm/arm32_armv8_linux_gcc b/config/arm/arm32_armv8_linux_gcc |
2552 | index 89f8a12..0d4618e 100644 |
2553 | --- a/config/arm/arm32_armv8_linux_gcc |
2554 | +++ b/config/arm/arm32_armv8_linux_gcc |
2555 | @@ -1,6 +1,6 @@ |
2556 | [binaries] |
2557 | c = 'arm-linux-gnueabihf-gcc' |
2558 | -cpp = 'arm-linux-gnueabihf-cpp' |
2559 | +cpp = 'arm-linux-gnueabihf-g++' |
2560 | ar = 'arm-linux-gnueabihf-gcc-ar' |
2561 | strip = 'arm-linux-gnueabihf-strip' |
2562 | pkgconfig = 'arm-linux-gnueabihf-pkg-config' |
2563 | diff --git a/config/arm/arm64_armada_linux_gcc b/config/arm/arm64_armada_linux_gcc |
2564 | index 3014189..5043b82 100644 |
2565 | --- a/config/arm/arm64_armada_linux_gcc |
2566 | +++ b/config/arm/arm64_armada_linux_gcc |
2567 | @@ -1,6 +1,6 @@ |
2568 | [binaries] |
2569 | c = 'aarch64-linux-gnu-gcc' |
2570 | -cpp = 'aarch64-linux-gnu-cpp' |
2571 | +cpp = 'aarch64-linux-gnu-g++' |
2572 | ar = 'aarch64-linux-gnu-ar' |
2573 | as = 'aarch64-linux-gnu-as' |
2574 | strip = 'aarch64-linux-gnu-strip' |
2575 | diff --git a/config/arm/arm64_armv8_linux_gcc b/config/arm/arm64_armv8_linux_gcc |
2576 | index 5391d35..5c32f6b 100644 |
2577 | --- a/config/arm/arm64_armv8_linux_gcc |
2578 | +++ b/config/arm/arm64_armv8_linux_gcc |
2579 | @@ -1,6 +1,6 @@ |
2580 | [binaries] |
2581 | c = 'aarch64-linux-gnu-gcc' |
2582 | -cpp = 'aarch64-linux-gnu-cpp' |
2583 | +cpp = 'aarch64-linux-gnu-g++' |
2584 | ar = 'aarch64-linux-gnu-gcc-ar' |
2585 | strip = 'aarch64-linux-gnu-strip' |
2586 | pkgconfig = 'aarch64-linux-gnu-pkg-config' |
2587 | diff --git a/config/arm/arm64_bluefield_linux_gcc b/config/arm/arm64_bluefield_linux_gcc |
2588 | index 248a9f0..df6eccc 100644 |
2589 | --- a/config/arm/arm64_bluefield_linux_gcc |
2590 | +++ b/config/arm/arm64_bluefield_linux_gcc |
2591 | @@ -1,6 +1,6 @@ |
2592 | [binaries] |
2593 | c = 'aarch64-linux-gnu-gcc' |
2594 | -cpp = 'aarch64-linux-gnu-cpp' |
2595 | +cpp = 'aarch64-linux-gnu-g++' |
2596 | ar = 'aarch64-linux-gnu-gcc-ar' |
2597 | strip = 'aarch64-linux-gnu-strip' |
2598 | pkgconfig = 'aarch64-linux-gnu-pkg-config' |
2599 | diff --git a/config/arm/arm64_centriq2400_linux_gcc b/config/arm/arm64_centriq2400_linux_gcc |
2600 | index dfe9110..ddffc05 100644 |
2601 | --- a/config/arm/arm64_centriq2400_linux_gcc |
2602 | +++ b/config/arm/arm64_centriq2400_linux_gcc |
2603 | @@ -1,6 +1,6 @@ |
2604 | [binaries] |
2605 | c = 'aarch64-linux-gnu-gcc' |
2606 | -cpp = 'aarch64-linux-gnu-cpp' |
2607 | +cpp = 'aarch64-linux-gnu-g++' |
2608 | ar = 'aarch64-linux-gnu-gcc-ar' |
2609 | strip = 'aarch64-linux-gnu-strip' |
2610 | pkgconfig = 'aarch64-linux-gnu-pkg-config' |
2611 | diff --git a/config/arm/arm64_cn10k_linux_gcc b/config/arm/arm64_cn10k_linux_gcc |
2612 | index 88e5f10..19068f0 100644 |
2613 | --- a/config/arm/arm64_cn10k_linux_gcc |
2614 | +++ b/config/arm/arm64_cn10k_linux_gcc |
2615 | @@ -1,6 +1,6 @@ |
2616 | [binaries] |
2617 | c = 'aarch64-linux-gnu-gcc' |
2618 | -cpp = 'aarch64-linux-gnu-cpp' |
2619 | +cpp = 'aarch64-linux-gnu-g++' |
2620 | ar = 'aarch64-linux-gnu-gcc-ar' |
2621 | strip = 'aarch64-linux-gnu-strip' |
2622 | pkgconfig = 'aarch64-linux-gnu-pkg-config' |
2623 | diff --git a/config/arm/arm64_dpaa_linux_gcc b/config/arm/arm64_dpaa_linux_gcc |
2624 | index e9d5fd3..70df99f 100644 |
2625 | --- a/config/arm/arm64_dpaa_linux_gcc |
2626 | +++ b/config/arm/arm64_dpaa_linux_gcc |
2627 | @@ -1,6 +1,6 @@ |
2628 | [binaries] |
2629 | c = 'aarch64-linux-gnu-gcc' |
2630 | -cpp = 'aarch64-linux-gnu-cpp' |
2631 | +cpp = 'aarch64-linux-gnu-g++' |
2632 | ar = 'aarch64-linux-gnu-ar' |
2633 | as = 'aarch64-linux-gnu-as' |
2634 | strip = 'aarch64-linux-gnu-strip' |
2635 | diff --git a/config/arm/arm64_emag_linux_gcc b/config/arm/arm64_emag_linux_gcc |
2636 | index 9cdd931..06f5eae 100644 |
2637 | --- a/config/arm/arm64_emag_linux_gcc |
2638 | +++ b/config/arm/arm64_emag_linux_gcc |
2639 | @@ -1,6 +1,6 @@ |
2640 | [binaries] |
2641 | c = 'aarch64-linux-gnu-gcc' |
2642 | -cpp = 'aarch64-linux-gnu-cpp' |
2643 | +cpp = 'aarch64-linux-gnu-g++' |
2644 | ar = 'aarch64-linux-gnu-gcc-ar' |
2645 | strip = 'aarch64-linux-gnu-strip' |
2646 | pkgconfig = 'aarch64-linux-gnu-pkg-config' |
2647 | diff --git a/config/arm/arm64_graviton2_linux_gcc b/config/arm/arm64_graviton2_linux_gcc |
2648 | index 8016fd2..24b2dbc 100644 |
2649 | --- a/config/arm/arm64_graviton2_linux_gcc |
2650 | +++ b/config/arm/arm64_graviton2_linux_gcc |
2651 | @@ -1,6 +1,6 @@ |
2652 | [binaries] |
2653 | c = 'aarch64-linux-gnu-gcc' |
2654 | -cpp = 'aarch64-linux-gnu-cpp' |
2655 | +cpp = 'aarch64-linux-gnu-g++' |
2656 | ar = 'aarch64-linux-gnu-gcc-ar' |
2657 | strip = 'aarch64-linux-gnu-strip' |
2658 | pkgconfig = 'aarch64-linux-gnu-pkg-config' |
2659 | diff --git a/config/arm/arm64_kunpeng920_linux_gcc b/config/arm/arm64_kunpeng920_linux_gcc |
2660 | index c4685b2..4a71531 100644 |
2661 | --- a/config/arm/arm64_kunpeng920_linux_gcc |
2662 | +++ b/config/arm/arm64_kunpeng920_linux_gcc |
2663 | @@ -1,6 +1,6 @@ |
2664 | [binaries] |
2665 | c = 'aarch64-linux-gnu-gcc' |
2666 | -cpp = 'aarch64-linux-gnu-cpp' |
2667 | +cpp = 'aarch64-linux-gnu-g++' |
2668 | ar = 'aarch64-linux-gnu-gcc-ar' |
2669 | strip = 'aarch64-linux-gnu-strip' |
2670 | pkgconfig = 'aarch64-linux-gnu-pkg-config' |
2671 | diff --git a/config/arm/arm64_kunpeng930_linux_gcc b/config/arm/arm64_kunpeng930_linux_gcc |
2672 | index fb85d2d..383f0b0 100644 |
2673 | --- a/config/arm/arm64_kunpeng930_linux_gcc |
2674 | +++ b/config/arm/arm64_kunpeng930_linux_gcc |
2675 | @@ -1,6 +1,6 @@ |
2676 | [binaries] |
2677 | c = 'aarch64-linux-gnu-gcc' |
2678 | -cpp = 'aarch64-linux-gnu-cpp' |
2679 | +cpp = 'aarch64-linux-gnu-g++' |
2680 | ar = 'aarch64-linux-gnu-gcc-ar' |
2681 | strip = 'aarch64-linux-gnu-strip' |
2682 | pkgconfig = 'aarch64-linux-gnu-pkg-config' |
2683 | diff --git a/config/arm/arm64_n1sdp_linux_gcc b/config/arm/arm64_n1sdp_linux_gcc |
2684 | index 0df283e..5f6356c 100644 |
2685 | --- a/config/arm/arm64_n1sdp_linux_gcc |
2686 | +++ b/config/arm/arm64_n1sdp_linux_gcc |
2687 | @@ -1,6 +1,6 @@ |
2688 | [binaries] |
2689 | c = 'aarch64-linux-gnu-gcc' |
2690 | -cpp = 'aarch64-linux-gnu-cpp' |
2691 | +cpp = 'aarch64-linux-gnu-g++' |
2692 | ar = 'aarch64-linux-gnu-gcc-ar' |
2693 | strip = 'aarch64-linux-gnu-strip' |
2694 | pkgconfig = 'aarch64-linux-gnu-pkg-config' |
2695 | diff --git a/config/arm/arm64_n2_linux_gcc b/config/arm/arm64_n2_linux_gcc |
2696 | index 036aee2..82806ba 100644 |
2697 | --- a/config/arm/arm64_n2_linux_gcc |
2698 | +++ b/config/arm/arm64_n2_linux_gcc |
2699 | @@ -1,6 +1,6 @@ |
2700 | [binaries] |
2701 | c = 'aarch64-linux-gnu-gcc' |
2702 | -cpp = 'aarch64-linux-gnu-cpp' |
2703 | +cpp = 'aarch64-linux-gnu-g++' |
2704 | ar = 'aarch64-linux-gnu-gcc-ar' |
2705 | strip = 'aarch64-linux-gnu-strip' |
2706 | pkgconfig = 'aarch64-linux-gnu-pkg-config' |
2707 | diff --git a/config/arm/arm64_octeontx2_linux_gcc b/config/arm/arm64_octeontx2_linux_gcc |
2708 | index 8fbdd38..d23b652 100644 |
2709 | --- a/config/arm/arm64_octeontx2_linux_gcc |
2710 | +++ b/config/arm/arm64_octeontx2_linux_gcc |
2711 | @@ -1,6 +1,6 @@ |
2712 | [binaries] |
2713 | c = 'aarch64-linux-gnu-gcc' |
2714 | -cpp = 'aarch64-linux-gnu-cpp' |
2715 | +cpp = 'aarch64-linux-gnu-g++' |
2716 | ar = 'aarch64-linux-gnu-gcc-ar' |
2717 | strip = 'aarch64-linux-gnu-strip' |
2718 | pkgconfig = 'aarch64-linux-gnu-pkg-config' |
2719 | diff --git a/config/arm/arm64_stingray_linux_gcc b/config/arm/arm64_stingray_linux_gcc |
2720 | index 319a4a1..cf98337 100644 |
2721 | --- a/config/arm/arm64_stingray_linux_gcc |
2722 | +++ b/config/arm/arm64_stingray_linux_gcc |
2723 | @@ -1,6 +1,6 @@ |
2724 | [binaries] |
2725 | c = 'aarch64-linux-gnu-gcc' |
2726 | -cpp = 'aarch64-linux-gnu-cpp' |
2727 | +cpp = 'aarch64-linux-gnu-g++' |
2728 | ar = 'aarch64-linux-gnu-gcc-ar' |
2729 | strip = 'aarch64-linux-gnu-strip' |
2730 | pkgconfig = 'aarch64-linux-gnu-pkg-config' |
2731 | diff --git a/config/arm/arm64_thunderx2_linux_gcc b/config/arm/arm64_thunderx2_linux_gcc |
2732 | index 69c71cb..616f6c2 100644 |
2733 | --- a/config/arm/arm64_thunderx2_linux_gcc |
2734 | +++ b/config/arm/arm64_thunderx2_linux_gcc |
2735 | @@ -1,6 +1,6 @@ |
2736 | [binaries] |
2737 | c = 'aarch64-linux-gnu-gcc' |
2738 | -cpp = 'aarch64-linux-gnu-cpp' |
2739 | +cpp = 'aarch64-linux-gnu-g++' |
2740 | ar = 'aarch64-linux-gnu-gcc-ar' |
2741 | strip = 'aarch64-linux-gnu-strip' |
2742 | pkgconfig = 'aarch64-linux-gnu-pkg-config' |
2743 | diff --git a/config/arm/arm64_thunderxt88_linux_gcc b/config/arm/arm64_thunderxt88_linux_gcc |
2744 | index 372097b..131f564 100644 |
2745 | --- a/config/arm/arm64_thunderxt88_linux_gcc |
2746 | +++ b/config/arm/arm64_thunderxt88_linux_gcc |
2747 | @@ -1,6 +1,6 @@ |
2748 | [binaries] |
2749 | c = 'aarch64-linux-gnu-gcc' |
2750 | -cpp = 'aarch64-linux-gnu-cpp' |
2751 | +cpp = 'aarch64-linux-gnu-g++' |
2752 | ar = 'aarch64-linux-gnu-gcc-ar' |
2753 | strip = 'aarch64-linux-gnu-strip' |
2754 | pkgconfig = 'aarch64-linux-gnu-pkg-config' |
2755 | diff --git a/config/ppc/ppc64le-power8-linux-gcc b/config/ppc/ppc64le-power8-linux-gcc |
2756 | index 51f7cee..784c33d 100644 |
2757 | --- a/config/ppc/ppc64le-power8-linux-gcc |
2758 | +++ b/config/ppc/ppc64le-power8-linux-gcc |
2759 | @@ -1,6 +1,6 @@ |
2760 | [binaries] |
2761 | c = 'powerpc64le-linux-gcc' |
2762 | -cpp = 'powerpc64le-linux-cpp' |
2763 | +cpp = 'powerpc64le-linux-g++' |
2764 | ar = 'powerpc64le-linux-gcc-ar' |
2765 | strip = 'powerpc64le-linux-strip' |
2766 | |
2767 | diff --git a/debian/changelog b/debian/changelog |
2768 | index bccff53..462d57e 100644 |
2769 | --- a/debian/changelog |
2770 | +++ b/debian/changelog |
2771 | @@ -1,3 +1,14 @@ |
2772 | +dpdk (21.11.2-0ubuntu1) kinetic; urgency=medium |
2773 | + |
2774 | + * Merge LTS stable release 21.11.2 (LP: #1975764) |
2775 | + - Among many general fixed this adresses two CVEs: |
2776 | + + vhost: DoS triggered by sending a crafted Vhost header (CVE-2022-2132) |
2777 | + + net/mlx5: bad error recovery can lead to DoS (CVE-2022-28199) |
2778 | + - Full release notes are available at: |
2779 | + https://doc.dpdk.org/guides-21.11/rel_notes/release_21_11.html#id1 |
2780 | + |
2781 | + -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Thu, 08 Sep 2022 10:18:45 +0200 |
2782 | + |
2783 | dpdk (21.11.1-0ubuntu0.3) jammy-security; urgency=medium |
2784 | |
2785 | * Merge LTS stable release 21.11.1 |
2786 | diff --git a/devtools/test-null.sh b/devtools/test-null.sh |
2787 | index 4ba57a6..6cd34f6 100755 |
2788 | --- a/devtools/test-null.sh |
2789 | +++ b/devtools/test-null.sh |
2790 | @@ -27,6 +27,7 @@ else |
2791 | fi |
2792 | |
2793 | (sleep 1 && echo stop) | |
2794 | -$testpmd -c $coremask --no-huge -m 20 \ |
2795 | +# testpmd only needs 20M, make it x2 (default number of cores) for NUMA systems |
2796 | +$testpmd -c $coremask --no-huge -m 40 \ |
2797 | $libs -a 0:0.0 --vdev net_null1 --vdev net_null2 $eal_options -- \ |
2798 | --no-mlockall --total-num-mbufs=2048 $testpmd_options -ia |
2799 | diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md |
2800 | index 4245b96..baecb2e 100644 |
2801 | --- a/doc/api/doxy-api-index.md |
2802 | +++ b/doc/api/doxy-api-index.md |
2803 | @@ -9,222 +9,222 @@ API |
2804 | The public API headers are grouped by topics: |
2805 | |
2806 | - **device**: |
2807 | - [dev] (@ref rte_dev.h), |
2808 | - [ethdev] (@ref rte_ethdev.h), |
2809 | - [ethctrl] (@ref rte_eth_ctrl.h), |
2810 | - [rte_flow] (@ref rte_flow.h), |
2811 | - [rte_tm] (@ref rte_tm.h), |
2812 | - [rte_mtr] (@ref rte_mtr.h), |
2813 | - [bbdev] (@ref rte_bbdev.h), |
2814 | - [cryptodev] (@ref rte_cryptodev.h), |
2815 | - [security] (@ref rte_security.h), |
2816 | - [compressdev] (@ref rte_compressdev.h), |
2817 | - [compress] (@ref rte_comp.h), |
2818 | - [regexdev] (@ref rte_regexdev.h), |
2819 | - [dmadev] (@ref rte_dmadev.h), |
2820 | - [eventdev] (@ref rte_eventdev.h), |
2821 | - [event_eth_rx_adapter] (@ref rte_event_eth_rx_adapter.h), |
2822 | - [event_eth_tx_adapter] (@ref rte_event_eth_tx_adapter.h), |
2823 | - [event_timer_adapter] (@ref rte_event_timer_adapter.h), |
2824 | - [event_crypto_adapter] (@ref rte_event_crypto_adapter.h), |
2825 | - [rawdev] (@ref rte_rawdev.h), |
2826 | - [metrics] (@ref rte_metrics.h), |
2827 | - [bitrate] (@ref rte_bitrate.h), |
2828 | - [latency] (@ref rte_latencystats.h), |
2829 | - [devargs] (@ref rte_devargs.h), |
2830 | - [PCI] (@ref rte_pci.h), |
2831 | - [vdev] (@ref rte_bus_vdev.h), |
2832 | - [vfio] (@ref rte_vfio.h) |
2833 | + [dev](@ref rte_dev.h), |
2834 | + [ethdev](@ref rte_ethdev.h), |
2835 | + [ethctrl](@ref rte_eth_ctrl.h), |
2836 | + [rte_flow](@ref rte_flow.h), |
2837 | + [rte_tm](@ref rte_tm.h), |
2838 | + [rte_mtr](@ref rte_mtr.h), |
2839 | + [bbdev](@ref rte_bbdev.h), |
2840 | + [cryptodev](@ref rte_cryptodev.h), |
2841 | + [security](@ref rte_security.h), |
2842 | + [compressdev](@ref rte_compressdev.h), |
2843 | + [compress](@ref rte_comp.h), |
2844 | + [regexdev](@ref rte_regexdev.h), |
2845 | + [dmadev](@ref rte_dmadev.h), |
2846 | + [eventdev](@ref rte_eventdev.h), |
2847 | + [event_eth_rx_adapter](@ref rte_event_eth_rx_adapter.h), |
2848 | + [event_eth_tx_adapter](@ref rte_event_eth_tx_adapter.h), |
2849 | + [event_timer_adapter](@ref rte_event_timer_adapter.h), |
2850 | + [event_crypto_adapter](@ref rte_event_crypto_adapter.h), |
2851 | + [rawdev](@ref rte_rawdev.h), |
2852 | + [metrics](@ref rte_metrics.h), |
2853 | + [bitrate](@ref rte_bitrate.h), |
2854 | + [latency](@ref rte_latencystats.h), |
2855 | + [devargs](@ref rte_devargs.h), |
2856 | + [PCI](@ref rte_pci.h), |
2857 | + [vdev](@ref rte_bus_vdev.h), |
2858 | + [vfio](@ref rte_vfio.h) |
2859 | |
2860 | - **device specific**: |
2861 | - [softnic] (@ref rte_eth_softnic.h), |
2862 | - [bond] (@ref rte_eth_bond.h), |
2863 | - [vhost] (@ref rte_vhost.h), |
2864 | - [vdpa] (@ref rte_vdpa.h), |
2865 | - [KNI] (@ref rte_kni.h), |
2866 | - [ixgbe] (@ref rte_pmd_ixgbe.h), |
2867 | - [i40e] (@ref rte_pmd_i40e.h), |
2868 | - [ice] (@ref rte_pmd_ice.h), |
2869 | - [iavf] (@ref rte_pmd_iavf.h), |
2870 | - [ioat] (@ref rte_ioat_rawdev.h), |
2871 | - [bnxt] (@ref rte_pmd_bnxt.h), |
2872 | - [dpaa] (@ref rte_pmd_dpaa.h), |
2873 | - [dpaa2] (@ref rte_pmd_dpaa2.h), |
2874 | - [mlx5] (@ref rte_pmd_mlx5.h), |
2875 | - [dpaa2_mempool] (@ref rte_dpaa2_mempool.h), |
2876 | - [dpaa2_cmdif] (@ref rte_pmd_dpaa2_cmdif.h), |
2877 | - [dpaa2_qdma] (@ref rte_pmd_dpaa2_qdma.h), |
2878 | - [crypto_scheduler] (@ref rte_cryptodev_scheduler.h), |
2879 | - [dlb2] (@ref rte_pmd_dlb2.h), |
2880 | - [ifpga] (@ref rte_pmd_ifpga.h) |
2881 | + [softnic](@ref rte_eth_softnic.h), |
2882 | + [bond](@ref rte_eth_bond.h), |
2883 | + [vhost](@ref rte_vhost.h), |
2884 | + [vdpa](@ref rte_vdpa.h), |
2885 | + [KNI](@ref rte_kni.h), |
2886 | + [ixgbe](@ref rte_pmd_ixgbe.h), |
2887 | + [i40e](@ref rte_pmd_i40e.h), |
2888 | + [ice](@ref rte_pmd_ice.h), |
2889 | + [iavf](@ref rte_pmd_iavf.h), |
2890 | + [ioat](@ref rte_ioat_rawdev.h), |
2891 | + [bnxt](@ref rte_pmd_bnxt.h), |
2892 | + [dpaa](@ref rte_pmd_dpaa.h), |
2893 | + [dpaa2](@ref rte_pmd_dpaa2.h), |
2894 | + [mlx5](@ref rte_pmd_mlx5.h), |
2895 | + [dpaa2_mempool](@ref rte_dpaa2_mempool.h), |
2896 | + [dpaa2_cmdif](@ref rte_pmd_dpaa2_cmdif.h), |
2897 | + [dpaa2_qdma](@ref rte_pmd_dpaa2_qdma.h), |
2898 | + [crypto_scheduler](@ref rte_cryptodev_scheduler.h), |
2899 | + [dlb2](@ref rte_pmd_dlb2.h), |
2900 | + [ifpga](@ref rte_pmd_ifpga.h) |
2901 | |
2902 | - **memory**: |
2903 | - [memseg] (@ref rte_memory.h), |
2904 | - [memzone] (@ref rte_memzone.h), |
2905 | - [mempool] (@ref rte_mempool.h), |
2906 | - [malloc] (@ref rte_malloc.h), |
2907 | - [memcpy] (@ref rte_memcpy.h) |
2908 | + [memseg](@ref rte_memory.h), |
2909 | + [memzone](@ref rte_memzone.h), |
2910 | + [mempool](@ref rte_mempool.h), |
2911 | + [malloc](@ref rte_malloc.h), |
2912 | + [memcpy](@ref rte_memcpy.h) |
2913 | |
2914 | - **timers**: |
2915 | - [cycles] (@ref rte_cycles.h), |
2916 | - [timer] (@ref rte_timer.h), |
2917 | - [alarm] (@ref rte_alarm.h) |
2918 | + [cycles](@ref rte_cycles.h), |
2919 | + [timer](@ref rte_timer.h), |
2920 | + [alarm](@ref rte_alarm.h) |
2921 | |
2922 | - **locks**: |
2923 | - [atomic] (@ref rte_atomic.h), |
2924 | - [mcslock] (@ref rte_mcslock.h), |
2925 | - [pflock] (@ref rte_pflock.h), |
2926 | - [rwlock] (@ref rte_rwlock.h), |
2927 | - [spinlock] (@ref rte_spinlock.h), |
2928 | - [ticketlock] (@ref rte_ticketlock.h), |
2929 | - [RCU] (@ref rte_rcu_qsbr.h) |
2930 | + [atomic](@ref rte_atomic.h), |
2931 | + [mcslock](@ref rte_mcslock.h), |
2932 | + [pflock](@ref rte_pflock.h), |
2933 | + [rwlock](@ref rte_rwlock.h), |
2934 | + [spinlock](@ref rte_spinlock.h), |
2935 | + [ticketlock](@ref rte_ticketlock.h), |
2936 | + [RCU](@ref rte_rcu_qsbr.h) |
2937 | |
2938 | - **CPU arch**: |
2939 | - [branch prediction] (@ref rte_branch_prediction.h), |
2940 | - [cache prefetch] (@ref rte_prefetch.h), |
2941 | - [SIMD] (@ref rte_vect.h), |
2942 | - [byte order] (@ref rte_byteorder.h), |
2943 | - [CPU flags] (@ref rte_cpuflags.h), |
2944 | - [CPU pause] (@ref rte_pause.h), |
2945 | - [I/O access] (@ref rte_io.h), |
2946 | - [power management] (@ref rte_power_intrinsics.h) |
2947 | + [branch prediction](@ref rte_branch_prediction.h), |
2948 | + [cache prefetch](@ref rte_prefetch.h), |
2949 | + [SIMD](@ref rte_vect.h), |
2950 | + [byte order](@ref rte_byteorder.h), |
2951 | + [CPU flags](@ref rte_cpuflags.h), |
2952 | + [CPU pause](@ref rte_pause.h), |
2953 | + [I/O access](@ref rte_io.h), |
2954 | + [power management](@ref rte_power_intrinsics.h) |
2955 | |
2956 | - **CPU multicore**: |
2957 | - [interrupts] (@ref rte_interrupts.h), |
2958 | - [launch] (@ref rte_launch.h), |
2959 | - [lcore] (@ref rte_lcore.h), |
2960 | - [per-lcore] (@ref rte_per_lcore.h), |
2961 | - [service cores] (@ref rte_service.h), |
2962 | - [keepalive] (@ref rte_keepalive.h), |
2963 | - [power/freq] (@ref rte_power.h), |
2964 | - [PMD power] (@ref rte_power_pmd_mgmt.h) |
2965 | + [interrupts](@ref rte_interrupts.h), |
2966 | + [launch](@ref rte_launch.h), |
2967 | + [lcore](@ref rte_lcore.h), |
2968 | + [per-lcore](@ref rte_per_lcore.h), |
2969 | + [service cores](@ref rte_service.h), |
2970 | + [keepalive](@ref rte_keepalive.h), |
2971 | + [power/freq](@ref rte_power.h), |
2972 | + [PMD power](@ref rte_power_pmd_mgmt.h) |
2973 | |
2974 | - **layers**: |
2975 | - [ethernet] (@ref rte_ether.h), |
2976 | - [ARP] (@ref rte_arp.h), |
2977 | - [HIGIG] (@ref rte_higig.h), |
2978 | - [ICMP] (@ref rte_icmp.h), |
2979 | - [ESP] (@ref rte_esp.h), |
2980 | - [IPsec] (@ref rte_ipsec.h), |
2981 | - [IPsec group] (@ref rte_ipsec_group.h), |
2982 | - [IPsec SA] (@ref rte_ipsec_sa.h), |
2983 | - [IPsec SAD] (@ref rte_ipsec_sad.h), |
2984 | - [IP] (@ref rte_ip.h), |
2985 | - [frag/reass] (@ref rte_ip_frag.h), |
2986 | - [SCTP] (@ref rte_sctp.h), |
2987 | - [TCP] (@ref rte_tcp.h), |
2988 | - [UDP] (@ref rte_udp.h), |
2989 | - [GTP] (@ref rte_gtp.h), |
2990 | - [GRO] (@ref rte_gro.h), |
2991 | - [GSO] (@ref rte_gso.h), |
2992 | - [GRE] (@ref rte_gre.h), |
2993 | - [MPLS] (@ref rte_mpls.h), |
2994 | - [VXLAN] (@ref rte_vxlan.h), |
2995 | - [Geneve] (@ref rte_geneve.h), |
2996 | - [eCPRI] (@ref rte_ecpri.h), |
2997 | - [L2TPv2] (@ref rte_l2tpv2.h), |
2998 | - [PPP] (@ref rte_ppp.h) |
2999 | + [ethernet](@ref rte_ether.h), |
3000 | + [ARP](@ref rte_arp.h), |
3001 | + [HIGIG](@ref rte_higig.h), |
3002 | + [ICMP](@ref rte_icmp.h), |
3003 | + [ESP](@ref rte_esp.h), |
3004 | + [IPsec](@ref rte_ipsec.h), |
3005 | + [IPsec group](@ref rte_ipsec_group.h), |
3006 | + [IPsec SA](@ref rte_ipsec_sa.h), |
3007 | + [IPsec SAD](@ref rte_ipsec_sad.h), |
3008 | + [IP](@ref rte_ip.h), |
3009 | + [frag/reass](@ref rte_ip_frag.h), |
3010 | + [SCTP](@ref rte_sctp.h), |
3011 | + [TCP](@ref rte_tcp.h), |
3012 | + [UDP](@ref rte_udp.h), |
3013 | + [GTP](@ref rte_gtp.h), |
3014 | + [GRO](@ref rte_gro.h), |
3015 | + [GSO](@ref rte_gso.h), |
3016 | + [GRE](@ref rte_gre.h), |
3017 | + [MPLS](@ref rte_mpls.h), |
3018 | + [VXLAN](@ref rte_vxlan.h), |
3019 | + [Geneve](@ref rte_geneve.h), |
3020 | + [eCPRI](@ref rte_ecpri.h), |
3021 | + [L2TPv2](@ref rte_l2tpv2.h), |
3022 | + [PPP](@ref rte_ppp.h) |
3023 | |
3024 | - **QoS**: |
3025 | - [metering] (@ref rte_meter.h), |
3026 | - [scheduler] (@ref rte_sched.h), |
3027 | - [RED congestion] (@ref rte_red.h) |
3028 | + [metering](@ref rte_meter.h), |
3029 | + [scheduler](@ref rte_sched.h), |
3030 | + [RED congestion](@ref rte_red.h) |
3031 | |
3032 | - **routing**: |
3033 | - [LPM IPv4 route] (@ref rte_lpm.h), |
3034 | - [LPM IPv6 route] (@ref rte_lpm6.h), |
3035 | - [RIB IPv4] (@ref rte_rib.h), |
3036 | - [RIB IPv6] (@ref rte_rib6.h), |
3037 | - [FIB IPv4] (@ref rte_fib.h), |
3038 | - [FIB IPv6] (@ref rte_fib6.h) |
3039 | + [LPM IPv4 route](@ref rte_lpm.h), |
3040 | + [LPM IPv6 route](@ref rte_lpm6.h), |
3041 | + [RIB IPv4](@ref rte_rib.h), |
3042 | + [RIB IPv6](@ref rte_rib6.h), |
3043 | + [FIB IPv4](@ref rte_fib.h), |
3044 | + [FIB IPv6](@ref rte_fib6.h) |
3045 | |
3046 | - **hashes**: |
3047 | - [hash] (@ref rte_hash.h), |
3048 | - [jhash] (@ref rte_jhash.h), |
3049 | - [thash] (@ref rte_thash.h), |
3050 | - [thash_gfni] (@ref rte_thash_gfni.h), |
3051 | - [FBK hash] (@ref rte_fbk_hash.h), |
3052 | - [CRC hash] (@ref rte_hash_crc.h) |
3053 | + [hash](@ref rte_hash.h), |
3054 | + [jhash](@ref rte_jhash.h), |
3055 | + [thash](@ref rte_thash.h), |
3056 | + [thash_gfni](@ref rte_thash_gfni.h), |
3057 | + [FBK hash](@ref rte_fbk_hash.h), |
3058 | + [CRC hash](@ref rte_hash_crc.h) |
3059 | |
3060 | - **classification** |
3061 | - [reorder] (@ref rte_reorder.h), |
3062 | - [distributor] (@ref rte_distributor.h), |
3063 | - [EFD] (@ref rte_efd.h), |
3064 | - [ACL] (@ref rte_acl.h), |
3065 | - [member] (@ref rte_member.h), |
3066 | - [flow classify] (@ref rte_flow_classify.h), |
3067 | - [BPF] (@ref rte_bpf.h) |
3068 | + [reorder](@ref rte_reorder.h), |
3069 | + [distributor](@ref rte_distributor.h), |
3070 | + [EFD](@ref rte_efd.h), |
3071 | + [ACL](@ref rte_acl.h), |
3072 | + [member](@ref rte_member.h), |
3073 | + [flow classify](@ref rte_flow_classify.h), |
3074 | + [BPF](@ref rte_bpf.h) |
3075 | |
3076 | - **containers**: |
3077 | - [mbuf] (@ref rte_mbuf.h), |
3078 | - [mbuf pool ops] (@ref rte_mbuf_pool_ops.h), |
3079 | - [ring] (@ref rte_ring.h), |
3080 | - [stack] (@ref rte_stack.h), |
3081 | - [tailq] (@ref rte_tailq.h), |
3082 | - [bitmap] (@ref rte_bitmap.h) |
3083 | + [mbuf](@ref rte_mbuf.h), |
3084 | + [mbuf pool ops](@ref rte_mbuf_pool_ops.h), |
3085 | + [ring](@ref rte_ring.h), |
3086 | + [stack](@ref rte_stack.h), |
3087 | + [tailq](@ref rte_tailq.h), |
3088 | + [bitmap](@ref rte_bitmap.h) |
3089 | |
3090 | - **packet framework**: |
3091 | - * [port] (@ref rte_port.h): |
3092 | - [ethdev] (@ref rte_port_ethdev.h), |
3093 | - [ring] (@ref rte_port_ring.h), |
3094 | - [frag] (@ref rte_port_frag.h), |
3095 | - [reass] (@ref rte_port_ras.h), |
3096 | - [sched] (@ref rte_port_sched.h), |
3097 | - [kni] (@ref rte_port_kni.h), |
3098 | - [src/sink] (@ref rte_port_source_sink.h) |
3099 | - * [table] (@ref rte_table.h): |
3100 | - [lpm IPv4] (@ref rte_table_lpm.h), |
3101 | - [lpm IPv6] (@ref rte_table_lpm_ipv6.h), |
3102 | - [ACL] (@ref rte_table_acl.h), |
3103 | - [hash] (@ref rte_table_hash.h), |
3104 | - [array] (@ref rte_table_array.h), |
3105 | - [stub] (@ref rte_table_stub.h) |
3106 | - * [pipeline] (@ref rte_pipeline.h) |
3107 | - [port_in_action] (@ref rte_port_in_action.h) |
3108 | - [table_action] (@ref rte_table_action.h) |
3109 | + * [port](@ref rte_port.h): |
3110 | + [ethdev](@ref rte_port_ethdev.h), |
3111 | + [ring](@ref rte_port_ring.h), |
3112 | + [frag](@ref rte_port_frag.h), |
3113 | + [reass](@ref rte_port_ras.h), |
3114 | + [sched](@ref rte_port_sched.h), |
3115 | + [kni](@ref rte_port_kni.h), |
3116 | + [src/sink](@ref rte_port_source_sink.h) |
3117 | + * [table](@ref rte_table.h): |
3118 | + [lpm IPv4](@ref rte_table_lpm.h), |
3119 | + [lpm IPv6](@ref rte_table_lpm_ipv6.h), |
3120 | + [ACL](@ref rte_table_acl.h), |
3121 | + [hash](@ref rte_table_hash.h), |
3122 | + [array](@ref rte_table_array.h), |
3123 | + [stub](@ref rte_table_stub.h) |
3124 | + * [pipeline](@ref rte_pipeline.h) |
3125 | + [port_in_action](@ref rte_port_in_action.h) |
3126 | + [table_action](@ref rte_table_action.h) |
3127 | * SWX pipeline: |
3128 | - [control] (@ref rte_swx_ctl.h), |
3129 | - [extern] (@ref rte_swx_extern.h), |
3130 | - [pipeline] (@ref rte_swx_pipeline.h) |
3131 | + [control](@ref rte_swx_ctl.h), |
3132 | + [extern](@ref rte_swx_extern.h), |
3133 | + [pipeline](@ref rte_swx_pipeline.h) |
3134 | * SWX port: |
3135 | - [port] (@ref rte_swx_port.h), |
3136 | - [ethdev] (@ref rte_swx_port_ethdev.h), |
3137 | - [fd] (@ref rte_swx_port_fd.h), |
3138 | - [ring] (@ref rte_swx_port_ring.h), |
3139 | - [src/sink] (@ref rte_swx_port_source_sink.h) |
3140 | + [port](@ref rte_swx_port.h), |
3141 | + [ethdev](@ref rte_swx_port_ethdev.h), |
3142 | + [fd](@ref rte_swx_port_fd.h), |
3143 | + [ring](@ref rte_swx_port_ring.h), |
3144 | + [src/sink](@ref rte_swx_port_source_sink.h) |
3145 | * SWX table: |
3146 | - [table] (@ref rte_swx_table.h), |
3147 | - [table_em] (@ref rte_swx_table_em.h) |
3148 | - [table_wm] (@ref rte_swx_table_wm.h) |
3149 | - * [graph] (@ref rte_graph.h): |
3150 | - [graph_worker] (@ref rte_graph_worker.h) |
3151 | + [table](@ref rte_swx_table.h), |
3152 | + [table_em](@ref rte_swx_table_em.h) |
3153 | + [table_wm](@ref rte_swx_table_wm.h) |
3154 | + * [graph](@ref rte_graph.h): |
3155 | + [graph_worker](@ref rte_graph_worker.h) |
3156 | * graph_nodes: |
3157 | - [eth_node] (@ref rte_node_eth_api.h), |
3158 | - [ip4_node] (@ref rte_node_ip4_api.h) |
3159 | + [eth_node](@ref rte_node_eth_api.h), |
3160 | + [ip4_node](@ref rte_node_ip4_api.h) |
3161 | |
3162 | - **basic**: |
3163 | - [bitops] (@ref rte_bitops.h), |
3164 | - [approx fraction] (@ref rte_approx.h), |
3165 | - [random] (@ref rte_random.h), |
3166 | - [config file] (@ref rte_cfgfile.h), |
3167 | - [key/value args] (@ref rte_kvargs.h), |
3168 | - [string] (@ref rte_string_fns.h) |
3169 | + [bitops](@ref rte_bitops.h), |
3170 | + [approx fraction](@ref rte_approx.h), |
3171 | + [random](@ref rte_random.h), |
3172 | + [config file](@ref rte_cfgfile.h), |
3173 | + [key/value args](@ref rte_kvargs.h), |
3174 | + [string](@ref rte_string_fns.h) |
3175 | |
3176 | - **debug**: |
3177 | - [jobstats] (@ref rte_jobstats.h), |
3178 | - [telemetry] (@ref rte_telemetry.h), |
3179 | - [pcapng] (@ref rte_pcapng.h), |
3180 | - [pdump] (@ref rte_pdump.h), |
3181 | - [hexdump] (@ref rte_hexdump.h), |
3182 | - [debug] (@ref rte_debug.h), |
3183 | - [log] (@ref rte_log.h), |
3184 | - [errno] (@ref rte_errno.h), |
3185 | - [trace] (@ref rte_trace.h), |
3186 | - [trace_point] (@ref rte_trace_point.h) |
3187 | + [jobstats](@ref rte_jobstats.h), |
3188 | + [telemetry](@ref rte_telemetry.h), |
3189 | + [pcapng](@ref rte_pcapng.h), |
3190 | + [pdump](@ref rte_pdump.h), |
3191 | + [hexdump](@ref rte_hexdump.h), |
3192 | + [debug](@ref rte_debug.h), |
3193 | + [log](@ref rte_log.h), |
3194 | + [errno](@ref rte_errno.h), |
3195 | + [trace](@ref rte_trace.h), |
3196 | + [trace_point](@ref rte_trace_point.h) |
3197 | |
3198 | - **misc**: |
3199 | - [EAL config] (@ref rte_eal.h), |
3200 | - [common] (@ref rte_common.h), |
3201 | - [experimental APIs] (@ref rte_compat.h), |
3202 | - [ABI versioning] (@ref rte_function_versioning.h), |
3203 | - [version] (@ref rte_version.h) |
3204 | + [EAL config](@ref rte_eal.h), |
3205 | + [common](@ref rte_common.h), |
3206 | + [experimental APIs](@ref rte_compat.h), |
3207 | + [ABI versioning](@ref rte_function_versioning.h), |
3208 | + [version](@ref rte_version.h) |
3209 | diff --git a/doc/guides/eventdevs/features/dlb2.ini b/doc/guides/eventdevs/features/dlb2.ini |
3210 | index 29747b1..48a2a18 100644 |
3211 | --- a/doc/guides/eventdevs/features/dlb2.ini |
3212 | +++ b/doc/guides/eventdevs/features/dlb2.ini |
3213 | @@ -4,12 +4,13 @@ |
3214 | ; Refer to default.ini for the full list of available PMD features. |
3215 | ; |
3216 | [Scheduling Features] |
3217 | -queue_qos = Y |
3218 | event_qos = Y |
3219 | distributed_sched = Y |
3220 | queue_all_types = Y |
3221 | burst_mode = Y |
3222 | implicit_release_disable = Y |
3223 | +runtime_port_link = Y |
3224 | +multiple_queue_port = Y |
3225 | maintenance_free = Y |
3226 | |
3227 | [Eth Rx adapter Features] |
3228 | diff --git a/doc/guides/linux_gsg/enable_func.rst b/doc/guides/linux_gsg/enable_func.rst |
3229 | index 25f87f6..7538d04 100644 |
3230 | --- a/doc/guides/linux_gsg/enable_func.rst |
3231 | +++ b/doc/guides/linux_gsg/enable_func.rst |
3232 | @@ -66,13 +66,62 @@ The application can then determine what action to take, if any, if the HPET is n |
3233 | Running DPDK Applications Without Root Privileges |
3234 | ------------------------------------------------- |
3235 | |
3236 | -In order to run DPDK as non-root, the following Linux filesystem objects' |
3237 | -permissions should be adjusted to ensure that the Linux account being used to |
3238 | -run the DPDK application has access to them: |
3239 | +The following sections describe generic requirements and configuration |
3240 | +for running DPDK applications as non-root. |
3241 | +There may be additional requirements documented for some drivers. |
3242 | |
3243 | -* All directories which serve as hugepage mount points, for example, ``/dev/hugepages`` |
3244 | +Hugepages |
3245 | +~~~~~~~~~ |
3246 | |
3247 | -* If the HPET is to be used, ``/dev/hpet`` |
3248 | +Hugepages must be reserved as root before running the application as non-root, |
3249 | +for example:: |
3250 | + |
3251 | + sudo dpdk-hugepages.py --reserve 1G |
3252 | + |
3253 | +If multi-process is not required, running with ``--in-memory`` |
3254 | +bypasses the need to access hugepage mount point and files within it. |
3255 | +Otherwise, hugepage directory must be made accessible |
3256 | +for writing to the unprivileged user. |
3257 | +A good way for managing multiple applications using hugepages |
3258 | +is to mount the filesystem with group permissions |
3259 | +and add a supplementary group to each application or container. |
3260 | + |
3261 | +One option is to mount manually:: |
3262 | + |
3263 | + mount -t hugetlbfs -o pagesize=1G,uid=`id -u`,gid=`id -g` nodev $HOME/huge-1G |
3264 | + |
3265 | +In production environment, the OS can manage mount points |
3266 | +(`systemd example <https://github.com/systemd/systemd/blob/main/units/dev-hugepages.mount>`_). |
3267 | + |
3268 | +The ``hugetlb`` filesystem has additional options to guarantee or limit |
3269 | +the amount of memory that is possible to allocate using the mount point. |
3270 | +Refer to the `documentation <https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt>`_. |
3271 | + |
3272 | +.. note:: |
3273 | + |
3274 | + Using ``vfio-pci`` kernel driver, if applicable, can eliminate the need |
3275 | + for physical addresses and therefore eliminate the permission requirements |
3276 | + described below. |
3277 | + |
3278 | +If the driver requires using physical addresses (PA), |
3279 | +the executable file must be granted additional capabilities: |
3280 | + |
3281 | +* ``SYS_ADMIN`` to read ``/proc/self/pagemaps`` |
3282 | +* ``IPC_LOCK`` to lock hugepages in memory |
3283 | + |
3284 | +.. code-block:: console |
3285 | + |
3286 | + setcap cap_ipc_lock,cap_sys_admin+ep <executable> |
3287 | + |
3288 | +If physical addresses are not accessible, |
3289 | +the following message will appear during EAL initialization:: |
3290 | + |
3291 | + EAL: rte_mem_virt2phy(): cannot open /proc/self/pagemap: Permission denied |
3292 | + |
3293 | +It is harmless in case PA are not needed. |
3294 | + |
3295 | +Resource Limits |
3296 | +~~~~~~~~~~~~~~~ |
3297 | |
3298 | When running as non-root user, there may be some additional resource limits |
3299 | that are imposed by the system. Specifically, the following resource limits may |
3300 | @@ -87,8 +136,10 @@ need to be adjusted in order to ensure normal DPDK operation: |
3301 | The above limits can usually be adjusted by editing |
3302 | ``/etc/security/limits.conf`` file, and rebooting. |
3303 | |
3304 | -Additionally, depending on which kernel driver is in use, the relevant |
3305 | -resources also should be accessible by the user running the DPDK application. |
3306 | +Device Control |
3307 | +~~~~~~~~~~~~~~ |
3308 | + |
3309 | +If the HPET is to be used, ``/dev/hpet`` permissions must be adjusted. |
3310 | |
3311 | For ``vfio-pci`` kernel driver, the following Linux file system objects' |
3312 | permissions should be adjusted: |
3313 | @@ -98,26 +149,6 @@ permissions should be adjusted: |
3314 | * The directories under ``/dev/vfio`` that correspond to IOMMU group numbers of |
3315 | devices intended to be used by DPDK, for example, ``/dev/vfio/50`` |
3316 | |
3317 | -.. note:: |
3318 | - |
3319 | - The instructions below will allow running DPDK with ``igb_uio`` or |
3320 | - ``uio_pci_generic`` drivers as non-root with older Linux kernel versions. |
3321 | - However, since version 4.0, the kernel does not allow unprivileged processes |
3322 | - to read the physical address information from the pagemaps file, making it |
3323 | - impossible for those processes to be used by non-privileged users. In such |
3324 | - cases, using the VFIO driver is recommended. |
3325 | - |
3326 | -For ``igb_uio`` or ``uio_pci_generic`` kernel drivers, the following Linux file |
3327 | -system objects' permissions should be adjusted: |
3328 | - |
3329 | -* The userspace-io device files in ``/dev``, for example, ``/dev/uio0``, ``/dev/uio1``, and so on |
3330 | - |
3331 | -* The userspace-io sysfs config and resource files, for example for ``uio0``:: |
3332 | - |
3333 | - /sys/class/uio/uio0/device/config |
3334 | - /sys/class/uio/uio0/device/resource* |
3335 | - |
3336 | - |
3337 | Power Management and Power Saving Functionality |
3338 | ----------------------------------------------- |
3339 | |
3340 | diff --git a/doc/guides/nics/af_xdp.rst b/doc/guides/nics/af_xdp.rst |
3341 | index c9d0e1a..db02ea1 100644 |
3342 | --- a/doc/guides/nics/af_xdp.rst |
3343 | +++ b/doc/guides/nics/af_xdp.rst |
3344 | @@ -43,9 +43,7 @@ Prerequisites |
3345 | This is a Linux-specific PMD, thus the following prerequisites apply: |
3346 | |
3347 | * A Linux Kernel (version > v4.18) with XDP sockets configuration enabled; |
3348 | -* libbpf (within kernel version > v5.1-rc4) with latest af_xdp support installed, |
3349 | - User can install libbpf via `make install_lib` && `make install_headers` in |
3350 | - <kernel src tree>/tools/lib/bpf; |
3351 | +* Both libxdp >=v1.2.2 and libbpf libraries installed, or, libbpf <=v0.6.0 |
3352 | * A Kernel bound interface to attach to; |
3353 | * For need_wakeup feature, it requires kernel version later than v5.3-rc1; |
3354 | * For PMD zero copy, it requires kernel version later than v5.4-rc1; |
3355 | @@ -143,4 +141,4 @@ Limitations |
3356 | NAPI context from a watchdog timer instead of from softirqs. More information |
3357 | on this feature can be found at [1]. |
3358 | |
3359 | - [1] https://lwn.net/Articles/837010/ |
3360 | \ No newline at end of file |
3361 | + [1] https://lwn.net/Articles/837010/ |
3362 | diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst |
3363 | index ef91b3a..aedb1af 100644 |
3364 | --- a/doc/guides/nics/i40e.rst |
3365 | +++ b/doc/guides/nics/i40e.rst |
3366 | @@ -101,6 +101,14 @@ For X710/XL710/XXV710, |
3367 | +--------------+-----------------------+------------------+ |
3368 | | DPDK version | Kernel driver version | Firmware version | |
3369 | +==============+=======================+==================+ |
3370 | + | 22.03 | 2.17.15 | 8.30 | |
3371 | + +--------------+-----------------------+------------------+ |
3372 | + | 21.11 | 2.17.4 | 8.30 | |
3373 | + +--------------+-----------------------+------------------+ |
3374 | + | 21.08 | 2.15.9 | 8.30 | |
3375 | + +--------------+-----------------------+------------------+ |
3376 | + | 21.05 | 2.15.9 | 8.30 | |
3377 | + +--------------+-----------------------+------------------+ |
3378 | | 21.02 | 2.14.13 | 8.00 | |
3379 | +--------------+-----------------------+------------------+ |
3380 | | 20.11 | 2.14.13 | 8.00 | |
3381 | @@ -148,6 +156,14 @@ For X722, |
3382 | +--------------+-----------------------+------------------+ |
3383 | | DPDK version | Kernel driver version | Firmware version | |
3384 | +==============+=======================+==================+ |
3385 | + | 22.03 | 2.17.15 | 5.50 | |
3386 | + +--------------+-----------------------+------------------+ |
3387 | + | 21.11 | 2.17.4 | 5.30 | |
3388 | + +--------------+-----------------------+------------------+ |
3389 | + | 21.08 | 2.15.9 | 5.30 | |
3390 | + +--------------+-----------------------+------------------+ |
3391 | + | 21.05 | 2.15.9 | 5.30 | |
3392 | + +--------------+-----------------------+------------------+ |
3393 | | 21.02 | 2.14.13 | 5.00 | |
3394 | +--------------+-----------------------+------------------+ |
3395 | | 20.11 | 2.13.10 | 5.00 | |
3396 | @@ -771,6 +787,13 @@ it will fail and return the info "Conflict with the first rule's input set", |
3397 | which means the current rule's input set conflicts with the first rule's. |
3398 | Remove the first rule if want to change the input set of the PCTYPE. |
3399 | |
3400 | +PF reset fail after QinQ set with FW >= 8.4 |
3401 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3402 | + |
3403 | +If upgrade FW to version 8.4 and higher, after set MAC VLAN filter and configure outer VLAN on PF, kill |
3404 | +DPDK process will cause the card crash. |
3405 | + |
3406 | + |
3407 | Example of getting best performance with l3fwd example |
3408 | ------------------------------------------------------ |
3409 | |
3410 | diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst |
3411 | index a1780c4..6b903b9 100644 |
3412 | --- a/doc/guides/nics/ice.rst |
3413 | +++ b/doc/guides/nics/ice.rst |
3414 | @@ -62,6 +62,8 @@ The detailed information can refer to chapter Tested Platforms/Tested NICs in re |
3415 | +-----------+---------------+-----------------+-----------+--------------+-----------+ |
3416 | | 21.11 | 1.7.16 | 1.3.27 | 1.3.31 | 1.3.7 | 3.1 | |
3417 | +-----------+---------------+-----------------+-----------+--------------+-----------+ |
3418 | + | 22.03 | 1.8.3 | 1.3.28 | 1.3.35 | 1.3.8 | 3.2 | |
3419 | + +-----------+---------------+-----------------+-----------+--------------+-----------+ |
3420 | |
3421 | Pre-Installation Configuration |
3422 | ------------------------------ |
3423 | diff --git a/doc/guides/nics/ixgbe.rst b/doc/guides/nics/ixgbe.rst |
3424 | index 82fa453..ad1a3da 100644 |
3425 | --- a/doc/guides/nics/ixgbe.rst |
3426 | +++ b/doc/guides/nics/ixgbe.rst |
3427 | @@ -101,6 +101,23 @@ To guarantee the constraint, capabilities in dev_conf.rxmode.offloads will be ch |
3428 | |
3429 | fdir_conf->mode will also be checked. |
3430 | |
3431 | +Disable SDP3 TX_DISABLE for Fiber Links |
3432 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
3433 | + |
3434 | +The following ``devargs`` option can be enabled at runtime. It must |
3435 | +be passed as part of EAL arguments. For example, |
3436 | + |
3437 | +.. code-block:: console |
3438 | + |
3439 | + dpdk-testpmd -a fiber_sdp3_no_tx_disable=1 -- -i |
3440 | + |
3441 | +- ``fiber_sdp3_no_tx_disable`` (default **0**) |
3442 | + |
3443 | + Not all IXGBE implementations with SFP cages use the SDP3 signal as |
3444 | + TX_DISABLE as a means to disable the laser on fiber SFP modules. |
3445 | + This option informs the driver that in this case, SDP3 is not to be |
3446 | + used as a check for link up by testing for laser on/off. |
3447 | + |
3448 | VF Runtime Options |
3449 | ^^^^^^^^^^^^^^^^^^ |
3450 | |
3451 | diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst |
3452 | index b3f1673..ce40d1c 100644 |
3453 | --- a/doc/guides/nics/mlx5.rst |
3454 | +++ b/doc/guides/nics/mlx5.rst |
3455 | @@ -360,6 +360,12 @@ Limitations |
3456 | - can be applied to VF ports only. |
3457 | - must specify PF port action (packet redirection from VF to PF). |
3458 | |
3459 | +- E-Switch Manager matching: |
3460 | + |
3461 | + - For Bluefield with old FW |
3462 | + which doesn't expose the E-Switch Manager vport ID in the capability, |
3463 | + matching E-Switch Manager should be used only in Bluefield embedded CPU mode. |
3464 | + |
3465 | - Raw encapsulation: |
3466 | |
3467 | - The input buffer, used as outer header, is not validated. |
3468 | @@ -470,17 +476,18 @@ Limitations |
3469 | |
3470 | - Integrity: |
3471 | |
3472 | - - Integrity offload is enabled for **ConnectX-6** family. |
3473 | + - Integrity offload is enabled starting from **ConnectX-6 Dx**. |
3474 | - Verification bits provided by the hardware are ``l3_ok``, ``ipv4_csum_ok``, ``l4_ok``, ``l4_csum_ok``. |
3475 | - ``level`` value 0 references outer headers. |
3476 | + - Negative integrity item verification is not supported. |
3477 | - Multiple integrity items not supported in a single flow rule. |
3478 | - Flow rule items supplied by application must explicitly specify network headers referred by integrity item. |
3479 | For example, if integrity item mask sets ``l4_ok`` or ``l4_csum_ok`` bits, reference to L4 network header, |
3480 | TCP or UDP, must be in the rule pattern as well:: |
3481 | |
3482 | flow create 0 ingress pattern integrity level is 0 value mask l3_ok value spec l3_ok / eth / ipv6 / end … |
3483 | - or |
3484 | - flow create 0 ingress pattern integrity level is 0 value mask l4_ok value spec 0 / eth / ipv4 proto is udp / end … |
3485 | + |
3486 | + flow create 0 ingress pattern integrity level is 0 value mask l4_ok value spec l4_ok / eth / ipv4 proto is udp / end … |
3487 | |
3488 | - Connection tracking: |
3489 | |
3490 | diff --git a/doc/guides/prog_guide/bpf_lib.rst b/doc/guides/prog_guide/bpf_lib.rst |
3491 | index 1feb773..1cf2d59 100644 |
3492 | --- a/doc/guides/prog_guide/bpf_lib.rst |
3493 | +++ b/doc/guides/prog_guide/bpf_lib.rst |
3494 | @@ -10,7 +10,7 @@ user-space dpdk application. |
3495 | |
3496 | It supports basic set of features from eBPF spec. |
3497 | Please refer to the |
3498 | -`eBPF spec <https://www.kernel.org/doc/Documentation/networking/filter.txt>` |
3499 | +`eBPF spec <https://www.kernel.org/doc/Documentation/networking/filter.txt>`_ |
3500 | for more information. |
3501 | Also it introduces basic framework to load/unload BPF-based filters |
3502 | on eth devices (right now only via SW RX/TX callbacks). |
3503 | @@ -48,9 +48,9 @@ For example, ``(BPF_IND | BPF_W | BPF_LD)`` means: |
3504 | .. code-block:: c |
3505 | |
3506 | uint32_t tmp; |
3507 | - R0 = rte_pktmbuf_read((const struct rte_mbuf *)R6, src_reg + imm32, |
3508 | - sizeof(tmp), &tmp); |
3509 | - if (R0 == NULL) return FAILED; |
3510 | + R0 = rte_pktmbuf_read((const struct rte_mbuf *)R6, src_reg + imm32, sizeof(tmp), &tmp); |
3511 | + if (R0 == NULL) |
3512 | + return FAILED; |
3513 | R0 = ntohl(*(uint32_t *)R0); |
3514 | |
3515 | and ``R1-R5`` were scratched. |
3516 | diff --git a/doc/guides/prog_guide/compressdev.rst b/doc/guides/prog_guide/compressdev.rst |
3517 | index 07d1a62..2a59c43 100644 |
3518 | --- a/doc/guides/prog_guide/compressdev.rst |
3519 | +++ b/doc/guides/prog_guide/compressdev.rst |
3520 | @@ -2,7 +2,7 @@ |
3521 | Copyright(c) 2017-2018 Cavium Networks. |
3522 | |
3523 | Compression Device Library |
3524 | -=========================== |
3525 | +========================== |
3526 | |
3527 | The compression framework provides a generic set of APIs to perform compression services |
3528 | as well as to query and configure compression devices both physical(hardware) and virtual(software) |
3529 | @@ -32,10 +32,10 @@ From the command line using the --vdev EAL option |
3530 | |
3531 | .. Note:: |
3532 | |
3533 | - * If DPDK application requires multiple software compression PMD devices then required |
3534 | - number of ``--vdev`` with appropriate libraries are to be added. |
3535 | + * If a DPDK application requires multiple software compression PMD devices then the |
3536 | + required number of ``--vdev`` args with appropriate libraries are to be added. |
3537 | |
3538 | - * An Application with multiple compression device instances exposed by the same PMD must |
3539 | + * An application with multiple compression device instances exposed by the same PMD must |
3540 | specify a unique name for each device. |
3541 | |
3542 | Example: ``--vdev 'pmd0' --vdev 'pmd1'`` |
3543 | @@ -53,7 +53,7 @@ All virtual compression devices support the following initialization parameters: |
3544 | Device Identification |
3545 | ~~~~~~~~~~~~~~~~~~~~~ |
3546 | |
3547 | -Each device, whether virtual or physical is uniquely designated by two |
3548 | +Each device, whether virtual or physical, is uniquely designated by two |
3549 | identifiers: |
3550 | |
3551 | - A unique device index used to designate the compression device in all functions |
3552 | @@ -76,7 +76,7 @@ The ``rte_compressdev_configure`` API is used to configure a compression device. |
3553 | The ``rte_compressdev_config`` structure is used to pass the configuration |
3554 | parameters. |
3555 | |
3556 | -See *DPDK API Reference* for details. |
3557 | +See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details. |
3558 | |
3559 | Configuration of Queue Pairs |
3560 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3561 | @@ -85,87 +85,88 @@ Each compression device queue pair is individually configured through the |
3562 | ``rte_compressdev_queue_pair_setup`` API. |
3563 | |
3564 | The ``max_inflight_ops`` is used to pass maximum number of |
3565 | -rte_comp_op that could be present in a queue at-a-time. |
3566 | -PMD then can allocate resources accordingly on a specified socket. |
3567 | +``rte_comp_op`` that could be present in a queue at a time. |
3568 | +The PMD can then allocate resources accordingly on a specified socket. |
3569 | |
3570 | -See *DPDK API Reference* for details. |
3571 | +See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details. |
3572 | |
3573 | -Logical Cores, Memory and Queues Pair Relationships |
3574 | -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3575 | +Logical Cores, Memory and Queue Pair Relationships |
3576 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3577 | |
3578 | -Library supports NUMA similarly as described in Cryptodev library section. |
3579 | +The Compressdev library supports NUMA similarly as described in Cryptodev library section. |
3580 | |
3581 | -A queue pair cannot be shared and should be exclusively used by a single processing |
3582 | -context for enqueuing operations or dequeuing operations on the same compression device |
3583 | +A queue pair cannot be shared, and should be exclusively used by a single processing |
3584 | +context for enqueuing operations or dequeuing operations on the same compression device, |
3585 | since sharing would require global locks and hinder performance. It is however possible |
3586 | to use a different logical core to dequeue an operation on a queue pair from the logical |
3587 | -core on which it was enqueued. This means that a compression burst enqueue/dequeue |
3588 | +core on which it was enqueued. This means that for a compression burst, enqueue/dequeue |
3589 | APIs are a logical place to transition from one logical core to another in a |
3590 | data processing pipeline. |
3591 | |
3592 | Device Features and Capabilities |
3593 | ---------------------------------- |
3594 | +-------------------------------- |
3595 | |
3596 | Compression devices define their functionality through two mechanisms, global device |
3597 | -features and algorithm features. Global devices features identify device |
3598 | -wide level features which are applicable to the whole device such as supported hardware |
3599 | +features and algorithm features. Global device features identify device |
3600 | +wide level features which are applicable to the whole device, such as supported hardware |
3601 | acceleration and CPU features. List of compression device features can be seen in the |
3602 | RTE_COMPDEV_FF_XXX macros. |
3603 | |
3604 | -The algorithm features lists individual algo feature which device supports per-algorithm, |
3605 | -such as a stateful compression/decompression, checksums operation etc. List of algorithm |
3606 | -features can be seen in the RTE_COMP_FF_XXX macros. |
3607 | +The algorithm features are features which the device supports per-algorithm, |
3608 | +such as a stateful compression/decompression, checksums operation etc. |
3609 | +The list of algorithm features can be seen in the RTE_COMP_FF_XXX macros. |
3610 | |
3611 | Capabilities |
3612 | ~~~~~~~~~~~~ |
3613 | Each PMD has a list of capabilities, including algorithms listed in |
3614 | -enum ``rte_comp_algorithm`` and its associated feature flag and |
3615 | -sliding window range in log base 2 value. Sliding window tells |
3616 | -the minimum and maximum size of lookup window that algorithm uses |
3617 | +the enum ``rte_comp_algorithm``, its associated feature flag, and |
3618 | +sliding window range in log base 2 value. The sliding window range |
3619 | +defines the minimum and maximum size of a lookup window that an algorithm uses |
3620 | to find duplicates. |
3621 | |
3622 | -See *DPDK API Reference* for details. |
3623 | +See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details. |
3624 | |
3625 | Each Compression poll mode driver defines its array of capabilities |
3626 | -for each algorithm it supports. See PMD implementation for capability |
3627 | +for each algorithm it supports. See the PMD implementation for capability |
3628 | initialization. |
3629 | |
3630 | Capabilities Discovery |
3631 | ~~~~~~~~~~~~~~~~~~~~~~ |
3632 | |
3633 | -PMD capability and features are discovered via ``rte_compressdev_info_get`` function. |
3634 | +PMD capability and features are discovered via the ``rte_compressdev_info_get`` function. |
3635 | |
3636 | The ``rte_compressdev_info`` structure contains all the relevant information for the device. |
3637 | |
3638 | -See *DPDK API Reference* for details. |
3639 | +See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details. |
3640 | |
3641 | Compression Operation |
3642 | ----------------------- |
3643 | +--------------------- |
3644 | |
3645 | DPDK compression supports two types of compression methodologies: |
3646 | |
3647 | -- Stateless, data associated to a compression operation is compressed without any reference |
3648 | +- Stateless - data associated with a compression operation is compressed without any reference |
3649 | to another compression operation. |
3650 | |
3651 | -- Stateful, data in each compression operation is compressed with reference to previous compression |
3652 | +- Stateful - data in each compression operation is compressed with reference to previous compression |
3653 | operations in the same data stream i.e. history of data is maintained between the operations. |
3654 | |
3655 | -For more explanation, please refer RFC https://www.ietf.org/rfc/rfc1951.txt |
3656 | +For more explanation, please refer to the RFC https://www.ietf.org/rfc/rfc1951.txt |
3657 | |
3658 | Operation Representation |
3659 | ~~~~~~~~~~~~~~~~~~~~~~~~ |
3660 | |
3661 | -Compression operation is described via ``struct rte_comp_op``, which contains both input and |
3662 | +A compression operation is described via ``struct rte_comp_op``, which contains both input and |
3663 | output data. The operation structure includes the operation type (stateless or stateful), |
3664 | -the operation status and the priv_xform/stream handle, source, destination and checksum buffer |
3665 | +the operation status, the priv_xform/stream handle, source, destination and checksum buffer |
3666 | pointers. It also contains the source mempool from which the operation is allocated. |
3667 | -PMD updates consumed field with amount of data read from source buffer and produced |
3668 | -field with amount of data of written into destination buffer along with status of |
3669 | -operation. See section *Produced, Consumed And Operation Status* for more details. |
3670 | - |
3671 | -Compression operations mempool also has an ability to allocate private memory with the |
3672 | -operation for application's purposes. Application software is responsible for specifying |
3673 | -all the operation specific fields in the ``rte_comp_op`` structure which are then used |
3674 | +The PMD updates the consumed field with the amount of data read from the source buffer, |
3675 | +and the produced field with the amount of data written into the destination buffer, |
3676 | +along with status of operation. |
3677 | +See the section :ref:`compressdev_prod_cons_op_status`: for more details. |
3678 | + |
3679 | +The compression operations mempool also has the ability to allocate private memory with the |
3680 | +operation for the application's use. The application software is responsible for specifying |
3681 | +all the operation specific fields in the ``rte_comp_op`` structure, which are then used |
3682 | by the compression PMD to process the requested operation. |
3683 | |
3684 | |
3685 | @@ -181,27 +182,27 @@ A ``rte_comp_op`` contains a field indicating the pool it originated from. |
3686 | |
3687 | ``rte_comp_op_alloc()`` and ``rte_comp_op_bulk_alloc()`` are used to allocate |
3688 | compression operations from a given compression operation mempool. |
3689 | -The operation gets reset before being returned to a user so that operation |
3690 | +The operation gets reset before being returned to a user so that the operation |
3691 | is always in a good known state before use by the application. |
3692 | |
3693 | ``rte_comp_op_free()`` is called by the application to return an operation to |
3694 | its allocating pool. |
3695 | |
3696 | -See *DPDK API Reference* for details. |
3697 | +See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details. |
3698 | |
3699 | Passing source data as mbuf-chain |
3700 | -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3701 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3702 | If input data is scattered across several different buffers, then |
3703 | -Application can either parse through all such buffers and make one |
3704 | +the application can either parse through all such buffers and make one |
3705 | mbuf-chain and enqueue it for processing or, alternatively, it can |
3706 | -make multiple sequential enqueue_burst() calls for each of them |
3707 | -processing them statefully. See *Compression API Stateful Operation* |
3708 | +make multiple sequential enqueue_burst() calls for each of them, |
3709 | +processing them statefully. See :ref:`compressdev_stateful_op`: |
3710 | for stateful processing of ops. |
3711 | |
3712 | Operation Status |
3713 | ~~~~~~~~~~~~~~~~ |
3714 | -Each operation carries a status information updated by PMD after it is processed. |
3715 | -Following are currently supported: |
3716 | +Each operation carries status information updated by the PMD after it is processed. |
3717 | +The following are currently supported: |
3718 | |
3719 | - RTE_COMP_OP_STATUS_SUCCESS, |
3720 | Operation is successfully completed |
3721 | @@ -225,22 +226,25 @@ Following are currently supported: |
3722 | - RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE, |
3723 | Output buffer ran out of space before operation completed, but this |
3724 | is not an error case. Output data up to op.produced can be used and |
3725 | - next op in the stream should continue on from op.consumed+1. |
3726 | + the next op in the stream should continue on from op.consumed+1. |
3727 | |
3728 | Operation status after enqueue / dequeue |
3729 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3730 | Some of the above values may arise in the op after an |
3731 | -``rte_compressdev_enqueue_burst()``. If number ops enqueued < number ops requested then |
3732 | -the app should check the op.status of nb_enqd+1. If status is RTE_COMP_OP_STATUS_NOT_PROCESSED, |
3733 | -it likely indicates a full-queue case for a hardware device and a retry after dequeuing some ops is likely |
3734 | -to be successful. If the op holds any other status, e.g. RTE_COMP_OP_STATUS_INVALID_ARGS, a retry with |
3735 | +``rte_compressdev_enqueue_burst()``. If the number of ops enqueued < the number of ops requested |
3736 | +then the app should check the op.status of nb_enqd+1. |
3737 | +If the status is RTE_COMP_OP_STATUS_NOT_PROCESSED, it likely indicates a full-queue case for a |
3738 | +hardware device, and a retry after dequeuing some ops is likely to be successful. |
3739 | +If the op holds any other status, e.g. RTE_COMP_OP_STATUS_INVALID_ARGS, a retry with |
3740 | the same op is unlikely to be successful. |
3741 | |
3742 | |
3743 | +.. _compressdev_prod_cons_op_status: |
3744 | + |
3745 | Produced, Consumed And Operation Status |
3746 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3747 | |
3748 | -- If status is RTE_COMP_OP_STATUS_SUCCESS, |
3749 | +- If the status is RTE_COMP_OP_STATUS_SUCCESS, |
3750 | consumed = amount of data read from input buffer, and |
3751 | produced = amount of data written in destination buffer |
3752 | - If status is RTE_COMP_OP_STATUS_ERROR, |
3753 | @@ -253,37 +257,37 @@ Produced, Consumed And Operation Status |
3754 | - If status is RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE, |
3755 | consumed = amount of data read, and |
3756 | produced = amount of data successfully produced until |
3757 | - out of space condition hit. PMD has ability to recover |
3758 | - from here, so application can submit next op from |
3759 | - consumed+1 and a destination buffer with available space. |
3760 | + out of space condition hit. The PMD has ability to recover |
3761 | + from here, so an application can submit the next op from |
3762 | + consumed+1, and a destination buffer with available space. |
3763 | |
3764 | Transforms |
3765 | ---------- |
3766 | |
3767 | Compression transforms (``rte_comp_xform``) are the mechanism |
3768 | to specify the details of the compression operation such as algorithm, |
3769 | -window size and checksum. |
3770 | +window size, and checksum. |
3771 | |
3772 | Compression API Hash support |
3773 | ---------------------------- |
3774 | |
3775 | -Compression API allows application to enable digest calculation |
3776 | +The compression API allows an application to enable digest calculation |
3777 | alongside compression and decompression of data. A PMD reflects its |
3778 | support for hash algorithms via capability algo feature flags. |
3779 | -If supported, PMD calculates digest always on plaintext i.e. |
3780 | +If supported, the PMD always calculates the digest on plaintext i.e. |
3781 | before compression and after decompression. |
3782 | |
3783 | Currently supported list of hash algos are SHA-1 and SHA2 family |
3784 | SHA256. |
3785 | |
3786 | -See *DPDK API Reference* for details. |
3787 | +See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details. |
3788 | |
3789 | -If required, application should set valid hash algo in compress |
3790 | +If required, the application should set the valid hash algo in compress |
3791 | or decompress xforms during ``rte_compressdev_stream_create()`` |
3792 | -or ``rte_compressdev_private_xform_create()`` and pass a valid |
3793 | +or ``rte_compressdev_private_xform_create()``, and pass a valid |
3794 | output buffer in ``rte_comp_op`` hash field struct to store the |
3795 | -resulting digest. Buffer passed should be contiguous and large |
3796 | -enough to store digest which is 20 bytes for SHA-1 and |
3797 | +resulting digest. The buffer passed should be contiguous and large |
3798 | +enough to store digest, which is 20 bytes for SHA-1 and |
3799 | 32 bytes for SHA2-256. |
3800 | |
3801 | Compression API Stateless operation |
3802 | @@ -295,20 +299,21 @@ An op is processed stateless if it has |
3803 | (required only on compression side), |
3804 | - All required input in source buffer |
3805 | |
3806 | -When all of the above conditions are met, PMD initiates stateless processing |
3807 | +When all of the above conditions are met, the PMD initiates stateless processing |
3808 | and releases acquired resources after processing of current operation is |
3809 | -complete. Application can enqueue multiple stateless ops in a single burst |
3810 | +complete. The application can enqueue multiple stateless ops in a single burst |
3811 | and must attach priv_xform handle to such ops. |
3812 | |
3813 | priv_xform in Stateless operation |
3814 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3815 | |
3816 | -priv_xform is PMD internally managed private data that it maintains to do stateless processing. |
3817 | -priv_xforms are initialized provided a generic xform structure by an application via making call |
3818 | -to ``rte_compressdev_private_xform_create``, at an output PMD returns an opaque priv_xform reference. |
3819 | -If PMD support SHAREABLE priv_xform indicated via algorithm feature flag, then application can |
3820 | -attach same priv_xform with many stateless ops at-a-time. If not, then application needs to |
3821 | -create as many priv_xforms as it expects to have stateless operations in-flight. |
3822 | +A priv_xform is private data managed internally by the PMD to do stateless processing. |
3823 | +A priv_xform is initialized by an application providing a generic xform structure |
3824 | +to ``rte_compressdev_private_xform_create``, which returns an opaque priv_xform reference. |
3825 | +If the PMD supports SHAREABLE priv_xform, indicated via algorithm feature flag, |
3826 | +then the application can attach the same priv_xform with many stateless ops at a time. |
3827 | +If not, then the application needs to create as many priv_xforms as it expects to have |
3828 | +stateless operations in-flight. |
3829 | |
3830 | .. figure:: img/stateless-op.* |
3831 | |
3832 | @@ -320,8 +325,9 @@ create as many priv_xforms as it expects to have stateless operations in-flight. |
3833 | Stateless Ops using Shareable priv_xform |
3834 | |
3835 | |
3836 | -Application should call ``rte_compressdev_private_xform_create()`` and attach to stateless op before |
3837 | -enqueuing them for processing and free via ``rte_compressdev_private_xform_free()`` during termination. |
3838 | +The application should call ``rte_compressdev_private_xform_create()`` and attach it to a stateless |
3839 | +op before enqueuing them for processing and free via ``rte_compressdev_private_xform_free()`` |
3840 | +during termination. |
3841 | |
3842 | An example pseudocode to setup and process NUM_OPS stateless ops with each of length OP_LEN |
3843 | using priv_xform would look like: |
3844 | @@ -399,75 +405,80 @@ using priv_xform would look like: |
3845 | |
3846 | |
3847 | Stateless and OUT_OF_SPACE |
3848 | -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3849 | +~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3850 | |
3851 | -OUT_OF_SPACE is a condition when output buffer runs out of space and where PMD |
3852 | -still has more data to produce. If PMD runs into such condition, then PMD returns |
3853 | -RTE_COMP_OP_OUT_OF_SPACE_TERMINATED error. In such case, PMD resets itself and can set |
3854 | +OUT_OF_SPACE is a condition when the output buffer runs out of space and where the PMD |
3855 | +still has more data to produce. If the PMD runs into such condition, then the PMD returns |
3856 | +RTE_COMP_OP_OUT_OF_SPACE_TERMINATED error. In such case, the PMD resets itself and can set |
3857 | consumed=0 and produced=amount of output it could produce before hitting out_of_space. |
3858 | -Application would need to resubmit the whole input with a larger output buffer, if it |
3859 | +The application would need to resubmit the whole input with a larger output buffer, if it |
3860 | wants the operation to be completed. |
3861 | |
3862 | Hash in Stateless |
3863 | ~~~~~~~~~~~~~~~~~ |
3864 | -If hash is enabled, digest buffer will contain valid data after op is successfully |
3865 | +If hash is enabled, the digest buffer will contain valid data after an op is successfully |
3866 | processed i.e. dequeued with status = RTE_COMP_OP_STATUS_SUCCESS. |
3867 | |
3868 | Checksum in Stateless |
3869 | ~~~~~~~~~~~~~~~~~~~~~ |
3870 | -If checksum is enabled, checksum will only be available after op is successfully |
3871 | +If checksum is enabled, checksum will only be available after an op is successfully |
3872 | processed i.e. dequeued with status = RTE_COMP_OP_STATUS_SUCCESS. |
3873 | |
3874 | +.. _compressdev_stateful_op: |
3875 | + |
3876 | Compression API Stateful operation |
3877 | ----------------------------------- |
3878 | |
3879 | -Compression API provide RTE_COMP_FF_STATEFUL_COMPRESSION and |
3880 | -RTE_COMP_FF_STATEFUL_DECOMPRESSION feature flag for PMD to reflect |
3881 | +The compression API provides RTE_COMP_FF_STATEFUL_COMPRESSION and |
3882 | +RTE_COMP_FF_STATEFUL_DECOMPRESSION feature flag for the PMD to reflect |
3883 | its support for Stateful operations. |
3884 | |
3885 | -A Stateful operation in DPDK compression means application invokes enqueue |
3886 | -burst() multiple times to process related chunk of data because |
3887 | -application broke data into several ops. |
3888 | +A Stateful operation in DPDK compression means the application invokes enqueue |
3889 | +burst() multiple times to process a related chunk of data because the |
3890 | +application broke the data into several ops. |
3891 | |
3892 | -In such case |
3893 | +In such cases |
3894 | - ops are setup with op_type RTE_COMP_OP_STATEFUL, |
3895 | -- all ops except last set to flush value = RTE_COMP_FLUSH_NONE/SYNC |
3896 | -and last set to flush value RTE_COMP_FLUSH_FULL/FINAL. |
3897 | +- all ops except the last are set with flush value = RTE_COMP_FLUSH_NONE/SYNC |
3898 | +and the last is set with flush value RTE_COMP_FLUSH_FULL/FINAL. |
3899 | |
3900 | -In case of either one or all of the above conditions, PMD initiates |
3901 | -stateful processing and releases acquired resources after processing |
3902 | +In case of either one or all of the above conditions, the PMD initiates |
3903 | +stateful processing and releases acquired resources after processing the |
3904 | operation with flush value = RTE_COMP_FLUSH_FULL/FINAL is complete. |
3905 | -Unlike stateless, application can enqueue only one stateful op from |
3906 | -a particular stream at a time and must attach stream handle |
3907 | +Unlike stateless, the application can enqueue only one stateful op from |
3908 | +a particular stream at a time and must attach a stream handle |
3909 | to each op. |
3910 | |
3911 | Stream in Stateful operation |
3912 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3913 | |
3914 | -`stream` in DPDK compression is a logical entity which identifies related set of ops, say, a one large |
3915 | -file broken into multiple chunks then file is represented by a stream and each chunk of that file is |
3916 | -represented by compression op `rte_comp_op`. Whenever application wants a stateful processing of such |
3917 | -data, then it must get a stream handle via making call to ``rte_compressdev_stream_create()`` |
3918 | -with xform, at an output the target PMD will return an opaque stream handle to application which |
3919 | -it must attach to all of the ops carrying data of that stream. In stateful processing, every op |
3920 | -requires previous op data for compression/decompression. A PMD allocates and set up resources such |
3921 | -as history, states, etc. within a stream, which are maintained during the processing of the related ops. |
3922 | +A stream in DPDK compression is a logical entity which identifies a related set of ops. |
3923 | +For example, one large file broken into multiple chunks, then the file is represented by a stream, |
3924 | +and each chunk of that file is represented by a compression op ``rte_comp_op``. |
3925 | +Whenever an application wants stateful processing of such data, then it must get a stream handle |
3926 | +via making call to ``rte_compressdev_stream_create()`` with an xform, which will return an opaque |
3927 | +stream handle to attach to all of the ops carrying data of that stream. |
3928 | +In stateful processing, every op requires previous op data for compression/decompression. |
3929 | +A PMD allocates and sets up resources such as history, states, etc. within a stream, |
3930 | +which are maintained during the processing of related ops. |
3931 | |
3932 | -Unlike priv_xforms, stream is always a NON_SHAREABLE entity. One stream handle must be attached to only |
3933 | -one set of related ops and cannot be reused until all of them are processed with status Success or failure. |
3934 | +Unlike priv_xforms, a stream is always a NON_SHAREABLE entity. One stream handle must be attached |
3935 | +to only one set of related ops and cannot be reused until all of them are processed with a |
3936 | +success/failure status. |
3937 | |
3938 | .. figure:: img/stateful-op.* |
3939 | |
3940 | Stateful Ops |
3941 | |
3942 | |
3943 | -Application should call ``rte_compressdev_stream_create()`` and attach to op before |
3944 | +An application should call ``rte_compressdev_stream_create()`` and attach it to the op before |
3945 | enqueuing them for processing and free via ``rte_compressdev_stream_free()`` during |
3946 | -termination. All ops that are to be processed statefully should carry *same* stream. |
3947 | +termination. All ops that are to be processed statefully should carry the *same* stream. |
3948 | |
3949 | -See *DPDK API Reference* document for details. |
3950 | +See the `DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_ for details. |
3951 | |
3952 | -An example pseudocode to set up and process a stream having NUM_CHUNKS with each chunk size of CHUNK_LEN would look like: |
3953 | +An example pseudocode to set up and process a stream having NUM_CHUNKS, |
3954 | +with each chunk size of CHUNK_LEN, would look like: |
3955 | |
3956 | .. code-block:: c |
3957 | |
3958 | @@ -549,64 +560,65 @@ An example pseudocode to set up and process a stream having NUM_CHUNKS with each |
3959 | |
3960 | |
3961 | Stateful and OUT_OF_SPACE |
3962 | -~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3963 | +~~~~~~~~~~~~~~~~~~~~~~~~~ |
3964 | |
3965 | -If PMD supports stateful operation, then OUT_OF_SPACE status is not an actual |
3966 | -error for the PMD. In such case, PMD returns with status |
3967 | +If a PMD supports stateful operation, then an OUT_OF_SPACE status is not an actual |
3968 | +error for the PMD. In such a case, the PMD returns with status |
3969 | RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE with consumed = number of input bytes |
3970 | -read and produced = length of complete output buffer. |
3971 | -Application should enqueue next op with source starting at consumed+1 and an |
3972 | +read, and produced = length of complete output buffer. |
3973 | +The application should enqueue the next op with source starting at consumed+1, and an |
3974 | output buffer with available space. |
3975 | |
3976 | Hash in Stateful |
3977 | ~~~~~~~~~~~~~~~~ |
3978 | -If enabled, digest buffer will contain valid digest after last op in stream |
3979 | +If enabled, the digest buffer will contain valid digest after the last op in a stream |
3980 | (having flush = RTE_COMP_FLUSH_FINAL) is successfully processed i.e. dequeued |
3981 | with status = RTE_COMP_OP_STATUS_SUCCESS. |
3982 | |
3983 | Checksum in Stateful |
3984 | ~~~~~~~~~~~~~~~~~~~~ |
3985 | -If enabled, checksum will only be available after last op in stream |
3986 | +If enabled, the checksum will only be available after the last op in a stream |
3987 | (having flush = RTE_COMP_FLUSH_FINAL) is successfully processed i.e. dequeued |
3988 | with status = RTE_COMP_OP_STATUS_SUCCESS. |
3989 | |
3990 | Burst in compression API |
3991 | -------------------------- |
3992 | +------------------------ |
3993 | |
3994 | Scheduling of compression operations on DPDK's application data path is |
3995 | performed using a burst oriented asynchronous API set. A queue pair on a compression |
3996 | -device accepts a burst of compression operations using enqueue burst API. On physical |
3997 | -devices the enqueue burst API will place the operations to be processed |
3998 | +device accepts a burst of compression operations using the enqueue burst API. |
3999 | +On physical devices the enqueue burst API will place the operations to be processed |
4000 | on the device's hardware input queue, for virtual devices the processing of the |
4001 | operations is usually completed during the enqueue call to the compression |
4002 | device. The dequeue burst API will retrieve any processed operations available |
4003 | from the queue pair on the compression device, from physical devices this is usually |
4004 | -directly from the devices processed queue, and for virtual device's from a |
4005 | +directly from the devices processed queue, and for virtual device's from an |
4006 | ``rte_ring`` where processed operations are placed after being processed on the |
4007 | enqueue call. |
4008 | |
4009 | -A burst in DPDK compression can be a combination of stateless and stateful operations with a condition |
4010 | -that for stateful ops only one op at-a-time should be enqueued from a particular stream i.e. no-two ops |
4011 | -should belong to same stream in a single burst. However a burst may contain multiple stateful ops as long |
4012 | -as each op is attached to a different stream i.e. a burst can look like: |
4013 | +A burst in DPDK compression can be a combination of stateless and stateful operations with a |
4014 | +condition that for stateful ops only one op at a time should be enqueued from a particular stream |
4015 | +i.e. two ops should never belong to the same stream in a single burst. |
4016 | +However, a burst may contain multiple stateful ops, as long as each op is attached to a different |
4017 | +stream, i.e. a burst can look like: |
4018 | |
4019 | +---------------+--------------+--------------+-----------------+--------------+--------------+ |
4020 | | enqueue_burst | op1.no_flush | op2.no_flush | op3.flush_final | op4.no_flush | op5.no_flush | |
4021 | +---------------+--------------+--------------+-----------------+--------------+--------------+ |
4022 | |
4023 | -Where, op1 .. op5 all belong to different independent data units. op1, op2, op4, op5 must be stateful |
4024 | -as stateless ops can only use flush full or final and op3 can be of type stateless or stateful. |
4025 | -Every op with type set to RTE_COMP_OP_STATELESS must be attached to priv_xform and |
4026 | -Every op with type set to RTE_COMP_OP_STATEFUL *must* be attached to stream. |
4027 | +Where, op1 .. op5 all belong to different independent data units. op1, op2, op4, op5 must be |
4028 | +stateful as stateless ops can only use flush full or final and op3 can be of type stateless or |
4029 | +stateful. Every op with type set to RTE_COMP_OP_STATELESS must be attached to priv_xform and |
4030 | +every op with type set to RTE_COMP_OP_STATEFUL *must* be attached to stream. |
4031 | |
4032 | Since each operation in a burst is independent and thus can be completed |
4033 | -out-of-order, applications which need ordering, should setup per-op user data |
4034 | -area with reordering information so that it can determine enqueue order at |
4035 | +out of order, applications which need ordering should setup a per-op user data |
4036 | +area, with reordering information so that it can determine enqueue order at |
4037 | dequeue. |
4038 | |
4039 | -Also if multiple threads calls enqueue_burst() on same queue pair then it’s |
4040 | -application onus to use proper locking mechanism to ensure exclusive enqueuing |
4041 | -of operations. |
4042 | +Also, if multiple threads calls enqueue_burst() on the same queue pair then it's |
4043 | +the application's responsibility to use a proper locking mechanism to ensure |
4044 | +exclusive enqueuing of operations. |
4045 | |
4046 | Enqueue / Dequeue Burst APIs |
4047 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
4048 | @@ -629,9 +641,10 @@ Sample code |
4049 | ----------- |
4050 | |
4051 | There are unit test applications that show how to use the compressdev library inside |
4052 | -app/test/test_compressdev.c |
4053 | +``app/test/test_compressdev.c`` |
4054 | |
4055 | Compression Device API |
4056 | ~~~~~~~~~~~~~~~~~~~~~~ |
4057 | |
4058 | -The compressdev Library API is described in the *DPDK API Reference* document. |
4059 | +The compressdev Library API is described in the |
4060 | +`DPDK API Reference <https://doc.dpdk.org/api/rte__compressdev_8h.html>`_. |
4061 | diff --git a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst |
4062 | index 67b11e1..3b4ef50 100644 |
4063 | --- a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst |
4064 | +++ b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst |
4065 | @@ -257,8 +257,8 @@ A loop processing ``rte_event_vector`` containing mbufs is shown below. |
4066 | /* Process each mbuf. */ |
4067 | } |
4068 | break; |
4069 | - case ... |
4070 | - ... |
4071 | + case default: |
4072 | + /* Handle other event_types. */ |
4073 | } |
4074 | |
4075 | Rx event vectorization for SW Rx adapter |
4076 | diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst |
4077 | index 76f5d30..8959568 100644 |
4078 | --- a/doc/guides/prog_guide/vhost_lib.rst |
4079 | +++ b/doc/guides/prog_guide/vhost_lib.rst |
4080 | @@ -331,7 +331,7 @@ vhost-user implementation has two options: |
4081 | |
4082 | * The vhost supported features must be exactly the same before and |
4083 | after the restart. For example, if TSO is disabled and then enabled, |
4084 | - nothing will work and issues undefined might happen. |
4085 | + nothing will work and undefined issues might happen. |
4086 | |
4087 | No matter which mode is used, once a connection is established, DPDK |
4088 | vhost-user will start receiving and processing vhost messages from QEMU. |
4089 | @@ -362,12 +362,12 @@ Guest memory requirement |
4090 | |
4091 | * Memory pre-allocation |
4092 | |
4093 | - For non-async data path, guest memory pre-allocation is not a |
4094 | - must. This can help save of memory. If users really want the guest memory |
4095 | - to be pre-allocated (e.g., for performance reason), we can add option |
4096 | - ``-mem-prealloc`` when starting QEMU. Or, we can lock all memory at vhost |
4097 | - side which will force memory to be allocated when mmap at vhost side; |
4098 | - option --mlockall in ovs-dpdk is an example in hand. |
4099 | + For non-async data path guest memory pre-allocation is not a |
4100 | + must but can help save memory. To do this we can add option |
4101 | + ``-mem-prealloc`` when starting QEMU, or we can lock all memory at vhost |
4102 | + side which will force memory to be allocated when it calls mmap |
4103 | + (option --mlockall in ovs-dpdk is an example in hand). |
4104 | + |
4105 | |
4106 | For async data path, we force the VM memory to be pre-allocated at vhost |
4107 | lib when mapping the guest memory; and also we need to lock the memory to |
4108 | @@ -375,8 +375,8 @@ Guest memory requirement |
4109 | |
4110 | * Memory sharing |
4111 | |
4112 | - Make sure ``share=on`` QEMU option is given. vhost-user will not work with |
4113 | - a QEMU version without shared memory mapping. |
4114 | + Make sure ``share=on`` QEMU option is given. The vhost-user will not work with |
4115 | + a QEMU instance without shared memory mapping. |
4116 | |
4117 | Vhost supported vSwitch reference |
4118 | --------------------------------- |
4119 | diff --git a/doc/guides/rel_notes/known_issues.rst b/doc/guides/rel_notes/known_issues.rst |
4120 | index 187d9c9..5705508 100644 |
4121 | --- a/doc/guides/rel_notes/known_issues.rst |
4122 | +++ b/doc/guides/rel_notes/known_issues.rst |
4123 | @@ -885,14 +885,15 @@ Unsuitable IOVA mode may be picked as the default |
4124 | **Driver/Module**: |
4125 | ALL. |
4126 | |
4127 | -Vhost multi-queue reconnection failed with QEMU version >= 4.2.0 |
4128 | ----------------------------------------------------------------- |
4129 | +Vhost multi-queue reconnection failed with QEMU version 4.2.0 to 5.1.0 |
4130 | +---------------------------------------------------------------------- |
4131 | |
4132 | **Description** |
4133 | It's a QEMU regression bug (bad commit: c6beefd674ff). QEMU only saves |
4134 | acked features for one vhost-net when vhost quits. When vhost reconnects |
4135 | to virtio-net/virtio-pmd in multi-queue situations, the features been |
4136 | - set multiple times are not consistent. |
4137 | + set multiple times are not consistent. QEMU-5.2.0 fixes this issue in commit |
4138 | + f66337bdbfda ("vhost-user: save features of multiqueues if chardev is closed"). |
4139 | |
4140 | **Implication** |
4141 | Vhost cannot reconnect back to virtio-net/virtio-pmd normally. |
4142 | diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst |
4143 | index c4e7198..69199a9 100644 |
4144 | --- a/doc/guides/rel_notes/release_21_11.rst |
4145 | +++ b/doc/guides/rel_notes/release_21_11.rst |
4146 | @@ -1395,4 +1395,458 @@ Tested Platforms |
4147 | ~~~~~~~~~~~~~~~~~~~~ |
4148 | |
4149 | * DPDK 21.11.1 contains fixes up to DPDK 22.03 |
4150 | -* Issues identified/fixed in DPDK main branch after DPDK 22.03 may be present in DPDK 20.11.1 |
4151 | +* Issues identified/fixed in DPDK main branch after DPDK 22.03 may be present in DPDK 21.11.1 |
4152 | + |
4153 | +21.11.2 Release Notes |
4154 | +--------------------- |
4155 | + |
4156 | + |
4157 | +21.11.2 Fixes |
4158 | +~~~~~~~~~~~~~ |
4159 | + |
4160 | +* acl: fix rules with 8-byte field size |
4161 | +* app/flow-perf: fix build with GCC 12 |
4162 | +* app/procinfo: show all non-owned ports |
4163 | +* app/regex: avoid division by zero |
4164 | +* app/regex: fix mbuf size for multi-segment buffer |
4165 | +* app/testpmd: add help messages for multi-process |
4166 | +* app/testpmd: check statistics query before printing |
4167 | +* app/testpmd: cleanup port resources after implicit close |
4168 | +* app/testpmd: do not poll stopped queues |
4169 | +* app/testpmd: fix bonding slave devices not released |
4170 | +* app/testpmd: fix flex parser destroy command |
4171 | +* app/testpmd: fix GTP PSC raw processing |
4172 | +* app/testpmd: fix GTP PSC raw processing |
4173 | +* app/testpmd: fix help of create meter command |
4174 | +* app/testpmd: fix metering and policing command for RFC4115 |
4175 | +* app/testpmd: fix MTU verification |
4176 | +* app/testpmd: fix multicast address pool leak |
4177 | +* app/testpmd: fix packet segment allocation |
4178 | +* app/testpmd: fix port status of bonding slave device |
4179 | +* app/testpmd: fix supported RSS offload display |
4180 | +* app/testpmd: fix use of indirect action after port close |
4181 | +* app/testpmd: perform SW IP checksum for GRO/GSO packets |
4182 | +* app/testpmd: remove useless pointer checks |
4183 | +* app/testpmd: replace hardcoded min mbuf number with macro |
4184 | +* app/testpmd: revert MAC update in checksum forwarding |
4185 | +* avoid AltiVec keyword vector |
4186 | +* baseband/acc100: add protection for some negative scenario |
4187 | +* baseband/acc100: update companion PF configure function |
4188 | +* bus/fslmc: fix VFIO setup |
4189 | +* common/cnxk: allow changing PTP mode on CN10K |
4190 | +* common/cnxk: fix decrypt packet count register update |
4191 | +* common/cnxk: fix GRE tunnel parsing |
4192 | +* common/cnxk: fix null pointer dereference |
4193 | +* common/cnxk: fix SQ flush sequence |
4194 | +* common/cnxk: fix unaligned access to device memory |
4195 | +* common/cnxk: handle ROC model init failure |
4196 | +* common/cnxk: swap zuc-256 key |
4197 | +* common/cpt: fix build with GCC 12 |
4198 | +* common/dpaax: fix short MAC-I IV calculation for ZUC |
4199 | +* common/mlx5: fix memory region range calculation |
4200 | +* common/mlx5: fix non-expandable global MR cache |
4201 | +* common/mlx5: remove unused lcore check |
4202 | +* common/sfc_efx/base: convert EFX PCIe INTF to MCDI value |
4203 | +* config: fix C++ cross compiler for Arm and PPC |
4204 | +* crypto/cnxk: fix build with GCC 12 |
4205 | +* crypto/cnxk: swap zuc-256 iv |
4206 | +* crypto/dpaa2_sec: fix buffer pool ID check |
4207 | +* crypto/dpaa2_sec: fix chained FD length in raw datapath |
4208 | +* crypto/dpaa2_sec: fix crypto operation pointer |
4209 | +* crypto/dpaa2_sec: fix fle buffer leak |
4210 | +* crypto/dpaa2_sec: fix operation status for simple FD |
4211 | +* crypto/dpaa_sec: fix chained FD length in raw datapath |
4212 | +* crypto/dpaa_sec: fix digest size |
4213 | +* crypto/dpaa_sec: fix secondary process probing |
4214 | +* crypto/ipsec_mb: fix build with GCC 12 |
4215 | +* crypto/mlx5: fix login cleanup |
4216 | +* crypto/qat: fix DOCSIS crash |
4217 | +* crypto/scheduler: fix queue pair in scheduler failover |
4218 | +* devargs: fix leak on hotplug failure |
4219 | +* devtools: fix null test for NUMA systems |
4220 | +* dma/hisilicon: enhance CQ scan robustness |
4221 | +* dma/hisilicon: fix includes in header file |
4222 | +* dma/hisilicon: fix index returned when no DMA completed |
4223 | +* dma/idxd: fix AVX2 in non-datapath functions |
4224 | +* dma/idxd: fix error code for PCI device commands |
4225 | +* dma/idxd: fix memory leak in PCI close |
4226 | +* dma/idxd: fix non-AVX builds with old compilers |
4227 | +* dma/idxd: fix null dereference in PCI remove |
4228 | +* dma/idxd: fix partial freeing in PCI close |
4229 | +* dma/skeleton: fix index returned when no memcpy completed |
4230 | +* doc: add missing auth algo for IPsec example |
4231 | +* doc: add more instructions for running as non-root |
4232 | +* doc: fix API index Markdown syntax |
4233 | +* doc: fix build with sphinx 4.5 |
4234 | +* doc: fix flow integrity hardware support in mlx5 guide |
4235 | +* doc: fix formatting and link in BPF library guide |
4236 | +* doc: fix grammar and formatting in compressdev guide |
4237 | +* doc: fix grammar and parameters in l2fwd-crypto guide |
4238 | +* doc: fix readability in vhost guide |
4239 | +* doc: fix release note typo |
4240 | +* doc: fix vhost multi-queue reconnection |
4241 | +* doc: update matching versions in i40e guide |
4242 | +* doc: update matching versions in ice guide |
4243 | +* drivers/crypto: fix warnings for OpenSSL version |
4244 | +* eal: fix C++ include for device event and DMA |
4245 | +* eal/freebsd: fix use of newer cpuset macros |
4246 | +* eal/ppc: fix compilation for musl |
4247 | +* eal/windows: add missing C++ include guards |
4248 | +* eal/windows: fix data race when creating threads |
4249 | +* eal/x86: drop export of internal alignment macro |
4250 | +* eal/x86: fix unaligned access for small memcpy |
4251 | +* ethdev: fix build with vtune option |
4252 | +* ethdev: fix memory leak in xstats telemetry |
4253 | +* ethdev: fix port close in secondary process |
4254 | +* ethdev: fix port state when stop |
4255 | +* ethdev: fix possible null pointer access |
4256 | +* ethdev: fix RSS update when RSS is disabled |
4257 | +* ethdev: prohibit polling stopped queue |
4258 | +* event/cnxk: fix out of bounds access in test |
4259 | +* event/cnxk: fix QoS parameter handling |
4260 | +* event/cnxk: fix Tx adapter enqueue return for CN10K |
4261 | +* eventdev/eth_rx: fix telemetry Rx stats reset |
4262 | +* eventdev/eth_tx: fix adapter creation |
4263 | +* eventdev/eth_tx: fix queue delete |
4264 | +* event/dlb2: fix advertized capabilities |
4265 | +* event/dlb2: fix check of QID in-flight |
4266 | +* event/dlb2: rework queue drain handling |
4267 | +* event/octeontx: fix SSO fast path |
4268 | +* examples/bond: fix invalid use of trylock |
4269 | +* examples/distributor: fix distributor on Rx core |
4270 | +* examples/dma: fix MTU configuration |
4271 | +* examples/dma: fix Tx drop statistics |
4272 | +* examples/fips_validation: handle empty payload |
4273 | +* examples/ipsec-secgw: fix ESN setting |
4274 | +* examples/ipsec-secgw: fix NAT-T header fields |
4275 | +* examples/ipsec-secgw: fix promiscuous mode option |
4276 | +* examples/ipsec-secgw: fix uninitialized memory access |
4277 | +* examples/l2fwd-crypto: fix stats refresh rate |
4278 | +* examples/link_status_interrupt: fix stats refresh rate |
4279 | +* examples/performance-thread: fix build with GCC 12 |
4280 | +* examples/vhost: fix crash when no VMDq |
4281 | +* examples/vhost: fix retry logic on Rx path |
4282 | +* gro: fix identifying fragmented packets |
4283 | +* ipsec: fix NAT-T ports and length |
4284 | +* kni: fix build |
4285 | +* kni: fix build with Linux 5.18 |
4286 | +* kni: use dedicated function to set MAC address |
4287 | +* kni: use dedicated function to set random MAC address |
4288 | +* malloc: fix allocation of almost hugepage size |
4289 | +* malloc: fix ASan handling for unmapped memory |
4290 | +* mbuf: dump outer VLAN |
4291 | +* mem: skip attaching external memory in secondary process |
4292 | +* net/af_xdp: make compatible with libbpf >= 0.7.0 |
4293 | +* net/af_xdp: use libxdp if available |
4294 | +* net/axgbe: fix xstats get return if xstats is null |
4295 | +* net/bnxt: allow Tx only or Rx only |
4296 | +* net/bnxt: avoid unnecessary endianness conversion |
4297 | +* net/bnxt: check duplicate queue IDs |
4298 | +* net/bnxt: cleanup MTU setting |
4299 | +* net/bnxt: disallow MTU change when device is started |
4300 | +* net/bnxt: fix check for autoneg enablement in the PHY FW |
4301 | +* net/bnxt: fix compatibility with some old firmwares |
4302 | +* net/bnxt: fix device capability reporting |
4303 | +* net/bnxt: fix freeing VNIC filters |
4304 | +* net/bnxt: fix link status when port is stopped |
4305 | +* net/bnxt: fix reordering in NEON Rx |
4306 | +* net/bnxt: fix ring group on Rx restart |
4307 | +* net/bnxt: fix RSS action |
4308 | +* net/bnxt: fix Rx configuration |
4309 | +* net/bnxt: fix setting forced speed |
4310 | +* net/bnxt: fix speed autonegotiation |
4311 | +* net/bnxt: fix switch domain allocation |
4312 | +* net/bnxt: fix tunnel stateless offloads |
4313 | +* net/bnxt: fix ULP parser to ignore segment offset |
4314 | +* net/bnxt: force PHY update on certain configurations |
4315 | +* net/bnxt: handle queue stop during RSS flow create |
4316 | +* net/bnxt: recheck FW readiness if in reset process |
4317 | +* net/bnxt: remove unused macro |
4318 | +* net/bonding: fix mbuf fast free usage |
4319 | +* net/bonding: fix RSS inconsistency between ports |
4320 | +* net/bonding: fix RSS key config with extended key length |
4321 | +* net/bonding: fix slave stop and remove on port close |
4322 | +* net/bonding: fix stopping non-active slaves |
4323 | +* net/cnxk: add barrier after meta batch free in scalar |
4324 | +* net/cnxk: add message on flow parsing failure |
4325 | +* net/cnxk: fix possible null dereference in telemetry |
4326 | +* net/cnxk: fix uninitialized variables |
4327 | +* net/cxgbe: fix port ID in Rx mbuf |
4328 | +* net/cxgbe: fix Tx queue stuck with mbuf chain coalescing |
4329 | +* net/dpaa2: fix dpdmux default interface |
4330 | +* net/dpaa: fix event queue detach |
4331 | +* net/ena: fix build with GCC 12 |
4332 | +* net/enetfec: fix build with GCC 12 |
4333 | +* net/failsafe: fix device freeing |
4334 | +* net: fix GTP PSC headers |
4335 | +* net/hns3: delete unused code |
4336 | +* net/hns3: fix an unreasonable memset |
4337 | +* net/hns3: fix code check warning |
4338 | +* net/hns3: fix crash from secondary process |
4339 | +* net/hns3: fix descriptors check with SVE |
4340 | +* net/hns3: fix link status capability query from VF |
4341 | +* net/hns3: fix MAC and queues HW statistics overflow |
4342 | +* net/hns3: fix mbuf free on Tx done cleanup |
4343 | +* net/hns3: fix order of clearing imissed register in PF |
4344 | +* net/hns3: fix pseudo-sharing between threads |
4345 | +* net/hns3: fix PTP interrupt logging |
4346 | +* net/hns3: fix return value for unsupported tuple |
4347 | +* net/hns3: fix rollback on RSS hash update |
4348 | +* net/hns3: fix RSS disable |
4349 | +* net/hns3: fix statistics locking |
4350 | +* net/hns3: fix TM capability |
4351 | +* net/hns3: fix xstats get return if xstats is null |
4352 | +* net/hns3: remove duplicate definition |
4353 | +* net/hns3: remove redundant RSS tuple field |
4354 | +* net/hns3: remove unnecessary RSS switch |
4355 | +* net/hns3: support backplane media type |
4356 | +* net/i40e: fix max frame size config at port level |
4357 | +* net/i40e: populate error in flow director parser |
4358 | +* net/iavf: fix data path selection |
4359 | +* net/iavf: fix device initialization without inline crypto |
4360 | +* net/iavf: fix device stop |
4361 | +* net/iavf: fix GTP-U extension flow |
4362 | +* net/iavf: fix mbuf release in multi-process |
4363 | +* net/iavf: fix NAT-T payload length |
4364 | +* net/iavf: fix queue start exception handling |
4365 | +* net/iavf: fix Rx queue interrupt setting |
4366 | +* net/iavf: fix segfaults when calling API after VF reset failed |
4367 | +* net/iavf: fix VF reset |
4368 | +* net/iavf: increase reset complete wait count |
4369 | +* net/iavf: remove dead code |
4370 | +* net/ice: add missing Tx burst mode name |
4371 | +* net/ice/base: fix build with GCC 12 |
4372 | +* net/ice/base: fix direction of flow that matches any |
4373 | +* net/ice/base: fix getting sched node from ID type |
4374 | +* net/ice: fix build with GCC 12 |
4375 | +* net/ice: fix MTU info for DCF |
4376 | +* net/ice: fix race condition in Rx timestamp |
4377 | +* net/ice: fix raw flow input pattern parsing |
4378 | +* net/ice: improve performance of Rx timestamp offload |
4379 | +* net/ice: refactor parser usage |
4380 | +* net/igc: support multi-process |
4381 | +* net/ipn3ke: fix xstats get return if xstats is null |
4382 | +* net/ixgbe: add option for link up check on pin SDP3 |
4383 | +* net/memif: fix overwriting of head segment |
4384 | +* net/mlx5: add limitation for E-Switch Manager match |
4385 | +* net/mlx5: fix build with clang 14 |
4386 | +* net/mlx5: fix counter in non-termination meter |
4387 | +* net/mlx5: fix GTP handling in header modify action |
4388 | +* net/mlx5: fix LRO configuration in drop Rx queue |
4389 | +* net/mlx5: fix LRO validation in Rx setup |
4390 | +* net/mlx5: fix metering on E-Switch Manager |
4391 | +* net/mlx5: fix no-green metering with RSS |
4392 | +* net/mlx5: fix probing with secondary bonding member |
4393 | +* net/mlx5: fix RSS expansion for patterns with ICMP item |
4394 | +* net/mlx5: fix RSS hash types adjustment |
4395 | +* net/mlx5: fix Rx queue recovery mechanism |
4396 | +* net/mlx5: fix Rx/Tx stats concurrency |
4397 | +* net/mlx5: fix stack buffer overflow in drop action |
4398 | +* net/mlx5: fix statistics read on Linux |
4399 | +* net/mlx5: fix Tx recovery |
4400 | +* net/mlx5: fix Tx when inlining is impossible |
4401 | +* net/mlx5: reject negative integrity item configuration |
4402 | +* net/mlx5: restrict Rx queue array access to boundary |
4403 | +* net/mvpp2: fix xstats get return if xstats is null |
4404 | +* net/netvsc: fix calculation of checksums based on mbuf flag |
4405 | +* net/netvsc: fix hot adding multiple VF PCI devices |
4406 | +* net/netvsc: fix vmbus device reference in multi-process |
4407 | +* net/nfp: fix disabling VLAN stripping |
4408 | +* net/nfp: fix initialization |
4409 | +* net/nfp: make sure MTU is never larger than mbuf size |
4410 | +* net/nfp: remove unneeded header inclusion |
4411 | +* net/nfp: update how max MTU is read |
4412 | +* net/ngbe: add more packet statistics |
4413 | +* net/ngbe: fix link speed check |
4414 | +* net/ngbe: fix PCIe related operations with bus API |
4415 | +* net/ngbe: fix reading PHY ID |
4416 | +* net/octeontx: fix port close |
4417 | +* net/qede: fix build with GCC 12 |
4418 | +* net/qede: fix build with GCC 13 |
4419 | +* net/tap: fix device freeing |
4420 | +* net/tap: fix interrupt handler freeing |
4421 | +* net/txgbe: fix max number of queues for SR-IOV |
4422 | +* net/txgbe: fix register polling |
4423 | +* net/txgbe: fix SGMII mode to link up |
4424 | +* net/vhost: fix access to freed memory |
4425 | +* net/vhost: fix deadlock on vring state change |
4426 | +* net/vhost: fix null pointer dereference |
4427 | +* net/vhost: fix TSO feature default disablement |
4428 | +* net/virtio: restore some optimisations with AVX512 |
4429 | +* net/virtio: unmap PCI device in secondary process |
4430 | +* net/virtio-user: fix Rx interrupts with multi-queue |
4431 | +* net/virtio-user: fix socket non-blocking mode |
4432 | +* net/vmxnet3: fix Rx data ring initialization |
4433 | +* pcapng: fix timestamp wrapping in output files |
4434 | +* pipeline: fix emit instruction for invalid headers |
4435 | +* raw/ifpga: remove virtual devices on close |
4436 | +* raw/ifpga: unregister interrupt on close |
4437 | +* raw/ioat: fix build missing errno include |
4438 | +* raw/ioat: fix build when ioat dmadev enabled |
4439 | +* rib: fix references for IPv6 implementation |
4440 | +* rib: fix traversal with /32 route |
4441 | +* sched: remove unnecessary floating point |
4442 | +* security: fix SA lifetime comments |
4443 | +* service: fix lingering active status |
4444 | +* test: avoid hang if queues are full and Tx fails |
4445 | +* test/bonding: fix RSS test when disable RSS |
4446 | +* test/bpf: skip test if libpcap is unavailable |
4447 | +* test: check memory allocation for CRC |
4448 | +* test/crypto: fix authentication IV for ZUC SGL |
4449 | +* test/crypto: fix cipher offset for ZUC |
4450 | +* test/crypto: fix driver name for DPAA raw API test |
4451 | +* test/crypto: fix null check for ZUC authentication |
4452 | +* test/crypto: fix SNOW3G vector IV format |
4453 | +* test/crypto: fix ZUC vector IV format |
4454 | +* test/crypto: skip oop test for raw api |
4455 | +* test: drop reference to removed tests |
4456 | +* test/hash: fix out of bound access |
4457 | +* test/ipsec: fix build with GCC 12 |
4458 | +* test/ipsec: fix performance test |
4459 | +* test/mem: disable ASan when accessing unallocated memory |
4460 | +* test/table: fix buffer overflow on lpm entry |
4461 | +* trace: fix crash when exiting |
4462 | +* trace: fix init with long file prefix |
4463 | +* vdpa/ifc/base: fix null pointer dereference |
4464 | +* vdpa/ifc: fix build with GCC 12 |
4465 | +* vdpa/mlx5: fix dead loop when process interrupted |
4466 | +* vdpa/mlx5: fix interrupt trash that leads to crash |
4467 | +* vdpa/mlx5: fix leak on event thread creation |
4468 | +* vdpa/mlx5: fix maximum number of virtqs |
4469 | +* vdpa/mlx5: workaround var offset within page |
4470 | +* vdpa/sfc: fix sync between QEMU and vhost-user |
4471 | +* vdpa/sfc: resolve race between vhost lib and device conf |
4472 | +* version: 21.11.2-rc1 |
4473 | +* vhost: add some trailing newline in log messages |
4474 | +* vhost/crypto: fix build with GCC 12 |
4475 | +* vhost/crypto: fix descriptor processing |
4476 | +* vhost: discard too small descriptor chains |
4477 | +* vhost: fix async access |
4478 | +* vhost: fix deadlock when message handling failed |
4479 | +* vhost: fix header spanned across more than two descriptors |
4480 | +* vhost: fix missing enqueue pseudo-header calculation |
4481 | +* vhost: fix missing virtqueue lock protection |
4482 | +* vhost: restore device information in log messages |
4483 | + |
4484 | +21.11.2 Validation |
4485 | +~~~~~~~~~~~~~~~~~~ |
4486 | + |
4487 | +* `Red Hat(R) Testing <https://mails.dpdk.org/archives/stable/2022-August/039801.html>`__ |
4488 | + |
4489 | + * Platform |
4490 | + |
4491 | + * RHEL 8 |
4492 | + * Kernel 4.18 |
4493 | + * Qemu 6.2 |
4494 | + * X540-AT2 NIC(ixgbe, 10G) |
4495 | + |
4496 | + * Functionality |
4497 | + |
4498 | + * Guest with device assignment(PF) throughput testing(1G hugepage size) |
4499 | + * Guest with device assignment(PF) throughput testing(2M hugepage size) |
4500 | + * Guest with device assignment(VF) throughput testing |
4501 | + * PVP (host dpdk testpmd as vswitch) 1Q: throughput testing |
4502 | + * PVP vhost-user 2Q throughput testing |
4503 | + * PVP vhost-user 1Q cross numa node throughput testing |
4504 | + * Guest with vhost-user 2 queues throughput testing |
4505 | + * vhost-user reconnect with dpdk-client, qemu-server: qemu reconnect |
4506 | + * vhost-user reconnect with dpdk-client, qemu-server: ovs reconnect |
4507 | + * PVP 1Q live migration testing |
4508 | + * PVP 1Q cross numa node live migration testing |
4509 | + * Guest with ovs+dpdk+vhost-user 1Q live migration testing |
4510 | + * Guest with ovs+dpdk+vhost-user 1Q live migration testing (2M) |
4511 | + * Guest with ovs+dpdk+vhost-user 2Q live migration testing |
4512 | + * Guest with ovs+dpdk+vhost-user 4Q live migration testing |
4513 | + * Host PF + DPDK testing |
4514 | + * Host VF + DPDK testing |
4515 | + |
4516 | + |
4517 | +* `Intel(R) Testing <https://mails.dpdk.org/archives/stable/2022-August/040006.html>`__ |
4518 | + |
4519 | + * Basic Intel(R) NIC(ixgbe, i40e and ice) testing |
4520 | + |
4521 | + * PF (i40e) |
4522 | + * PF (ixgbe) |
4523 | + * PF (ice) |
4524 | + * VF (i40e) |
4525 | + * VF (ixgbe) |
4526 | + * VF (ice) |
4527 | + * Compile Testing |
4528 | + * Intel NIC single core/NIC performance |
4529 | + * Power and IPsec |
4530 | + |
4531 | + * Basic cryptodev and virtio testing |
4532 | + |
4533 | + * vhost/virtio basic loopback, PVP and performance test |
4534 | + * cryptodev Function/Performance |
4535 | + |
4536 | + |
4537 | +* `Nvidia(R) Testing <https://mails.dpdk.org/archives/stable/2022-August/039931.html>`__ |
4538 | + |
4539 | + * Basic functionality with testpmd |
4540 | + |
4541 | + * Tx/Rx |
4542 | + * xstats |
4543 | + * Timestamps |
4544 | + * Link status |
4545 | + * RTE flow and flow_director |
4546 | + * RSS |
4547 | + * VLAN filtering, stripping and insertion |
4548 | + * Checksum/TSO |
4549 | + * ptype |
4550 | + * link_status_interrupt example application |
4551 | + * l3fwd-power example application |
4552 | + * Multi-process example applications |
4553 | + * Hardware LRO tests |
4554 | + * Regex application |
4555 | + * Buffer Split |
4556 | + * Tx scheduling |
4557 | + |
4558 | + * Build tests |
4559 | + |
4560 | + * Ubuntu 20.04.4 with MLNX_OFED_LINUX-5.7-1.0.2.0. |
4561 | + * Ubuntu 20.04.4 with rdma-core master (23a0021). |
4562 | + * Ubuntu 20.04.4 with rdma-core v28.0. |
4563 | + * Ubuntu 18.04.6 with rdma-core v17.1. |
4564 | + * Ubuntu 18.04.6 with rdma-core master (23a0021) (i386). |
4565 | + * Ubuntu 16.04.7 with rdma-core v22.7. |
4566 | + * Fedora 35 with rdma-core v39.0. |
4567 | + * Fedora 37 (Rawhide) with rdma-core v39.0 (with clang only). |
4568 | + * CentOS 7 7.9.2009 with rdma-core master (23a0021). |
4569 | + * CentOS 7 7.9.2009 with MLNX_OFED_LINUX-5.7-1.0.2.0. |
4570 | + * CentOS 8 8.4.2105 with rdma-core master (23a0021). |
4571 | + * OpenSUSE Leap 15.4 with rdma-core v38.1. |
4572 | + * Windows Server 2019 with Clang 11.0.0. |
4573 | + |
4574 | + * ConnectX-6 Dx |
4575 | + |
4576 | + * Ubuntu 20.04 |
4577 | + * Driver MLNX_OFED_LINUX-5.7-1.0.2.0 |
4578 | + * fw 22.34.1002 |
4579 | + |
4580 | + * ConnectX-5 |
4581 | + |
4582 | + * Ubuntu 20.04 |
4583 | + * Driver MLNX_OFED_LINUX-5.7-1.0.2.0 |
4584 | + * fw 16.34.1002 |
4585 | + |
4586 | + * ConnectX-4 Lx |
4587 | + |
4588 | + * Ubuntu 20.04 |
4589 | + * Driver MLNX_OFED_LINUX-5.7-1.0.2.0 |
4590 | + * fw 14.32.1010 |
4591 | + |
4592 | + * BlueField-2 |
4593 | + |
4594 | + * DOCA SW version: 1.4.0 |
4595 | + |
4596 | + |
4597 | +* `Intel(R) Testing with Open vSwitch <https://mails.dpdk.org/archives/stable/2022-August/040028.html>`__ |
4598 | + |
4599 | + * 21.11.2 validated by Intel for i40e, ICE, vhost and MTU for OVS with DPDK |
4600 | + |
4601 | +21.11.2 Known Issues |
4602 | +~~~~~~~~~~~~~~~~~~~~ |
4603 | + |
4604 | +* DPDK 21.11.2 contains fixes up to DPDK 22.07 as well as fixes for CVE-2022-28199 and CVE-2022-2132 |
4605 | +* Issues identified/fixed in DPDK main branch after DPDK 22.07 may be present in DPDK 21.11.2 |
4606 | diff --git a/doc/guides/sample_app_ug/ipsec_secgw.rst b/doc/guides/sample_app_ug/ipsec_secgw.rst |
4607 | index c53ee7c..468a977 100644 |
4608 | --- a/doc/guides/sample_app_ug/ipsec_secgw.rst |
4609 | +++ b/doc/guides/sample_app_ug/ipsec_secgw.rst |
4610 | @@ -116,7 +116,8 @@ Constraints |
4611 | * No IPv6 options headers. |
4612 | * No AH mode. |
4613 | * Supported algorithms: AES-CBC, AES-CTR, AES-GCM, 3DES-CBC, HMAC-SHA1, |
4614 | - AES-GMAC, AES_CTR, AES_XCBC_MAC, AES_CCM, CHACHA20_POLY1305 and NULL. |
4615 | + HMAC-SHA256, AES-GMAC, AES_CTR, AES_XCBC_MAC, AES_CCM, CHACHA20_POLY1305 |
4616 | + and NULL. |
4617 | * Each SA must be handle by a unique lcore (*1 RX queue per port*). |
4618 | |
4619 | Compiling the Application |
4620 | @@ -586,6 +587,7 @@ where each options means: |
4621 | |
4622 | * *null*: NULL algorithm |
4623 | * *sha1-hmac*: HMAC SHA1 algorithm |
4624 | + * *sha256-hmac*: HMAC SHA256 algorithm |
4625 | |
4626 | ``<auth_key>`` |
4627 | |
4628 | diff --git a/doc/guides/sample_app_ug/l2_forward_crypto.rst b/doc/guides/sample_app_ug/l2_forward_crypto.rst |
4629 | index 1b4444b..ce49eab 100644 |
4630 | --- a/doc/guides/sample_app_ug/l2_forward_crypto.rst |
4631 | +++ b/doc/guides/sample_app_ug/l2_forward_crypto.rst |
4632 | @@ -15,7 +15,7 @@ Overview |
4633 | The L2 Forwarding with Crypto sample application performs a crypto operation (cipher/hash) |
4634 | specified by the user from command line (or using the default values), |
4635 | with a crypto device capable of doing that operation, |
4636 | -for each packet that is received on a RX_PORT and performs L2 forwarding. |
4637 | +for each packet that is received on an RX_PORT and performs L2 forwarding. |
4638 | The destination port is the adjacent port from the enabled portmask, that is, |
4639 | if the first four ports are enabled (portmask 0xf), |
4640 | ports 0 and 1 forward into each other, and ports 2 and 3 forward into each other. |
4641 | @@ -54,37 +54,37 @@ The application requires a number of command line options: |
4642 | |
4643 | where, |
4644 | |
4645 | -* p PORTMASK: A hexadecimal bitmask of the ports to configure (default is all the ports) |
4646 | +* p PORTMASK: A hexadecimal bitmask of the ports to configure. (Default is all the ports.) |
4647 | |
4648 | -* q NQ: A number of queues (=ports) per lcore (default is 1) |
4649 | +* q NQ: A number of queues (=ports) per lcore. (Default is 1.) |
4650 | |
4651 | -* s: manage all ports from single core |
4652 | +* s: manage all ports from a single core. |
4653 | |
4654 | -* T PERIOD: statistics will be refreshed each PERIOD seconds |
4655 | +* T PERIOD: statistics will be refreshed each PERIOD seconds. |
4656 | |
4657 | - (0 to disable, 10 default, 86400 maximum) |
4658 | + (0 to disable, 10 default, 86400 maximum.) |
4659 | |
4660 | -* cdev_type: select preferred crypto device type: HW, SW or anything (ANY) |
4661 | +* cdev_type: select preferred crypto device type: HW, SW or anything (ANY). |
4662 | |
4663 | - (default is ANY) |
4664 | + (Default is ANY.) |
4665 | |
4666 | * chain: select the operation chaining to perform: Cipher->Hash (CIPHER_HASH), |
4667 | |
4668 | Hash->Cipher (HASH_CIPHER), Cipher (CIPHER_ONLY), Hash (HASH_ONLY) |
4669 | |
4670 | - or AEAD (AEAD) |
4671 | + or AEAD (AEAD). |
4672 | |
4673 | - (default is Cipher->Hash) |
4674 | + (Default is Cipher->Hash.) |
4675 | |
4676 | -* cipher_algo: select the ciphering algorithm (default is aes-cbc) |
4677 | +* cipher_algo: select the ciphering algorithm. (Default is aes-cbc.) |
4678 | |
4679 | -* cipher_op: select the ciphering operation to perform: ENCRYPT or DECRYPT |
4680 | +* cipher_op: select the ciphering operation to perform: ENCRYPT or DECRYPT. |
4681 | |
4682 | - (default is ENCRYPT) |
4683 | + (Default is ENCRYPT.) |
4684 | |
4685 | * cipher_dataunit_len: set the length of the cipher data-unit. |
4686 | |
4687 | -* cipher_key: set the ciphering key to be used. Bytes has to be separated with ":" |
4688 | +* cipher_key: set the ciphering key to be used. Bytes have to be separated with ":". |
4689 | |
4690 | * cipher_key_random_size: set the size of the ciphering key, |
4691 | |
4692 | @@ -92,19 +92,19 @@ where, |
4693 | |
4694 | Note that if --cipher_key is used, this will be ignored. |
4695 | |
4696 | -* cipher_iv: set the cipher IV to be used. Bytes has to be separated with ":" |
4697 | +* cipher_iv: set the cipher IV to be used. Bytes have to be separated with ":". |
4698 | |
4699 | * cipher_iv_random_size: set the size of the cipher IV, which will be generated randomly. |
4700 | |
4701 | Note that if --cipher_iv is used, this will be ignored. |
4702 | |
4703 | -* auth_algo: select the authentication algorithm (default is sha1-hmac) |
4704 | +* auth_algo: select the authentication algorithm. (Default is sha1-hmac.) |
4705 | |
4706 | -* auth_op: select the authentication operation to perform: GENERATE or VERIFY |
4707 | +* auth_op: select the authentication operation to perform: GENERATE or VERIFY. |
4708 | |
4709 | - (default is GENERATE) |
4710 | + (Default is GENERATE.) |
4711 | |
4712 | -* auth_key: set the authentication key to be used. Bytes has to be separated with ":" |
4713 | +* auth_key: set the authentication key to be used. Bytes have to be separated with ":". |
4714 | |
4715 | * auth_key_random_size: set the size of the authentication key, |
4716 | |
4717 | @@ -112,19 +112,19 @@ where, |
4718 | |
4719 | Note that if --auth_key is used, this will be ignored. |
4720 | |
4721 | -* auth_iv: set the auth IV to be used. Bytes has to be separated with ":" |
4722 | +* auth_iv: set the auth IV to be used. Bytes have to be separated with ":". |
4723 | |
4724 | * auth_iv_random_size: set the size of the auth IV, which will be generated randomly. |
4725 | |
4726 | Note that if --auth_iv is used, this will be ignored. |
4727 | |
4728 | -* aead_algo: select the AEAD algorithm (default is aes-gcm) |
4729 | +* aead_algo: select the AEAD algorithm. (Default is aes-gcm.) |
4730 | |
4731 | -* aead_op: select the AEAD operation to perform: ENCRYPT or DECRYPT |
4732 | +* aead_op: select the AEAD operation to perform: ENCRYPT or DECRYPT. |
4733 | |
4734 | - (default is ENCRYPT) |
4735 | + (Default is ENCRYPT.) |
4736 | |
4737 | -* aead_key: set the AEAD key to be used. Bytes has to be separated with ":" |
4738 | +* aead_key: set the AEAD key to be used. Bytes have to be separated with ":". |
4739 | |
4740 | * aead_key_random_size: set the size of the AEAD key, |
4741 | |
4742 | @@ -132,13 +132,13 @@ where, |
4743 | |
4744 | Note that if --aead_key is used, this will be ignored. |
4745 | |
4746 | -* aead_iv: set the AEAD IV to be used. Bytes has to be separated with ":" |
4747 | +* aead_iv: set the AEAD IV to be used. Bytes have to be separated with ":". |
4748 | |
4749 | * aead_iv_random_size: set the size of the AEAD IV, which will be generated randomly. |
4750 | |
4751 | Note that if --aead_iv is used, this will be ignored. |
4752 | |
4753 | -* aad: set the AAD to be used. Bytes has to be separated with ":" |
4754 | +* aad: set the AAD to be used. Bytes have to be separated with ":". |
4755 | |
4756 | * aad_random_size: set the size of the AAD, which will be generated randomly. |
4757 | |
4758 | @@ -151,9 +151,9 @@ where, |
4759 | * cryptodev_mask: A hexadecimal bitmask of the cryptodevs to be used by the |
4760 | application. |
4761 | |
4762 | - (default is all cryptodevs). |
4763 | + (Default is all cryptodevs.) |
4764 | |
4765 | -* [no-]mac-updating: Enable or disable MAC addresses updating (enabled by default). |
4766 | +* [no-]mac-updating: Enable or disable MAC addresses updating. (Enabled by default.) |
4767 | |
4768 | |
4769 | The application requires that crypto devices capable of performing |
4770 | @@ -165,7 +165,7 @@ To run the application in linux environment with 2 lcores, 2 ports and 2 crypto |
4771 | |
4772 | .. code-block:: console |
4773 | |
4774 | - $ ./<build_dir>/examples/dpdk-l2fwd-crypto -l 0-1 -n 4 --vdev "crypto_aesni_mb0" \ |
4775 | + $ ./<build_dir>/examples/dpdk-l2fwd-crypto -l 0-1 --vdev "crypto_aesni_mb0" \ |
4776 | --vdev "crypto_aesni_mb1" -- -p 0x3 --chain CIPHER_HASH \ |
4777 | --cipher_op ENCRYPT --cipher_algo aes-cbc \ |
4778 | --cipher_key 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f \ |
4779 | @@ -179,7 +179,7 @@ and the Environment Abstraction Layer (EAL) options. |
4780 | |
4781 | * The ``l2fwd-crypto`` sample application requires IPv4 packets for crypto operation. |
4782 | |
4783 | - * If multiple Ethernet ports is passed, then equal number of crypto devices are to be passed. |
4784 | + * If multiple Ethernet ports are passed, then equal number of crypto devices are to be passed. |
4785 | |
4786 | * All crypto devices shall use the same session. |
4787 | |
4788 | @@ -187,7 +187,7 @@ Explanation |
4789 | ----------- |
4790 | |
4791 | The L2 forward with Crypto application demonstrates the performance of a crypto operation |
4792 | -on a packet received on a RX PORT before forwarding it to a TX PORT. |
4793 | +on a packet received on an RX PORT before forwarding it to a TX PORT. |
4794 | |
4795 | The following figure illustrates a sample flow of a packet in the application, |
4796 | from reception until transmission. |
4797 | @@ -196,7 +196,7 @@ from reception until transmission. |
4798 | |
4799 | .. figure:: img/l2_fwd_encrypt_flow.* |
4800 | |
4801 | - Encryption flow Through the L2 Forwarding with Crypto Application |
4802 | + Encryption flow through the L2 Forwarding with Crypto Application |
4803 | |
4804 | |
4805 | The following sections provide some explanation of the application. |
4806 | @@ -206,8 +206,8 @@ Crypto operation specification |
4807 | |
4808 | All the packets received in all the ports get transformed by the crypto device/s |
4809 | (ciphering and/or authentication). |
4810 | -The crypto operation to be performed on the packet is parsed from the command line |
4811 | -(go to "Running the Application" section for all the options). |
4812 | +The crypto operation to be performed on the packet is parsed from the command line. |
4813 | +(Go to "Running the Application" section for all the options.) |
4814 | |
4815 | If no parameter is passed, the default crypto operation is: |
4816 | |
4817 | @@ -244,7 +244,7 @@ when running the application. |
4818 | |
4819 | The initialize_cryptodevs() function performs the device initialization. |
4820 | It iterates through the list of the available crypto devices and |
4821 | -check which ones are capable of performing the operation. |
4822 | +checks which ones are capable of performing the operation. |
4823 | Each device has a set of capabilities associated with it, |
4824 | which are stored in the device info structure, so the function checks if the operation |
4825 | is within the structure of each device. |
4826 | @@ -291,7 +291,7 @@ This session is created and is later attached to the crypto operation: |
4827 | Crypto operation creation |
4828 | ~~~~~~~~~~~~~~~~~~~~~~~~~ |
4829 | |
4830 | -Given N packets received from a RX PORT, N crypto operations are allocated |
4831 | +Given N packets received from an RX PORT, N crypto operations are allocated |
4832 | and filled: |
4833 | |
4834 | .. literalinclude:: ../../../examples/l2fwd-crypto/main.c |
4835 | diff --git a/drivers/baseband/acc100/acc100_pf_enum.h b/drivers/baseband/acc100/acc100_pf_enum.h |
4836 | index a1ee416..2fba667 100644 |
4837 | --- a/drivers/baseband/acc100/acc100_pf_enum.h |
4838 | +++ b/drivers/baseband/acc100/acc100_pf_enum.h |
4839 | @@ -238,6 +238,24 @@ enum { |
4840 | HWPfPermonBTotalLatLowBusMon = 0x00BAC504, |
4841 | HWPfPermonBTotalLatUpperBusMon = 0x00BAC508, |
4842 | HWPfPermonBTotalReqCntBusMon = 0x00BAC50C, |
4843 | + HwPfFabI2MArbCntrlReg = 0x00BB0000, |
4844 | + HWPfFabricMode = 0x00BB1000, |
4845 | + HwPfFabI2MGrp0DebugReg = 0x00BBF000, |
4846 | + HwPfFabI2MGrp1DebugReg = 0x00BBF004, |
4847 | + HwPfFabI2MGrp2DebugReg = 0x00BBF008, |
4848 | + HwPfFabI2MGrp3DebugReg = 0x00BBF00C, |
4849 | + HwPfFabI2MBuf0DebugReg = 0x00BBF010, |
4850 | + HwPfFabI2MBuf1DebugReg = 0x00BBF014, |
4851 | + HwPfFabI2MBuf2DebugReg = 0x00BBF018, |
4852 | + HwPfFabI2MBuf3DebugReg = 0x00BBF01C, |
4853 | + HwPfFabM2IBuf0Grp0DebugReg = 0x00BBF020, |
4854 | + HwPfFabM2IBuf1Grp0DebugReg = 0x00BBF024, |
4855 | + HwPfFabM2IBuf0Grp1DebugReg = 0x00BBF028, |
4856 | + HwPfFabM2IBuf1Grp1DebugReg = 0x00BBF02C, |
4857 | + HwPfFabM2IBuf0Grp2DebugReg = 0x00BBF030, |
4858 | + HwPfFabM2IBuf1Grp2DebugReg = 0x00BBF034, |
4859 | + HwPfFabM2IBuf0Grp3DebugReg = 0x00BBF038, |
4860 | + HwPfFabM2IBuf1Grp3DebugReg = 0x00BBF03C, |
4861 | HWPfFecUl5gCntrlReg = 0x00BC0000, |
4862 | HWPfFecUl5gI2MThreshReg = 0x00BC0004, |
4863 | HWPfFecUl5gVersionReg = 0x00BC0100, |
4864 | diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c |
4865 | index cc69c76..6cdc6e6 100644 |
4866 | --- a/drivers/baseband/acc100/rte_acc100_pmd.c |
4867 | +++ b/drivers/baseband/acc100/rte_acc100_pmd.c |
4868 | @@ -141,8 +141,8 @@ aqDepth(int qg_idx, struct rte_acc100_conf *acc100_conf) |
4869 | int acc_enum = accFromQgid(qg_idx, acc100_conf); |
4870 | qtopFromAcc(&q_top, acc_enum, acc100_conf); |
4871 | if (unlikely(q_top == NULL)) |
4872 | - return 0; |
4873 | - return q_top->aq_depth_log2; |
4874 | + return 1; |
4875 | + return RTE_MAX(1, q_top->aq_depth_log2); |
4876 | } |
4877 | |
4878 | /* Return the AQ depth for a Queue Group Index */ |
4879 | @@ -1236,6 +1236,8 @@ get_k0(uint16_t n_cb, uint16_t z_c, uint8_t bg, uint8_t rv_index) |
4880 | return (bg == 1 ? ACC100_K0_3_1 : ACC100_K0_3_2) * z_c; |
4881 | } |
4882 | /* LBRM case - includes a division by N */ |
4883 | + if (unlikely(z_c == 0)) |
4884 | + return 0; |
4885 | if (rv_index == 1) |
4886 | return (((bg == 1 ? ACC100_K0_1_1 : ACC100_K0_1_2) * n_cb) |
4887 | / n) * z_c; |
4888 | @@ -1764,6 +1766,10 @@ acc100_dma_desc_td_fill(struct rte_bbdev_dec_op *op, |
4889 | |
4890 | /* Soft output */ |
4891 | if (check_bit(op->turbo_dec.op_flags, RTE_BBDEV_TURBO_SOFT_OUTPUT)) { |
4892 | + if (op->turbo_dec.soft_output.data == 0) { |
4893 | + rte_bbdev_log(ERR, "Soft output is not defined"); |
4894 | + return -1; |
4895 | + } |
4896 | if (check_bit(op->turbo_dec.op_flags, |
4897 | RTE_BBDEV_TURBO_EQUALIZER)) |
4898 | *s_out_length = e; |
4899 | @@ -4412,7 +4418,7 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf) |
4900 | { |
4901 | rte_bbdev_log(INFO, "rte_acc100_configure"); |
4902 | uint32_t value, address, status; |
4903 | - int qg_idx, template_idx, vf_idx, acc, i; |
4904 | + int qg_idx, template_idx, vf_idx, acc, i, j; |
4905 | struct rte_bbdev *bbdev = rte_bbdev_get_named_dev(dev_name); |
4906 | |
4907 | /* Compile time checks */ |
4908 | @@ -4432,6 +4438,9 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf) |
4909 | /* Store configuration */ |
4910 | rte_memcpy(&d->acc100_conf, conf, sizeof(d->acc100_conf)); |
4911 | |
4912 | + value = acc100_reg_read(d, HwPfPcieGpexBridgeControl); |
4913 | + bool firstCfg = (value != ACC100_CFG_PCI_BRIDGE); |
4914 | + |
4915 | /* PCIe Bridge configuration */ |
4916 | acc100_reg_write(d, HwPfPcieGpexBridgeControl, ACC100_CFG_PCI_BRIDGE); |
4917 | for (i = 1; i < ACC100_GPEX_AXIMAP_NUM; i++) |
4918 | @@ -4452,20 +4461,9 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf) |
4919 | value = 1; |
4920 | acc100_reg_write(d, address, value); |
4921 | |
4922 | - /* DDR Configuration */ |
4923 | - address = HWPfDdrBcTim6; |
4924 | - value = acc100_reg_read(d, address); |
4925 | - value &= 0xFFFFFFFB; /* Bit 2 */ |
4926 | -#ifdef ACC100_DDR_ECC_ENABLE |
4927 | - value |= 0x4; |
4928 | -#endif |
4929 | - acc100_reg_write(d, address, value); |
4930 | - address = HWPfDdrPhyDqsCountNum; |
4931 | -#ifdef ACC100_DDR_ECC_ENABLE |
4932 | - value = 9; |
4933 | -#else |
4934 | - value = 8; |
4935 | -#endif |
4936 | + /* Enable granular dynamic clock gating */ |
4937 | + address = HWPfHiClkGateHystReg; |
4938 | + value = ACC100_CLOCK_GATING_EN; |
4939 | acc100_reg_write(d, address, value); |
4940 | |
4941 | /* Set default descriptor signature */ |
4942 | @@ -4483,6 +4481,17 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf) |
4943 | address = HWPfDmaAxcacheReg; |
4944 | acc100_reg_write(d, address, value); |
4945 | |
4946 | + /* Adjust PCIe Lane adaptation */ |
4947 | + for (i = 0; i < ACC100_QUAD_NUMS; i++) |
4948 | + for (j = 0; j < ACC100_LANES_PER_QUAD; j++) |
4949 | + acc100_reg_write(d, HwPfPcieLnAdaptctrl + i * ACC100_PCIE_QUAD_OFFSET |
4950 | + + j * ACC100_PCIE_LANE_OFFSET, ACC100_ADAPT); |
4951 | + |
4952 | + /* Enable PCIe live adaptation */ |
4953 | + for (i = 0; i < ACC100_QUAD_NUMS; i++) |
4954 | + acc100_reg_write(d, HwPfPciePcsEqControl + |
4955 | + i * ACC100_PCIE_QUAD_OFFSET, ACC100_PCS_EQ); |
4956 | + |
4957 | /* Default DMA Configuration (Qmgr Enabled) */ |
4958 | address = HWPfDmaConfig0Reg; |
4959 | value = 0; |
4960 | @@ -4501,6 +4510,11 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf) |
4961 | value = HWPfQmgrEgressQueuesTemplate; |
4962 | acc100_reg_write(d, address, value); |
4963 | |
4964 | + /* Default Fabric Mode */ |
4965 | + address = HWPfFabricMode; |
4966 | + value = ACC100_FABRIC_MODE; |
4967 | + acc100_reg_write(d, address, value); |
4968 | + |
4969 | /* ===== Qmgr Configuration ===== */ |
4970 | /* Configuration of the AQueue Depth QMGR_GRP_0_DEPTH_LOG2 for UL */ |
4971 | int totalQgs = conf->q_ul_4g.num_qgroups + |
4972 | @@ -4519,22 +4533,17 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf) |
4973 | } |
4974 | |
4975 | /* Template Priority in incremental order */ |
4976 | - for (template_idx = 0; template_idx < ACC100_NUM_TMPL; |
4977 | - template_idx++) { |
4978 | - address = HWPfQmgrGrpTmplateReg0Indx + |
4979 | - ACC100_BYTES_IN_WORD * (template_idx % 8); |
4980 | + for (template_idx = 0; template_idx < ACC100_NUM_TMPL; template_idx++) { |
4981 | + address = HWPfQmgrGrpTmplateReg0Indx + ACC100_BYTES_IN_WORD * template_idx; |
4982 | value = ACC100_TMPL_PRI_0; |
4983 | acc100_reg_write(d, address, value); |
4984 | - address = HWPfQmgrGrpTmplateReg1Indx + |
4985 | - ACC100_BYTES_IN_WORD * (template_idx % 8); |
4986 | + address = HWPfQmgrGrpTmplateReg1Indx + ACC100_BYTES_IN_WORD * template_idx; |
4987 | value = ACC100_TMPL_PRI_1; |
4988 | acc100_reg_write(d, address, value); |
4989 | - address = HWPfQmgrGrpTmplateReg2indx + |
4990 | - ACC100_BYTES_IN_WORD * (template_idx % 8); |
4991 | + address = HWPfQmgrGrpTmplateReg2indx + ACC100_BYTES_IN_WORD * template_idx; |
4992 | value = ACC100_TMPL_PRI_2; |
4993 | acc100_reg_write(d, address, value); |
4994 | - address = HWPfQmgrGrpTmplateReg3Indx + |
4995 | - ACC100_BYTES_IN_WORD * (template_idx % 8); |
4996 | + address = HWPfQmgrGrpTmplateReg3Indx + ACC100_BYTES_IN_WORD * template_idx; |
4997 | value = ACC100_TMPL_PRI_3; |
4998 | acc100_reg_write(d, address, value); |
4999 | } |
5000 | @@ -4585,9 +4594,6 @@ rte_acc100_configure(const char *dev_name, struct rte_acc100_conf *conf) |
PPA: https:/ /launchpad. net/~paelzer/ +archive/ ubuntu/ lp-1975764- dpdk-mre- sept-2022