Merge ~paelzer/ubuntu/+source/dpdk:lp-1940913-MRE-20.11.3-HIRSUTE into ubuntu/+source/dpdk:ubuntu/hirsute-devel

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Christian Ehrhardt 
Approved revision: f653bcabc24a827c0b729dbd38641dbcbfebdc31
Merged at revision: be80662c09bee7713b6316b704757d7c80311268
Proposed branch: ~paelzer/ubuntu/+source/dpdk:lp-1940913-MRE-20.11.3-HIRSUTE
Merge into: ubuntu/+source/dpdk:ubuntu/hirsute-devel
Diff against target: 35145 lines (+11003/-4997)
627 files modified
.ci/linux-build.sh (+48/-11)
.github/workflows/build.yml (+130/-0)
.travis.yml (+39/-12)
MAINTAINERS (+2/-0)
VERSION (+1/-1)
app/meson.build (+0/-4)
app/test-bbdev/test_bbdev_perf.c (+5/-2)
app/test-compress-perf/comp_perf_options_parse.c (+1/-1)
app/test-crypto-perf/cperf_options_parsing.c (+7/-1)
app/test-crypto-perf/cperf_test_common.c (+1/-1)
app/test-eventdev/evt_options.c (+2/-2)
app/test-eventdev/parser.c (+3/-1)
app/test-eventdev/parser.h (+1/-1)
app/test-eventdev/test_perf_common.c (+14/-8)
app/test-flow-perf/main.c (+22/-25)
app/test-pmd/bpf_cmd.c (+1/-1)
app/test-pmd/cmdline.c (+27/-20)
app/test-pmd/cmdline_flow.c (+2/-0)
app/test-pmd/config.c (+99/-14)
app/test-pmd/csumonly.c (+11/-10)
app/test-pmd/parameters.c (+10/-29)
app/test-pmd/testpmd.c (+75/-117)
app/test-pmd/testpmd.h (+2/-3)
app/test-regex/main.c (+3/-4)
app/test/autotest_test_funcs.py (+4/-1)
app/test/meson.build (+0/-3)
app/test/packet_burst_generator.c (+3/-2)
app/test/process.h (+8/-2)
app/test/test.c (+6/-5)
app/test/test_bpf.c (+1/-1)
app/test/test_cmdline_ipaddr.c (+1/-1)
app/test/test_cmdline_lib.c (+27/-12)
app/test/test_cmdline_num.c (+2/-2)
app/test/test_cryptodev.c (+50/-25)
app/test/test_cryptodev_aes_test_vectors.h (+1/-1)
app/test/test_cryptodev_blockcipher.c (+1/-1)
app/test/test_debug.c (+9/-2)
app/test/test_distributor_perf.c (+4/-2)
app/test/test_eal_flags.c (+1/-0)
app/test/test_event_crypto_adapter.c (+4/-5)
app/test/test_event_timer_adapter.c (+3/-1)
app/test/test_external_mem.c (+2/-1)
app/test/test_flow_classify.c (+6/-0)
app/test/test_kni.c (+6/-2)
app/test/test_mbuf.c (+9/-2)
app/test/test_mempool.c (+1/-1)
app/test/test_power_cpufreq.c (+84/-20)
app/test/test_prefetch.c (+1/-1)
app/test/test_reciprocal_division_perf.c (+24/-17)
app/test/test_stack.c (+4/-0)
app/test/test_stack_perf.c (+4/-0)
app/test/test_table_tables.c (+2/-1)
app/test/test_timer_secondary.c (+4/-4)
app/test/test_trace_perf.c (+2/-3)
buildtools/binutils-avx512-check.sh (+1/-1)
buildtools/check-symbols.sh (+1/-1)
buildtools/list-dir-globs.py (+1/-1)
buildtools/map-list-symbol.sh (+1/-1)
buildtools/meson.build (+2/-2)
buildtools/symlink-drivers-solibs.py (+49/-0)
config/meson.build (+10/-3)
config/ppc/meson.build (+14/-3)
debian/changelog (+23/-0)
debian/control (+2/-1)
debian/patches/disable_armhf_autopkgtest_fails.patch (+32/-0)
debian/patches/disable_autopkgtest_fails.patch (+49/-0)
debian/patches/disable_lcores_autotest_ppc.patch (+26/-0)
debian/patches/disable_ppc64_autopkgtest_fails.patch (+27/-0)
debian/patches/series (+5/-1)
debian/patches/ubuntu/lp-1940957-net-i40e-support-25G-AOC-ACC-cables.patch (+42/-0)
dev/null (+0/-66)
devtools/check-maintainers.sh (+2/-2)
devtools/check-symbol-maps.sh (+1/-2)
devtools/checkpatches.sh (+1/-2)
doc/api/doxy-api.conf.in (+2/-1)
doc/guides/conf.py (+4/-45)
doc/guides/contributing/coding_style.rst (+1/-1)
doc/guides/contributing/documentation.rst (+10/-64)
doc/guides/cryptodevs/caam_jr.rst (+1/-1)
doc/guides/cryptodevs/qat.rst (+1/-1)
doc/guides/cryptodevs/scheduler.rst (+1/-1)
doc/guides/cryptodevs/virtio.rst (+1/-1)
doc/guides/eventdevs/dlb2.rst (+10/-31)
doc/guides/howto/pvp_reference_benchmark.rst (+1/-1)
doc/guides/linux_gsg/linux_drivers.rst (+10/-0)
doc/guides/nics/bnx2x.rst (+1/-1)
doc/guides/nics/dpaa.rst (+3/-3)
doc/guides/nics/ena.rst (+1/-1)
doc/guides/nics/enic.rst (+14/-18)
doc/guides/nics/hns3.rst (+3/-3)
doc/guides/nics/i40e.rst (+1/-1)
doc/guides/nics/ice.rst (+1/-1)
doc/guides/nics/mlx5.rst (+8/-1)
doc/guides/nics/netvsc.rst (+1/-1)
doc/guides/nics/nfp.rst (+5/-5)
doc/guides/nics/octeontx2.rst (+2/-2)
doc/guides/nics/virtio.rst (+4/-3)
doc/guides/nics/vmxnet3.rst (+2/-1)
doc/guides/platform/dpaa.rst (+1/-1)
doc/guides/prog_guide/bbdev.rst (+1/-1)
doc/guides/prog_guide/env_abstraction_layer.rst (+1/-1)
doc/guides/prog_guide/eventdev.rst (+1/-1)
doc/guides/prog_guide/multi_proc_support.rst (+1/-1)
doc/guides/prog_guide/qos_framework.rst (+1/-1)
doc/guides/prog_guide/regexdev.rst (+1/-1)
doc/guides/prog_guide/vhost_lib.rst (+12/-0)
doc/guides/prog_guide/writing_efficient_code.rst (+8/-7)
doc/guides/rawdevs/ioat.rst (+1/-1)
doc/guides/rawdevs/ntb.rst (+1/-1)
doc/guides/regexdevs/features_overview.rst (+1/-1)
doc/guides/rel_notes/deprecation.rst (+10/-14)
doc/guides/rel_notes/known_issues.rst (+5/-5)
doc/guides/rel_notes/release_16_11.rst (+1/-1)
doc/guides/rel_notes/release_19_08.rst (+1/-1)
doc/guides/rel_notes/release_20_05.rst (+7/-0)
doc/guides/rel_notes/release_20_11.rst (+896/-0)
doc/guides/rel_notes/release_2_2.rst (+1/-1)
doc/guides/sample_app_ug/fips_validation.rst (+1/-1)
doc/guides/sample_app_ug/hello_world.rst (+1/-1)
doc/guides/sample_app_ug/ipsec_secgw.rst (+1/-1)
doc/guides/sample_app_ug/performance_thread.rst (+1/-1)
doc/guides/sample_app_ug/vhost.rst (+1/-1)
doc/guides/testpmd_app_ug/run_app.rst (+7/-5)
doc/guides/testpmd_app_ug/testpmd_funcs.rst (+4/-3)
doc/guides/tools/hugepages.rst (+3/-3)
doc/meson.build (+1/-1)
drivers/bus/dpaa/base/fman/fman.c (+1/-1)
drivers/bus/dpaa/base/fman/fman_hw.c (+16/-17)
drivers/bus/dpaa/base/fman/netcfg_layer.c (+2/-2)
drivers/bus/dpaa/base/qbman/bman_driver.c (+9/-4)
drivers/bus/dpaa/base/qbman/qman_driver.c (+12/-5)
drivers/bus/dpaa/include/fsl_qman.h (+1/-1)
drivers/bus/dpaa/include/netcfg.h (+0/-1)
drivers/bus/fslmc/fslmc_logs.h (+0/-2)
drivers/bus/fslmc/qbman/include/compat.h (+0/-3)
drivers/bus/fslmc/qbman/qbman_portal.c (+3/-11)
drivers/bus/pci/linux/pci.c (+2/-2)
drivers/bus/pci/linux/pci_uio.c (+12/-0)
drivers/bus/pci/pci_common.c (+4/-1)
drivers/bus/pci/rte_bus_pci.h (+7/-6)
drivers/bus/pci/windows/pci.c (+15/-13)
drivers/bus/vmbus/vmbus_common.c (+4/-1)
drivers/common/dpaax/caamflib/compat.h (+6/-6)
drivers/common/dpaax/compat.h (+0/-5)
drivers/common/dpaax/dpaax_iova_table.c (+3/-1)
drivers/common/dpaax/meson.build (+0/-1)
drivers/common/iavf/iavf_impl.c (+3/-2)
drivers/common/iavf/virtchnl.h (+3/-3)
drivers/common/mlx5/linux/meson.build (+4/-0)
drivers/common/mlx5/linux/mlx5_glue.c (+64/-9)
drivers/common/mlx5/linux/mlx5_glue.h (+17/-1)
drivers/common/mlx5/linux/mlx5_nl.c (+76/-15)
drivers/common/mlx5/mlx5_common.c (+1/-8)
drivers/common/mlx5/mlx5_common_mr.c (+89/-0)
drivers/common/mlx5/mlx5_common_mr.h (+3/-0)
drivers/common/mlx5/mlx5_devx_cmds.c (+135/-5)
drivers/common/mlx5/mlx5_devx_cmds.h (+16/-0)
drivers/common/mlx5/mlx5_prm.h (+151/-4)
drivers/common/mlx5/version.map (+5/-1)
drivers/common/octeontx2/otx2_dev.h (+3/-0)
drivers/common/octeontx2/otx2_mbox.h (+7/-0)
drivers/common/qat/qat_device.h (+1/-1)
drivers/common/sfc_efx/base/ef10_filter.c (+9/-2)
drivers/common/sfc_efx/base/ef10_nic.c (+9/-1)
drivers/common/sfc_efx/base/efx_mae.c (+50/-11)
drivers/common/sfc_efx/base/efx_mcdi.c (+10/-0)
drivers/common/sfc_efx/base/efx_pci.c (+2/-1)
drivers/common/sfc_efx/base/rhead_nic.c (+0/-1)
drivers/common/sfc_efx/meson.build (+1/-1)
drivers/compress/qat/qat_comp.c (+4/-3)
drivers/compress/qat/qat_comp_pmd.c (+75/-36)
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c (+8/-2)
drivers/crypto/bcmfs/bcmfs_logs.c (+2/-15)
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c (+24/-26)
drivers/crypto/dpaa_sec/dpaa_sec.c (+14/-0)
drivers/crypto/mvsam/rte_mrvl_pmd.c (+10/-2)
drivers/crypto/mvsam/rte_mrvl_pmd_ops.c (+7/-7)
drivers/crypto/octeontx/otx_cryptodev.c (+4/-1)
drivers/crypto/octeontx/otx_cryptodev_ops.c (+2/-2)
drivers/crypto/octeontx2/otx2_cryptodev_qp.h (+3/-1)
drivers/crypto/octeontx2/otx2_ipsec_po_ops.h (+2/-12)
drivers/crypto/octeontx2/otx2_security.h (+6/-4)
drivers/crypto/qat/qat_asym_pmd.c (+4/-0)
drivers/crypto/qat/qat_sym.c (+7/-3)
drivers/crypto/qat/qat_sym_session.c (+3/-0)
drivers/crypto/zuc/rte_zuc_pmd.c (+4/-4)
drivers/event/dlb/dlb.c (+1/-1)
drivers/event/dlb/pf/dlb_pf.c (+2/-1)
drivers/event/dlb2/dlb2.c (+1/-1)
drivers/event/dlb2/dlb2_priv.h (+0/-3)
drivers/event/dlb2/pf/dlb2_pf.c (+2/-1)
drivers/event/dpaa2/dpaa2_eventdev_logs.h (+0/-2)
drivers/event/octeontx2/otx2_evdev.c (+41/-24)
drivers/event/octeontx2/otx2_evdev_adptr.c (+1/-1)
drivers/event/octeontx2/otx2_evdev_crypto_adptr.c (+80/-30)
drivers/event/octeontx2/otx2_worker.h (+1/-1)
drivers/mempool/octeontx2/otx2_mempool_ops.c (+4/-2)
drivers/meson.build (+1/-1)
drivers/net/af_xdp/rte_eth_af_xdp.c (+2/-1)
drivers/net/ark/ark_ethdev.c (+3/-0)
drivers/net/ark/ark_ethdev_rx.c (+11/-38)
drivers/net/ark/ark_pktdir.c (+1/-1)
drivers/net/ark/ark_pktdir.h (+1/-1)
drivers/net/atlantic/atl_ethdev.c (+4/-3)
drivers/net/bnx2x/bnx2x.h (+7/-6)
drivers/net/bnx2x/bnx2x_rxtx.c (+7/-6)
drivers/net/bnxt/bnxt.h (+59/-9)
drivers/net/bnxt/bnxt_cpr.c (+2/-0)
drivers/net/bnxt/bnxt_cpr.h (+36/-4)
drivers/net/bnxt/bnxt_ethdev.c (+501/-144)
drivers/net/bnxt/bnxt_flow.c (+114/-56)
drivers/net/bnxt/bnxt_hwrm.c (+294/-174)
drivers/net/bnxt/bnxt_hwrm.h (+5/-10)
drivers/net/bnxt/bnxt_irq.c (+8/-4)
drivers/net/bnxt/bnxt_reps.c (+2/-2)
drivers/net/bnxt/bnxt_ring.c (+14/-16)
drivers/net/bnxt/bnxt_ring.h (+1/-1)
drivers/net/bnxt/bnxt_rxq.c (+4/-33)
drivers/net/bnxt/bnxt_rxq.h (+1/-0)
drivers/net/bnxt/bnxt_rxr.c (+116/-17)
drivers/net/bnxt/bnxt_rxr.h (+4/-1)
drivers/net/bnxt/bnxt_rxtx_vec_neon.c (+24/-7)
drivers/net/bnxt/bnxt_rxtx_vec_sse.c (+24/-7)
drivers/net/bnxt/bnxt_stats.c (+141/-25)
drivers/net/bnxt/bnxt_stats.h (+1/-6)
drivers/net/bnxt/bnxt_txq.c (+2/-2)
drivers/net/bnxt/bnxt_txr.c (+12/-14)
drivers/net/bnxt/bnxt_util.h (+2/-0)
drivers/net/bnxt/bnxt_vnic.c (+4/-3)
drivers/net/bnxt/bnxt_vnic.h (+1/-3)
drivers/net/bnxt/meson.build (+1/-1)
drivers/net/bonding/eth_bond_private.h (+1/-1)
drivers/net/bonding/rte_eth_bond_8023ad.c (+16/-1)
drivers/net/bonding/rte_eth_bond_api.c (+17/-9)
drivers/net/bonding/rte_eth_bond_args.c (+4/-4)
drivers/net/bonding/rte_eth_bond_pmd.c (+18/-8)
drivers/net/cxgbe/base/common.h (+9/-9)
drivers/net/dpaa/dpaa_ethdev.c (+19/-7)
drivers/net/dpaa/dpaa_flow.c (+4/-1)
drivers/net/dpaa2/dpaa2_ethdev.c (+19/-6)
drivers/net/e1000/base/e1000_i210.c (+2/-0)
drivers/net/e1000/e1000_logs.c (+5/-44)
drivers/net/e1000/em_ethdev.c (+9/-12)
drivers/net/e1000/igb_ethdev.c (+14/-19)
drivers/net/e1000/igb_flow.c (+1/-1)
drivers/net/e1000/igb_rxtx.c (+6/-3)
drivers/net/ena/base/ena_com.c (+36/-24)
drivers/net/ena/base/ena_defs/ena_admin_defs.h (+41/-44)
drivers/net/ena/base/ena_eth_com.c (+9/-7)
drivers/net/ena/base/ena_plat_dpdk.h (+7/-2)
drivers/net/ena/ena_ethdev.c (+29/-15)
drivers/net/ena/ena_platform.h (+0/-12)
drivers/net/enic/base/vnic_dev.c (+1/-1)
drivers/net/enic/base/vnic_enet.h (+1/-0)
drivers/net/enic/enic.h (+2/-2)
drivers/net/enic/enic_ethdev.c (+49/-36)
drivers/net/enic/enic_fm_flow.c (+4/-2)
drivers/net/enic/enic_main.c (+94/-67)
drivers/net/enic/enic_res.c (+3/-4)
drivers/net/failsafe/failsafe_ops.c (+8/-2)
drivers/net/hinic/base/hinic_compat.h (+8/-17)
drivers/net/hinic/base/hinic_pmd_niccfg.h (+0/-9)
drivers/net/hinic/base/hinic_pmd_nicio.c (+2/-2)
drivers/net/hinic/hinic_pmd_ethdev.c (+8/-9)
drivers/net/hinic/hinic_pmd_ethdev.h (+17/-0)
drivers/net/hns3/hns3_cmd.c (+17/-11)
drivers/net/hns3/hns3_cmd.h (+9/-12)
drivers/net/hns3/hns3_dcb.c (+60/-49)
drivers/net/hns3/hns3_dcb.h (+2/-2)
drivers/net/hns3/hns3_ethdev.c (+295/-214)
drivers/net/hns3/hns3_ethdev.h (+32/-17)
drivers/net/hns3/hns3_ethdev_vf.c (+78/-92)
drivers/net/hns3/hns3_fdir.c (+31/-21)
drivers/net/hns3/hns3_fdir.h (+3/-9)
drivers/net/hns3/hns3_flow.c (+167/-85)
drivers/net/hns3/hns3_intr.c (+36/-41)
drivers/net/hns3/hns3_intr.h (+3/-1)
drivers/net/hns3/hns3_logs.h (+1/-1)
drivers/net/hns3/hns3_mbx.c (+190/-66)
drivers/net/hns3/hns3_mbx.h (+19/-13)
drivers/net/hns3/hns3_mp.c (+3/-3)
drivers/net/hns3/hns3_mp.h (+1/-1)
drivers/net/hns3/hns3_regs.c (+3/-6)
drivers/net/hns3/hns3_regs.h (+1/-1)
drivers/net/hns3/hns3_rss.c (+1/-1)
drivers/net/hns3/hns3_rss.h (+1/-1)
drivers/net/hns3/hns3_rxtx.c (+237/-77)
drivers/net/hns3/hns3_rxtx.h (+23/-14)
drivers/net/hns3/hns3_rxtx_vec.c (+29/-9)
drivers/net/hns3/hns3_rxtx_vec.h (+4/-1)
drivers/net/hns3/hns3_rxtx_vec_neon.h (+1/-1)
drivers/net/hns3/hns3_rxtx_vec_sve.c (+27/-7)
drivers/net/hns3/hns3_stats.c (+5/-5)
drivers/net/hns3/hns3_stats.h (+3/-3)
drivers/net/hns3/meson.build (+20/-2)
drivers/net/i40e/base/virtchnl.h (+28/-1)
drivers/net/i40e/i40e_ethdev.c (+157/-63)
drivers/net/i40e/i40e_ethdev.h (+8/-6)
drivers/net/i40e/i40e_ethdev_vf.c (+48/-47)
drivers/net/i40e/i40e_fdir.c (+95/-4)
drivers/net/i40e/i40e_flow.c (+87/-98)
drivers/net/i40e/i40e_pf.c (+65/-0)
drivers/net/i40e/i40e_rxtx.c (+15/-7)
drivers/net/i40e/i40e_rxtx_vec_neon.c (+16/-4)
drivers/net/i40e/i40e_vf_representor.c (+20/-17)
drivers/net/iavf/iavf.h (+3/-3)
drivers/net/iavf/iavf_ethdev.c (+8/-10)
drivers/net/iavf/iavf_rxtx.c (+11/-1)
drivers/net/iavf/iavf_rxtx.h (+1/-1)
drivers/net/iavf/iavf_rxtx_vec_avx2.c (+2/-118)
drivers/net/iavf/iavf_rxtx_vec_avx512.c (+8/-5)
drivers/net/iavf/iavf_rxtx_vec_common.h (+203/-0)
drivers/net/iavf/iavf_vchnl.c (+20/-9)
drivers/net/ice/base/ice_flow.c (+8/-3)
drivers/net/ice/base/ice_lan_tx_rx.h (+1/-1)
drivers/net/ice/base/ice_osdep.h (+4/-3)
drivers/net/ice/base/ice_switch.c (+2/-1)
drivers/net/ice/base/meson.build (+5/-0)
drivers/net/ice/ice_dcf_ethdev.c (+4/-3)
drivers/net/ice/ice_dcf_parent.c (+2/-1)
drivers/net/ice/ice_ethdev.c (+75/-36)
drivers/net/ice/ice_ethdev.h (+6/-3)
drivers/net/ice/ice_fdir_filter.c (+3/-3)
drivers/net/ice/ice_hash.c (+14/-0)
drivers/net/ice/ice_rxtx.c (+31/-37)
drivers/net/ice/ice_rxtx.h (+2/-2)
drivers/net/ice/ice_rxtx_vec_avx2.c (+3/-119)
drivers/net/ice/ice_rxtx_vec_avx512.c (+5/-2)
drivers/net/ice/ice_rxtx_vec_common.h (+204/-1)
drivers/net/ice/ice_rxtx_vec_sse.c (+1/-1)
drivers/net/ice/ice_switch_filter.c (+3/-3)
drivers/net/ice/meson.build (+2/-0)
drivers/net/igc/igc_ethdev.c (+23/-23)
drivers/net/igc/igc_ethdev.h (+2/-1)
drivers/net/igc/igc_flow.c (+1/-1)
drivers/net/igc/igc_txrx.c (+16/-14)
drivers/net/ionic/ionic_ethdev.c (+9/-6)
drivers/net/ionic/ionic_lif.c (+3/-2)
drivers/net/ixgbe/ixgbe_ethdev.c (+18/-4)
drivers/net/ixgbe/ixgbe_flow.c (+1/-0)
drivers/net/kni/rte_eth_kni.c (+10/-2)
drivers/net/memif/memif_socket.c (+12/-3)
drivers/net/memif/rte_eth_memif.c (+1/-0)
drivers/net/memif/rte_eth_memif.h (+0/-4)
drivers/net/mlx4/mlx4.c (+1/-0)
drivers/net/mlx4/mlx4_flow.c (+2/-1)
drivers/net/mlx4/mlx4_mp.c (+1/-1)
drivers/net/mlx4/mlx4_rxtx.c (+0/-4)
drivers/net/mlx4/mlx4_txq.c (+9/-10)
drivers/net/mlx5/linux/mlx5_ethdev_os.c (+2/-2)
drivers/net/mlx5/linux/mlx5_mp_os.c (+1/-1)
drivers/net/mlx5/linux/mlx5_os.c (+194/-58)
drivers/net/mlx5/linux/mlx5_socket.c (+0/-4)
drivers/net/mlx5/linux/mlx5_verbs.c (+121/-0)
drivers/net/mlx5/linux/mlx5_verbs.h (+2/-0)
drivers/net/mlx5/meson.build (+1/-0)
drivers/net/mlx5/mlx5.c (+20/-8)
drivers/net/mlx5/mlx5.h (+20/-3)
drivers/net/mlx5/mlx5_devx.c (+6/-0)
drivers/net/mlx5/mlx5_flow.c (+184/-82)
drivers/net/mlx5/mlx5_flow.h (+48/-21)
drivers/net/mlx5/mlx5_flow_age.c (+3/-2)
drivers/net/mlx5/mlx5_flow_dv.c (+304/-100)
drivers/net/mlx5/mlx5_flow_verbs.c (+6/-4)
drivers/net/mlx5/mlx5_mr.c (+16/-96)
drivers/net/mlx5/mlx5_rxq.c (+3/-9)
drivers/net/mlx5/mlx5_rxtx.c (+27/-20)
drivers/net/mlx5/mlx5_rxtx.h (+1/-0)
drivers/net/mlx5/mlx5_rxtx_vec.c (+2/-1)
drivers/net/mlx5/mlx5_rxtx_vec_altivec.h (+7/-6)
drivers/net/mlx5/mlx5_rxtx_vec_neon.h (+15/-11)
drivers/net/mlx5/mlx5_rxtx_vec_sse.h (+6/-5)
drivers/net/mlx5/mlx5_trigger.c (+15/-7)
drivers/net/mlx5/mlx5_txpp.c (+17/-6)
drivers/net/mlx5/mlx5_txq.c (+1/-1)
drivers/net/mvpp2/mrvl_ethdev.c (+9/-3)
drivers/net/mvpp2/mrvl_ethdev.h (+2/-1)
drivers/net/mvpp2/mrvl_tm.c (+66/-1)
drivers/net/nfp/nfp_net.c (+15/-11)
drivers/net/octeontx/base/octeontx_pkivf.h (+0/-1)
drivers/net/octeontx2/otx2_ethdev.c (+41/-31)
drivers/net/octeontx2/otx2_ethdev.h (+12/-1)
drivers/net/octeontx2/otx2_ethdev_devargs.c (+1/-1)
drivers/net/octeontx2/otx2_ethdev_ops.c (+2/-3)
drivers/net/octeontx2/otx2_flow.c (+14/-2)
drivers/net/octeontx2/otx2_flow.h (+0/-1)
drivers/net/octeontx2/otx2_tm.c (+6/-0)
drivers/net/octeontx2/otx2_tx.c (+6/-2)
drivers/net/octeontx2/otx2_tx.h (+7/-5)
drivers/net/octeontx2/otx2_vlan.c (+4/-4)
drivers/net/pcap/rte_eth_pcap.c (+8/-4)
drivers/net/pfe/pfe_ethdev.c (+0/-5)
drivers/net/qede/base/ecore_int.c (+1/-1)
drivers/net/qede/qede_ethdev.c (+4/-5)
drivers/net/sfc/meson.build (+1/-1)
drivers/net/sfc/sfc.h (+3/-2)
drivers/net/sfc/sfc_ef100_rx.c (+14/-9)
drivers/net/sfc/sfc_ethdev.c (+50/-44)
drivers/net/sfc/sfc_mae.c (+35/-25)
drivers/net/sfc/sfc_mae.h (+2/-1)
drivers/net/sfc/sfc_port.c (+32/-17)
drivers/net/softnic/conn.c (+1/-0)
drivers/net/softnic/rte_eth_softnic.c (+28/-4)
drivers/net/softnic/rte_eth_softnic_action.c (+1/-0)
drivers/net/softnic/rte_eth_softnic_internals.h (+3/-2)
drivers/net/tap/rte_eth_tap.c (+18/-9)
drivers/net/tap/tap_flow.c (+7/-1)
drivers/net/tap/tap_intr.c (+1/-1)
drivers/net/txgbe/base/txgbe_eeprom.c (+2/-74)
drivers/net/txgbe/base/txgbe_eeprom.h (+0/-2)
drivers/net/txgbe/base/txgbe_type.h (+1/-0)
drivers/net/txgbe/txgbe_ethdev.c (+39/-8)
drivers/net/txgbe/txgbe_ptypes.c (+3/-1)
drivers/net/virtio/meson.build (+1/-1)
drivers/net/virtio/virtio_ethdev.c (+67/-0)
drivers/net/virtio/virtio_ethdev.h (+5/-0)
drivers/net/virtio/virtio_pci.h (+2/-0)
drivers/net/virtio/virtio_rxtx.c (+61/-19)
drivers/net/virtio/virtio_rxtx_simple_altivec.c (+6/-6)
drivers/net/virtio/virtio_rxtx_simple_neon.c (+6/-6)
drivers/net/virtio/virtio_rxtx_simple_sse.c (+6/-6)
drivers/net/virtio/virtio_user/virtio_user_dev.c (+6/-0)
drivers/net/virtio/virtio_user_ethdev.c (+56/-19)
drivers/raw/ifpga/ifpga_rawdev.c (+2/-2)
drivers/raw/ifpga/ifpga_rawdev.h (+2/-0)
drivers/raw/ioat/dpdk_idxd_cfg.py (+7/-7)
drivers/raw/ntb/ntb.c (+13/-0)
drivers/raw/ntb/ntb_hw_intel.c (+5/-0)
drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c (+1/-0)
drivers/raw/skeleton/skeleton_rawdev_test.c (+1/-0)
drivers/regex/mlx5/mlx5_regex.c (+1/-2)
drivers/regex/mlx5/mlx5_regex.h (+1/-0)
drivers/regex/mlx5/mlx5_regex_control.c (+1/-0)
drivers/regex/mlx5/mlx5_regex_fastpath.c (+2/-2)
drivers/regex/octeontx2/meson.build (+0/-1)
drivers/vdpa/ifc/base/ifcvf.c (+6/-1)
drivers/vdpa/mlx5/mlx5_vdpa.c (+3/-0)
drivers/vdpa/mlx5/mlx5_vdpa.h (+1/-0)
drivers/vdpa/mlx5/mlx5_vdpa_event.c (+3/-1)
drivers/vdpa/mlx5/mlx5_vdpa_virtq.c (+9/-6)
examples/bbdev_app/Makefile (+3/-3)
examples/bbdev_app/main.c (+4/-1)
examples/bond/Makefile (+3/-3)
examples/bond/main.c (+4/-0)
examples/cmdline/Makefile (+3/-3)
examples/cmdline/main.c (+3/-0)
examples/distributor/Makefile (+3/-3)
examples/distributor/main.c (+3/-0)
examples/ethtool/ethtool-app/Makefile (+3/-3)
examples/ethtool/ethtool-app/ethapp.c (+0/-1)
examples/ethtool/ethtool-app/main.c (+3/-0)
examples/ethtool/lib/Makefile (+3/-3)
examples/eventdev_pipeline/Makefile (+3/-3)
examples/fips_validation/Makefile (+3/-3)
examples/fips_validation/main.c (+3/-0)
examples/flow_classify/Makefile (+3/-3)
examples/flow_classify/flow_classify.c (+4/-1)
examples/flow_filtering/Makefile (+3/-3)
examples/flow_filtering/main.c (+6/-1)
examples/helloworld/Makefile (+3/-3)
examples/helloworld/main.c (+4/-0)
examples/ioat/Makefile (+3/-3)
examples/ioat/ioatfwd.c (+3/-0)
examples/ip_fragmentation/Makefile (+3/-3)
examples/ip_fragmentation/main.c (+3/-0)
examples/ip_pipeline/Makefile (+3/-3)
examples/ip_reassembly/Makefile (+3/-3)
examples/ip_reassembly/main.c (+3/-0)
examples/ipsec-secgw/Makefile (+3/-3)
examples/ipsec-secgw/ipsec-secgw.c (+3/-0)
examples/ipv4_multicast/Makefile (+3/-3)
examples/ipv4_multicast/main.c (+3/-0)
examples/kni/Makefile (+3/-3)
examples/kni/main.c (+3/-0)
examples/l2fwd-cat/Makefile (+3/-3)
examples/l2fwd-cat/l2fwd-cat.c (+4/-1)
examples/l2fwd-crypto/Makefile (+3/-3)
examples/l2fwd-crypto/main.c (+23/-0)
examples/l2fwd-event/Makefile (+3/-3)
examples/l2fwd-event/main.c (+3/-0)
examples/l2fwd-jobstats/Makefile (+3/-3)
examples/l2fwd-jobstats/main.c (+3/-0)
examples/l2fwd-keepalive/Makefile (+3/-3)
examples/l2fwd-keepalive/ka-agent/Makefile (+3/-3)
examples/l2fwd-keepalive/main.c (+4/-0)
examples/l2fwd/Makefile (+3/-3)
examples/l2fwd/main.c (+17/-3)
examples/l3fwd-acl/Makefile (+3/-3)
examples/l3fwd-acl/main.c (+3/-0)
examples/l3fwd-graph/Makefile (+3/-3)
examples/l3fwd-graph/main.c (+3/-0)
examples/l3fwd-power/Makefile (+3/-3)
examples/l3fwd-power/main.c (+2/-2)
examples/l3fwd/Makefile (+3/-3)
examples/l3fwd/l3fwd_lpm.c (+16/-10)
examples/l3fwd/main.c (+4/-0)
examples/link_status_interrupt/Makefile (+3/-3)
examples/link_status_interrupt/main.c (+3/-0)
examples/meson.build (+7/-3)
examples/multi_process/client_server_mp/mp_client/Makefile (+3/-3)
examples/multi_process/client_server_mp/mp_client/client.c (+3/-0)
examples/multi_process/client_server_mp/mp_server/Makefile (+3/-3)
examples/multi_process/client_server_mp/mp_server/main.c (+4/-0)
examples/multi_process/hotplug_mp/Makefile (+3/-3)
examples/multi_process/simple_mp/Makefile (+3/-3)
examples/multi_process/simple_mp/main.c (+4/-0)
examples/multi_process/symmetric_mp/Makefile (+3/-3)
examples/multi_process/symmetric_mp/main.c (+3/-0)
examples/ntb/Makefile (+3/-3)
examples/ntb/ntb_fwd.c (+3/-0)
examples/packet_ordering/Makefile (+3/-3)
examples/packet_ordering/main.c (+5/-1)
examples/performance-thread/l3fwd-thread/Makefile (+3/-2)
examples/performance-thread/l3fwd-thread/main.c (+3/-0)
examples/performance-thread/pthread_shim/Makefile (+3/-3)
examples/performance-thread/pthread_shim/main.c (+4/-0)
examples/pipeline/Makefile (+3/-3)
examples/pipeline/main.c (+3/-0)
examples/ptpclient/Makefile (+3/-3)
examples/ptpclient/ptpclient.c (+3/-4)
examples/qos_meter/Makefile (+3/-3)
examples/qos_meter/main.c (+3/-0)
examples/qos_sched/Makefile (+3/-3)
examples/qos_sched/main.c (+3/-0)
examples/rxtx_callbacks/Makefile (+3/-3)
examples/rxtx_callbacks/main.c (+5/-1)
examples/server_node_efd/node/Makefile (+3/-3)
examples/server_node_efd/node/node.c (+3/-0)
examples/server_node_efd/server/Makefile (+3/-3)
examples/server_node_efd/server/main.c (+4/-0)
examples/service_cores/Makefile (+3/-3)
examples/service_cores/main.c (+3/-0)
examples/skeleton/Makefile (+3/-3)
examples/skeleton/basicfwd.c (+4/-1)
examples/timer/Makefile (+3/-3)
examples/timer/main.c (+13/-10)
examples/vdpa/Makefile (+3/-3)
examples/vdpa/main.c (+3/-0)
examples/vhost/Makefile (+3/-3)
examples/vhost/main.c (+26/-22)
examples/vhost/virtio_net.c (+7/-1)
examples/vhost_blk/Makefile (+3/-3)
examples/vhost_blk/vhost_blk.c (+3/-0)
examples/vhost_crypto/Makefile (+3/-3)
examples/vhost_crypto/main.c (+4/-1)
examples/vm_power_manager/Makefile (+3/-3)
examples/vm_power_manager/guest_cli/Makefile (+3/-3)
examples/vm_power_manager/guest_cli/main.c (+3/-0)
examples/vm_power_manager/main.c (+3/-0)
examples/vmdq/Makefile (+3/-3)
examples/vmdq/main.c (+3/-0)
examples/vmdq_dcb/Makefile (+3/-3)
examples/vmdq_dcb/main.c (+3/-0)
kernel/linux/kni/kni_net.c (+36/-18)
lib/librte_acl/acl_run_avx512_common.h (+24/-0)
lib/librte_bpf/bpf_validate.c (+1/-1)
lib/librte_cryptodev/rte_cryptodev_pmd.c (+2/-1)
lib/librte_distributor/rte_distributor.c (+1/-1)
lib/librte_eal/arm/rte_cpuflags.c (+1/-1)
lib/librte_eal/common/eal_common_fbarray.c (+3/-4)
lib/librte_eal/common/eal_common_options.c (+9/-3)
lib/librte_eal/common/eal_common_proc.c (+27/-22)
lib/librte_eal/common/eal_common_thread.c (+38/-28)
lib/librte_eal/common/malloc_mp.c (+1/-3)
lib/librte_eal/freebsd/eal.c (+4/-0)
lib/librte_eal/freebsd/include/rte_os.h (+3/-3)
lib/librte_eal/include/rte_bitmap.h (+1/-2)
lib/librte_eal/include/rte_eal_paging.h (+1/-1)
lib/librte_eal/include/rte_lcore.h (+8/-0)
lib/librte_eal/include/rte_malloc.h (+1/-1)
lib/librte_eal/include/rte_reciprocal.h (+8/-0)
lib/librte_eal/include/rte_service.h (+1/-4)
lib/librte_eal/include/rte_vfio.h (+5/-3)
lib/librte_eal/linux/eal.c (+4/-0)
lib/librte_eal/linux/eal_log.c (+3/-3)
lib/librte_eal/linux/eal_memalloc.c (+2/-12)
lib/librte_eal/linux/eal_vfio.c (+41/-57)
lib/librte_eal/linux/eal_vfio.h (+1/-0)
lib/librte_eal/linux/include/rte_os.h (+5/-3)
lib/librte_eal/unix/eal_file.c (+1/-0)
lib/librte_eal/unix/eal_unix_memory.c (+6/-5)
lib/librte_eal/version.map (+0/-1)
lib/librte_eal/windows/eal.c (+5/-0)
lib/librte_eal/windows/eal_alarm.c (+12/-0)
lib/librte_eal/windows/eal_hugepages.c (+4/-0)
lib/librte_eal/windows/eal_memory.c (+8/-1)
lib/librte_eal/windows/eal_thread.c (+2/-2)
lib/librte_eal/windows/eal_windows.h (+5/-0)
lib/librte_eal/windows/include/pthread.h (+11/-5)
lib/librte_eal/windows/include/rte_os.h (+2/-3)
lib/librte_eal/windows/include/sched.h (+1/-0)
lib/librte_ethdev/rte_ethdev.c (+13/-1)
lib/librte_ethdev/rte_ethdev.h (+5/-0)
lib/librte_ethdev/rte_flow.h (+3/-3)
lib/librte_eventdev/rte_event_crypto_adapter.c (+1/-0)
lib/librte_eventdev/rte_event_eth_rx_adapter.c (+2/-3)
lib/librte_eventdev/rte_event_eth_tx_adapter.c (+0/-1)
lib/librte_flow_classify/rte_flow_classify.c (+2/-2)
lib/librte_graph/graph_stats.c (+5/-2)
lib/librte_ip_frag/rte_ipv4_fragmentation.c (+21/-13)
lib/librte_kni/rte_kni.c (+8/-4)
lib/librte_kni/rte_kni_common.h (+1/-0)
lib/librte_mbuf/rte_mbuf_dyn.c (+8/-2)
lib/librte_net/rte_ip.h (+1/-1)
lib/librte_pipeline/rte_swx_pipeline.c (+394/-100)
lib/librte_power/guest_channel.c (+11/-11)
lib/librte_power/power_acpi_cpufreq.c (+3/-2)
lib/librte_power/power_pstate_cpufreq.c (+3/-2)
lib/librte_power/rte_power_guest_channel.h (+0/-8)
lib/librte_power/version.map (+0/-2)
lib/librte_rib/rte_rib6.c (+21/-8)
lib/librte_sched/rte_sched.c (+33/-29)
lib/librte_stack/rte_stack.c (+3/-1)
lib/librte_stack/rte_stack.h (+2/-1)
lib/librte_stack/rte_stack_lf.h (+5/-0)
lib/librte_table/rte_swx_table_em.c (+3/-5)
lib/librte_telemetry/rte_telemetry.h (+4/-0)
lib/librte_telemetry/telemetry.c (+2/-0)
lib/librte_vhost/rte_vhost.h (+1/-0)
lib/librte_vhost/socket.c (+4/-1)
lib/librte_vhost/vhost.c (+6/-2)
lib/librte_vhost/vhost.h (+8/-6)
lib/librte_vhost/vhost_crypto.c (+4/-2)
lib/librte_vhost/vhost_user.c (+42/-11)
lib/librte_vhost/virtio_net.c (+265/-59)
license/README (+2/-2)
meson.build (+1/-1)
Reviewer Review Type Date Requested Status
Bryce Harrington (community) Approve
Canonical Server Pending
Canonical Server packageset reviewers Pending
Review via email: mp+408162@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

FYI this follows Debians model of importing the upstream not as a single commit, but as

To ease comparison I recommend from <email address hidden>:debian/dpdk.git the branch upstream-20.11-stable

With that you can easily see that it matches the upstream release and other than that doesn't change too much.

Revision history for this message
Bryce Harrington (bryce) wrote :

LGTM, see focal MP for detail.

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

Thank you, uploaded

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading dpdk_20.11.3-0ubuntu0.21.04.1.dsc: done.
  Uploading dpdk_20.11.3.orig.tar.xz: done.
  Uploading dpdk_20.11.3-0ubuntu0.21.04.1.debian.tar.xz: done.
  Uploading dpdk_20.11.3-0ubuntu0.21.04.1_source.buildinfo: done.
  Uploading dpdk_20.11.3-0ubuntu0.21.04.1_source.changes: done.
Successfully uploaded packages.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index d079801..26c30a2 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -4,7 +4,10 @@ on_error() {
4 if [ $? = 0 ]; then4 if [ $? = 0 ]; then
5 exit5 exit
6 fi6 fi
7 FILES_TO_PRINT="build/meson-logs/testlog.txt build/.ninja_log build/meson-logs/meson-log.txt"7 FILES_TO_PRINT="build/meson-logs/testlog.txt"
8 FILES_TO_PRINT="$FILES_TO_PRINT build/.ninja_log"
9 FILES_TO_PRINT="$FILES_TO_PRINT build/meson-logs/meson-log.txt"
10 FILES_TO_PRINT="$FILES_TO_PRINT build/gdb.log"
811
9 for pr_file in $FILES_TO_PRINT; do12 for pr_file in $FILES_TO_PRINT; do
10 if [ -e "$pr_file" ]; then13 if [ -e "$pr_file" ]; then
@@ -12,7 +15,9 @@ on_error() {
12 fi15 fi
13 done16 done
14}17}
15trap on_error EXIT18# We capture the error logs as artifacts in Github Actions, no need to dump
19# them via a EXIT handler.
20[ -n "$GITHUB_WORKFLOW" ] || trap on_error EXIT
1621
17install_libabigail() {22install_libabigail() {
18 version=$123 version=$1
@@ -28,16 +33,36 @@ install_libabigail() {
28 rm ${version}.tar.gz33 rm ${version}.tar.gz
29}34}
3035
31if [ "$AARCH64" = "1" ]; then36configure_coredump() {
37 # No point in configuring coredump without gdb
38 which gdb >/dev/null || return 0
39 ulimit -c unlimited
40 sudo sysctl -w kernel.core_pattern=/tmp/dpdk-core.%e.%p
41}
42
43catch_coredump() {
44 ls /tmp/dpdk-core.*.* 2>/dev/null || return 0
45 for core in /tmp/dpdk-core.*.*; do
46 binary=$(sudo readelf -n $core |grep $(pwd)/build/ 2>/dev/null |head -n1)
47 [ -x $binary ] || binary=
48 sudo gdb $binary -c $core \
49 -ex 'info threads' \
50 -ex 'thread apply all bt full' \
51 -ex 'quit'
52 done |tee -a build/gdb.log
53 return 1
54}
55
56if [ "$AARCH64" = "true" ]; then
32 # convert the arch specifier57 # convert the arch specifier
33 OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"58 OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
34fi59fi
3560
36if [ "$BUILD_DOCS" = "1" ]; then61if [ "$BUILD_DOCS" = "true" ]; then
37 OPTS="$OPTS -Denable_docs=true"62 OPTS="$OPTS -Denable_docs=true"
38fi63fi
3964
40if [ "$BUILD_32BIT" = "1" ]; then65if [ "$BUILD_32BIT" = "true" ]; then
41 OPTS="$OPTS -Dc_args=-m32 -Dc_link_args=-m32"66 OPTS="$OPTS -Dc_args=-m32 -Dc_link_args=-m32"
42 export PKG_CONFIG_LIBDIR="/usr/lib32/pkgconfig"67 export PKG_CONFIG_LIBDIR="/usr/lib32/pkgconfig"
43fi68fi
@@ -48,16 +73,21 @@ else
48 OPTS="$OPTS -Dexamples=all"73 OPTS="$OPTS -Dexamples=all"
49fi74fi
5075
76OPTS="$OPTS -Dmachine=default"
51OPTS="$OPTS --default-library=$DEF_LIB"77OPTS="$OPTS --default-library=$DEF_LIB"
52OPTS="$OPTS --buildtype=debugoptimized"78OPTS="$OPTS --buildtype=debugoptimized"
53meson build --werror $OPTS79meson build --werror $OPTS
54ninja -C build80ninja -C build
5581
56if [ "$AARCH64" != "1" ]; then82if [ "$AARCH64" != "true" ]; then
57 devtools/test-null.sh83 failed=
84 configure_coredump
85 devtools/test-null.sh || failed="true"
86 catch_coredump
87 [ "$failed" != "true" ]
58fi88fi
5989
60if [ "$ABI_CHECKS" = "1" ]; then90if [ "$ABI_CHECKS" = "true" ]; then
61 LIBABIGAIL_VERSION=${LIBABIGAIL_VERSION:-libabigail-1.6}91 LIBABIGAIL_VERSION=${LIBABIGAIL_VERSION:-libabigail-1.6}
6292
63 if [ "$(cat libabigail/VERSION 2>/dev/null)" != "$LIBABIGAIL_VERSION" ]; then93 if [ "$(cat libabigail/VERSION 2>/dev/null)" != "$LIBABIGAIL_VERSION" ]; then
@@ -83,10 +113,13 @@ if [ "$ABI_CHECKS" = "1" ]; then
83 if [ ! -d reference ]; then113 if [ ! -d reference ]; then
84 refsrcdir=$(readlink -f $(pwd)/../dpdk-$REF_GIT_TAG)114 refsrcdir=$(readlink -f $(pwd)/../dpdk-$REF_GIT_TAG)
85 git clone --single-branch -b $REF_GIT_TAG $REF_GIT_REPO $refsrcdir115 git clone --single-branch -b $REF_GIT_TAG $REF_GIT_REPO $refsrcdir
86 meson --werror $OPTS $refsrcdir $refsrcdir/build116 meson $OPTS -Dexamples= $refsrcdir $refsrcdir/build
87 ninja -C $refsrcdir/build117 ninja -C $refsrcdir/build
88 DESTDIR=$(pwd)/reference ninja -C $refsrcdir/build install118 DESTDIR=$(pwd)/reference ninja -C $refsrcdir/build install
89 devtools/gen-abi.sh reference119 devtools/gen-abi.sh reference
120 find reference/usr/local -name '*.a' -delete
121 rm -rf reference/usr/local/bin
122 rm -rf reference/usr/local/share
90 echo $REF_GIT_TAG > reference/VERSION123 echo $REF_GIT_TAG > reference/VERSION
91 fi124 fi
92125
@@ -95,6 +128,10 @@ if [ "$ABI_CHECKS" = "1" ]; then
95 devtools/check-abi.sh reference install ${ABI_CHECKS_WARN_ONLY:-}128 devtools/check-abi.sh reference install ${ABI_CHECKS_WARN_ONLY:-}
96fi129fi
97130
98if [ "$RUN_TESTS" = "1" ]; then131if [ "$RUN_TESTS" = "true" ]; then
99 sudo meson test -C build --suite fast-tests -t 3132 failed=
133 configure_coredump
134 sudo meson test -C build --suite fast-tests -t 3 || failed="true"
135 catch_coredump
136 [ "$failed" != "true" ]
100fi137fi
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
101new file mode 100644138new file mode 100644
index 0000000..4093b32
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,130 @@
1name: build
2
3on:
4 push:
5 schedule:
6 - cron: '0 0 * * 1'
7
8defaults:
9 run:
10 shell: bash --noprofile --norc -exo pipefail {0}
11
12jobs:
13 build:
14 name: ${{ join(matrix.config.*, '-') }}
15 runs-on: ${{ matrix.config.os }}
16 env:
17 AARCH64: ${{ matrix.config.cross == 'aarch64' }}
18 ABI_CHECKS: ${{ contains(matrix.config.checks, 'abi') }}
19 BUILD_32BIT: ${{ matrix.config.cross == 'i386' }}
20 BUILD_DOCS: ${{ contains(matrix.config.checks, 'doc') }}
21 CC: ccache ${{ matrix.config.compiler }}
22 DEF_LIB: ${{ matrix.config.library }}
23 LIBABIGAIL_VERSION: libabigail-1.8
24 REF_GIT_TAG: v20.11
25 RUN_TESTS: ${{ contains(matrix.config.checks, 'tests') }}
26
27 strategy:
28 fail-fast: false
29 matrix:
30 config:
31 - os: ubuntu-18.04
32 compiler: gcc
33 library: static
34 - os: ubuntu-18.04
35 compiler: gcc
36 library: shared
37 checks: abi+doc+tests
38 - os: ubuntu-18.04
39 compiler: clang
40 library: static
41 - os: ubuntu-18.04
42 compiler: clang
43 library: shared
44 checks: doc+tests
45 - os: ubuntu-18.04
46 compiler: gcc
47 library: static
48 cross: i386
49 - os: ubuntu-18.04
50 compiler: gcc
51 library: static
52 cross: aarch64
53 - os: ubuntu-18.04
54 compiler: gcc
55 library: shared
56 cross: aarch64
57
58 steps:
59 - name: Checkout sources
60 uses: actions/checkout@v2
61 - name: Generate cache keys
62 id: get_ref_keys
63 run: |
64 echo -n '::set-output name=ccache::'
65 echo 'ccache-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-'$(date -u +%Y-w%W)
66 echo -n '::set-output name=libabigail::'
67 echo 'libabigail-${{ matrix.config.os }}'
68 echo -n '::set-output name=abi::'
69 echo 'abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}'
70 - name: Retrieve ccache cache
71 uses: actions/cache@v2
72 with:
73 path: ~/.ccache
74 key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }}
75 restore-keys: |
76 ${{ steps.get_ref_keys.outputs.ccache }}-refs/heads/main
77 - name: Retrieve libabigail cache
78 id: libabigail-cache
79 uses: actions/cache@v2
80 if: env.ABI_CHECKS == 'true'
81 with:
82 path: libabigail
83 key: ${{ steps.get_ref_keys.outputs.libabigail }}
84 - name: Retrieve ABI reference cache
85 uses: actions/cache@v2
86 if: env.ABI_CHECKS == 'true'
87 with:
88 path: reference
89 key: ${{ steps.get_ref_keys.outputs.abi }}
90 - name: Update APT cache
91 run: sudo apt update || true
92 - name: Install packages
93 run: sudo apt install -y ccache libnuma-dev python3-setuptools
94 python3-wheel python3-pip ninja-build libbsd-dev libpcap-dev
95 libibverbs-dev libcrypto++-dev libfdt-dev libjansson-dev
96 - name: Install libabigail build dependencies if no cache is available
97 if: env.ABI_CHECKS == 'true' && steps.libabigail-cache.outputs.cache-hit != 'true'
98 run: sudo apt install -y autoconf automake libtool pkg-config libxml2-dev
99 libdw-dev
100 - name: Install i386 cross compiling packages
101 if: env.BUILD_32BIT == 'true'
102 run: sudo apt install -y gcc-multilib
103 - name: Install aarch64 cross compiling packages
104 if: env.AARCH64 == 'true'
105 run: sudo apt install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross
106 pkg-config-aarch64-linux-gnu
107 - name: Install test tools packages
108 if: env.AARCH64 != 'true' || env.RUN_TESTS == 'true'
109 run: sudo apt install -y gdb
110 - name: Install doc generation packages
111 if: env.BUILD_DOCS == 'true'
112 run: sudo apt install -y doxygen graphviz python3-sphinx
113 python3-sphinx-rtd-theme
114 - name: Run setup
115 run: |
116 .ci/linux-setup.sh
117 # Workaround on $HOME permissions as EAL checks them for plugin loading
118 chmod o-w $HOME
119 - name: Build and test
120 run: .ci/linux-build.sh
121 - name: Upload logs on failure
122 if: failure()
123 uses: actions/upload-artifact@v2
124 with:
125 name: meson-logs-${{ join(matrix.config.*, '-') }}
126 path: |
127 build/meson-logs/testlog.txt
128 build/.ninja_log
129 build/meson-logs/meson-log.txt
130 build/gdb.log
diff --git a/.travis.yml b/.travis.yml
index 5e12db2..5aa7ad4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,6 +2,9 @@
2language: c2language: c
3cache:3cache:
4 ccache: true4 ccache: true
5 directories:
6 - libabigail
7 - reference
58
6dist: bionic9dist: bionic
710
@@ -18,6 +21,9 @@ _aarch64_packages: &aarch64_packages
18 - *required_packages21 - *required_packages
19 - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]22 - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
2023
24_libabigail_build_packages: &libabigail_build_packages
25 - [autoconf, automake, libtool, pkg-config, libxml2-dev, libdw-dev]
26
21_build_32b_packages: &build_32b_packages27_build_32b_packages: &build_32b_packages
22 - *required_packages28 - *required_packages
23 - [gcc-multilib]29 - [gcc-multilib]
@@ -28,16 +34,21 @@ _doc_packages: &doc_packages
28before_install: ./.ci/${TRAVIS_OS_NAME}-setup.sh34before_install: ./.ci/${TRAVIS_OS_NAME}-setup.sh
29script: ./.ci/${TRAVIS_OS_NAME}-build.sh35script: ./.ci/${TRAVIS_OS_NAME}-build.sh
3036
37env:
38 global:
39 - LIBABIGAIL_VERSION=libabigail-1.8
40 - REF_GIT_TAG=v20.11
41
31jobs:42jobs:
32 include:43 include:
33 # x86_64 gcc jobs44 # x86_64 gcc jobs
34 - env: DEF_LIB="static"45 - env: DEF_LIB="static"
35 arch: amd6446 arch: amd64
36 compiler: gcc47 compiler: gcc
37 - env: DEF_LIB="shared" RUN_TESTS=148 - env: DEF_LIB="shared" RUN_TESTS=true
38 arch: amd6449 arch: amd64
39 compiler: gcc50 compiler: gcc
40 - env: DEF_LIB="shared" BUILD_DOCS=151 - env: DEF_LIB="shared" BUILD_DOCS=true
41 arch: amd6452 arch: amd64
42 compiler: gcc53 compiler: gcc
43 addons:54 addons:
@@ -45,14 +56,22 @@ jobs:
45 packages:56 packages:
46 - *required_packages57 - *required_packages
47 - *doc_packages58 - *doc_packages
59 - env: DEF_LIB="shared" ABI_CHECKS=true
60 arch: amd64
61 compiler: gcc
62 addons:
63 apt:
64 packages:
65 - *required_packages
66 - *libabigail_build_packages
48 # x86_64 clang jobs67 # x86_64 clang jobs
49 - env: DEF_LIB="static"68 - env: DEF_LIB="static"
50 arch: amd6469 arch: amd64
51 compiler: clang70 compiler: clang
52 - env: DEF_LIB="shared" RUN_TESTS=171 - env: DEF_LIB="shared" RUN_TESTS=true
53 arch: amd6472 arch: amd64
54 compiler: clang73 compiler: clang
55 - env: DEF_LIB="shared" BUILD_DOCS=174 - env: DEF_LIB="shared" BUILD_DOCS=true
56 arch: amd6475 arch: amd64
57 compiler: clang76 compiler: clang
58 addons:77 addons:
@@ -61,7 +80,7 @@ jobs:
61 - *required_packages80 - *required_packages
62 - *doc_packages81 - *doc_packages
63 # x86_64 cross-compiling 32-bits jobs82 # x86_64 cross-compiling 32-bits jobs
64 - env: DEF_LIB="static" BUILD_32BIT=183 - env: DEF_LIB="static" BUILD_32BIT=true
65 arch: amd6484 arch: amd64
66 compiler: gcc85 compiler: gcc
67 addons:86 addons:
@@ -69,14 +88,14 @@ jobs:
69 packages:88 packages:
70 - *build_32b_packages89 - *build_32b_packages
71 # x86_64 cross-compiling aarch64 jobs90 # x86_64 cross-compiling aarch64 jobs
72 - env: DEF_LIB="static" AARCH64=191 - env: DEF_LIB="static" AARCH64=true
73 arch: amd6492 arch: amd64
74 compiler: gcc93 compiler: gcc
75 addons:94 addons:
76 apt:95 apt:
77 packages:96 packages:
78 - *aarch64_packages97 - *aarch64_packages
79 - env: DEF_LIB="shared" AARCH64=198 - env: DEF_LIB="shared" AARCH64=true
80 arch: amd6499 arch: amd64
81 compiler: gcc100 compiler: gcc
82 addons:101 addons:
@@ -87,16 +106,16 @@ jobs:
87 - env: DEF_LIB="static"106 - env: DEF_LIB="static"
88 arch: arm64107 arch: arm64
89 compiler: gcc108 compiler: gcc
90 - env: DEF_LIB="shared" RUN_TESTS=1109 - env: DEF_LIB="shared" RUN_TESTS=true
91 arch: arm64110 arch: arm64
92 compiler: gcc111 compiler: gcc
93 - env: DEF_LIB="shared" RUN_TESTS=1112 - env: DEF_LIB="shared" RUN_TESTS=true
94 dist: focal113 dist: focal
95 arch: arm64-graviton2114 arch: arm64-graviton2
96 virt: vm115 virt: vm
97 group: edge116 group: edge
98 compiler: gcc117 compiler: gcc
99 - env: DEF_LIB="shared" BUILD_DOCS=1118 - env: DEF_LIB="shared" BUILD_DOCS=true
100 arch: arm64119 arch: arm64
101 compiler: gcc120 compiler: gcc
102 addons:121 addons:
@@ -104,14 +123,22 @@ jobs:
104 packages:123 packages:
105 - *required_packages124 - *required_packages
106 - *doc_packages125 - *doc_packages
126 - env: DEF_LIB="shared" ABI_CHECKS=true
127 arch: arm64
128 compiler: gcc
129 addons:
130 apt:
131 packages:
132 - *required_packages
133 - *libabigail_build_packages
107 # aarch64 clang jobs134 # aarch64 clang jobs
108 - env: DEF_LIB="static"135 - env: DEF_LIB="static"
109 arch: arm64136 arch: arm64
110 compiler: clang137 compiler: clang
111 - env: DEF_LIB="shared" RUN_TESTS=1138 - env: DEF_LIB="shared" RUN_TESTS=true
112 arch: arm64139 arch: arm64
113 compiler: clang140 compiler: clang
114 - env: DEF_LIB="shared" RUN_TESTS=1141 - env: DEF_LIB="shared" RUN_TESTS=true
115 dist: focal142 dist: focal
116 arch: arm64-graviton2143 arch: arm64-graviton2
117 virt: vm144 virt: vm
diff --git a/MAINTAINERS b/MAINTAINERS
index eafe9f8..dcde2ab 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -103,12 +103,14 @@ F: buildtools/gen-pmdinfo-cfile.sh
103F: buildtools/list-dir-globs.py103F: buildtools/list-dir-globs.py
104F: buildtools/pkg-config/104F: buildtools/pkg-config/
105F: buildtools/symlink-drivers-solibs.sh105F: buildtools/symlink-drivers-solibs.sh
106F: buildtools/symlink-drivers-solibs.py
106F: devtools/test-meson-builds.sh107F: devtools/test-meson-builds.sh
107108
108Public CI109Public CI
109M: Aaron Conole <aconole@redhat.com>110M: Aaron Conole <aconole@redhat.com>
110M: Michael Santana <maicolgabriel@hotmail.com>111M: Michael Santana <maicolgabriel@hotmail.com>
111F: .travis.yml112F: .travis.yml
113F: .github/workflows/build.yml
112F: .ci/114F: .ci/
113115
114ABI Policy & Versioning116ABI Policy & Versioning
diff --git a/VERSION b/VERSION
index 2dbbe00..bc6fac4 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
120.11.1120.11.3
diff --git a/app/meson.build b/app/meson.build
index 87fc195..50a53db 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -21,9 +21,6 @@ apps = [
21 'test-regex',21 'test-regex',
22 'test-sad']22 'test-sad']
2323
24# for BSD only
25lib_execinfo = cc.find_library('execinfo', required: false)
26
27default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']24default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
28default_ldflags = []25default_ldflags = []
29if get_option('default_library') == 'static' and not is_windows26if get_option('default_library') == 'static' and not is_windows
@@ -53,7 +50,6 @@ foreach app:apps
53 dep_objs += get_variable(get_option('default_library')50 dep_objs += get_variable(get_option('default_library')
54 + '_rte_' + d)51 + '_rte_' + d)
55 endforeach52 endforeach
56 dep_objs += lib_execinfo
5753
58 link_libs = []54 link_libs = []
59 if get_option('default_library') == 'static'55 if get_option('default_library') == 'static'
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 59b37ed..36589f3 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -372,14 +372,14 @@ check_dev_cap(const struct rte_bbdev_info *dev_info)
372 if (nb_harq_inputs > cap->num_buffers_hard_out) {372 if (nb_harq_inputs > cap->num_buffers_hard_out) {
373 printf(373 printf(
374 "Too many HARQ inputs defined: %u, max: %u\n",374 "Too many HARQ inputs defined: %u, max: %u\n",
375 nb_hard_outputs,375 nb_harq_inputs,
376 cap->num_buffers_hard_out);376 cap->num_buffers_hard_out);
377 return TEST_FAILED;377 return TEST_FAILED;
378 }378 }
379 if (nb_harq_outputs > cap->num_buffers_hard_out) {379 if (nb_harq_outputs > cap->num_buffers_hard_out) {
380 printf(380 printf(
381 "Too many HARQ outputs defined: %u, max: %u\n",381 "Too many HARQ outputs defined: %u, max: %u\n",
382 nb_hard_outputs,382 nb_harq_outputs,
383 cap->num_buffers_hard_out);383 cap->num_buffers_hard_out);
384 return TEST_FAILED;384 return TEST_FAILED;
385 }385 }
@@ -957,6 +957,9 @@ init_op_data_objs(struct rte_bbdev_op_data *bufs,
957 if ((op_type == DATA_INPUT) && large_input) {957 if ((op_type == DATA_INPUT) && large_input) {
958 /* Allocate a fake overused mbuf */958 /* Allocate a fake overused mbuf */
959 data = rte_malloc(NULL, seg->length, 0);959 data = rte_malloc(NULL, seg->length, 0);
960 TEST_ASSERT_NOT_NULL(data,
961 "rte malloc failed with %u bytes",
962 seg->length);
960 memcpy(data, seg->addr, seg->length);963 memcpy(data, seg->addr, seg->length);
961 m_head->buf_addr = data;964 m_head->buf_addr = data;
962 m_head->buf_iova = rte_malloc_virt2iova(data);965 m_head->buf_iova = rte_malloc_virt2iova(data);
diff --git a/app/test-compress-perf/comp_perf_options_parse.c b/app/test-compress-perf/comp_perf_options_parse.c
index 04a8d2f..019eddb 100644
--- a/app/test-compress-perf/comp_perf_options_parse.c
+++ b/app/test-compress-perf/comp_perf_options_parse.c
@@ -620,7 +620,7 @@ comp_perf_options_parse(struct comp_test_data *test_data, int argc, char **argv)
620 switch (opt) {620 switch (opt) {
621 case 'h':621 case 'h':
622 usage(argv[0]);622 usage(argv[0]);
623 rte_exit(EXIT_SUCCESS, "Displayed help\n");623 exit(EXIT_SUCCESS);
624 break;624 break;
625 /* long options */625 /* long options */
626 case 0:626 case 0:
diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c
index 0466f7b..e84f56c 100644
--- a/app/test-crypto-perf/cperf_options_parsing.c
+++ b/app/test-crypto-perf/cperf_options_parsing.c
@@ -506,6 +506,12 @@ parse_test_name(struct cperf_options *opts,
506{506{
507 char *test_name = (char *) rte_zmalloc(NULL,507 char *test_name = (char *) rte_zmalloc(NULL,
508 sizeof(char) * (strlen(arg) + 3), 0);508 sizeof(char) * (strlen(arg) + 3), 0);
509 if (test_name == NULL) {
510 RTE_LOG(ERR, USER1, "Failed to rte zmalloc with size: %zu\n",
511 strlen(arg) + 3);
512 return -1;
513 }
514
509 snprintf(test_name, strlen(arg) + 3, "[%s]", arg);515 snprintf(test_name, strlen(arg) + 3, "[%s]", arg);
510 opts->test_name = test_name;516 opts->test_name = test_name;
511517
@@ -983,7 +989,7 @@ cperf_options_parse(struct cperf_options *options, int argc, char **argv)
983 switch (opt) {989 switch (opt) {
984 case 'h':990 case 'h':
985 usage(argv[0]);991 usage(argv[0]);
986 rte_exit(EXIT_SUCCESS, "Displayed help\n");992 exit(EXIT_SUCCESS);
987 break;993 break;
988 /* long options */994 /* long options */
989 case 0:995 case 0:
diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 058e0ba..12925c7 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -194,7 +194,7 @@ cperf_alloc_common_memory(const struct cperf_options *options,
194 (mbuf_size * segments_nb);194 (mbuf_size * segments_nb);
195 params.dst_buf_offset = *dst_buf_offset;195 params.dst_buf_offset = *dst_buf_offset;
196 /* Destination buffer will be one segment only */196 /* Destination buffer will be one segment only */
197 obj_size += max_size;197 obj_size += max_size + sizeof(struct rte_mbuf);
198 }198 }
199199
200 *pool = rte_mempool_create_empty(pool_name,200 *pool = rte_mempool_create_empty(pool_name,
diff --git a/app/test-eventdev/evt_options.c b/app/test-eventdev/evt_options.c
index 0d04ea9..8c9d3fc 100644
--- a/app/test-eventdev/evt_options.c
+++ b/app/test-eventdev/evt_options.c
@@ -218,7 +218,7 @@ evt_parse_plcores(struct evt_options *opt, const char *corelist)
218{218{
219 int ret;219 int ret;
220220
221 ret = parse_lcores_list(opt->plcores, corelist);221 ret = parse_lcores_list(opt->plcores, RTE_MAX_LCORE, corelist);
222 if (ret == -E2BIG)222 if (ret == -E2BIG)
223 evt_err("duplicate lcores in plcores");223 evt_err("duplicate lcores in plcores");
224224
@@ -230,7 +230,7 @@ evt_parse_work_lcores(struct evt_options *opt, const char *corelist)
230{230{
231 int ret;231 int ret;
232232
233 ret = parse_lcores_list(opt->wlcores, corelist);233 ret = parse_lcores_list(opt->wlcores, RTE_MAX_LCORE, corelist);
234 if (ret == -E2BIG)234 if (ret == -E2BIG)
235 evt_err("duplicate lcores in wlcores");235 evt_err("duplicate lcores in wlcores");
236236
diff --git a/app/test-eventdev/parser.c b/app/test-eventdev/parser.c
index 24f1855..8818c37 100644
--- a/app/test-eventdev/parser.c
+++ b/app/test-eventdev/parser.c
@@ -310,7 +310,7 @@ parse_hex_string(char *src, uint8_t *dst, uint32_t *size)
310}310}
311311
312int312int
313parse_lcores_list(bool lcores[], const char *corelist)313parse_lcores_list(bool lcores[], int lcores_num, const char *corelist)
314{314{
315 int i, idx = 0;315 int i, idx = 0;
316 int min, max;316 int min, max;
@@ -332,6 +332,8 @@ parse_lcores_list(bool lcores[], const char *corelist)
332 if (*corelist == '\0')332 if (*corelist == '\0')
333 return -1;333 return -1;
334 idx = strtoul(corelist, &end, 10);334 idx = strtoul(corelist, &end, 10);
335 if (idx < 0 || idx > lcores_num)
336 return -1;
335337
336 if (end == NULL)338 if (end == NULL)
337 return -1;339 return -1;
diff --git a/app/test-eventdev/parser.h b/app/test-eventdev/parser.h
index 673ff22..696b40a 100644
--- a/app/test-eventdev/parser.h
+++ b/app/test-eventdev/parser.h
@@ -46,5 +46,5 @@ int parse_hex_string(char *src, uint8_t *dst, uint32_t *size);
4646
47int parse_tokenize_string(char *string, char *tokens[], uint32_t *n_tokens);47int parse_tokenize_string(char *string, char *tokens[], uint32_t *n_tokens);
4848
49int parse_lcores_list(bool lcores[], const char *corelist);49int parse_lcores_list(bool lcores[], int lcores_num, const char *corelist);
50#endif50#endif
diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
index 955edb7..2fe15ed 100644
--- a/app/test-eventdev/test_perf_common.c
+++ b/app/test-eventdev/test_perf_common.c
@@ -2,6 +2,8 @@
2 * Copyright(c) 2017 Cavium, Inc2 * Copyright(c) 2017 Cavium, Inc
3 */3 */
44
5#include <math.h>
6
5#include "test_perf_common.h"7#include "test_perf_common.h"
68
7int9int
@@ -95,11 +97,13 @@ perf_event_timer_producer(void *arg)
95 uint64_t timeout_ticks = opt->expiry_nsec / opt->timer_tick_nsec;97 uint64_t timeout_ticks = opt->expiry_nsec / opt->timer_tick_nsec;
9698
97 memset(&tim, 0, sizeof(struct rte_event_timer));99 memset(&tim, 0, sizeof(struct rte_event_timer));
98 timeout_ticks = opt->optm_timer_tick_nsec ?100 timeout_ticks =
99 (timeout_ticks * opt->timer_tick_nsec)101 opt->optm_timer_tick_nsec
100 / opt->optm_timer_tick_nsec : timeout_ticks;102 ? ceil((double)(timeout_ticks * opt->timer_tick_nsec) /
103 opt->optm_timer_tick_nsec)
104 : timeout_ticks;
101 timeout_ticks += timeout_ticks ? 0 : 1;105 timeout_ticks += timeout_ticks ? 0 : 1;
102 tim.ev.event_type = RTE_EVENT_TYPE_TIMER;106 tim.ev.event_type = RTE_EVENT_TYPE_TIMER;
103 tim.ev.op = RTE_EVENT_OP_NEW;107 tim.ev.op = RTE_EVENT_OP_NEW;
104 tim.ev.sched_type = t->opt->sched_type_list[0];108 tim.ev.sched_type = t->opt->sched_type_list[0];
105 tim.ev.queue_id = p->queue_id;109 tim.ev.queue_id = p->queue_id;
@@ -159,11 +163,13 @@ perf_event_timer_producer_burst(void *arg)
159 uint64_t timeout_ticks = opt->expiry_nsec / opt->timer_tick_nsec;163 uint64_t timeout_ticks = opt->expiry_nsec / opt->timer_tick_nsec;
160164
161 memset(&tim, 0, sizeof(struct rte_event_timer));165 memset(&tim, 0, sizeof(struct rte_event_timer));
162 timeout_ticks = opt->optm_timer_tick_nsec ?166 timeout_ticks =
163 (timeout_ticks * opt->timer_tick_nsec)167 opt->optm_timer_tick_nsec
164 / opt->optm_timer_tick_nsec : timeout_ticks;168 ? ceil((double)(timeout_ticks * opt->timer_tick_nsec) /
169 opt->optm_timer_tick_nsec)
170 : timeout_ticks;
165 timeout_ticks += timeout_ticks ? 0 : 1;171 timeout_ticks += timeout_ticks ? 0 : 1;
166 tim.ev.event_type = RTE_EVENT_TYPE_TIMER;172 tim.ev.event_type = RTE_EVENT_TYPE_TIMER;
167 tim.ev.op = RTE_EVENT_OP_NEW;173 tim.ev.op = RTE_EVENT_OP_NEW;
168 tim.ev.sched_type = t->opt->sched_type_list[0];174 tim.ev.sched_type = t->opt->sched_type_list[0];
169 tim.ev.queue_id = p->queue_id;175 tim.ev.queue_id = p->queue_id;
diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
index e2fc5b7..f525bc9 100644
--- a/app/test-flow-perf/main.c
+++ b/app/test-flow-perf/main.c
@@ -606,7 +606,7 @@ args_parse(int argc, char **argv)
606 case 0:606 case 0:
607 if (strcmp(lgopts[opt_idx].name, "help") == 0) {607 if (strcmp(lgopts[opt_idx].name, "help") == 0) {
608 usage(argv[0]);608 usage(argv[0]);
609 rte_exit(EXIT_SUCCESS, "Displayed help\n");609 exit(EXIT_SUCCESS);
610 }610 }
611611
612 if (strcmp(lgopts[opt_idx].name, "group") == 0) {612 if (strcmp(lgopts[opt_idx].name, "group") == 0) {
@@ -614,7 +614,7 @@ args_parse(int argc, char **argv)
614 if (n >= 0)614 if (n >= 0)
615 flow_group = n;615 flow_group = n;
616 else616 else
617 rte_exit(EXIT_SUCCESS,617 rte_exit(EXIT_FAILURE,
618 "flow group should be >= 0\n");618 "flow group should be >= 0\n");
619 printf("group %d / ", flow_group);619 printf("group %d / ", flow_group);
620 }620 }
@@ -634,7 +634,7 @@ args_parse(int argc, char **argv)
634 if (n > 0)634 if (n > 0)
635 hairpin_queues_num = n;635 hairpin_queues_num = n;
636 else636 else
637 rte_exit(EXIT_SUCCESS,637 rte_exit(EXIT_FAILURE,
638 "Hairpin queues should be > 0\n");638 "Hairpin queues should be > 0\n");
639639
640 flow_actions[actions_idx++] =640 flow_actions[actions_idx++] =
@@ -647,7 +647,7 @@ args_parse(int argc, char **argv)
647 if (n > 0)647 if (n > 0)
648 hairpin_queues_num = n;648 hairpin_queues_num = n;
649 else649 else
650 rte_exit(EXIT_SUCCESS,650 rte_exit(EXIT_FAILURE,
651 "Hairpin queues should be > 0\n");651 "Hairpin queues should be > 0\n");
652652
653 flow_actions[actions_idx++] =653 flow_actions[actions_idx++] =
@@ -671,11 +671,9 @@ args_parse(int argc, char **argv)
671 break;671 break;
672 }672 }
673 /* Reached last item with no match */673 /* Reached last item with no match */
674 if (i == (RTE_DIM(flow_options) - 1)) {674 if (i == (RTE_DIM(flow_options) - 1))
675 fprintf(stderr, "Invalid encap item: %s\n", token);675 rte_exit(EXIT_FAILURE,
676 usage(argv[0]);676 "Invalid encap item: %s\n", token);
677 rte_exit(EXIT_SUCCESS, "Invalid encap item\n");
678 }
679 }677 }
680 token = strtok(NULL, ",");678 token = strtok(NULL, ",");
681 }679 }
@@ -693,15 +691,13 @@ args_parse(int argc, char **argv)
693 for (i = 0; i < RTE_DIM(flow_options); i++) {691 for (i = 0; i < RTE_DIM(flow_options); i++) {
694 if (strcmp(flow_options[i].str, token) == 0) {692 if (strcmp(flow_options[i].str, token) == 0) {
695 printf("%s,", token);693 printf("%s,", token);
696 encap_data |= flow_options[i].mask;694 decap_data |= flow_options[i].mask;
697 break;695 break;
698 }696 }
699 /* Reached last item with no match */697 /* Reached last item with no match */
700 if (i == (RTE_DIM(flow_options) - 1)) {698 if (i == (RTE_DIM(flow_options) - 1))
701 fprintf(stderr, "Invalid decap item: %s\n", token);699 rte_exit(EXIT_FAILURE,
702 usage(argv[0]);700 "Invalid decap item %s\n", token);
703 rte_exit(EXIT_SUCCESS, "Invalid decap item\n");
704 }
705 }701 }
706 token = strtok(NULL, ",");702 token = strtok(NULL, ",");
707 }703 }
@@ -714,9 +710,9 @@ args_parse(int argc, char **argv)
714 if (n >= DEFAULT_RULES_BATCH)710 if (n >= DEFAULT_RULES_BATCH)
715 rules_batch = n;711 rules_batch = n;
716 else {712 else {
717 printf("\n\nrules_batch should be >= %d\n",713 rte_exit(EXIT_FAILURE,
714 "rules_batch should be >= %d\n",
718 DEFAULT_RULES_BATCH);715 DEFAULT_RULES_BATCH);
719 rte_exit(EXIT_SUCCESS, " ");
720 }716 }
721 }717 }
722 if (strcmp(lgopts[opt_idx].name,718 if (strcmp(lgopts[opt_idx].name,
@@ -725,7 +721,8 @@ args_parse(int argc, char **argv)
725 if (n >= (int) rules_batch)721 if (n >= (int) rules_batch)
726 rules_count = n;722 rules_count = n;
727 else {723 else {
728 printf("\n\nrules_count should be >= %d\n",724 rte_exit(EXIT_FAILURE,
725 "rules_count should be >= %d\n",
729 rules_batch);726 rules_batch);
730 }727 }
731 }728 }
@@ -752,9 +749,9 @@ args_parse(int argc, char **argv)
752 }749 }
753 break;750 break;
754 default:751 default:
755 fprintf(stderr, "Invalid option: %s\n", argv[optind]);
756 usage(argv[0]);752 usage(argv[0]);
757 rte_exit(EXIT_SUCCESS, "Invalid option\n");753 rte_exit(EXIT_FAILURE, "Invalid option: %s\n",
754 argv[optind]);
758 break;755 break;
759 }756 }
760 }757 }
@@ -853,7 +850,7 @@ destroy_flows(int port_id, struct rte_flow **flow_list)
853 memset(&error, 0x33, sizeof(error));850 memset(&error, 0x33, sizeof(error));
854 if (rte_flow_destroy(port_id, flow_list[i], &error)) {851 if (rte_flow_destroy(port_id, flow_list[i], &error)) {
855 print_flow_error(error);852 print_flow_error(error);
856 rte_exit(EXIT_FAILURE, "Error in deleting flow");853 rte_exit(EXIT_FAILURE, "Error in deleting flow\n");
857 }854 }
858855
859 if (i && !((i + 1) % rules_batch)) {856 if (i && !((i + 1) % rules_batch)) {
@@ -924,7 +921,7 @@ flows_handler(void)
924 flow_list = rte_zmalloc("flow_list",921 flow_list = rte_zmalloc("flow_list",
925 (sizeof(struct rte_flow *) * rules_count) + 1, 0);922 (sizeof(struct rte_flow *) * rules_count) + 1, 0);
926 if (flow_list == NULL)923 if (flow_list == NULL)
927 rte_exit(EXIT_FAILURE, "No Memory available!");924 rte_exit(EXIT_FAILURE, "No Memory available!\n");
928925
929 for (port_id = 0; port_id < nr_ports; port_id++) {926 for (port_id = 0; port_id < nr_ports; port_id++) {
930 /* If port outside portmask */927 /* If port outside portmask */
@@ -947,7 +944,7 @@ flows_handler(void)
947944
948 if (flow == NULL) {945 if (flow == NULL) {
949 print_flow_error(error);946 print_flow_error(error);
950 rte_exit(EXIT_FAILURE, "error in creating flow");947 rte_exit(EXIT_FAILURE, "Error in creating flow\n");
951 }948 }
952 flow_list[flow_index++] = flow;949 flow_list[flow_index++] = flow;
953 }950 }
@@ -968,7 +965,7 @@ flows_handler(void)
968965
969 if (!flow) {966 if (!flow) {
970 print_flow_error(error);967 print_flow_error(error);
971 rte_exit(EXIT_FAILURE, "error in creating flow");968 rte_exit(EXIT_FAILURE, "Error in creating flow\n");
972 }969 }
973970
974 flow_list[flow_index++] = flow;971 flow_list[flow_index++] = flow;
@@ -1087,7 +1084,7 @@ packet_per_second_stats(void)
1087 old = rte_zmalloc("old",1084 old = rte_zmalloc("old",
1088 sizeof(struct lcore_info) * MAX_LCORES, 0);1085 sizeof(struct lcore_info) * MAX_LCORES, 0);
1089 if (old == NULL)1086 if (old == NULL)
1090 rte_exit(EXIT_FAILURE, "No Memory available!");1087 rte_exit(EXIT_FAILURE, "No Memory available!\n");
10911088
1092 memcpy(old, lcore_infos,1089 memcpy(old, lcore_infos,
1093 sizeof(struct lcore_info) * MAX_LCORES);1090 sizeof(struct lcore_info) * MAX_LCORES);
diff --git a/app/test-pmd/bpf_cmd.c b/app/test-pmd/bpf_cmd.c
index 066619e..6980291 100644
--- a/app/test-pmd/bpf_cmd.c
+++ b/app/test-pmd/bpf_cmd.c
@@ -20,7 +20,7 @@ static const struct rte_bpf_xsym bpf_xsym[] = {
20 .name = RTE_STR(stdout),20 .name = RTE_STR(stdout),
21 .type = RTE_BPF_XTYPE_VAR,21 .type = RTE_BPF_XTYPE_VAR,
22 .var = {22 .var = {
23 .val = &stdout,23 .val = (void *)(uintptr_t)&stdout,
24 .desc = {24 .desc = {
25 .type = RTE_BPF_ARG_PTR,25 .type = RTE_BPF_ARG_PTR,
26 .size = sizeof(stdout),26 .size = sizeof(stdout),
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 2b9dd3e..58ebff5 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1225,7 +1225,7 @@ cmdline_parse_token_string_t cmd_operate_port_all_all =
1225cmdline_parse_inst_t cmd_operate_port = {1225cmdline_parse_inst_t cmd_operate_port = {
1226 .f = cmd_operate_port_parsed,1226 .f = cmd_operate_port_parsed,
1227 .data = NULL,1227 .data = NULL,
1228 .help_str = "port start|stop|close all: Start/Stop/Close/Reset all ports",1228 .help_str = "port start|stop|close|reset all: Start/Stop/Close/Reset all ports",
1229 .tokens = {1229 .tokens = {
1230 (void *)&cmd_operate_port_all_cmd,1230 (void *)&cmd_operate_port_all_cmd,
1231 (void *)&cmd_operate_port_all_port,1231 (void *)&cmd_operate_port_all_port,
@@ -1272,7 +1272,7 @@ cmdline_parse_token_num_t cmd_operate_specific_port_id =
1272cmdline_parse_inst_t cmd_operate_specific_port = {1272cmdline_parse_inst_t cmd_operate_specific_port = {
1273 .f = cmd_operate_specific_port_parsed,1273 .f = cmd_operate_specific_port_parsed,
1274 .data = NULL,1274 .data = NULL,
1275 .help_str = "port start|stop|close <port_id>: Start/Stop/Close/Reset port_id",1275 .help_str = "port start|stop|close|reset <port_id>: Start/Stop/Close/Reset port_id",
1276 .tokens = {1276 .tokens = {
1277 (void *)&cmd_operate_specific_port_cmd,1277 (void *)&cmd_operate_specific_port_cmd,
1278 (void *)&cmd_operate_specific_port_port,1278 (void *)&cmd_operate_specific_port_port,
@@ -1521,6 +1521,9 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
1521 }1521 }
1522 }1522 }
15231523
1524 if (*speed != ETH_LINK_SPEED_AUTONEG)
1525 *speed |= ETH_LINK_SPEED_FIXED;
1526
1524 return 0;1527 return 0;
1525}1528}
15261529
@@ -1604,13 +1607,13 @@ cmd_config_speed_specific_parsed(void *parsed_result,
1604 struct cmd_config_speed_specific *res = parsed_result;1607 struct cmd_config_speed_specific *res = parsed_result;
1605 uint32_t link_speed;1608 uint32_t link_speed;
16061609
1607 if (!all_ports_stopped()) {1610 if (port_id_is_invalid(res->id, ENABLED_WARN))
1608 printf("Please stop all ports first\n");
1609 return;1611 return;
1610 }
16111612
1612 if (port_id_is_invalid(res->id, ENABLED_WARN))1613 if (!port_is_stopped(res->id)) {
1614 printf("Please stop port %d first\n", res->id);
1613 return;1615 return;
1616 }
16141617
1615 if (parse_and_check_speed_duplex(res->value1, res->value2,1618 if (parse_and_check_speed_duplex(res->value1, res->value2,
1616 &link_speed) < 0)1619 &link_speed) < 0)
@@ -2805,6 +2808,10 @@ cmd_setup_rxtx_queue_parsed(
2805 if (!numa_support || socket_id == NUMA_NO_CONFIG)2808 if (!numa_support || socket_id == NUMA_NO_CONFIG)
2806 socket_id = port->socket_id;2809 socket_id = port->socket_id;
28072810
2811 if (port->nb_tx_desc[res->qid] < tx_pkt_nb_segs) {
2812 printf("Failed to setup TX queue: not enough descriptors\n");
2813 return;
2814 }
2808 ret = rte_eth_tx_queue_setup(res->portid,2815 ret = rte_eth_tx_queue_setup(res->portid,
2809 res->qid,2816 res->qid,
2810 port->nb_tx_desc[res->qid],2817 port->nb_tx_desc[res->qid],
@@ -4561,7 +4568,7 @@ cmd_config_queue_tx_offloads(struct rte_port *port)
4561 int k;4568 int k;
45624569
4563 /* Apply queue tx offloads configuration */4570 /* Apply queue tx offloads configuration */
4564 for (k = 0; k < port->dev_info.max_rx_queues; k++)4571 for (k = 0; k < port->dev_info.max_tx_queues; k++)
4565 port->tx_conf[k].offloads =4572 port->tx_conf[k].offloads =
4566 port->dev_conf.txmode.offloads;4573 port->dev_conf.txmode.offloads;
4567}4574}
@@ -9096,7 +9103,7 @@ cmdline_parse_inst_t cmd_vf_rate_limit = {
90969103
9097/* *** CONFIGURE TUNNEL UDP PORT *** */9104/* *** CONFIGURE TUNNEL UDP PORT *** */
9098struct cmd_tunnel_udp_config {9105struct cmd_tunnel_udp_config {
9099 cmdline_fixed_string_t cmd;9106 cmdline_fixed_string_t rx_vxlan_port;
9100 cmdline_fixed_string_t what;9107 cmdline_fixed_string_t what;
9101 uint16_t udp_port;9108 uint16_t udp_port;
9102 portid_t port_id;9109 portid_t port_id;
@@ -9112,9 +9119,7 @@ cmd_tunnel_udp_config_parsed(void *parsed_result,
9112 int ret;9119 int ret;
91139120
9114 tunnel_udp.udp_port = res->udp_port;9121 tunnel_udp.udp_port = res->udp_port;
91159122 tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN;
9116 if (!strcmp(res->cmd, "rx_vxlan_port"))
9117 tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN;
91189123
9119 if (!strcmp(res->what, "add"))9124 if (!strcmp(res->what, "add"))
9120 ret = rte_eth_dev_udp_tunnel_port_add(res->port_id,9125 ret = rte_eth_dev_udp_tunnel_port_add(res->port_id,
@@ -9127,9 +9132,9 @@ cmd_tunnel_udp_config_parsed(void *parsed_result,
9127 printf("udp tunneling add error: (%s)\n", strerror(-ret));9132 printf("udp tunneling add error: (%s)\n", strerror(-ret));
9128}9133}
91299134
9130cmdline_parse_token_string_t cmd_tunnel_udp_config_cmd =9135cmdline_parse_token_string_t cmd_tunnel_udp_config_rx_vxlan_port =
9131 TOKEN_STRING_INITIALIZER(struct cmd_tunnel_udp_config,9136 TOKEN_STRING_INITIALIZER(struct cmd_tunnel_udp_config,
9132 cmd, "rx_vxlan_port");9137 rx_vxlan_port, "rx_vxlan_port");
9133cmdline_parse_token_string_t cmd_tunnel_udp_config_what =9138cmdline_parse_token_string_t cmd_tunnel_udp_config_what =
9134 TOKEN_STRING_INITIALIZER(struct cmd_tunnel_udp_config,9139 TOKEN_STRING_INITIALIZER(struct cmd_tunnel_udp_config,
9135 what, "add#rm");9140 what, "add#rm");
@@ -9146,7 +9151,7 @@ cmdline_parse_inst_t cmd_tunnel_udp_config = {
9146 .help_str = "rx_vxlan_port add|rm <udp_port> <port_id>: "9151 .help_str = "rx_vxlan_port add|rm <udp_port> <port_id>: "
9147 "Add/Remove a tunneling UDP port filter",9152 "Add/Remove a tunneling UDP port filter",
9148 .tokens = {9153 .tokens = {
9149 (void *)&cmd_tunnel_udp_config_cmd,9154 (void *)&cmd_tunnel_udp_config_rx_vxlan_port,
9150 (void *)&cmd_tunnel_udp_config_what,9155 (void *)&cmd_tunnel_udp_config_what,
9151 (void *)&cmd_tunnel_udp_config_udp_port,9156 (void *)&cmd_tunnel_udp_config_udp_port,
9152 (void *)&cmd_tunnel_udp_config_port_id,9157 (void *)&cmd_tunnel_udp_config_port_id,
@@ -9552,7 +9557,7 @@ dump_socket_mem(FILE *f)
9552 fprintf(f,9557 fprintf(f,
9553 "Total : size(M) total: %.6lf alloc: %.6lf(%.3lf%%) free: %.6lf \tcount alloc: %-4u free: %u\n",9558 "Total : size(M) total: %.6lf alloc: %.6lf(%.3lf%%) free: %.6lf \tcount alloc: %-4u free: %u\n",
9554 (double)total / (1024 * 1024), (double)alloc / (1024 * 1024),9559 (double)total / (1024 * 1024), (double)alloc / (1024 * 1024),
9555 (double)alloc * 100 / (double)total,9560 total ? ((double)alloc * 100 / (double)total) : 0,
9556 (double)free / (1024 * 1024),9561 (double)free / (1024 * 1024),
9557 n_alloc, n_free);9562 n_alloc, n_free);
9558 if (last_allocs)9563 if (last_allocs)
@@ -16444,17 +16449,17 @@ cmd_set_port_fec_mode_parsed(
16444{16449{
16445 struct cmd_set_port_fec_mode *res = parsed_result;16450 struct cmd_set_port_fec_mode *res = parsed_result;
16446 uint16_t port_id = res->port_id;16451 uint16_t port_id = res->port_id;
16447 uint32_t mode;16452 uint32_t fec_capa;
16448 int ret;16453 int ret;
1644916454
16450 ret = parse_fec_mode(res->fec_value, &mode);16455 ret = parse_fec_mode(res->fec_value, &fec_capa);
16451 if (ret < 0) {16456 if (ret < 0) {
16452 printf("Unknown fec mode: %s for Port %d\n", res->fec_value,16457 printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
16453 port_id);16458 port_id);
16454 return;16459 return;
16455 }16460 }
1645616461
16457 ret = rte_eth_fec_set(port_id, mode);16462 ret = rte_eth_fec_set(port_id, fec_capa);
16458 if (ret == -ENOTSUP) {16463 if (ret == -ENOTSUP) {
16459 printf("Function not implemented\n");16464 printf("Function not implemented\n");
16460 return;16465 return;
@@ -16615,7 +16620,8 @@ cmd_show_rx_tx_desc_status_parsed(void *parsed_result,
16615 rc = rte_eth_rx_descriptor_status(res->cmd_pid, res->cmd_qid,16620 rc = rte_eth_rx_descriptor_status(res->cmd_pid, res->cmd_qid,
16616 res->cmd_did);16621 res->cmd_did);
16617 if (rc < 0) {16622 if (rc < 0) {
16618 printf("Invalid queueid = %d\n", res->cmd_qid);16623 printf("Invalid input: queue id = %d, desc id = %d\n",
16624 res->cmd_qid, res->cmd_did);
16619 return;16625 return;
16620 }16626 }
16621 if (rc == RTE_ETH_RX_DESC_AVAIL)16627 if (rc == RTE_ETH_RX_DESC_AVAIL)
@@ -16628,7 +16634,8 @@ cmd_show_rx_tx_desc_status_parsed(void *parsed_result,
16628 rc = rte_eth_tx_descriptor_status(res->cmd_pid, res->cmd_qid,16634 rc = rte_eth_tx_descriptor_status(res->cmd_pid, res->cmd_qid,
16629 res->cmd_did);16635 res->cmd_did);
16630 if (rc < 0) {16636 if (rc < 0) {
16631 printf("Invalid queueid = %d\n", res->cmd_qid);16637 printf("Invalid input: queue id = %d, desc id = %d\n",
16638 res->cmd_qid, res->cmd_did);
16632 return;16639 return;
16633 }16640 }
16634 if (rc == RTE_ETH_TX_DESC_FULL)16641 if (rc == RTE_ETH_TX_DESC_FULL)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index de80924..c67ac71 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -5203,6 +5203,8 @@ parse_vc_action_nvgre_encap(struct context *ctx, const struct token *token,
5203 .src_addr = nvgre_encap_conf.ipv4_src,5203 .src_addr = nvgre_encap_conf.ipv4_src,
5204 .dst_addr = nvgre_encap_conf.ipv4_dst,5204 .dst_addr = nvgre_encap_conf.ipv4_dst,
5205 },5205 },
5206 .item_nvgre.c_k_s_rsvd0_ver = RTE_BE16(0x2000),
5207 .item_nvgre.protocol = RTE_BE16(RTE_ETHER_TYPE_TEB),
5206 .item_nvgre.flow_id = 0,5208 .item_nvgre.flow_id = 0,
5207 };5209 };
5208 memcpy(action_nvgre_encap_data->item_eth.dst.addr_bytes,5210 memcpy(action_nvgre_encap_data->item_eth.dst.addr_bytes,
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index dab8afe..4847c36 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2115,6 +2115,9 @@ port_flow_create(portid_t port_id,
2115 memset(&error, 0x22, sizeof(error));2115 memset(&error, 0x22, sizeof(error));
2116 flow = rte_flow_create(port_id, attr, pattern, actions, &error);2116 flow = rte_flow_create(port_id, attr, pattern, actions, &error);
2117 if (!flow) {2117 if (!flow) {
2118 if (tunnel_ops->enabled)
2119 port_flow_tunnel_offload_cmd_release(port_id,
2120 tunnel_ops, pft);
2118 free(pf);2121 free(pf);
2119 return port_flow_complain(&error);2122 return port_flow_complain(&error);
2120 }2123 }
@@ -2963,7 +2966,7 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
29632966
2964void2967void
2965port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,2968port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
2966 uint hash_key_len)2969 uint8_t hash_key_len)
2967{2970{
2968 struct rte_eth_rss_conf rss_conf;2971 struct rte_eth_rss_conf rss_conf;
2969 int diag;2972 int diag;
@@ -3153,6 +3156,21 @@ rss_fwd_config_setup(void)
3153 }3156 }
3154}3157}
31553158
3159static uint16_t
3160get_fwd_port_total_tc_num(void)
3161{
3162 struct rte_eth_dcb_info dcb_info;
3163 uint16_t total_tc_num = 0;
3164 unsigned int i;
3165
3166 for (i = 0; i < nb_fwd_ports; i++) {
3167 (void)rte_eth_dev_get_dcb_info(fwd_ports_ids[i], &dcb_info);
3168 total_tc_num += dcb_info.nb_tcs;
3169 }
3170
3171 return total_tc_num;
3172}
3173
3156/**3174/**
3157 * For the DCB forwarding test, each core is assigned on each traffic class.3175 * For the DCB forwarding test, each core is assigned on each traffic class.
3158 *3176 *
@@ -3172,12 +3190,42 @@ dcb_fwd_config_setup(void)
3172 lcoreid_t lc_id;3190 lcoreid_t lc_id;
3173 uint16_t nb_rx_queue, nb_tx_queue;3191 uint16_t nb_rx_queue, nb_tx_queue;
3174 uint16_t i, j, k, sm_id = 0;3192 uint16_t i, j, k, sm_id = 0;
3193 uint16_t total_tc_num;
3194 struct rte_port *port;
3175 uint8_t tc = 0;3195 uint8_t tc = 0;
3196 portid_t pid;
3197 int ret;
3198
3199 /*
3200 * The fwd_config_setup() is called when the port is RTE_PORT_STARTED
3201 * or RTE_PORT_STOPPED.
3202 *
3203 * Re-configure ports to get updated mapping between tc and queue in
3204 * case the queue number of the port is changed. Skip for started ports
3205 * since modifying queue number and calling dev_configure need to stop
3206 * ports first.
3207 */
3208 for (pid = 0; pid < nb_fwd_ports; pid++) {
3209 if (port_is_started(pid) == 1)
3210 continue;
3211
3212 port = &ports[pid];
3213 ret = rte_eth_dev_configure(pid, nb_rxq, nb_txq,
3214 &port->dev_conf);
3215 if (ret < 0) {
3216 printf("Failed to re-configure port %d, ret = %d.\n",
3217 pid, ret);
3218 return;
3219 }
3220 }
31763221
3177 cur_fwd_config.nb_fwd_lcores = (lcoreid_t) nb_fwd_lcores;3222 cur_fwd_config.nb_fwd_lcores = (lcoreid_t) nb_fwd_lcores;
3178 cur_fwd_config.nb_fwd_ports = nb_fwd_ports;3223 cur_fwd_config.nb_fwd_ports = nb_fwd_ports;
3179 cur_fwd_config.nb_fwd_streams =3224 cur_fwd_config.nb_fwd_streams =
3180 (streamid_t) (nb_rxq * cur_fwd_config.nb_fwd_ports);3225 (streamid_t) (nb_rxq * cur_fwd_config.nb_fwd_ports);
3226 total_tc_num = get_fwd_port_total_tc_num();
3227 if (cur_fwd_config.nb_fwd_lcores > total_tc_num)
3228 cur_fwd_config.nb_fwd_lcores = total_tc_num;
31813229
3182 /* reinitialize forwarding streams */3230 /* reinitialize forwarding streams */
3183 init_fwd_streams();3231 init_fwd_streams();
@@ -3299,6 +3347,10 @@ icmp_echo_config_setup(void)
3299void3347void
3300fwd_config_setup(void)3348fwd_config_setup(void)
3301{3349{
3350 struct rte_port *port;
3351 portid_t pt_id;
3352 unsigned int i;
3353
3302 cur_fwd_config.fwd_eng = cur_fwd_eng;3354 cur_fwd_config.fwd_eng = cur_fwd_eng;
3303 if (strcmp(cur_fwd_eng->fwd_mode_name, "icmpecho") == 0) {3355 if (strcmp(cur_fwd_eng->fwd_mode_name, "icmpecho") == 0) {
3304 icmp_echo_config_setup();3356 icmp_echo_config_setup();
@@ -3306,9 +3358,24 @@ fwd_config_setup(void)
3306 }3358 }
33073359
3308 if ((nb_rxq > 1) && (nb_txq > 1)){3360 if ((nb_rxq > 1) && (nb_txq > 1)){
3309 if (dcb_config)3361 if (dcb_config) {
3362 for (i = 0; i < nb_fwd_ports; i++) {
3363 pt_id = fwd_ports_ids[i];
3364 port = &ports[pt_id];
3365 if (!port->dcb_flag) {
3366 printf("In DCB mode, all forwarding ports must "
3367 "be configured in this mode.\n");
3368 return;
3369 }
3370 }
3371 if (nb_fwd_lcores == 1) {
3372 printf("In DCB mode,the nb forwarding cores "
3373 "should be larger than 1.\n");
3374 return;
3375 }
3376
3310 dcb_fwd_config_setup();3377 dcb_fwd_config_setup();
3311 else3378 } else
3312 rss_fwd_config_setup();3379 rss_fwd_config_setup();
3313 }3380 }
3314 else3381 else
@@ -3693,13 +3760,14 @@ set_tx_pkt_split(const char *name)
3693}3760}
36943761
3695int3762int
3696parse_fec_mode(const char *name, uint32_t *mode)3763parse_fec_mode(const char *name, uint32_t *fec_capa)
3697{3764{
3698 uint8_t i;3765 uint8_t i;
36993766
3700 for (i = 0; i < RTE_DIM(fec_mode_name); i++) {3767 for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
3701 if (strcmp(fec_mode_name[i].name, name) == 0) {3768 if (strcmp(fec_mode_name[i].name, name) == 0) {
3702 *mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);3769 *fec_capa =
3770 RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
3703 return 0;3771 return 0;
3704 }3772 }
3705 }3773 }
@@ -3842,13 +3910,15 @@ nb_segs_is_invalid(unsigned int nb_segs)
3842 RTE_ETH_FOREACH_DEV(port_id) {3910 RTE_ETH_FOREACH_DEV(port_id) {
3843 for (queue_id = 0; queue_id < nb_txq; queue_id++) {3911 for (queue_id = 0; queue_id < nb_txq; queue_id++) {
3844 ret = get_tx_ring_size(port_id, queue_id, &ring_size);3912 ret = get_tx_ring_size(port_id, queue_id, &ring_size);
38453913 if (ret) {
3846 if (ret)3914 /* Port may not be initialized yet, can't say
3847 return true;3915 * the port is invalid in this stage.
38483916 */
3917 continue;
3918 }
3849 if (ring_size < nb_segs) {3919 if (ring_size < nb_segs) {
3850 printf("nb segments per TX packets=%u >= "3920 printf("nb segments per TX packets=%u >= TX "
3851 "TX queue(%u) ring_size=%u - ignored\n",3921 "queue(%u) ring_size=%u - txpkts ignored\n",
3852 nb_segs, queue_id, ring_size);3922 nb_segs, queue_id, ring_size);
3853 return true;3923 return true;
3854 }3924 }
@@ -3864,12 +3934,26 @@ set_tx_pkt_segments(unsigned int *seg_lengths, unsigned int nb_segs)
3864 uint16_t tx_pkt_len;3934 uint16_t tx_pkt_len;
3865 unsigned int i;3935 unsigned int i;
38663936
3867 if (nb_segs_is_invalid(nb_segs))3937 /*
3938 * For single segment settings failed check is ignored.
3939 * It is a very basic capability to send the single segment
3940 * packets, suppose it is always supported.
3941 */
3942 if (nb_segs > 1 && nb_segs_is_invalid(nb_segs)) {
3943 printf("Tx segment size(%u) is not supported - txpkts ignored\n",
3944 nb_segs);
3945 return;
3946 }
3947
3948 if (nb_segs > RTE_MAX_SEGS_PER_PKT) {
3949 printf("Tx segment size(%u) is bigger than max number of segment(%u)\n",
3950 nb_segs, RTE_MAX_SEGS_PER_PKT);
3868 return;3951 return;
3952 }
38693953
3870 /*3954 /*
3871 * Check that each segment length is greater or equal than3955 * Check that each segment length is greater or equal than
3872 * the mbuf data sise.3956 * the mbuf data size.
3873 * Check also that the total packet length is greater or equal than the3957 * Check also that the total packet length is greater or equal than the
3874 * size of an empty UDP/IP packet (sizeof(struct rte_ether_hdr) +3958 * size of an empty UDP/IP packet (sizeof(struct rte_ether_hdr) +
3875 * 20 + 8).3959 * 20 + 8).
@@ -5219,7 +5303,8 @@ show_macs(portid_t port_id)
52195303
5220 dev = &rte_eth_devices[port_id];5304 dev = &rte_eth_devices[port_id];
52215305
5222 rte_eth_dev_info_get(port_id, &dev_info);5306 if (eth_dev_info_get_print_err(port_id, &dev_info))
5307 return;
52235308
5224 for (i = 0; i < dev_info.max_mac_addrs; i++) {5309 for (i = 0; i < dev_info.max_mac_addrs; i++) {
5225 addr = &dev->data->mac_addrs[i];5310 addr = &dev->data->mac_addrs[i];
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index d813d4f..b0a58e8 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -480,17 +480,18 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
480480
481 if (info->ethertype == _htons(RTE_ETHER_TYPE_IPV4)) {481 if (info->ethertype == _htons(RTE_ETHER_TYPE_IPV4)) {
482 ipv4_hdr = l3_hdr;482 ipv4_hdr = l3_hdr;
483 ipv4_hdr->hdr_checksum = 0;
484483
485 ol_flags |= PKT_TX_IPV4;484 ol_flags |= PKT_TX_IPV4;
486 if (info->l4_proto == IPPROTO_TCP && tso_segsz) {485 if (info->l4_proto == IPPROTO_TCP && tso_segsz) {
487 ol_flags |= PKT_TX_IP_CKSUM;486 ol_flags |= PKT_TX_IP_CKSUM;
488 } else {487 } else {
489 if (tx_offloads & DEV_TX_OFFLOAD_IPV4_CKSUM)488 if (tx_offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) {
490 ol_flags |= PKT_TX_IP_CKSUM;489 ol_flags |= PKT_TX_IP_CKSUM;
491 else490 } else {
491 ipv4_hdr->hdr_checksum = 0;
492 ipv4_hdr->hdr_checksum =492 ipv4_hdr->hdr_checksum =
493 rte_ipv4_cksum(ipv4_hdr);493 rte_ipv4_cksum(ipv4_hdr);
494 }
494 }495 }
495 } else if (info->ethertype == _htons(RTE_ETHER_TYPE_IPV6))496 } else if (info->ethertype == _htons(RTE_ETHER_TYPE_IPV6))
496 ol_flags |= PKT_TX_IPV6;497 ol_flags |= PKT_TX_IPV6;
@@ -501,10 +502,10 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
501 udp_hdr = (struct rte_udp_hdr *)((char *)l3_hdr + info->l3_len);502 udp_hdr = (struct rte_udp_hdr *)((char *)l3_hdr + info->l3_len);
502 /* do not recalculate udp cksum if it was 0 */503 /* do not recalculate udp cksum if it was 0 */
503 if (udp_hdr->dgram_cksum != 0) {504 if (udp_hdr->dgram_cksum != 0) {
504 udp_hdr->dgram_cksum = 0;505 if (tx_offloads & DEV_TX_OFFLOAD_UDP_CKSUM) {
505 if (tx_offloads & DEV_TX_OFFLOAD_UDP_CKSUM)
506 ol_flags |= PKT_TX_UDP_CKSUM;506 ol_flags |= PKT_TX_UDP_CKSUM;
507 else {507 } else {
508 udp_hdr->dgram_cksum = 0;
508 udp_hdr->dgram_cksum =509 udp_hdr->dgram_cksum =
509 get_udptcp_checksum(l3_hdr, udp_hdr,510 get_udptcp_checksum(l3_hdr, udp_hdr,
510 info->ethertype);511 info->ethertype);
@@ -514,12 +515,12 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
514 ol_flags |= PKT_TX_UDP_SEG;515 ol_flags |= PKT_TX_UDP_SEG;
515 } else if (info->l4_proto == IPPROTO_TCP) {516 } else if (info->l4_proto == IPPROTO_TCP) {
516 tcp_hdr = (struct rte_tcp_hdr *)((char *)l3_hdr + info->l3_len);517 tcp_hdr = (struct rte_tcp_hdr *)((char *)l3_hdr + info->l3_len);
517 tcp_hdr->cksum = 0;
518 if (tso_segsz)518 if (tso_segsz)
519 ol_flags |= PKT_TX_TCP_SEG;519 ol_flags |= PKT_TX_TCP_SEG;
520 else if (tx_offloads & DEV_TX_OFFLOAD_TCP_CKSUM)520 else if (tx_offloads & DEV_TX_OFFLOAD_TCP_CKSUM) {
521 ol_flags |= PKT_TX_TCP_CKSUM;521 ol_flags |= PKT_TX_TCP_CKSUM;
522 else {522 } else {
523 tcp_hdr->cksum = 0;
523 tcp_hdr->cksum =524 tcp_hdr->cksum =
524 get_udptcp_checksum(l3_hdr, tcp_hdr,525 get_udptcp_checksum(l3_hdr, tcp_hdr,
525 info->ethertype);526 info->ethertype);
@@ -529,13 +530,13 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
529 } else if (info->l4_proto == IPPROTO_SCTP) {530 } else if (info->l4_proto == IPPROTO_SCTP) {
530 sctp_hdr = (struct rte_sctp_hdr *)531 sctp_hdr = (struct rte_sctp_hdr *)
531 ((char *)l3_hdr + info->l3_len);532 ((char *)l3_hdr + info->l3_len);
532 sctp_hdr->cksum = 0;
533 /* sctp payload must be a multiple of 4 to be533 /* sctp payload must be a multiple of 4 to be
534 * offloaded */534 * offloaded */
535 if ((tx_offloads & DEV_TX_OFFLOAD_SCTP_CKSUM) &&535 if ((tx_offloads & DEV_TX_OFFLOAD_SCTP_CKSUM) &&
536 ((ipv4_hdr->total_length & 0x3) == 0)) {536 ((ipv4_hdr->total_length & 0x3) == 0)) {
537 ol_flags |= PKT_TX_SCTP_CKSUM;537 ol_flags |= PKT_TX_SCTP_CKSUM;
538 } else {538 } else {
539 sctp_hdr->cksum = 0;
539 /* XXX implement CRC32c, example available in540 /* XXX implement CRC32c, example available in
540 * RFC3309 */541 * RFC3309 */
541 }542 }
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index df5eb10..bf6df7e 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -49,29 +49,7 @@
49static void49static void
50usage(char* progname)50usage(char* progname)
51{51{
52 printf("usage: %s [EAL options] -- "52 printf("\nUsage: %s [EAL options] -- [testpmd options]\n\n",
53#ifdef RTE_LIB_CMDLINE
54 "[--interactive|-i] "
55 "[--cmdline-file=FILENAME] "
56#endif
57 "[--help|-h] | [--auto-start|-a] | ["
58 "--tx-first | --stats-period=PERIOD | "
59 "--coremask=COREMASK --portmask=PORTMASK --numa "
60 "--portlist=PORTLIST "
61 "--mbuf-size= | --total-num-mbufs= | "
62 "--nb-cores= | --nb-ports= | "
63#ifdef RTE_LIB_CMDLINE
64 "--eth-peers-configfile= | "
65 "--eth-peer=X,M:M:M:M:M:M | "
66 "--tx-ip=SRC,DST | --tx-udp=PORT | "
67#endif
68 "--pkt-filter-mode= |"
69 "--rss-ip | --rss-udp | --rss-level-inner | --rss-level-outer |"
70 "--rxpt= | --rxht= | --rxwt= |"
71 " --rxfreet= | --txpt= | --txht= | --txwt= | --txfreet= | "
72 "--txrst= | --tx-offloads= | | --rx-offloads= | "
73 "--vxlan-gpe-port= | --geneve-parsed-port= | "
74 "--record-core-cycles | --record-burst-stats]\n",
75 progname);53 progname);
76#ifdef RTE_LIB_CMDLINE54#ifdef RTE_LIB_CMDLINE
77 printf(" --interactive: run in interactive mode.\n");55 printf(" --interactive: run in interactive mode.\n");
@@ -97,6 +75,7 @@ usage(char* progname)
97 printf(" --portlist=PORTLIST: list of forwarding ports\n");75 printf(" --portlist=PORTLIST: list of forwarding ports\n");
98 printf(" --numa: enable NUMA-aware allocation of RX/TX rings and of "76 printf(" --numa: enable NUMA-aware allocation of RX/TX rings and of "
99 "RX memory buffers (mbufs).\n");77 "RX memory buffers (mbufs).\n");
78 printf(" --no-numa: disable NUMA-aware allocation.\n");
100 printf(" --port-numa-config=(port,socket)[,(port,socket)]: "79 printf(" --port-numa-config=(port,socket)[,(port,socket)]: "
101 "specify the socket on which the memory pool "80 "specify the socket on which the memory pool "
102 "used by the port will be allocated.\n");81 "used by the port will be allocated.\n");
@@ -136,6 +115,7 @@ usage(char* progname)
136 "monitoring on forwarding lcore id N.\n");115 "monitoring on forwarding lcore id N.\n");
137#endif116#endif
138 printf(" --disable-crc-strip: disable CRC stripping by hardware.\n");117 printf(" --disable-crc-strip: disable CRC stripping by hardware.\n");
118 printf(" --enable-scatter: enable scattered Rx.\n");
139 printf(" --enable-lro: enable large receive offload.\n");119 printf(" --enable-lro: enable large receive offload.\n");
140 printf(" --enable-rx-cksum: enable rx hardware checksum offload.\n");120 printf(" --enable-rx-cksum: enable rx hardware checksum offload.\n");
141 printf(" --enable-rx-timestamp: enable rx hardware timestamp offload.\n");121 printf(" --enable-rx-timestamp: enable rx hardware timestamp offload.\n");
@@ -183,6 +163,8 @@ usage(char* progname)
183 printf(" --txpkts=X[,Y]*: set TX segment sizes"163 printf(" --txpkts=X[,Y]*: set TX segment sizes"
184 " or total packet length.\n");164 " or total packet length.\n");
185 printf(" --txonly-multi-flow: generate multiple flows in txonly mode\n");165 printf(" --txonly-multi-flow: generate multiple flows in txonly mode\n");
166 printf(" --tx-ip=src,dst: IP addresses in Tx-only mode\n");
167 printf(" --tx-udp=src[,dst]: UDP ports in Tx-only mode\n");
186 printf(" --disable-link-check: disable check on link status when "168 printf(" --disable-link-check: disable check on link status when "
187 "starting/stopping ports.\n");169 "starting/stopping ports.\n");
188 printf(" --disable-device-start: do not automatically start port\n");170 printf(" --disable-device-start: do not automatically start port\n");
@@ -213,14 +195,14 @@ usage(char* progname)
213 printf(" --noisy-lkup-memory=N: allocate N MB of VNF memory\n");195 printf(" --noisy-lkup-memory=N: allocate N MB of VNF memory\n");
214 printf(" --noisy-lkup-num-writes=N: do N random writes per packet\n");196 printf(" --noisy-lkup-num-writes=N: do N random writes per packet\n");
215 printf(" --noisy-lkup-num-reads=N: do N random reads per packet\n");197 printf(" --noisy-lkup-num-reads=N: do N random reads per packet\n");
216 printf(" --noisy-lkup-num-writes=N: do N random reads and writes per packet\n");198 printf(" --noisy-lkup-num-reads-writes=N: do N random reads and writes per packet\n");
217 printf(" --no-iova-contig: mempool memory can be IOVA non contiguous. "199 printf(" --no-iova-contig: mempool memory can be IOVA non contiguous. "
218 "valid only with --mp-alloc=anon\n");200 "valid only with --mp-alloc=anon\n");
219 printf(" --rx-mq-mode=0xX: hexadecimal bitmask of RX mq mode can be "201 printf(" --rx-mq-mode=0xX: hexadecimal bitmask of RX mq mode can be "
220 "enabled\n");202 "enabled\n");
221 printf(" --record-core-cycles: enable measurement of CPU cycles.\n");203 printf(" --record-core-cycles: enable measurement of CPU cycles.\n");
222 printf(" --record-burst-stats: enable display of RX and TX bursts.\n");204 printf(" --record-burst-stats: enable display of RX and TX bursts.\n");
223 printf(" --hairpin-mode=0xXX: bitmask set the hairpin port mode.\n "205 printf(" --hairpin-mode=0xXX: bitmask set the hairpin port mode.\n"
224 " 0x10 - explicit Tx rule, 0x02 - hairpin ports paired\n"206 " 0x10 - explicit Tx rule, 0x02 - hairpin ports paired\n"
225 " 0x01 - hairpin ports loop, 0x00 - hairpin port self\n");207 " 0x01 - hairpin ports loop, 0x00 - hairpin port self\n");
226}208}
@@ -510,7 +492,6 @@ launch_args_parse(int argc, char** argv)
510#endif492#endif
511 { "tx-first", 0, 0, 0 },493 { "tx-first", 0, 0, 0 },
512 { "stats-period", 1, 0, 0 },494 { "stats-period", 1, 0, 0 },
513 { "ports", 1, 0, 0 },
514 { "nb-cores", 1, 0, 0 },495 { "nb-cores", 1, 0, 0 },
515 { "nb-ports", 1, 0, 0 },496 { "nb-ports", 1, 0, 0 },
516 { "coremask", 1, 0, 0 },497 { "coremask", 1, 0, 0 },
@@ -518,7 +499,7 @@ launch_args_parse(int argc, char** argv)
518 { "portlist", 1, 0, 0 },499 { "portlist", 1, 0, 0 },
519 { "numa", 0, 0, 0 },500 { "numa", 0, 0, 0 },
520 { "no-numa", 0, 0, 0 },501 { "no-numa", 0, 0, 0 },
521 { "mp-anon", 0, 0, 0 },502 { "mp-anon", 0, 0, 0 }, /* deprecated */
522 { "port-numa-config", 1, 0, 0 },503 { "port-numa-config", 1, 0, 0 },
523 { "ring-numa-config", 1, 0, 0 },504 { "ring-numa-config", 1, 0, 0 },
524 { "socket-num", 1, 0, 0 },505 { "socket-num", 1, 0, 0 },
@@ -630,7 +611,7 @@ launch_args_parse(int argc, char** argv)
630 case 0: /*long options */611 case 0: /*long options */
631 if (!strcmp(lgopts[opt_idx].name, "help")) {612 if (!strcmp(lgopts[opt_idx].name, "help")) {
632 usage(argv[0]);613 usage(argv[0]);
633 rte_exit(EXIT_SUCCESS, "Displayed help\n");614 exit(EXIT_SUCCESS);
634 }615 }
635#ifdef RTE_LIB_CMDLINE616#ifdef RTE_LIB_CMDLINE
636 if (!strcmp(lgopts[opt_idx].name, "interactive")) {617 if (!strcmp(lgopts[opt_idx].name, "interactive")) {
@@ -1359,7 +1340,7 @@ launch_args_parse(int argc, char** argv)
1359 break;1340 break;
1360 case 'h':1341 case 'h':
1361 usage(argv[0]);1342 usage(argv[0]);
1362 rte_exit(EXIT_SUCCESS, "Displayed help\n");1343 exit(EXIT_SUCCESS);
1363 break;1344 break;
1364 default:1345 default:
1365 usage(argv[0]);1346 usage(argv[0]);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 555852a..5288c04 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -245,9 +245,6 @@ uint16_t mb_mempool_cache = DEF_MBUF_CACHE; /**< Size of mbuf mempool cache. */
245/* current configuration is in DCB or not,0 means it is not in DCB mode */245/* current configuration is in DCB or not,0 means it is not in DCB mode */
246uint8_t dcb_config = 0;246uint8_t dcb_config = 0;
247247
248/* Whether the dcb is in testing status */
249uint8_t dcb_test = 0;
250
251/*248/*
252 * Configurable number of RX/TX queues.249 * Configurable number of RX/TX queues.
253 */250 */
@@ -1402,22 +1399,69 @@ check_nb_hairpinq(queueid_t hairpinq)
1402}1399}
14031400
1404static void1401static void
1402init_config_port_offloads(portid_t pid, uint32_t socket_id)
1403{
1404 struct rte_port *port = &ports[pid];
1405 uint16_t data_size;
1406 int ret;
1407 int i;
1408
1409 port->dev_conf.txmode = tx_mode;
1410 port->dev_conf.rxmode = rx_mode;
1411
1412 ret = eth_dev_info_get_print_err(pid, &port->dev_info);
1413 if (ret != 0)
1414 rte_exit(EXIT_FAILURE, "rte_eth_dev_info_get() failed\n");
1415
1416 ret = update_jumbo_frame_offload(pid);
1417 if (ret != 0)
1418 printf("Updating jumbo frame offload failed for port %u\n",
1419 pid);
1420
1421 if (!(port->dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE))
1422 port->dev_conf.txmode.offloads &=
1423 ~DEV_TX_OFFLOAD_MBUF_FAST_FREE;
1424
1425 /* Apply Rx offloads configuration */
1426 for (i = 0; i < port->dev_info.max_rx_queues; i++)
1427 port->rx_conf[i].offloads = port->dev_conf.rxmode.offloads;
1428 /* Apply Tx offloads configuration */
1429 for (i = 0; i < port->dev_info.max_tx_queues; i++)
1430 port->tx_conf[i].offloads = port->dev_conf.txmode.offloads;
1431
1432 /* set flag to initialize port/queue */
1433 port->need_reconfig = 1;
1434 port->need_reconfig_queues = 1;
1435 port->socket_id = socket_id;
1436 port->tx_metadata = 0;
1437
1438 /*
1439 * Check for maximum number of segments per MTU.
1440 * Accordingly update the mbuf data size.
1441 */
1442 if (port->dev_info.rx_desc_lim.nb_mtu_seg_max != UINT16_MAX &&
1443 port->dev_info.rx_desc_lim.nb_mtu_seg_max != 0) {
1444 data_size = rx_mode.max_rx_pkt_len /
1445 port->dev_info.rx_desc_lim.nb_mtu_seg_max;
1446
1447 if ((data_size + RTE_PKTMBUF_HEADROOM) > mbuf_data_size[0]) {
1448 mbuf_data_size[0] = data_size + RTE_PKTMBUF_HEADROOM;
1449 TESTPMD_LOG(WARNING,
1450 "Configured mbuf size of the first segment %hu\n",
1451 mbuf_data_size[0]);
1452 }
1453 }
1454}
1455
1456static void
1405init_config(void)1457init_config(void)
1406{1458{
1407 portid_t pid;1459 portid_t pid;
1408 struct rte_port *port;
1409 struct rte_mempool *mbp;1460 struct rte_mempool *mbp;
1410 unsigned int nb_mbuf_per_pool;1461 unsigned int nb_mbuf_per_pool;
1411 lcoreid_t lc_id;1462 lcoreid_t lc_id;
1412 uint8_t port_per_socket[RTE_MAX_NUMA_NODES];
1413 struct rte_gro_param gro_param;1463 struct rte_gro_param gro_param;
1414 uint32_t gso_types;1464 uint32_t gso_types;
1415 uint16_t data_size;
1416 bool warning = 0;
1417 int k;
1418 int ret;
1419
1420 memset(port_per_socket,0,RTE_MAX_NUMA_NODES);
14211465
1422 /* Configuration of logical cores. */1466 /* Configuration of logical cores. */
1423 fwd_lcores = rte_zmalloc("testpmd: fwd_lcores",1467 fwd_lcores = rte_zmalloc("testpmd: fwd_lcores",
@@ -1439,30 +1483,12 @@ init_config(void)
1439 }1483 }
14401484
1441 RTE_ETH_FOREACH_DEV(pid) {1485 RTE_ETH_FOREACH_DEV(pid) {
1442 port = &ports[pid];1486 uint32_t socket_id;
1443 /* Apply default TxRx configuration for all ports */
1444 port->dev_conf.txmode = tx_mode;
1445 port->dev_conf.rxmode = rx_mode;
1446
1447 ret = eth_dev_info_get_print_err(pid, &port->dev_info);
1448 if (ret != 0)
1449 rte_exit(EXIT_FAILURE,
1450 "rte_eth_dev_info_get() failed\n");
1451
1452 ret = update_jumbo_frame_offload(pid);
1453 if (ret != 0)
1454 printf("Updating jumbo frame offload failed for port %u\n",
1455 pid);
14561487
1457 if (!(port->dev_info.tx_offload_capa &
1458 DEV_TX_OFFLOAD_MBUF_FAST_FREE))
1459 port->dev_conf.txmode.offloads &=
1460 ~DEV_TX_OFFLOAD_MBUF_FAST_FREE;
1461 if (numa_support) {1488 if (numa_support) {
1462 if (port_numa[pid] != NUMA_NO_CONFIG)1489 socket_id = port_numa[pid];
1463 port_per_socket[port_numa[pid]]++;1490 if (port_numa[pid] == NUMA_NO_CONFIG) {
1464 else {1491 socket_id = rte_eth_dev_socket_id(pid);
1465 uint32_t socket_id = rte_eth_dev_socket_id(pid);
14661492
1467 /*1493 /*
1468 * if socket_id is invalid,1494 * if socket_id is invalid,
@@ -1470,45 +1496,14 @@ init_config(void)
1470 */1496 */
1471 if (check_socket_id(socket_id) < 0)1497 if (check_socket_id(socket_id) < 0)
1472 socket_id = socket_ids[0];1498 socket_id = socket_ids[0];
1473 port_per_socket[socket_id]++;
1474 }
1475 }
1476
1477 /* Apply Rx offloads configuration */
1478 for (k = 0; k < port->dev_info.max_rx_queues; k++)
1479 port->rx_conf[k].offloads =
1480 port->dev_conf.rxmode.offloads;
1481 /* Apply Tx offloads configuration */
1482 for (k = 0; k < port->dev_info.max_tx_queues; k++)
1483 port->tx_conf[k].offloads =
1484 port->dev_conf.txmode.offloads;
1485
1486 /* set flag to initialize port/queue */
1487 port->need_reconfig = 1;
1488 port->need_reconfig_queues = 1;
1489 port->tx_metadata = 0;
1490
1491 /* Check for maximum number of segments per MTU. Accordingly
1492 * update the mbuf data size.
1493 */
1494 if (port->dev_info.rx_desc_lim.nb_mtu_seg_max != UINT16_MAX &&
1495 port->dev_info.rx_desc_lim.nb_mtu_seg_max != 0) {
1496 data_size = rx_mode.max_rx_pkt_len /
1497 port->dev_info.rx_desc_lim.nb_mtu_seg_max;
1498
1499 if ((data_size + RTE_PKTMBUF_HEADROOM) >
1500 mbuf_data_size[0]) {
1501 mbuf_data_size[0] = data_size +
1502 RTE_PKTMBUF_HEADROOM;
1503 warning = 1;
1504 }1499 }
1500 } else {
1501 socket_id = (socket_num == UMA_NO_CONFIG) ?
1502 0 : socket_num;
1505 }1503 }
1504 /* Apply default TxRx configuration for all ports */
1505 init_config_port_offloads(pid, socket_id);
1506 }1506 }
1507
1508 if (warning)
1509 TESTPMD_LOG(WARNING,
1510 "Configured mbuf size of the first segment %hu\n",
1511 mbuf_data_size[0]);
1512 /*1507 /*
1513 * Create pools of mbuf.1508 * Create pools of mbuf.
1514 * If NUMA support is disabled, create a single pool of mbuf in1509 * If NUMA support is disabled, create a single pool of mbuf in
@@ -1595,21 +1590,8 @@ init_config(void)
1595void1590void
1596reconfig(portid_t new_port_id, unsigned socket_id)1591reconfig(portid_t new_port_id, unsigned socket_id)
1597{1592{
1598 struct rte_port *port;
1599 int ret;
1600
1601 /* Reconfiguration of Ethernet ports. */1593 /* Reconfiguration of Ethernet ports. */
1602 port = &ports[new_port_id];1594 init_config_port_offloads(new_port_id, socket_id);
1603
1604 ret = eth_dev_info_get_print_err(new_port_id, &port->dev_info);
1605 if (ret != 0)
1606 return;
1607
1608 /* set flag to initialize port/queue */
1609 port->need_reconfig = 1;
1610 port->need_reconfig_queues = 1;
1611 port->socket_id = socket_id;
1612
1613 init_port_config();1595 init_port_config();
1614}1596}
16151597
@@ -2123,9 +2105,7 @@ start_packet_forwarding(int with_tx_first)
2123{2105{
2124 port_fwd_begin_t port_fwd_begin;2106 port_fwd_begin_t port_fwd_begin;
2125 port_fwd_end_t port_fwd_end;2107 port_fwd_end_t port_fwd_end;
2126 struct rte_port *port;
2127 unsigned int i;2108 unsigned int i;
2128 portid_t pt_id;
21292109
2130 if (strcmp(cur_fwd_eng->fwd_mode_name, "rxonly") == 0 && !nb_rxq)2110 if (strcmp(cur_fwd_eng->fwd_mode_name, "rxonly") == 0 && !nb_rxq)
2131 rte_exit(EXIT_FAILURE, "rxq are 0, cannot use rxonly fwd mode\n");2111 rte_exit(EXIT_FAILURE, "rxq are 0, cannot use rxonly fwd mode\n");
@@ -2148,24 +2128,6 @@ start_packet_forwarding(int with_tx_first)
2148 printf("Packet forwarding already started\n");2128 printf("Packet forwarding already started\n");
2149 return;2129 return;
2150 }2130 }
2151
2152
2153 if(dcb_test) {
2154 for (i = 0; i < nb_fwd_ports; i++) {
2155 pt_id = fwd_ports_ids[i];
2156 port = &ports[pt_id];
2157 if (!port->dcb_flag) {
2158 printf("In DCB mode, all forwarding ports must "
2159 "be configured in this mode.\n");
2160 return;
2161 }
2162 }
2163 if (nb_fwd_lcores == 1) {
2164 printf("In DCB mode,the nb forwarding cores "
2165 "should be larger than 1.\n");
2166 return;
2167 }
2168 }
2169 test_done = 0;2131 test_done = 0;
21702132
2171 fwd_config_setup();2133 fwd_config_setup();
@@ -2452,14 +2414,11 @@ start_port(portid_t pid)
2452 int peer_pi;2414 int peer_pi;
2453 queueid_t qi;2415 queueid_t qi;
2454 struct rte_port *port;2416 struct rte_port *port;
2455 struct rte_ether_addr mac_addr;
2456 struct rte_eth_hairpin_cap cap;2417 struct rte_eth_hairpin_cap cap;
24572418
2458 if (port_id_is_invalid(pid, ENABLED_WARN))2419 if (port_id_is_invalid(pid, ENABLED_WARN))
2459 return 0;2420 return 0;
24602421
2461 if(dcb_config)
2462 dcb_test = 1;
2463 RTE_ETH_FOREACH_DEV(pi) {2422 RTE_ETH_FOREACH_DEV(pi) {
2464 if (pid != pi && pid != (portid_t)RTE_PORT_ALL)2423 if (pid != pi && pid != (portid_t)RTE_PORT_ALL)
2465 continue;2424 continue;
@@ -2623,11 +2582,14 @@ start_port(portid_t pid)
2623 RTE_PORT_HANDLING, RTE_PORT_STARTED) == 0)2582 RTE_PORT_HANDLING, RTE_PORT_STARTED) == 0)
2624 printf("Port %d can not be set into started\n", pi);2583 printf("Port %d can not be set into started\n", pi);
26252584
2626 if (eth_macaddr_get_print_err(pi, &mac_addr) == 0)2585 if (eth_macaddr_get_print_err(pi, &port->eth_addr) == 0)
2627 printf("Port %d: %02X:%02X:%02X:%02X:%02X:%02X\n", pi,2586 printf("Port %d: %02X:%02X:%02X:%02X:%02X:%02X\n", pi,
2628 mac_addr.addr_bytes[0], mac_addr.addr_bytes[1],2587 port->eth_addr.addr_bytes[0],
2629 mac_addr.addr_bytes[2], mac_addr.addr_bytes[3],2588 port->eth_addr.addr_bytes[1],
2630 mac_addr.addr_bytes[4], mac_addr.addr_bytes[5]);2589 port->eth_addr.addr_bytes[2],
2590 port->eth_addr.addr_bytes[3],
2591 port->eth_addr.addr_bytes[4],
2592 port->eth_addr.addr_bytes[5]);
26312593
2632 /* at least one port started, need checking link status */2594 /* at least one port started, need checking link status */
2633 need_check_link_status = 1;2595 need_check_link_status = 1;
@@ -2697,11 +2659,6 @@ stop_port(portid_t pid)
2697 portid_t peer_pl[RTE_MAX_ETHPORTS];2659 portid_t peer_pl[RTE_MAX_ETHPORTS];
2698 int peer_pi;2660 int peer_pi;
26992661
2700 if (dcb_test) {
2701 dcb_test = 0;
2702 dcb_config = 0;
2703 }
2704
2705 if (port_id_is_invalid(pid, ENABLED_WARN))2662 if (port_id_is_invalid(pid, ENABLED_WARN))
2706 return;2663 return;
27072664
@@ -3604,8 +3561,6 @@ init_port_dcb_config(portid_t pid,
3604 rte_port = &ports[pid];3561 rte_port = &ports[pid];
36053562
3606 memset(&port_conf, 0, sizeof(struct rte_eth_conf));3563 memset(&port_conf, 0, sizeof(struct rte_eth_conf));
3607 /* Enter DCB configuration status */
3608 dcb_config = 1;
36093564
3610 port_conf.rxmode = rte_port->dev_conf.rxmode;3565 port_conf.rxmode = rte_port->dev_conf.rxmode;
3611 port_conf.txmode = rte_port->dev_conf.txmode;3566 port_conf.txmode = rte_port->dev_conf.txmode;
@@ -3673,6 +3628,9 @@ init_port_dcb_config(portid_t pid,
36733628
3674 rte_port->dcb_flag = 1;3629 rte_port->dcb_flag = 1;
36753630
3631 /* Enter DCB configuration status */
3632 dcb_config = 1;
3633
3676 return 0;3634 return 0;
3677}3635}
36783636
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 2f8f5a9..927ca58 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -423,7 +423,6 @@ extern uint64_t noisy_lkup_num_reads;
423extern uint64_t noisy_lkup_num_reads_writes;423extern uint64_t noisy_lkup_num_reads_writes;
424424
425extern uint8_t dcb_config;425extern uint8_t dcb_config;
426extern uint8_t dcb_test;
427426
428extern uint32_t mbuf_data_size_n;427extern uint32_t mbuf_data_size_n;
429extern uint16_t mbuf_data_size[MAX_SEGS_BUFFER_SPLIT];428extern uint16_t mbuf_data_size[MAX_SEGS_BUFFER_SPLIT];
@@ -879,7 +878,7 @@ void show_tx_pkt_segments(void);
879void set_tx_pkt_times(unsigned int *tx_times);878void set_tx_pkt_times(unsigned int *tx_times);
880void show_tx_pkt_times(void);879void show_tx_pkt_times(void);
881void set_tx_pkt_split(const char *name);880void set_tx_pkt_split(const char *name);
882int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);881int parse_fec_mode(const char *name, uint32_t *fec_capa);
883void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);882void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
884void set_nb_pkt_per_burst(uint16_t pkt_burst);883void set_nb_pkt_per_burst(uint16_t pkt_burst);
885char *list_pkt_forwarding_modes(void);884char *list_pkt_forwarding_modes(void);
@@ -934,7 +933,7 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate,
934933
935void port_rss_hash_conf_show(portid_t port_id, int show_rss_key);934void port_rss_hash_conf_show(portid_t port_id, int show_rss_key);
936void port_rss_hash_key_update(portid_t port_id, char rss_type[],935void port_rss_hash_key_update(portid_t port_id, char rss_type[],
937 uint8_t *hash_key, uint hash_key_len);936 uint8_t *hash_key, uint8_t hash_key_len);
938int rx_queue_id_is_invalid(queueid_t rxq_id);937int rx_queue_id_is_invalid(queueid_t rxq_id);
939int tx_queue_id_is_invalid(queueid_t txq_id);938int tx_queue_id_is_invalid(queueid_t txq_id);
940void setup_gro(const char *onoff, portid_t port_id);939void setup_gro(const char *onoff, portid_t port_id);
diff --git a/app/test-regex/main.c b/app/test-regex/main.c
index ac6152d..6a8eb07 100644
--- a/app/test-regex/main.c
+++ b/app/test-regex/main.c
@@ -105,12 +105,11 @@ args_parse(int argc, char **argv, char *rules_file, char *data_file,
105 *nb_iterations = atoi(optarg);105 *nb_iterations = atoi(optarg);
106 break;106 break;
107 case ARG_HELP:107 case ARG_HELP:
108 usage("RegEx test app");108 usage(argv[0]);
109 break;109 break;
110 default:110 default:
111 fprintf(stderr, "Invalid option: %s\n", argv[optind]);111 usage(argv[0]);
112 usage("RegEx test app");112 rte_exit(EXIT_FAILURE, "Invalid option: %s\n", argv[optind]);
113 rte_exit(EXIT_FAILURE, "Invalid option\n");
114 break;113 break;
115 }114 }
116 }115 }
diff --git a/app/test/autotest_test_funcs.py b/app/test/autotest_test_funcs.py
index 0811066..6c717bd 100644
--- a/app/test/autotest_test_funcs.py
+++ b/app/test/autotest_test_funcs.py
@@ -13,13 +13,16 @@ import pexpect
13def default_autotest(child, test_name):13def default_autotest(child, test_name):
14 child.sendline(test_name)14 child.sendline(test_name)
15 result = child.expect(["Test OK", "Test Failed",15 result = child.expect(["Test OK", "Test Failed",
16 "Command not found", pexpect.TIMEOUT], timeout=900)16 "Command not found", pexpect.TIMEOUT,
17 "Test Skipped"], timeout=900)
17 if result == 1:18 if result == 1:
18 return -1, "Fail"19 return -1, "Fail"
19 elif result == 2:20 elif result == 2:
20 return -1, "Fail [Not found]"21 return -1, "Fail [Not found]"
21 elif result == 3:22 elif result == 3:
22 return -1, "Fail [Timeout]"23 return -1, "Fail [Timeout]"
24 elif result == 4:
25 return 0, "Skipped [Not Run]"
23 return 0, "Success"26 return 0, "Success"
2427
25# autotest used to run dump commands28# autotest used to run dump commands
diff --git a/app/test/meson.build b/app/test/meson.build
index bdbc619..49fbb5e 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -396,8 +396,6 @@ if cc.has_argument('-Wno-format-truncation')
396 cflags += '-Wno-format-truncation'396 cflags += '-Wno-format-truncation'
397endif397endif
398398
399# specify -D_GNU_SOURCE unconditionally
400cflags += '-D_GNU_SOURCE'
401# Strict-aliasing rules are violated by uint8_t[] to context size casts.399# Strict-aliasing rules are violated by uint8_t[] to context size casts.
402cflags += '-fno-strict-aliasing'400cflags += '-fno-strict-aliasing'
403401
@@ -424,7 +422,6 @@ foreach d:test_deps
424 def_lib = get_option('default_library')422 def_lib = get_option('default_library')
425 test_dep_objs += get_variable(def_lib + '_rte_' + d)423 test_dep_objs += get_variable(def_lib + '_rte_' + d)
426endforeach424endforeach
427test_dep_objs += cc.find_library('execinfo', required: false)
428425
429link_libs = []426link_libs = []
430if get_option('default_library') == 'static'427if get_option('default_library') == 'static'
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index f203f9d..0fd7290 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -117,6 +117,7 @@ initialize_tcp_header(struct rte_tcp_hdr *tcp_hdr, uint16_t src_port,
117 memset(tcp_hdr, 0, sizeof(struct rte_tcp_hdr));117 memset(tcp_hdr, 0, sizeof(struct rte_tcp_hdr));
118 tcp_hdr->src_port = rte_cpu_to_be_16(src_port);118 tcp_hdr->src_port = rte_cpu_to_be_16(src_port);
119 tcp_hdr->dst_port = rte_cpu_to_be_16(dst_port);119 tcp_hdr->dst_port = rte_cpu_to_be_16(dst_port);
120 tcp_hdr->data_off = (sizeof(struct rte_tcp_hdr) << 2) & 0xF0;
120121
121 return pkt_len;122 return pkt_len;
122}123}
@@ -141,8 +142,8 @@ uint16_t
141initialize_ipv6_header(struct rte_ipv6_hdr *ip_hdr, uint8_t *src_addr,142initialize_ipv6_header(struct rte_ipv6_hdr *ip_hdr, uint8_t *src_addr,
142 uint8_t *dst_addr, uint16_t pkt_data_len)143 uint8_t *dst_addr, uint16_t pkt_data_len)
143{144{
144 ip_hdr->vtc_flow = 0;145 ip_hdr->vtc_flow = rte_cpu_to_be_32(0x60000000); /* Set version to 6. */
145 ip_hdr->payload_len = pkt_data_len;146 ip_hdr->payload_len = rte_cpu_to_be_16(pkt_data_len);
146 ip_hdr->proto = IPPROTO_UDP;147 ip_hdr->proto = IPPROTO_UDP;
147 ip_hdr->hop_limits = IP_DEFTTL;148 ip_hdr->hop_limits = IP_DEFTTL;
148149
diff --git a/app/test/process.h b/app/test/process.h
index 27f1b1c..a09a088 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -48,6 +48,7 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
48#ifdef RTE_LIB_PDUMP48#ifdef RTE_LIB_PDUMP
49#ifdef RTE_NET_RING49#ifdef RTE_NET_RING
50 pthread_t thread;50 pthread_t thread;
51 int rc;
51#endif52#endif
52#endif53#endif
5354
@@ -126,8 +127,13 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
126 /* parent process does a wait */127 /* parent process does a wait */
127#ifdef RTE_LIB_PDUMP128#ifdef RTE_LIB_PDUMP
128#ifdef RTE_NET_RING129#ifdef RTE_NET_RING
129 if ((strcmp(env_value, "run_pdump_server_tests") == 0))130 if ((strcmp(env_value, "run_pdump_server_tests") == 0)) {
130 pthread_create(&thread, NULL, &send_pkts, NULL);131 rc = pthread_create(&thread, NULL, &send_pkts, NULL);
132 if (rc != 0) {
133 rte_panic("Cannot start send pkts thread: %s\n",
134 strerror(rc));
135 }
136 }
131#endif137#endif
132#endif138#endif
133139
diff --git a/app/test/test.c b/app/test/test.c
index 624dd48..864523e 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -134,8 +134,13 @@ main(int argc, char **argv)
134 goto out;134 goto out;
135 }135 }
136136
137 argv += ret;
138
139 prgname = argv[0];
140
137#ifdef RTE_LIB_TIMER141#ifdef RTE_LIB_TIMER
138 if (rte_timer_subsystem_init() < 0) {142 ret = rte_timer_subsystem_init();
143 if (ret < 0 && ret != -EALREADY) {
139 ret = -1;144 ret = -1;
140 goto out;145 goto out;
141 }146 }
@@ -146,10 +151,6 @@ main(int argc, char **argv)
146 goto out;151 goto out;
147 }152 }
148153
149 argv += ret;
150
151 prgname = argv[0];
152
153 recursive_call = getenv(RECURSIVE_ENV_VAR);154 recursive_call = getenv(RECURSIVE_ENV_VAR);
154 if (recursive_call != NULL) {155 if (recursive_call != NULL) {
155 ret = do_recursive_call();156 ret = do_recursive_call();
diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c
index 7c3de96..527c06b 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -3207,7 +3207,7 @@ run_test(const struct bpf_test *tst)
3207 printf("%s@%d: check_result(%s) failed, "3207 printf("%s@%d: check_result(%s) failed, "
3208 "error: %d(%s);\n",3208 "error: %d(%s);\n",
3209 __func__, __LINE__, tst->name,3209 __func__, __LINE__, tst->name,
3210 rv, strerror(ret));3210 rv, strerror(rv));
3211 }3211 }
3212 }3212 }
32133213
diff --git a/app/test/test_cmdline_ipaddr.c b/app/test/test_cmdline_ipaddr.c
index b3f50d8..2a1ee12 100644
--- a/app/test/test_cmdline_ipaddr.c
+++ b/app/test/test_cmdline_ipaddr.c
@@ -255,7 +255,7 @@ const char * ipaddr_invalid_strs[] = {
255 /** misc **/255 /** misc **/
256256
257 /* too long */257 /* too long */
258 "1234:1234:1234:1234:1234:1234:1234:1234:1234:1234:1234"258 "1234:1234:1234:1234:1234:1234:1234:1234:1234:1234:1234",
259 "random invalid text",259 "random invalid text",
260 "",260 "",
261 "\0",261 "\0",
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index bd72df0..d5a09b4 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -71,10 +71,12 @@ test_cmdline_parse_fns(void)
71 if (cmdline_complete(cl, "buffer", &i, NULL, sizeof(dst)) >= 0)71 if (cmdline_complete(cl, "buffer", &i, NULL, sizeof(dst)) >= 0)
72 goto error;72 goto error;
7373
74 cmdline_free(cl);
74 return 0;75 return 0;
7576
76error:77error:
77 printf("Error: function accepted null parameter!\n");78 printf("Error: function accepted null parameter!\n");
79 cmdline_free(cl);
78 return -1;80 return -1;
79}81}
8082
@@ -140,22 +142,31 @@ static int
140test_cmdline_socket_fns(void)142test_cmdline_socket_fns(void)
141{143{
142 cmdline_parse_ctx_t ctx;144 cmdline_parse_ctx_t ctx;
145 struct cmdline *cl;
143146
144 if (cmdline_stdin_new(NULL, "prompt") != NULL)147 cl = cmdline_stdin_new(NULL, "prompt");
148 if (cl != NULL)
145 goto error;149 goto error;
146 if (cmdline_stdin_new(&ctx, NULL) != NULL)150 cl = cmdline_stdin_new(&ctx, NULL);
151 if (cl != NULL)
147 goto error;152 goto error;
148 if (cmdline_file_new(NULL, "prompt", "/dev/null") != NULL)153 cl = cmdline_file_new(NULL, "prompt", "/dev/null");
154 if (cl != NULL)
149 goto error;155 goto error;
150 if (cmdline_file_new(&ctx, NULL, "/dev/null") != NULL)156 cl = cmdline_file_new(&ctx, NULL, "/dev/null");
157 if (cl != NULL)
151 goto error;158 goto error;
152 if (cmdline_file_new(&ctx, "prompt", NULL) != NULL)159 cl = cmdline_file_new(&ctx, "prompt", NULL);
160 if (cl != NULL)
153 goto error;161 goto error;
154 if (cmdline_file_new(&ctx, "prompt", "-/invalid/~/path") != NULL) {162 cl = cmdline_file_new(&ctx, "prompt", "-/invalid/~/path");
163 if (cl != NULL) {
155 printf("Error: succeeded in opening invalid file for reading!");164 printf("Error: succeeded in opening invalid file for reading!");
165 cmdline_free(cl);
156 return -1;166 return -1;
157 }167 }
158 if (cmdline_file_new(&ctx, "prompt", "/dev/null") == NULL) {168 cl = cmdline_file_new(&ctx, "prompt", "/dev/null");
169 if (cl == NULL) {
159 printf("Error: failed to open /dev/null for reading!");170 printf("Error: failed to open /dev/null for reading!");
160 return -1;171 return -1;
161 }172 }
@@ -163,9 +174,11 @@ test_cmdline_socket_fns(void)
163 /* void functions */174 /* void functions */
164 cmdline_stdin_exit(NULL);175 cmdline_stdin_exit(NULL);
165176
177 cmdline_free(cl);
166 return 0;178 return 0;
167error:179error:
168 printf("Error: function accepted null parameter!\n");180 printf("Error: function accepted null parameter!\n");
181 cmdline_free(cl);
169 return -1;182 return -1;
170}183}
171184
@@ -176,13 +189,14 @@ test_cmdline_fns(void)
176 struct cmdline *cl;189 struct cmdline *cl;
177190
178 memset(&ctx, 0, sizeof(ctx));191 memset(&ctx, 0, sizeof(ctx));
179 cl = cmdline_new(&ctx, "test", -1, -1);192 cl = cmdline_new(NULL, "prompt", 0, 0);
180 if (cl == NULL)193 if (cl != NULL)
181 goto error;194 goto error;
182195 cl = cmdline_new(&ctx, NULL, 0, 0);
183 if (cmdline_new(NULL, "prompt", 0, 0) != NULL)196 if (cl != NULL)
184 goto error;197 goto error;
185 if (cmdline_new(&ctx, NULL, 0, 0) != NULL)198 cl = cmdline_new(&ctx, "test", -1, -1);
199 if (cl == NULL)
186 goto error;200 goto error;
187 if (cmdline_in(NULL, "buffer", CMDLINE_TEST_BUFSIZE) >= 0)201 if (cmdline_in(NULL, "buffer", CMDLINE_TEST_BUFSIZE) >= 0)
188 goto error;202 goto error;
@@ -198,6 +212,7 @@ test_cmdline_fns(void)
198 cmdline_interact(NULL);212 cmdline_interact(NULL);
199 cmdline_quit(NULL);213 cmdline_quit(NULL);
200214
215 cmdline_free(cl);
201 return 0;216 return 0;
202217
203error:218error:
diff --git a/app/test/test_cmdline_num.c b/app/test/test_cmdline_num.c
index ec479cd..9276de5 100644
--- a/app/test/test_cmdline_num.c
+++ b/app/test/test_cmdline_num.c
@@ -200,8 +200,8 @@ const char * num_invalid_strs[] = {
200 "-0x1234580A",200 "-0x1234580A",
201 "-0b0111010101",201 "-0b0111010101",
202 /* too long (128+ chars) */202 /* too long (128+ chars) */
203 "0b1111000011110000111100001111000011110000111100001111000011110000"203 ("0b1111000011110000111100001111000011110000111100001111000011110000"
204 "1111000011110000111100001111000011110000111100001111000011110000",204 "1111000011110000111100001111000011110000111100001111000011110000"),
205 "1E3",205 "1E3",
206 "0A",206 "0A",
207 "-B",207 "-B",
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 8189053..dd2b035 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -135,10 +135,11 @@ setup_test_string(struct rte_mempool *mpool,
135 struct rte_mbuf *m = rte_pktmbuf_alloc(mpool);135 struct rte_mbuf *m = rte_pktmbuf_alloc(mpool);
136 size_t t_len = len - (blocksize ? (len % blocksize) : 0);136 size_t t_len = len - (blocksize ? (len % blocksize) : 0);
137137
138 memset(m->buf_addr, 0, m->buf_len);
139 if (m) {138 if (m) {
140 char *dst = rte_pktmbuf_append(m, t_len);139 char *dst;
141140
141 memset(m->buf_addr, 0, m->buf_len);
142 dst = rte_pktmbuf_append(m, t_len);
142 if (!dst) {143 if (!dst) {
143 rte_pktmbuf_free(m);144 rte_pktmbuf_free(m);
144 return NULL;145 return NULL;
@@ -2630,6 +2631,21 @@ create_wireless_algo_auth_cipher_operation(
2630 iv_ptr += cipher_iv_len;2631 iv_ptr += cipher_iv_len;
2631 rte_memcpy(iv_ptr, auth_iv, auth_iv_len);2632 rte_memcpy(iv_ptr, auth_iv, auth_iv_len);
26322633
2634 /* Only copy over the offset data needed from src to dst in OOP,
2635 * if the auth and cipher offsets are not aligned
2636 */
2637 if (op_mode == OUT_OF_PLACE) {
2638 if (cipher_offset > auth_offset)
2639 rte_memcpy(
2640 rte_pktmbuf_mtod_offset(
2641 sym_op->m_dst,
2642 uint8_t *, auth_offset >> 3),
2643 rte_pktmbuf_mtod_offset(
2644 sym_op->m_src,
2645 uint8_t *, auth_offset >> 3),
2646 ((cipher_offset >> 3) - (auth_offset >> 3)));
2647 }
2648
2633 if (cipher_algo == RTE_CRYPTO_CIPHER_SNOW3G_UEA2 ||2649 if (cipher_algo == RTE_CRYPTO_CIPHER_SNOW3G_UEA2 ||
2634 cipher_algo == RTE_CRYPTO_CIPHER_KASUMI_F8 ||2650 cipher_algo == RTE_CRYPTO_CIPHER_KASUMI_F8 ||
2635 cipher_algo == RTE_CRYPTO_CIPHER_ZUC_EEA3) {2651 cipher_algo == RTE_CRYPTO_CIPHER_ZUC_EEA3) {
@@ -4672,16 +4688,20 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata,
46724688
4673 /* Validate obuf */4689 /* Validate obuf */
4674 if (verify) {4690 if (verify) {
4675 TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(4691 TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT_OFFSET(
4676 plaintext,4692 plaintext,
4677 tdata->plaintext.data,4693 tdata->plaintext.data,
4678 tdata->plaintext.len >> 3,4694 (tdata->plaintext.len - tdata->cipher.offset_bits -
4695 (tdata->digest.len << 3)),
4696 tdata->cipher.offset_bits,
4679 "SNOW 3G Plaintext data not as expected");4697 "SNOW 3G Plaintext data not as expected");
4680 } else {4698 } else {
4681 TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(4699 TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT_OFFSET(
4682 ciphertext,4700 ciphertext,
4683 tdata->ciphertext.data,4701 tdata->ciphertext.data,
4684 tdata->validDataLenInBits.len,4702 (tdata->validDataLenInBits.len -
4703 tdata->cipher.offset_bits),
4704 tdata->cipher.offset_bits,
4685 "SNOW 3G Ciphertext data not as expected");4705 "SNOW 3G Ciphertext data not as expected");
46864706
4687 TEST_ASSERT_BUFFERS_ARE_EQUAL(4707 TEST_ASSERT_BUFFERS_ARE_EQUAL(
@@ -4883,16 +4903,20 @@ test_snow3g_auth_cipher_sgl(const struct snow3g_test_data *tdata,
48834903
4884 /* Validate obuf */4904 /* Validate obuf */
4885 if (verify) {4905 if (verify) {
4886 TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(4906 TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT_OFFSET(
4887 plaintext,4907 plaintext,
4888 tdata->plaintext.data,4908 tdata->plaintext.data,
4889 tdata->plaintext.len >> 3,4909 (tdata->plaintext.len - tdata->cipher.offset_bits -
4910 (tdata->digest.len << 3)),
4911 tdata->cipher.offset_bits,
4890 "SNOW 3G Plaintext data not as expected");4912 "SNOW 3G Plaintext data not as expected");
4891 } else {4913 } else {
4892 TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(4914 TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT_OFFSET(
4893 ciphertext,4915 ciphertext,
4894 tdata->ciphertext.data,4916 tdata->ciphertext.data,
4895 tdata->validDataLenInBits.len,4917 (tdata->validDataLenInBits.len -
4918 tdata->cipher.offset_bits),
4919 tdata->cipher.offset_bits,
4896 "SNOW 3G Ciphertext data not as expected");4920 "SNOW 3G Ciphertext data not as expected");
48974921
4898 TEST_ASSERT_BUFFERS_ARE_EQUAL(4922 TEST_ASSERT_BUFFERS_ARE_EQUAL(
@@ -10388,8 +10412,8 @@ test_multi_session(void)
10388 rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);10412 rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
1038910413
10390 sessions = rte_malloc(NULL,10414 sessions = rte_malloc(NULL,
10391 (sizeof(struct rte_cryptodev_sym_session *) *10415 sizeof(struct rte_cryptodev_sym_session *) *
10392 MAX_NB_SESSIONS) + 1, 0);10416 (MAX_NB_SESSIONS + 1), 0);
1039310417
10394 /* Create multiple crypto sessions*/10418 /* Create multiple crypto sessions*/
10395 for (i = 0; i < MAX_NB_SESSIONS; i++) {10419 for (i = 0; i < MAX_NB_SESSIONS; i++) {
@@ -10434,6 +10458,7 @@ test_multi_session(void)
10434 }10458 }
10435 }10459 }
1043610460
10461 sessions[i] = NULL;
10437 /* Next session create should fail */10462 /* Next session create should fail */
10438 rte_cryptodev_sym_session_init(ts_params->valid_devs[0],10463 rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
10439 sessions[i], &ut_params->auth_xform,10464 sessions[i], &ut_params->auth_xform,
@@ -12000,7 +12025,7 @@ test_authenticated_decryption_fail_when_corruption(
12000}12025}
1200112026
12002static int12027static int
12003test_authenticated_encryt_with_esn(12028test_authenticated_encrypt_with_esn(
12004 struct crypto_testsuite_params *ts_params,12029 struct crypto_testsuite_params *ts_params,
12005 struct crypto_unittest_params *ut_params,12030 struct crypto_unittest_params *ut_params,
12006 const struct test_crypto_vector *reference)12031 const struct test_crypto_vector *reference)
@@ -12787,7 +12812,7 @@ auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt(void)
12787static int12812static int
12788auth_encrypt_AES128CBC_HMAC_SHA1_esn_check(void)12813auth_encrypt_AES128CBC_HMAC_SHA1_esn_check(void)
12789{12814{
12790 return test_authenticated_encryt_with_esn(12815 return test_authenticated_encrypt_with_esn(
12791 &testsuite_params,12816 &testsuite_params,
12792 &unittest_params,12817 &unittest_params,
12793 &aes128cbc_hmac_sha1_aad_test_vector);12818 &aes128cbc_hmac_sha1_aad_test_vector);
@@ -13762,7 +13787,7 @@ static struct unit_test_suite cryptodev_ccp_testsuite = {
13762};13787};
1376313788
13764static int13789static int
13765test_cryptodev_qat(void /*argv __rte_unused, int argc __rte_unused*/)13790test_cryptodev_qat(void)
13766{13791{
13767 gbl_driver_id = rte_cryptodev_driver_id_get(13792 gbl_driver_id = rte_cryptodev_driver_id_get(
13768 RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD));13793 RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD));
@@ -13776,7 +13801,7 @@ test_cryptodev_qat(void /*argv __rte_unused, int argc __rte_unused*/)
13776}13801}
1377713802
13778static int13803static int
13779test_cryptodev_virtio(void /*argv __rte_unused, int argc __rte_unused*/)13804test_cryptodev_virtio(void)
13780{13805{
13781 gbl_driver_id = rte_cryptodev_driver_id_get(13806 gbl_driver_id = rte_cryptodev_driver_id_get(
13782 RTE_STR(CRYPTODEV_NAME_VIRTIO_PMD));13807 RTE_STR(CRYPTODEV_NAME_VIRTIO_PMD));
@@ -13790,7 +13815,7 @@ test_cryptodev_virtio(void /*argv __rte_unused, int argc __rte_unused*/)
13790}13815}
1379113816
13792static int13817static int
13793test_cryptodev_aesni_mb(void /*argv __rte_unused, int argc __rte_unused*/)13818test_cryptodev_aesni_mb(void)
13794{13819{
13795 gbl_driver_id = rte_cryptodev_driver_id_get(13820 gbl_driver_id = rte_cryptodev_driver_id_get(
13796 RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD));13821 RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD));
@@ -13888,7 +13913,7 @@ test_cryptodev_null(void)
13888}13913}
1388913914
13890static int13915static int
13891test_cryptodev_sw_snow3g(void /*argv __rte_unused, int argc __rte_unused*/)13916test_cryptodev_sw_snow3g(void)
13892{13917{
13893 gbl_driver_id = rte_cryptodev_driver_id_get(13918 gbl_driver_id = rte_cryptodev_driver_id_get(
13894 RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD));13919 RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD));
@@ -13902,7 +13927,7 @@ test_cryptodev_sw_snow3g(void /*argv __rte_unused, int argc __rte_unused*/)
13902}13927}
1390313928
13904static int13929static int
13905test_cryptodev_sw_kasumi(void /*argv __rte_unused, int argc __rte_unused*/)13930test_cryptodev_sw_kasumi(void)
13906{13931{
13907 gbl_driver_id = rte_cryptodev_driver_id_get(13932 gbl_driver_id = rte_cryptodev_driver_id_get(
13908 RTE_STR(CRYPTODEV_NAME_KASUMI_PMD));13933 RTE_STR(CRYPTODEV_NAME_KASUMI_PMD));
@@ -13916,7 +13941,7 @@ test_cryptodev_sw_kasumi(void /*argv __rte_unused, int argc __rte_unused*/)
13916}13941}
1391713942
13918static int13943static int
13919test_cryptodev_sw_zuc(void /*argv __rte_unused, int argc __rte_unused*/)13944test_cryptodev_sw_zuc(void)
13920{13945{
13921 gbl_driver_id = rte_cryptodev_driver_id_get(13946 gbl_driver_id = rte_cryptodev_driver_id_get(
13922 RTE_STR(CRYPTODEV_NAME_ZUC_PMD));13947 RTE_STR(CRYPTODEV_NAME_ZUC_PMD));
@@ -13960,7 +13985,7 @@ test_cryptodev_mrvl(void)
13960#ifdef RTE_CRYPTO_SCHEDULER13985#ifdef RTE_CRYPTO_SCHEDULER
1396113986
13962static int13987static int
13963test_cryptodev_scheduler(void /*argv __rte_unused, int argc __rte_unused*/)13988test_cryptodev_scheduler(void)
13964{13989{
13965 gbl_driver_id = rte_cryptodev_driver_id_get(13990 gbl_driver_id = rte_cryptodev_driver_id_get(
13966 RTE_STR(CRYPTODEV_NAME_SCHEDULER_PMD));13991 RTE_STR(CRYPTODEV_NAME_SCHEDULER_PMD));
@@ -13983,7 +14008,7 @@ REGISTER_TEST_COMMAND(cryptodev_scheduler_autotest, test_cryptodev_scheduler);
13983#endif14008#endif
1398414009
13985static int14010static int
13986test_cryptodev_dpaa2_sec(void /*argv __rte_unused, int argc __rte_unused*/)14011test_cryptodev_dpaa2_sec(void)
13987{14012{
13988 gbl_driver_id = rte_cryptodev_driver_id_get(14013 gbl_driver_id = rte_cryptodev_driver_id_get(
13989 RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD));14014 RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD));
@@ -13997,7 +14022,7 @@ test_cryptodev_dpaa2_sec(void /*argv __rte_unused, int argc __rte_unused*/)
13997}14022}
1399814023
13999static int14024static int
14000test_cryptodev_dpaa_sec(void /*argv __rte_unused, int argc __rte_unused*/)14025test_cryptodev_dpaa_sec(void)
14001{14026{
14002 gbl_driver_id = rte_cryptodev_driver_id_get(14027 gbl_driver_id = rte_cryptodev_driver_id_get(
14003 RTE_STR(CRYPTODEV_NAME_DPAA_SEC_PMD));14028 RTE_STR(CRYPTODEV_NAME_DPAA_SEC_PMD));
@@ -14049,7 +14074,7 @@ test_cryptodev_octeontx2(void)
14049}14074}
1405014075
14051static int14076static int
14052test_cryptodev_caam_jr(void /*argv __rte_unused, int argc __rte_unused*/)14077test_cryptodev_caam_jr(void)
14053{14078{
14054 gbl_driver_id = rte_cryptodev_driver_id_get(14079 gbl_driver_id = rte_cryptodev_driver_id_get(
14055 RTE_STR(CRYPTODEV_NAME_CAAM_JR_PMD));14080 RTE_STR(CRYPTODEV_NAME_CAAM_JR_PMD));
@@ -14091,7 +14116,7 @@ test_cryptodev_bcmfs(void)
14091}14116}
1409214117
14093static int14118static int
14094test_cryptodev_qat_raw_api(void /*argv __rte_unused, int argc __rte_unused*/)14119test_cryptodev_qat_raw_api(void)
14095{14120{
14096 int ret;14121 int ret;
1409714122
diff --git a/app/test/test_cryptodev_aes_test_vectors.h b/app/test/test_cryptodev_aes_test_vectors.h
index c192d75..bb5f09f 100644
--- a/app/test/test_cryptodev_aes_test_vectors.h
+++ b/app/test/test_cryptodev_aes_test_vectors.h
@@ -2650,7 +2650,7 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
2650 .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,2650 .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
2651 },2651 },
2652 {2652 {
2653 .test_descr = "AES-192-CBC Encryption Scater gather",2653 .test_descr = "AES-192-CBC Encryption Scatter gather",
2654 .test_data = &aes_test_data_10,2654 .test_data = &aes_test_data_10,
2655 .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,2655 .op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
2656 .feature_mask = BLOCKCIPHER_TEST_FEATURE_SG |2656 .feature_mask = BLOCKCIPHER_TEST_FEATURE_SG |
diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c
index 135e57b..8e16872 100644
--- a/app/test/test_cryptodev_blockcipher.c
+++ b/app/test/test_cryptodev_blockcipher.c
@@ -160,7 +160,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
160 printf("Raw Data Path APIs do not support OOP, "160 printf("Raw Data Path APIs do not support OOP, "
161 "Test Skipped.\n");161 "Test Skipped.\n");
162 snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "SKIPPED");162 snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "SKIPPED");
163 status = TEST_SUCCESS;163 status = TEST_SKIPPED;
164 goto error_exit;164 goto error_exit;
165 }165 }
166 }166 }
diff --git a/app/test/test_debug.c b/app/test/test_debug.c
index 834a738..23b24db 100644
--- a/app/test/test_debug.c
+++ b/app/test/test_debug.c
@@ -4,6 +4,8 @@
44
5#include <stdio.h>5#include <stdio.h>
6#include <stdint.h>6#include <stdint.h>
7#include <sys/resource.h>
8#include <sys/time.h>
7#include <sys/wait.h>9#include <sys/wait.h>
8#include <unistd.h>10#include <unistd.h>
911
@@ -28,9 +30,14 @@ test_panic(void)
2830
29 pid = fork();31 pid = fork();
3032
31 if (pid == 0)33 if (pid == 0) {
34 struct rlimit rl;
35
36 /* No need to generate a coredump when panicking. */
37 rl.rlim_cur = rl.rlim_max = 0;
38 setrlimit(RLIMIT_CORE, &rl);
32 rte_panic("Test Debug\n");39 rte_panic("Test Debug\n");
33 else if (pid < 0){40 } else if (pid < 0) {
34 printf("Fork Failed\n");41 printf("Fork Failed\n");
35 return -1;42 return -1;
36 }43 }
diff --git a/app/test/test_distributor_perf.c b/app/test/test_distributor_perf.c
index b25f79a..fdbeae6 100644
--- a/app/test/test_distributor_perf.c
+++ b/app/test/test_distributor_perf.c
@@ -188,13 +188,15 @@ quit_workers(struct rte_distributor *d, struct rte_mempool *p)
188 rte_mempool_get_bulk(p, (void *)bufs, num_workers);188 rte_mempool_get_bulk(p, (void *)bufs, num_workers);
189189
190 quit = 1;190 quit = 1;
191 for (i = 0; i < num_workers; i++)191 for (i = 0; i < num_workers; i++) {
192 bufs[i]->hash.usr = i << 1;192 bufs[i]->hash.usr = i << 1;
193 rte_distributor_process(d, bufs, num_workers);193 rte_distributor_process(d, &bufs[i], 1);
194 }
194195
195 rte_mempool_put_bulk(p, (void *)bufs, num_workers);196 rte_mempool_put_bulk(p, (void *)bufs, num_workers);
196197
197 rte_distributor_process(d, NULL, 0);198 rte_distributor_process(d, NULL, 0);
199 rte_distributor_flush(d);
198 rte_eal_mp_wait_lcore();200 rte_eal_mp_wait_lcore();
199 quit = 0;201 quit = 0;
200 worker_idx = 0;202 worker_idx = 0;
diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index 932fbe3..b4880ee 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -124,6 +124,7 @@ process_hugefiles(const char * prefix, enum hugepage_action action)
124 case HUGEPAGE_CHECK_EXISTS:124 case HUGEPAGE_CHECK_EXISTS:
125 {125 {
126 /* file exists, return */126 /* file exists, return */
127 closedir(hugepage_dir);
127 result = 1;128 result = 1;
128 goto end;129 goto end;
129 }130 }
diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index 335211c..71b58fc 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -224,8 +224,7 @@ test_op_forward_mode(uint8_t session_less)
224 op->sess_type = RTE_CRYPTO_OP_SESSIONLESS;224 op->sess_type = RTE_CRYPTO_OP_SESSIONLESS;
225 first_xform = &cipher_xform;225 first_xform = &cipher_xform;
226 sym_op->xform = first_xform;226 sym_op->xform = first_xform;
227 uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH +227 uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH;
228 (sizeof(struct rte_crypto_sym_xform) * 2);
229 op->private_data_offset = len;228 op->private_data_offset = len;
230 /* Fill in private data information */229 /* Fill in private data information */
231 rte_memcpy(&m_data.response_info, &response_info,230 rte_memcpy(&m_data.response_info, &response_info,
@@ -419,8 +418,7 @@ test_op_new_mode(uint8_t session_less)
419 op->sess_type = RTE_CRYPTO_OP_SESSIONLESS;418 op->sess_type = RTE_CRYPTO_OP_SESSIONLESS;
420 first_xform = &cipher_xform;419 first_xform = &cipher_xform;
421 sym_op->xform = first_xform;420 sym_op->xform = first_xform;
422 uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH +421 uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH;
423 (sizeof(struct rte_crypto_sym_xform) * 2);
424 op->private_data_offset = len;422 op->private_data_offset = len;
425 /* Fill in private data information */423 /* Fill in private data information */
426 rte_memcpy(&m_data.response_info, &response_info,424 rte_memcpy(&m_data.response_info, &response_info,
@@ -516,7 +514,8 @@ configure_cryptodev(void)
516 NUM_MBUFS, MBUF_CACHE_SIZE,514 NUM_MBUFS, MBUF_CACHE_SIZE,
517 DEFAULT_NUM_XFORMS *515 DEFAULT_NUM_XFORMS *
518 sizeof(struct rte_crypto_sym_xform) +516 sizeof(struct rte_crypto_sym_xform) +
519 MAXIMUM_IV_LENGTH,517 MAXIMUM_IV_LENGTH +
518 sizeof(union rte_event_crypto_metadata),
520 rte_socket_id());519 rte_socket_id());
521 if (params.op_mpool == NULL) {520 if (params.op_mpool == NULL) {
522 RTE_LOG(ERR, USER1, "Can't create CRYPTO_OP_POOL\n");521 RTE_LOG(ERR, USER1, "Can't create CRYPTO_OP_POOL\n");
diff --git a/app/test/test_event_timer_adapter.c b/app/test/test_event_timer_adapter.c
index ad3f4dc..b536dde 100644
--- a/app/test/test_event_timer_adapter.c
+++ b/app/test/test_event_timer_adapter.c
@@ -3,6 +3,8 @@
3 * Copyright(c) 2017-2018 Intel Corporation.3 * Copyright(c) 2017-2018 Intel Corporation.
4 */4 */
55
6#include <math.h>
7
6#include <rte_atomic.h>8#include <rte_atomic.h>
7#include <rte_common.h>9#include <rte_common.h>
8#include <rte_cycles.h>10#include <rte_cycles.h>
@@ -46,7 +48,7 @@ static uint64_t global_info_bkt_tck_ns;
46static volatile uint8_t arm_done;48static volatile uint8_t arm_done;
4749
48#define CALC_TICKS(tks) \50#define CALC_TICKS(tks) \
49 ((tks * global_bkt_tck_ns) / global_info_bkt_tck_ns)51 ceil((double)(tks * global_bkt_tck_ns) / global_info_bkt_tck_ns)
5052
5153
52static bool using_services;54static bool using_services;
diff --git a/app/test/test_external_mem.c b/app/test/test_external_mem.c
index 7eb81f6..5edf88b 100644
--- a/app/test/test_external_mem.c
+++ b/app/test/test_external_mem.c
@@ -13,6 +13,7 @@
13#include <rte_common.h>13#include <rte_common.h>
14#include <rte_debug.h>14#include <rte_debug.h>
15#include <rte_eal.h>15#include <rte_eal.h>
16#include <rte_eal_paging.h>
16#include <rte_errno.h>17#include <rte_errno.h>
17#include <rte_malloc.h>18#include <rte_malloc.h>
18#include <rte_ring.h>19#include <rte_ring.h>
@@ -532,8 +533,8 @@ fail:
532static int533static int
533test_external_mem(void)534test_external_mem(void)
534{535{
536 size_t pgsz = rte_mem_page_size();
535 size_t len = EXTERNAL_MEM_SZ;537 size_t len = EXTERNAL_MEM_SZ;
536 size_t pgsz = RTE_PGSIZE_4K;
537 rte_iova_t iova[len / pgsz];538 rte_iova_t iova[len / pgsz];
538 void *addr;539 void *addr;
539 int ret, n_pages;540 int ret, n_pages;
diff --git a/app/test/test_flow_classify.c b/app/test/test_flow_classify.c
index ef0b6fd..951606f 100644
--- a/app/test/test_flow_classify.c
+++ b/app/test/test_flow_classify.c
@@ -828,6 +828,12 @@ test_flow_classify(void)
828 cls_params.name = "flow_classifier";828 cls_params.name = "flow_classifier";
829 cls_params.socket_id = 0;829 cls_params.socket_id = 0;
830 cls->cls = rte_flow_classifier_create(&cls_params);830 cls->cls = rte_flow_classifier_create(&cls_params);
831 if (cls->cls == NULL) {
832 printf("Line %i: flow classifier create has failed!\n",
833 __LINE__);
834 rte_free(cls);
835 return TEST_FAILED;
836 }
831837
832 /* initialise ACL table params */838 /* initialise ACL table params */
833 table_acl_params.n_rule_fields = RTE_DIM(ipv4_defs);839 table_acl_params.n_rule_fields = RTE_DIM(ipv4_defs);
diff --git a/app/test/test_kni.c b/app/test/test_kni.c
index f53a53e..9673355 100644
--- a/app/test/test_kni.c
+++ b/app/test/test_kni.c
@@ -562,8 +562,12 @@ test_kni(void)
562 }562 }
563 closedir(dir);563 closedir(dir);
564564
565 /* Initialize KNI subsytem */565 /* Initialize KNI subsystem */
566 rte_kni_init(KNI_TEST_MAX_PORTS);566 ret = rte_kni_init(KNI_TEST_MAX_PORTS);
567 if (ret < 0) {
568 printf("fail to initialize KNI subsystem\n");
569 return -1;
570 }
567571
568 if (test_kni_allocate_lcores() < 0) {572 if (test_kni_allocate_lcores() < 0) {
569 printf("No enough lcores for kni processing\n");573 printf("No enough lcores for kni processing\n");
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index a40f7d4..5bb4786 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -1174,6 +1174,8 @@ err:
1174}1174}
11751175
1176#include <unistd.h>1176#include <unistd.h>
1177#include <sys/resource.h>
1178#include <sys/time.h>
1177#include <sys/wait.h>1179#include <sys/wait.h>
11781180
1179/* use fork() to test mbuf errors panic */1181/* use fork() to test mbuf errors panic */
@@ -1186,9 +1188,14 @@ verify_mbuf_check_panics(struct rte_mbuf *buf)
1186 pid = fork();1188 pid = fork();
11871189
1188 if (pid == 0) {1190 if (pid == 0) {
1191 struct rlimit rl;
1192
1193 /* No need to generate a coredump when panicking. */
1194 rl.rlim_cur = rl.rlim_max = 0;
1195 setrlimit(RLIMIT_CORE, &rl);
1189 rte_mbuf_sanity_check(buf, 1); /* should panic */1196 rte_mbuf_sanity_check(buf, 1); /* should panic */
1190 exit(0); /* return normally if it doesn't panic */1197 exit(0); /* return normally if it doesn't panic */
1191 } else if (pid < 0){1198 } else if (pid < 0) {
1192 printf("Fork Failed\n");1199 printf("Fork Failed\n");
1193 return -1;1200 return -1;
1194 }1201 }
@@ -2356,7 +2363,7 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
2356 if (rte_mbuf_refcnt_read(m) != 1)2363 if (rte_mbuf_refcnt_read(m) != 1)
2357 GOTO_FAIL("%s: Invalid refcnt in mbuf\n", __func__);2364 GOTO_FAIL("%s: Invalid refcnt in mbuf\n", __func__);
23582365
2359 buf_iova = rte_mempool_virt2iova(ext_buf_addr);2366 buf_iova = rte_mem_virt2iova(ext_buf_addr);
2360 rte_pktmbuf_attach_extbuf(m, ext_buf_addr, buf_iova, buf_len,2367 rte_pktmbuf_attach_extbuf(m, ext_buf_addr, buf_iova, buf_len,
2361 ret_shinfo);2368 ret_shinfo);
2362 if (m->ol_flags != EXT_ATTACHED_MBUF)2369 if (m->ol_flags != EXT_ATTACHED_MBUF)
diff --git a/app/test/test_mempool.c b/app/test/test_mempool.c
index 084842f..3adadd6 100644
--- a/app/test/test_mempool.c
+++ b/app/test/test_mempool.c
@@ -552,7 +552,7 @@ test_mempool(void)
552 GOTO_ERR(ret, err);552 GOTO_ERR(ret, err);
553553
554 /* test to initialize mempool objects and memory */554 /* test to initialize mempool objects and memory */
555 nb_objs = rte_mempool_obj_iter(mp_stack_mempool_iter, rte_pktmbuf_init,555 nb_objs = rte_mempool_obj_iter(mp_stack_mempool_iter, my_obj_init,
556 NULL);556 NULL);
557 if (nb_objs == 0)557 if (nb_objs == 0)
558 GOTO_ERR(ret, err);558 GOTO_ERR(ret, err);
diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
index 731c6b4..94a3801 100644
--- a/app/test/test_power_cpufreq.c
+++ b/app/test/test_power_cpufreq.c
@@ -8,6 +8,7 @@
8#include <limits.h>8#include <limits.h>
9#include <string.h>9#include <string.h>
10#include <inttypes.h>10#include <inttypes.h>
11#include <rte_cycles.h>
1112
12#include "test.h"13#include "test.h"
1314
@@ -34,37 +35,86 @@ test_power_caps(void)
34#define TEST_POWER_LCORE_INVALID ((unsigned)RTE_MAX_LCORE)35#define TEST_POWER_LCORE_INVALID ((unsigned)RTE_MAX_LCORE)
35#define TEST_POWER_FREQS_NUM_MAX ((unsigned)RTE_MAX_LCORE_FREQS)36#define TEST_POWER_FREQS_NUM_MAX ((unsigned)RTE_MAX_LCORE_FREQS)
3637
37#define TEST_POWER_SYSFILE_CUR_FREQ \38/* macros used for rounding frequency to nearest 100000 */
39#define TEST_FREQ_ROUNDING_DELTA 50000
40#define TEST_ROUND_FREQ_TO_N_100000 100000
41
42#define TEST_POWER_SYSFILE_CPUINFO_FREQ \
38 "/sys/devices/system/cpu/cpu%u/cpufreq/cpuinfo_cur_freq"43 "/sys/devices/system/cpu/cpu%u/cpufreq/cpuinfo_cur_freq"
44#define TEST_POWER_SYSFILE_SCALING_FREQ \
45 "/sys/devices/system/cpu/cpu%u/cpufreq/scaling_cur_freq"
3946
40static uint32_t total_freq_num;47static uint32_t total_freq_num;
41static uint32_t freqs[TEST_POWER_FREQS_NUM_MAX];48static uint32_t freqs[TEST_POWER_FREQS_NUM_MAX];
4249
43static int50static int
44check_cur_freq(unsigned lcore_id, uint32_t idx)51check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo)
45{52{
46#define TEST_POWER_CONVERT_TO_DECIMAL 1053#define TEST_POWER_CONVERT_TO_DECIMAL 10
54#define MAX_LOOP 100
47 FILE *f;55 FILE *f;
48 char fullpath[PATH_MAX];56 char fullpath[PATH_MAX];
49 char buf[BUFSIZ];57 char buf[BUFSIZ];
58 enum power_management_env env;
50 uint32_t cur_freq;59 uint32_t cur_freq;
60 uint32_t freq_conv;
51 int ret = -1;61 int ret = -1;
62 int i;
5263
53 if (snprintf(fullpath, sizeof(fullpath),64 if (snprintf(fullpath, sizeof(fullpath),
54 TEST_POWER_SYSFILE_CUR_FREQ, lcore_id) < 0) {65 TEST_POWER_SYSFILE_CPUINFO_FREQ, lcore_id) < 0) {
55 return 0;66 return 0;
56 }67 }
57 f = fopen(fullpath, "r");68 f = fopen(fullpath, "r");
58 if (f == NULL) {69 if (f == NULL) {
59 return 0;70 if (snprintf(fullpath, sizeof(fullpath),
71 TEST_POWER_SYSFILE_SCALING_FREQ, lcore_id) < 0) {
72 return 0;
73 }
74 f = fopen(fullpath, "r");
75 if (f == NULL) {
76 return 0;
77 }
78 }
79 for (i = 0; i < MAX_LOOP; i++) {
80 fflush(f);
81 if (fgets(buf, sizeof(buf), f) == NULL)
82 goto fail_all;
83
84 cur_freq = strtoul(buf, NULL, TEST_POWER_CONVERT_TO_DECIMAL);
85 freq_conv = cur_freq;
86
87 env = rte_power_get_env();
88
89 if (env == PM_ENV_PSTATE_CPUFREQ) {
90 /* convert the frequency to nearest 100000 value
91 * Ex: if cur_freq=1396789 then freq_conv=1400000
92 * Ex: if cur_freq=800030 then freq_conv=800000
93 */
94 unsigned int freq_conv = 0;
95 freq_conv = (cur_freq + TEST_FREQ_ROUNDING_DELTA)
96 / TEST_ROUND_FREQ_TO_N_100000;
97 freq_conv = freq_conv * TEST_ROUND_FREQ_TO_N_100000;
98 }
99
100 if (turbo)
101 ret = (freqs[idx] <= freq_conv ? 0 : -1);
102 else
103 ret = (freqs[idx] == freq_conv ? 0 : -1);
104
105 if (ret == 0)
106 break;
107
108 if (fseek(f, 0, SEEK_SET) < 0) {
109 printf("Fail to set file position indicator to 0\n");
110 goto fail_all;
111 }
112
113 /* wait for the value to be updated */
114 rte_delay_ms(10);
60 }115 }
61 if (fgets(buf, sizeof(buf), f) == NULL) {
62 goto fail_get_cur_freq;
63 }
64 cur_freq = strtoul(buf, NULL, TEST_POWER_CONVERT_TO_DECIMAL);
65 ret = (freqs[idx] == cur_freq ? 0 : -1);
66116
67fail_get_cur_freq:117fail_all:
68 fclose(f);118 fclose(f);
69119
70 return ret;120 return ret;
@@ -143,7 +193,7 @@ check_power_get_freq(void)
143 }193 }
144194
145 /* Check the current frequency */195 /* Check the current frequency */
146 ret = check_cur_freq(TEST_POWER_LCORE_ID, count);196 ret = check_cur_freq(TEST_POWER_LCORE_ID, count, false);
147 if (ret < 0)197 if (ret < 0)
148 return -1;198 return -1;
149199
@@ -193,7 +243,7 @@ check_power_set_freq(void)
193 }243 }
194244
195 /* Check the current frequency */245 /* Check the current frequency */
196 ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1);246 ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1, false);
197 if (ret < 0)247 if (ret < 0)
198 return -1;248 return -1;
199249
@@ -206,6 +256,8 @@ check_power_freq_down(void)
206{256{
207 int ret;257 int ret;
208258
259 rte_power_freq_enable_turbo(TEST_POWER_LCORE_ID);
260
209 /* test with an invalid lcore id */261 /* test with an invalid lcore id */
210 ret = rte_power_freq_down(TEST_POWER_LCORE_INVALID);262 ret = rte_power_freq_down(TEST_POWER_LCORE_INVALID);
211 if (ret >= 0) {263 if (ret >= 0) {
@@ -229,7 +281,7 @@ check_power_freq_down(void)
229 }281 }
230282
231 /* Check the current frequency */283 /* Check the current frequency */
232 ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1);284 ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1, false);
233 if (ret < 0)285 if (ret < 0)
234 return -1;286 return -1;
235287
@@ -248,7 +300,7 @@ check_power_freq_down(void)
248 }300 }
249301
250 /* Check the current frequency */302 /* Check the current frequency */
251 ret = check_cur_freq(TEST_POWER_LCORE_ID, 1);303 ret = check_cur_freq(TEST_POWER_LCORE_ID, 1, false);
252 if (ret < 0)304 if (ret < 0)
253 return -1;305 return -1;
254306
@@ -284,7 +336,7 @@ check_power_freq_up(void)
284 }336 }
285337
286 /* Check the current frequency */338 /* Check the current frequency */
287 ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 2);339 ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 2, false);
288 if (ret < 0)340 if (ret < 0)
289 return -1;341 return -1;
290342
@@ -303,7 +355,7 @@ check_power_freq_up(void)
303 }355 }
304356
305 /* Check the current frequency */357 /* Check the current frequency */
306 ret = check_cur_freq(TEST_POWER_LCORE_ID, 0);358 ret = check_cur_freq(TEST_POWER_LCORE_ID, 0, true);
307 if (ret < 0)359 if (ret < 0)
308 return -1;360 return -1;
309361
@@ -331,7 +383,7 @@ check_power_freq_max(void)
331 }383 }
332384
333 /* Check the current frequency */385 /* Check the current frequency */
334 ret = check_cur_freq(TEST_POWER_LCORE_ID, 0);386 ret = check_cur_freq(TEST_POWER_LCORE_ID, 0, true);
335 if (ret < 0)387 if (ret < 0)
336 return -1;388 return -1;
337389
@@ -359,7 +411,7 @@ check_power_freq_min(void)
359 }411 }
360412
361 /* Check the current frequency */413 /* Check the current frequency */
362 ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1);414 ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1, false);
363 if (ret < 0)415 if (ret < 0)
364 return -1;416 return -1;
365417
@@ -391,9 +443,15 @@ check_power_turbo(void)
391 TEST_POWER_LCORE_ID);443 TEST_POWER_LCORE_ID);
392 return -1;444 return -1;
393 }445 }
446 ret = rte_power_freq_max(TEST_POWER_LCORE_ID);
447 if (ret < 0) {
448 printf("Fail to scale up the freq to max on lcore %u\n",
449 TEST_POWER_LCORE_ID);
450 return -1;
451 }
394452
395 /* Check the current frequency */453 /* Check the current frequency */
396 ret = check_cur_freq(TEST_POWER_LCORE_ID, 0);454 ret = check_cur_freq(TEST_POWER_LCORE_ID, 0, true);
397 if (ret < 0)455 if (ret < 0)
398 return -1;456 return -1;
399457
@@ -410,9 +468,15 @@ check_power_turbo(void)
410 TEST_POWER_LCORE_ID);468 TEST_POWER_LCORE_ID);
411 return -1;469 return -1;
412 }470 }
471 ret = rte_power_freq_max(TEST_POWER_LCORE_ID);
472 if (ret < 0) {
473 printf("Fail to scale up the freq to max on lcore %u\n",
474 TEST_POWER_LCORE_ID);
475 return -1;
476 }
413477
414 /* Check the current frequency */478 /* Check the current frequency */
415 ret = check_cur_freq(TEST_POWER_LCORE_ID, 1);479 ret = check_cur_freq(TEST_POWER_LCORE_ID, 1, false);
416 if (ret < 0)480 if (ret < 0)
417 return -1;481 return -1;
418482
diff --git a/app/test/test_prefetch.c b/app/test/test_prefetch.c
index 5489885..7b4a8e4 100644
--- a/app/test/test_prefetch.c
+++ b/app/test/test_prefetch.c
@@ -20,7 +20,7 @@
20static int20static int
21test_prefetch(void)21test_prefetch(void)
22{22{
23 int a;23 int a = 0;
2424
25 rte_prefetch0(&a);25 rte_prefetch0(&a);
26 rte_prefetch1(&a);26 rte_prefetch1(&a);
diff --git a/app/test/test_reciprocal_division_perf.c b/app/test/test_reciprocal_division_perf.c
index a7be8aa..4f62587 100644
--- a/app/test/test_reciprocal_division_perf.c
+++ b/app/test/test_reciprocal_division_perf.c
@@ -71,10 +71,12 @@ test_reciprocal_division_perf(void)
71 tot_cyc_n);71 tot_cyc_n);
72 printf("Total number of cycles reciprocal division : %"PRIu64"\n",72 printf("Total number of cycles reciprocal division : %"PRIu64"\n",
73 tot_cyc_r);73 tot_cyc_r);
74 printf("Cycles per division(normal) : %3.2f\n",74 if (i != 0) {
75 ((double)tot_cyc_n)/i);75 printf("Cycles per division(normal) : %3.2f\n",
76 printf("Cycles per division(reciprocal) : %3.2f\n\n",76 ((double)tot_cyc_n)/i);
77 ((double)tot_cyc_r)/i);77 printf("Cycles per division(reciprocal) : %3.2f\n\n",
78 ((double)tot_cyc_r)/i);
79 }
7880
79 tot_cyc_n = 0;81 tot_cyc_n = 0;
80 tot_cyc_r = 0;82 tot_cyc_r = 0;
@@ -111,11 +113,12 @@ test_reciprocal_division_perf(void)
111 tot_cyc_n);113 tot_cyc_n);
112 printf("Total number of cycles reciprocal division : %"PRIu64"\n",114 printf("Total number of cycles reciprocal division : %"PRIu64"\n",
113 tot_cyc_r);115 tot_cyc_r);
114 printf("Cycles per division(normal) : %3.2f\n",116 if (i != 0) {
115 ((double)tot_cyc_n)/i);117 printf("Cycles per division(normal) : %3.2f\n",
116 printf("Cycles per division(reciprocal) : %3.2f\n\n",118 ((double)tot_cyc_n)/i);
117 ((double)tot_cyc_r)/i);119 printf("Cycles per division(reciprocal) : %3.2f\n\n",
118120 ((double)tot_cyc_r)/i);
121 }
119 tot_cyc_n = 0;122 tot_cyc_n = 0;
120 tot_cyc_r = 0;123 tot_cyc_r = 0;
121124
@@ -152,10 +155,12 @@ test_reciprocal_division_perf(void)
152 tot_cyc_n);155 tot_cyc_n);
153 printf("Total number of cycles reciprocal division : %"PRIu64"\n",156 printf("Total number of cycles reciprocal division : %"PRIu64"\n",
154 tot_cyc_r);157 tot_cyc_r);
155 printf("Cycles per division(normal) : %3.2f\n",158 if (i != 0) {
156 ((double)tot_cyc_n)/i);159 printf("Cycles per division(normal) : %3.2f\n",
157 printf("Cycles per division(reciprocal) : %3.2f\n\n",160 ((double)tot_cyc_n)/i);
158 ((double)tot_cyc_r)/i);161 printf("Cycles per division(reciprocal) : %3.2f\n\n",
162 ((double)tot_cyc_r)/i);
163 }
159164
160 tot_cyc_n = 0;165 tot_cyc_n = 0;
161 tot_cyc_r = 0;166 tot_cyc_r = 0;
@@ -190,10 +195,12 @@ test_reciprocal_division_perf(void)
190 tot_cyc_n);195 tot_cyc_n);
191 printf("Total number of cycles reciprocal division : %"PRIu64"\n",196 printf("Total number of cycles reciprocal division : %"PRIu64"\n",
192 tot_cyc_r);197 tot_cyc_r);
193 printf("Cycles per division(normal) : %3.2f\n",198 if (i != 0) {
194 ((double)tot_cyc_n)/i);199 printf("Cycles per division(normal) : %3.2f\n",
195 printf("Cycles per division(reciprocal) : %3.2f\n",200 ((double)tot_cyc_n)/i);
196 ((double)tot_cyc_r)/i);201 printf("Cycles per division(reciprocal) : %3.2f\n",
202 ((double)tot_cyc_r)/i);
203 }
197204
198 return result;205 return result;
199}206}
diff --git a/app/test/test_stack.c b/app/test/test_stack.c
index 02422a3..00efb38 100644
--- a/app/test/test_stack.c
+++ b/app/test/test_stack.c
@@ -373,7 +373,11 @@ test_stack(void)
373static int373static int
374test_lf_stack(void)374test_lf_stack(void)
375{375{
376#if defined(RTE_STACK_LF_SUPPORTED)
376 return __test_stack(RTE_STACK_F_LF);377 return __test_stack(RTE_STACK_F_LF);
378#else
379 return TEST_SKIPPED;
380#endif
377}381}
378382
379REGISTER_TEST_COMMAND(stack_autotest, test_stack);383REGISTER_TEST_COMMAND(stack_autotest, test_stack);
diff --git a/app/test/test_stack_perf.c b/app/test/test_stack_perf.c
index 3590625..4ee40d5 100644
--- a/app/test/test_stack_perf.c
+++ b/app/test/test_stack_perf.c
@@ -349,7 +349,11 @@ test_stack_perf(void)
349static int349static int
350test_lf_stack_perf(void)350test_lf_stack_perf(void)
351{351{
352#if defined(RTE_STACK_LF_SUPPORTED)
352 return __test_stack_perf(RTE_STACK_F_LF);353 return __test_stack_perf(RTE_STACK_F_LF);
354#else
355 return TEST_SKIPPED;
356#endif
353}357}
354358
355REGISTER_TEST_COMMAND(stack_perf_autotest, test_stack_perf);359REGISTER_TEST_COMMAND(stack_perf_autotest, test_stack_perf);
diff --git a/app/test/test_table_tables.c b/app/test/test_table_tables.c
index 1aa269f..4ff6ab1 100644
--- a/app/test/test_table_tables.c
+++ b/app/test/test_table_tables.c
@@ -28,7 +28,8 @@ table_test table_tests[] = {
28 APP_METADATA_OFFSET(0)); \28 APP_METADATA_OFFSET(0)); \
29 key = RTE_MBUF_METADATA_UINT8_PTR(mbuf, \29 key = RTE_MBUF_METADATA_UINT8_PTR(mbuf, \
30 APP_METADATA_OFFSET(32)); \30 APP_METADATA_OFFSET(32)); \
31 memset(key, 0, 32); \31 if (mbuf->priv_size + mbuf->buf_len >= 64) \
32 memset(key, 0, 32); \
32 k32 = (uint32_t *) key; \33 k32 = (uint32_t *) key; \
33 k32[0] = (value); \34 k32[0] = (value); \
34 *signature = pipeline_test_hash(key, NULL, 0, 0); \35 *signature = pipeline_test_hash(key, NULL, 0, 0); \
diff --git a/app/test/test_timer_secondary.c b/app/test/test_timer_secondary.c
index 1e8f1d4..16a9f18 100644
--- a/app/test/test_timer_secondary.c
+++ b/app/test/test_timer_secondary.c
@@ -125,9 +125,9 @@ test_timer_secondary(void)
125125
126 mz = rte_memzone_reserve(TEST_INFO_MZ_NAME, sizeof(*test_info),126 mz = rte_memzone_reserve(TEST_INFO_MZ_NAME, sizeof(*test_info),
127 SOCKET_ID_ANY, 0);127 SOCKET_ID_ANY, 0);
128 test_info = mz->addr;128 TEST_ASSERT_NOT_NULL(mz, "Couldn't allocate memory for "
129 TEST_ASSERT_NOT_NULL(test_info, "Couldn't allocate memory for "
130 "test data");129 "test data");
130 test_info = mz->addr;
131131
132 test_info->tim_mempool = rte_mempool_create("test_timer_mp",132 test_info->tim_mempool = rte_mempool_create("test_timer_mp",
133 NUM_TIMERS, sizeof(struct rte_timer), 0, 0,133 NUM_TIMERS, sizeof(struct rte_timer), 0, 0,
@@ -171,9 +171,9 @@ test_timer_secondary(void)
171 int i;171 int i;
172172
173 mz = rte_memzone_lookup(TEST_INFO_MZ_NAME);173 mz = rte_memzone_lookup(TEST_INFO_MZ_NAME);
174 test_info = mz->addr;174 TEST_ASSERT_NOT_NULL(mz, "Couldn't lookup memzone for "
175 TEST_ASSERT_NOT_NULL(test_info, "Couldn't lookup memzone for "
176 "test info");175 "test info");
176 test_info = mz->addr;
177177
178 for (i = 0; i < NUM_TIMERS; i++) {178 for (i = 0; i < NUM_TIMERS; i++) {
179 rte_mempool_get(test_info->tim_mempool, (void **)&tim);179 rte_mempool_get(test_info->tim_mempool, (void **)&tim);
diff --git a/app/test/test_trace_perf.c b/app/test/test_trace_perf.c
index e1ad8e6..46ae7d8 100644
--- a/app/test/test_trace_perf.c
+++ b/app/test/test_trace_perf.c
@@ -79,7 +79,6 @@ signal_workers_to_finish(struct test_data *data)
7979
80 for (workers = 0; workers < data->nb_workers; workers++) {80 for (workers = 0; workers < data->nb_workers; workers++) {
81 data->ldata[workers].done = 1;81 data->ldata[workers].done = 1;
82 rte_smp_wmb();
83 }82 }
84}83}
8584
@@ -102,7 +101,6 @@ worker_fn_##func(void *arg) \
102{ \101{ \
103 struct lcore_data *ldata = arg; \102 struct lcore_data *ldata = arg; \
104 ldata->started = 1; \103 ldata->started = 1; \
105 rte_smp_wmb(); \
106 __worker_##func(ldata); \104 __worker_##func(ldata); \
107 return 0; \105 return 0; \
108}106}
@@ -137,11 +135,12 @@ run_test(const char *str, lcore_function_t f, struct test_data *data, size_t sz)
137135
138 wait_till_workers_are_ready(data);136 wait_till_workers_are_ready(data);
139 rte_delay_ms(100); /* Wait for some time to accumulate the stats */137 rte_delay_ms(100); /* Wait for some time to accumulate the stats */
140 measure_perf(str, data);
141 signal_workers_to_finish(data);138 signal_workers_to_finish(data);
142139
143 RTE_LCORE_FOREACH_WORKER(id)140 RTE_LCORE_FOREACH_WORKER(id)
144 rte_eal_wait_lcore(id);141 rte_eal_wait_lcore(id);
142
143 measure_perf(str, data);
145}144}
146145
147static int146static int
diff --git a/buildtools/binutils-avx512-check.sh b/buildtools/binutils-avx512-check.sh
index a7e0681..2a833b6 100755
--- a/buildtools/binutils-avx512-check.sh
+++ b/buildtools/binutils-avx512-check.sh
@@ -3,7 +3,7 @@
3# Copyright(c) 2020 Intel Corporation3# Copyright(c) 2020 Intel Corporation
44
5AS=${AS:-as}5AS=${AS:-as}
6OBJFILE=$(mktemp -t dpdk.binutils-check.XXXXXX.o)6OBJFILE=$(mktemp -t dpdk.binutils-check.XXXXXX)
7trap 'rm -f "$OBJFILE"' EXIT7trap 'rm -f "$OBJFILE"' EXIT
8# from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=900288# from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90028
9GATHER_PARAMS='0x8(,%ymm1,1),%ymm0{%k2}'9GATHER_PARAMS='0x8(,%ymm1,1),%ymm0{%k2}'
diff --git a/buildtools/check-symbols.sh b/buildtools/check-symbols.sh
index e407553..83b3a01 100755
--- a/buildtools/check-symbols.sh
+++ b/buildtools/check-symbols.sh
@@ -18,7 +18,7 @@ then
18 exit 018 exit 0
19fi19fi
2020
21DUMPFILE=$(mktemp -t dpdk.${0##*/}.XXX.objdump)21DUMPFILE=$(mktemp -t dpdk.${0##*/}.objdump.XXXXXX)
22trap 'rm -f "$DUMPFILE"' EXIT22trap 'rm -f "$DUMPFILE"' EXIT
23objdump -t $OBJFILE >$DUMPFILE23objdump -t $OBJFILE >$DUMPFILE
2424
diff --git a/buildtools/list-dir-globs.py b/buildtools/list-dir-globs.py
index 80b5e80..f5f7d73 100755
--- a/buildtools/list-dir-globs.py
+++ b/buildtools/list-dir-globs.py
@@ -16,4 +16,4 @@ root = os.path.join(os.getenv('MESON_SOURCE_ROOT', '.'),
16for path in sys.argv[1].split(','):16for path in sys.argv[1].split(','):
17 for p in iglob(os.path.join(root, path)):17 for p in iglob(os.path.join(root, path)):
18 if os.path.isdir(p):18 if os.path.isdir(p):
19 print(os.path.relpath(p))19 print(os.path.relpath(p).replace('\\', '/'))
diff --git a/buildtools/map-list-symbol.sh b/buildtools/map-list-symbol.sh
index 5509b4a..3bf9bd6 100755
--- a/buildtools/map-list-symbol.sh
+++ b/buildtools/map-list-symbol.sh
@@ -44,7 +44,7 @@ for file in $@; do
44 ret = 1;44 ret = 1;
45 }45 }
46 }46 }
47 /^.*{/ {47 /^.*\{/ {
48 if ("'$section'" == "all" || $1 == "'$section'") {48 if ("'$section'" == "all" || $1 == "'$section'") {
49 current_section = $1;49 current_section = $1;
50 }50 }
diff --git a/buildtools/meson.build b/buildtools/meson.build
index 04808da..cfad51f 100644
--- a/buildtools/meson.build
+++ b/buildtools/meson.build
@@ -3,17 +3,17 @@
33
4pkgconf = find_program('pkg-config', 'pkgconf', required: false)4pkgconf = find_program('pkg-config', 'pkgconf', required: false)
5pmdinfo = find_program('gen-pmdinfo-cfile.sh')5pmdinfo = find_program('gen-pmdinfo-cfile.sh')
6list_dir_globs = find_program('list-dir-globs.py')
7check_symbols = find_program('check-symbols.sh')6check_symbols = find_program('check-symbols.sh')
8ldflags_ibverbs_static = find_program('options-ibverbs-static.sh')7ldflags_ibverbs_static = find_program('options-ibverbs-static.sh')
9binutils_avx512_check = find_program('binutils-avx512-check.sh')8binutils_avx512_check = find_program('binutils-avx512-check.sh')
109
11# set up map-to-win script using python, either built-in or external
12python3 = import('python').find_installation(required: false)10python3 = import('python').find_installation(required: false)
13if python3.found()11if python3.found()
14 py3 = [python3]12 py3 = [python3]
15else13else
16 py3 = ['meson', 'runpython']14 py3 = ['meson', 'runpython']
17endif15endif
16echo = py3 + ['-c', 'import sys; print(*sys.argv[1:])']
17list_dir_globs = py3 + files('list-dir-globs.py')
18map_to_win_cmd = py3 + files('map_to_win.py')18map_to_win_cmd = py3 + files('map_to_win.py')
19sphinx_wrapper = py3 + files('call-sphinx-build.py')19sphinx_wrapper = py3 + files('call-sphinx-build.py')
diff --git a/buildtools/symlink-drivers-solibs.py b/buildtools/symlink-drivers-solibs.py
20new file mode 10064420new file mode 100644
index 0000000..9c99950
--- /dev/null
+++ b/buildtools/symlink-drivers-solibs.py
@@ -0,0 +1,49 @@
1#!/usr/bin/env python3
2# SPDX-License-Identifier: BSD-3-Clause
3# Copyright(c) 2021 Intel Corporation
4
5import os
6import sys
7import glob
8import shutil
9
10# post-install script for meson/ninja builds to symlink the PMDs stored in
11# $libdir/dpdk/pmds-*/ to $libdir. This is needed as some PMDs depend on
12# others, e.g. PCI device PMDs depending on the PCI bus driver.
13
14# parameters to script are paths relative to install prefix:
15# 1. directory for installed regular libs e.g. lib64
16# 2. subdirectory of libdir where the PMDs are
17# 3. directory for installed regular binaries e.g. bin
18
19os.chdir(os.environ['MESON_INSTALL_DESTDIR_PREFIX'])
20
21lib_dir = sys.argv[1]
22pmd_subdir = sys.argv[2]
23bin_dir = sys.argv[3]
24pmd_dir = os.path.join(lib_dir, pmd_subdir)
25
26# copy Windows PMDs to avoid any issues with symlinks since the
27# build could be a cross-compilation under WSL, Msys or Cygnus.
28# the filenames are dependent upon the specific toolchain in use.
29
30def copy_pmd_files(pattern, to_dir):
31 for file in glob.glob(os.path.join(pmd_dir, pattern)):
32 to = os.path.join(to_dir, os.path.basename(file))
33 shutil.copy2(file, to)
34 print(to + ' -> ' + file)
35
36copy_pmd_files('*rte_*.dll', bin_dir)
37copy_pmd_files('*rte_*.pdb', bin_dir)
38copy_pmd_files('*rte_*.lib', lib_dir)
39copy_pmd_files('*rte_*.dll.a', lib_dir)
40
41# symlink shared objects
42
43os.chdir(lib_dir)
44for file in glob.glob(os.path.join(pmd_subdir, 'librte_*.so*')):
45 to = os.path.basename(file)
46 if os.path.exists(to):
47 os.remove(to)
48 os.symlink(file, to)
49 print(to + ' -> ' + file)
diff --git a/config/meson.build b/config/meson.build
index 2f150de..b2734fc 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -61,6 +61,10 @@ if not is_windows
61 meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',61 meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
62 get_option('libdir'),62 get_option('libdir'),
63 pmd_subdir_opt)63 pmd_subdir_opt)
64elif meson.version().version_compare('>=0.55.0')
65 # 0.55.0 is required to use external program with add_install_script
66 meson.add_install_script(py3, '../buildtools/symlink-drivers-solibs.py',
67 get_option('libdir'), pmd_subdir_opt, get_option('bindir'))
64endif68endif
6569
66# set the machine type and cflags for it70# set the machine type and cflags for it
@@ -125,11 +129,8 @@ if cc.find_library('m', required : false).found()
125 dpdk_extra_ldflags += '-lm'129 dpdk_extra_ldflags += '-lm'
126endif130endif
127131
128# for linux link against dl, for bsd execinfo
129if is_linux132if is_linux
130 link_lib = 'dl'133 link_lib = 'dl'
131elif is_freebsd
132 link_lib = 'execinfo'
133else134else
134 link_lib = ''135 link_lib = ''
135endif136endif
@@ -159,6 +160,12 @@ if fdt_dep.found() and cc.has_header('fdt.h')
159 dpdk_extra_ldflags += '-lfdt'160 dpdk_extra_ldflags += '-lfdt'
160endif161endif
161162
163libexecinfo = cc.find_library('libexecinfo', required: false)
164if libexecinfo.found() and cc.has_header('execinfo.h')
165 add_project_link_arguments('-lexecinfo', language: 'c')
166 dpdk_extra_ldflags += '-lexecinfo'
167endif
168
162# check for libbsd169# check for libbsd
163libbsd = dependency('libbsd', required: false, method: 'pkg-config')170libbsd = dependency('libbsd', required: false, method: 'pkg-config')
164if libbsd.found()171if libbsd.found()
diff --git a/config/ppc/meson.build b/config/ppc/meson.build
index 0d8da87..ed6ea07 100644
--- a/config/ppc/meson.build
+++ b/config/ppc/meson.build
@@ -17,7 +17,18 @@ if not power9_supported
17 dpdk_conf.set('RTE_MACHINE','power8')17 dpdk_conf.set('RTE_MACHINE','power8')
18endif18endif
1919
20# overrides specific to ppc6420# Certain POWER9 systems can scale as high as 1536 LCORES, but setting such a
21dpdk_conf.set('RTE_MAX_LCORE', 1536)21# high value can waste memory, cause timeouts in time limited autotests, and is
22dpdk_conf.set('RTE_MAX_NUMA_NODES', 32)22# unlikely to be used in many production situations. Similarly, keeping the
23# default 64 LCORES seems too small as most POWER9 dual socket systems will have
24# at least 128 LCORES available. Set RTE_MAX_LCORE to 128 for POWER systems as
25# a compromise.
26dpdk_conf.set('RTE_MAX_LCORE', 128)
27
28# POWER systems do not allocate NUMA nodes sequentially. A dual socket system
29# will have CPUs associated with NUMA nodes 0 & 8, so ensure that the second
30# NUMA node will be supported by setting RTE_MAX_NUMA_NODES to 16. High end
31# systems can scale even higher with as many as 32 NUMA nodes.
32dpdk_conf.set('RTE_MAX_NUMA_NODES', 16)
33
23dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)34dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
diff --git a/debian/changelog b/debian/changelog
index 39161b3..54eb660 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,26 @@
1dpdk (20.11.3-0ubuntu0.21.04.2) hirsute; urgency=medium
2
3 * Skip flaky self-tests to make the tests more reliable (LP: #1939861)
4 - d/p/disable_ppc64_autopkgtest_fails.patch: skip known false-positives
5 - d/p/disable_armhf_autopkgtest_fails.patch: disable arm failures that do
6 not represent regressions
7 - d/p/disable_autopkgtest_fails.patch: disable failures that do not
8 represent regressions
9 - Add disable_lcores_autotest_ppc.patch to fix ppc64el autopkgtest
10
11 -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Wed, 08 Sep 2021 09:00:48 +0200
12
13dpdk (20.11.3-0ubuntu0.21.04.1) hirsute; urgency=medium
14
15 * Merge LTS stable release 20.11.3 (LP: #1940913)
16 Release notes are available at:
17 https://doc.dpdk.org/guides-20.11/rel_notes/release_20_11.html#id1
18 - Remove test-catch-coredumps.patch [now part of upstream]
19 * d/p/u/lp-1940957-net-i40e-support-25G-AOC-ACC-cables.patch: fix issues
20 with 25G AOC cables (LP: #1940957)
21
22 -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Tue, 24 Aug 2021 12:08:16 +0200
23
1dpdk (20.11.1-1) experimental; urgency=medium24dpdk (20.11.1-1) experimental; urgency=medium
225
3 * Merge LTS stable release 20.11.126 * Merge LTS stable release 20.11.1
diff --git a/debian/control b/debian/control
index 191043e..9e57812 100644
--- a/debian/control
+++ b/debian/control
@@ -1,6 +1,7 @@
1Source: dpdk1Source: dpdk
2Priority: optional2Priority: optional
3Maintainer: Debian DPDK Maintainers <pkg-dpdk-devel@lists.alioth.debian.org>3Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
4XSBC-Original-Maintainer: Debian DPDK Maintainers <pkg-dpdk-devel@lists.alioth.debian.org>
4Uploaders: Luca Boccassi <bluca@debian.org>,5Uploaders: Luca Boccassi <bluca@debian.org>,
5 Christian Ehrhardt <christian.ehrhardt@canonical.com>,6 Christian Ehrhardt <christian.ehrhardt@canonical.com>,
6 Santiago Ruano Rincón <santiagorr@riseup.net>,7 Santiago Ruano Rincón <santiagorr@riseup.net>,
diff --git a/debian/patches/disable_armhf_autopkgtest_fails.patch b/debian/patches/disable_armhf_autopkgtest_fails.patch
7new file mode 1006448new file mode 100644
index 0000000..3a714c1
--- /dev/null
+++ b/debian/patches/disable_armhf_autopkgtest_fails.patch
@@ -0,0 +1,32 @@
1Description: Skip tests failing in arm test environment
2 These tests generally work but fail in a Ubuntu arm autopkgtest environment.
3 Skip those as they do not represent real regressions.
4Forwarded: no
5X-Not-Forwarded-Reason: This only applies to autopkgtest environments
6Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
7Last-Update: 2021-07-13
8--- a/app/test/meson.build
9+++ b/app/test/meson.build
10@@ -228,10 +228,8 @@ fast_tests = [
11 ['per_lcore_autotest', false],
12 ['prefetch_autotest', true],
13 ['rcu_qsbr_autotest', false],
14- ['red_autotest', true],
15 ['rib_autotest', true],
16 ['rib6_autotest', true],
17- ['ring_autotest', true],
18 ['rwlock_test1_autotest', true],
19 ['rwlock_rda_autotest', true],
20 ['rwlock_rds_wrm_autotest', true],
21@@ -422,6 +420,11 @@ if arch_subdir != 'ppc'
22 fast_tests += [['lcores_autotest', true]]
23 endif
24
25+# These tests consistently fail on arm (containerized) test environments
26+if arch_subdir != 'arm'
27+ fast_tests += [['red_autotest', true], ['ring_autotest', true]]
28+endif
29+
30 foreach d:test_deps
31 def_lib = get_option('default_library')
32 test_dep_objs += get_variable(def_lib + '_rte_' + d)
diff --git a/debian/patches/disable_autopkgtest_fails.patch b/debian/patches/disable_autopkgtest_fails.patch
0new file mode 10064433new file mode 100644
index 0000000..24d15a6
--- /dev/null
+++ b/debian/patches/disable_autopkgtest_fails.patch
@@ -0,0 +1,49 @@
1Description: Skip tests failing in test environment
2 These tests generally work but fail in a Ubuntu autopkgtest environment.
3 This is consistent across all architectures.
4 Skip those as they do not represent real regressions.
5Forwarded: no
6X-Not-Forwarded-Reason: This only applies to autopkgtest environments
7Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
8Last-Update: 2021-07-13
9--- a/app/test/meson.build
10+++ b/app/test/meson.build
11@@ -210,7 +210,7 @@ fast_tests = [
12 ['fib6_autotest', true],
13 ['func_reentrancy_autotest', false],
14 ['flow_classify_autotest', false],
15- ['hash_autotest', true],
16+ ['hash_autotest', false],
17 ['interrupt_autotest', true],
18 ['ipfrag_autotest', false],
19 ['logs_autotest', true],
20@@ -225,9 +225,9 @@ fast_tests = [
21 ['memzone_autotest', false],
22 ['meter_autotest', true],
23 ['multiprocess_autotest', false],
24- ['per_lcore_autotest', true],
25+ ['per_lcore_autotest', false],
26 ['prefetch_autotest', true],
27- ['rcu_qsbr_autotest', true],
28+ ['rcu_qsbr_autotest', false],
29 ['red_autotest', true],
30 ['rib_autotest', true],
31 ['rib6_autotest', true],
32@@ -242,7 +242,7 @@ fast_tests = [
33 ['stack_autotest', false],
34 ['stack_lf_autotest', false],
35 ['string_autotest', true],
36- ['table_autotest', true],
37+ ['table_autotest', false],
38 ['tailq_autotest', true],
39 ['timer_autotest', false],
40 ['user_delay_us', true],
41@@ -262,7 +262,7 @@ fast_tests = [
42 ['power_autotest', true],
43 ['power_kvm_vm_autotest', false],
44 ['reorder_autotest', true],
45- ['service_autotest', true],
46+ ['service_autotest', false],
47 ['thash_autotest', true],
48 ['trace_autotest', true],
49 ]
diff --git a/debian/patches/disable_lcores_autotest_ppc.patch b/debian/patches/disable_lcores_autotest_ppc.patch
0new file mode 10064450new file mode 100644
index 0000000..f4b34bc
--- /dev/null
+++ b/debian/patches/disable_lcores_autotest_ppc.patch
@@ -0,0 +1,26 @@
1Description: autotest: disable lcores_autotest on ppc
2 This test consistently times out on ppc64 builds. Disable it.
3Author: Luca Boccassi <bluca@debian.org>
4Forwarded: yes, https://patchwork.dpdk.org/project/dpdk/patch/20210420114508.397249-1-luca.boccassi@gmail.com/
5--- a/app/test/meson.build
6+++ b/app/test/meson.build
7@@ -213,7 +213,6 @@
8 ['hash_autotest', true],
9 ['interrupt_autotest', true],
10 ['ipfrag_autotest', false],
11- ['lcores_autotest', true],
12 ['logs_autotest', true],
13 ['lpm_autotest', true],
14 ['lpm6_autotest', true],
15@@ -420,6 +419,11 @@
16 test_deps += 'crypto_scheduler'
17 endif
18
19+# This test consistently times out on ppc64
20+if arch_subdir != 'ppc'
21+ fast_tests += [['lcores_autotest', true]]
22+endif
23+
24 foreach d:test_deps
25 def_lib = get_option('default_library')
26 test_dep_objs += get_variable(def_lib + '_rte_' + d)
diff --git a/debian/patches/disable_ppc64_autopkgtest_fails.patch b/debian/patches/disable_ppc64_autopkgtest_fails.patch
0new file mode 10064427new file mode 100644
index 0000000..cfa3632
--- /dev/null
+++ b/debian/patches/disable_ppc64_autopkgtest_fails.patch
@@ -0,0 +1,27 @@
1Description: Skip tests failing in ppc64 test environment
2 It turned out that this regressed in release and acl_autotest is
3 unrelable on ppc64.
4 Skip it as they do not represent real regressions in or against DPDK.
5Forwarded: no
6X-Not-Forwarded-Reason: This only applies to autopkgtest environments
7Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
8Last-Update: 2021-08-13
9--- a/app/test/meson.build
10+++ b/app/test/meson.build
11@@ -180,7 +180,6 @@ test_deps = ['acl',
12 # Each test is marked with flag true/false
13 # to indicate whether it can run in no-huge mode.
14 fast_tests = [
15- ['acl_autotest', true],
16 ['alarm_autotest', false],
17 ['atomic_autotest', false],
18 ['bitops_autotest', true],
19@@ -417,7 +416,7 @@ endif
20
21 # This test consistently times out on ppc64
22 if arch_subdir != 'ppc'
23- fast_tests += [['lcores_autotest', true]]
24+ fast_tests += [['lcores_autotest', true], ['acl_autotest', true]]
25 endif
26
27 # These tests consistently fail on arm (containerized) test environments
diff --git a/debian/patches/series b/debian/patches/series
index 607724b..8438c98 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,5 @@
1test-catch-coredumps.patch1ubuntu/lp-1940957-net-i40e-support-25G-AOC-ACC-cables.patch
2disable_lcores_autotest_ppc.patch
3disable_autopkgtest_fails.patch
4disable_armhf_autopkgtest_fails.patch
5disable_ppc64_autopkgtest_fails.patch
diff --git a/debian/patches/test-catch-coredumps.patch b/debian/patches/test-catch-coredumps.patch
2deleted file mode 1006446deleted file mode 100644
index a686f3e..0000000
--- a/debian/patches/test-catch-coredumps.patch
+++ /dev/null
@@ -1,66 +0,0 @@
1Author: David Marchand <david.marchand@redhat.com>
2Description: Parts of the unit tests code rely on forked/secondary processes
3 (expectedly) failing.
4 A crash in those situations could be missed so add a check on coredumps
5 presence after unit tests have run.
6 When unit tests fail, it can also help checking for coredumps as it
7 could give more insights on what happened.
8
9 In some situations (like explicit call to rte_panic), coredump generation
10 must be disabled to avoid false positives.
11Origin: https://patchwork.dpdk.org/project/dpdk/patch/20210125150539.27537-1-david.marchand@redhat.com/
12--- a/app/test/test_debug.c
13+++ b/app/test/test_debug.c
14@@ -4,6 +4,8 @@
15
16 #include <stdio.h>
17 #include <stdint.h>
18+#include <sys/resource.h>
19+#include <sys/time.h>
20 #include <sys/wait.h>
21 #include <unistd.h>
22
23@@ -28,9 +30,14 @@
24
25 pid = fork();
26
27- if (pid == 0)
28+ if (pid == 0) {
29+ struct rlimit rl;
30+
31+ /* No need to generate a coredump when panicking. */
32+ rl.rlim_cur = rl.rlim_max = 0;
33+ setrlimit(RLIMIT_CORE, &rl);
34 rte_panic("Test Debug\n");
35- else if (pid < 0){
36+ } else if (pid < 0) {
37 printf("Fork Failed\n");
38 return -1;
39 }
40--- a/app/test/test_mbuf.c
41+++ b/app/test/test_mbuf.c
42@@ -1174,6 +1174,8 @@
43 }
44
45 #include <unistd.h>
46+#include <sys/resource.h>
47+#include <sys/time.h>
48 #include <sys/wait.h>
49
50 /* use fork() to test mbuf errors panic */
51@@ -1186,9 +1188,14 @@
52 pid = fork();
53
54 if (pid == 0) {
55+ struct rlimit rl;
56+
57+ /* No need to generate a coredump when panicking. */
58+ rl.rlim_cur = rl.rlim_max = 0;
59+ setrlimit(RLIMIT_CORE, &rl);
60 rte_mbuf_sanity_check(buf, 1); /* should panic */
61 exit(0); /* return normally if it doesn't panic */
62- } else if (pid < 0){
63+ } else if (pid < 0) {
64 printf("Fork Failed\n");
65 return -1;
66 }
diff --git a/debian/patches/ubuntu/lp-1940957-net-i40e-support-25G-AOC-ACC-cables.patch b/debian/patches/ubuntu/lp-1940957-net-i40e-support-25G-AOC-ACC-cables.patch
67new file mode 1006440new file mode 100644
index 0000000..8606792
--- /dev/null
+++ b/debian/patches/ubuntu/lp-1940957-net-i40e-support-25G-AOC-ACC-cables.patch
@@ -0,0 +1,42 @@
1From f81d60e607bb8c13fcb13450e85d74721f1d9c8f Mon Sep 17 00:00:00 2001
2From: Yury Kylulin <yury.kylulin@intel.com>
3Date: Tue, 13 Apr 2021 18:29:50 +0300
4Subject: [PATCH] net/i40e: support 25G AOC/ACC cables
5
6[ upstream commit b1daa3461429e7674206a714c17adca65e9b44b4 ]
7
8Enable additional PHY types (25G-AOC and 25G-ACC) for set PHY config
9command.
10
11Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1940957
12Cc: stable@dpdk.org
13
14Signed-off-by: Yury Kylulin <yury.kylulin@intel.com>
15Tested-by: Ashish Paul <apaul@juniper.net>
16Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
17
18Origin: upstream, https://github.com/cpaelzer/dpdk-stable-queue/commit/f81d60e607bb8c13fcb13450e85d74721f1d9c8f
19Bug-Ubuntu: https://bugs.launchpad.net/bugs/1940957
20Last-Update: 2021-09-06
21
22---
23 drivers/net/i40e/i40e_ethdev.c | 3 ++-
24 1 file changed, 2 insertions(+), 1 deletion(-)
25
26diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
27index 508f90595f..0c896ea915 100644
28--- a/drivers/net/i40e/i40e_ethdev.c
29+++ b/drivers/net/i40e/i40e_ethdev.c
30@@ -2264,7 +2264,8 @@ i40e_phy_conf_link(struct i40e_hw *hw,
31 phy_conf.phy_type = is_up ? cpu_to_le32(phy_type_mask) : 0;
32 phy_conf.phy_type_ext = is_up ? (I40E_AQ_PHY_TYPE_EXT_25G_KR |
33 I40E_AQ_PHY_TYPE_EXT_25G_CR | I40E_AQ_PHY_TYPE_EXT_25G_SR |
34- I40E_AQ_PHY_TYPE_EXT_25G_LR) : 0;
35+ I40E_AQ_PHY_TYPE_EXT_25G_LR | I40E_AQ_PHY_TYPE_EXT_25G_AOC |
36+ I40E_AQ_PHY_TYPE_EXT_25G_ACC) : 0;
37 phy_conf.fec_config = phy_ab.fec_cfg_curr_mod_ext_info;
38 phy_conf.eee_capability = phy_ab.eee_capability;
39 phy_conf.eeer = phy_ab.eeer_val;
40--
412.32.0
42
diff --git a/devtools/check-maintainers.sh b/devtools/check-maintainers.sh
index df3f740..71697bb 100755
--- a/devtools/check-maintainers.sh
+++ b/devtools/check-maintainers.sh
@@ -15,10 +15,10 @@ files () # <path> [<path> ...]
15 if [ -z "$1" ] ; then15 if [ -z "$1" ] ; then
16 return16 return
17 fi17 fi
18 if [ -d .git ] ; then18 if [ -r .git ] ; then
19 git ls-files "$1"19 git ls-files "$1"
20 else20 else
21 find "$1" -type f |21 find $1 -type f |
22 sed 's,^\./,,'22 sed 's,^\./,,'
23 fi |23 fi |
24 # if not ended by /24 # if not ended by /
diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh
index 0e097ee..e07682a 100755
--- a/devtools/check-symbol-maps.sh
+++ b/devtools/check-symbol-maps.sh
@@ -20,8 +20,7 @@ find_orphan_symbols ()
20 else20 else
21 symsrc=$sym21 symsrc=$sym
22 fi22 fi
23 if ! grep -q -r --exclude=$(basename $map) \23 if [ -z "$(grep -rlw $symsrc $(dirname $map) | grep -v $map)" ] ; then
24 -w $symsrc $(dirname $map) ; then
25 echo "$map: $sym"24 echo "$map: $sym"
26 fi25 fi
27 done26 done
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 78a408e..db4c7d8 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -118,8 +118,7 @@ check_forbidden_additions() { # <patch>
118 -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \118 -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
119 "$1" || res=1119 "$1" || res=1
120120
121 # svg figures must be included with wildcard extension121 # SVG must be included with wildcard extension to allow conversion
122 # because of png conversion for pdf docs
123 awk -v FOLDERS='doc' \122 awk -v FOLDERS='doc' \
124 -v EXPRESSIONS='::[[:space:]]*[^[:space:]]*\\.svg' \123 -v EXPRESSIONS='::[[:space:]]*[^[:space:]]*\\.svg' \
125 -v RET_ON_FAIL=1 \124 -v RET_ON_FAIL=1 \
diff --git a/doc/api/doxy-api.conf.in b/doc/api/doxy-api.conf.in
index 5c883b6..a536bcb 100644
--- a/doc/api/doxy-api.conf.in
+++ b/doc/api/doxy-api.conf.in
@@ -80,7 +80,8 @@ INPUT += @API_EXAMPLES@
80FILE_PATTERNS = rte_*.h \80FILE_PATTERNS = rte_*.h \
81 cmdline.h81 cmdline.h
82PREDEFINED = __DOXYGEN__ \82PREDEFINED = __DOXYGEN__ \
83 VFIO_PRESENT \83 RTE_HAS_CPUSET \
84 VFIO_PRESENT \
84 __attribute__(x)=85 __attribute__(x)=
8586
86OPTIMIZE_OUTPUT_FOR_C = YES87OPTIMIZE_OUTPUT_FOR_C = YES
diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index aceeb62..894d81c 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -5,8 +5,6 @@
5from docutils import nodes5from docutils import nodes
6from distutils.version import LooseVersion6from distutils.version import LooseVersion
7from sphinx import __version__ as sphinx_version7from sphinx import __version__ as sphinx_version
8from sphinx.highlighting import PygmentsBridge
9from pygments.formatters.latex import LatexFormatter
10from os import listdir8from os import listdir
11from os import environ9from os import environ
12from os.path import basename10from os.path import basename
@@ -20,7 +18,6 @@ try:
20 import sphinx_rtd_theme18 import sphinx_rtd_theme
2119
22 html_theme = "sphinx_rtd_theme"20 html_theme = "sphinx_rtd_theme"
23 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
24except:21except:
25 print('Install the sphinx ReadTheDocs theme for improved html documentation '22 print('Install the sphinx ReadTheDocs theme for improved html documentation '
26 'layout: https://sphinx-rtd-theme.readthedocs.io/',23 'layout: https://sphinx-rtd-theme.readthedocs.io/',
@@ -31,8 +28,10 @@ stop_on_error = ('-W' in argv)
3128
32project = 'Data Plane Development Kit'29project = 'Data Plane Development Kit'
33html_logo = '../logo/DPDK_logo_vertical_rev_small.png'30html_logo = '../logo/DPDK_logo_vertical_rev_small.png'
34latex_logo = '../logo/DPDK_logo_horizontal_tag.png'31if LooseVersion(sphinx_version) >= LooseVersion('3.5'):
35html_add_permalinks = ""32 html_permalinks = False
33else:
34 html_add_permalinks = ""
36html_show_copyright = False35html_show_copyright = False
37highlight_language = 'none'36highlight_language = 'none'
3837
@@ -47,46 +46,6 @@ feature_str_len = 30
47# Figures, tables and code-blocks automatically numbered if they have caption46# Figures, tables and code-blocks automatically numbered if they have caption
48numfig = True47numfig = True
4948
50latex_documents = [
51 ('index',
52 'doc.tex',
53 '',
54 '',
55 'manual')
56]
57
58# Latex directives to be included directly in the latex/pdf docs.
59custom_latex_preamble = r"""
60\usepackage{textalpha}
61\RecustomVerbatimEnvironment{Verbatim}{Verbatim}{xleftmargin=5mm}
62\usepackage{etoolbox}
63\robustify\(
64\robustify\)
65"""
66
67# Configuration for the latex/pdf docs.
68latex_elements = {
69 'papersize': 'a4paper',
70 'pointsize': '11pt',
71 # remove blank pages
72 'classoptions': ',openany,oneside',
73 'babel': '\\usepackage[english]{babel}',
74 # customize Latex formatting
75 'preamble': custom_latex_preamble
76}
77
78
79# Override the default Latex formatter in order to modify the
80# code/verbatim blocks.
81class CustomLatexFormatter(LatexFormatter):
82 def __init__(self, **options):
83 super(CustomLatexFormatter, self).__init__(**options)
84 # Use the second smallest font size for code/verbatim blocks.
85 self.verboptions = r'formatcom=\footnotesize'
86
87# Replace the default latex formatter.
88PygmentsBridge.latex_formatter = CustomLatexFormatter
89
90# Configuration for man pages49# Configuration for man pages
91man_pages = [("testpmd_app_ug/run_app", "testpmd",50man_pages = [("testpmd_app_ug/run_app", "testpmd",
92 "tests for dpdk pmds", "", 1),51 "tests for dpdk pmds", "", 1),
diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
index bb3f3ef..a2a8130 100644
--- a/doc/guides/contributing/coding_style.rst
+++ b/doc/guides/contributing/coding_style.rst
@@ -55,7 +55,7 @@ License Header
55~~~~~~~~~~~~~~55~~~~~~~~~~~~~~
5656
57Each file must begin with a special comment containing the57Each file must begin with a special comment containing the
58`Software Package Data Exchange (SPDX) License Identfier <https://spdx.org/using-spdx-license-identifier>`_.58`Software Package Data Exchange (SPDX) License Identifier <https://spdx.org/using-spdx-license-identifier>`_.
5959
60Generally this is the BSD License, except for code granted special exceptions.60Generally this is the BSD License, except for code granted special exceptions.
61The SPDX licences identifier is sufficient, a file should not contain61The SPDX licences identifier is sufficient, a file should not contain
diff --git a/doc/guides/contributing/documentation.rst b/doc/guides/contributing/documentation.rst
index a4e6be6..1e998fd 100644
--- a/doc/guides/contributing/documentation.rst
+++ b/doc/guides/contributing/documentation.rst
@@ -8,7 +8,7 @@ DPDK Documentation Guidelines
88
9This document outlines the guidelines for writing the DPDK Guides and API documentation in RST and Doxygen format.9This document outlines the guidelines for writing the DPDK Guides and API documentation in RST and Doxygen format.
1010
11It also explains the structure of the DPDK documentation and shows how to build the Html and PDF versions of the documents.11It also explains the structure of the DPDK documentation and how to build it.
1212
1313
14Structure of the Documentation14Structure of the Documentation
@@ -136,17 +136,11 @@ Building the Documentation
136Dependencies136Dependencies
137~~~~~~~~~~~~137~~~~~~~~~~~~
138138
139
140The following dependencies must be installed to build the documentation:139The following dependencies must be installed to build the documentation:
141140
142* Doxygen.141* Doxygen.
143
144* Sphinx (also called python-sphinx).142* Sphinx (also called python-sphinx).
145143
146* TexLive (at least TexLive-core and the extra Latex support).
147
148* Inkscape.
149
150`Doxygen`_ generates documentation from commented source code.144`Doxygen`_ generates documentation from commented source code.
151It can be installed as follows:145It can be installed as follows:
152146
@@ -158,7 +152,7 @@ It can be installed as follows:
158 # Red Hat/Fedora.152 # Red Hat/Fedora.
159 sudo dnf -y install doxygen153 sudo dnf -y install doxygen
160154
161`Sphinx`_ is a Python documentation tool for converting RST files to Html or to PDF (via LaTeX).155`Sphinx`_ is a Python documentation tool for converting RST files to HTML.
162For full support with figure and table captioning the latest version of Sphinx can be installed as follows:156For full support with figure and table captioning the latest version of Sphinx can be installed as follows:
163157
164.. code-block:: console158.. code-block:: console
@@ -177,43 +171,6 @@ For further information on getting started with Sphinx see the
177 To get full support for Figure and Table numbering it is best to install Sphinx 1.3.1 or later.171 To get full support for Figure and Table numbering it is best to install Sphinx 1.3.1 or later.
178172
179173
180`Inkscape`_ is a vector based graphics program which is used to create SVG images and also to convert SVG images to PDF images.
181It can be installed as follows:
182
183.. code-block:: console
184
185 # Ubuntu/Debian.
186 sudo apt-get -y install inkscape
187
188 # Red Hat/Fedora.
189 sudo dnf -y install inkscape
190
191`TexLive <http://www.tug.org/texlive/>`_ is an installation package for Tex/LaTeX.
192It is used to generate the PDF versions of the documentation.
193The main required packages can be installed as follows:
194
195.. code-block:: console
196
197 # Ubuntu/Debian.
198 sudo apt-get -y install texlive-latex-extra texlive-lang-greek
199
200 # Red Hat/Fedora, selective install.
201 sudo dnf -y install texlive-collection-latexextra texlive-greek-fontenc
202
203`Latexmk <http://personal.psu.edu/jcc8/software/latexmk-jcc/>`_ is a perl script
204for running LaTeX for resolving cross references,
205and it also runs auxiliary programs like bibtex, makeindex if necessary, and dvips.
206It has also a number of other useful capabilities (see man 1 latexmk).
207
208.. code-block:: console
209
210 # Ubuntu/Debian.
211 sudo apt-get -y install latexmk
212
213 # Red Hat/Fedora.
214 sudo dnf -y install latexmk
215
216
217Build commands174Build commands
218~~~~~~~~~~~~~~175~~~~~~~~~~~~~~
219176
@@ -225,16 +182,7 @@ To build the documentation::
225182
226See :doc:`../linux_gsg/build_dpdk` for more detail on compiling DPDK with meson.183See :doc:`../linux_gsg/build_dpdk` for more detail on compiling DPDK with meson.
227184
228The output is generated in the ``build`` directory::185The output is generated in the directories ``build/doc/html/{api,guides}``.
229
230 build/doc
231 |-- html
232 | |-- api
233 | +-- guides
234 |
235 +-- pdf
236 +-- guides
237
238186
239.. Note::187.. Note::
240188
@@ -259,7 +207,8 @@ Here are some guidelines in relation to the style of the documentation:
259RST Guidelines207RST Guidelines
260--------------208--------------
261209
262The RST (reStructuredText) format is a plain text markup format that can be converted to Html, PDF or other formats.210The RST (reStructuredText) format is a plain text markup format
211that can be converted to HTML or other formats.
263It is most closely associated with Python but it can be used to document any language.212It is most closely associated with Python but it can be used to document any language.
264It is used in DPDK to document everything apart from the API.213It is used in DPDK to document everything apart from the API.
265214
@@ -282,9 +231,8 @@ Line Length
282 words. Multiple sentences which are not separated by a blank line are joined231 words. Multiple sentences which are not separated by a blank line are joined
283 automatically into paragraphs.232 automatically into paragraphs.
284233
285* Lines in literal blocks **must** be less than 80 characters since234* Lines in literal blocks should be less than 80 characters
286 they are not wrapped by the document formatters and can exceed the page width235 since they are not wrapped by the document formatters.
287 in PDF documents.
288236
289 Long literal command lines can be shown wrapped with backslashes. For237 Long literal command lines can be shown wrapped with backslashes. For
290 example::238 example::
@@ -437,8 +385,8 @@ Code and Literal block sections
437* The default encoding for a literal block using the simplified ``::``385* The default encoding for a literal block using the simplified ``::``
438 directive is ``none``.386 directive is ``none``.
439387
440* Lines in literal blocks must be less than 80 characters since they can exceed the page width when converted to PDF documentation.388* Lines in literal blocks should be less than 80 characters.
441 For long literal lines that exceed that limit try to wrap the text at sensible locations.389 For long literal lines, try to wrap the text at sensible locations.
442 For example a long command line could be documented like this and still work if copied directly from the docs::390 For example a long command line could be documented like this and still work if copied directly from the docs::
443391
444 ./<build_dir>/app/dpdk-testpmd -l 0-2 -n3 --vdev=net_pcap0,iface=eth0 \392 ./<build_dir>/app/dpdk-testpmd -l 0-2 -n3 --vdev=net_pcap0,iface=eth0 \
@@ -503,7 +451,7 @@ Tables
503~~~~~~451~~~~~~
504452
505* RST tables should be used sparingly.453* RST tables should be used sparingly.
506 They are hard to format and to edit, they are often rendered incorrectly in PDF format, and the same information454 They are hard to format and to edit, and the same information
507 can usually be shown just as clearly with a definition or bullet list.455 can usually be shown just as clearly with a definition or bullet list.
508456
509* Tables in the documentation should be formatted as follows:457* Tables in the documentation should be formatted as follows:
@@ -533,8 +481,6 @@ Tables
533481
534 The QOS configuration is shown in :numref:`table_qos_pipes`.482 The QOS configuration is shown in :numref:`table_qos_pipes`.
535483
536* Tables should not include merged cells since they are not supported by the PDF renderer.
537
538484
539.. _links:485.. _links:
540486
diff --git a/doc/guides/cryptodevs/caam_jr.rst b/doc/guides/cryptodevs/caam_jr.rst
index 5ef33ae..d7b0f14 100644
--- a/doc/guides/cryptodevs/caam_jr.rst
+++ b/doc/guides/cryptodevs/caam_jr.rst
@@ -24,7 +24,7 @@ accelerators. This provides significant improvement to system level performance.
2424
25SEC HW accelerator above 4.x+ version are also known as CAAM.25SEC HW accelerator above 4.x+ version are also known as CAAM.
2626
27caam_jr PMD is one of DPAA drivers which uses uio interface to interact with27caam_jr PMD is one of DPAA drivers which uses UIO interface to interact with
28Linux kernel for configure and destroy the device instance (ring).28Linux kernel for configure and destroy the device instance (ring).
2929
3030
diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
index cf16f03..ea5c03b 100644
--- a/doc/guides/cryptodevs/qat.rst
+++ b/doc/guides/cryptodevs/qat.rst
@@ -562,7 +562,7 @@ Binding the available VFs to the vfio-pci driver
562562
563Note:563Note:
564564
565* Please note that due to security issues, the usage of older DPDK igb-uio565* Please note that due to security issues, the usage of older DPDK igb_uio
566 driver is not recommended. This document shows how to use the more secure566 driver is not recommended. This document shows how to use the more secure
567 vfio-pci driver.567 vfio-pci driver.
568* If QAT fails to bind to vfio-pci on Linux kernel 5.9+, please see the568* If QAT fails to bind to vfio-pci on Linux kernel 5.9+, please see the
diff --git a/doc/guides/cryptodevs/scheduler.rst b/doc/guides/cryptodevs/scheduler.rst
index 835d999..d08207f 100644
--- a/doc/guides/cryptodevs/scheduler.rst
+++ b/doc/guides/cryptodevs/scheduler.rst
@@ -118,7 +118,7 @@ operation:
118 than the designated threshold, otherwise it will be handled by the secondary118 than the designated threshold, otherwise it will be handled by the secondary
119 worker.119 worker.
120120
121 A typical usecase in this mode is with the QAT cryptodev as the primary and121 A typical use case in this mode is with the QAT cryptodev as the primary and
122 a software cryptodev as the secondary worker. This may help applications to122 a software cryptodev as the secondary worker. This may help applications to
123 process additional crypto workload than what the QAT cryptodev can handle on123 process additional crypto workload than what the QAT cryptodev can handle on
124 its own, by making use of the available CPU cycles to deal with smaller124 its own, by making use of the available CPU cycles to deal with smaller
diff --git a/doc/guides/cryptodevs/virtio.rst b/doc/guides/cryptodevs/virtio.rst
index 83d8e32..8b96446 100644
--- a/doc/guides/cryptodevs/virtio.rst
+++ b/doc/guides/cryptodevs/virtio.rst
@@ -63,7 +63,7 @@ QEMU can then be started using the following parameters:
63 -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev063 -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0
64 [...]64 [...]
6565
66Secondly bind the uio_generic driver for the virtio-crypto device.66Secondly bind the uio_pci_generic driver for the virtio-crypto device.
67For example, 0000:00:04.0 is the domain, bus, device and function67For example, 0000:00:04.0 is the domain, bus, device and function
68number of the virtio-crypto device:68number of the virtio-crypto device:
6969
diff --git a/doc/guides/eventdevs/dlb2.rst b/doc/guides/eventdevs/dlb2.rst
index 94d2c77..1223219 100644
--- a/doc/guides/eventdevs/dlb2.rst
+++ b/doc/guides/eventdevs/dlb2.rst
@@ -179,19 +179,19 @@ pools' sizes are controlled by the nb_events_limit field in struct
179rte_event_dev_config. The load-balanced pool is sized to contain179rte_event_dev_config. The load-balanced pool is sized to contain
180nb_events_limit credits, and the directed pool is sized to contain180nb_events_limit credits, and the directed pool is sized to contain
181nb_events_limit/4 credits. The directed pool size can be overridden with the181nb_events_limit/4 credits. The directed pool size can be overridden with the
182num_dir_credits vdev argument, like so:182num_dir_credits devargs argument, like so:
183183
184 .. code-block:: console184 .. code-block:: console
185185
186 --vdev=dlb1_event,num_dir_credits=<value>186 --allow ea:00.0,num_dir_credits=<value>
187187
188This can be used if the default allocation is too low or too high for the188This can be used if the default allocation is too low or too high for the
189specific application needs. The PMD also supports a vdev arg that limits the189specific application needs. The PMD also supports a devarg that limits the
190max_num_events reported by rte_event_dev_info_get():190max_num_events reported by rte_event_dev_info_get():
191191
192 .. code-block:: console192 .. code-block:: console
193193
194 --vdev=dlb1_event,max_num_events=<value>194 --allow ea:00.0,max_num_events=<value>
195195
196By default, max_num_events is reported as the total available load-balanced196By default, max_num_events is reported as the total available load-balanced
197credits. If multiple DLB2-based applications are being used, it may be desirable197credits. If multiple DLB2-based applications are being used, it may be desirable
@@ -314,27 +314,6 @@ The PMD does not support the following configuration sequences:
314This sequence is not supported because the event device must be reconfigured314This sequence is not supported because the event device must be reconfigured
315before its ports or queues can be.315before its ports or queues can be.
316316
317Deferred Scheduling
318~~~~~~~~~~~~~~~~~~~
319
320The DLB2 PMD's default behavior for managing a CQ is to "pop" the CQ once per
321dequeued event before returning from rte_event_dequeue_burst(). This frees the
322corresponding entries in the CQ, which enables the DLB2 to schedule more events
323to it.
324
325To support applications seeking finer-grained scheduling control -- for example
326deferring scheduling to get the best possible priority scheduling and
327load-balancing -- the PMD supports a deferred scheduling mode. In this mode,
328the CQ entry is not popped until the *subsequent* rte_event_dequeue_burst()
329call. This mode only applies to load-balanced event ports with dequeue depth of
3301.
331
332To enable deferred scheduling, use the defer_sched vdev argument like so:
333
334 .. code-block:: console
335
336 --vdev=dlb1_event,defer_sched=on
337
338Atomic Inflights Allocation317Atomic Inflights Allocation
339~~~~~~~~~~~~~~~~~~~~~~~~~~~318~~~~~~~~~~~~~~~~~~~~~~~~~~~
340319
@@ -357,11 +336,11 @@ buffer space (e.g. if not all queues are used, or aren't used for atomic
357scheduling).336scheduling).
358337
359The PMD provides a dev arg to override the default per-queue allocation. To338The PMD provides a dev arg to override the default per-queue allocation. To
360increase a vdev's per-queue atomic-inflight allocation to (for example) 64:339increase per-queue atomic-inflight allocation to (for example) 64:
361340
362 .. code-block:: console341 .. code-block:: console
363342
364 --vdev=dlb1_event,atm_inflights=64343 --allow ea:00.0,atm_inflights=64
365344
366QID Depth Threshold345QID Depth Threshold
367~~~~~~~~~~~~~~~~~~~346~~~~~~~~~~~~~~~~~~~
@@ -384,9 +363,9 @@ shown below.
384363
385 .. code-block:: console364 .. code-block:: console
386365
387 --vdev=dlb2_event,qid_depth_thresh=all:<threshold_value>366 --allow ea:00.0,qid_depth_thresh=all:<threshold_value>
388 --vdev=dlb2_event,qid_depth_thresh=qidA-qidB:<threshold_value>367 --allow ea:00.0,qid_depth_thresh=qidA-qidB:<threshold_value>
389 --vdev=dlb2_event,qid_depth_thresh=qid:<threshold_value>368 --allow ea:00.0,qid_depth_thresh=qid:<threshold_value>
390369
391Class of service370Class of service
392~~~~~~~~~~~~~~~~371~~~~~~~~~~~~~~~~
@@ -408,4 +387,4 @@ Class of service can be specified in the devargs, as follows
408387
409 .. code-block:: console388 .. code-block:: console
410389
411 --vdev=dlb2_event,cos=<0..4>390 --allow ea:00.0,cos=<0..4>
diff --git a/doc/guides/howto/pvp_reference_benchmark.rst b/doc/guides/howto/pvp_reference_benchmark.rst
index 553458d..484de3b 100644
--- a/doc/guides/howto/pvp_reference_benchmark.rst
+++ b/doc/guides/howto/pvp_reference_benchmark.rst
@@ -26,7 +26,7 @@ Setup overview
2626
27 PVP setup using 2 NICs27 PVP setup using 2 NICs
2828
29In this diagram, each red arrow represents one logical core. This use-case29In this diagram, each red arrow represents one logical core. This use case
30requires 6 dedicated logical cores. A forwarding configuration with a single30requires 6 dedicated logical cores. A forwarding configuration with a single
31NIC is also possible, requiring 3 logical cores.31NIC is also possible, requiring 3 logical cores.
3232
diff --git a/doc/guides/linux_gsg/linux_drivers.rst b/doc/guides/linux_gsg/linux_drivers.rst
index 90635a4..c6b6881 100644
--- a/doc/guides/linux_gsg/linux_drivers.rst
+++ b/doc/guides/linux_gsg/linux_drivers.rst
@@ -25,6 +25,16 @@ To make use of VFIO, the ``vfio-pci`` module must be loaded:
25VFIO kernel is usually present by default in all distributions,25VFIO kernel is usually present by default in all distributions,
26however please consult your distributions documentation to make sure that is the case.26however please consult your distributions documentation to make sure that is the case.
2727
28For DMA mapping of either external memory or hugepages, VFIO interface is used.
29VFIO does not support partial unmap of once mapped memory. Hence DPDK's memory is
30mapped in hugepage granularity or system page granularity. Number of DMA
31mappings is limited by kernel with user locked memory limit of a process (rlimit)
32for system/hugepage memory. Another per-container overall limit applicable both
33for external memory and system memory was added in kernel 5.1 defined by
34VFIO module parameter ``dma_entry_limit`` with a default value of 64K.
35When application is out of DMA entries, these limits need to be adjusted to
36increase the allowed limit.
37
28Since Linux version 5.7,38Since Linux version 5.7,
29the ``vfio-pci`` module supports the creation of virtual functions.39the ``vfio-pci`` module supports the creation of virtual functions.
30After the PF is bound to ``vfio-pci`` module,40After the PF is bound to ``vfio-pci`` module,
diff --git a/doc/guides/nics/bnx2x.rst b/doc/guides/nics/bnx2x.rst
index 9ad4f9f..788a6da 100644
--- a/doc/guides/nics/bnx2x.rst
+++ b/doc/guides/nics/bnx2x.rst
@@ -105,7 +105,7 @@ Jumbo: Limitation
105-----------------105-----------------
106106
107Rx descriptor limit for number of segments per MTU is set to 1.107Rx descriptor limit for number of segments per MTU is set to 1.
108PMD doesn't support Jumbo Rx scatter gather. Some applciations can108PMD doesn't support Jumbo Rx scatter gather. Some applications can
109adjust mbuf_size based on this param and max_pkt_len.109adjust mbuf_size based on this param and max_pkt_len.
110110
111For others, PMD detects the condition where Rx packet length cannot111For others, PMD detects the condition where Rx packet length cannot
diff --git a/doc/guides/nics/dpaa.rst b/doc/guides/nics/dpaa.rst
index 917482d..7355ec3 100644
--- a/doc/guides/nics/dpaa.rst
+++ b/doc/guides/nics/dpaa.rst
@@ -297,7 +297,7 @@ FMC - FMAN Configuration Tool
297297
298298
299 The details can be found in FMC Doc at:299 The details can be found in FMC Doc at:
300 `Frame Mnager Configuration Tool <https://www.nxp.com/docs/en/application-note/AN4760.pdf>`_.300 `Frame Manager Configuration Tool <https://www.nxp.com/docs/en/application-note/AN4760.pdf>`_.
301301
302FMLIB302FMLIB
303~~~~~303~~~~~
@@ -307,7 +307,7 @@ FMLIB
307307
308 This is an alternate to the FMC based configuration. This library provides308 This is an alternate to the FMC based configuration. This library provides
309 direct ioctl based interfaces for FMAN configuration as used by the FMC tool309 direct ioctl based interfaces for FMAN configuration as used by the FMC tool
310 as well. This helps in overcoming the main limitaiton of FMC - i.e. lack310 as well. This helps in overcoming the main limitation of FMC - i.e. lack
311 of dynamic configuration.311 of dynamic configuration.
312312
313 The location for the fmd driver as used by FMLIB and FMC is as follows:313 The location for the fmd driver as used by FMLIB and FMC is as follows:
@@ -319,7 +319,7 @@ VSP (Virtual Storage Profile)
319 The storage profiled are means to provide virtualized interface. A ranges of319 The storage profiled are means to provide virtualized interface. A ranges of
320 storage profiles cab be associated to Ethernet ports.320 storage profiles cab be associated to Ethernet ports.
321 They are selected during classification. Specify how the frame should be321 They are selected during classification. Specify how the frame should be
322 written to memory and which buffer pool to select for packet storange in322 written to memory and which buffer pool to select for packet storage in
323 queues. Start and End margin of buffer can also be configured.323 queues. Start and End margin of buffer can also be configured.
324324
325Limitations325Limitations
diff --git a/doc/guides/nics/ena.rst b/doc/guides/nics/ena.rst
index 0f1f63f..df72020 100644
--- a/doc/guides/nics/ena.rst
+++ b/doc/guides/nics/ena.rst
@@ -234,7 +234,7 @@ Example output:
234234
235 [...]235 [...]
236 EAL: PCI device 0000:00:06.0 on NUMA socket -1236 EAL: PCI device 0000:00:06.0 on NUMA socket -1
237 EAL: Invalid NUMA socket, default to 0237 EAL: Device 0000:00:06.0 is not NUMA-aware, defaulting socket to 0
238 EAL: probe driver: 1d0f:ec20 net_ena238 EAL: probe driver: 1d0f:ec20 net_ena
239239
240 Interactive-mode selected240 Interactive-mode selected
diff --git a/doc/guides/nics/enic.rst b/doc/guides/nics/enic.rst
index 5d1cc9f..1025224 100644
--- a/doc/guides/nics/enic.rst
+++ b/doc/guides/nics/enic.rst
@@ -294,35 +294,31 @@ inner and outer packets can be IPv4 or IPv6.
294294
295 RSS hash calculation, therefore queue selection, is done on inner packets.295 RSS hash calculation, therefore queue selection, is done on inner packets.
296296
297In order to enable overlay offload, the 'Enable VXLAN' box should be checked297In order to enable overlay offload, enable VXLAN and/or Geneve on vNIC
298via CIMC or UCSM followed by a reboot of the server. When PMD successfully298via CIMC or UCSM followed by a reboot of the server. When PMD successfully
299enables overlay offload, it prints the following message on the console.299enables overlay offload, it prints one of the following messages on the console.
300300
301.. code-block:: console301.. code-block:: console
302302
303 Overlay offload is enabled303 Overlay offload is enabled (VxLAN)
304 Overlay offload is enabled (Geneve)
305 Overlay offload is enabled (VxLAN, Geneve)
304306
305By default, PMD enables overlay offload if hardware supports it. To disable307By default, PMD enables overlay offload if hardware supports it. To disable
306it, set ``devargs`` parameter ``disable-overlay=1``. For example::308it, set ``devargs`` parameter ``disable-overlay=1``. For example::
307309
308 -a 12:00.0,disable-overlay=1310 -a 12:00.0,disable-overlay=1
309311
310By default, the NIC uses 4789 as the VXLAN port. The user may change312By default, the NIC uses 4789 and 6081 as the VXLAN and Geneve ports,
311it through ``rte_eth_dev_udp_tunnel_port_{add,delete}``. However, as313respectively. The user may change them through
312the current NIC has a single VXLAN port number, the user cannot314``rte_eth_dev_udp_tunnel_port_{add,delete}``. However, as the current
313configure multiple port numbers.315NIC has a single VXLAN port number and a single Geneve port number,
314316the user cannot configure multiple port numbers for each tunnel type.
315Geneve headers with non-zero options are not supported by default. To
316use Geneve with options, update the VIC firmware to the latest version
317and then set ``devargs`` parameter ``geneve-opt=1``. When Geneve with
318options is enabled, flow API cannot be used as the features are
319currently mutually exclusive. When this feature is successfully
320enabled, PMD prints the following message.
321
322.. code-block:: console
323
324 Geneve with options is enabled
325317
318Geneve offload support has evolved over VIC models. On older models,