Merge ~paelzer/ubuntu/+source/dpdk:MRE-19.11.6-FOCAL into ubuntu/+source/dpdk:ubuntu/focal-devel
- Git
- lp:~paelzer/ubuntu/+source/dpdk
- MRE-19.11.6-FOCAL
- Merge into ubuntu/focal-devel
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | ed703cc28a8dce83af270757ff1923a913bba7aa | ||||
Proposed branch: | ~paelzer/ubuntu/+source/dpdk:MRE-19.11.6-FOCAL | ||||
Merge into: | ubuntu/+source/dpdk:ubuntu/focal-devel | ||||
Diff against target: |
36797 lines (+12081/-6359) 560 files modified
MAINTAINERS (+14/-11) VERSION (+1/-1) app/test-bbdev/ldpc_enc_default.data (+1/-1) app/test-crypto-perf/meson.build (+3/-0) app/test-eventdev/evt_options.c (+4/-0) app/test-eventdev/test_pipeline_atq.c (+2/-0) app/test-pmd/bpf_cmd.c (+2/-2) app/test-pmd/cmdline.c (+13/-9) app/test-pmd/cmdline_flow.c (+2/-17) app/test-pmd/cmdline_mtr.c (+1/-0) app/test-pmd/config.c (+221/-71) app/test-pmd/meson.build (+12/-0) app/test-pmd/testpmd.c (+193/-11) app/test-pmd/testpmd.h (+2/-0) app/test-pmd/txonly.c (+32/-0) app/test-sad/main.c (+1/-1) app/test/Makefile (+1/-1) app/test/autotest_data.py (+2/-2) app/test/meson.build (+132/-102) app/test/test_bpf.c (+15/-26) app/test/test_cryptodev.c (+363/-49) app/test/test_cryptodev_aes_test_vectors.h (+63/-63) app/test/test_cryptodev_asym.c (+3/-2) app/test/test_cryptodev_mixed_test_vectors.h (+1318/-2) app/test/test_cycles.c (+7/-1) app/test/test_distributor.c (+140/-72) app/test/test_event_crypto_adapter.c (+15/-29) app/test/test_event_eth_tx_adapter.c (+2/-2) app/test/test_hash_readwrite_lf_perf.c (+4/-3) app/test/test_mbuf.c (+8/-4) app/test/test_rcu_qsbr.c (+33/-23) app/test/test_ring.c (+2/-2) app/test/test_ring_perf.c (+2/-1) app/test/test_service_cores.c (+1/-0) buildtools/call-sphinx-build.py (+31/-0) buildtools/meson.build (+4/-2) buildtools/pkg-config/meson.build (+55/-0) buildtools/pkg-config/set-static-linker-flags.py (+38/-0) buildtools/pmdinfogen/pmdinfogen.h (+1/-1) config/common_base (+0/-1) config/defconfig_arm-armv7a-linuxapp-gcc (+0/-1) config/defconfig_arm64-graviton2-linux-gcc (+1/-0) config/defconfig_arm64-graviton2-linuxapp-gcc (+13/-0) config/defconfig_graviton2 (+1/-0) config/meson.build (+23/-8) config/rte_config.h (+3/-1) debian/changelog (+16/-0) debian/dpdk-doc.doc-base.guides (+2/-2) debian/dpdk-doc.install (+2/-2) debian/patches/revert-net-ipn3ke-fix-meson-build.patch (+3/-3) debian/patches/series (+0/-7) debian/rules (+3/-1) dev/null (+0/-801) devtools/check-forbidden-tokens.awk (+2/-2) devtools/test-meson-builds.sh (+6/-7) doc/api/doxy-api-index.md (+8/-2) doc/build-sdk-meson.txt (+19/-11) doc/guides/compressdevs/qat_comp.rst (+4/-1) doc/guides/contributing/abi_policy.rst (+5/-7) doc/guides/cryptodevs/features/kasumi.ini (+1/-0) doc/guides/cryptodevs/features/octeontx.ini (+1/-0) doc/guides/cryptodevs/features/octeontx2.ini (+1/-0) doc/guides/cryptodevs/features/snow3g.ini (+1/-0) doc/guides/cryptodevs/features/zuc.ini (+1/-0) doc/guides/cryptodevs/qat.rst (+56/-2) doc/guides/linux_gsg/build_dpdk.rst (+18/-48) doc/guides/linux_gsg/build_sample_apps.rst (+2/-2) doc/guides/linux_gsg/enable_func.rst (+42/-18) doc/guides/linux_gsg/linux_drivers.rst (+3/-3) doc/guides/linux_gsg/nic_perf_intel_platform.rst (+3/-0) doc/guides/linux_gsg/sys_reqs.rst (+48/-26) doc/guides/meson.build (+8/-14) doc/guides/nics/dpaa2.rst (+2/-2) doc/guides/nics/features/iavf.ini (+1/-0) doc/guides/nics/i40e.rst (+9/-0) doc/guides/nics/mlx5.rst (+1/-1) doc/guides/nics/nfp.rst (+27/-10) doc/guides/nics/pcap_ring.rst (+1/-1) doc/guides/nics/sfc_efx.rst (+2/-2) doc/guides/prog_guide/kernel_nic_interface.rst (+1/-1) doc/guides/prog_guide/multi_proc_support.rst (+1/-1) doc/guides/prog_guide/packet_classif_access_ctrl.rst (+6/-0) doc/guides/prog_guide/thread_safety_dpdk_functions.rst (+2/-2) doc/guides/rel_notes/deprecation.rst (+0/-11) doc/guides/rel_notes/release_19_11.rst (+1004/-0) doc/guides/sample_app_ug/ethtool.rst (+1/-1) doc/guides/sample_app_ug/flow_classify.rst (+1/-1) doc/guides/sample_app_ug/flow_filtering.rst (+1/-1) doc/guides/sample_app_ug/ipsec_secgw.rst (+2/-2) doc/guides/sample_app_ug/l3_forward_access_ctrl.rst (+4/-4) doc/guides/sample_app_ug/l3_forward_power_man.rst (+1/-1) doc/guides/testpmd_app_ug/testpmd_funcs.rst (+3/-3) doc/guides/tools/testbbdev.rst (+1/-1) drivers/baseband/fpga_lte_fec/fpga_lte_fec.c (+2/-2) drivers/baseband/turbo_sw/bbdev_turbo_software.c (+26/-9) drivers/bus/dpaa/base/qbman/qman_driver.c (+4/-6) drivers/bus/dpaa/dpaa_bus.c (+5/-0) drivers/bus/fslmc/fslmc_bus.c (+5/-0) drivers/bus/fslmc/fslmc_vfio.c (+6/-15) drivers/bus/fslmc/portal/dpaa2_hw_dpio.c (+7/-2) drivers/bus/fslmc/portal/dpaa2_hw_pvt.h (+1/-1) drivers/bus/fslmc/qbman/qbman_portal.c (+2/-1) drivers/bus/pci/bsd/pci.c (+0/-49) drivers/bus/pci/linux/pci.c (+0/-12) drivers/bus/pci/linux/pci_vfio.c (+42/-3) drivers/bus/pci/private.h (+0/-15) drivers/bus/vdev/rte_bus_vdev.h (+1/-1) drivers/bus/vmbus/linux/vmbus_uio.c (+1/-1) drivers/common/cpt/cpt_ucode.h (+10/-14) drivers/common/dpaax/caamflib/desc.h (+1/-1) drivers/common/dpaax/caamflib/desc/pdcp.h (+54/-1) drivers/common/octeontx2/otx2_mbox.c (+5/-2) drivers/common/qat/qat_adf/icp_qat_fw.h (+5/-0) drivers/common/qat/qat_adf/icp_qat_fw_la.h (+2/-0) drivers/common/qat/qat_common.c (+3/-0) drivers/common/qat/qat_common.h (+3/-0) drivers/common/qat/qat_device.c (+162/-41) drivers/common/qat/qat_device.h (+58/-32) drivers/common/qat/qat_qp.c (+163/-44) drivers/common/qat/qat_qp.h (+9/-8) drivers/compress/isal/isal_compress_pmd_ops.c (+17/-3) drivers/compress/qat/qat_comp_pmd.c (+58/-10) drivers/compress/qat/qat_comp_pmd.h (+5/-1) drivers/crypto/aesni_mb/aesni_mb_pmd_private.h (+2/-2) drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c (+25/-26) drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c (+4/-4) drivers/crypto/armv8/armv8_pmd_private.h (+16/-18) drivers/crypto/armv8/rte_armv8_pmd.c (+4/-2) drivers/crypto/caam_jr/caam_jr.c (+9/-1) drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c (+16/-12) drivers/crypto/dpaa_sec/dpaa_sec.c (+10/-30) drivers/crypto/kasumi/rte_kasumi_pmd.c (+1/-0) drivers/crypto/octeontx/otx_cryptodev_ops.c (+1/-0) drivers/crypto/octeontx2/otx2_cryptodev.c (+33/-25) drivers/crypto/octeontx2/otx2_cryptodev.h (+2/-0) drivers/crypto/octeontx2/otx2_cryptodev_ops.c (+17/-5) drivers/crypto/qat/qat_asym.c (+2/-2) drivers/crypto/qat/qat_asym_pmd.c (+74/-15) drivers/crypto/qat/qat_asym_pmd.h (+6/-2) drivers/crypto/qat/qat_sym.c (+1/-1) drivers/crypto/qat/qat_sym.h (+1/-1) drivers/crypto/qat/qat_sym_capabilities.h (+1/-1) drivers/crypto/qat/qat_sym_pmd.c (+125/-20) drivers/crypto/qat/qat_sym_pmd.h (+12/-3) drivers/crypto/qat/qat_sym_session.c (+77/-0) drivers/crypto/scheduler/meson.build (+1/-1) drivers/crypto/scheduler/scheduler_pmd_private.h (+0/-1) drivers/crypto/snow3g/rte_snow3g_pmd.c (+1/-0) drivers/crypto/zuc/rte_zuc_pmd.c (+1/-0) drivers/event/dpaa/dpaa_eventdev.c (+1/-3) drivers/event/dpaa2/dpaa2_eventdev.c (+6/-5) drivers/event/dpaa2/dpaa2_eventdev_selftest.c (+1/-12) drivers/event/octeontx2/otx2_evdev.c (+82/-22) drivers/event/octeontx2/otx2_evdev.h (+12/-0) drivers/event/octeontx2/otx2_worker_dual.h (+5/-2) drivers/mempool/octeontx/octeontx_fpavf.c (+3/-3) drivers/meson.build (+10/-4) drivers/net/af_packet/rte_eth_af_packet.c (+14/-8) drivers/net/af_xdp/rte_eth_af_xdp.c (+18/-13) drivers/net/atlantic/rte_pmd_atlantic.h (+1/-1) drivers/net/bnx2x/bnx2x_ethdev.c (+4/-0) drivers/net/bnxt/bnxt.h (+10/-11) drivers/net/bnxt/bnxt_cpr.c (+13/-1) drivers/net/bnxt/bnxt_cpr.h (+4/-3) drivers/net/bnxt/bnxt_ethdev.c (+47/-38) drivers/net/bnxt/bnxt_filter.c (+9/-6) drivers/net/bnxt/bnxt_flow.c (+14/-6) drivers/net/bnxt/bnxt_hwrm.c (+52/-50) drivers/net/bnxt/bnxt_hwrm.h (+3/-1) drivers/net/bnxt/bnxt_ring.c (+1/-0) drivers/net/bnxt/bnxt_ring.h (+14/-9) drivers/net/bnxt/bnxt_rxq.c (+32/-21) drivers/net/bnxt/bnxt_rxq.h (+4/-3) drivers/net/bnxt/bnxt_rxr.c (+5/-8) drivers/net/bnxt/bnxt_rxr.h (+0/-2) drivers/net/bnxt/bnxt_rxtx_vec_sse.c (+2/-0) drivers/net/bnxt/bnxt_stats.c (+0/-67) drivers/net/bnxt/bnxt_txq.c (+21/-15) drivers/net/bnxt/bnxt_txr.c (+2/-0) drivers/net/bnxt/bnxt_txr.h (+0/-2) drivers/net/bnxt/bnxt_vnic.c (+3/-0) drivers/net/bnxt/rte_pmd_bnxt.h (+2/-1) drivers/net/bonding/eth_bond_8023ad_private.h (+3/-0) drivers/net/bonding/eth_bond_private.h (+2/-1) drivers/net/bonding/rte_eth_bond_8023ad.c (+20/-12) drivers/net/bonding/rte_eth_bond_api.c (+2/-7) drivers/net/bonding/rte_eth_bond_pmd.c (+18/-13) drivers/net/cxgbe/base/adapter.h (+1/-0) drivers/net/cxgbe/cxgbe_ethdev.c (+5/-6) drivers/net/cxgbe/cxgbe_filter.c (+79/-50) drivers/net/cxgbe/cxgbe_filter.h (+3/-1) drivers/net/cxgbe/cxgbe_flow.c (+3/-25) drivers/net/cxgbe/mps_tcam.c (+1/-0) drivers/net/cxgbe/sge.c (+99/-76) drivers/net/dpaa/dpaa_ethdev.c (+1/-1) drivers/net/dpaa/dpaa_rxtx.c (+1/-1) drivers/net/dpaa/rte_pmd_dpaa.h (+1/-3) drivers/net/dpaa2/dpaa2_ethdev.c (+3/-11) drivers/net/dpaa2/dpaa2_ethdev.h (+0/-4) drivers/net/dpaa2/dpaa2_ptp.c (+2/-0) drivers/net/dpaa2/meson.build (+2/-5) drivers/net/e1000/igb_rxtx.c (+90/-89) drivers/net/ena/base/ena_com.c (+18/-14) drivers/net/ena/base/ena_com.h (+2/-0) drivers/net/ena/base/ena_plat_dpdk.h (+38/-29) drivers/net/ena/ena_ethdev.c (+11/-9) drivers/net/enic/enic_ethdev.c (+0/-12) drivers/net/enic/enic_fm_flow.c (+35/-9) drivers/net/failsafe/failsafe_ether.c (+18/-9) drivers/net/failsafe/failsafe_ops.c (+8/-0) drivers/net/fm10k/fm10k_ethdev.c (+8/-24) drivers/net/fm10k/fm10k_rxtx_vec.c (+31/-8) drivers/net/hinic/base/hinic_compat.h (+12/-5) drivers/net/hinic/base/hinic_pmd_cfg.c (+5/-2) drivers/net/hinic/base/hinic_pmd_cfg.h (+1/-0) drivers/net/hinic/base/hinic_pmd_cmdq.c (+22/-9) drivers/net/hinic/base/hinic_pmd_eqs.c (+4/-4) drivers/net/hinic/base/hinic_pmd_eqs.h (+4/-0) drivers/net/hinic/base/hinic_pmd_hwdev.c (+91/-40) drivers/net/hinic/base/hinic_pmd_mbox.c (+70/-18) drivers/net/hinic/base/hinic_pmd_mbox.h (+2/-5) drivers/net/hinic/base/hinic_pmd_mgmt.c (+16/-10) drivers/net/hinic/base/hinic_pmd_mgmt.h (+2/-3) drivers/net/hinic/base/hinic_pmd_niccfg.c (+11/-55) drivers/net/hinic/base/hinic_pmd_niccfg.h (+0/-2) drivers/net/hinic/base/hinic_pmd_nicio.c (+28/-13) drivers/net/hinic/hinic_pmd_ethdev.c (+65/-30) drivers/net/hinic/hinic_pmd_ethdev.h (+1/-0) drivers/net/hinic/hinic_pmd_flow.c (+21/-0) drivers/net/hinic/hinic_pmd_rx.h (+4/-0) drivers/net/hns3/hns3_cmd.h (+3/-0) drivers/net/hns3/hns3_dcb.c (+7/-1) drivers/net/hns3/hns3_dcb.h (+12/-1) drivers/net/hns3/hns3_ethdev.c (+343/-133) drivers/net/hns3/hns3_ethdev.h (+47/-10) drivers/net/hns3/hns3_ethdev_vf.c (+298/-78) drivers/net/hns3/hns3_fdir.c (+3/-3) drivers/net/hns3/hns3_flow.c (+148/-112) drivers/net/hns3/hns3_intr.c (+7/-1) drivers/net/hns3/hns3_mbx.c (+37/-0) drivers/net/hns3/hns3_mbx.h (+8/-0) drivers/net/hns3/hns3_mp.c (+29/-5) drivers/net/hns3/hns3_mp.h (+2/-2) drivers/net/hns3/hns3_regs.c (+1/-1) drivers/net/hns3/hns3_rss.c (+17/-10) drivers/net/hns3/hns3_rss.h (+1/-0) drivers/net/hns3/hns3_rxtx.c (+322/-157) drivers/net/hns3/hns3_rxtx.h (+29/-9) drivers/net/i40e/Makefile (+1/-1) drivers/net/i40e/base/i40e_adminq_cmd.h (+1/-1) drivers/net/i40e/base/i40e_common.c (+31/-9) drivers/net/i40e/base/i40e_dcb.c (+2/-1) drivers/net/i40e/base/i40e_nvm.c (+5/-3) drivers/net/i40e/base/virtchnl.h (+15/-1) drivers/net/i40e/i40e_ethdev.c (+114/-54) drivers/net/i40e/i40e_ethdev.h (+26/-10) drivers/net/i40e/i40e_ethdev_vf.c (+113/-63) drivers/net/i40e/i40e_fdir.c (+208/-1) drivers/net/i40e/i40e_flow.c (+77/-213) drivers/net/i40e/i40e_rxtx_vec_altivec.c (+42/-17) drivers/net/i40e/i40e_rxtx_vec_neon.c (+37/-13) drivers/net/i40e/i40e_rxtx_vec_sse.c (+36/-12) drivers/net/i40e/i40e_vf_representor.c (+2/-1) drivers/net/i40e/meson.build (+3/-0) drivers/net/i40e/rte_pmd_i40e.c (+0/-1) drivers/net/i40e/rte_pmd_i40e.h (+11/-1) drivers/net/iavf/iavf.h (+8/-1) drivers/net/iavf/iavf_ethdev.c (+102/-35) drivers/net/iavf/iavf_rxtx.c (+3/-1) drivers/net/iavf/iavf_rxtx_vec_sse.c (+37/-12) drivers/net/iavf/iavf_vchnl.c (+61/-1) drivers/net/ice/base/ice_adminq_cmd.h (+3/-3) drivers/net/ice/base/ice_common.c (+1/-0) drivers/net/ice/base/ice_controlq.c (+24/-15) drivers/net/ice/base/ice_flex_pipe.c (+6/-0) drivers/net/ice/base/ice_flow.c (+14/-0) drivers/net/ice/base/ice_sched.c (+5/-1) drivers/net/ice/base/ice_switch.c (+3/-2) drivers/net/ice/ice_ethdev.c (+57/-10) drivers/net/ice/ice_ethdev.h (+7/-0) drivers/net/ice/ice_generic_flow.c (+1/-1) drivers/net/ice/ice_rxtx.c (+3/-2) drivers/net/ice/ice_rxtx.h (+2/-2) drivers/net/ice/ice_rxtx_vec_sse.c (+40/-16) drivers/net/ice/ice_switch_filter.c (+117/-22) drivers/net/ifc/base/ifcvf.h (+3/-0) drivers/net/ipn3ke/meson.build (+1/-5) drivers/net/ixgbe/base/ixgbe_common.c (+4/-3) drivers/net/ixgbe/base/ixgbe_dcb_82598.c (+0/-8) drivers/net/ixgbe/base/ixgbe_type.h (+12/-0) drivers/net/ixgbe/base/ixgbe_x540.c (+1/-1) drivers/net/ixgbe/base/ixgbe_x550.c (+7/-1) drivers/net/ixgbe/ixgbe_ethdev.c (+25/-5) drivers/net/ixgbe/ixgbe_ethdev.h (+1/-1) drivers/net/ixgbe/ixgbe_flow.c (+0/-9) drivers/net/ixgbe/ixgbe_pf.c (+13/-3) drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c (+39/-25) drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c (+32/-15) drivers/net/ixgbe/rte_pmd_ixgbe.h (+3/-1) drivers/net/kni/rte_eth_kni.c (+5/-0) drivers/net/memif/rte_eth_memif.c (+21/-7) drivers/net/mlx4/mlx4.c (+15/-13) drivers/net/mlx5/mlx5.c (+134/-67) drivers/net/mlx5/mlx5.h (+18/-21) drivers/net/mlx5/mlx5_defs.h (+1/-1) drivers/net/mlx5/mlx5_devx_cmds.c (+1/-1) drivers/net/mlx5/mlx5_ethdev.c (+26/-257) drivers/net/mlx5/mlx5_flow.c (+39/-13) drivers/net/mlx5/mlx5_flow.h (+2/-2) drivers/net/mlx5/mlx5_flow_dv.c (+158/-47) drivers/net/mlx5/mlx5_flow_meter.c (+12/-12) drivers/net/mlx5/mlx5_flow_verbs.c (+13/-4) drivers/net/mlx5/mlx5_glue.c (+4/-3) drivers/net/mlx5/mlx5_glue.h (+2/-2) drivers/net/mlx5/mlx5_mac.c (+5/-3) drivers/net/mlx5/mlx5_mr.c (+1/-1) drivers/net/mlx5/mlx5_prm.h (+3/-0) drivers/net/mlx5/mlx5_rss.c (+3/-1) drivers/net/mlx5/mlx5_rxq.c (+19/-19) drivers/net/mlx5/mlx5_rxtx.c (+26/-13) drivers/net/mlx5/mlx5_rxtx.h (+1/-0) drivers/net/mlx5/mlx5_rxtx_vec.c (+13/-6) drivers/net/mlx5/mlx5_rxtx_vec_altivec.h (+10/-3) drivers/net/mlx5/mlx5_rxtx_vec_neon.h (+14/-7) drivers/net/mlx5/mlx5_rxtx_vec_sse.h (+10/-3) drivers/net/mlx5/mlx5_stats.c (+25/-7) drivers/net/mlx5/mlx5_trigger.c (+14/-2) drivers/net/mlx5/mlx5_txq.c (+40/-28) drivers/net/mlx5/mlx5_utils.c (+3/-3) drivers/net/mlx5/mlx5_utils.h (+0/-4) drivers/net/mvpp2/mrvl_ethdev.c (+3/-3) drivers/net/mvpp2/mrvl_mtr.c (+6/-6) drivers/net/netvsc/hn_ethdev.c (+2/-4) drivers/net/netvsc/hn_nvs.c (+9/-5) drivers/net/netvsc/hn_rndis.c (+29/-3) drivers/net/netvsc/hn_rxtx.c (+76/-52) drivers/net/netvsc/hn_var.h (+10/-11) drivers/net/netvsc/hn_vf.c (+63/-141) drivers/net/nfp/nfp_net.c (+27/-11) drivers/net/nfp/nfp_net_pmd.h (+6/-0) drivers/net/octeontx2/otx2_ethdev.c (+32/-4) drivers/net/octeontx2/otx2_ethdev.h (+3/-0) drivers/net/octeontx2/otx2_ethdev_ops.c (+4/-9) drivers/net/octeontx2/otx2_flow.c (+2/-0) drivers/net/octeontx2/otx2_mac.c (+2/-0) drivers/net/octeontx2/otx2_vlan.c (+0/-5) drivers/net/pcap/rte_eth_pcap.c (+9/-1) drivers/net/pfe/pfe_ethdev.c (+0/-3) drivers/net/qede/base/bcm_osal.h (+1/-2) drivers/net/qede/base/ecore_sriov.c (+1/-1) drivers/net/qede/qede_ethdev.c (+9/-19) drivers/net/qede/qede_main.c (+4/-5) drivers/net/qede/qede_rxtx.c (+2/-6) drivers/net/ring/rte_eth_ring.c (+16/-2) drivers/net/sfc/base/efx_tunnel.c (+9/-3) drivers/net/sfc/sfc.c (+1/-0) drivers/net/sfc/sfc.h (+2/-0) drivers/net/sfc/sfc_ethdev.c (+34/-14) drivers/net/sfc/sfc_flow.c (+57/-12) drivers/net/sfc/sfc_flow.h (+2/-0) drivers/net/sfc/sfc_rx.c (+8/-8) drivers/net/sfc/sfc_rx.h (+1/-0) drivers/net/softnic/parser.c (+4/-184) drivers/net/tap/rte_eth_tap.c (+26/-17) drivers/net/tap/rte_eth_tap.h (+1/-0) drivers/net/thunderx/nicvf_ethdev.c (+1/-0) drivers/net/vdev_netvsc/vdev_netvsc.c (+13/-14) drivers/net/vhost/rte_eth_vhost.c (+38/-38) drivers/net/virtio/virtio_ethdev.c (+11/-2) drivers/net/virtio/virtio_rxtx.c (+3/-2) drivers/net/virtio/virtio_user/vhost_kernel_tap.c (+5/-2) drivers/net/virtio/virtio_user/virtio_user_dev.h (+1/-0) drivers/net/virtio/virtio_user_ethdev.c (+5/-5) drivers/net/virtio/virtqueue.h (+15/-2) drivers/raw/dpaa2_qdma/dpaa2_qdma.c (+2/-1) drivers/raw/ifpga/base/ifpga_fme.c (+20/-7) drivers/raw/ifpga/base/opae_spi.h (+1/-0) drivers/raw/ifpga/base/opae_spi_transaction.c (+1/-1) drivers/raw/ifpga/ifpga_rawdev.c (+30/-23) drivers/raw/ifpga/meson.build (+1/-6) drivers/raw/ioat/ioat_rawdev.c (+7/-0) drivers/raw/skeleton/skeleton_rawdev.c (+3/-1) drivers/raw/skeleton/skeleton_rawdev_test.c (+6/-0) examples/bbdev_app/Makefile (+1/-1) examples/bbdev_app/main.c (+2/-0) examples/bond/Makefile (+1/-1) examples/cmdline/Makefile (+1/-1) examples/distributor/Makefile (+1/-1) examples/eventdev_pipeline/Makefile (+1/-1) examples/eventdev_pipeline/main.c (+5/-5) examples/eventdev_pipeline/pipeline_common.h (+4/-4) examples/fips_validation/Makefile (+3/-1) examples/fips_validation/fips_validation.c (+57/-12) examples/fips_validation/fips_validation.h (+4/-1) examples/fips_validation/fips_validation_tdes.c (+13/-12) examples/fips_validation/main.c (+5/-0) examples/flow_classify/Makefile (+1/-1) examples/flow_filtering/Makefile (+1/-1) examples/helloworld/Makefile (+1/-1) examples/ioat/Makefile (+1/-1) examples/ioat/ioatfwd.c (+5/-3) examples/ip_fragmentation/Makefile (+1/-1) examples/ip_pipeline/Makefile (+2/-2) examples/ip_pipeline/parser.c (+4/-186) examples/ip_reassembly/Makefile (+1/-1) examples/ipsec-secgw/Makefile (+1/-1) examples/ipsec-secgw/parser.c (+5/-168) examples/ipv4_multicast/Makefile (+1/-1) examples/kni/Makefile (+3/-1) examples/kni/main.c (+2/-0) examples/l2fwd-cat/Makefile (+1/-1) examples/l2fwd-crypto/Makefile (+7/-1) examples/l2fwd-crypto/main.c (+2/-0) examples/l2fwd-crypto/meson.build (+3/-0) examples/l2fwd-event/Makefile (+1/-1) examples/l2fwd-event/main.c (+2/-0) examples/l2fwd-jobstats/Makefile (+1/-1) examples/l2fwd-jobstats/main.c (+3/-0) examples/l2fwd-keepalive/Makefile (+1/-1) examples/l2fwd-keepalive/main.c (+2/-0) examples/l2fwd-keepalive/meson.build (+7/-1) examples/l2fwd/Makefile (+1/-1) examples/l2fwd/main.c (+2/-0) examples/l3fwd-acl/Makefile (+1/-1) examples/l3fwd-power/Makefile (+1/-1) examples/l3fwd-power/main.c (+6/-3) examples/l3fwd/Makefile (+1/-1) examples/link_status_interrupt/Makefile (+1/-1) examples/link_status_interrupt/main.c (+2/-0) examples/meson.build (+3/-10) examples/multi_process/client_server_mp/mp_server/main.c (+10/-7) examples/multi_process/client_server_mp/shared/common.h (+1/-1) examples/ntb/Makefile (+2/-2) examples/packet_ordering/Makefile (+1/-1) examples/packet_ordering/main.c (+2/-2) examples/performance-thread/l3fwd-thread/main.c (+7/-2) examples/ptpclient/Makefile (+1/-1) examples/qos_meter/Makefile (+1/-1) examples/qos_sched/Makefile (+1/-1) examples/qos_sched/args.c (+1/-1) examples/rxtx_callbacks/Makefile (+3/-1) examples/service_cores/Makefile (+1/-1) examples/skeleton/Makefile (+1/-1) examples/tep_termination/Makefile (+1/-1) examples/tep_termination/main.c (+2/-0) examples/timer/Makefile (+1/-1) examples/vdpa/Makefile (+1/-1) examples/vhost/Makefile (+1/-1) examples/vhost/main.c (+2/-0) examples/vhost_blk/Makefile (+1/-1) examples/vhost_blk/vhost_blk.c (+11/-1) examples/vhost_crypto/Makefile (+1/-1) examples/vhost_crypto/main.c (+2/-2) examples/vm_power_manager/channel_manager.c (+8/-2) examples/vm_power_manager/guest_cli/vm_power_cli_guest.c (+4/-2) examples/vmdq/Makefile (+1/-1) examples/vmdq_dcb/Makefile (+1/-1) kernel/linux/kni/compat.h (+7/-1) kernel/linux/kni/kni_dev.h (+5/-0) lib/librte_acl/rte_acl.c (+1/-1) lib/librte_bbdev/rte_bbdev.h (+2/-1) lib/librte_bpf/bpf_validate.c (+5/-5) lib/librte_bpf/rte_bpf.h (+5/-1) lib/librte_cfgfile/rte_cfgfile.c (+2/-1) lib/librte_compressdev/rte_compressdev.h (+5/-1) lib/librte_cryptodev/rte_cryptodev_pmd.h (+2/-1) lib/librte_distributor/distributor_private.h (+3/-0) lib/librte_distributor/rte_distributor.c (+173/-44) lib/librte_distributor/rte_distributor.h (+12/-11) lib/librte_distributor/rte_distributor_single.c (+4/-0) lib/librte_eal/common/arch/arm/rte_cycles.c (+24/-3) lib/librte_eal/common/eal_common_dev.c (+1/-0) lib/librte_eal/common/eal_common_lcore.c (+10/-2) lib/librte_eal/common/eal_common_proc.c (+2/-2) lib/librte_eal/common/include/arch/arm/meson.build (+2/-0) lib/librte_eal/common/include/arch/arm/rte_atomic_64.h (+8/-0) lib/librte_eal/common/include/arch/arm/rte_cycles_64.h (+39/-6) lib/librte_eal/common/include/arch/arm/rte_vect.h (+5/-1) lib/librte_eal/common/include/arch/ppc_64/meson.build (+2/-0) lib/librte_eal/common/include/arch/x86/meson.build (+2/-0) lib/librte_eal/common/include/arch/x86/rte_memcpy.h (+1/-1) lib/librte_eal/common/include/generic/rte_mcslock.h (+8/-1) lib/librte_eal/common/include/generic/rte_memcpy.h (+4/-0) lib/librte_eal/common/include/rte_common.h (+3/-3) lib/librte_eal/common/include/rte_eal.h (+3/-2) lib/librte_eal/common/include/rte_service.h (+4/-0) lib/librte_eal/common/include/rte_service_component.h (+9/-0) lib/librte_eal/common/include/rte_uuid.h (+2/-0) lib/librte_eal/common/malloc_elem.c (+4/-4) lib/librte_eal/common/rte_service.c (+1/-3) lib/librte_eal/freebsd/eal/eal.c (+1/-1) lib/librte_eal/freebsd/eal/eal_memory.c (+1/-1) lib/librte_eal/linux/eal/eal.c (+1/-1) lib/librte_eal/linux/eal/eal_dev.c (+8/-4) lib/librte_eal/linux/eal/eal_interrupts.c (+1/-1) lib/librte_eal/linux/eal/eal_memalloc.c (+34/-11) lib/librte_eal/linux/eal/eal_memory.c (+1/-1) lib/librte_eal/linux/eal/eal_vfio.c (+64/-21) lib/librte_eal/linux/eal/eal_vfio_mp_sync.c (+2/-2) lib/librte_eal/rte_eal_exports.def (+0/-1) lib/librte_efd/rte_efd.c (+1/-0) lib/librte_ethdev/rte_ethdev.c (+58/-21) lib/librte_ethdev/rte_ethdev.h (+42/-15) lib/librte_ethdev/rte_ethdev_pci.h (+0/-26) lib/librte_ethdev/rte_ethdev_vdev.h (+0/-26) lib/librte_ethdev/rte_flow.c (+15/-3) lib/librte_eventdev/rte_event_crypto_adapter.c (+1/-0) lib/librte_eventdev/rte_event_eth_tx_adapter.c (+2/-0) lib/librte_eventdev/rte_event_timer_adapter.c (+59/-27) lib/librte_fib/rte_fib.h (+7/-0) lib/librte_fib/rte_fib6.h (+7/-0) lib/librte_flow_classify/rte_flow_classify.h (+4/-2) lib/librte_gro/rte_gro.c (+10/-7) lib/librte_gso/gso_udp4.c (+4/-1) lib/librte_hash/rte_cuckoo_hash.c (+8/-1) lib/librte_ipsec/rte_ipsec.h (+5/-1) lib/librte_kni/rte_kni.h (+1/-1) lib/librte_mbuf/rte_mbuf_dyn.c (+30/-28) lib/librte_mbuf/rte_mbuf_dyn.h (+1/-1) lib/librte_mempool/rte_mempool.c (+1/-1) lib/librte_meter/rte_meter_version.map (+0/-6) lib/librte_net/rte_ip.h (+22/-7) lib/librte_net/rte_mpls.h (+1/-0) lib/librte_pci/rte_pci.h (+1/-1) lib/librte_port/rte_port_source_sink.c (+1/-1) lib/librte_power/power_pstate_cpufreq.c (+59/-0) lib/librte_rawdev/rte_rawdev.c (+7/-7) lib/librte_rawdev/rte_rawdev.h (+7/-4) lib/librte_rawdev/rte_rawdev_pmd.h (+0/-3) lib/librte_rawdev/rte_rawdev_version.map (+1/-0) lib/librte_rcu/rte_rcu_qsbr.c (+3/-3) lib/librte_rcu/rte_rcu_qsbr.h (+11/-6) lib/librte_rib/rte_rib.h (+15/-0) lib/librte_rib/rte_rib6.h (+16/-1) lib/librte_sched/rte_sched.c (+12/-5) lib/librte_stack/rte_stack.h (+5/-2) lib/librte_stack/rte_stack_lf_c11.h (+3/-1) lib/librte_stack/rte_stack_lf_generic.h (+1/-1) lib/librte_table/rte_table_hash_key16.c (+17/-0) lib/librte_table/rte_table_hash_key32.c (+17/-0) lib/librte_table/rte_table_hash_key8.c (+16/-0) lib/librte_telemetry/rte_telemetry.h (+6/-1) lib/librte_timer/rte_timer.h (+12/-0) lib/librte_vhost/iotlb.c (+1/-2) lib/librte_vhost/rte_vhost.h (+17/-0) lib/librte_vhost/rte_vhost_crypto.h (+3/-0) lib/librte_vhost/socket.c (+4/-6) lib/librte_vhost/vhost.c (+45/-14) lib/librte_vhost/vhost.h (+0/-17) lib/librte_vhost/vhost_crypto.c (+244/-208) lib/librte_vhost/vhost_user.c (+54/-27) lib/librte_vhost/virtio_net.c (+8/-22) lib/meson.build (+5/-3) license/bsd-2-clause.txt (+20/-0) license/isc.txt (+11/-0) license/mit.txt (+18/-0) meson.build (+5/-23) mk/machine/graviton2/rte.vars.mk (+34/-0) usertools/cpu_layout.py (+1/-3) usertools/dpdk-pmdinfo.py (+1/-1) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robie Basak | Approve | ||
Canonical Server | Pending | ||
git-ubuntu developers | Pending | ||
Review via email: mp+396551@code.launchpad.net |
Commit message
Description of the change
Christian Ehrhardt (paelzer) wrote : | # |
Christian Ehrhardt (paelzer) wrote : | # |
Builds are good, testing ongoing but blocked by an RT that has to be resolved.
Nevertheless this is ready for review by the team.
Robie Basak (racb) wrote : | # |
Diffing your focal branch to your groovy branch is interesting. Some changes look inconsequential. But there are a couple of categories of differences I think might be relevant. Symbols files, and tests. Do symbols files additions in the Groovy packaging need adding to the Focal packaging? Same question with autopkgtest enhancements.
Also do we need fix-autopkgtest
I assume many of the other differences relate to not shipping in Focal some newly added things in Groovy, which makes sense.
You might want to update debian/watch in Focal, but with the same version in Groovy having an updated watch file that I assume works, I don't think this matters.
Otherwise both branches look fine to me. I am assuming your upload orig tarball will match the watch file, which matches your git tree :)
Fix if needed then upload - no need to go round again in this MP.
Christian Ehrhardt (paelzer) wrote : | # |
The diff is in the last non SRU upload for those releases.
Groovy started with 19.11.5-1 which was naturally further evolved than 19.11.1-0ubuntu1 that Focal started with. None of the changes in between those were critical enough to SRU them.
So the MRE I'm regularly doing really only bumps the upstream bits unless we have an explicit reason for it.
So the remaining diff you mentioned like symbols (not needed din focal as it has a patch to keep them off) and the autopkgtest (fine as-is in Focal) are all not a problem to be as they are right now.
Thanks you for the review Robie!
Christian Ehrhardt (paelzer) wrote : | # |
* [new tag] upload/
Uploading to ubuntu (via ftp to upload.ubuntu.com):
Uploading dpdk_19.
Uploading dpdk_19.
Uploading dpdk_19.
Uploading dpdk_19.
Uploading dpdk_19.
Successfully uploaded packages.
Preview Diff
1 | diff --git a/MAINTAINERS b/MAINTAINERS |
2 | index 10c4e1a..952ded7 100644 |
3 | --- a/MAINTAINERS |
4 | +++ b/MAINTAINERS |
5 | @@ -46,7 +46,7 @@ M: Jerin Jacob <jerinj@marvell.com> |
6 | T: git://dpdk.org/next/dpdk-next-net-mrvl |
7 | |
8 | Next-net-mlx Tree |
9 | -M: Raslan Darawsheh <rasland@mellanox.com> |
10 | +M: Raslan Darawsheh <rasland@nvidia.com> |
11 | T: git://dpdk.org/next/dpdk-next-net-mlx |
12 | |
13 | Next-virtio Tree |
14 | @@ -128,8 +128,11 @@ F: meson.build |
15 | F: lib/librte_eal/freebsd/BSDmakefile.meson |
16 | F: meson_options.txt |
17 | F: config/rte_config.h |
18 | +F: buildtools/call-sphinx-build.py |
19 | F: buildtools/gen-pmdinfo-cfile.sh |
20 | F: buildtools/map_to_def.py |
21 | +F: buildtools/list-dir-globs.py |
22 | +F: buildtools/pkg-config/ |
23 | F: buildtools/symlink-drivers-solibs.sh |
24 | |
25 | Public CI |
26 | @@ -370,7 +373,7 @@ F: devtools/test-null.sh |
27 | F: doc/guides/prog_guide/switch_representation.rst |
28 | |
29 | Flow API |
30 | -M: Ori Kam <orika@mellanox.com> |
31 | +M: Ori Kam <orika@nvidia.com> |
32 | T: git://dpdk.org/next/dpdk-next-net |
33 | F: app/test-pmd/cmdline_flow.c |
34 | F: doc/guides/prog_guide/rte_flow.rst |
35 | @@ -456,8 +459,8 @@ F: lib/librte_eventdev/*crypto_adapter* |
36 | F: app/test/test_event_crypto_adapter.c |
37 | F: doc/guides/prog_guide/event_crypto_adapter.rst |
38 | |
39 | -Raw device API - EXPERIMENTAL |
40 | -M: Shreyansh Jain <shreyansh.jain@nxp.com> |
41 | +Raw device API |
42 | +M: Nipun Gupta <nipun.gupta@nxp.com> |
43 | M: Hemant Agrawal <hemant.agrawal@nxp.com> |
44 | F: lib/librte_rawdev/ |
45 | F: drivers/raw/skeleton/ |
46 | @@ -728,17 +731,17 @@ F: doc/guides/nics/features/octeontx2*.ini |
47 | F: doc/guides/nics/octeontx2.rst |
48 | |
49 | Mellanox mlx4 |
50 | -M: Matan Azrad <matan@mellanox.com> |
51 | -M: Shahaf Shuler <shahafs@mellanox.com> |
52 | +M: Matan Azrad <matan@nvidia.com> |
53 | +M: Shahaf Shuler <shahafs@nvidia.com> |
54 | T: git://dpdk.org/next/dpdk-next-net-mlx |
55 | F: drivers/net/mlx4/ |
56 | F: doc/guides/nics/mlx4.rst |
57 | F: doc/guides/nics/features/mlx4.ini |
58 | |
59 | Mellanox mlx5 |
60 | -M: Matan Azrad <matan@mellanox.com> |
61 | -M: Shahaf Shuler <shahafs@mellanox.com> |
62 | -M: Viacheslav Ovsiienko <viacheslavo@mellanox.com> |
63 | +M: Matan Azrad <matan@nvidia.com> |
64 | +M: Shahaf Shuler <shahafs@nvidia.com> |
65 | +M: Viacheslav Ovsiienko <viacheslavo@nvidia.com> |
66 | T: git://dpdk.org/next/dpdk-next-net-mlx |
67 | F: drivers/net/mlx5/ |
68 | F: buildtools/options-ibverbs-static.sh |
69 | @@ -746,7 +749,7 @@ F: doc/guides/nics/mlx5.rst |
70 | F: doc/guides/nics/features/mlx5.ini |
71 | |
72 | Microsoft vdev_netvsc - EXPERIMENTAL |
73 | -M: Matan Azrad <matan@mellanox.com> |
74 | +M: Matan Azrad <matan@nvidia.com> |
75 | F: drivers/net/vdev_netvsc/ |
76 | F: doc/guides/nics/vdev_netvsc.rst |
77 | F: doc/guides/nics/features/vdev_netvsc.ini |
78 | @@ -1491,7 +1494,7 @@ M: Marko Kovacevic <marko.kovacevic@intel.com> |
79 | F: examples/fips_validation/ |
80 | F: doc/guides/sample_app_ug/fips_validation.rst |
81 | |
82 | -M: Ori Kam <orika@mellanox.com> |
83 | +M: Ori Kam <orika@nvidia.com> |
84 | F: examples/flow_filtering/ |
85 | F: doc/guides/sample_app_ug/flow_filtering.rst |
86 | |
87 | diff --git a/VERSION b/VERSION |
88 | index a43c349..729b18d 100644 |
89 | --- a/VERSION |
90 | +++ b/VERSION |
91 | @@ -1 +1 @@ |
92 | -19.11.3 |
93 | +19.11.6 |
94 | diff --git a/app/test-bbdev/ldpc_enc_default.data b/app/test-bbdev/ldpc_enc_default.data |
95 | index 371cbc6..52d51ae 120000 |
96 | --- a/app/test-bbdev/ldpc_enc_default.data |
97 | +++ b/app/test-bbdev/ldpc_enc_default.data |
98 | @@ -1 +1 @@ |
99 | -test_vectors/turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_high_snr.data |
100 | \ No newline at end of file |
101 | +test_vectors/ldpc_enc_v2342.data |
102 | \ No newline at end of file |
103 | diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build |
104 | index 0674396..c416091 100644 |
105 | --- a/app/test-crypto-perf/meson.build |
106 | +++ b/app/test-crypto-perf/meson.build |
107 | @@ -13,3 +13,6 @@ sources = files('cperf_ops.c', |
108 | 'cperf_test_verify.c', |
109 | 'main.c') |
110 | deps += ['cryptodev', 'security'] |
111 | +if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER') |
112 | + deps += 'pmd_crypto_scheduler' |
113 | +endif |
114 | diff --git a/app/test-eventdev/evt_options.c b/app/test-eventdev/evt_options.c |
115 | index c60b61a..4f4800d 100644 |
116 | --- a/app/test-eventdev/evt_options.c |
117 | +++ b/app/test-eventdev/evt_options.c |
118 | @@ -197,6 +197,10 @@ evt_parse_nb_timer_adptrs(struct evt_options *opt, const char *arg) |
119 | int ret; |
120 | |
121 | ret = parser_read_uint8(&(opt->nb_timer_adptrs), arg); |
122 | + if (opt->nb_timer_adptrs <= 0) { |
123 | + evt_err("Number of timer adapters cannot be <= 0"); |
124 | + return -EINVAL; |
125 | + } |
126 | |
127 | return ret; |
128 | } |
129 | diff --git a/app/test-eventdev/test_pipeline_atq.c b/app/test-eventdev/test_pipeline_atq.c |
130 | index 8e8686c..0872b25 100644 |
131 | --- a/app/test-eventdev/test_pipeline_atq.c |
132 | +++ b/app/test-eventdev/test_pipeline_atq.c |
133 | @@ -495,6 +495,8 @@ pipeline_atq_capability_check(struct evt_options *opt) |
134 | evt_nr_active_lcores(opt->wlcores), |
135 | dev_info.max_event_ports); |
136 | } |
137 | + if (!evt_has_all_types_queue(opt->dev_id)) |
138 | + return false; |
139 | |
140 | return true; |
141 | } |
142 | diff --git a/app/test-pmd/bpf_cmd.c b/app/test-pmd/bpf_cmd.c |
143 | index 830bfc1..d2deadd 100644 |
144 | --- a/app/test-pmd/bpf_cmd.c |
145 | +++ b/app/test-pmd/bpf_cmd.c |
146 | @@ -55,7 +55,7 @@ static const struct rte_bpf_xsym bpf_xsym[] = { |
147 | struct cmd_bpf_ld_result { |
148 | cmdline_fixed_string_t bpf; |
149 | cmdline_fixed_string_t dir; |
150 | - uint8_t port; |
151 | + uint16_t port; |
152 | uint16_t queue; |
153 | cmdline_fixed_string_t op; |
154 | cmdline_fixed_string_t flags; |
155 | @@ -153,7 +153,7 @@ cmdline_parse_inst_t cmd_operate_bpf_ld_parse = { |
156 | struct cmd_bpf_unld_result { |
157 | cmdline_fixed_string_t bpf; |
158 | cmdline_fixed_string_t dir; |
159 | - uint8_t port; |
160 | + uint16_t port; |
161 | uint16_t queue; |
162 | }; |
163 | |
164 | diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c |
165 | index d508d1e..9287fa3 100644 |
166 | --- a/app/test-pmd/cmdline.c |
167 | +++ b/app/test-pmd/cmdline.c |
168 | @@ -614,7 +614,7 @@ static void cmd_help_long_parsed(void *parsed_result, |
169 | "set bonding mode IEEE802.3AD aggregator policy (port_id) (agg_name)" |
170 | " Set Aggregation mode for IEEE802.3AD (mode 4)" |
171 | |
172 | - "set bonding xmit_balance_policy (port_id) (l2|l23|l34)\n" |
173 | + "set bonding balance_xmit_policy (port_id) (l2|l23|l34)\n" |
174 | " Set the transmit balance policy for bonded device running in balance mode.\n\n" |
175 | |
176 | "set bonding mon_period (port_id) (value)\n" |
177 | @@ -1913,18 +1913,13 @@ cmd_config_rx_tx_parsed(void *parsed_result, |
178 | nb_txq = res->value; |
179 | } |
180 | else if (!strcmp(res->name, "rxd")) { |
181 | - if (res->value <= 0 || res->value > RTE_TEST_RX_DESC_MAX) { |
182 | - printf("rxd %d invalid - must be > 0 && <= %d\n", |
183 | - res->value, RTE_TEST_RX_DESC_MAX); |
184 | + if (check_nb_rxd(res->value) != 0) |
185 | return; |
186 | - } |
187 | nb_rxd = res->value; |
188 | } else if (!strcmp(res->name, "txd")) { |
189 | - if (res->value <= 0 || res->value > RTE_TEST_TX_DESC_MAX) { |
190 | - printf("txd %d invalid - must be > 0 && <= %d\n", |
191 | - res->value, RTE_TEST_TX_DESC_MAX); |
192 | + if (check_nb_txd(res->value) != 0) |
193 | return; |
194 | - } |
195 | + |
196 | nb_txd = res->value; |
197 | } else { |
198 | printf("Unknown parameter\n"); |
199 | @@ -4173,6 +4168,9 @@ cmd_tx_vlan_set_parsed(void *parsed_result, |
200 | { |
201 | struct cmd_tx_vlan_set_result *res = parsed_result; |
202 | |
203 | + if (port_id_is_invalid(res->port_id, ENABLED_WARN)) |
204 | + return; |
205 | + |
206 | if (!port_is_stopped(res->port_id)) { |
207 | printf("Please stop port %d first\n", res->port_id); |
208 | return; |
209 | @@ -4227,6 +4225,9 @@ cmd_tx_vlan_set_qinq_parsed(void *parsed_result, |
210 | { |
211 | struct cmd_tx_vlan_set_qinq_result *res = parsed_result; |
212 | |
213 | + if (port_id_is_invalid(res->port_id, ENABLED_WARN)) |
214 | + return; |
215 | + |
216 | if (!port_is_stopped(res->port_id)) { |
217 | printf("Please stop port %d first\n", res->port_id); |
218 | return; |
219 | @@ -4340,6 +4341,9 @@ cmd_tx_vlan_reset_parsed(void *parsed_result, |
220 | { |
221 | struct cmd_tx_vlan_reset_result *res = parsed_result; |
222 | |
223 | + if (port_id_is_invalid(res->port_id, ENABLED_WARN)) |
224 | + return; |
225 | + |
226 | if (!port_is_stopped(res->port_id)) { |
227 | printf("Please stop port %d first\n", res->port_id); |
228 | return; |
229 | diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c |
230 | index deced65..be39f4b 100644 |
231 | --- a/app/test-pmd/cmdline_flow.c |
232 | +++ b/app/test-pmd/cmdline_flow.c |
233 | @@ -3900,30 +3900,15 @@ parse_vc_action_rss(struct context *ctx, const struct token *token, |
234 | .func = RTE_ETH_HASH_FUNCTION_DEFAULT, |
235 | .level = 0, |
236 | .types = rss_hf, |
237 | - .key_len = sizeof(action_rss_data->key), |
238 | + .key_len = 0, |
239 | .queue_num = RTE_MIN(nb_rxq, ACTION_RSS_QUEUE_NUM), |
240 | - .key = action_rss_data->key, |
241 | + .key = NULL, |
242 | .queue = action_rss_data->queue, |
243 | }, |
244 | - .key = "testpmd's default RSS hash key, " |
245 | - "override it for better balancing", |
246 | .queue = { 0 }, |
247 | }; |
248 | for (i = 0; i < action_rss_data->conf.queue_num; ++i) |
249 | action_rss_data->queue[i] = i; |
250 | - if (!port_id_is_invalid(ctx->port, DISABLED_WARN) && |
251 | - ctx->port != (portid_t)RTE_PORT_ALL) { |
252 | - struct rte_eth_dev_info info; |
253 | - int ret2; |
254 | - |
255 | - ret2 = rte_eth_dev_info_get(ctx->port, &info); |
256 | - if (ret2 != 0) |
257 | - return ret2; |
258 | - |
259 | - action_rss_data->conf.key_len = |
260 | - RTE_MIN(sizeof(action_rss_data->key), |
261 | - info.hash_key_size); |
262 | - } |
263 | action->conf = &action_rss_data->conf; |
264 | return ret; |
265 | } |
266 | diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c |
267 | index ab5c864..045c2e2 100644 |
268 | --- a/app/test-pmd/cmdline_mtr.c |
269 | +++ b/app/test-pmd/cmdline_mtr.c |
270 | @@ -1262,6 +1262,7 @@ static void cmd_set_port_meter_policer_action_parsed(void *parsed_result, |
271 | ret = rte_mtr_policer_actions_update(port_id, mtr_id, |
272 | action_mask, actions, &error); |
273 | if (ret != 0) { |
274 | + free(actions); |
275 | print_err_msg(&error); |
276 | return; |
277 | } |
278 | diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c |
279 | index 42eba68..5f8905c 100644 |
280 | --- a/app/test-pmd/config.c |
281 | +++ b/app/test-pmd/config.c |
282 | @@ -53,6 +53,14 @@ |
283 | |
284 | #include "testpmd.h" |
285 | |
286 | +#ifdef CLOCK_MONOTONIC_RAW /* Defined in glibc bits/time.h */ |
287 | +#define CLOCK_TYPE_ID CLOCK_MONOTONIC_RAW |
288 | +#else |
289 | +#define CLOCK_TYPE_ID CLOCK_MONOTONIC |
290 | +#endif |
291 | + |
292 | +#define NS_PER_SEC 1E9 |
293 | + |
294 | static char *flowtype_to_str(uint16_t flow_type); |
295 | |
296 | static const struct { |
297 | @@ -125,9 +133,10 @@ nic_stats_display(portid_t port_id) |
298 | static uint64_t prev_pkts_tx[RTE_MAX_ETHPORTS]; |
299 | static uint64_t prev_bytes_rx[RTE_MAX_ETHPORTS]; |
300 | static uint64_t prev_bytes_tx[RTE_MAX_ETHPORTS]; |
301 | - static uint64_t prev_cycles[RTE_MAX_ETHPORTS]; |
302 | + static uint64_t prev_ns[RTE_MAX_ETHPORTS]; |
303 | + struct timespec cur_time; |
304 | uint64_t diff_pkts_rx, diff_pkts_tx, diff_bytes_rx, diff_bytes_tx, |
305 | - diff_cycles; |
306 | + diff_ns; |
307 | uint64_t mpps_rx, mpps_tx, mbps_rx, mbps_tx; |
308 | struct rte_eth_stats stats; |
309 | struct rte_port *port = &ports[port_id]; |
310 | @@ -184,10 +193,17 @@ nic_stats_display(portid_t port_id) |
311 | } |
312 | } |
313 | |
314 | - diff_cycles = prev_cycles[port_id]; |
315 | - prev_cycles[port_id] = rte_rdtsc(); |
316 | - if (diff_cycles > 0) |
317 | - diff_cycles = prev_cycles[port_id] - diff_cycles; |
318 | + diff_ns = 0; |
319 | + if (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) { |
320 | + uint64_t ns; |
321 | + |
322 | + ns = cur_time.tv_sec * NS_PER_SEC; |
323 | + ns += cur_time.tv_nsec; |
324 | + |
325 | + if (prev_ns[port_id] != 0) |
326 | + diff_ns = ns - prev_ns[port_id]; |
327 | + prev_ns[port_id] = ns; |
328 | + } |
329 | |
330 | diff_pkts_rx = (stats.ipackets > prev_pkts_rx[port_id]) ? |
331 | (stats.ipackets - prev_pkts_rx[port_id]) : 0; |
332 | @@ -195,10 +211,10 @@ nic_stats_display(portid_t port_id) |
333 | (stats.opackets - prev_pkts_tx[port_id]) : 0; |
334 | prev_pkts_rx[port_id] = stats.ipackets; |
335 | prev_pkts_tx[port_id] = stats.opackets; |
336 | - mpps_rx = diff_cycles > 0 ? |
337 | - diff_pkts_rx * rte_get_tsc_hz() / diff_cycles : 0; |
338 | - mpps_tx = diff_cycles > 0 ? |
339 | - diff_pkts_tx * rte_get_tsc_hz() / diff_cycles : 0; |
340 | + mpps_rx = diff_ns > 0 ? |
341 | + (double)diff_pkts_rx / diff_ns * NS_PER_SEC : 0; |
342 | + mpps_tx = diff_ns > 0 ? |
343 | + (double)diff_pkts_tx / diff_ns * NS_PER_SEC : 0; |
344 | |
345 | diff_bytes_rx = (stats.ibytes > prev_bytes_rx[port_id]) ? |
346 | (stats.ibytes - prev_bytes_rx[port_id]) : 0; |
347 | @@ -206,10 +222,10 @@ nic_stats_display(portid_t port_id) |
348 | (stats.obytes - prev_bytes_tx[port_id]) : 0; |
349 | prev_bytes_rx[port_id] = stats.ibytes; |
350 | prev_bytes_tx[port_id] = stats.obytes; |
351 | - mbps_rx = diff_cycles > 0 ? |
352 | - diff_bytes_rx * rte_get_tsc_hz() / diff_cycles : 0; |
353 | - mbps_tx = diff_cycles > 0 ? |
354 | - diff_bytes_tx * rte_get_tsc_hz() / diff_cycles : 0; |
355 | + mbps_rx = diff_ns > 0 ? |
356 | + (double)diff_bytes_rx / diff_ns * NS_PER_SEC : 0; |
357 | + mbps_tx = diff_ns > 0 ? |
358 | + (double)diff_bytes_tx / diff_ns * NS_PER_SEC : 0; |
359 | |
360 | printf("\n Throughput (since last show)\n"); |
361 | printf(" Rx-pps: %12"PRIu64" Rx-bps: %12"PRIu64"\n Tx-pps: %12" |
362 | @@ -233,12 +249,14 @@ nic_stats_clear(portid_t port_id) |
363 | ret = rte_eth_stats_reset(port_id); |
364 | if (ret != 0) { |
365 | printf("%s: Error: failed to reset stats (port %u): %s", |
366 | - __func__, port_id, strerror(ret)); |
367 | + __func__, port_id, strerror(-ret)); |
368 | return; |
369 | } |
370 | |
371 | ret = rte_eth_stats_get(port_id, &ports[port_id].stats); |
372 | if (ret != 0) { |
373 | + if (ret < 0) |
374 | + ret = -ret; |
375 | printf("%s: Error: failed to get stats (port %u): %s", |
376 | __func__, port_id, strerror(ret)); |
377 | return; |
378 | @@ -322,12 +340,14 @@ nic_xstats_clear(portid_t port_id) |
379 | ret = rte_eth_xstats_reset(port_id); |
380 | if (ret != 0) { |
381 | printf("%s: Error: failed to reset xstats (port %u): %s", |
382 | - __func__, port_id, strerror(ret)); |
383 | + __func__, port_id, strerror(-ret)); |
384 | return; |
385 | } |
386 | |
387 | ret = rte_eth_stats_get(port_id, &ports[port_id].stats); |
388 | if (ret != 0) { |
389 | + if (ret < 0) |
390 | + ret = -ret; |
391 | printf("%s: Error: failed to get stats (port %u): %s", |
392 | __func__, port_id, strerror(ret)); |
393 | return; |
394 | @@ -1258,8 +1278,9 @@ port_mtu_set(portid_t port_id, uint16_t mtu) |
395 | return; |
396 | } |
397 | diag = rte_eth_dev_set_mtu(port_id, mtu); |
398 | - if (diag == 0 && |
399 | - dev_info.rx_offload_capa & DEV_RX_OFFLOAD_JUMBO_FRAME) { |
400 | + if (diag) |
401 | + printf("Set MTU failed. diag=%d\n", diag); |
402 | + else if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_JUMBO_FRAME) { |
403 | /* |
404 | * Ether overhead in driver is equal to the difference of |
405 | * max_rx_pktlen and max_mtu in rte_eth_dev_info when the |
406 | @@ -1274,10 +1295,7 @@ port_mtu_set(portid_t port_id, uint16_t mtu) |
407 | } else |
408 | rte_port->dev_conf.rxmode.offloads &= |
409 | ~DEV_RX_OFFLOAD_JUMBO_FRAME; |
410 | - |
411 | - return; |
412 | } |
413 | - printf("Set MTU failed. diag=%d\n", diag); |
414 | } |
415 | |
416 | /* Generic flow management functions. */ |
417 | @@ -1550,7 +1568,7 @@ port_flow_query(portid_t port_id, uint32_t rule, |
418 | |
419 | /** List flow rules. */ |
420 | void |
421 | -port_flow_list(portid_t port_id, uint32_t n, const uint32_t group[n]) |
422 | +port_flow_list(portid_t port_id, uint32_t n, const uint32_t *group) |
423 | { |
424 | struct rte_port *port; |
425 | struct port_flow *pf; |
426 | @@ -1667,22 +1685,102 @@ tx_queue_id_is_invalid(queueid_t txq_id) |
427 | } |
428 | |
429 | static int |
430 | -rx_desc_id_is_invalid(uint16_t rxdesc_id) |
431 | +get_rx_ring_size(portid_t port_id, queueid_t rxq_id, uint16_t *ring_size) |
432 | +{ |
433 | + struct rte_port *port = &ports[port_id]; |
434 | + struct rte_eth_rxq_info rx_qinfo; |
435 | + int ret; |
436 | + |
437 | + ret = rte_eth_rx_queue_info_get(port_id, rxq_id, &rx_qinfo); |
438 | + if (ret == 0) { |
439 | + *ring_size = rx_qinfo.nb_desc; |
440 | + return ret; |
441 | + } |
442 | + |
443 | + if (ret != -ENOTSUP) |
444 | + return ret; |
445 | + /* |
446 | + * If the rte_eth_rx_queue_info_get is not support for this PMD, |
447 | + * ring_size stored in testpmd will be used for validity verification. |
448 | + * When configure the rxq by rte_eth_rx_queue_setup with nb_rx_desc |
449 | + * being 0, it will use a default value provided by PMDs to setup this |
450 | + * rxq. If the default value is 0, it will use the |
451 | + * RTE_ETH_DEV_FALLBACK_RX_RINGSIZE to setup this rxq. |
452 | + */ |
453 | + if (port->nb_rx_desc[rxq_id]) |
454 | + *ring_size = port->nb_rx_desc[rxq_id]; |
455 | + else if (port->dev_info.default_rxportconf.ring_size) |
456 | + *ring_size = port->dev_info.default_rxportconf.ring_size; |
457 | + else |
458 | + *ring_size = RTE_ETH_DEV_FALLBACK_RX_RINGSIZE; |
459 | + return 0; |
460 | +} |
461 | + |
462 | +static int |
463 | +get_tx_ring_size(portid_t port_id, queueid_t txq_id, uint16_t *ring_size) |
464 | { |
465 | - if (rxdesc_id < nb_rxd) |
466 | + struct rte_port *port = &ports[port_id]; |
467 | + struct rte_eth_txq_info tx_qinfo; |
468 | + int ret; |
469 | + |
470 | + ret = rte_eth_tx_queue_info_get(port_id, txq_id, &tx_qinfo); |
471 | + if (ret == 0) { |
472 | + *ring_size = tx_qinfo.nb_desc; |
473 | + return ret; |
474 | + } |
475 | + |
476 | + if (ret != -ENOTSUP) |
477 | + return ret; |
478 | + /* |
479 | + * If the rte_eth_tx_queue_info_get is not support for this PMD, |
480 | + * ring_size stored in testpmd will be used for validity verification. |
481 | + * When configure the txq by rte_eth_tx_queue_setup with nb_tx_desc |
482 | + * being 0, it will use a default value provided by PMDs to setup this |
483 | + * txq. If the default value is 0, it will use the |
484 | + * RTE_ETH_DEV_FALLBACK_TX_RINGSIZE to setup this txq. |
485 | + */ |
486 | + if (port->nb_tx_desc[txq_id]) |
487 | + *ring_size = port->nb_tx_desc[txq_id]; |
488 | + else if (port->dev_info.default_txportconf.ring_size) |
489 | + *ring_size = port->dev_info.default_txportconf.ring_size; |
490 | + else |
491 | + *ring_size = RTE_ETH_DEV_FALLBACK_TX_RINGSIZE; |
492 | + return 0; |
493 | +} |
494 | + |
495 | +static int |
496 | +rx_desc_id_is_invalid(portid_t port_id, queueid_t rxq_id, uint16_t rxdesc_id) |
497 | +{ |
498 | + uint16_t ring_size; |
499 | + int ret; |
500 | + |
501 | + ret = get_rx_ring_size(port_id, rxq_id, &ring_size); |
502 | + if (ret) |
503 | + return 1; |
504 | + |
505 | + if (rxdesc_id < ring_size) |
506 | return 0; |
507 | - printf("Invalid RX descriptor %d (must be < nb_rxd=%d)\n", |
508 | - rxdesc_id, nb_rxd); |
509 | + |
510 | + printf("Invalid RX descriptor %u (must be < ring_size=%u)\n", |
511 | + rxdesc_id, ring_size); |
512 | return 1; |
513 | } |
514 | |
515 | static int |
516 | -tx_desc_id_is_invalid(uint16_t txdesc_id) |
517 | +tx_desc_id_is_invalid(portid_t port_id, queueid_t txq_id, uint16_t txdesc_id) |
518 | { |
519 | - if (txdesc_id < nb_txd) |
520 | + uint16_t ring_size; |
521 | + int ret; |
522 | + |
523 | + ret = get_tx_ring_size(port_id, txq_id, &ring_size); |
524 | + if (ret) |
525 | + return 1; |
526 | + |
527 | + if (txdesc_id < ring_size) |
528 | return 0; |
529 | - printf("Invalid TX descriptor %d (must be < nb_txd=%d)\n", |
530 | - txdesc_id, nb_txd); |
531 | + |
532 | + printf("Invalid TX descriptor %u (must be < ring_size=%u)\n", |
533 | + txdesc_id, ring_size); |
534 | return 1; |
535 | } |
536 | |
537 | @@ -1803,11 +1901,7 @@ rx_ring_desc_display(portid_t port_id, queueid_t rxq_id, uint16_t rxd_id) |
538 | { |
539 | const struct rte_memzone *rx_mz; |
540 | |
541 | - if (port_id_is_invalid(port_id, ENABLED_WARN)) |
542 | - return; |
543 | - if (rx_queue_id_is_invalid(rxq_id)) |
544 | - return; |
545 | - if (rx_desc_id_is_invalid(rxd_id)) |
546 | + if (rx_desc_id_is_invalid(port_id, rxq_id, rxd_id)) |
547 | return; |
548 | rx_mz = ring_dma_zone_lookup("rx_ring", port_id, rxq_id); |
549 | if (rx_mz == NULL) |
550 | @@ -1820,11 +1914,7 @@ tx_ring_desc_display(portid_t port_id, queueid_t txq_id, uint16_t txd_id) |
551 | { |
552 | const struct rte_memzone *tx_mz; |
553 | |
554 | - if (port_id_is_invalid(port_id, ENABLED_WARN)) |
555 | - return; |
556 | - if (tx_queue_id_is_invalid(txq_id)) |
557 | - return; |
558 | - if (tx_desc_id_is_invalid(txd_id)) |
559 | + if (tx_desc_id_is_invalid(port_id, txq_id, txd_id)) |
560 | return; |
561 | tx_mz = ring_dma_zone_lookup("tx_ring", port_id, txq_id); |
562 | if (tx_mz == NULL) |
563 | @@ -1865,10 +1955,17 @@ rxtx_config_display(void) |
564 | struct rte_eth_txconf *tx_conf = &ports[pid].tx_conf[0]; |
565 | uint16_t *nb_rx_desc = &ports[pid].nb_rx_desc[0]; |
566 | uint16_t *nb_tx_desc = &ports[pid].nb_tx_desc[0]; |
567 | - uint16_t nb_rx_desc_tmp; |
568 | - uint16_t nb_tx_desc_tmp; |
569 | struct rte_eth_rxq_info rx_qinfo; |
570 | struct rte_eth_txq_info tx_qinfo; |
571 | + uint16_t rx_free_thresh_tmp; |
572 | + uint16_t tx_free_thresh_tmp; |
573 | + uint16_t tx_rs_thresh_tmp; |
574 | + uint16_t nb_rx_desc_tmp; |
575 | + uint16_t nb_tx_desc_tmp; |
576 | + uint64_t offloads_tmp; |
577 | + uint8_t pthresh_tmp; |
578 | + uint8_t hthresh_tmp; |
579 | + uint8_t wthresh_tmp; |
580 | int32_t rc; |
581 | |
582 | /* per port config */ |
583 | @@ -1882,41 +1979,64 @@ rxtx_config_display(void) |
584 | /* per rx queue config only for first queue to be less verbose */ |
585 | for (qid = 0; qid < 1; qid++) { |
586 | rc = rte_eth_rx_queue_info_get(pid, qid, &rx_qinfo); |
587 | - if (rc) |
588 | + if (rc) { |
589 | nb_rx_desc_tmp = nb_rx_desc[qid]; |
590 | - else |
591 | + rx_free_thresh_tmp = |
592 | + rx_conf[qid].rx_free_thresh; |
593 | + pthresh_tmp = rx_conf[qid].rx_thresh.pthresh; |
594 | + hthresh_tmp = rx_conf[qid].rx_thresh.hthresh; |
595 | + wthresh_tmp = rx_conf[qid].rx_thresh.wthresh; |
596 | + offloads_tmp = rx_conf[qid].offloads; |
597 | + } else { |
598 | nb_rx_desc_tmp = rx_qinfo.nb_desc; |
599 | + rx_free_thresh_tmp = |
600 | + rx_qinfo.conf.rx_free_thresh; |
601 | + pthresh_tmp = rx_qinfo.conf.rx_thresh.pthresh; |
602 | + hthresh_tmp = rx_qinfo.conf.rx_thresh.hthresh; |
603 | + wthresh_tmp = rx_qinfo.conf.rx_thresh.wthresh; |
604 | + offloads_tmp = rx_qinfo.conf.offloads; |
605 | + } |
606 | |
607 | printf(" RX queue: %d\n", qid); |
608 | printf(" RX desc=%d - RX free threshold=%d\n", |
609 | - nb_rx_desc_tmp, rx_conf[qid].rx_free_thresh); |
610 | + nb_rx_desc_tmp, rx_free_thresh_tmp); |
611 | printf(" RX threshold registers: pthresh=%d hthresh=%d " |
612 | " wthresh=%d\n", |
613 | - rx_conf[qid].rx_thresh.pthresh, |
614 | - rx_conf[qid].rx_thresh.hthresh, |
615 | - rx_conf[qid].rx_thresh.wthresh); |
616 | - printf(" RX Offloads=0x%"PRIx64"\n", |
617 | - rx_conf[qid].offloads); |
618 | + pthresh_tmp, hthresh_tmp, wthresh_tmp); |
619 | + printf(" RX Offloads=0x%"PRIx64"\n", offloads_tmp); |
620 | } |
621 | |
622 | /* per tx queue config only for first queue to be less verbose */ |
623 | for (qid = 0; qid < 1; qid++) { |
624 | rc = rte_eth_tx_queue_info_get(pid, qid, &tx_qinfo); |
625 | - if (rc) |
626 | + if (rc) { |
627 | nb_tx_desc_tmp = nb_tx_desc[qid]; |
628 | - else |
629 | + tx_free_thresh_tmp = |
630 | + tx_conf[qid].tx_free_thresh; |
631 | + pthresh_tmp = tx_conf[qid].tx_thresh.pthresh; |
632 | + hthresh_tmp = tx_conf[qid].tx_thresh.hthresh; |
633 | + wthresh_tmp = tx_conf[qid].tx_thresh.wthresh; |
634 | + offloads_tmp = tx_conf[qid].offloads; |
635 | + tx_rs_thresh_tmp = tx_conf[qid].tx_rs_thresh; |
636 | + } else { |
637 | nb_tx_desc_tmp = tx_qinfo.nb_desc; |
638 | + tx_free_thresh_tmp = |
639 | + tx_qinfo.conf.tx_free_thresh; |
640 | + pthresh_tmp = tx_qinfo.conf.tx_thresh.pthresh; |
641 | + hthresh_tmp = tx_qinfo.conf.tx_thresh.hthresh; |
642 | + wthresh_tmp = tx_qinfo.conf.tx_thresh.wthresh; |
643 | + offloads_tmp = tx_qinfo.conf.offloads; |
644 | + tx_rs_thresh_tmp = tx_qinfo.conf.tx_rs_thresh; |
645 | + } |
646 | |
647 | printf(" TX queue: %d\n", qid); |
648 | printf(" TX desc=%d - TX free threshold=%d\n", |
649 | - nb_tx_desc_tmp, tx_conf[qid].tx_free_thresh); |
650 | + nb_tx_desc_tmp, tx_free_thresh_tmp); |
651 | printf(" TX threshold registers: pthresh=%d hthresh=%d " |
652 | " wthresh=%d\n", |
653 | - tx_conf[qid].tx_thresh.pthresh, |
654 | - tx_conf[qid].tx_thresh.hthresh, |
655 | - tx_conf[qid].tx_thresh.wthresh); |
656 | + pthresh_tmp, hthresh_tmp, wthresh_tmp); |
657 | printf(" TX offloads=0x%"PRIx64" - TX RS bit threshold=%d\n", |
658 | - tx_conf[qid].offloads, tx_conf->tx_rs_thresh); |
659 | + offloads_tmp, tx_rs_thresh_tmp); |
660 | } |
661 | } |
662 | } |
663 | @@ -2561,6 +2681,10 @@ set_fwd_lcores_mask(uint64_t lcoremask) |
664 | void |
665 | set_fwd_lcores_number(uint16_t nb_lc) |
666 | { |
667 | + if (test_done == 0) { |
668 | + printf("Please stop forwarding first\n"); |
669 | + return; |
670 | + } |
671 | if (nb_lc > nb_cfg_lcores) { |
672 | printf("nb fwd cores %u > %u (max. number of configured " |
673 | "lcores) - ignored\n", |
674 | @@ -2708,17 +2832,41 @@ show_tx_pkt_segments(void) |
675 | printf("Split packet: %s\n", split); |
676 | } |
677 | |
678 | +static bool |
679 | +nb_segs_is_invalid(unsigned int nb_segs) |
680 | +{ |
681 | + uint16_t ring_size; |
682 | + uint16_t queue_id; |
683 | + uint16_t port_id; |
684 | + int ret; |
685 | + |
686 | + RTE_ETH_FOREACH_DEV(port_id) { |
687 | + for (queue_id = 0; queue_id < nb_txq; queue_id++) { |
688 | + ret = get_tx_ring_size(port_id, queue_id, &ring_size); |
689 | + |
690 | + if (ret) |
691 | + return true; |
692 | + |
693 | + if (ring_size < nb_segs) { |
694 | + printf("nb segments per TX packets=%u >= " |
695 | + "TX queue(%u) ring_size=%u - ignored\n", |
696 | + nb_segs, queue_id, ring_size); |
697 | + return true; |
698 | + } |
699 | + } |
700 | + } |
701 | + |
702 | + return false; |
703 | +} |
704 | + |
705 | void |
706 | set_tx_pkt_segments(unsigned *seg_lengths, unsigned nb_segs) |
707 | { |
708 | uint16_t tx_pkt_len; |
709 | unsigned i; |
710 | |
711 | - if (nb_segs >= (unsigned) nb_txd) { |
712 | - printf("nb segments per TX packets=%u >= nb_txd=%u - ignored\n", |
713 | - nb_segs, (unsigned int) nb_txd); |
714 | + if (nb_segs_is_invalid(nb_segs)) |
715 | return; |
716 | - } |
717 | |
718 | /* |
719 | * Check that each segment length is greater or equal than |
720 | @@ -3062,9 +3210,11 @@ vlan_extend_set(portid_t port_id, int on) |
721 | } |
722 | |
723 | diag = rte_eth_dev_set_vlan_offload(port_id, vlan_offload); |
724 | - if (diag < 0) |
725 | + if (diag < 0) { |
726 | printf("rx_vlan_extend_set(port_pi=%d, on=%d) failed " |
727 | "diag=%d\n", port_id, on, diag); |
728 | + return; |
729 | + } |
730 | ports[port_id].dev_conf.rxmode.offloads = port_rx_offloads; |
731 | } |
732 | |
733 | @@ -3089,9 +3239,11 @@ rx_vlan_strip_set(portid_t port_id, int on) |
734 | } |
735 | |
736 | diag = rte_eth_dev_set_vlan_offload(port_id, vlan_offload); |
737 | - if (diag < 0) |
738 | + if (diag < 0) { |
739 | printf("rx_vlan_strip_set(port_pi=%d, on=%d) failed " |
740 | "diag=%d\n", port_id, on, diag); |
741 | + return; |
742 | + } |
743 | ports[port_id].dev_conf.rxmode.offloads = port_rx_offloads; |
744 | } |
745 | |
746 | @@ -3130,9 +3282,11 @@ rx_vlan_filter_set(portid_t port_id, int on) |
747 | } |
748 | |
749 | diag = rte_eth_dev_set_vlan_offload(port_id, vlan_offload); |
750 | - if (diag < 0) |
751 | + if (diag < 0) { |
752 | printf("rx_vlan_filter_set(port_pi=%d, on=%d) failed " |
753 | "diag=%d\n", port_id, on, diag); |
754 | + return; |
755 | + } |
756 | ports[port_id].dev_conf.rxmode.offloads = port_rx_offloads; |
757 | } |
758 | |
759 | @@ -3157,9 +3311,11 @@ rx_vlan_qinq_strip_set(portid_t port_id, int on) |
760 | } |
761 | |
762 | diag = rte_eth_dev_set_vlan_offload(port_id, vlan_offload); |
763 | - if (diag < 0) |
764 | + if (diag < 0) { |
765 | printf("%s(port_pi=%d, on=%d) failed " |
766 | "diag=%d\n", __func__, port_id, on, diag); |
767 | + return; |
768 | + } |
769 | ports[port_id].dev_conf.rxmode.offloads = port_rx_offloads; |
770 | } |
771 | |
772 | @@ -3217,8 +3373,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id) |
773 | struct rte_eth_dev_info dev_info; |
774 | int ret; |
775 | |
776 | - if (port_id_is_invalid(port_id, ENABLED_WARN)) |
777 | - return; |
778 | if (vlan_id_is_invalid(vlan_id)) |
779 | return; |
780 | |
781 | @@ -3249,8 +3403,6 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer) |
782 | struct rte_eth_dev_info dev_info; |
783 | int ret; |
784 | |
785 | - if (port_id_is_invalid(port_id, ENABLED_WARN)) |
786 | - return; |
787 | if (vlan_id_is_invalid(vlan_id)) |
788 | return; |
789 | if (vlan_id_is_invalid(vlan_id_outer)) |
790 | @@ -3276,8 +3428,6 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer) |
791 | void |
792 | tx_vlan_reset(portid_t port_id) |
793 | { |
794 | - if (port_id_is_invalid(port_id, ENABLED_WARN)) |
795 | - return; |
796 | ports[port_id].dev_conf.txmode.offloads &= |
797 | ~(DEV_TX_OFFLOAD_VLAN_INSERT | |
798 | DEV_TX_OFFLOAD_QINQ_INSERT); |
799 | diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build |
800 | index 6006c60..b0249bd 100644 |
801 | --- a/app/test-pmd/meson.build |
802 | +++ b/app/test-pmd/meson.build |
803 | @@ -28,6 +28,18 @@ deps += ['ethdev', 'gro', 'gso', 'cmdline', 'metrics', 'meter', 'bus_pci'] |
804 | if dpdk_conf.has('RTE_LIBRTE_PDUMP') |
805 | deps += 'pdump' |
806 | endif |
807 | +if dpdk_conf.has('RTE_LIBRTE_BITRATESTATS') |
808 | + deps += 'bitratestats' |
809 | +endif |
810 | +if dpdk_conf.has('RTE_LIBRTE_LATENCYSTATS') |
811 | + deps += 'latencystats' |
812 | +endif |
813 | +if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER') |
814 | + deps += 'pmd_crypto_scheduler' |
815 | +endif |
816 | +if dpdk_conf.has('RTE_LIBRTE_BOND_PMD') |
817 | + deps += 'pmd_bond' |
818 | +endif |
819 | if dpdk_conf.has('RTE_LIBRTE_BNXT_PMD') |
820 | deps += 'pmd_bnxt' |
821 | endif |
822 | diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c |
823 | index 0b12659..8d3b7b2 100644 |
824 | --- a/app/test-pmd/testpmd.c |
825 | +++ b/app/test-pmd/testpmd.c |
826 | @@ -1072,6 +1072,177 @@ check_nb_txq(queueid_t txq) |
827 | } |
828 | |
829 | /* |
830 | + * Get the allowed maximum number of RXDs of every rx queue. |
831 | + * *pid return the port id which has minimal value of |
832 | + * max_rxd in all queues of all ports. |
833 | + */ |
834 | +static uint16_t |
835 | +get_allowed_max_nb_rxd(portid_t *pid) |
836 | +{ |
837 | + uint16_t allowed_max_rxd = UINT16_MAX; |
838 | + portid_t pi; |
839 | + struct rte_eth_dev_info dev_info; |
840 | + |
841 | + RTE_ETH_FOREACH_DEV(pi) { |
842 | + if (eth_dev_info_get_print_err(pi, &dev_info) != 0) |
843 | + continue; |
844 | + |
845 | + if (dev_info.rx_desc_lim.nb_max < allowed_max_rxd) { |
846 | + allowed_max_rxd = dev_info.rx_desc_lim.nb_max; |
847 | + *pid = pi; |
848 | + } |
849 | + } |
850 | + return allowed_max_rxd; |
851 | +} |
852 | + |
853 | +/* |
854 | + * Get the allowed minimal number of RXDs of every rx queue. |
855 | + * *pid return the port id which has minimal value of |
856 | + * min_rxd in all queues of all ports. |
857 | + */ |
858 | +static uint16_t |
859 | +get_allowed_min_nb_rxd(portid_t *pid) |
860 | +{ |
861 | + uint16_t allowed_min_rxd = 0; |
862 | + portid_t pi; |
863 | + struct rte_eth_dev_info dev_info; |
864 | + |
865 | + RTE_ETH_FOREACH_DEV(pi) { |
866 | + if (eth_dev_info_get_print_err(pi, &dev_info) != 0) |
867 | + continue; |
868 | + |
869 | + if (dev_info.rx_desc_lim.nb_min > allowed_min_rxd) { |
870 | + allowed_min_rxd = dev_info.rx_desc_lim.nb_min; |
871 | + *pid = pi; |
872 | + } |
873 | + } |
874 | + |
875 | + return allowed_min_rxd; |
876 | +} |
877 | + |
878 | +/* |
879 | + * Check input rxd is valid or not. |
880 | + * If input rxd is not greater than any of maximum number |
881 | + * of RXDs of every Rx queues and is not less than any of |
882 | + * minimal number of RXDs of every Rx queues, it is valid. |
883 | + * if valid, return 0, else return -1 |
884 | + */ |
885 | +int |
886 | +check_nb_rxd(queueid_t rxd) |
887 | +{ |
888 | + uint16_t allowed_max_rxd; |
889 | + uint16_t allowed_min_rxd; |
890 | + portid_t pid = 0; |
891 | + |
892 | + allowed_max_rxd = get_allowed_max_nb_rxd(&pid); |
893 | + if (rxd > allowed_max_rxd) { |
894 | + printf("Fail: input rxd (%u) can't be greater " |
895 | + "than max_rxds (%u) of port %u\n", |
896 | + rxd, |
897 | + allowed_max_rxd, |
898 | + pid); |
899 | + return -1; |
900 | + } |
901 | + |
902 | + allowed_min_rxd = get_allowed_min_nb_rxd(&pid); |
903 | + if (rxd < allowed_min_rxd) { |
904 | + printf("Fail: input rxd (%u) can't be less " |
905 | + "than min_rxds (%u) of port %u\n", |
906 | + rxd, |
907 | + allowed_min_rxd, |
908 | + pid); |
909 | + return -1; |
910 | + } |
911 | + |
912 | + return 0; |
913 | +} |
914 | + |
915 | +/* |
916 | + * Get the allowed maximum number of TXDs of every rx queues. |
917 | + * *pid return the port id which has minimal value of |
918 | + * max_txd in every tx queue. |
919 | + */ |
920 | +static uint16_t |
921 | +get_allowed_max_nb_txd(portid_t *pid) |
922 | +{ |
923 | + uint16_t allowed_max_txd = UINT16_MAX; |
924 | + portid_t pi; |
925 | + struct rte_eth_dev_info dev_info; |
926 | + |
927 | + RTE_ETH_FOREACH_DEV(pi) { |
928 | + if (eth_dev_info_get_print_err(pi, &dev_info) != 0) |
929 | + continue; |
930 | + |
931 | + if (dev_info.tx_desc_lim.nb_max < allowed_max_txd) { |
932 | + allowed_max_txd = dev_info.tx_desc_lim.nb_max; |
933 | + *pid = pi; |
934 | + } |
935 | + } |
936 | + return allowed_max_txd; |
937 | +} |
938 | + |
939 | +/* |
940 | + * Get the allowed maximum number of TXDs of every tx queues. |
941 | + * *pid return the port id which has minimal value of |
942 | + * min_txd in every tx queue. |
943 | + */ |
944 | +static uint16_t |
945 | +get_allowed_min_nb_txd(portid_t *pid) |
946 | +{ |
947 | + uint16_t allowed_min_txd = 0; |
948 | + portid_t pi; |
949 | + struct rte_eth_dev_info dev_info; |
950 | + |
951 | + RTE_ETH_FOREACH_DEV(pi) { |
952 | + if (eth_dev_info_get_print_err(pi, &dev_info) != 0) |
953 | + continue; |
954 | + |
955 | + if (dev_info.tx_desc_lim.nb_min > allowed_min_txd) { |
956 | + allowed_min_txd = dev_info.tx_desc_lim.nb_min; |
957 | + *pid = pi; |
958 | + } |
959 | + } |
960 | + |
961 | + return allowed_min_txd; |
962 | +} |
963 | + |
964 | +/* |
965 | + * Check input txd is valid or not. |
966 | + * If input txd is not greater than any of maximum number |
967 | + * of TXDs of every Rx queues, it is valid. |
968 | + * if valid, return 0, else return -1 |
969 | + */ |
970 | +int |
971 | +check_nb_txd(queueid_t txd) |
972 | +{ |
973 | + uint16_t allowed_max_txd; |
974 | + uint16_t allowed_min_txd; |
975 | + portid_t pid = 0; |
976 | + |
977 | + allowed_max_txd = get_allowed_max_nb_txd(&pid); |
978 | + if (txd > allowed_max_txd) { |
979 | + printf("Fail: input txd (%u) can't be greater " |
980 | + "than max_txds (%u) of port %u\n", |
981 | + txd, |
982 | + allowed_max_txd, |
983 | + pid); |
984 | + return -1; |
985 | + } |
986 | + |
987 | + allowed_min_txd = get_allowed_min_nb_txd(&pid); |
988 | + if (txd < allowed_min_txd) { |
989 | + printf("Fail: input txd (%u) can't be less " |
990 | + "than min_txds (%u) of port %u\n", |
991 | + txd, |
992 | + allowed_min_txd, |
993 | + pid); |
994 | + return -1; |
995 | + } |
996 | + return 0; |
997 | +} |
998 | + |
999 | + |
1000 | +/* |
1001 | * Get the allowed maximum number of hairpin queues. |
1002 | * *pid return the port id which has minimal value of |
1003 | * max_hairpin_queues in all ports. |
1004 | @@ -1430,9 +1601,9 @@ init_fwd_streams(void) |
1005 | static void |
1006 | pkt_burst_stats_display(const char *rx_tx, struct pkt_burst_stats *pbs) |
1007 | { |
1008 | - unsigned int total_burst; |
1009 | - unsigned int nb_burst; |
1010 | - unsigned int burst_stats[3]; |
1011 | + uint64_t total_burst; |
1012 | + uint64_t nb_burst; |
1013 | + uint64_t burst_stats[3]; |
1014 | uint16_t pktnb_stats[3]; |
1015 | uint16_t nb_pkt; |
1016 | int burst_percent[3]; |
1017 | @@ -1461,8 +1632,8 @@ pkt_burst_stats_display(const char *rx_tx, struct pkt_burst_stats *pbs) |
1018 | } |
1019 | if (total_burst == 0) |
1020 | return; |
1021 | - burst_percent[0] = (burst_stats[0] * 100) / total_burst; |
1022 | - printf(" %s-bursts : %u [%d%% of %d pkts", rx_tx, total_burst, |
1023 | + burst_percent[0] = (double)burst_stats[0] / total_burst * 100; |
1024 | + printf(" %s-bursts : %"PRIu64" [%d%% of %d pkts", rx_tx, total_burst, |
1025 | burst_percent[0], (int) pktnb_stats[0]); |
1026 | if (burst_stats[0] == total_burst) { |
1027 | printf("]\n"); |
1028 | @@ -1473,7 +1644,7 @@ pkt_burst_stats_display(const char *rx_tx, struct pkt_burst_stats *pbs) |
1029 | 100 - burst_percent[0], pktnb_stats[1]); |
1030 | return; |
1031 | } |
1032 | - burst_percent[1] = (burst_stats[1] * 100) / total_burst; |
1033 | + burst_percent[1] = (double)burst_stats[1] / total_burst * 100; |
1034 | burst_percent[2] = 100 - (burst_percent[0] + burst_percent[1]); |
1035 | if ((burst_percent[1] == 0) || (burst_percent[2] == 0)) { |
1036 | printf(" + %d%% of others]\n", 100 - burst_percent[0]); |
1037 | @@ -1698,11 +1869,22 @@ fwd_stats_display(void) |
1038 | "%s\n", |
1039 | acc_stats_border, acc_stats_border); |
1040 | #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES |
1041 | - if (total_recv > 0) |
1042 | - printf("\n CPU cycles/packet=%u (total cycles=" |
1043 | - "%"PRIu64" / total RX packets=%"PRIu64")\n", |
1044 | - (unsigned int)(fwd_cycles / total_recv), |
1045 | - fwd_cycles, total_recv); |
1046 | +#define CYC_PER_MHZ 1E6 |
1047 | + if (total_recv > 0 || total_xmit > 0) { |
1048 | + uint64_t total_pkts = 0; |
1049 | + if (strcmp(cur_fwd_eng->fwd_mode_name, "txonly") == 0 || |
1050 | + strcmp(cur_fwd_eng->fwd_mode_name, "flowgen") == 0) |
1051 | + total_pkts = total_xmit; |
1052 | + else |
1053 | + total_pkts = total_recv; |
1054 | + |
1055 | + printf("\n CPU cycles/packet=%.2F (total cycles=" |
1056 | + "%"PRIu64" / total %s packets=%"PRIu64") at %"PRIu64 |
1057 | + " MHz Clock\n", |
1058 | + (double) fwd_cycles / total_pkts, |
1059 | + fwd_cycles, cur_fwd_eng->fwd_mode_name, total_pkts, |
1060 | + (uint64_t)(rte_get_tsc_hz() / CYC_PER_MHZ)); |
1061 | + } |
1062 | #endif |
1063 | } |
1064 | |
1065 | diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h |
1066 | index 0694e1e..2b1e9a2 100644 |
1067 | --- a/app/test-pmd/testpmd.h |
1068 | +++ b/app/test-pmd/testpmd.h |
1069 | @@ -859,6 +859,8 @@ queueid_t get_allowed_max_nb_rxq(portid_t *pid); |
1070 | int check_nb_rxq(queueid_t rxq); |
1071 | queueid_t get_allowed_max_nb_txq(portid_t *pid); |
1072 | int check_nb_txq(queueid_t txq); |
1073 | +int check_nb_rxd(queueid_t rxd); |
1074 | +int check_nb_txd(queueid_t txd); |
1075 | queueid_t get_allowed_max_nb_hairpinq(portid_t *pid); |
1076 | int check_nb_hairpinq(queueid_t hairpinq); |
1077 | |
1078 | diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c |
1079 | index 8ed436d..a1822c6 100644 |
1080 | --- a/app/test-pmd/txonly.c |
1081 | +++ b/app/test-pmd/txonly.c |
1082 | @@ -147,6 +147,34 @@ setup_pkt_udp_ip_headers(struct rte_ipv4_hdr *ip_hdr, |
1083 | ip_hdr->hdr_checksum = (uint16_t) ip_cksum; |
1084 | } |
1085 | |
1086 | +static inline void |
1087 | +update_pkt_header(struct rte_mbuf *pkt, uint32_t total_pkt_len) |
1088 | +{ |
1089 | + struct rte_ipv4_hdr *ip_hdr; |
1090 | + struct rte_udp_hdr *udp_hdr; |
1091 | + uint16_t pkt_data_len; |
1092 | + uint16_t pkt_len; |
1093 | + |
1094 | + pkt_data_len = (uint16_t) (total_pkt_len - ( |
1095 | + sizeof(struct rte_ether_hdr) + |
1096 | + sizeof(struct rte_ipv4_hdr) + |
1097 | + sizeof(struct rte_udp_hdr))); |
1098 | + /* updata udp pkt length */ |
1099 | + udp_hdr = rte_pktmbuf_mtod_offset(pkt, struct rte_udp_hdr *, |
1100 | + sizeof(struct rte_ether_hdr) + |
1101 | + sizeof(struct rte_ipv4_hdr)); |
1102 | + pkt_len = (uint16_t) (pkt_data_len + sizeof(struct rte_udp_hdr)); |
1103 | + udp_hdr->dgram_len = RTE_CPU_TO_BE_16(pkt_len); |
1104 | + |
1105 | + /* updata ip pkt length and csum */ |
1106 | + ip_hdr = rte_pktmbuf_mtod_offset(pkt, struct rte_ipv4_hdr *, |
1107 | + sizeof(struct rte_ether_hdr)); |
1108 | + ip_hdr->hdr_checksum = 0; |
1109 | + pkt_len = (uint16_t) (pkt_len + sizeof(struct rte_ipv4_hdr)); |
1110 | + ip_hdr->total_length = RTE_CPU_TO_BE_16(pkt_len); |
1111 | + ip_hdr->hdr_checksum = rte_ipv4_cksum(ip_hdr); |
1112 | +} |
1113 | + |
1114 | static inline bool |
1115 | pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp, |
1116 | struct rte_ether_hdr *eth_hdr, const uint16_t vlan_tci, |
1117 | @@ -212,6 +240,10 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp, |
1118 | copy_buf_to_pkt(&pkt_udp_hdr, sizeof(pkt_udp_hdr), pkt, |
1119 | sizeof(struct rte_ether_hdr) + |
1120 | sizeof(struct rte_ipv4_hdr)); |
1121 | + |
1122 | + if (unlikely(tx_pkt_split == TX_PKT_SPLIT_RND) || txonly_multi_flow) |
1123 | + update_pkt_header(pkt, pkt_len); |
1124 | + |
1125 | /* |
1126 | * Complete first mbuf of packet and append it to the |
1127 | * burst of packets to be transmitted. |
1128 | diff --git a/app/test-sad/main.c b/app/test-sad/main.c |
1129 | index b01e84c..8380fad 100644 |
1130 | --- a/app/test-sad/main.c |
1131 | +++ b/app/test-sad/main.c |
1132 | @@ -617,7 +617,7 @@ main(int argc, char **argv) |
1133 | { |
1134 | int ret; |
1135 | struct rte_ipsec_sad *sad; |
1136 | - struct rte_ipsec_sad_conf conf; |
1137 | + struct rte_ipsec_sad_conf conf = {0}; |
1138 | unsigned int lcore_id; |
1139 | |
1140 | ret = rte_eal_init(argc, argv); |
1141 | diff --git a/app/test/Makefile b/app/test/Makefile |
1142 | index 1ee1550..30eff33 100644 |
1143 | --- a/app/test/Makefile |
1144 | +++ b/app/test/Makefile |
1145 | @@ -122,7 +122,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_perf.c |
1146 | SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_functions.c |
1147 | SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_multiwriter.c |
1148 | SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_readwrite.c |
1149 | -SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_readwrite_lf.c |
1150 | +SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_readwrite_lf_perf.c |
1151 | |
1152 | SRCS-$(CONFIG_RTE_LIBRTE_RIB) += test_rib.c |
1153 | SRCS-$(CONFIG_RTE_LIBRTE_RIB) += test_rib6.c |
1154 | diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py |
1155 | index 6deb97b..ca29b09 100644 |
1156 | --- a/app/test/autotest_data.py |
1157 | +++ b/app/test/autotest_data.py |
1158 | @@ -670,8 +670,8 @@ non_parallel_test_list = [ |
1159 | "Report": None, |
1160 | }, |
1161 | { |
1162 | - "Name": "Hash read-write lock-free concurrency autotest", |
1163 | - "Command": "hash_readwrite_lf_autotest", |
1164 | + "Name": "Hash read-write lock-free concurrency perf autotest", |
1165 | + "Command": "hash_readwrite_lf_perf_autotest", |
1166 | "Func": default_autotest, |
1167 | "Report": None, |
1168 | }, |
1169 | diff --git a/app/test/meson.build b/app/test/meson.build |
1170 | index 8524a98..1fa9124 100644 |
1171 | --- a/app/test/meson.build |
1172 | +++ b/app/test/meson.build |
1173 | @@ -56,7 +56,7 @@ test_sources = files('commands.c', |
1174 | 'test_hash_multiwriter.c', |
1175 | 'test_hash_readwrite.c', |
1176 | 'test_hash_perf.c', |
1177 | - 'test_hash_readwrite_lf.c', |
1178 | + 'test_hash_readwrite_lf_perf.c', |
1179 | 'test_interrupts.c', |
1180 | 'test_ipsec.c', |
1181 | 'test_ipsec_sad.c', |
1182 | @@ -154,88 +154,89 @@ test_deps = ['acl', |
1183 | 'timer' |
1184 | ] |
1185 | |
1186 | -fast_test_names = [ |
1187 | - 'acl_autotest', |
1188 | - 'alarm_autotest', |
1189 | - 'atomic_autotest', |
1190 | - 'byteorder_autotest', |
1191 | - 'cmdline_autotest', |
1192 | - 'common_autotest', |
1193 | - 'cpuflags_autotest', |
1194 | - 'cycles_autotest', |
1195 | - 'debug_autotest', |
1196 | - 'eal_flags_c_opt_autotest', |
1197 | - 'eal_flags_master_opt_autotest', |
1198 | - 'eal_flags_n_opt_autotest', |
1199 | - 'eal_flags_hpet_autotest', |
1200 | - 'eal_flags_no_huge_autotest', |
1201 | - 'eal_flags_w_opt_autotest', |
1202 | - 'eal_flags_b_opt_autotest', |
1203 | - 'eal_flags_vdev_opt_autotest', |
1204 | - 'eal_flags_r_opt_autotest', |
1205 | - 'eal_flags_mem_autotest', |
1206 | - 'eal_flags_file_prefix_autotest', |
1207 | - 'eal_flags_misc_autotest', |
1208 | - 'eal_fs_autotest', |
1209 | - 'errno_autotest', |
1210 | - 'event_ring_autotest', |
1211 | - 'fib_autotest', |
1212 | - 'fib6_autotest', |
1213 | - 'func_reentrancy_autotest', |
1214 | - 'flow_classify_autotest', |
1215 | - 'hash_autotest', |
1216 | - 'interrupt_autotest', |
1217 | - 'logs_autotest', |
1218 | - 'lpm_autotest', |
1219 | - 'lpm6_autotest', |
1220 | - 'malloc_autotest', |
1221 | - 'mbuf_autotest', |
1222 | - 'mcslock_autotest', |
1223 | - 'memcpy_autotest', |
1224 | - 'memory_autotest', |
1225 | - 'mempool_autotest', |
1226 | - 'memzone_autotest', |
1227 | - 'meter_autotest', |
1228 | - 'multiprocess_autotest', |
1229 | - 'per_lcore_autotest', |
1230 | - 'prefetch_autotest', |
1231 | - 'rcu_qsbr_autotest', |
1232 | - 'red_autotest', |
1233 | - 'rib_autotest', |
1234 | - 'rib6_autotest', |
1235 | - 'ring_autotest', |
1236 | - 'rwlock_test1_autotest', |
1237 | - 'rwlock_rda_autotest', |
1238 | - 'rwlock_rds_wrm_autotest', |
1239 | - 'rwlock_rde_wro_autotest', |
1240 | - 'sched_autotest', |
1241 | - 'spinlock_autotest', |
1242 | - 'stack_autotest', |
1243 | - 'stack_lf_autotest', |
1244 | - 'string_autotest', |
1245 | - 'table_autotest', |
1246 | - 'tailq_autotest', |
1247 | - 'timer_autotest', |
1248 | - 'user_delay_us', |
1249 | - 'version_autotest', |
1250 | - 'crc_autotest', |
1251 | - 'delay_us_sleep_autotest', |
1252 | - 'distributor_autotest', |
1253 | - 'eventdev_common_autotest', |
1254 | - 'fbarray_autotest', |
1255 | - 'hash_readwrite_autotest', |
1256 | - 'hash_readwrite_lf_autotest', |
1257 | - 'ipsec_autotest', |
1258 | - 'kni_autotest', |
1259 | - 'kvargs_autotest', |
1260 | - 'member_autotest', |
1261 | - 'metrics_autotest', |
1262 | - 'power_cpufreq_autotest', |
1263 | - 'power_autotest', |
1264 | - 'power_kvm_vm_autotest', |
1265 | - 'reorder_autotest', |
1266 | - 'service_autotest', |
1267 | - 'thash_autotest', |
1268 | +# Each test is marked with flag true/false |
1269 | +# to indicate whether it can run in no-huge mode. |
1270 | +fast_tests = [ |
1271 | + ['acl_autotest', true], |
1272 | + ['alarm_autotest', false], |
1273 | + ['atomic_autotest', false], |
1274 | + ['byteorder_autotest', true], |
1275 | + ['cmdline_autotest', true], |
1276 | + ['common_autotest', true], |
1277 | + ['cpuflags_autotest', true], |
1278 | + ['cycles_autotest', true], |
1279 | + ['debug_autotest', true], |
1280 | + ['eal_flags_c_opt_autotest', false], |
1281 | + ['eal_flags_master_opt_autotest', false], |
1282 | + ['eal_flags_n_opt_autotest', false], |
1283 | + ['eal_flags_hpet_autotest', false], |
1284 | + ['eal_flags_no_huge_autotest', false], |
1285 | + ['eal_flags_w_opt_autotest', false], |
1286 | + ['eal_flags_b_opt_autotest', false], |
1287 | + ['eal_flags_vdev_opt_autotest', false], |
1288 | + ['eal_flags_r_opt_autotest', false], |
1289 | + ['eal_flags_mem_autotest', false], |
1290 | + ['eal_flags_file_prefix_autotest', false], |
1291 | + ['eal_flags_misc_autotest', false], |
1292 | + ['eal_fs_autotest', true], |
1293 | + ['errno_autotest', true], |
1294 | + ['event_ring_autotest', true], |
1295 | + ['fib_autotest', true], |
1296 | + ['fib6_autotest', true], |
1297 | + ['func_reentrancy_autotest', false], |
1298 | + ['flow_classify_autotest', false], |
1299 | + ['hash_autotest', true], |
1300 | + ['interrupt_autotest', true], |
1301 | + ['logs_autotest', true], |
1302 | + ['lpm_autotest', true], |
1303 | + ['lpm6_autotest', true], |
1304 | + ['malloc_autotest', false], |
1305 | + ['mbuf_autotest', false], |
1306 | + ['mcslock_autotest', false], |
1307 | + ['memcpy_autotest', true], |
1308 | + ['memory_autotest', false], |
1309 | + ['mempool_autotest', false], |
1310 | + ['memzone_autotest', false], |
1311 | + ['meter_autotest', true], |
1312 | + ['multiprocess_autotest', false], |
1313 | + ['per_lcore_autotest', true], |
1314 | + ['prefetch_autotest', true], |
1315 | + ['rcu_qsbr_autotest', true], |
1316 | + ['red_autotest', true], |
1317 | + ['rib_autotest', true], |
1318 | + ['rib6_autotest', true], |
1319 | + ['ring_autotest', true], |
1320 | + ['rwlock_test1_autotest', true], |
1321 | + ['rwlock_rda_autotest', true], |
1322 | + ['rwlock_rds_wrm_autotest', true], |
1323 | + ['rwlock_rde_wro_autotest', true], |
1324 | + ['sched_autotest', true], |
1325 | + ['spinlock_autotest', true], |
1326 | + ['stack_autotest', false], |
1327 | + ['stack_lf_autotest', false], |
1328 | + ['string_autotest', true], |
1329 | + ['table_autotest', true], |
1330 | + ['tailq_autotest', true], |
1331 | + ['timer_autotest', false], |
1332 | + ['user_delay_us', true], |
1333 | + ['version_autotest', true], |
1334 | + ['crc_autotest', true], |
1335 | + ['delay_us_sleep_autotest', true], |
1336 | + ['distributor_autotest', false], |
1337 | + ['eventdev_common_autotest', true], |
1338 | + ['fbarray_autotest', true], |
1339 | + ['hash_readwrite_autotest', false], |
1340 | + ['ipsec_autotest', true], |
1341 | + ['kni_autotest', false], |
1342 | + ['kvargs_autotest', true], |
1343 | + ['member_autotest', true], |
1344 | + ['metrics_autotest', true], |
1345 | + ['power_cpufreq_autotest', false], |
1346 | + ['power_autotest', true], |
1347 | + ['power_kvm_vm_autotest', false], |
1348 | + ['reorder_autotest', true], |
1349 | + ['service_autotest', true], |
1350 | + ['thash_autotest', true], |
1351 | ] |
1352 | |
1353 | perf_test_names = [ |
1354 | @@ -269,6 +270,7 @@ perf_test_names = [ |
1355 | 'stack_perf_autotest', |
1356 | 'stack_lf_perf_autotest', |
1357 | 'rand_perf_autotest', |
1358 | + 'hash_readwrite_lf_perf_autotest', |
1359 | ] |
1360 | |
1361 | driver_test_names = [ |
1362 | @@ -322,6 +324,10 @@ endif |
1363 | # they are used via a driver-specific API. |
1364 | if dpdk_conf.has('RTE_LIBRTE_BOND_PMD') |
1365 | test_deps += 'pmd_bond' |
1366 | + if dpdk_conf.has('RTE_LIBRTE_RING_PMD') |
1367 | + test_sources += 'test_link_bonding_mode4.c' |
1368 | + driver_test_names += 'link_bonding_mode4_autotest' |
1369 | + endif |
1370 | endif |
1371 | if dpdk_conf.has('RTE_LIBRTE_RING_PMD') |
1372 | test_deps += 'pmd_ring' |
1373 | @@ -330,16 +336,14 @@ if dpdk_conf.has('RTE_LIBRTE_RING_PMD') |
1374 | test_sources += 'test_event_eth_tx_adapter.c' |
1375 | test_sources += 'test_bitratestats.c' |
1376 | test_sources += 'test_latencystats.c' |
1377 | - test_sources += 'test_link_bonding_mode4.c' |
1378 | test_sources += 'sample_packet_forward.c' |
1379 | test_sources += 'test_pdump.c' |
1380 | - fast_test_names += 'ring_pmd_autotest' |
1381 | + fast_tests += [['ring_pmd_autotest', true]] |
1382 | perf_test_names += 'ring_pmd_perf_autotest' |
1383 | - fast_test_names += 'event_eth_tx_adapter_autotest' |
1384 | - fast_test_names += 'bitratestats_autotest' |
1385 | - fast_test_names += 'latencystats_autotest' |
1386 | - driver_test_names += 'link_bonding_mode4_autotest' |
1387 | - fast_test_names += 'pdump_autotest' |
1388 | + fast_tests += [['event_eth_tx_adapter_autotest', false]] |
1389 | + fast_tests += [['bitratestats_autotest', true]] |
1390 | + fast_tests += [['latencystats_autotest', true]] |
1391 | + fast_tests += [['pdump_autotest', true]] |
1392 | endif |
1393 | |
1394 | if dpdk_conf.has('RTE_LIBRTE_POWER') |
1395 | @@ -360,6 +364,9 @@ endif |
1396 | # specify -D_GNU_SOURCE unconditionally |
1397 | cflags += '-D_GNU_SOURCE' |
1398 | |
1399 | +# Enable using internal APIs in unit tests |
1400 | +cflags += ['-DALLOW_INTERNAL_API'] |
1401 | + |
1402 | test_dep_objs = [] |
1403 | if dpdk_conf.has('RTE_LIBRTE_COMPRESSDEV') |
1404 | compress_test_dep = dependency('zlib', required: false) |
1405 | @@ -367,12 +374,13 @@ if dpdk_conf.has('RTE_LIBRTE_COMPRESSDEV') |
1406 | test_dep_objs += compress_test_dep |
1407 | test_sources += 'test_compressdev.c' |
1408 | test_deps += 'compressdev' |
1409 | - fast_test_names += 'compressdev_autotest' |
1410 | + fast_tests += [['compressdev_autotest', false]] |
1411 | endif |
1412 | endif |
1413 | |
1414 | if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER') |
1415 | driver_test_names += 'cryptodev_scheduler_autotest' |
1416 | + test_deps += 'pmd_crypto_scheduler' |
1417 | endif |
1418 | |
1419 | foreach d:test_deps |
1420 | @@ -383,7 +391,7 @@ test_dep_objs += cc.find_library('execinfo', required: false) |
1421 | |
1422 | link_libs = [] |
1423 | if get_option('default_library') == 'static' |
1424 | - link_libs = dpdk_drivers |
1425 | + link_libs = dpdk_static_libraries + dpdk_drivers |
1426 | endif |
1427 | |
1428 | dpdk_test = executable('dpdk-test', |
1429 | @@ -391,9 +399,21 @@ dpdk_test = executable('dpdk-test', |
1430 | link_whole: link_libs, |
1431 | dependencies: test_dep_objs, |
1432 | c_args: [cflags, '-DALLOW_EXPERIMENTAL_API'], |
1433 | - install_rpath: driver_install_path, |
1434 | + install_rpath: join_paths(get_option('prefix'), |
1435 | + driver_install_path), |
1436 | install: true) |
1437 | |
1438 | +has_hugepage = true |
1439 | +if is_linux |
1440 | + check_hugepage = run_command('cat', |
1441 | + '/proc/sys/vm/nr_hugepages') |
1442 | + if (check_hugepage.returncode() != 0 or |
1443 | + check_hugepage.stdout().strip() == '0') |
1444 | + has_hugepage = false |
1445 | + endif |
1446 | +endif |
1447 | +message('hugepage availability: @0@'.format(has_hugepage)) |
1448 | + |
1449 | # some perf tests (eg: memcpy perf autotest)take very long |
1450 | # to complete, so timeout to 10 minutes |
1451 | timeout_seconds = 600 |
1452 | @@ -404,25 +424,35 @@ num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip() |
1453 | |
1454 | default_test_args = [num_cores_arg] |
1455 | |
1456 | -foreach arg : fast_test_names |
1457 | +foreach arg : fast_tests |
1458 | test_args = default_test_args |
1459 | + run_test = true |
1460 | + if not has_hugepage |
1461 | + if arg[1] |
1462 | + test_args += ['--no-huge', '-m', '2048'] |
1463 | + else |
1464 | + run_test = false |
1465 | + endif |
1466 | + endif |
1467 | |
1468 | if (get_option('default_library') == 'shared' and |
1469 | - arg == 'event_eth_tx_adapter_autotest') |
1470 | + arg[0] == 'event_eth_tx_adapter_autotest') |
1471 | foreach drv:dpdk_drivers |
1472 | test_args += ['-d', drv.full_path().split('.a')[0] + '.so'] |
1473 | endforeach |
1474 | endif |
1475 | if is_linux |
1476 | - test_args += ['--file-prefix=@0@'.format(arg)] |
1477 | + test_args += ['--file-prefix=@0@'.format(arg[0])] |
1478 | endif |
1479 | |
1480 | - test(arg, dpdk_test, |
1481 | - env : ['DPDK_TEST=' + arg], |
1482 | - args : test_args, |
1483 | - timeout : timeout_seconds_fast, |
1484 | - is_parallel : false, |
1485 | - suite : 'fast-tests') |
1486 | + if run_test |
1487 | + test(arg[0], dpdk_test, |
1488 | + env : ['DPDK_TEST=' + arg[0]], |
1489 | + args : test_args, |
1490 | + timeout : timeout_seconds_fast, |
1491 | + is_parallel : false, |
1492 | + suite : 'fast-tests') |
1493 | + endif |
1494 | endforeach |
1495 | |
1496 | foreach arg : perf_test_names |
1497 | diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c |
1498 | index ee53468..4a61a7d 100644 |
1499 | --- a/app/test/test_bpf.c |
1500 | +++ b/app/test/test_bpf.c |
1501 | @@ -1797,13 +1797,6 @@ test_call1_check(uint64_t rc, const void *arg) |
1502 | dummy_func1(arg, &v32, &v64); |
1503 | v64 += v32; |
1504 | |
1505 | - if (v64 != rc) { |
1506 | - printf("%s@%d: invalid return value " |
1507 | - "expected=0x%" PRIx64 ", actual=0x%" PRIx64 "\n", |
1508 | - __func__, __LINE__, v64, rc); |
1509 | - return -1; |
1510 | - } |
1511 | - return 0; |
1512 | return cmp_res(__func__, v64, rc, dv, dv, sizeof(*dv)); |
1513 | } |
1514 | |
1515 | @@ -1934,13 +1927,7 @@ test_call2_check(uint64_t rc, const void *arg) |
1516 | dummy_func2(&a, &b); |
1517 | v = a.u64 + a.u32 + b.u16 + b.u8; |
1518 | |
1519 | - if (v != rc) { |
1520 | - printf("%s@%d: invalid return value " |
1521 | - "expected=0x%" PRIx64 ", actual=0x%" PRIx64 "\n", |
1522 | - __func__, __LINE__, v, rc); |
1523 | - return -1; |
1524 | - } |
1525 | - return 0; |
1526 | + return cmp_res(__func__, v, rc, arg, arg, 0); |
1527 | } |
1528 | |
1529 | static const struct rte_bpf_xsym test_call2_xsym[] = { |
1530 | @@ -2429,7 +2416,6 @@ test_call5_check(uint64_t rc, const void *arg) |
1531 | v = 0; |
1532 | |
1533 | fail: |
1534 | - |
1535 | return cmp_res(__func__, v, rc, &v, &rc, sizeof(v)); |
1536 | } |
1537 | |
1538 | @@ -2458,6 +2444,7 @@ static const struct rte_bpf_xsym test_call5_xsym[] = { |
1539 | }, |
1540 | }; |
1541 | |
1542 | +/* all bpf test cases */ |
1543 | static const struct bpf_test tests[] = { |
1544 | { |
1545 | .name = "test_store1", |
1546 | @@ -2738,7 +2725,6 @@ run_test(const struct bpf_test *tst) |
1547 | } |
1548 | |
1549 | tst->prepare(tbuf); |
1550 | - |
1551 | rc = rte_bpf_exec(bpf, tbuf); |
1552 | ret = tst->check_result(rc, tbuf); |
1553 | if (ret != 0) { |
1554 | @@ -2746,17 +2732,20 @@ run_test(const struct bpf_test *tst) |
1555 | __func__, __LINE__, tst->name, ret, strerror(ret)); |
1556 | } |
1557 | |
1558 | + /* repeat the same test with jit, when possible */ |
1559 | rte_bpf_get_jit(bpf, &jit); |
1560 | - if (jit.func == NULL) |
1561 | - return 0; |
1562 | - |
1563 | - tst->prepare(tbuf); |
1564 | - rc = jit.func(tbuf); |
1565 | - rv = tst->check_result(rc, tbuf); |
1566 | - ret |= rv; |
1567 | - if (rv != 0) { |
1568 | - printf("%s@%d: check_result(%s) failed, error: %d(%s);\n", |
1569 | - __func__, __LINE__, tst->name, rv, strerror(ret)); |
1570 | + if (jit.func != NULL) { |
1571 | + |
1572 | + tst->prepare(tbuf); |
1573 | + rc = jit.func(tbuf); |
1574 | + rv = tst->check_result(rc, tbuf); |
1575 | + ret |= rv; |
1576 | + if (rv != 0) { |
1577 | + printf("%s@%d: check_result(%s) failed, " |
1578 | + "error: %d(%s);\n", |
1579 | + __func__, __LINE__, tst->name, |
1580 | + rv, strerror(ret)); |
1581 | + } |
1582 | } |
1583 | |
1584 | rte_bpf_destroy(bpf); |
1585 | diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c |
1586 | index db9dd3a..a852040 100644 |
1587 | --- a/app/test/test_cryptodev.c |
1588 | +++ b/app/test/test_cryptodev.c |
1589 | @@ -643,7 +643,7 @@ test_device_configure_invalid_dev_id(void) |
1590 | "Need at least %d devices for test", 1); |
1591 | |
1592 | /* valid dev_id values */ |
1593 | - dev_id = ts_params->valid_devs[ts_params->valid_dev_count - 1]; |
1594 | + dev_id = ts_params->valid_devs[0]; |
1595 | |
1596 | /* Stop the device in case it's started so it can be configured */ |
1597 | rte_cryptodev_stop(dev_id); |
1598 | @@ -2701,13 +2701,15 @@ create_wireless_algo_cipher_auth_session(uint8_t dev_id, |
1599 | /* Create Crypto session*/ |
1600 | ut_params->sess = rte_cryptodev_sym_session_create( |
1601 | ts_params->session_mpool); |
1602 | + TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed"); |
1603 | |
1604 | status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess, |
1605 | &ut_params->cipher_xform, |
1606 | ts_params->session_priv_mpool); |
1607 | + if (status == -ENOTSUP) |
1608 | + return status; |
1609 | |
1610 | TEST_ASSERT_EQUAL(status, 0, "session init failed"); |
1611 | - TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed"); |
1612 | return 0; |
1613 | } |
1614 | |
1615 | @@ -2827,6 +2829,7 @@ create_wireless_algo_auth_cipher_session(uint8_t dev_id, |
1616 | /* Create Crypto session*/ |
1617 | ut_params->sess = rte_cryptodev_sym_session_create( |
1618 | ts_params->session_mpool); |
1619 | + TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed"); |
1620 | |
1621 | if (cipher_op == RTE_CRYPTO_CIPHER_OP_DECRYPT) { |
1622 | ut_params->auth_xform.next = NULL; |
1623 | @@ -2840,8 +2843,10 @@ create_wireless_algo_auth_cipher_session(uint8_t dev_id, |
1624 | &ut_params->auth_xform, |
1625 | ts_params->session_priv_mpool); |
1626 | |
1627 | + if (status == -ENOTSUP) |
1628 | + return status; |
1629 | + |
1630 | TEST_ASSERT_EQUAL(status, 0, "session init failed"); |
1631 | - TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed"); |
1632 | |
1633 | return 0; |
1634 | } |
1635 | @@ -2985,6 +2990,11 @@ create_wireless_algo_cipher_hash_operation(const uint8_t *auth_tag, |
1636 | struct crypto_testsuite_params *ts_params = &testsuite_params; |
1637 | struct crypto_unittest_params *ut_params = &unittest_params; |
1638 | |
1639 | + enum rte_crypto_cipher_algorithm cipher_algo = |
1640 | + ut_params->cipher_xform.cipher.algo; |
1641 | + enum rte_crypto_auth_algorithm auth_algo = |
1642 | + ut_params->auth_xform.auth.algo; |
1643 | + |
1644 | /* Generate Crypto op data structure */ |
1645 | ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool, |
1646 | RTE_CRYPTO_OP_TYPE_SYMMETRIC); |
1647 | @@ -3005,8 +3015,22 @@ create_wireless_algo_cipher_hash_operation(const uint8_t *auth_tag, |
1648 | TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data, |
1649 | "no room to append auth tag"); |
1650 | ut_params->digest = sym_op->auth.digest.data; |
1651 | - sym_op->auth.digest.phys_addr = rte_pktmbuf_iova_offset( |
1652 | - ut_params->ibuf, data_pad_len); |
1653 | + |
1654 | + if (rte_pktmbuf_is_contiguous(ut_params->ibuf)) { |
1655 | + sym_op->auth.digest.phys_addr = rte_pktmbuf_iova_offset( |
1656 | + ut_params->ibuf, data_pad_len); |
1657 | + } else { |
1658 | + struct rte_mbuf *m = ut_params->ibuf; |
1659 | + unsigned int offset = data_pad_len; |
1660 | + |
1661 | + while (offset > m->data_len && m->next != NULL) { |
1662 | + offset -= m->data_len; |
1663 | + m = m->next; |
1664 | + } |
1665 | + sym_op->auth.digest.phys_addr = rte_pktmbuf_iova_offset( |
1666 | + m, offset); |
1667 | + } |
1668 | + |
1669 | if (op == RTE_CRYPTO_AUTH_OP_GENERATE) |
1670 | memset(sym_op->auth.digest.data, 0, auth_tag_len); |
1671 | else |
1672 | @@ -3023,10 +3047,25 @@ create_wireless_algo_cipher_hash_operation(const uint8_t *auth_tag, |
1673 | iv_ptr += cipher_iv_len; |
1674 | rte_memcpy(iv_ptr, auth_iv, auth_iv_len); |
1675 | |
1676 | - sym_op->cipher.data.length = cipher_len; |
1677 | - sym_op->cipher.data.offset = cipher_offset; |
1678 | - sym_op->auth.data.length = auth_len; |
1679 | - sym_op->auth.data.offset = auth_offset; |
1680 | + if (cipher_algo == RTE_CRYPTO_CIPHER_SNOW3G_UEA2 || |
1681 | + cipher_algo == RTE_CRYPTO_CIPHER_KASUMI_F8 || |
1682 | + cipher_algo == RTE_CRYPTO_CIPHER_ZUC_EEA3) { |
1683 | + sym_op->cipher.data.length = cipher_len; |
1684 | + sym_op->cipher.data.offset = cipher_offset; |
1685 | + } else { |
1686 | + sym_op->cipher.data.length = cipher_len >> 3; |
1687 | + sym_op->cipher.data.offset = cipher_offset >> 3; |
1688 | + } |
1689 | + |
1690 | + if (auth_algo == RTE_CRYPTO_AUTH_SNOW3G_UIA2 || |
1691 | + auth_algo == RTE_CRYPTO_AUTH_KASUMI_F9 || |
1692 | + auth_algo == RTE_CRYPTO_AUTH_ZUC_EIA3) { |
1693 | + sym_op->auth.data.length = auth_len; |
1694 | + sym_op->auth.data.offset = auth_offset; |
1695 | + } else { |
1696 | + sym_op->auth.data.length = auth_len >> 3; |
1697 | + sym_op->auth.data.offset = auth_offset >> 3; |
1698 | + } |
1699 | |
1700 | return 0; |
1701 | } |
1702 | @@ -6595,8 +6634,9 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata, |
1703 | unsigned int ciphertext_len; |
1704 | |
1705 | struct rte_cryptodev_info dev_info; |
1706 | + struct rte_crypto_op *op; |
1707 | |
1708 | - /* Check if device supports particular algorithms */ |
1709 | + /* Check if device supports particular algorithms separately */ |
1710 | if (test_mixed_check_if_unsupported(tdata)) |
1711 | return -ENOTSUP; |
1712 | |
1713 | @@ -6612,18 +6652,26 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata, |
1714 | } |
1715 | |
1716 | /* Create the session */ |
1717 | - retval = create_wireless_algo_auth_cipher_session( |
1718 | - ts_params->valid_devs[0], |
1719 | - (verify ? RTE_CRYPTO_CIPHER_OP_DECRYPT |
1720 | - : RTE_CRYPTO_CIPHER_OP_ENCRYPT), |
1721 | - (verify ? RTE_CRYPTO_AUTH_OP_VERIFY |
1722 | - : RTE_CRYPTO_AUTH_OP_GENERATE), |
1723 | - tdata->auth_algo, |
1724 | - tdata->cipher_algo, |
1725 | - tdata->auth_key.data, tdata->auth_key.len, |
1726 | - tdata->auth_iv.len, tdata->digest_enc.len, |
1727 | - tdata->cipher_iv.len); |
1728 | - |
1729 | + if (verify) |
1730 | + retval = create_wireless_algo_cipher_auth_session( |
1731 | + ts_params->valid_devs[0], |
1732 | + RTE_CRYPTO_CIPHER_OP_DECRYPT, |
1733 | + RTE_CRYPTO_AUTH_OP_VERIFY, |
1734 | + tdata->auth_algo, |
1735 | + tdata->cipher_algo, |
1736 | + tdata->auth_key.data, tdata->auth_key.len, |
1737 | + tdata->auth_iv.len, tdata->digest_enc.len, |
1738 | + tdata->cipher_iv.len); |
1739 | + else |
1740 | + retval = create_wireless_algo_auth_cipher_session( |
1741 | + ts_params->valid_devs[0], |
1742 | + RTE_CRYPTO_CIPHER_OP_ENCRYPT, |
1743 | + RTE_CRYPTO_AUTH_OP_GENERATE, |
1744 | + tdata->auth_algo, |
1745 | + tdata->cipher_algo, |
1746 | + tdata->auth_key.data, tdata->auth_key.len, |
1747 | + tdata->auth_iv.len, tdata->digest_enc.len, |
1748 | + tdata->cipher_iv.len); |
1749 | if (retval < 0) |
1750 | return retval; |
1751 | |
1752 | @@ -6666,7 +6714,7 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata, |
1753 | tdata->cipher_iv.data, tdata->cipher_iv.len, |
1754 | tdata->auth_iv.data, tdata->auth_iv.len, |
1755 | (tdata->digest_enc.offset == 0 ? |
1756 | - (verify ? ciphertext_pad_len : plaintext_pad_len) |
1757 | + plaintext_pad_len |
1758 | : tdata->digest_enc.offset), |
1759 | tdata->validCipherLen.len_bits, |
1760 | tdata->cipher.offset_bits, |
1761 | @@ -6677,9 +6725,19 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata, |
1762 | if (retval < 0) |
1763 | return retval; |
1764 | |
1765 | - ut_params->op = process_crypto_request(ts_params->valid_devs[0], |
1766 | + op = process_crypto_request(ts_params->valid_devs[0], |
1767 | ut_params->op); |
1768 | |
1769 | + /* Check if the op failed because the device doesn't */ |
1770 | + /* support this particular combination of algorithms */ |
1771 | + if (op == NULL && ut_params->op->status == |
1772 | + RTE_CRYPTO_OP_STATUS_INVALID_SESSION) { |
1773 | + printf("Device doesn't support this mixed combination. " |
1774 | + "Test Skipped.\n"); |
1775 | + return -ENOTSUP; |
1776 | + } |
1777 | + ut_params->op = op; |
1778 | + |
1779 | TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf"); |
1780 | |
1781 | ut_params->obuf = (op_mode == IN_PLACE ? |
1782 | @@ -6694,12 +6752,10 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata, |
1783 | (tdata->cipher.offset_bits >> 3); |
1784 | |
1785 | debug_hexdump(stdout, "plaintext:", plaintext, |
1786 | - (tdata->plaintext.len_bits >> 3) - |
1787 | - tdata->digest_enc.len); |
1788 | + tdata->plaintext.len_bits >> 3); |
1789 | debug_hexdump(stdout, "plaintext expected:", |
1790 | tdata->plaintext.data, |
1791 | - (tdata->plaintext.len_bits >> 3) - |
1792 | - tdata->digest_enc.len); |
1793 | + tdata->plaintext.len_bits >> 3); |
1794 | } else { |
1795 | if (ut_params->obuf) |
1796 | ciphertext = rte_pktmbuf_mtod(ut_params->obuf, |
1797 | @@ -6744,6 +6800,10 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata, |
1798 | DIGEST_BYTE_LENGTH_SNOW3G_UIA2, |
1799 | "Generated auth tag not as expected"); |
1800 | } |
1801 | + |
1802 | + TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS, |
1803 | + "crypto op processing failed"); |
1804 | + |
1805 | return 0; |
1806 | } |
1807 | |
1808 | @@ -6767,6 +6827,7 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata, |
1809 | uint8_t digest_buffer[10000]; |
1810 | |
1811 | struct rte_cryptodev_info dev_info; |
1812 | + struct rte_crypto_op *op; |
1813 | |
1814 | /* Check if device supports particular algorithms */ |
1815 | if (test_mixed_check_if_unsupported(tdata)) |
1816 | @@ -6795,18 +6856,26 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata, |
1817 | } |
1818 | |
1819 | /* Create the session */ |
1820 | - retval = create_wireless_algo_auth_cipher_session( |
1821 | - ts_params->valid_devs[0], |
1822 | - (verify ? RTE_CRYPTO_CIPHER_OP_DECRYPT |
1823 | - : RTE_CRYPTO_CIPHER_OP_ENCRYPT), |
1824 | - (verify ? RTE_CRYPTO_AUTH_OP_VERIFY |
1825 | - : RTE_CRYPTO_AUTH_OP_GENERATE), |
1826 | - tdata->auth_algo, |
1827 | - tdata->cipher_algo, |
1828 | - tdata->auth_key.data, tdata->auth_key.len, |
1829 | - tdata->auth_iv.len, tdata->digest_enc.len, |
1830 | - tdata->cipher_iv.len); |
1831 | - |
1832 | + if (verify) |
1833 | + retval = create_wireless_algo_cipher_auth_session( |
1834 | + ts_params->valid_devs[0], |
1835 | + RTE_CRYPTO_CIPHER_OP_DECRYPT, |
1836 | + RTE_CRYPTO_AUTH_OP_VERIFY, |
1837 | + tdata->auth_algo, |
1838 | + tdata->cipher_algo, |
1839 | + tdata->auth_key.data, tdata->auth_key.len, |
1840 | + tdata->auth_iv.len, tdata->digest_enc.len, |
1841 | + tdata->cipher_iv.len); |
1842 | + else |
1843 | + retval = create_wireless_algo_auth_cipher_session( |
1844 | + ts_params->valid_devs[0], |
1845 | + RTE_CRYPTO_CIPHER_OP_ENCRYPT, |
1846 | + RTE_CRYPTO_AUTH_OP_GENERATE, |
1847 | + tdata->auth_algo, |
1848 | + tdata->cipher_algo, |
1849 | + tdata->auth_key.data, tdata->auth_key.len, |
1850 | + tdata->auth_iv.len, tdata->digest_enc.len, |
1851 | + tdata->cipher_iv.len); |
1852 | if (retval < 0) |
1853 | return retval; |
1854 | |
1855 | @@ -6816,7 +6885,7 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata, |
1856 | plaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 16); |
1857 | |
1858 | ut_params->ibuf = create_segmented_mbuf(ts_params->mbuf_pool, |
1859 | - plaintext_pad_len, 15, 0); |
1860 | + ciphertext_pad_len, 15, 0); |
1861 | TEST_ASSERT_NOT_NULL(ut_params->ibuf, |
1862 | "Failed to allocate input buffer in mempool"); |
1863 | |
1864 | @@ -6850,7 +6919,7 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata, |
1865 | tdata->cipher_iv.data, tdata->cipher_iv.len, |
1866 | tdata->auth_iv.data, tdata->auth_iv.len, |
1867 | (tdata->digest_enc.offset == 0 ? |
1868 | - (verify ? ciphertext_pad_len : plaintext_pad_len) |
1869 | + plaintext_pad_len |
1870 | : tdata->digest_enc.offset), |
1871 | tdata->validCipherLen.len_bits, |
1872 | tdata->cipher.offset_bits, |
1873 | @@ -6861,9 +6930,20 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata, |
1874 | if (retval < 0) |
1875 | return retval; |
1876 | |
1877 | - ut_params->op = process_crypto_request(ts_params->valid_devs[0], |
1878 | + op = process_crypto_request(ts_params->valid_devs[0], |
1879 | ut_params->op); |
1880 | |
1881 | + /* Check if the op failed because the device doesn't */ |
1882 | + /* support this particular combination of algorithms */ |
1883 | + if (op == NULL && ut_params->op->status == |
1884 | + RTE_CRYPTO_OP_STATUS_INVALID_SESSION) { |
1885 | + printf("Device doesn't support this mixed combination. " |
1886 | + "Test Skipped.\n"); |
1887 | + return -ENOTSUP; |
1888 | + } |
1889 | + |
1890 | + ut_params->op = op; |
1891 | + |
1892 | TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf"); |
1893 | |
1894 | ut_params->obuf = (op_mode == IN_PLACE ? |
1895 | @@ -6936,6 +7016,10 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata, |
1896 | tdata->digest_enc.len, |
1897 | "Generated auth tag not as expected"); |
1898 | } |
1899 | + |
1900 | + TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS, |
1901 | + "crypto op processing failed"); |
1902 | + |
1903 | return 0; |
1904 | } |
1905 | |
1906 | @@ -6997,6 +7081,176 @@ test_verify_aes_cmac_aes_ctr_digest_enc_test_case_1_oop_sgl(void) |
1907 | &auth_aes_cmac_cipher_aes_ctr_test_case_1, OUT_OF_PLACE, 1); |
1908 | } |
1909 | |
1910 | +/** MIXED AUTH + CIPHER */ |
1911 | + |
1912 | +static int |
1913 | +test_auth_zuc_cipher_snow_test_case_1(void) |
1914 | +{ |
1915 | + return test_mixed_auth_cipher( |
1916 | + &auth_zuc_cipher_snow_test_case_1, OUT_OF_PLACE, 0); |
1917 | +} |
1918 | + |
1919 | +static int |
1920 | +test_verify_auth_zuc_cipher_snow_test_case_1(void) |
1921 | +{ |
1922 | + return test_mixed_auth_cipher( |
1923 | + &auth_zuc_cipher_snow_test_case_1, OUT_OF_PLACE, 1); |
1924 | +} |
1925 | + |
1926 | +static int |
1927 | +test_auth_aes_cmac_cipher_snow_test_case_1(void) |
1928 | +{ |
1929 | + return test_mixed_auth_cipher( |
1930 | + &auth_aes_cmac_cipher_snow_test_case_1, OUT_OF_PLACE, 0); |
1931 | +} |
1932 | + |
1933 | +static int |
1934 | +test_verify_auth_aes_cmac_cipher_snow_test_case_1(void) |
1935 | +{ |
1936 | + return test_mixed_auth_cipher( |
1937 | + &auth_aes_cmac_cipher_snow_test_case_1, OUT_OF_PLACE, 1); |
1938 | +} |
1939 | + |
1940 | +static int |
1941 | +test_auth_zuc_cipher_aes_ctr_test_case_1(void) |
1942 | +{ |
1943 | + return test_mixed_auth_cipher( |
1944 | + &auth_zuc_cipher_aes_ctr_test_case_1, OUT_OF_PLACE, 0); |
1945 | +} |
1946 | + |
1947 | +static int |
1948 | +test_verify_auth_zuc_cipher_aes_ctr_test_case_1(void) |
1949 | +{ |
1950 | + return test_mixed_auth_cipher( |
1951 | + &auth_zuc_cipher_aes_ctr_test_case_1, OUT_OF_PLACE, 1); |
1952 | +} |
1953 | + |
1954 | +static int |
1955 | +test_auth_snow_cipher_aes_ctr_test_case_1(void) |
1956 | +{ |
1957 | + return test_mixed_auth_cipher( |
1958 | + &auth_snow_cipher_aes_ctr_test_case_1, OUT_OF_PLACE, 0); |
1959 | +} |
1960 | + |
1961 | +static int |
1962 | +test_verify_auth_snow_cipher_aes_ctr_test_case_1(void) |
1963 | +{ |
1964 | + return test_mixed_auth_cipher( |
1965 | + &auth_snow_cipher_aes_ctr_test_case_1, OUT_OF_PLACE, 1); |
1966 | +} |
1967 | + |
1968 | +static int |
1969 | +test_auth_snow_cipher_zuc_test_case_1(void) |
1970 | +{ |
1971 | + return test_mixed_auth_cipher( |
1972 | + &auth_snow_cipher_zuc_test_case_1, OUT_OF_PLACE, 0); |
1973 | +} |
1974 | + |
1975 | +static int |
1976 | +test_verify_auth_snow_cipher_zuc_test_case_1(void) |
1977 | +{ |
1978 | + return test_mixed_auth_cipher( |
1979 | + &auth_snow_cipher_zuc_test_case_1, OUT_OF_PLACE, 1); |
1980 | +} |
1981 | + |
1982 | +static int |
1983 | +test_auth_aes_cmac_cipher_zuc_test_case_1(void) |
1984 | +{ |
1985 | + return test_mixed_auth_cipher( |
1986 | + &auth_aes_cmac_cipher_zuc_test_case_1, OUT_OF_PLACE, 0); |
1987 | +} |
1988 | + |
1989 | +static int |
1990 | +test_verify_auth_aes_cmac_cipher_zuc_test_case_1(void) |
1991 | +{ |
1992 | + return test_mixed_auth_cipher( |
1993 | + &auth_aes_cmac_cipher_zuc_test_case_1, OUT_OF_PLACE, 1); |
1994 | +} |
1995 | + |
1996 | +static int |
1997 | +test_auth_null_cipher_snow_test_case_1(void) |
1998 | +{ |
1999 | + return test_mixed_auth_cipher( |
2000 | + &auth_null_cipher_snow_test_case_1, OUT_OF_PLACE, 0); |
2001 | +} |
2002 | + |
2003 | +static int |
2004 | +test_verify_auth_null_cipher_snow_test_case_1(void) |
2005 | +{ |
2006 | + return test_mixed_auth_cipher( |
2007 | + &auth_null_cipher_snow_test_case_1, OUT_OF_PLACE, 1); |
2008 | +} |
2009 | + |
2010 | +static int |
2011 | +test_auth_null_cipher_zuc_test_case_1(void) |
2012 | +{ |
2013 | + return test_mixed_auth_cipher( |
2014 | + &auth_null_cipher_zuc_test_case_1, OUT_OF_PLACE, 0); |
2015 | +} |
2016 | + |
2017 | +static int |
2018 | +test_verify_auth_null_cipher_zuc_test_case_1(void) |
2019 | +{ |
2020 | + return test_mixed_auth_cipher( |
2021 | + &auth_null_cipher_zuc_test_case_1, OUT_OF_PLACE, 1); |
2022 | +} |
2023 | + |
2024 | +static int |
2025 | +test_auth_snow_cipher_null_test_case_1(void) |
2026 | +{ |
2027 | + return test_mixed_auth_cipher( |
2028 | + &auth_snow_cipher_null_test_case_1, OUT_OF_PLACE, 0); |
2029 | +} |
2030 | + |
2031 | +static int |
2032 | +test_verify_auth_snow_cipher_null_test_case_1(void) |
2033 | +{ |
2034 | + return test_mixed_auth_cipher( |
2035 | + &auth_snow_cipher_null_test_case_1, OUT_OF_PLACE, 1); |
2036 | +} |
2037 | + |
2038 | +static int |
2039 | +test_auth_zuc_cipher_null_test_case_1(void) |
2040 | +{ |
2041 | + return test_mixed_auth_cipher( |
2042 | + &auth_zuc_cipher_null_test_case_1, OUT_OF_PLACE, 0); |
2043 | +} |
2044 | + |
2045 | +static int |
2046 | +test_verify_auth_zuc_cipher_null_test_case_1(void) |
2047 | +{ |
2048 | + return test_mixed_auth_cipher( |
2049 | + &auth_zuc_cipher_null_test_case_1, OUT_OF_PLACE, 1); |
2050 | +} |
2051 | + |
2052 | +static int |
2053 | +test_auth_null_cipher_aes_ctr_test_case_1(void) |
2054 | +{ |
2055 | + return test_mixed_auth_cipher( |
2056 | + &auth_null_cipher_aes_ctr_test_case_1, OUT_OF_PLACE, 0); |
2057 | +} |
2058 | + |
2059 | +static int |
2060 | +test_verify_auth_null_cipher_aes_ctr_test_case_1(void) |
2061 | +{ |
2062 | + return test_mixed_auth_cipher( |
2063 | + &auth_null_cipher_aes_ctr_test_case_1, OUT_OF_PLACE, 1); |
2064 | +} |
2065 | + |
2066 | +static int |
2067 | +test_auth_aes_cmac_cipher_null_test_case_1(void) |
2068 | +{ |
2069 | + return test_mixed_auth_cipher( |
2070 | + &auth_aes_cmac_cipher_null_test_case_1, OUT_OF_PLACE, 0); |
2071 | +} |
2072 | + |
2073 | +static int |
2074 | +test_verify_auth_aes_cmac_cipher_null_test_case_1(void) |
2075 | +{ |
2076 | + return test_mixed_auth_cipher( |
2077 | + &auth_aes_cmac_cipher_null_test_case_1, OUT_OF_PLACE, 1); |
2078 | +} |
2079 | + |
2080 | static int |
2081 | test_3DES_chain_qat_all(void) |
2082 | { |
2083 | @@ -9171,9 +9425,7 @@ test_stats(void) |
2084 | "rte_cryptodev_stats_get invalid Param failed"); |
2085 | |
2086 | /* Test expected values */ |
2087 | - ut_setup(); |
2088 | test_AES_CBC_HMAC_SHA1_encrypt_digest(); |
2089 | - ut_teardown(); |
2090 | TEST_ASSERT_SUCCESS(rte_cryptodev_stats_get(ts_params->valid_devs[0], |
2091 | &stats), |
2092 | "rte_cryptodev_stats_get failed"); |
2093 | @@ -10464,7 +10716,7 @@ aes128cbc_hmac_sha1_test_vector = { |
2094 | static const struct test_crypto_vector |
2095 | aes128cbc_hmac_sha1_aad_test_vector = { |
2096 | .crypto_algo = RTE_CRYPTO_CIPHER_AES_CBC, |
2097 | - .cipher_offset = 12, |
2098 | + .cipher_offset = 8, |
2099 | .cipher_len = 496, |
2100 | .cipher_key = { |
2101 | .data = { |
2102 | @@ -10500,9 +10752,9 @@ aes128cbc_hmac_sha1_aad_test_vector = { |
2103 | }, |
2104 | .digest = { |
2105 | .data = { |
2106 | - 0x1F, 0x6A, 0xD2, 0x8B, 0x4B, 0xB3, 0xC0, 0x9E, |
2107 | - 0x86, 0x9B, 0x3A, 0xF2, 0x00, 0x5B, 0x4F, 0x08, |
2108 | - 0x62, 0x8D, 0x62, 0x65 |
2109 | + 0x6D, 0xF3, 0x50, 0x79, 0x7A, 0x2A, 0xAC, 0x7F, |
2110 | + 0xA6, 0xF0, 0xC6, 0x38, 0x1F, 0xA4, 0xDD, 0x9B, |
2111 | + 0x62, 0x0F, 0xFB, 0x10 |
2112 | }, |
2113 | .len = 20 |
2114 | } |
2115 | @@ -12291,6 +12543,68 @@ static struct unit_test_suite cryptodev_qat_testsuite = { |
2116 | TEST_CASE_ST(ut_setup, ut_teardown, |
2117 | test_verify_aes_cmac_aes_ctr_digest_enc_test_case_1_oop_sgl), |
2118 | |
2119 | + /** AUTH ZUC + CIPHER SNOW3G */ |
2120 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2121 | + test_auth_zuc_cipher_snow_test_case_1), |
2122 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2123 | + test_verify_auth_zuc_cipher_snow_test_case_1), |
2124 | + /** AUTH AES CMAC + CIPHER SNOW3G */ |
2125 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2126 | + test_auth_aes_cmac_cipher_snow_test_case_1), |
2127 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2128 | + test_verify_auth_aes_cmac_cipher_snow_test_case_1), |
2129 | + /** AUTH ZUC + CIPHER AES CTR */ |
2130 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2131 | + test_auth_zuc_cipher_aes_ctr_test_case_1), |
2132 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2133 | + test_verify_auth_zuc_cipher_aes_ctr_test_case_1), |
2134 | + /** AUTH SNOW3G + CIPHER AES CTR */ |
2135 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2136 | + test_auth_snow_cipher_aes_ctr_test_case_1), |
2137 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2138 | + test_verify_auth_snow_cipher_aes_ctr_test_case_1), |
2139 | + /** AUTH SNOW3G + CIPHER ZUC */ |
2140 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2141 | + test_auth_snow_cipher_zuc_test_case_1), |
2142 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2143 | + test_verify_auth_snow_cipher_zuc_test_case_1), |
2144 | + /** AUTH AES CMAC + CIPHER ZUC */ |
2145 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2146 | + test_auth_aes_cmac_cipher_zuc_test_case_1), |
2147 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2148 | + test_verify_auth_aes_cmac_cipher_zuc_test_case_1), |
2149 | + |
2150 | + /** AUTH NULL + CIPHER SNOW3G */ |
2151 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2152 | + test_auth_null_cipher_snow_test_case_1), |
2153 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2154 | + test_verify_auth_null_cipher_snow_test_case_1), |
2155 | + /** AUTH NULL + CIPHER ZUC */ |
2156 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2157 | + test_auth_null_cipher_zuc_test_case_1), |
2158 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2159 | + test_verify_auth_null_cipher_zuc_test_case_1), |
2160 | + /** AUTH SNOW3G + CIPHER NULL */ |
2161 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2162 | + test_auth_snow_cipher_null_test_case_1), |
2163 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2164 | + test_verify_auth_snow_cipher_null_test_case_1), |
2165 | + /** AUTH ZUC + CIPHER NULL */ |
2166 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2167 | + test_auth_zuc_cipher_null_test_case_1), |
2168 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2169 | + test_verify_auth_zuc_cipher_null_test_case_1), |
2170 | + /** AUTH NULL + CIPHER AES CTR */ |
2171 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2172 | + test_auth_null_cipher_aes_ctr_test_case_1), |
2173 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2174 | + test_verify_auth_null_cipher_aes_ctr_test_case_1), |
2175 | + /** AUTH AES CMAC + CIPHER NULL */ |
2176 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2177 | + test_auth_aes_cmac_cipher_null_test_case_1), |
2178 | + TEST_CASE_ST(ut_setup, ut_teardown, |
2179 | + test_verify_auth_aes_cmac_cipher_null_test_case_1), |
2180 | + |
2181 | TEST_CASES_END() /**< NULL terminate unit test array */ |
2182 | } |
2183 | }; |
2184 | diff --git a/app/test/test_cryptodev_aes_test_vectors.h b/app/test/test_cryptodev_aes_test_vectors.h |
2185 | index 8307fcf..66994b6 100644 |
2186 | --- a/app/test/test_cryptodev_aes_test_vectors.h |
2187 | +++ b/app/test/test_cryptodev_aes_test_vectors.h |
2188 | @@ -358,69 +358,69 @@ static const struct blockcipher_test_data null_test_data_chain_x1_multiple = { |
2189 | |
2190 | static const uint8_t ciphertext512_aes128cbc_aad[] = { |
2191 | 0x57, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20, 0x6C, |
2192 | - 0x6F, 0x75, 0x73, 0x79, 0x6D, 0x70, 0xB4, 0xAD, |
2193 | - 0x09, 0x7C, 0xD7, 0x52, 0xD6, 0xF2, 0xBF, 0xD1, |
2194 | - 0x9D, 0x79, 0xC6, 0xB6, 0x8F, 0x94, 0xEB, 0xD8, |
2195 | - 0xBA, 0x5E, 0x01, 0x49, 0x7D, 0xB3, 0xC5, 0xFE, |
2196 | - 0x18, 0xF4, 0xE3, 0x60, 0x8C, 0x84, 0x68, 0x13, |
2197 | - 0x33, 0x06, 0x85, 0x60, 0xD3, 0xE7, 0x8A, 0xB5, |
2198 | - 0x23, 0xA2, 0xDE, 0x52, 0x5C, 0xB6, 0x26, 0x37, |
2199 | - 0xBB, 0x23, 0x8A, 0x38, 0x07, 0x85, 0xB6, 0x2E, |
2200 | - 0xC3, 0x69, 0x57, 0x79, 0x6B, 0xE4, 0xD7, 0x86, |
2201 | - 0x23, 0x72, 0x4C, 0x65, 0x49, 0x08, 0x1E, 0xF3, |
2202 | - 0xCC, 0x71, 0x4C, 0x45, 0x97, 0x03, 0xBC, 0xA0, |
2203 | - 0x9D, 0xF0, 0x4F, 0x5D, 0xEC, 0x40, 0x6C, 0xC6, |
2204 | - 0x52, 0xC0, 0x9D, 0x1C, 0xDC, 0x8B, 0xC2, 0xFA, |
2205 | - 0x35, 0xA7, 0x3A, 0x00, 0x04, 0x1C, 0xA6, 0x91, |
2206 | - 0x5D, 0xEB, 0x07, 0xA1, 0xB9, 0x3E, 0xD1, 0xB6, |
2207 | - 0xCA, 0x96, 0xEC, 0x71, 0xF7, 0x7D, 0xB6, 0x09, |
2208 | - 0x3D, 0x19, 0x6E, 0x75, 0x03, 0xC3, 0x1A, 0x4E, |
2209 | - 0x5B, 0x4D, 0xEA, 0xD9, 0x92, 0x96, 0x01, 0xFB, |
2210 | - 0xA3, 0xC2, 0x6D, 0xC4, 0x17, 0x6B, 0xB4, 0x3B, |
2211 | - 0x1E, 0x87, 0x54, 0x26, 0x95, 0x63, 0x07, 0x73, |
2212 | - 0xB6, 0xBA, 0x52, 0xD7, 0xA7, 0xD0, 0x9C, 0x75, |
2213 | - 0x8A, 0xCF, 0xC4, 0x3C, 0x4A, 0x55, 0x0E, 0x53, |
2214 | - 0xEC, 0xE0, 0x31, 0x51, 0xB7, 0xB7, 0xD2, 0xB4, |
2215 | - 0xF3, 0x2B, 0x70, 0x6D, 0x15, 0x9E, 0x57, 0x30, |
2216 | - 0x72, 0xE5, 0xA4, 0x71, 0x5F, 0xA4, 0xE8, 0x7C, |
2217 | - 0x46, 0x58, 0x36, 0x71, 0x91, 0x55, 0xAA, 0x99, |
2218 | - 0x3B, 0x3F, 0xF6, 0xA2, 0x9D, 0x27, 0xBF, 0xC2, |
2219 | - 0x62, 0x2C, 0x85, 0xB7, 0x51, 0xDD, 0xFD, 0x7B, |
2220 | - 0x8B, 0xB5, 0xDD, 0x2A, 0x73, 0xF8, 0x93, 0x9A, |
2221 | - 0x3F, 0xAD, 0x1D, 0xF0, 0x46, 0xD1, 0x76, 0x83, |
2222 | - 0x71, 0x4E, 0xD3, 0x0D, 0x64, 0x8C, 0xC3, 0xE6, |
2223 | - 0x03, 0xED, 0xE8, 0x53, 0x23, 0x1A, 0xC7, 0x86, |
2224 | - 0xEB, 0x87, 0xD6, 0x78, 0xF9, 0xFB, 0x9C, 0x1D, |
2225 | - 0xE7, 0x4E, 0xC0, 0x70, 0x27, 0x7A, 0x43, 0xE2, |
2226 | - 0x5D, 0xA4, 0x10, 0x40, 0xBE, 0x61, 0x0D, 0x2B, |
2227 | - 0x25, 0x08, 0x75, 0x91, 0xB5, 0x5A, 0x26, 0xC8, |
2228 | - 0x32, 0xA7, 0xC6, 0x88, 0xBF, 0x75, 0x94, 0xCC, |
2229 | - 0x58, 0xA4, 0xFE, 0x2F, 0xF7, 0x5C, 0xD2, 0x36, |
2230 | - 0x66, 0x55, 0xF0, 0xEA, 0xF5, 0x64, 0x43, 0xE7, |
2231 | - 0x6D, 0xE0, 0xED, 0xA1, 0x10, 0x0A, 0x84, 0x07, |
2232 | - 0x11, 0x88, 0xFA, 0xA1, 0xD3, 0xA0, 0x00, 0x5D, |
2233 | - 0xEB, 0xB5, 0x62, 0x01, 0x72, 0xC1, 0x9B, 0x39, |
2234 | - 0x0B, 0xD3, 0xAF, 0x04, 0x19, 0x42, 0xEC, 0xFF, |
2235 | - 0x4B, 0xB3, 0x5E, 0x87, 0x27, 0xE4, 0x26, 0x57, |
2236 | - 0x76, 0xCD, 0x36, 0x31, 0x5B, 0x94, 0x74, 0xFF, |
2237 | - 0x33, 0x91, 0xAA, 0xD1, 0x45, 0x34, 0xC2, 0x11, |
2238 | - 0xF0, 0x35, 0x44, 0xC9, 0xD5, 0xA2, 0x5A, 0xC2, |
2239 | - 0xE9, 0x9E, 0xCA, 0xE2, 0x6F, 0xD2, 0x40, 0xB4, |
2240 | - 0x93, 0x42, 0x78, 0x20, 0x92, 0x88, 0xC7, 0x16, |
2241 | - 0xCF, 0x15, 0x54, 0x7B, 0xE1, 0x46, 0x38, 0x69, |
2242 | - 0xB8, 0xE4, 0xF1, 0x81, 0xF0, 0x08, 0x6F, 0x92, |
2243 | - 0x6D, 0x1A, 0xD9, 0x93, 0xFA, 0xD7, 0x35, 0xFE, |
2244 | - 0x7F, 0x59, 0x43, 0x1D, 0x3A, 0x3B, 0xFC, 0xD0, |
2245 | - 0x14, 0x95, 0x1E, 0xB2, 0x04, 0x08, 0x4F, 0xC6, |
2246 | - 0xEA, 0xE8, 0x22, 0xF3, 0xD7, 0x66, 0x93, 0xAA, |
2247 | - 0xFD, 0xA0, 0xFE, 0x03, 0x96, 0x54, 0x78, 0x35, |
2248 | - 0x18, 0xED, 0xB7, 0x2F, 0x40, 0xE3, 0x8E, 0x22, |
2249 | - 0xC6, 0xDA, 0xB0, 0x8E, 0xA0, 0xA1, 0x62, 0x03, |
2250 | - 0x63, 0x34, 0x11, 0xF5, 0x9E, 0xAA, 0x6B, 0xC4, |
2251 | - 0x14, 0x75, 0x4C, 0xF4, 0xD8, 0xD9, 0xF1, 0x76, |
2252 | - 0xE3, 0xD3, 0x55, 0xCE, 0x22, 0x7D, 0x4A, 0xB7, |
2253 | - 0xBB, 0x7F, 0x4F, 0x09, 0x88, 0x70, 0x6E, 0x09, |
2254 | - 0x84, 0x6B, 0x24, 0x19, 0x2C, 0x20, 0x73, 0x75 |
2255 | + 0x1D, 0x7C, 0x76, 0xED, 0xC2, 0x10, 0x3C, 0xB5, |
2256 | + 0x14, 0x07, 0x3C, 0x33, 0x7B, 0xBE, 0x9E, 0xA9, |
2257 | + 0x01, 0xC5, 0xAA, 0xA6, 0xB6, 0x7A, 0xE1, 0xDB, |
2258 | + 0x39, 0xAA, 0xAA, 0xF4, 0xEE, 0xA7, 0x71, 0x71, |
2259 | + 0x78, 0x0D, 0x5A, 0xD4, 0xF9, 0xCD, 0x75, 0xD1, |
2260 | + 0x9C, 0x7F, 0xC8, 0x58, 0x46, 0x7A, 0xD1, 0x81, |
2261 | + 0xEA, 0xCC, 0x08, 0xDC, 0x82, 0x73, 0x22, 0x08, |
2262 | + 0x11, 0x73, 0x7C, 0xB1, 0x84, 0x6A, 0x8E, 0x67, |
2263 | + 0x3F, 0x5D, 0xDB, 0x0E, 0xE2, 0xC2, 0xCB, 0x6D, |
2264 | + 0x88, 0xEC, 0x3F, 0x50, 0x44, 0xD3, 0x47, 0x6E, |
2265 | + 0xDD, 0x42, 0xDC, 0x2A, 0x5E, 0x5C, 0x50, 0x24, |
2266 | + 0x57, 0x8A, 0xE7, 0xC5, 0x53, 0x6D, 0x89, 0x33, |
2267 | + 0x21, 0x65, 0x82, 0xD6, 0xE9, 0xE7, 0x77, 0x10, |
2268 | + 0xC2, 0x09, 0x91, 0xC1, 0x42, 0x62, 0x36, 0xF4, |
2269 | + 0x43, 0x37, 0x95, 0xB3, 0x7E, 0x21, 0xC5, 0x3E, |
2270 | + 0x65, 0xCB, 0xB6, 0xAA, 0xEC, 0xA5, 0xC6, 0x5C, |
2271 | + 0x4D, 0xBE, 0x14, 0xF1, 0x98, 0xBF, 0x6C, 0x8A, |
2272 | + 0x9E, 0x9F, 0xD4, 0xB4, 0xF2, 0x22, 0x96, 0x99, |
2273 | + 0x37, 0x32, 0xB6, 0xC1, 0x04, 0x66, 0x52, 0x37, |
2274 | + 0x5D, 0x5F, 0x58, 0x92, 0xC9, 0x97, 0xEA, 0x60, |
2275 | + 0x60, 0x27, 0x57, 0xF9, 0x47, 0x4F, 0xBC, 0xDF, |
2276 | + 0x05, 0xBD, 0x37, 0x87, 0xBB, 0x09, 0xA5, 0xBE, |
2277 | + 0xC1, 0xFC, 0x32, 0x86, 0x6A, 0xB7, 0x8B, 0x1E, |
2278 | + 0x6B, 0xCE, 0x8D, 0x81, 0x63, 0x4C, 0xF2, 0x7F, |
2279 | + 0xD1, 0x45, 0x82, 0xE8, 0x0D, 0x1C, 0x4D, 0xA8, |
2280 | + 0xBF, 0x2D, 0x2B, 0x52, 0xE5, 0xDB, 0xAB, 0xFD, |
2281 | + 0x04, 0xA2, 0xA1, 0x1E, 0x21, 0x1D, 0x06, 0x9A, |
2282 | + 0xC2, 0x7D, 0x99, 0xFC, 0xB4, 0x72, 0x89, 0x41, |
2283 | + 0x55, 0x69, 0xFA, 0x1F, 0x78, 0x2F, 0x35, 0x59, |
2284 | + 0xD7, 0x59, 0x6D, 0xA6, 0x45, 0xC9, 0x2B, 0x06, |
2285 | + 0x6C, 0xEC, 0x83, 0x34, 0xA5, 0x08, 0xDB, 0x6F, |
2286 | + 0xDE, 0x75, 0x21, 0x9B, 0xB0, 0xCB, 0x0A, 0xAE, |
2287 | + 0x22, 0x99, 0x74, 0x1C, 0x9D, 0x37, 0x0E, 0xC6, |
2288 | + 0x3A, 0x45, 0x49, 0xE5, 0xE3, 0x21, 0x11, 0xEA, |
2289 | + 0x34, 0x25, 0xD5, 0x76, 0xB0, 0x30, 0x19, 0x87, |
2290 | + 0x14, 0x3A, 0x10, 0x6F, 0x6D, 0xDD, 0xE9, 0x60, |
2291 | + 0x6A, 0x00, 0x6A, 0x4C, 0x5B, 0x85, 0x3E, 0x1A, |
2292 | + 0x41, 0xFA, 0xDE, 0x2D, 0x2F, 0x2E, 0x5B, 0x79, |
2293 | + 0x09, 0x66, 0x65, 0xD0, 0xDB, 0x32, 0x05, 0xB5, |
2294 | + 0xEA, 0xFB, 0x6A, 0xD5, 0x43, 0xF8, 0xBD, 0x98, |
2295 | + 0x7B, 0x8E, 0x3B, 0x85, 0x89, 0x5D, 0xC5, 0x59, |
2296 | + 0x54, 0x22, 0x75, 0xA8, 0x60, 0xDC, 0x0A, 0x37, |
2297 | + 0x8C, 0xD8, 0x05, 0xEA, 0x62, 0x62, 0x71, 0x98, |
2298 | + 0x0C, 0xCB, 0xCE, 0x0A, 0xD9, 0xE6, 0xE8, 0xA7, |
2299 | + 0xB3, 0x2D, 0x89, 0xA7, 0x60, 0xF0, 0x42, 0xA7, |
2300 | + 0x3D, 0x80, 0x44, 0xE7, 0xC1, 0xA6, 0x88, 0xB1, |
2301 | + 0x4F, 0xC0, 0xB1, 0xAF, 0x40, 0xF3, 0x54, 0x72, |
2302 | + 0x8F, 0xAF, 0x47, 0x96, 0x19, 0xEB, 0xA5, 0x5C, |
2303 | + 0x00, 0x3B, 0x36, 0xC8, 0x3F, 0x1E, 0x63, 0x54, |
2304 | + 0xF3, 0x3D, 0x85, 0x44, 0x9B, 0x9B, 0x20, 0xE3, |
2305 | + 0x9D, 0xEF, 0x62, 0x21, 0xA1, 0x0B, 0x78, 0xF4, |
2306 | + 0x2B, 0x89, 0x66, 0x5E, 0x97, 0xC6, 0xC4, 0x55, |
2307 | + 0x35, 0x32, 0xD7, 0x44, 0x95, 0x9A, 0xE7, 0xF2, |
2308 | + 0x57, 0x52, 0x5B, 0x92, 0x86, 0x8F, 0x8B, 0xCF, |
2309 | + 0x41, 0x89, 0xF6, 0x2A, 0xD3, 0x42, 0x87, 0x43, |
2310 | + 0x56, 0x1F, 0x0E, 0x49, 0xF1, 0x32, 0x6D, 0xA8, |
2311 | + 0x62, 0xDF, 0x47, 0xBB, 0xB6, 0x53, 0xF8, 0x5C, |
2312 | + 0x36, 0xDA, 0x34, 0x34, 0x2D, 0x2E, 0x1D, 0x33, |
2313 | + 0xAF, 0x6A, 0x1E, 0xF1, 0xC9, 0x72, 0xB5, 0x3C, |
2314 | + 0x64, 0x4C, 0x96, 0x12, 0x78, 0x67, 0x6A, 0xE5, |
2315 | + 0x8B, 0x05, 0x80, 0xAE, 0x7D, 0xE5, 0x9B, 0x24, |
2316 | + 0xDB, 0xFF, 0x1E, 0xB8, 0x36, 0x6D, 0x3D, 0x5D, |
2317 | + 0x73, 0x65, 0x72, 0x73, 0x2C, 0x20, 0x73, 0x75 |
2318 | }; |
2319 | |
2320 | /* AES128-CTR-SHA1 test vector */ |
2321 | diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c |
2322 | index 69df293..a080299 100644 |
2323 | --- a/app/test/test_cryptodev_asym.c |
2324 | +++ b/app/test/test_cryptodev_asym.c |
2325 | @@ -933,8 +933,9 @@ testsuite_setup(void) |
2326 | } |
2327 | |
2328 | /* setup asym session pool */ |
2329 | - unsigned int session_size = |
2330 | - rte_cryptodev_asym_get_private_session_size(dev_id); |
2331 | + unsigned int session_size = RTE_MAX( |
2332 | + rte_cryptodev_asym_get_private_session_size(dev_id), |
2333 | + rte_cryptodev_asym_get_header_session_size()); |
2334 | /* |
2335 | * Create mempool with TEST_NUM_SESSIONS * 2, |
2336 | * to include the session headers |
2337 | diff --git a/app/test/test_cryptodev_mixed_test_vectors.h b/app/test/test_cryptodev_mixed_test_vectors.h |
2338 | index bca47c0..f50dcb0 100644 |
2339 | --- a/app/test/test_cryptodev_mixed_test_vectors.h |
2340 | +++ b/app/test/test_cryptodev_mixed_test_vectors.h |
2341 | @@ -126,9 +126,9 @@ struct mixed_cipher_auth_test_data auth_aes_cmac_cipher_aes_ctr_test_case_1 = { |
2342 | 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, |
2343 | 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, |
2344 | 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, |
2345 | - 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, |
2346 | + 0x5A, 0x5A, 0x5A, 0x5A |
2347 | }, |
2348 | - .len_bits = 128 << 3, |
2349 | + .len_bits = 124 << 3, |
2350 | }, |
2351 | .ciphertext = { |
2352 | .data = { |
2353 | @@ -169,4 +169,1320 @@ struct mixed_cipher_auth_test_data auth_aes_cmac_cipher_aes_ctr_test_case_1 = { |
2354 | } |
2355 | }; |
2356 | |
2357 | +struct mixed_cipher_auth_test_data auth_zuc_cipher_snow_test_case_1 = { |
2358 | + .auth_algo = RTE_CRYPTO_AUTH_ZUC_EIA3, |
2359 | + .auth_key = { |
2360 | + .data = { |
2361 | + 0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb, |
2362 | + 0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a |
2363 | + }, |
2364 | + .len = 16, |
2365 | + }, |
2366 | + .auth_iv = { |
2367 | + .data = { |
2368 | + 0xa9, 0x40, 0x59, 0xda, 0x50, 0x00, 0x00, 0x00, |
2369 | + 0x29, 0x40, 0x59, 0xda, 0x50, 0x00, 0x80, 0x00 |
2370 | + }, |
2371 | + .len = 16, |
2372 | + }, |
2373 | + .auth = { |
2374 | + .len_bits = 73 << 3, |
2375 | + .offset_bits = 0, |
2376 | + }, |
2377 | + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW3G_UEA2, |
2378 | + .cipher_key = { |
2379 | + .data = { |
2380 | + 0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb, |
2381 | + 0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a |
2382 | + }, |
2383 | + .len = 16, |
2384 | + }, |
2385 | + .cipher_iv = { |
2386 | + .data = { |
2387 | + 0xa9, 0x40, 0x59, 0xda, 0x50, 0x00, 0x00, 0x00, |
2388 | + 0x29, 0x40, 0x59, 0xda, 0x50, 0x00, 0x80, 0x00 |
2389 | + }, |
2390 | + .len = 16, |
2391 | + }, |
2392 | + .cipher = { |
2393 | + .len_bits = 77 << 3, |
2394 | + .offset_bits = 0, |
2395 | + }, |
2396 | + .plaintext = { |
2397 | + .data = { |
2398 | + 0x98, 0x3b, 0x41, 0xd4, 0x7d, 0x78, 0x0c, 0x9e, |
2399 | + 0x1a, 0xd1, 0x1d, 0x7e, 0xb7, 0x03, 0x91, 0xb1, |
2400 | + 0xde, 0x0b, 0x35, 0xda, 0x2d, 0xc6, 0x2f, 0x83, |
2401 | + 0xe7, 0xb7, 0x8d, 0x63, 0x06, 0xca, 0x0e, 0xa0, |
2402 | + 0x7e, 0x94, 0x1b, 0x7b, 0xe9, 0x13, 0x48, 0xf9, |
2403 | + 0xfc, 0xb1, 0x70, 0xe2, 0x21, 0x7f, 0xec, 0xd9, |
2404 | + 0x7f, 0x9f, 0x68, 0xad, 0xb1, 0x6e, 0x5d, 0x7d, |
2405 | + 0x21, 0xe5, 0x69, 0xd2, 0x80, 0xed, 0x77, 0x5c, |
2406 | + 0xeb, 0xde, 0x3f, 0x40, 0x93, 0xc5, 0x38, 0x81, |
2407 | + 0x00 |
2408 | + }, |
2409 | + .len_bits = 73 << 3, |
2410 | + }, |
2411 | + .ciphertext = { |
2412 | + .data = { |
2413 | + 0x18, 0x46, 0xE1, 0xC5, 0x2C, 0x85, 0x93, 0x22, |
2414 | + 0x84, 0x80, 0xD6, 0x84, 0x5C, 0x99, 0x55, 0xE0, |
2415 | + 0xD5, 0x02, 0x41, 0x74, 0x4A, 0xD2, 0x8E, 0x7E, |
2416 | + 0xB9, 0x79, 0xD3, 0xE5, 0x76, 0x75, 0xD5, 0x59, |
2417 | + 0x26, 0xD7, 0x06, 0x2D, 0xF4, 0x71, 0x26, 0x40, |
2418 | + 0xAC, 0x77, 0x62, 0xAC, 0x35, 0x0D, 0xC5, 0x35, |
2419 | + 0xF8, 0x03, 0x54, 0x52, 0x2E, 0xCA, 0x14, 0xD8, |
2420 | + 0x2E, 0x6C, 0x0E, 0x7A, 0x09, 0xE7, 0x20, 0xDD, |
2421 | + 0x7C, 0xE3, 0x28, 0x77, 0x53, 0x65, 0xBA, 0x54, |
2422 | + 0xE8, 0x25, 0x04, 0x52, 0xFD |
2423 | + }, |
2424 | + .len_bits = 77 << 3, |
2425 | + }, |
2426 | + .digest_enc = { |
2427 | + .data = { |
2428 | + 0x25, 0x04, 0x52, 0xFD |
2429 | + }, |
2430 | + .len = 4, |
2431 | + .offset = 73, |
2432 | + }, |
2433 | + .validDataLen = { |
2434 | + .len_bits = 77 << 3, |
2435 | + }, |
2436 | + .validCipherLen = { |
2437 | + .len_bits = 77 << 3, |
2438 | + }, |
2439 | + .validAuthLen = { |
2440 | + .len_bits = 73 << 3, |
2441 | + } |
2442 | +}; |
2443 | + |
2444 | +struct mixed_cipher_auth_test_data auth_aes_cmac_cipher_snow_test_case_1 = { |
2445 | + .auth_algo = RTE_CRYPTO_AUTH_AES_CMAC, |
2446 | + .auth_key = { |
2447 | + .data = { |
2448 | + 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, |
2449 | + 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C |
2450 | + }, |
2451 | + .len = 16, |
2452 | + }, |
2453 | + .auth_iv = { |
2454 | + .data = { |
2455 | + }, |
2456 | + .len = 0, |
2457 | + }, |
2458 | + .auth = { |
2459 | + .len_bits = 512 << 3, |
2460 | + .offset_bits = 0, |
2461 | + }, |
2462 | + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW3G_UEA2, |
2463 | + .cipher_key = { |
2464 | + .data = { |
2465 | + 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, |
2466 | + 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C |
2467 | + }, |
2468 | + .len = 16, |
2469 | + }, |
2470 | + .cipher_iv = { |
2471 | + .data = { |
2472 | + }, |
2473 | + .len = 0, |
2474 | + }, |
2475 | + .cipher = { |
2476 | + .len_bits = 516 << 3, |
2477 | + .offset_bits = 0, |
2478 | + }, |
2479 | + .plaintext = { |
2480 | + .data = { |
2481 | + 0x57, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20, 0x6C, |
2482 | + 0x6F, 0x75, 0x73, 0x79, 0x20, 0x65, 0x61, 0x72, |
2483 | + 0x74, 0x68, 0x21, 0x20, 0x48, 0x65, 0x20, 0x77, |
2484 | + 0x6F, 0x6E, 0x64, 0x65, 0x72, 0x65, 0x64, 0x20, |
2485 | + 0x68, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79, |
2486 | + 0x20, 0x70, 0x65, 0x6F, 0x70, 0x6C, 0x65, 0x20, |
2487 | + 0x77, 0x65, 0x72, 0x65, 0x20, 0x64, 0x65, 0x73, |
2488 | + 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x20, 0x74, |
2489 | + 0x68, 0x61, 0x74, 0x20, 0x73, 0x61, 0x6D, 0x65, |
2490 | + 0x20, 0x6E, 0x69, 0x67, 0x68, 0x74, 0x20, 0x65, |
2491 | + 0x76, 0x65, 0x6E, 0x20, 0x69, 0x6E, 0x20, 0x68, |
2492 | + 0x69, 0x73, 0x20, 0x6F, 0x77, 0x6E, 0x20, 0x70, |
2493 | + 0x72, 0x6F, 0x73, 0x70, 0x65, 0x72, 0x6F, 0x75, |
2494 | + 0x73, 0x20, 0x63, 0x6F, 0x75, 0x6E, 0x74, 0x72, |
2495 | + 0x79, 0x2C, 0x20, 0x68, 0x6F, 0x77, 0x20, 0x6D, |
2496 | + 0x61, 0x6E, 0x79, 0x20, 0x68, 0x6F, 0x6D, 0x65, |
2497 | + 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x73, |
2498 | + 0x68, 0x61, 0x6E, 0x74, 0x69, 0x65, 0x73, 0x2C, |
2499 | + 0x20, 0x68, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, |
2500 | + 0x79, 0x20, 0x68, 0x75, 0x73, 0x62, 0x61, 0x6E, |
2501 | + 0x64, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, |
2502 | + 0x64, 0x72, 0x75, 0x6E, 0x6B, 0x20, 0x61, 0x6E, |
2503 | + 0x64, 0x20, 0x77, 0x69, 0x76, 0x65, 0x73, 0x20, |
2504 | + 0x73, 0x6F, 0x63, 0x6B, 0x65, 0x64, 0x2C, 0x20, |
2505 | + 0x61, 0x6E, 0x64, 0x20, 0x68, 0x6F, 0x77, 0x20, |
2506 | + 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x63, 0x68, 0x69, |
2507 | + 0x6C, 0x64, 0x72, 0x65, 0x6E, 0x20, 0x77, 0x65, |
2508 | + 0x72, 0x65, 0x20, 0x62, 0x75, 0x6C, 0x6C, 0x69, |
2509 | + 0x65, 0x64, 0x2C, 0x20, 0x61, 0x62, 0x75, 0x73, |
2510 | + 0x65, 0x64, 0x2C, 0x20, 0x6F, 0x72, 0x20, 0x61, |
2511 | + 0x62, 0x61, 0x6E, 0x64, 0x6F, 0x6E, 0x65, 0x64, |
2512 | + 0x2E, 0x20, 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, |
2513 | + 0x6E, 0x79, 0x20, 0x66, 0x61, 0x6D, 0x69, 0x6C, |
2514 | + 0x69, 0x65, 0x73, 0x20, 0x68, 0x75, 0x6E, 0x67, |
2515 | + 0x65, 0x72, 0x65, 0x64, 0x20, 0x66, 0x6F, 0x72, |
2516 | + 0x20, 0x66, 0x6F, 0x6F, 0x64, 0x20, 0x74, 0x68, |
2517 | + 0x65, 0x79, 0x20, 0x63, 0x6F, 0x75, 0x6C, 0x64, |
2518 | + 0x20, 0x6E, 0x6F, 0x74, 0x20, 0x61, 0x66, 0x66, |
2519 | + 0x6F, 0x72, 0x64, 0x20, 0x74, 0x6F, 0x20, 0x62, |
2520 | + 0x75, 0x79, 0x3F, 0x20, 0x48, 0x6F, 0x77, 0x20, |
2521 | + 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x68, 0x65, 0x61, |
2522 | + 0x72, 0x74, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, |
2523 | + 0x20, 0x62, 0x72, 0x6F, 0x6B, 0x65, 0x6E, 0x3F, |
2524 | + 0x20, 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, |
2525 | + 0x79, 0x20, 0x73, 0x75, 0x69, 0x63, 0x69, 0x64, |
2526 | + 0x65, 0x73, 0x20, 0x77, 0x6F, 0x75, 0x6C, 0x64, |
2527 | + 0x20, 0x74, 0x61, 0x6B, 0x65, 0x20, 0x70, 0x6C, |
2528 | + 0x61, 0x63, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, |
2529 | + 0x20, 0x73, 0x61, 0x6D, 0x65, 0x20, 0x6E, 0x69, |
2530 | + 0x67, 0x68, 0x74, 0x2C, 0x20, 0x68, 0x6F, 0x77, |
2531 | + 0x20, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x70, 0x65, |
2532 | + 0x6F, 0x70, 0x6C, 0x65, 0x20, 0x77, 0x6F, 0x75, |
2533 | + 0x6C, 0x64, 0x20, 0x67, 0x6F, 0x20, 0x69, 0x6E, |
2534 | + 0x73, 0x61, 0x6E, 0x65, 0x3F, 0x20, 0x48, 0x6F, |
2535 | + 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x63, |
2536 | + 0x6F, 0x63, 0x6B, 0x72, 0x6F, 0x61, 0x63, 0x68, |
2537 | + 0x65, 0x73, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x6C, |
2538 | + 0x61, 0x6E, 0x64, 0x6C, 0x6F, 0x72, 0x64, 0x73, |
2539 | + 0x20, 0x77, 0x6F, 0x75, 0x6C, 0x64, 0x20, 0x74, |
2540 | + 0x72, 0x69, 0x75, 0x6D, 0x70, 0x68, 0x3F, 0x20, |
2541 | + 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79, |
2542 | + 0x20, 0x77, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x73, |
2543 | + 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x6C, 0x6F, |
2544 | + 0x73, 0x65, 0x72, 0x73, 0x2C, 0x20, 0x73, 0x75 |
2545 | + }, |
2546 | + .len_bits = 512 << 3, |
2547 | + }, |
2548 | + .ciphertext = { |
2549 | + .data = { |
2550 | + 0x8A, 0xA9, 0x74, 0x31, 0xB1, 0xF2, 0xAB, 0x00, |
2551 | + 0xD6, 0x3D, 0xFA, 0xBD, 0xD9, 0x65, 0x52, 0x80, |
2552 | + 0xB5, 0x98, 0x20, 0xFF, 0x8D, 0x1C, 0x0F, 0x53, |
2553 | + 0xDD, 0x79, 0xCC, 0x9D, 0x7A, 0x6D, 0x76, 0x06, |
2554 | + 0xB6, 0xF4, 0xAC, 0xDA, 0xF2, 0x24, 0x02, 0x58, |
2555 | + 0x5F, 0xE3, 0xD4, 0xF7, 0x0B, 0x3B, 0x1C, 0x4C, |
2556 | + 0x0B, 0x4C, 0xC7, 0x4D, 0x3D, 0xFA, 0x28, 0xD9, |
2557 | + 0xA0, 0x90, 0x3E, 0x91, 0xDC, 0xC4, 0xE1, 0x2E, |
2558 | + 0x7C, 0xB4, 0xBD, 0xE0, 0x9E, 0xC8, 0x33, 0x42, |
2559 | + 0x0E, 0x84, 0xEF, 0x3C, 0xF1, 0x8B, 0x2C, 0xBD, |
2560 | + 0x33, 0x70, 0x22, 0xBA, 0xD4, 0x0B, 0xB2, 0x83, |
2561 | + 0x7F, 0x27, 0x51, 0x92, 0xD1, 0x40, 0x1E, 0xCD, |
2562 | + 0x62, 0x0F, 0x61, 0x5F, 0xB4, 0xB1, 0x0D, 0x1A, |
2563 | + 0x16, 0x1B, 0xE8, 0xA8, 0x2B, 0x45, 0xBA, 0x56, |
2564 | + 0x30, 0xD0, 0xE3, 0xCA, 0x4D, 0x23, 0xA3, 0x38, |
2565 | + 0xD6, 0x2C, 0xE4, 0x8D, 0xFF, 0x23, 0x97, 0x9E, |
2566 | + 0xE9, 0xBD, 0x70, 0xAF, 0x6B, 0x68, 0xA7, 0x21, |
2567 | + 0x3C, 0xFB, 0xB2, 0x99, 0x4D, 0xE9, 0x70, 0x56, |
2568 | + 0x36, 0xB8, 0xD7, 0xE0, 0xEB, 0x62, 0xA1, 0x79, |
2569 | + 0xF9, 0xD6, 0xAD, 0x83, 0x75, 0x54, 0xF5, 0x45, |
2570 | + 0x82, 0xE8, 0xD6, 0xA9, 0x76, 0x11, 0xC7, 0x81, |
2571 | + 0x2C, 0xBA, 0x67, 0xB5, 0xDB, 0xE5, 0xF2, 0x6B, |
2572 | + 0x7D, 0x9F, 0x4E, 0xDC, 0xA1, 0x62, 0xF1, 0xF0, |
2573 | + 0xAD, 0xD4, 0x7A, 0xA3, 0xF3, 0x76, 0x29, 0xA4, |
2574 | + 0xB7, 0xF3, 0x31, 0x84, 0xE7, 0x1F, 0x0D, 0x01, |
2575 | + 0xBD, 0x46, 0x07, 0x51, 0x05, 0x76, 0xE2, 0x95, |
2576 | + 0xF8, 0x48, 0x18, 0x8A, 0x1E, 0x92, 0x8B, 0xBC, |
2577 | + 0x30, 0x05, 0xF5, 0xD6, 0x96, 0xEF, 0x78, 0xB6, |
2578 | + 0xF3, 0xEC, 0x4C, 0xB1, 0x88, 0x8B, 0x63, 0x40, |
2579 | + 0x07, 0x37, 0xB4, 0x1A, 0xBD, 0xE9, 0x38, 0xB4, |
2580 | + 0x31, 0x35, 0x9D, 0x0C, 0xF1, 0x24, 0x0E, 0xD2, |
2581 | + 0xAE, 0x39, 0xA6, 0x41, 0x3C, 0x91, 0x6A, 0x4B, |
2582 | + 0xEC, 0x46, 0x76, 0xB4, 0x15, 0xC3, 0x58, 0x96, |
2583 | + 0x69, 0x02, 0x21, 0x37, 0x65, 0xDF, 0xA6, 0x43, |
2584 | + 0x78, 0x81, 0x8B, 0x39, 0x37, 0xE3, 0xF3, 0xD9, |
2585 | + 0xA2, 0xAA, 0x3F, 0xA9, 0x21, 0x24, 0x93, 0x4A, |
2586 | + 0xB0, 0xDE, 0x22, 0x5F, 0xF8, 0xD3, 0xCC, 0x13, |
2587 | + 0x5C, 0xC2, 0x5C, 0x98, 0x6D, 0xFB, 0x34, 0x26, |
2588 | + 0xE2, 0xC9, 0x26, 0x23, 0x41, 0xAB, 0xC3, 0x8A, |
2589 | + 0xEC, 0x62, 0xA9, 0x5B, 0x51, 0xB9, 0x10, 0x9D, |
2590 | + 0xB1, 0xBB, 0xDE, 0x78, 0xDE, 0xE7, 0xF0, 0x9F, |
2591 | + 0x91, 0x6C, 0x4D, 0xFC, 0xB3, 0x9C, 0xFF, 0xA4, |
2592 | + 0x9D, 0xB8, 0xCD, 0xF6, 0xA8, 0x6A, 0xDB, 0x3B, |
2593 | + 0x82, 0xFE, 0xCD, 0x6B, 0x08, 0x0A, 0x5E, 0x76, |
2594 | + 0xE9, 0xB3, 0xA2, 0x78, 0x25, 0xDB, 0xB1, 0x76, |
2595 | + 0x42, 0x2C, 0xFB, 0x20, 0x87, 0x81, 0x76, 0x17, |
2596 | + 0x99, 0xFD, 0x56, 0x52, 0xE2, 0xB0, 0x8E, 0x1B, |
2597 | + 0x99, 0xB3, 0x6B, 0x16, 0xC5, 0x4F, 0x0D, 0xBB, |
2598 | + 0x0E, 0xB7, 0x54, 0x63, 0xD9, 0x67, 0xD9, 0x85, |
2599 | + 0x1F, 0xA8, 0xF0, 0xF0, 0xB0, 0x41, 0xDC, 0xBC, |
2600 | + 0x75, 0xEE, 0x23, 0x7D, 0x40, 0xCE, 0xB8, 0x0A, |
2601 | + 0x6D, 0xC1, 0xD7, 0xCB, 0xAE, 0xCE, 0x91, 0x9E, |
2602 | + 0x3E, 0x5A, 0x76, 0xF8, 0xC0, 0xF2, 0x7F, 0x0B, |
2603 | + 0xD2, 0x5F, 0x63, 0xBE, 0xB2, 0x81, 0x8E, 0x6D, |
2604 | + 0xB3, 0x6B, 0x67, 0x9D, 0xAC, 0xE2, 0xDB, 0x7C, |
2605 | + 0x11, 0x19, 0x55, 0x55, 0x11, 0xED, 0x7F, 0x4E, |
2606 | + 0x9E, 0x4B, 0x6E, 0x01, 0x74, 0x4A, 0xE8, 0x78, |
2607 | + 0xEC, 0xCD, 0xF7, 0xA2, 0x6E, 0xDB, 0xB6, 0x3B, |
2608 | + 0x4D, 0x2C, 0x09, 0x62, 0x57, 0x6E, 0x38, 0x8A, |
2609 | + 0x61, 0x17, 0x00, 0xE9, 0x86, 0x7F, 0x3D, 0x93, |
2610 | + 0xBC, 0xC3, 0x27, 0x90, 0x7E, 0x41, 0x81, 0xBA, |
2611 | + 0x74, 0x70, 0x19, 0xE8, 0xD2, 0x88, 0x61, 0xDF, |
2612 | + 0xB4, 0xED, 0xA4, 0x9D, 0x3D, 0xED, 0x95, 0x65, |
2613 | + 0xCA, 0xFF, 0x8D, 0x58, 0x63, 0x10, 0x9D, 0xBE, |
2614 | + 0x78, 0x81, 0x47, 0x38 |
2615 | + }, |
2616 | + .len_bits = 516 << 3, |
2617 | + }, |
2618 | + .digest_enc = { |
2619 | + .data = { |
2620 | + 0x78, 0x81, 0x47, 0x38 |
2621 | + }, |
2622 | + .len = 4, |
2623 | + .offset = 512, |
2624 | + }, |
2625 | + .validDataLen = { |
2626 | + .len_bits = 516 << 3, |
2627 | + }, |
2628 | + .validCipherLen = { |
2629 | + .len_bits = 516 << 3, |
2630 | + }, |
2631 | + .validAuthLen = { |
2632 | + .len_bits = 512 << 3, |
2633 | + } |
2634 | +}; |
2635 | + |
2636 | +struct mixed_cipher_auth_test_data auth_zuc_cipher_aes_ctr_test_case_1 = { |
2637 | + .auth_algo = RTE_CRYPTO_AUTH_ZUC_EIA3, |
2638 | + .auth_key = { |
2639 | + .data = { |
2640 | + 0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb, |
2641 | + 0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a |
2642 | + }, |
2643 | + .len = 16, |
2644 | + }, |
2645 | + .auth_iv = { |
2646 | + .data = { |
2647 | + 0xa9, 0x40, 0x59, 0xda, 0x50, 0x00, 0x00, 0x00, |
2648 | + 0x29, 0x40, 0x59, 0xda, 0x50, 0x00, 0x80, 0x00 |
2649 | + }, |
2650 | + .len = 16, |
2651 | + }, |
2652 | + .auth = { |
2653 | + .len_bits = 73 << 3, |
2654 | + .offset_bits = 0, |
2655 | + }, |
2656 | + .cipher_algo = RTE_CRYPTO_CIPHER_AES_CTR, |
2657 | + .cipher_key = { |
2658 | + .data = { |
2659 | + 0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb, |
2660 | + 0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a |
2661 | + }, |
2662 | + .len = 16, |
2663 | + }, |
2664 | + .cipher_iv = { |
2665 | + .data = { |
2666 | + 0xa9, 0x40, 0x59, 0xda, 0x50, 0x00, 0x00, 0x00, |
2667 | + 0x29, 0x40, 0x59, 0xda, 0x50, 0x00, 0x80, 0x00 |
2668 | + }, |
2669 | + .len = 16, |
2670 | + }, |
2671 | + .cipher = { |
2672 | + .len_bits = 77 << 3, |
2673 | + .offset_bits = 0, |
2674 | + }, |
2675 | + .plaintext = { |
2676 | + .data = { |
2677 | + 0x98, 0x3b, 0x41, 0xd4, 0x7d, 0x78, 0x0c, 0x9e, |
2678 | + 0x1a, 0xd1, 0x1d, 0x7e, 0xb7, 0x03, 0x91, 0xb1, |
2679 | + 0xde, 0x0b, 0x35, 0xda, 0x2d, 0xc6, 0x2f, 0x83, |
2680 | + 0xe7, 0xb7, 0x8d, 0x63, 0x06, 0xca, 0x0e, 0xa0, |
2681 | + 0x7e, 0x94, 0x1b, 0x7b, 0xe9, 0x13, 0x48, 0xf9, |
2682 | + 0xfc, 0xb1, 0x70, 0xe2, 0x21, 0x7f, 0xec, 0xd9, |
2683 | + 0x7f, 0x9f, 0x68, 0xad, 0xb1, 0x6e, 0x5d, 0x7d, |
2684 | + 0x21, 0xe5, 0x69, 0xd2, 0x80, 0xed, 0x77, 0x5c, |
2685 | + 0xeb, 0xde, 0x3f, 0x40, 0x93, 0xc5, 0x38, 0x81, |
2686 | + 0x00 |
2687 | + }, |
2688 | + .len_bits = 73 << 3, |
2689 | + }, |
2690 | + .ciphertext = { |
2691 | + .data = { |
2692 | + 0x53, 0x92, 0x9F, 0x88, 0x32, 0xA1, 0x6D, 0x66, |
2693 | + 0x00, 0x32, 0x29, 0xF9, 0x14, 0x75, 0x6D, 0xB3, |
2694 | + 0xEB, 0x64, 0x25, 0x09, 0xE1, 0x80, 0x31, 0x8C, |
2695 | + 0xF8, 0x47, 0x64, 0xAA, 0x07, 0x8E, 0x06, 0xBF, |
2696 | + 0x05, 0xD7, 0x43, 0xEE, 0xFF, 0x11, 0x33, 0x4A, |
2697 | + 0x82, 0xCF, 0x88, 0x6F, 0x33, 0xB2, 0xB5, 0x67, |
2698 | + 0x50, 0x0A, 0x74, 0x2D, 0xE4, 0x56, 0x40, 0x31, |
2699 | + 0xEE, 0xB3, 0x6C, 0x6E, 0x6A, 0x7B, 0x20, 0xBA, |
2700 | + 0x4E, 0x44, 0x34, 0xC8, 0x62, 0x21, 0x8C, 0x45, |
2701 | + 0xD7, 0x85, 0x44, 0xF4, 0x7E |
2702 | + }, |
2703 | + .len_bits = 77 << 3, |
2704 | + }, |
2705 | + .digest_enc = { |
2706 | + .data = { |
2707 | + 0x85, 0x44, 0xF4, 0x7E |
2708 | + }, |
2709 | + .len = 4, |
2710 | + .offset = 73, |
2711 | + }, |
2712 | + .validDataLen = { |
2713 | + .len_bits = 77 << 3, |
2714 | + }, |
2715 | + .validCipherLen = { |
2716 | + .len_bits = 77 << 3, |
2717 | + }, |
2718 | + .validAuthLen = { |
2719 | + .len_bits = 73 << 3, |
2720 | + } |
2721 | +}; |
2722 | + |
2723 | +struct mixed_cipher_auth_test_data auth_snow_cipher_aes_ctr_test_case_1 = { |
2724 | + .auth_algo = RTE_CRYPTO_AUTH_SNOW3G_UIA2, |
2725 | + .auth_key = { |
2726 | + .data = { |
2727 | + 0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9, |
2728 | + 0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E |
2729 | + }, |
2730 | + .len = 16, |
2731 | + }, |
2732 | + .auth_iv = { |
2733 | + .data = { |
2734 | + 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD, |
2735 | + 0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD |
2736 | + }, |
2737 | + .len = 16, |
2738 | + }, |
2739 | + .auth = { |
2740 | + .len_bits = 48 << 3, |
2741 | + .offset_bits = 0, |
2742 | + }, |
2743 | + .cipher_algo = RTE_CRYPTO_CIPHER_AES_CTR, |
2744 | + .cipher_key = { |
2745 | + .data = { |
2746 | + 0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9, |
2747 | + 0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E |
2748 | + }, |
2749 | + .len = 16, |
2750 | + }, |
2751 | + .cipher_iv = { |
2752 | + .data = { |
2753 | + 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD, |
2754 | + 0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD |
2755 | + }, |
2756 | + .len = 16, |
2757 | + }, |
2758 | + .cipher = { |
2759 | + .len_bits = 52 << 3, |
2760 | + .offset_bits = 0, |
2761 | + }, |
2762 | + .plaintext = { |
2763 | + .data = { |
2764 | + 0xD0, 0xA7, 0xD4, 0x63, 0xDF, 0x9F, 0xB2, 0xB2, |
2765 | + 0x78, 0x83, 0x3F, 0xA0, 0x2E, 0x23, 0x5A, 0xA1, |
2766 | + 0x72, 0xBD, 0x97, 0x0C, 0x14, 0x73, 0xE1, 0x29, |
2767 | + 0x07, 0xFB, 0x64, 0x8B, 0x65, 0x99, 0xAA, 0xA0, |
2768 | + 0xB2, 0x4A, 0x03, 0x86, 0x65, 0x42, 0x2B, 0x20, |
2769 | + 0xA4, 0x99, 0x27, 0x6A, 0x50, 0x42, 0x70, 0x09 |
2770 | + }, |
2771 | + .len_bits = 48 << 3, |
2772 | + }, |
2773 | + .ciphertext = { |
2774 | + .data = { |
2775 | + 0x91, 0x96, 0x28, 0xB4, 0x89, 0x74, 0xF6, 0x5E, |
2776 | + 0x98, 0x58, 0xA1, 0xD3, 0x0E, 0xE3, 0xFC, 0x39, |
2777 | + 0xDB, 0x36, 0xE4, 0x97, 0x74, 0x5B, 0x5E, 0xD4, |
2778 | + 0x1B, 0x8A, 0xC5, 0x9D, 0xDF, 0x96, 0x97, 0x5F, |
2779 | + 0x58, 0x4A, 0x75, 0x74, 0x27, 0x07, 0xF3, 0x7F, |
2780 | + 0xCE, 0x2C, 0x4A, 0x6C, 0xE5, 0x19, 0xE7, 0x8B, |
2781 | + 0xF3, 0x21, 0x84, 0x6C |
2782 | + }, |
2783 | + .len_bits = 52 << 3, |
2784 | + }, |
2785 | + .digest_enc = { |
2786 | + .data = { |
2787 | + 0xF3, 0x21, 0x84, 0x6C |
2788 | + }, |
2789 | + .len = 4, |
2790 | + .offset = 48, |
2791 | + }, |
2792 | + .validDataLen = { |
2793 | + .len_bits = 52 << 3, |
2794 | + }, |
2795 | + .validCipherLen = { |
2796 | + .len_bits = 52 << 3, |
2797 | + }, |
2798 | + .validAuthLen = { |
2799 | + .len_bits = 48 << 3, |
2800 | + } |
2801 | +}; |
2802 | + |
2803 | +struct mixed_cipher_auth_test_data auth_snow_cipher_zuc_test_case_1 = { |
2804 | + .auth_algo = RTE_CRYPTO_AUTH_SNOW3G_UIA2, |
2805 | + .auth_key = { |
2806 | + .data = { |
2807 | + 0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9, |
2808 | + 0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E |
2809 | + }, |
2810 | + .len = 16, |
2811 | + }, |
2812 | + .auth_iv = { |
2813 | + .data = { |
2814 | + 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD, |
2815 | + 0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD |
2816 | + }, |
2817 | + .len = 16, |
2818 | + }, |
2819 | + .auth = { |
2820 | + .len_bits = 48 << 3, |
2821 | + .offset_bits = 0, |
2822 | + }, |
2823 | + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_EEA3, |
2824 | + .cipher_key = { |
2825 | + .data = { |
2826 | + 0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9, |
2827 | + 0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E |
2828 | + }, |
2829 | + .len = 16, |
2830 | + }, |
2831 | + .cipher_iv = { |
2832 | + .data = { |
2833 | + 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD, |
2834 | + 0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD |
2835 | + }, |
2836 | + .len = 16, |
2837 | + }, |
2838 | + .cipher = { |
2839 | + .len_bits = 52 << 3, |
2840 | + .offset_bits = 0, |
2841 | + }, |
2842 | + .plaintext = { |
2843 | + .data = { |
2844 | + 0xD0, 0xA7, 0xD4, 0x63, 0xDF, 0x9F, 0xB2, 0xB2, |
2845 | + 0x78, 0x83, 0x3F, 0xA0, 0x2E, 0x23, 0x5A, 0xA1, |
2846 | + 0x72, 0xBD, 0x97, 0x0C, 0x14, 0x73, 0xE1, 0x29, |
2847 | + 0x07, 0xFB, 0x64, 0x8B, 0x65, 0x99, 0xAA, 0xA0, |
2848 | + 0xB2, 0x4A, 0x03, 0x86, 0x65, 0x42, 0x2B, 0x20, |
2849 | + 0xA4, 0x99, 0x27, 0x6A, 0x50, 0x42, 0x70, 0x09 |
2850 | + }, |
2851 | + .len_bits = 48 << 3, |
2852 | + }, |
2853 | + .ciphertext = { |
2854 | + .data = { |
2855 | + 0x52, 0x11, 0xCD, 0xFF, 0xF8, 0x88, 0x61, 0x1E, |
2856 | + 0xF5, 0xD2, 0x8E, 0xEB, 0x2A, 0x49, 0x18, 0x1F, |
2857 | + 0xF4, 0xDA, 0x8B, 0x19, 0x60, 0x0B, 0x92, 0x9E, |
2858 | + 0x79, 0x2A, 0x5B, 0x0B, 0x7E, 0xC6, 0x22, 0x36, |
2859 | + 0x74, 0xA4, 0x6C, 0xBC, 0xF5, 0x25, 0x69, 0xAE, |
2860 | + 0xDA, 0x04, 0xB9, 0xAF, 0x16, 0x42, 0x0F, 0xCB, |
2861 | + 0x3E, 0xC9, 0x49, 0xE9 |
2862 | + }, |
2863 | + .len_bits = 52 << 3, |
2864 | + }, |
2865 | + .digest_enc = { |
2866 | + .data = { |
2867 | + 0x3E, 0xC9, 0x49, 0xE9 |
2868 | + }, |
2869 | + .len = 4, |
2870 | + .offset = 48, |
2871 | + }, |
2872 | + .validDataLen = { |
2873 | + .len_bits = 52 << 3, |
2874 | + }, |
2875 | + .validCipherLen = { |
2876 | + .len_bits = 52 << 3, |
2877 | + }, |
2878 | + .validAuthLen = { |
2879 | + .len_bits = 48 << 3, |
2880 | + } |
2881 | +}; |
2882 | + |
2883 | +struct mixed_cipher_auth_test_data auth_aes_cmac_cipher_zuc_test_case_1 = { |
2884 | + .auth_algo = RTE_CRYPTO_AUTH_AES_CMAC, |
2885 | + .auth_key = { |
2886 | + .data = { |
2887 | + 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, |
2888 | + 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C |
2889 | + }, |
2890 | + .len = 16, |
2891 | + }, |
2892 | + .auth_iv = { |
2893 | + .data = { |
2894 | + }, |
2895 | + .len = 0, |
2896 | + }, |
2897 | + .auth = { |
2898 | + .len_bits = 512 << 3, |
2899 | + .offset_bits = 0, |
2900 | + }, |
2901 | + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_EEA3, |
2902 | + .cipher_key = { |
2903 | + .data = { |
2904 | + 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, |
2905 | + 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C |
2906 | + }, |
2907 | + .len = 16, |
2908 | + }, |
2909 | + .cipher_iv = { |
2910 | + .data = { |
2911 | + }, |
2912 | + .len = 0, |
2913 | + }, |
2914 | + .cipher = { |
2915 | + .len_bits = 516 << 3, |
2916 | + .offset_bits = 0, |
2917 | + }, |
2918 | + .plaintext = { |
2919 | + .data = { |
2920 | + 0x57, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20, 0x6C, |
2921 | + 0x6F, 0x75, 0x73, 0x79, 0x20, 0x65, 0x61, 0x72, |
2922 | + 0x74, 0x68, 0x21, 0x20, 0x48, 0x65, 0x20, 0x77, |
2923 | + 0x6F, 0x6E, 0x64, 0x65, 0x72, 0x65, 0x64, 0x20, |
2924 | + 0x68, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79, |
2925 | + 0x20, 0x70, 0x65, 0x6F, 0x70, 0x6C, 0x65, 0x20, |
2926 | + 0x77, 0x65, 0x72, 0x65, 0x20, 0x64, 0x65, 0x73, |
2927 | + 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x20, 0x74, |
2928 | + 0x68, 0x61, 0x74, 0x20, 0x73, 0x61, 0x6D, 0x65, |
2929 | + 0x20, 0x6E, 0x69, 0x67, 0x68, 0x74, 0x20, 0x65, |
2930 | + 0x76, 0x65, 0x6E, 0x20, 0x69, 0x6E, 0x20, 0x68, |
2931 | + 0x69, 0x73, 0x20, 0x6F, 0x77, 0x6E, 0x20, 0x70, |
2932 | + 0x72, 0x6F, 0x73, 0x70, 0x65, 0x72, 0x6F, 0x75, |
2933 | + 0x73, 0x20, 0x63, 0x6F, 0x75, 0x6E, 0x74, 0x72, |
2934 | + 0x79, 0x2C, 0x20, 0x68, 0x6F, 0x77, 0x20, 0x6D, |
2935 | + 0x61, 0x6E, 0x79, 0x20, 0x68, 0x6F, 0x6D, 0x65, |
2936 | + 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x73, |
2937 | + 0x68, 0x61, 0x6E, 0x74, 0x69, 0x65, 0x73, 0x2C, |
2938 | + 0x20, 0x68, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, |
2939 | + 0x79, 0x20, 0x68, 0x75, 0x73, 0x62, 0x61, 0x6E, |
2940 | + 0x64, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, |
2941 | + 0x64, 0x72, 0x75, 0x6E, 0x6B, 0x20, 0x61, 0x6E, |
2942 | + 0x64, 0x20, 0x77, 0x69, 0x76, 0x65, 0x73, 0x20, |
2943 | + 0x73, 0x6F, 0x63, 0x6B, 0x65, 0x64, 0x2C, 0x20, |
2944 | + 0x61, 0x6E, 0x64, 0x20, 0x68, 0x6F, 0x77, 0x20, |
2945 | + 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x63, 0x68, 0x69, |
2946 | + 0x6C, 0x64, 0x72, 0x65, 0x6E, 0x20, 0x77, 0x65, |
2947 | + 0x72, 0x65, 0x20, 0x62, 0x75, 0x6C, 0x6C, 0x69, |
2948 | + 0x65, 0x64, 0x2C, 0x20, 0x61, 0x62, 0x75, 0x73, |
2949 | + 0x65, 0x64, 0x2C, 0x20, 0x6F, 0x72, 0x20, 0x61, |
2950 | + 0x62, 0x61, 0x6E, 0x64, 0x6F, 0x6E, 0x65, 0x64, |
2951 | + 0x2E, 0x20, 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, |
2952 | + 0x6E, 0x79, 0x20, 0x66, 0x61, 0x6D, 0x69, 0x6C, |
2953 | + 0x69, 0x65, 0x73, 0x20, 0x68, 0x75, 0x6E, 0x67, |
2954 | + 0x65, 0x72, 0x65, 0x64, 0x20, 0x66, 0x6F, 0x72, |
2955 | + 0x20, 0x66, 0x6F, 0x6F, 0x64, 0x20, 0x74, 0x68, |
2956 | + 0x65, 0x79, 0x20, 0x63, 0x6F, 0x75, 0x6C, 0x64, |
2957 | + 0x20, 0x6E, 0x6F, 0x74, 0x20, 0x61, 0x66, 0x66, |
2958 | + 0x6F, 0x72, 0x64, 0x20, 0x74, 0x6F, 0x20, 0x62, |
2959 | + 0x75, 0x79, 0x3F, 0x20, 0x48, 0x6F, 0x77, 0x20, |
2960 | + 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x68, 0x65, 0x61, |
2961 | + 0x72, 0x74, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, |
2962 | + 0x20, 0x62, 0x72, 0x6F, 0x6B, 0x65, 0x6E, 0x3F, |
2963 | + 0x20, 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, |
2964 | + 0x79, 0x20, 0x73, 0x75, 0x69, 0x63, 0x69, 0x64, |
2965 | + 0x65, 0x73, 0x20, 0x77, 0x6F, 0x75, 0x6C, 0x64, |
2966 | + 0x20, 0x74, 0x61, 0x6B, 0x65, 0x20, 0x70, 0x6C, |
2967 | + 0x61, 0x63, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, |
2968 | + 0x20, 0x73, 0x61, 0x6D, 0x65, 0x20, 0x6E, 0x69, |
2969 | + 0x67, 0x68, 0x74, 0x2C, 0x20, 0x68, 0x6F, 0x77, |
2970 | + 0x20, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x70, 0x65, |
2971 | + 0x6F, 0x70, 0x6C, 0x65, 0x20, 0x77, 0x6F, 0x75, |
2972 | + 0x6C, 0x64, 0x20, 0x67, 0x6F, 0x20, 0x69, 0x6E, |
2973 | + 0x73, 0x61, 0x6E, 0x65, 0x3F, 0x20, 0x48, 0x6F, |
2974 | + 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x63, |
2975 | + 0x6F, 0x63, 0x6B, 0x72, 0x6F, 0x61, 0x63, 0x68, |
2976 | + 0x65, 0x73, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x6C, |
2977 | + 0x61, 0x6E, 0x64, 0x6C, 0x6F, 0x72, 0x64, 0x73, |
2978 | + 0x20, 0x77, 0x6F, 0x75, 0x6C, 0x64, 0x20, 0x74, |
2979 | + 0x72, 0x69, 0x75, 0x6D, 0x70, 0x68, 0x3F, 0x20, |
2980 | + 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79, |
2981 | + 0x20, 0x77, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x73, |
2982 | + 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x6C, 0x6F, |
2983 | + 0x73, 0x65, 0x72, 0x73, 0x2C, 0x20, 0x73, 0x75 |
2984 | + }, |
2985 | + .len_bits = 512 << 3, |
2986 | + }, |
2987 | + .ciphertext = { |
2988 | + .data = { |
2989 | + 0x3C, 0x89, 0x1C, 0xE5, 0xB7, 0xDE, 0x61, 0x4D, |
2990 | + 0x05, 0x37, 0x3F, 0x40, 0xC9, 0xCF, 0x10, 0x07, |
2991 | + 0x7F, 0x18, 0xC5, 0x96, 0x21, 0xA9, 0xCF, 0xF5, |
2992 | + 0xBB, 0x9C, 0x22, 0x72, 0x00, 0xBE, 0xAC, 0x4B, |
2993 | + 0x55, 0x02, 0x19, 0x2B, 0x37, 0x64, 0x15, 0x6B, |
2994 | + 0x54, 0x74, 0xAE, 0x0F, 0xE7, 0x68, 0xB3, 0x92, |
2995 | + 0x17, 0x26, 0x75, 0xEE, 0x0B, 0xE9, 0x46, 0x3C, |
2996 | + 0x6E, 0x76, 0x52, 0x14, 0x2B, 0xD0, 0xB6, 0xD0, |
2997 | + 0x09, 0x07, 0x17, 0x12, 0x58, 0x61, 0xE8, 0x2A, |
2998 | + 0x7C, 0x55, 0x67, 0x66, 0x49, 0xD1, 0x4E, 0x2F, |
2999 | + 0x06, 0x96, 0x3A, 0xF7, 0x05, 0xE3, 0x65, 0x47, |
3000 | + 0x7C, 0xBB, 0x66, 0x25, 0xC4, 0x73, 0xB3, 0x7B, |
3001 | + 0x3D, 0x1D, 0x59, 0x54, 0x4E, 0x38, 0x9C, 0x4D, |
3002 | + 0x10, 0x4B, 0x49, 0xA4, 0x92, 0xC7, 0xD7, 0x17, |
3003 | + 0x6F, 0xC0, 0xEE, 0x8D, 0xBE, 0xA5, 0xE3, 0xB9, |
3004 | + 0xBA, 0x5E, 0x88, 0x36, 0x06, 0x19, 0xB7, 0x86, |
3005 | + 0x66, 0x19, 0x90, 0xC4, 0xAE, 0xB3, 0xFE, 0xA7, |
3006 | + 0xCF, 0x2A, 0xD8, 0x6C, 0x0E, 0xD5, 0x24, 0x2A, |
3007 | + 0x92, 0x93, 0xB9, 0x12, 0xCB, 0x50, 0x0A, 0x22, |
3008 | + 0xB0, 0x09, 0x06, 0x17, 0x85, 0xC9, 0x03, 0x70, |
3009 | + 0x18, 0xF2, 0xD5, 0x6A, 0x66, 0xC2, 0xB6, 0xC6, |
3010 | + 0xA5, 0xA3, 0x24, 0xEC, 0xB9, 0x07, 0xD5, 0x8A, |
3011 | + 0xA0, 0x44, 0x54, 0xD7, 0x21, 0x9F, 0x02, 0x83, |
3012 | + 0x78, 0x7B, 0x78, 0x9C, 0x97, 0x2A, 0x36, 0x51, |
3013 | + 0xAF, 0xE1, 0x79, 0x81, 0x07, 0x53, 0xE4, 0xA0, |
3014 | + 0xC7, 0xCF, 0x10, 0x7C, 0xB2, 0xE6, 0xA1, 0xFD, |
3015 | + 0x81, 0x0B, 0x96, 0x50, 0x5D, 0xFE, 0xB3, 0xC6, |
3016 | + 0x75, 0x00, 0x0C, 0x56, 0x83, 0x9B, 0x7B, 0xF4, |
3017 | + 0xE0, 0x3A, 0xC0, 0xE1, 0xA9, 0xEC, 0xAC, 0x47, |
3018 | + 0x24, 0xF5, 0x12, 0x1B, 0xD0, 0x28, 0x32, 0xE2, |
3019 | + 0x3B, 0x42, 0xC1, 0x5B, 0x98, 0x98, 0x78, 0x2D, |
3020 | + 0xC1, 0x69, 0x05, 0x37, 0x24, 0xF0, 0x73, 0xBA, |
3021 | + 0xBE, 0x57, 0xAC, 0x40, 0x9A, 0x91, 0x42, 0x49, |
3022 | + 0x31, 0x0F, 0xED, 0x45, 0xA8, 0x25, 0xFF, 0x1B, |
3023 | + 0xF4, 0x2F, 0x61, 0x7A, 0xB0, 0x60, 0xC6, 0x5E, |
3024 | + 0x0E, 0xF6, 0x96, 0x35, 0x90, 0xAF, 0x3B, 0x9D, |
3025 | + 0x4D, 0x6C, 0xE7, 0xF2, 0x4F, 0xC0, 0xBA, 0x57, |
3026 | + 0x92, 0x18, 0xB7, 0xF5, 0x1D, 0x06, 0x81, 0xF6, |
3027 | + 0xE3, 0xF4, 0x66, 0x8C, 0x33, 0x74, 0xBE, 0x64, |
3028 | + 0x8C, 0x18, 0xED, 0x7F, 0x68, 0x2A, 0xE4, 0xAF, |
3029 | + 0xF1, 0x02, 0x07, 0x51, 0x22, 0x96, 0xC8, 0x9E, |
3030 | + 0x23, 0x7F, 0x6A, 0xD7, 0x80, 0x0F, 0x2D, 0xFC, |
3031 | + 0xCC, 0xD0, 0x95, 0x86, 0x00, 0x2A, 0x77, 0xDD, |
3032 | + 0xA2, 0x60, 0x1E, 0x0F, 0x8E, 0x42, 0x44, 0x37, |
3033 | + 0x7E, 0x33, 0xC4, 0xE0, 0x04, 0x53, 0xF6, 0x3F, |
3034 | + 0xDD, 0x1D, 0x5E, 0x24, 0xDA, 0xAE, 0xEF, 0x06, |
3035 | + 0x06, 0x05, 0x13, 0x3A, 0x1E, 0xFF, 0xAD, 0xAD, |
3036 | + 0xEE, 0x0F, 0x6F, 0x05, 0xA5, 0xFB, 0x3B, 0xC3, |
3037 | + 0xDB, 0xA0, 0x20, 0xC1, 0x65, 0x8B, 0x39, 0xAB, |
3038 | + 0xC9, 0xEC, 0xA8, 0x31, 0x85, 0x6C, 0xD2, 0xE4, |
3039 | + 0x76, 0x77, 0x76, 0xD5, 0x81, 0x01, 0x73, 0x36, |
3040 | + 0x08, 0x8C, 0xC3, 0xD4, 0x70, 0x7A, 0xA3, 0xDF, |
3041 | + 0xAD, 0x3A, 0x00, 0x46, 0x88, 0x65, 0x10, 0xBE, |
3042 | + 0xD8, 0x1C, 0x19, 0x98, 0xE9, 0x29, 0xDD, 0x58, |
3043 | + 0x46, 0x31, 0xEB, 0x3D, 0xD0, 0x12, 0x02, 0x83, |
3044 | + 0x15, 0xDD, 0x70, 0x27, 0x0D, 0xB5, 0xBB, 0x0C, |
3045 | + 0xE3, 0xF1, 0x02, 0xF2, 0xD7, 0x1D, 0x17, 0x6D, |
3046 | + 0xDF, 0x2A, 0x42, 0x1F, 0x01, 0x5C, 0x68, 0xB1, |
3047 | + 0x64, 0x74, 0xCE, 0x74, 0xB1, 0x3C, 0x2F, 0x43, |
3048 | + 0x5F, 0xB7, 0x7E, 0x3E, 0x6F, 0xE3, 0xDC, 0x03, |
3049 | + 0xD9, 0x0C, 0xDD, 0x42, 0x65, 0x7F, 0xEA, 0x69, |
3050 | + 0x6F, 0xDB, 0xD7, 0xFB, 0xFF, 0x4D, 0xB4, 0x48, |
3051 | + 0xFE, 0x0F, 0x59, 0x24, 0x8F, 0x13, 0xA8, 0x60, |
3052 | + 0xF7, 0x13, 0xE5, 0xB1, 0x8D, 0xB7, 0x70, 0xEE, |
3053 | + 0x82, 0x8F, 0xCF, 0x7E |
3054 | + }, |
3055 | + .len_bits = 516 << 3, |
3056 | + }, |
3057 | + .digest_enc = { |
3058 | + .data = { |
3059 | + 0x82, 0x8F, 0xCF, 0x7E |
3060 | + }, |
3061 | + .len = 4, |
3062 | + .offset = 512, |
3063 | + }, |
3064 | + .validDataLen = { |
3065 | + .len_bits = 516 << 3, |
3066 | + }, |
3067 | + .validCipherLen = { |
3068 | + .len_bits = 516 << 3, |
3069 | + }, |
3070 | + .validAuthLen = { |
3071 | + .len_bits = 512 << 3, |
3072 | + } |
3073 | +}; |
3074 | + |
3075 | +struct mixed_cipher_auth_test_data auth_null_cipher_snow_test_case_1 = { |
3076 | + .auth_algo = RTE_CRYPTO_AUTH_NULL, |
3077 | + .auth_key = { |
3078 | + .data = { |
3079 | + 0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9, |
3080 | + 0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E |
3081 | + }, |
3082 | + .len = 16, |
3083 | + }, |
3084 | + .auth_iv = { |
3085 | + .data = { |
3086 | + 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD, |
3087 | + 0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD |
3088 | + }, |
3089 | + .len = 16, |
3090 | + }, |
3091 | + .auth = { |
3092 | + .len_bits = 44 << 3, |
3093 | + .offset_bits = 0, |
3094 | + }, |
3095 | + .cipher_algo = RTE_CRYPTO_CIPHER_SNOW3G_UEA2, |
3096 | + .cipher_key = { |
3097 | + .data = { |
3098 | + 0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9, |
3099 | + 0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E |
3100 | + }, |
3101 | + .len = 16, |
3102 | + }, |
3103 | + .cipher_iv = { |
3104 | + .data = { |
3105 | + 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD, |
3106 | + 0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD |
3107 | + }, |
3108 | + .len = 16, |
3109 | + }, |
3110 | + .cipher = { |
3111 | + .len_bits = 48 << 3, |
3112 | + .offset_bits = 0, |
3113 | + }, |
3114 | + .plaintext = { |
3115 | + .data = { |
3116 | + 0xD0, 0xA7, 0xD4, 0x63, 0xDF, 0x9F, 0xB2, 0xB2, |
3117 | + 0x78, 0x83, 0x3F, 0xA0, 0x2E, 0x23, 0x5A, 0xA1, |
3118 | + 0x72, 0xBD, 0x97, 0x0C, 0x14, 0x73, 0xE1, 0x29, |
3119 | + 0x07, 0xFB, 0x64, 0x8B, 0x65, 0x99, 0xAA, 0xA0, |
3120 | + 0xB2, 0x4A, 0x03, 0x86, 0x65, 0x42, 0x2B, 0x20, |
3121 | + 0xA4, 0x99, 0x27, 0x6A, |
3122 | + }, |
3123 | + .len_bits = 44 << 3, |
3124 | + }, |
3125 | + .ciphertext = { |
3126 | + .data = { |
3127 | + 0x95, 0x2E, 0x5A, 0xE1, 0x50, 0xB8, 0x59, 0x2A, |
3128 | + 0x9B, 0xA0, 0x38, 0xA9, 0x8E, 0x2F, 0xED, 0xAB, |
3129 | + 0xFD, 0xC8, 0x3B, 0x47, 0x46, 0x0B, 0x50, 0x16, |
3130 | + 0xEC, 0x88, 0x45, 0xB6, 0x05, 0xC7, 0x54, 0xF8, |
3131 | + 0xBD, 0x91, 0xAA, 0xB6, 0xA4, 0xDC, 0x64, 0xB4, |
3132 | + 0xCB, 0xEB, 0x97, 0x06, 0x1C, 0xB5, 0x72, 0x34 |
3133 | + }, |
3134 | + .len_bits = 48 << 3, |
3135 | + }, |
3136 | + .digest_enc = { |
3137 | + .data = { |
3138 | + 0x1C, 0xB5, 0x72, 0x34 |
3139 | + }, |
3140 | + .len = 4, |
3141 | + .offset = 44, |
3142 | + }, |
3143 | + .validDataLen = { |
3144 | + .len_bits = 48 << 3, |
3145 | + }, |
3146 | + .validCipherLen = { |
3147 | + .len_bits = 48 << 3, |
3148 | + }, |
3149 | + .validAuthLen = { |
3150 | + .len_bits = 44 << 3, |
3151 | + } |
3152 | +}; |
3153 | + |
3154 | +struct mixed_cipher_auth_test_data auth_null_cipher_zuc_test_case_1 = { |
3155 | + .auth_algo = RTE_CRYPTO_AUTH_NULL, |
3156 | + .auth_key = { |
3157 | + .data = { |
3158 | + 0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9, |
3159 | + 0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E |
3160 | + }, |
3161 | + .len = 16, |
3162 | + }, |
3163 | + .auth_iv = { |
3164 | + .data = { |
3165 | + 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD, |
3166 | + 0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD |
3167 | + }, |
3168 | + .len = 16, |
3169 | + }, |
3170 | + .auth = { |
3171 | + .len_bits = 48 << 3, |
3172 | + .offset_bits = 0, |
3173 | + }, |
3174 | + .cipher_algo = RTE_CRYPTO_CIPHER_ZUC_EEA3, |
3175 | + .cipher_key = { |
3176 | + .data = { |
3177 | + 0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9, |
3178 | + 0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E |
3179 | + }, |
3180 | + .len = 16, |
3181 | + }, |
3182 | + .cipher_iv = { |
3183 | + .data = { |
3184 | + 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD, |
3185 | + 0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD |
3186 | + }, |
3187 | + .len = 16, |
3188 | + }, |
3189 | + .cipher = { |
3190 | + .len_bits = 52 << 3, |
3191 | + .offset_bits = 0, |
3192 | + }, |
3193 | + .plaintext = { |
3194 | + .data = { |
3195 | + 0xD0, 0xA7, 0xD4, 0x63, 0xDF, 0x9F, 0xB2, 0xB2, |
3196 | + 0x78, 0x83, 0x3F, 0xA0, 0x2E, 0x23, 0x5A, 0xA1, |
3197 | + 0x72, 0xBD, 0x97, 0x0C, 0x14, 0x73, 0xE1, 0x29, |
3198 | + 0x07, 0xFB, 0x64, 0x8B, 0x65, 0x99, 0xAA, 0xA0, |
3199 | + 0xB2, 0x4A, 0x03, 0x86, 0x65, 0x42, 0x2B, 0x20, |
3200 | + 0xA4, 0x99, 0x27, 0x6A, 0x50, 0x42, 0x70, 0x09 |
3201 | + }, |
3202 | + .len_bits = 48 << 3, |
3203 | + }, |
3204 | + .ciphertext = { |
3205 | + .data = { |
3206 | + 0x52, 0x11, 0xCD, 0xFF, 0xF8, 0x88, 0x61, 0x1E, |
3207 | + 0xF5, 0xD2, 0x8E, 0xEB, 0x2A, 0x49, 0x18, 0x1F, |
3208 | + 0xF4, 0xDA, 0x8B, 0x19, 0x60, 0x0B, 0x92, 0x9E, |
3209 | + 0x79, 0x2A, 0x5B, 0x0B, 0x7E, 0xC6, 0x22, 0x36, |
3210 | + 0x74, 0xA4, 0x6C, 0xBC, 0xF5, 0x25, 0x69, 0xAE, |
3211 | + 0xDA, 0x04, 0xB9, 0xAF, 0x16, 0x42, 0x0F, 0xCB, |
3212 | + 0x06, 0x7C, 0x1D, 0x29 |
3213 | + }, |
3214 | + .len_bits = 52 << 3, |
3215 | + }, |
3216 | + .digest_enc = { |
3217 | + .data = { |
3218 | + 0x06, 0x7C, 0x1D, 0x29 |
3219 | + }, |
3220 | + .len = 4, |
3221 | + .offset = 48, |
3222 | + }, |
3223 | + .validDataLen = { |
3224 | + .len_bits = 52 << 3, |
3225 | + }, |
3226 | + .validCipherLen = { |
3227 | + .len_bits = 52 << 3, |
3228 | + }, |
3229 | + .validAuthLen = { |
3230 | + .len_bits = 48 << 3, |
3231 | + } |
3232 | +}; |
3233 | + |
3234 | +struct mixed_cipher_auth_test_data auth_snow_cipher_null_test_case_1 = { |
3235 | + .auth_algo = RTE_CRYPTO_AUTH_SNOW3G_UIA2, |
3236 | + .auth_key = { |
3237 | + .data = { |
3238 | + 0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9, |
3239 | + 0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E |
3240 | + }, |
3241 | + .len = 16, |
3242 | + }, |
3243 | + .auth_iv = { |
3244 | + .data = { |
3245 | + 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD, |
3246 | + 0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD |
3247 | + }, |
3248 | + .len = 16, |
3249 | + }, |
3250 | + .auth = { |
3251 | + .len_bits = 48 << 3, |
3252 | + .offset_bits = 0, |
3253 | + }, |
3254 | + .cipher_algo = RTE_CRYPTO_CIPHER_NULL, |
3255 | + .cipher_key = { |
3256 | + .data = { |
3257 | + 0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9, |
3258 | + 0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E |
3259 | + }, |
3260 | + .len = 16, |
3261 | + }, |
3262 | + .cipher_iv = { |
3263 | + .data = { |
3264 | + 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD, |
3265 | + 0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD |
3266 | + }, |
3267 | + .len = 16, |
3268 | + }, |
3269 | + .cipher = { |
3270 | + .len_bits = 52 << 3, |
3271 | + .offset_bits = 0, |
3272 | + }, |
3273 | + .plaintext = { |
3274 | + .data = { |
3275 | + 0xD0, 0xA7, 0xD4, 0x63, 0xDF, 0x9F, 0xB2, 0xB2, |
3276 | + 0x78, 0x83, 0x3F, 0xA0, 0x2E, 0x23, 0x5A, 0xA1, |
3277 | + 0x72, 0xBD, 0x97, 0x0C, 0x14, 0x73, 0xE1, 0x29, |
3278 | + 0x07, 0xFB, 0x64, 0x8B, 0x65, 0x99, 0xAA, 0xA0, |
3279 | + 0xB2, 0x4A, 0x03, 0x86, 0x65, 0x42, 0x2B, 0x20, |
3280 | + 0xA4, 0x99, 0x27, 0x6A, 0x50, 0x42, 0x70, 0x09 |
3281 | + }, |
3282 | + .len_bits = 48 << 3, |
3283 | + }, |
3284 | + .ciphertext = { |
3285 | + .data = { |
3286 | + 0xD0, 0xA7, 0xD4, 0x63, 0xDF, 0x9F, 0xB2, 0xB2, |
3287 | + 0x78, 0x83, 0x3F, 0xA0, 0x2E, 0x23, 0x5A, 0xA1, |
3288 | + 0x72, 0xBD, 0x97, 0x0C, 0x14, 0x73, 0xE1, 0x29, |
3289 | + 0x07, 0xFB, 0x64, 0x8B, 0x65, 0x99, 0xAA, 0xA0, |
3290 | + 0xB2, 0x4A, 0x03, 0x86, 0x65, 0x42, 0x2B, 0x20, |
3291 | + 0xA4, 0x99, 0x27, 0x6A, 0x50, 0x42, 0x70, 0x09, |
3292 | + 0x38, 0xB5, 0x54, 0xC0 |
3293 | + }, |
3294 | + .len_bits = 52 << 3, |
3295 | + }, |
3296 | + .digest_enc = { |
3297 | + .data = { |
3298 | + 0x38, 0xB5, 0x54, 0xC0 |
3299 | + }, |
3300 | + .len = 4, |
3301 | + .offset = 48, |
3302 | + }, |
3303 | + .validDataLen = { |
3304 | + .len_bits = 52 << 3, |
3305 | + }, |
3306 | + .validCipherLen = { |
3307 | + .len_bits = 52 << 3, |
3308 | + }, |
3309 | + .validAuthLen = { |
3310 | + .len_bits = 48 << 3, |
3311 | + } |
3312 | +}; |
3313 | + |
3314 | +struct mixed_cipher_auth_test_data auth_zuc_cipher_null_test_case_1 = { |
3315 | + .auth_algo = RTE_CRYPTO_AUTH_ZUC_EIA3, |
3316 | + .auth_key = { |
3317 | + .data = { |
3318 | + 0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb, |
3319 | + 0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a |
3320 | + }, |
3321 | + .len = 16, |
3322 | + }, |
3323 | + .auth_iv = { |
3324 | + .data = { |
3325 | + 0xa9, 0x40, 0x59, 0xda, 0x50, 0x00, 0x00, 0x00, |
3326 | + 0x29, 0x40, 0x59, 0xda, 0x50, 0x00, 0x80, 0x00 |
3327 | + }, |
3328 | + .len = 16, |
3329 | + }, |
3330 | + .auth = { |
3331 | + .len_bits = 73 << 3, |
3332 | + .offset_bits = 0, |
3333 | + }, |
3334 | + .cipher_algo = RTE_CRYPTO_CIPHER_NULL, |
3335 | + .cipher_key = { |
3336 | + .data = { |
3337 | + 0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb, |
3338 | + 0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a |
3339 | + }, |
3340 | + .len = 16, |
3341 | + }, |
3342 | + .cipher_iv = { |
3343 | + .data = { |
3344 | + 0xa9, 0x40, 0x59, 0xda, 0x50, 0x00, 0x00, 0x00, |
3345 | + 0x29, 0x40, 0x59, 0xda, 0x50, 0x00, 0x80, 0x00 |
3346 | + }, |
3347 | + .len = 16, |
3348 | + }, |
3349 | + .cipher = { |
3350 | + .len_bits = 77 << 3, |
3351 | + .offset_bits = 0, |
3352 | + }, |
3353 | + .plaintext = { |
3354 | + .data = { |
3355 | + 0x98, 0x3b, 0x41, 0xd4, 0x7d, 0x78, 0x0c, 0x9e, |
3356 | + 0x1a, 0xd1, 0x1d, 0x7e, 0xb7, 0x03, 0x91, 0xb1, |
3357 | + 0xde, 0x0b, 0x35, 0xda, 0x2d, 0xc6, 0x2f, 0x83, |
3358 | + 0xe7, 0xb7, 0x8d, 0x63, 0x06, 0xca, 0x0e, 0xa0, |
3359 | + 0x7e, 0x94, 0x1b, 0x7b, 0xe9, 0x13, 0x48, 0xf9, |
3360 | + 0xfc, 0xb1, 0x70, 0xe2, 0x21, 0x7f, 0xec, 0xd9, |
3361 | + 0x7f, 0x9f, 0x68, 0xad, 0xb1, 0x6e, 0x5d, 0x7d, |
3362 | + 0x21, 0xe5, 0x69, 0xd2, 0x80, 0xed, 0x77, 0x5c, |
3363 | + 0xeb, 0xde, 0x3f, 0x40, 0x93, 0xc5, 0x38, 0x81, |
3364 | + 0x00 |
3365 | + }, |
3366 | + .len_bits = 73 << 3, |
3367 | + }, |
3368 | + .ciphertext = { |
3369 | + .data = { |
3370 | + 0x98, 0x3b, 0x41, 0xd4, 0x7d, 0x78, 0x0c, 0x9e, |
3371 | + 0x1a, 0xd1, 0x1d, 0x7e, 0xb7, 0x03, 0x91, 0xb1, |
3372 | + 0xde, 0x0b, 0x35, 0xda, 0x2d, 0xc6, 0x2f, 0x83, |
3373 | + 0xe7, 0xb7, 0x8d, 0x63, 0x06, 0xca, 0x0e, 0xa0, |
3374 | + 0x7e, 0x94, 0x1b, 0x7b, 0xe9, 0x13, 0x48, 0xf9, |
3375 | + 0xfc, 0xb1, 0x70, 0xe2, 0x21, 0x7f, 0xec, 0xd9, |
3376 | + 0x7f, 0x9f, 0x68, 0xad, 0xb1, 0x6e, 0x5d, 0x7d, |
3377 | + 0x21, 0xe5, 0x69, 0xd2, 0x80, 0xed, 0x77, 0x5c, |
3378 | + 0xeb, 0xde, 0x3f, 0x40, 0x93, 0xc5, 0x38, 0x81, |
3379 | + 0x00, 0x24, 0xa8, 0x42, 0xb3 |
3380 | + }, |
3381 | + .len_bits = 77 << 3, |
3382 | + }, |
3383 | + .digest_enc = { |
3384 | + .data = { |
3385 | + 0x24, 0xa8, 0x42, 0xb3 |
3386 | + }, |
3387 | + .len = 4, |
3388 | + .offset = 73, |
3389 | + }, |
3390 | + .validDataLen = { |
3391 | + .len_bits = 77 << 3, |
3392 | + }, |
3393 | + .validCipherLen = { |
3394 | + .len_bits = 77 << 3, |
3395 | + }, |
3396 | + .validAuthLen = { |
3397 | + .len_bits = 73 << 3, |
3398 | + } |
3399 | +}; |
3400 | + |
3401 | +struct mixed_cipher_auth_test_data auth_null_cipher_aes_ctr_test_case_1 = { |
3402 | + .auth_algo = RTE_CRYPTO_AUTH_NULL, |
3403 | + .auth_key = { |
3404 | + .data = { |
3405 | + 0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9, |
3406 | + 0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E |
3407 | + }, |
3408 | + .len = 16, |
3409 | + }, |
3410 | + .auth_iv = { |
3411 | + .data = { |
3412 | + 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD, |
3413 | + 0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD |
3414 | + }, |
3415 | + .len = 16, |
3416 | + }, |
3417 | + .auth = { |
3418 | + .len_bits = 48 << 3, |
3419 | + .offset_bits = 0, |
3420 | + }, |
3421 | + .cipher_algo = RTE_CRYPTO_CIPHER_AES_CTR, |
3422 | + .cipher_key = { |
3423 | + .data = { |
3424 | + 0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9, |
3425 | + 0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E |
3426 | + }, |
3427 | + .len = 16, |
3428 | + }, |
3429 | + .cipher_iv = { |
3430 | + .data = { |
3431 | + 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD, |
3432 | + 0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD |
3433 | + }, |
3434 | + .len = 16, |
3435 | + }, |
3436 | + .cipher = { |
3437 | + .len_bits = 52 << 3, |
3438 | + .offset_bits = 0, |
3439 | + }, |
3440 | + .plaintext = { |
3441 | + .data = { |
3442 | + 0xD0, 0xA7, 0xD4, 0x63, 0xDF, 0x9F, 0xB2, 0xB2, |
3443 | + 0x78, 0x83, 0x3F, 0xA0, 0x2E, 0x23, 0x5A, 0xA1, |
3444 | + 0x72, 0xBD, 0x97, 0x0C, 0x14, 0x73, 0xE1, 0x29, |
3445 | + 0x07, 0xFB, 0x64, 0x8B, 0x65, 0x99, 0xAA, 0xA0, |
3446 | + 0xB2, 0x4A, 0x03, 0x86, 0x65, 0x42, 0x2B, 0x20, |
3447 | + 0xA4, 0x99, 0x27, 0x6A, 0x50, 0x42, 0x70, 0x09 |
3448 | + }, |
3449 | + .len_bits = 48 << 3, |
3450 | + }, |
3451 | + .ciphertext = { |
3452 | + .data = { |
3453 | + 0x91, 0x96, 0x28, 0xB4, 0x89, 0x74, 0xF6, 0x5E, |
3454 | + 0x98, 0x58, 0xA1, 0xD3, 0x0E, 0xE3, 0xFC, 0x39, |
3455 | + 0xDB, 0x36, 0xE4, 0x97, 0x74, 0x5B, 0x5E, 0xD4, |
3456 | + 0x1B, 0x8A, 0xC5, 0x9D, 0xDF, 0x96, 0x97, 0x5F, |
3457 | + 0x58, 0x4A, 0x75, 0x74, 0x27, 0x07, 0xF3, 0x7F, |
3458 | + 0xCE, 0x2C, 0x4A, 0x6C, 0xE5, 0x19, 0xE7, 0x8B, |
3459 | + 0xCB, 0x94, 0xD0, 0xAC |
3460 | + }, |
3461 | + .len_bits = 52 << 3, |
3462 | + }, |
3463 | + .digest_enc = { |
3464 | + .data = { |
3465 | + 0xCB, 0x94, 0xD0, 0xAC |
3466 | + }, |
3467 | + .len = 4, |
3468 | + .offset = 48, |
3469 | + }, |
3470 | + .validDataLen = { |
3471 | + .len_bits = 52 << 3, |
3472 | + }, |
3473 | + .validCipherLen = { |
3474 | + .len_bits = 52 << 3, |
3475 | + }, |
3476 | + .validAuthLen = { |
3477 | + .len_bits = 48 << 3, |
3478 | + } |
3479 | +}; |
3480 | + |
3481 | +struct mixed_cipher_auth_test_data auth_aes_cmac_cipher_null_test_case_1 = { |
3482 | + .auth_algo = RTE_CRYPTO_AUTH_AES_CMAC, |
3483 | + .auth_key = { |
3484 | + .data = { |
3485 | + 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, |
3486 | + 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C |
3487 | + }, |
3488 | + .len = 16, |
3489 | + }, |
3490 | + .auth_iv = { |
3491 | + .data = { |
3492 | + }, |
3493 | + .len = 0, |
3494 | + }, |
3495 | + .auth = { |
3496 | + .len_bits = 512 << 3, |
3497 | + .offset_bits = 0, |
3498 | + }, |
3499 | + .cipher_algo = RTE_CRYPTO_CIPHER_NULL, |
3500 | + .cipher_key = { |
3501 | + .data = { |
3502 | + 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, |
3503 | + 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C |
3504 | + }, |
3505 | + .len = 16, |
3506 | + }, |
3507 | + .cipher_iv = { |
3508 | + .data = { |
3509 | + }, |
3510 | + .len = 0, |
3511 | + }, |
3512 | + .cipher = { |
3513 | + .len_bits = 516 << 3, |
3514 | + .offset_bits = 0, |
3515 | + }, |
3516 | + .plaintext = { |
3517 | + .data = { |
3518 | + 0x57, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20, 0x6C, |
3519 | + 0x6F, 0x75, 0x73, 0x79, 0x20, 0x65, 0x61, 0x72, |
3520 | + 0x74, 0x68, 0x21, 0x20, 0x48, 0x65, 0x20, 0x77, |
3521 | + 0x6F, 0x6E, 0x64, 0x65, 0x72, 0x65, 0x64, 0x20, |
3522 | + 0x68, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79, |
3523 | + 0x20, 0x70, 0x65, 0x6F, 0x70, 0x6C, 0x65, 0x20, |
3524 | + 0x77, 0x65, 0x72, 0x65, 0x20, 0x64, 0x65, 0x73, |
3525 | + 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x20, 0x74, |
3526 | + 0x68, 0x61, 0x74, 0x20, 0x73, 0x61, 0x6D, 0x65, |
3527 | + 0x20, 0x6E, 0x69, 0x67, 0x68, 0x74, 0x20, 0x65, |
3528 | + 0x76, 0x65, 0x6E, 0x20, 0x69, 0x6E, 0x20, 0x68, |
3529 | + 0x69, 0x73, 0x20, 0x6F, 0x77, 0x6E, 0x20, 0x70, |
3530 | + 0x72, 0x6F, 0x73, 0x70, 0x65, 0x72, 0x6F, 0x75, |
3531 | + 0x73, 0x20, 0x63, 0x6F, 0x75, 0x6E, 0x74, 0x72, |
3532 | + 0x79, 0x2C, 0x20, 0x68, 0x6F, 0x77, 0x20, 0x6D, |
3533 | + 0x61, 0x6E, 0x79, 0x20, 0x68, 0x6F, 0x6D, 0x65, |
3534 | + 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x73, |
3535 | + 0x68, 0x61, 0x6E, 0x74, 0x69, 0x65, 0x73, 0x2C, |
3536 | + 0x20, 0x68, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, |
3537 | + 0x79, 0x20, 0x68, 0x75, 0x73, 0x62, 0x61, 0x6E, |
3538 | + 0x64, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, |
3539 | + 0x64, 0x72, 0x75, 0x6E, 0x6B, 0x20, 0x61, 0x6E, |
3540 | + 0x64, 0x20, 0x77, 0x69, 0x76, 0x65, 0x73, 0x20, |
3541 | + 0x73, 0x6F, 0x63, 0x6B, 0x65, 0x64, 0x2C, 0x20, |
3542 | + 0x61, 0x6E, 0x64, 0x20, 0x68, 0x6F, 0x77, 0x20, |
3543 | + 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x63, 0x68, 0x69, |
3544 | + 0x6C, 0x64, 0x72, 0x65, 0x6E, 0x20, 0x77, 0x65, |
3545 | + 0x72, 0x65, 0x20, 0x62, 0x75, 0x6C, 0x6C, 0x69, |
3546 | + 0x65, 0x64, 0x2C, 0x20, 0x61, 0x62, 0x75, 0x73, |
3547 | + 0x65, 0x64, 0x2C, 0x20, 0x6F, 0x72, 0x20, 0x61, |
3548 | + 0x62, 0x61, 0x6E, 0x64, 0x6F, 0x6E, 0x65, 0x64, |
3549 | + 0x2E, 0x20, 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, |
3550 | + 0x6E, 0x79, 0x20, 0x66, 0x61, 0x6D, 0x69, 0x6C, |
3551 | + 0x69, 0x65, 0x73, 0x20, 0x68, 0x75, 0x6E, 0x67, |
3552 | + 0x65, 0x72, 0x65, 0x64, 0x20, 0x66, 0x6F, 0x72, |
3553 | + 0x20, 0x66, 0x6F, 0x6F, 0x64, 0x20, 0x74, 0x68, |
3554 | + 0x65, 0x79, 0x20, 0x63, 0x6F, 0x75, 0x6C, 0x64, |
3555 | + 0x20, 0x6E, 0x6F, 0x74, 0x20, 0x61, 0x66, 0x66, |
3556 | + 0x6F, 0x72, 0x64, 0x20, 0x74, 0x6F, 0x20, 0x62, |
3557 | + 0x75, 0x79, 0x3F, 0x20, 0x48, 0x6F, 0x77, 0x20, |
3558 | + 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x68, 0x65, 0x61, |
3559 | + 0x72, 0x74, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, |
3560 | + 0x20, 0x62, 0x72, 0x6F, 0x6B, 0x65, 0x6E, 0x3F, |
3561 | + 0x20, 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, |
3562 | + 0x79, 0x20, 0x73, 0x75, 0x69, 0x63, 0x69, 0x64, |
3563 | + 0x65, 0x73, 0x20, 0x77, 0x6F, 0x75, 0x6C, 0x64, |
3564 | + 0x20, 0x74, 0x61, 0x6B, 0x65, 0x20, 0x70, 0x6C, |
3565 | + 0x61, 0x63, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, |
3566 | + 0x20, 0x73, 0x61, 0x6D, 0x65, 0x20, 0x6E, 0x69, |
3567 | + 0x67, 0x68, 0x74, 0x2C, 0x20, 0x68, 0x6F, 0x77, |
3568 | + 0x20, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x70, 0x65, |
3569 | + 0x6F, 0x70, 0x6C, 0x65, 0x20, 0x77, 0x6F, 0x75, |
3570 | + 0x6C, 0x64, 0x20, 0x67, 0x6F, 0x20, 0x69, 0x6E, |
3571 | + 0x73, 0x61, 0x6E, 0x65, 0x3F, 0x20, 0x48, 0x6F, |
3572 | + 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x63, |
3573 | + 0x6F, 0x63, 0x6B, 0x72, 0x6F, 0x61, 0x63, 0x68, |
3574 | + 0x65, 0x73, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x6C, |
3575 | + 0x61, 0x6E, 0x64, 0x6C, 0x6F, 0x72, 0x64, 0x73, |
3576 | + 0x20, 0x77, 0x6F, 0x75, 0x6C, 0x64, 0x20, 0x74, |
3577 | + 0x72, 0x69, 0x75, 0x6D, 0x70, 0x68, 0x3F, 0x20, |
3578 | + 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79, |
3579 | + 0x20, 0x77, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x73, |
3580 | + 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x6C, 0x6F, |
3581 | + 0x73, 0x65, 0x72, 0x73, 0x2C, 0x20, 0x73, 0x75 |
3582 | + }, |
3583 | + .len_bits = 512 << 3, |
3584 | + }, |
3585 | + .ciphertext = { |
3586 | + .data = { |
3587 | + 0x57, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20, 0x6C, |
3588 | + 0x6F, 0x75, 0x73, 0x79, 0x20, 0x65, 0x61, 0x72, |
3589 | + 0x74, 0x68, 0x21, 0x20, 0x48, 0x65, 0x20, 0x77, |
3590 | + 0x6F, 0x6E, 0x64, 0x65, 0x72, 0x65, 0x64, 0x20, |
3591 | + 0x68, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79, |
3592 | + 0x20, 0x70, 0x65, 0x6F, 0x70, 0x6C, 0x65, 0x20, |
3593 | + 0x77, 0x65, 0x72, 0x65, 0x20, 0x64, 0x65, 0x73, |
3594 | + 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x20, 0x74, |
3595 | + 0x68, 0x61, 0x74, 0x20, 0x73, 0x61, 0x6D, 0x65, |
3596 | + 0x20, 0x6E, 0x69, 0x67, 0x68, 0x74, 0x20, 0x65, |
3597 | + 0x76, 0x65, 0x6E, 0x20, 0x69, 0x6E, 0x20, 0x68, |
3598 | + 0x69, 0x73, 0x20, 0x6F, 0x77, 0x6E, 0x20, 0x70, |
3599 | + 0x72, 0x6F, 0x73, 0x70, 0x65, 0x72, 0x6F, 0x75, |
3600 | + 0x73, 0x20, 0x63, 0x6F, 0x75, 0x6E, 0x74, 0x72, |
3601 | + 0x79, 0x2C, 0x20, 0x68, 0x6F, 0x77, 0x20, 0x6D, |
3602 | + 0x61, 0x6E, 0x79, 0x20, 0x68, 0x6F, 0x6D, 0x65, |
3603 | + 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x73, |
3604 | + 0x68, 0x61, 0x6E, 0x74, 0x69, 0x65, 0x73, 0x2C, |
3605 | + 0x20, 0x68, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, |
3606 | + 0x79, 0x20, 0x68, 0x75, 0x73, 0x62, 0x61, 0x6E, |
3607 | + 0x64, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, |
3608 | + 0x64, 0x72, 0x75, 0x6E, 0x6B, 0x20, 0x61, 0x6E, |
3609 | + 0x64, 0x20, 0x77, 0x69, 0x76, 0x65, 0x73, 0x20, |
3610 | + 0x73, 0x6F, 0x63, 0x6B, 0x65, 0x64, 0x2C, 0x20, |
3611 | + 0x61, 0x6E, 0x64, 0x20, 0x68, 0x6F, 0x77, 0x20, |
3612 | + 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x63, 0x68, 0x69, |
3613 | + 0x6C, 0x64, 0x72, 0x65, 0x6E, 0x20, 0x77, 0x65, |
3614 | + 0x72, 0x65, 0x20, 0x62, 0x75, 0x6C, 0x6C, 0x69, |
3615 | + 0x65, 0x64, 0x2C, 0x20, 0x61, 0x62, 0x75, 0x73, |
3616 | + 0x65, 0x64, 0x2C, 0x20, 0x6F, 0x72, 0x20, 0x61, |
3617 | + 0x62, 0x61, 0x6E, 0x64, 0x6F, 0x6E, 0x65, 0x64, |
3618 | + 0x2E, 0x20, 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, |
3619 | + 0x6E, 0x79, 0x20, 0x66, 0x61, 0x6D, 0x69, 0x6C, |
3620 | + 0x69, 0x65, 0x73, 0x20, 0x68, 0x75, 0x6E, 0x67, |
3621 | + 0x65, 0x72, 0x65, 0x64, 0x20, 0x66, 0x6F, 0x72, |
3622 | + 0x20, 0x66, 0x6F, 0x6F, 0x64, 0x20, 0x74, 0x68, |
3623 | + 0x65, 0x79, 0x20, 0x63, 0x6F, 0x75, 0x6C, 0x64, |
3624 | + 0x20, 0x6E, 0x6F, 0x74, 0x20, 0x61, 0x66, 0x66, |
3625 | + 0x6F, 0x72, 0x64, 0x20, 0x74, 0x6F, 0x20, 0x62, |
3626 | + 0x75, 0x79, 0x3F, 0x20, 0x48, 0x6F, 0x77, 0x20, |
3627 | + 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x68, 0x65, 0x61, |
3628 | + 0x72, 0x74, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, |
3629 | + 0x20, 0x62, 0x72, 0x6F, 0x6B, 0x65, 0x6E, 0x3F, |
3630 | + 0x20, 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, |
3631 | + 0x79, 0x20, 0x73, 0x75, 0x69, 0x63, 0x69, 0x64, |
3632 | + 0x65, 0x73, 0x20, 0x77, 0x6F, 0x75, 0x6C, 0x64, |
3633 | + 0x20, 0x74, 0x61, 0x6B, 0x65, 0x20, 0x70, 0x6C, |
3634 | + 0x61, 0x63, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, |
3635 | + 0x20, 0x73, 0x61, 0x6D, 0x65, 0x20, 0x6E, 0x69, |
3636 | + 0x67, 0x68, 0x74, 0x2C, 0x20, 0x68, 0x6F, 0x77, |
3637 | + 0x20, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x70, 0x65, |
3638 | + 0x6F, 0x70, 0x6C, 0x65, 0x20, 0x77, 0x6F, 0x75, |
3639 | + 0x6C, 0x64, 0x20, 0x67, 0x6F, 0x20, 0x69, 0x6E, |
3640 | + 0x73, 0x61, 0x6E, 0x65, 0x3F, 0x20, 0x48, 0x6F, |
3641 | + 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x63, |
3642 | + 0x6F, 0x63, 0x6B, 0x72, 0x6F, 0x61, 0x63, 0x68, |
3643 | + 0x65, 0x73, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x6C, |
3644 | + 0x61, 0x6E, 0x64, 0x6C, 0x6F, 0x72, 0x64, 0x73, |
3645 | + 0x20, 0x77, 0x6F, 0x75, 0x6C, 0x64, 0x20, 0x74, |
3646 | + 0x72, 0x69, 0x75, 0x6D, 0x70, 0x68, 0x3F, 0x20, |
3647 | + 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79, |
3648 | + 0x20, 0x77, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x73, |
3649 | + 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x6C, 0x6F, |
3650 | + 0x73, 0x65, 0x72, 0x73, 0x2C, 0x20, 0x73, 0x75, |
3651 | + 0x4C, 0x77, 0x87, 0xA0 |
3652 | + }, |
3653 | + .len_bits = 516 << 3, |
3654 | + }, |
3655 | + .digest_enc = { |
3656 | + .data = { |
3657 | + 0x4C, 0x77, 0x87, 0xA0 |
3658 | + }, |
3659 | + .len = 4, |
3660 | + .offset = 512, |
3661 | + }, |
3662 | + .validDataLen = { |
3663 | + .len_bits = 516 << 3, |
3664 | + }, |
3665 | + .validCipherLen = { |
3666 | + .len_bits = 516 << 3, |
3667 | + }, |
3668 | + .validAuthLen = { |
3669 | + .len_bits = 512 << 3, |
3670 | + } |
3671 | +}; |
3672 | + |
3673 | #endif /* TEST_CRYPTODEV_MIXED_TEST_VECTORS_H_ */ |
3674 | diff --git a/app/test/test_cycles.c b/app/test/test_cycles.c |
3675 | index c78e6a5..97d42f3 100644 |
3676 | --- a/app/test/test_cycles.c |
3677 | +++ b/app/test/test_cycles.c |
3678 | @@ -79,8 +79,14 @@ REGISTER_TEST_COMMAND(cycles_autotest, test_cycles); |
3679 | static int |
3680 | test_delay_us_sleep(void) |
3681 | { |
3682 | + int rv; |
3683 | + |
3684 | rte_delay_us_callback_register(rte_delay_us_sleep); |
3685 | - return check_wait_one_second(); |
3686 | + rv = check_wait_one_second(); |
3687 | + /* restore original delay function */ |
3688 | + rte_delay_us_callback_register(rte_delay_us_block); |
3689 | + |
3690 | + return rv; |
3691 | } |
3692 | |
3693 | REGISTER_TEST_COMMAND(delay_us_sleep_autotest, test_delay_us_sleep); |
3694 | diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c |
3695 | index ba1f81c..3b2a4cb 100644 |
3696 | --- a/app/test/test_distributor.c |
3697 | +++ b/app/test/test_distributor.c |
3698 | @@ -27,7 +27,9 @@ struct worker_params worker_params; |
3699 | /* statics - all zero-initialized by default */ |
3700 | static volatile int quit; /**< general quit variable for all threads */ |
3701 | static volatile int zero_quit; /**< var for when we just want thr0 to quit*/ |
3702 | +static volatile int zero_sleep; /**< thr0 has quit basic loop and is sleeping*/ |
3703 | static volatile unsigned worker_idx; |
3704 | +static volatile unsigned zero_idx; |
3705 | |
3706 | struct worker_stats { |
3707 | volatile unsigned handled_packets; |
3708 | @@ -42,7 +44,8 @@ total_packet_count(void) |
3709 | { |
3710 | unsigned i, count = 0; |
3711 | for (i = 0; i < worker_idx; i++) |
3712 | - count += worker_stats[i].handled_packets; |
3713 | + count += __atomic_load_n(&worker_stats[i].handled_packets, |
3714 | + __ATOMIC_RELAXED); |
3715 | return count; |
3716 | } |
3717 | |
3718 | @@ -50,7 +53,10 @@ total_packet_count(void) |
3719 | static inline void |
3720 | clear_packet_count(void) |
3721 | { |
3722 | - memset(&worker_stats, 0, sizeof(worker_stats)); |
3723 | + unsigned int i; |
3724 | + for (i = 0; i < RTE_MAX_LCORE; i++) |
3725 | + __atomic_store_n(&worker_stats[i].handled_packets, 0, |
3726 | + __ATOMIC_RELAXED); |
3727 | } |
3728 | |
3729 | /* this is the basic worker function for sanity test |
3730 | @@ -62,23 +68,18 @@ handle_work(void *arg) |
3731 | struct rte_mbuf *buf[8] __rte_cache_aligned; |
3732 | struct worker_params *wp = arg; |
3733 | struct rte_distributor *db = wp->dist; |
3734 | - unsigned int count = 0, num = 0; |
3735 | + unsigned int num; |
3736 | unsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED); |
3737 | - int i; |
3738 | |
3739 | - for (i = 0; i < 8; i++) |
3740 | - buf[i] = NULL; |
3741 | - num = rte_distributor_get_pkt(db, id, buf, buf, num); |
3742 | + num = rte_distributor_get_pkt(db, id, buf, NULL, 0); |
3743 | while (!quit) { |
3744 | __atomic_fetch_add(&worker_stats[id].handled_packets, num, |
3745 | __ATOMIC_RELAXED); |
3746 | - count += num; |
3747 | num = rte_distributor_get_pkt(db, id, |
3748 | buf, buf, num); |
3749 | } |
3750 | __atomic_fetch_add(&worker_stats[id].handled_packets, num, |
3751 | __ATOMIC_RELAXED); |
3752 | - count += num; |
3753 | rte_distributor_return_pkt(db, id, buf, num); |
3754 | return 0; |
3755 | } |
3756 | @@ -102,6 +103,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) |
3757 | struct rte_mbuf *returns[BURST*2]; |
3758 | unsigned int i, count; |
3759 | unsigned int retries; |
3760 | + unsigned int processed; |
3761 | |
3762 | printf("=== Basic distributor sanity tests ===\n"); |
3763 | clear_packet_count(); |
3764 | @@ -115,7 +117,11 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) |
3765 | for (i = 0; i < BURST; i++) |
3766 | bufs[i]->hash.usr = 0; |
3767 | |
3768 | - rte_distributor_process(db, bufs, BURST); |
3769 | + processed = 0; |
3770 | + while (processed < BURST) |
3771 | + processed += rte_distributor_process(db, &bufs[processed], |
3772 | + BURST - processed); |
3773 | + |
3774 | count = 0; |
3775 | do { |
3776 | |
3777 | @@ -128,12 +134,14 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) |
3778 | printf("Line %d: Error, not all packets flushed. " |
3779 | "Expected %u, got %u\n", |
3780 | __LINE__, BURST, total_packet_count()); |
3781 | + rte_mempool_put_bulk(p, (void *)bufs, BURST); |
3782 | return -1; |
3783 | } |
3784 | |
3785 | for (i = 0; i < rte_lcore_count() - 1; i++) |
3786 | printf("Worker %u handled %u packets\n", i, |
3787 | - worker_stats[i].handled_packets); |
3788 | + __atomic_load_n(&worker_stats[i].handled_packets, |
3789 | + __ATOMIC_RELAXED)); |
3790 | printf("Sanity test with all zero hashes done.\n"); |
3791 | |
3792 | /* pick two flows and check they go correctly */ |
3793 | @@ -153,12 +161,15 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) |
3794 | printf("Line %d: Error, not all packets flushed. " |
3795 | "Expected %u, got %u\n", |
3796 | __LINE__, BURST, total_packet_count()); |
3797 | + rte_mempool_put_bulk(p, (void *)bufs, BURST); |
3798 | return -1; |
3799 | } |
3800 | |
3801 | for (i = 0; i < rte_lcore_count() - 1; i++) |
3802 | printf("Worker %u handled %u packets\n", i, |
3803 | - worker_stats[i].handled_packets); |
3804 | + __atomic_load_n( |
3805 | + &worker_stats[i].handled_packets, |
3806 | + __ATOMIC_RELAXED)); |
3807 | printf("Sanity test with two hash values done\n"); |
3808 | } |
3809 | |
3810 | @@ -179,12 +190,14 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) |
3811 | printf("Line %d: Error, not all packets flushed. " |
3812 | "Expected %u, got %u\n", |
3813 | __LINE__, BURST, total_packet_count()); |
3814 | + rte_mempool_put_bulk(p, (void *)bufs, BURST); |
3815 | return -1; |
3816 | } |
3817 | |
3818 | for (i = 0; i < rte_lcore_count() - 1; i++) |
3819 | printf("Worker %u handled %u packets\n", i, |
3820 | - worker_stats[i].handled_packets); |
3821 | + __atomic_load_n(&worker_stats[i].handled_packets, |
3822 | + __ATOMIC_RELAXED)); |
3823 | printf("Sanity test with non-zero hashes done\n"); |
3824 | |
3825 | rte_mempool_put_bulk(p, (void *)bufs, BURST); |
3826 | @@ -233,6 +246,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) |
3827 | if (num_returned != BIG_BATCH) { |
3828 | printf("line %d: Missing packets, expected %d\n", |
3829 | __LINE__, num_returned); |
3830 | + rte_mempool_put_bulk(p, (void *)many_bufs, BIG_BATCH); |
3831 | return -1; |
3832 | } |
3833 | |
3834 | @@ -247,6 +261,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p) |
3835 | |
3836 | if (j == BIG_BATCH) { |
3837 | printf("Error: could not find source packet #%u\n", i); |
3838 | + rte_mempool_put_bulk(p, (void *)many_bufs, BIG_BATCH); |
3839 | return -1; |
3840 | } |
3841 | } |
3842 | @@ -270,24 +285,20 @@ handle_work_with_free_mbufs(void *arg) |
3843 | struct rte_mbuf *buf[8] __rte_cache_aligned; |
3844 | struct worker_params *wp = arg; |
3845 | struct rte_distributor *d = wp->dist; |
3846 | - unsigned int count = 0; |
3847 | unsigned int i; |
3848 | - unsigned int num = 0; |
3849 | + unsigned int num; |
3850 | unsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED); |
3851 | |
3852 | - for (i = 0; i < 8; i++) |
3853 | - buf[i] = NULL; |
3854 | - num = rte_distributor_get_pkt(d, id, buf, buf, num); |
3855 | + num = rte_distributor_get_pkt(d, id, buf, NULL, 0); |
3856 | while (!quit) { |
3857 | - worker_stats[id].handled_packets += num; |
3858 | - count += num; |
3859 | + __atomic_fetch_add(&worker_stats[id].handled_packets, num, |
3860 | + __ATOMIC_RELAXED); |
3861 | for (i = 0; i < num; i++) |
3862 | rte_pktmbuf_free(buf[i]); |
3863 | - num = rte_distributor_get_pkt(d, |
3864 | - id, buf, buf, num); |
3865 | + num = rte_distributor_get_pkt(d, id, buf, NULL, 0); |
3866 | } |
3867 | - worker_stats[id].handled_packets += num; |
3868 | - count += num; |
3869 | + __atomic_fetch_add(&worker_stats[id].handled_packets, num, |
3870 | + __ATOMIC_RELAXED); |
3871 | rte_distributor_return_pkt(d, id, buf, num); |
3872 | return 0; |
3873 | } |
3874 | @@ -303,6 +314,7 @@ sanity_test_with_mbuf_alloc(struct worker_params *wp, struct rte_mempool *p) |
3875 | struct rte_distributor *d = wp->dist; |
3876 | unsigned i; |
3877 | struct rte_mbuf *bufs[BURST]; |
3878 | + unsigned int processed; |
3879 | |
3880 | printf("=== Sanity test with mbuf alloc/free (%s) ===\n", wp->name); |
3881 | |
3882 | @@ -313,10 +325,12 @@ sanity_test_with_mbuf_alloc(struct worker_params *wp, struct rte_mempool *p) |
3883 | rte_distributor_process(d, NULL, 0); |
3884 | for (j = 0; j < BURST; j++) { |
3885 | bufs[j]->hash.usr = (i+j) << 1; |
3886 | - rte_mbuf_refcnt_set(bufs[j], 1); |
3887 | } |
3888 | |
3889 | - rte_distributor_process(d, bufs, BURST); |
3890 | + processed = 0; |
3891 | + while (processed < BURST) |
3892 | + processed += rte_distributor_process(d, |
3893 | + &bufs[processed], BURST - processed); |
3894 | } |
3895 | |
3896 | rte_distributor_flush(d); |
3897 | @@ -337,55 +351,61 @@ sanity_test_with_mbuf_alloc(struct worker_params *wp, struct rte_mempool *p) |
3898 | static int |
3899 | handle_work_for_shutdown_test(void *arg) |
3900 | { |
3901 | - struct rte_mbuf *pkt = NULL; |
3902 | struct rte_mbuf *buf[8] __rte_cache_aligned; |
3903 | struct worker_params *wp = arg; |
3904 | struct rte_distributor *d = wp->dist; |
3905 | - unsigned int count = 0; |
3906 | - unsigned int num = 0; |
3907 | - unsigned int total = 0; |
3908 | - unsigned int i; |
3909 | - unsigned int returned = 0; |
3910 | + unsigned int num; |
3911 | + unsigned int zero_id = 0; |
3912 | + unsigned int zero_unset; |
3913 | const unsigned int id = __atomic_fetch_add(&worker_idx, 1, |
3914 | __ATOMIC_RELAXED); |
3915 | |
3916 | - num = rte_distributor_get_pkt(d, id, buf, buf, num); |
3917 | + num = rte_distributor_get_pkt(d, id, buf, NULL, 0); |
3918 | + |
3919 | + if (num > 0) { |
3920 | + zero_unset = RTE_MAX_LCORE; |
3921 | + __atomic_compare_exchange_n(&zero_idx, &zero_unset, id, |
3922 | + 0, __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE); |
3923 | + } |
3924 | + zero_id = __atomic_load_n(&zero_idx, __ATOMIC_ACQUIRE); |
3925 | |
3926 | /* wait for quit single globally, or for worker zero, wait |
3927 | * for zero_quit */ |
3928 | - while (!quit && !(id == 0 && zero_quit)) { |
3929 | - worker_stats[id].handled_packets += num; |
3930 | - count += num; |
3931 | - for (i = 0; i < num; i++) |
3932 | - rte_pktmbuf_free(buf[i]); |
3933 | - num = rte_distributor_get_pkt(d, |
3934 | - id, buf, buf, num); |
3935 | - total += num; |
3936 | + while (!quit && !(id == zero_id && zero_quit)) { |
3937 | + __atomic_fetch_add(&worker_stats[id].handled_packets, num, |
3938 | + __ATOMIC_RELAXED); |
3939 | + num = rte_distributor_get_pkt(d, id, buf, NULL, 0); |
3940 | + |
3941 | + if (num > 0) { |
3942 | + zero_unset = RTE_MAX_LCORE; |
3943 | + __atomic_compare_exchange_n(&zero_idx, &zero_unset, id, |
3944 | + 0, __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE); |
3945 | + } |
3946 | + zero_id = __atomic_load_n(&zero_idx, __ATOMIC_ACQUIRE); |
3947 | } |
3948 | - worker_stats[id].handled_packets += num; |
3949 | - count += num; |
3950 | - returned = rte_distributor_return_pkt(d, id, buf, num); |
3951 | |
3952 | - if (id == 0) { |
3953 | + __atomic_fetch_add(&worker_stats[id].handled_packets, num, |
3954 | + __ATOMIC_RELAXED); |
3955 | + if (id == zero_id) { |
3956 | + rte_distributor_return_pkt(d, id, NULL, 0); |
3957 | + |
3958 | /* for worker zero, allow it to restart to pick up last packet |
3959 | * when all workers are shutting down. |
3960 | */ |
3961 | + __atomic_store_n(&zero_sleep, 1, __ATOMIC_RELEASE); |
3962 | while (zero_quit) |
3963 | usleep(100); |
3964 | + __atomic_store_n(&zero_sleep, 0, __ATOMIC_RELEASE); |
3965 | |
3966 | - num = rte_distributor_get_pkt(d, |
3967 | - id, buf, buf, num); |
3968 | + num = rte_distributor_get_pkt(d, id, buf, NULL, 0); |
3969 | |
3970 | while (!quit) { |
3971 | - worker_stats[id].handled_packets += num; |
3972 | - count += num; |
3973 | - rte_pktmbuf_free(pkt); |
3974 | - num = rte_distributor_get_pkt(d, id, buf, buf, num); |
3975 | + __atomic_fetch_add(&worker_stats[id].handled_packets, |
3976 | + num, __ATOMIC_RELAXED); |
3977 | + num = rte_distributor_get_pkt(d, id, buf, NULL, 0); |
3978 | } |
3979 | - returned = rte_distributor_return_pkt(d, |
3980 | - id, buf, num); |
3981 | - printf("Num returned = %d\n", returned); |
3982 | } |
3983 | + rte_distributor_return_pkt(d, id, buf, num); |
3984 | return 0; |
3985 | } |
3986 | |
3987 | @@ -401,7 +421,10 @@ sanity_test_with_worker_shutdown(struct worker_params *wp, |
3988 | { |
3989 | struct rte_distributor *d = wp->dist; |
3990 | struct rte_mbuf *bufs[BURST]; |
3991 | - unsigned i; |
3992 | + struct rte_mbuf *bufs2[BURST]; |
3993 | + unsigned int i; |
3994 | + unsigned int failed = 0; |
3995 | + unsigned int processed = 0; |
3996 | |
3997 | printf("=== Sanity test of worker shutdown ===\n"); |
3998 | |
3999 | @@ -419,7 +442,10 @@ sanity_test_with_worker_shutdown(struct worker_params *wp, |
4000 | for (i = 0; i < BURST; i++) |
4001 | bufs[i]->hash.usr = 1; |
4002 | |
4003 | - rte_distributor_process(d, bufs, BURST); |
4004 | + processed = 0; |
4005 | + while (processed < BURST) |
4006 | + processed += rte_distributor_process(d, &bufs[processed], |
4007 | + BURST - processed); |
4008 | rte_distributor_flush(d); |
4009 | |
4010 | /* at this point, we will have processed some packets and have a full |
4011 | @@ -427,32 +453,45 @@ sanity_test_with_worker_shutdown(struct worker_params *wp, |
4012 | */ |
4013 | |
4014 | /* get more buffers to queue up, again setting them to the same flow */ |
4015 | - if (rte_mempool_get_bulk(p, (void *)bufs, BURST) != 0) { |
4016 | + if (rte_mempool_get_bulk(p, (void *)bufs2, BURST) != 0) { |
4017 | printf("line %d: Error getting mbufs from pool\n", __LINE__); |
4018 | + rte_mempool_put_bulk(p, (void *)bufs, BURST); |
4019 | return -1; |
4020 | } |
4021 | for (i = 0; i < BURST; i++) |
4022 | - bufs[i]->hash.usr = 1; |
4023 | + bufs2[i]->hash.usr = 1; |
4024 | |
4025 | /* get worker zero to quit */ |
4026 | zero_quit = 1; |
4027 | - rte_distributor_process(d, bufs, BURST); |
4028 | + rte_distributor_process(d, bufs2, BURST); |
4029 | |
4030 | /* flush the distributor */ |
4031 | rte_distributor_flush(d); |
4032 | - rte_delay_us(10000); |
4033 | + while (!__atomic_load_n(&zero_sleep, __ATOMIC_ACQUIRE)) |
4034 | + rte_distributor_flush(d); |
4035 | + |
4036 | + zero_quit = 0; |
4037 | + while (__atomic_load_n(&zero_sleep, __ATOMIC_ACQUIRE)) |
4038 | + rte_delay_us(100); |
4039 | |
4040 | for (i = 0; i < rte_lcore_count() - 1; i++) |
4041 | printf("Worker %u handled %u packets\n", i, |
4042 | - worker_stats[i].handled_packets); |
4043 | + __atomic_load_n(&worker_stats[i].handled_packets, |
4044 | + __ATOMIC_RELAXED)); |
4045 | |
4046 | if (total_packet_count() != BURST * 2) { |
4047 | printf("Line %d: Error, not all packets flushed. " |
4048 | "Expected %u, got %u\n", |
4049 | __LINE__, BURST * 2, total_packet_count()); |
4050 | - return -1; |
4051 | + failed = 1; |
4052 | } |
4053 | |
4054 | + rte_mempool_put_bulk(p, (void *)bufs, BURST); |
4055 | + rte_mempool_put_bulk(p, (void *)bufs2, BURST); |
4056 | + |
4057 | + if (failed) |
4058 | + return -1; |
4059 | + |
4060 | printf("Sanity test with worker shutdown passed\n\n"); |
4061 | return 0; |
4062 | } |
4063 | @@ -466,7 +505,9 @@ test_flush_with_worker_shutdown(struct worker_params *wp, |
4064 | { |
4065 | struct rte_distributor *d = wp->dist; |
4066 | struct rte_mbuf *bufs[BURST]; |
4067 | - unsigned i; |
4068 | + unsigned int i; |
4069 | + unsigned int failed = 0; |
4070 | + unsigned int processed; |
4071 | |
4072 | printf("=== Test flush fn with worker shutdown (%s) ===\n", wp->name); |
4073 | |
4074 | @@ -481,7 +522,10 @@ test_flush_with_worker_shutdown(struct worker_params *wp, |
4075 | for (i = 0; i < BURST; i++) |
4076 | bufs[i]->hash.usr = 0; |
4077 | |
4078 | - rte_distributor_process(d, bufs, BURST); |
4079 | + processed = 0; |
4080 | + while (processed < BURST) |
4081 | + processed += rte_distributor_process(d, &bufs[processed], |
4082 | + BURST - processed); |
4083 | /* at this point, we will have processed some packets and have a full |
4084 | * backlog for the other ones at worker 0. |
4085 | */ |
4086 | @@ -492,20 +536,31 @@ test_flush_with_worker_shutdown(struct worker_params *wp, |
4087 | /* flush the distributor */ |
4088 | rte_distributor_flush(d); |
4089 | |
4090 | - rte_delay_us(10000); |
4091 | + while (!__atomic_load_n(&zero_sleep, __ATOMIC_ACQUIRE)) |
4092 | + rte_distributor_flush(d); |
4093 | |
4094 | zero_quit = 0; |
4095 | + |
4096 | + while (__atomic_load_n(&zero_sleep, __ATOMIC_ACQUIRE)) |
4097 | + rte_delay_us(100); |
4098 | + |
4099 | for (i = 0; i < rte_lcore_count() - 1; i++) |
4100 | printf("Worker %u handled %u packets\n", i, |
4101 | - worker_stats[i].handled_packets); |
4102 | + __atomic_load_n(&worker_stats[i].handled_packets, |
4103 | + __ATOMIC_RELAXED)); |
4104 | |
4105 | if (total_packet_count() != BURST) { |
4106 | printf("Line %d: Error, not all packets flushed. " |
4107 | "Expected %u, got %u\n", |
4108 | __LINE__, BURST, total_packet_count()); |
4109 | - return -1; |
4110 | + failed = 1; |
4111 | } |
4112 | |
4113 | + rte_mempool_put_bulk(p, (void *)bufs, BURST); |
4114 | + |
4115 | + if (failed) |
4116 | + return -1; |
4117 | + |
4118 | printf("Flush test with worker shutdown passed\n\n"); |
4119 | return 0; |
4120 | } |
4121 | @@ -571,21 +626,34 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p) |
4122 | const unsigned num_workers = rte_lcore_count() - 1; |
4123 | unsigned i; |
4124 | struct rte_mbuf *bufs[RTE_MAX_LCORE]; |
4125 | - rte_mempool_get_bulk(p, (void *)bufs, num_workers); |
4126 | + struct rte_mbuf *returns[RTE_MAX_LCORE]; |
4127 | + if (rte_mempool_get_bulk(p, (void *)bufs, num_workers) != 0) { |
4128 | + printf("line %d: Error getting mbufs from pool\n", __LINE__); |
4129 | + return; |
4130 | + } |
4131 | |
4132 | zero_quit = 0; |
4133 | quit = 1; |
4134 | - for (i = 0; i < num_workers; i++) |
4135 | + for (i = 0; i < num_workers; i++) { |
4136 | bufs[i]->hash.usr = i << 1; |
4137 | - rte_distributor_process(d, bufs, num_workers); |
4138 | - |
4139 | - rte_mempool_put_bulk(p, (void *)bufs, num_workers); |
4140 | + rte_distributor_process(d, &bufs[i], 1); |
4141 | + } |
4142 | |
4143 | rte_distributor_process(d, NULL, 0); |
4144 | rte_distributor_flush(d); |
4145 | rte_eal_mp_wait_lcore(); |
4146 | + |
4147 | + while (rte_distributor_returned_pkts(d, returns, RTE_MAX_LCORE)) |
4148 | + ; |
4149 | + |
4150 | + rte_distributor_clear_returns(d); |
4151 | + rte_mempool_put_bulk(p, (void *)bufs, num_workers); |
4152 | + |
4153 | quit = 0; |
4154 | worker_idx = 0; |
4155 | + zero_idx = RTE_MAX_LCORE; |
4156 | + zero_quit = 0; |
4157 | + zero_sleep = 0; |
4158 | } |
4159 | |
4160 | static int |
4161 | diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c |
4162 | index 8d42462..1a9aa06 100644 |
4163 | --- a/app/test/test_event_crypto_adapter.c |
4164 | +++ b/app/test/test_event_crypto_adapter.c |
4165 | @@ -171,7 +171,6 @@ test_op_forward_mode(uint8_t session_less) |
4166 | struct rte_event ev; |
4167 | uint32_t cap; |
4168 | int ret; |
4169 | - uint8_t cipher_key[17]; |
4170 | |
4171 | memset(&m_data, 0, sizeof(m_data)); |
4172 | |
4173 | @@ -183,14 +182,7 @@ test_op_forward_mode(uint8_t session_less) |
4174 | /* Setup Cipher Parameters */ |
4175 | cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER; |
4176 | cipher_xform.next = NULL; |
4177 | - |
4178 | - cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC; |
4179 | - cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT; |
4180 | - |
4181 | - cipher_xform.cipher.key.data = cipher_key; |
4182 | - cipher_xform.cipher.key.length = 16; |
4183 | - cipher_xform.cipher.iv.offset = IV_OFFSET; |
4184 | - cipher_xform.cipher.iv.length = 16; |
4185 | + cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL; |
4186 | |
4187 | op = rte_crypto_op_alloc(params.op_mpool, |
4188 | RTE_CRYPTO_OP_TYPE_SYMMETRIC); |
4189 | @@ -209,8 +201,8 @@ test_op_forward_mode(uint8_t session_less) |
4190 | &cipher_xform, params.session_priv_mpool); |
4191 | TEST_ASSERT_SUCCESS(ret, "Failed to init session\n"); |
4192 | |
4193 | - ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, |
4194 | - evdev, &cap); |
4195 | + ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, |
4196 | + &cap); |
4197 | TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n"); |
4198 | |
4199 | if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) { |
4200 | @@ -296,7 +288,7 @@ test_sessionless_with_op_forward_mode(void) |
4201 | uint32_t cap; |
4202 | int ret; |
4203 | |
4204 | - ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, evdev, &cap); |
4205 | + ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap); |
4206 | TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n"); |
4207 | |
4208 | if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) && |
4209 | @@ -321,7 +313,7 @@ test_session_with_op_forward_mode(void) |
4210 | uint32_t cap; |
4211 | int ret; |
4212 | |
4213 | - ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, evdev, &cap); |
4214 | + ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap); |
4215 | TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n"); |
4216 | |
4217 | if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) && |
4218 | @@ -378,7 +370,6 @@ test_op_new_mode(uint8_t session_less) |
4219 | struct rte_mbuf *m; |
4220 | uint32_t cap; |
4221 | int ret; |
4222 | - uint8_t cipher_key[17]; |
4223 | |
4224 | memset(&m_data, 0, sizeof(m_data)); |
4225 | |
4226 | @@ -390,14 +381,7 @@ test_op_new_mode(uint8_t session_less) |
4227 | /* Setup Cipher Parameters */ |
4228 | cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER; |
4229 | cipher_xform.next = NULL; |
4230 | - |
4231 | - cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC; |
4232 | - cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT; |
4233 | - |
4234 | - cipher_xform.cipher.key.data = cipher_key; |
4235 | - cipher_xform.cipher.key.length = 16; |
4236 | - cipher_xform.cipher.iv.offset = IV_OFFSET; |
4237 | - cipher_xform.cipher.iv.length = 16; |
4238 | + cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL; |
4239 | |
4240 | op = rte_crypto_op_alloc(params.op_mpool, |
4241 | RTE_CRYPTO_OP_TYPE_SYMMETRIC); |
4242 | @@ -410,8 +394,8 @@ test_op_new_mode(uint8_t session_less) |
4243 | params.session_mpool); |
4244 | TEST_ASSERT_NOT_NULL(sess, "Session creation failed\n"); |
4245 | |
4246 | - ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, |
4247 | - evdev, &cap); |
4248 | + ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, |
4249 | + &cap); |
4250 | TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n"); |
4251 | |
4252 | if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) { |
4253 | @@ -460,7 +444,7 @@ test_sessionless_with_op_new_mode(void) |
4254 | uint32_t cap; |
4255 | int ret; |
4256 | |
4257 | - ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, evdev, &cap); |
4258 | + ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap); |
4259 | TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n"); |
4260 | |
4261 | if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) && |
4262 | @@ -486,7 +470,7 @@ test_session_with_op_new_mode(void) |
4263 | uint32_t cap; |
4264 | int ret; |
4265 | |
4266 | - ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, evdev, &cap); |
4267 | + ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap); |
4268 | TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n"); |
4269 | |
4270 | if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) && |
4271 | @@ -564,7 +548,9 @@ configure_cryptodev(void) |
4272 | |
4273 | params.session_mpool = rte_cryptodev_sym_session_pool_create( |
4274 | "CRYPTO_ADAPTER_SESSION_MP", |
4275 | - MAX_NB_SESSIONS, 0, 0, 0, SOCKET_ID_ANY); |
4276 | + MAX_NB_SESSIONS, 0, 0, |
4277 | + sizeof(union rte_event_crypto_metadata), |
4278 | + SOCKET_ID_ANY); |
4279 | TEST_ASSERT_NOT_NULL(params.session_mpool, |
4280 | "session mempool allocation failed\n"); |
4281 | |
4282 | @@ -706,7 +692,7 @@ test_crypto_adapter_create(void) |
4283 | |
4284 | /* Create adapter with default port creation callback */ |
4285 | ret = rte_event_crypto_adapter_create(TEST_ADAPTER_ID, |
4286 | - TEST_CDEV_ID, |
4287 | + evdev, |
4288 | &conf, 0); |
4289 | TEST_ASSERT_SUCCESS(ret, "Failed to create event crypto adapter\n"); |
4290 | |
4291 | @@ -719,7 +705,7 @@ test_crypto_adapter_qp_add_del(void) |
4292 | uint32_t cap; |
4293 | int ret; |
4294 | |
4295 | - ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, evdev, &cap); |
4296 | + ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap); |
4297 | TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n"); |
4298 | |
4299 | if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND) { |
4300 | diff --git a/app/test/test_event_eth_tx_adapter.c b/app/test/test_event_eth_tx_adapter.c |
4301 | index 3af7492..7073030 100644 |
4302 | --- a/app/test/test_event_eth_tx_adapter.c |
4303 | +++ b/app/test/test_event_eth_tx_adapter.c |
4304 | @@ -45,7 +45,7 @@ static uint64_t eid = ~0ULL; |
4305 | static uint32_t tid; |
4306 | |
4307 | static inline int |
4308 | -port_init_common(uint8_t port, const struct rte_eth_conf *port_conf, |
4309 | +port_init_common(uint16_t port, const struct rte_eth_conf *port_conf, |
4310 | struct rte_mempool *mp) |
4311 | { |
4312 | const uint16_t rx_ring_size = RING_SIZE, tx_ring_size = RING_SIZE; |
4313 | @@ -104,7 +104,7 @@ port_init_common(uint8_t port, const struct rte_eth_conf *port_conf, |
4314 | } |
4315 | |
4316 | static inline int |
4317 | -port_init(uint8_t port, struct rte_mempool *mp) |
4318 | +port_init(uint16_t port, struct rte_mempool *mp) |
4319 | { |
4320 | struct rte_eth_conf conf = { 0 }; |
4321 | return port_init_common(port, &conf, mp); |
4322 | diff --git a/app/test/test_hash_readwrite_lf.c b/app/test/test_hash_readwrite_lf_perf.c |
4323 | similarity index 98% |
4324 | rename from app/test/test_hash_readwrite_lf.c |
4325 | rename to app/test/test_hash_readwrite_lf_perf.c |
4326 | index 97c3040..7bfc067 100644 |
4327 | --- a/app/test/test_hash_readwrite_lf.c |
4328 | +++ b/app/test/test_hash_readwrite_lf_perf.c |
4329 | @@ -1241,7 +1241,7 @@ err: |
4330 | } |
4331 | |
4332 | static int |
4333 | -test_hash_readwrite_lf_main(void) |
4334 | +test_hash_readwrite_lf_perf_main(void) |
4335 | { |
4336 | /* |
4337 | * Variables used to choose different tests. |
4338 | @@ -1254,7 +1254,7 @@ test_hash_readwrite_lf_main(void) |
4339 | int ext_bkt = 0; |
4340 | |
4341 | if (rte_lcore_count() < 2) { |
4342 | - printf("Not enough cores for hash_readwrite_lf_autotest, expecting at least 2\n"); |
4343 | + printf("Not enough cores for hash_readwrite_lf_perf_autotest, expecting at least 2\n"); |
4344 | return TEST_SKIPPED; |
4345 | } |
4346 | |
4347 | @@ -1431,4 +1431,5 @@ results: |
4348 | return 0; |
4349 | } |
4350 | |
4351 | -REGISTER_TEST_COMMAND(hash_readwrite_lf_autotest, test_hash_readwrite_lf_main); |
4352 | +REGISTER_TEST_COMMAND(hash_readwrite_lf_perf_autotest, |
4353 | + test_hash_readwrite_lf_perf_main); |
4354 | diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c |
4355 | index f2922e0..a5bd169 100644 |
4356 | --- a/app/test/test_mbuf.c |
4357 | +++ b/app/test/test_mbuf.c |
4358 | @@ -2481,9 +2481,13 @@ test_mbuf_dyn(struct rte_mempool *pktmbuf_pool) |
4359 | |
4360 | offset3 = rte_mbuf_dynfield_register_offset(&dynfield3, |
4361 | offsetof(struct rte_mbuf, dynfield1[1])); |
4362 | - if (offset3 != offsetof(struct rte_mbuf, dynfield1[1])) |
4363 | - GOTO_FAIL("failed to register dynamic field 3, offset=%d: %s", |
4364 | - offset3, strerror(errno)); |
4365 | + if (offset3 != offsetof(struct rte_mbuf, dynfield1[1])) { |
4366 | + if (rte_errno == EBUSY) |
4367 | + printf("mbuf test error skipped: dynfield is busy\n"); |
4368 | + else |
4369 | + GOTO_FAIL("failed to register dynamic field 3, offset=" |
4370 | + "%d: %s", offset3, strerror(errno)); |
4371 | + } |
4372 | |
4373 | printf("dynfield: offset=%d, offset2=%d, offset3=%d\n", |
4374 | offset, offset2, offset3); |
4375 | @@ -2519,7 +2523,7 @@ test_mbuf_dyn(struct rte_mempool *pktmbuf_pool) |
4376 | flag3 = rte_mbuf_dynflag_register_bitnum(&dynflag3, |
4377 | rte_bsf64(PKT_LAST_FREE)); |
4378 | if (flag3 != rte_bsf64(PKT_LAST_FREE)) |
4379 | - GOTO_FAIL("failed to register dynamic flag 3, flag2=%d: %s", |
4380 | + GOTO_FAIL("failed to register dynamic flag 3, flag3=%d: %s", |
4381 | flag3, strerror(errno)); |
4382 | |
4383 | printf("dynflag: flag=%d, flag2=%d, flag3=%d\n", flag, flag2, flag3); |
4384 | diff --git a/app/test/test_rcu_qsbr.c b/app/test/test_rcu_qsbr.c |
4385 | index b60dc50..5542b3c 100644 |
4386 | --- a/app/test/test_rcu_qsbr.c |
4387 | +++ b/app/test/test_rcu_qsbr.c |
4388 | @@ -273,13 +273,13 @@ static int |
4389 | test_rcu_qsbr_start(void) |
4390 | { |
4391 | uint64_t token; |
4392 | - int i; |
4393 | + unsigned int i; |
4394 | |
4395 | printf("\nTest rte_rcu_qsbr_start()\n"); |
4396 | |
4397 | rte_rcu_qsbr_init(t[0], RTE_MAX_LCORE); |
4398 | |
4399 | - for (i = 0; i < 3; i++) |
4400 | + for (i = 0; i < num_cores; i++) |
4401 | rte_rcu_qsbr_thread_register(t[0], enabled_core_ids[i]); |
4402 | |
4403 | token = rte_rcu_qsbr_start(t[0]); |
4404 | @@ -293,14 +293,18 @@ test_rcu_qsbr_check_reader(void *arg) |
4405 | { |
4406 | struct rte_rcu_qsbr *temp; |
4407 | uint8_t read_type = (uint8_t)((uintptr_t)arg); |
4408 | + unsigned int i; |
4409 | |
4410 | temp = t[read_type]; |
4411 | |
4412 | /* Update quiescent state counter */ |
4413 | - rte_rcu_qsbr_quiescent(temp, enabled_core_ids[0]); |
4414 | - rte_rcu_qsbr_quiescent(temp, enabled_core_ids[1]); |
4415 | - rte_rcu_qsbr_thread_unregister(temp, enabled_core_ids[2]); |
4416 | - rte_rcu_qsbr_quiescent(temp, enabled_core_ids[3]); |
4417 | + for (i = 0; i < num_cores; i++) { |
4418 | + if (i % 2 == 0) |
4419 | + rte_rcu_qsbr_quiescent(temp, enabled_core_ids[i]); |
4420 | + else |
4421 | + rte_rcu_qsbr_thread_unregister(temp, |
4422 | + enabled_core_ids[i]); |
4423 | + } |
4424 | return 0; |
4425 | } |
4426 | |
4427 | @@ -311,7 +315,8 @@ test_rcu_qsbr_check_reader(void *arg) |
4428 | static int |
4429 | test_rcu_qsbr_check(void) |
4430 | { |
4431 | - int i, ret; |
4432 | + int ret; |
4433 | + unsigned int i; |
4434 | uint64_t token; |
4435 | |
4436 | printf("\nTest rte_rcu_qsbr_check()\n"); |
4437 | @@ -329,7 +334,7 @@ test_rcu_qsbr_check(void) |
4438 | ret = rte_rcu_qsbr_check(t[0], token, true); |
4439 | TEST_RCU_QSBR_RETURN_IF_ERROR((ret == 0), "Blocking QSBR check"); |
4440 | |
4441 | - for (i = 0; i < 3; i++) |
4442 | + for (i = 0; i < num_cores; i++) |
4443 | rte_rcu_qsbr_thread_register(t[0], enabled_core_ids[i]); |
4444 | |
4445 | ret = rte_rcu_qsbr_check(t[0], token, false); |
4446 | @@ -344,7 +349,7 @@ test_rcu_qsbr_check(void) |
4447 | /* Threads are offline, hence this should pass */ |
4448 | TEST_RCU_QSBR_RETURN_IF_ERROR((ret == 0), "Non-blocking QSBR check"); |
4449 | |
4450 | - for (i = 0; i < 3; i++) |
4451 | + for (i = 0; i < num_cores; i++) |
4452 | rte_rcu_qsbr_thread_unregister(t[0], enabled_core_ids[i]); |
4453 | |
4454 | ret = rte_rcu_qsbr_check(t[0], token, true); |
4455 | @@ -352,7 +357,7 @@ test_rcu_qsbr_check(void) |
4456 | |
4457 | rte_rcu_qsbr_init(t[0], RTE_MAX_LCORE); |
4458 | |
4459 | - for (i = 0; i < 4; i++) |
4460 | + for (i = 0; i < num_cores; i++) |
4461 | rte_rcu_qsbr_thread_register(t[0], enabled_core_ids[i]); |
4462 | |
4463 | token = rte_rcu_qsbr_start(t[0]); |
4464 | @@ -591,7 +596,7 @@ test_rcu_qsbr_thread_offline(void) |
4465 | static int |
4466 | test_rcu_qsbr_dump(void) |
4467 | { |
4468 | - int i; |
4469 | + unsigned int i; |
4470 | |
4471 | printf("\nTest rte_rcu_qsbr_dump()\n"); |
4472 | |
4473 | @@ -608,7 +613,7 @@ test_rcu_qsbr_dump(void) |
4474 | |
4475 | rte_rcu_qsbr_thread_register(t[0], enabled_core_ids[0]); |
4476 | |
4477 | - for (i = 1; i < 3; i++) |
4478 | + for (i = 1; i < num_cores; i++) |
4479 | rte_rcu_qsbr_thread_register(t[1], enabled_core_ids[i]); |
4480 | |
4481 | rte_rcu_qsbr_dump(stdout, t[0]); |
4482 | @@ -758,7 +763,7 @@ test_rcu_qsbr_sw_sv_3qs(void) |
4483 | { |
4484 | uint64_t token[3]; |
4485 | uint32_t c; |
4486 | - int i; |
4487 | + int i, num_readers; |
4488 | int32_t pos[3]; |
4489 | |
4490 | writer_done = 0; |
4491 | @@ -781,7 +786,11 @@ test_rcu_qsbr_sw_sv_3qs(void) |
4492 | thread_info[0].ih = 0; |
4493 | |
4494 | /* Reader threads are launched */ |
4495 | - for (i = 0; i < 4; i++) |
4496 | + /* Keep the number of reader threads low to reduce |
4497 | + * the execution time. |
4498 | + */ |
4499 | + num_readers = num_cores < 4 ? num_cores : 4; |
4500 | + for (i = 0; i < num_readers; i++) |
4501 | rte_eal_remote_launch(test_rcu_qsbr_reader, &thread_info[0], |
4502 | enabled_core_ids[i]); |
4503 | |
4504 | @@ -814,7 +823,7 @@ test_rcu_qsbr_sw_sv_3qs(void) |
4505 | |
4506 | /* Check the quiescent state status */ |
4507 | rte_rcu_qsbr_check(t[0], token[0], true); |
4508 | - for (i = 0; i < 4; i++) { |
4509 | + for (i = 0; i < num_readers; i++) { |
4510 | c = hash_data[0][0][enabled_core_ids[i]]; |
4511 | if (c != COUNTER_VALUE && c != 0) { |
4512 | printf("Reader lcore %d did not complete #0 = %d\n", |
4513 | @@ -832,7 +841,7 @@ test_rcu_qsbr_sw_sv_3qs(void) |
4514 | |
4515 | /* Check the quiescent state status */ |
4516 | rte_rcu_qsbr_check(t[0], token[1], true); |
4517 | - for (i = 0; i < 4; i++) { |
4518 | + for (i = 0; i < num_readers; i++) { |
4519 | c = hash_data[0][3][enabled_core_ids[i]]; |
4520 | if (c != COUNTER_VALUE && c != 0) { |
4521 | printf("Reader lcore %d did not complete #3 = %d\n", |
4522 | @@ -850,7 +859,7 @@ test_rcu_qsbr_sw_sv_3qs(void) |
4523 | |
4524 | /* Check the quiescent state status */ |
4525 | rte_rcu_qsbr_check(t[0], token[2], true); |
4526 | - for (i = 0; i < 4; i++) { |
4527 | + for (i = 0; i < num_readers; i++) { |
4528 | c = hash_data[0][6][enabled_core_ids[i]]; |
4529 | if (c != COUNTER_VALUE && c != 0) { |
4530 | printf("Reader lcore %d did not complete #6 = %d\n", |
4531 | @@ -869,7 +878,7 @@ test_rcu_qsbr_sw_sv_3qs(void) |
4532 | writer_done = 1; |
4533 | |
4534 | /* Wait and check return value from reader threads */ |
4535 | - for (i = 0; i < 4; i++) |
4536 | + for (i = 0; i < num_readers; i++) |
4537 | if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0) |
4538 | goto error; |
4539 | rte_hash_free(h[0]); |
4540 | @@ -899,6 +908,12 @@ test_rcu_qsbr_mw_mv_mqs(void) |
4541 | unsigned int i, j; |
4542 | unsigned int test_cores; |
4543 | |
4544 | + if (RTE_MAX_LCORE < 5 || num_cores < 4) { |
4545 | + printf("Not enough cores for %s, expecting at least 5\n", |
4546 | + __func__); |
4547 | + return TEST_SKIPPED; |
4548 | + } |
4549 | + |
4550 | writer_done = 0; |
4551 | test_cores = num_cores / 4; |
4552 | test_cores = test_cores * 4; |
4553 | @@ -984,11 +999,6 @@ test_rcu_qsbr_main(void) |
4554 | { |
4555 | uint16_t core_id; |
4556 | |
4557 | - if (rte_lcore_count() < 5) { |
4558 | - printf("Not enough cores for rcu_qsbr_autotest, expecting at least 5\n"); |
4559 | - return TEST_SKIPPED; |
4560 | - } |
4561 | - |
4562 | num_cores = 0; |
4563 | RTE_LCORE_FOREACH_SLAVE(core_id) { |
4564 | enabled_core_ids[num_cores] = core_id; |
4565 | diff --git a/app/test/test_ring.c b/app/test/test_ring.c |
4566 | index aaf1e70..4825c9e 100644 |
4567 | --- a/app/test/test_ring.c |
4568 | +++ b/app/test/test_ring.c |
4569 | @@ -696,7 +696,7 @@ test_ring_basic_ex(void) |
4570 | |
4571 | printf("%u ring entries are now free\n", rte_ring_free_count(rp)); |
4572 | |
4573 | - for (i = 0; i < RING_SIZE; i ++) { |
4574 | + for (i = 0; i < RING_SIZE - 1; i ++) { |
4575 | rte_ring_enqueue(rp, obj[i]); |
4576 | } |
4577 | |
4578 | @@ -705,7 +705,7 @@ test_ring_basic_ex(void) |
4579 | goto fail_test; |
4580 | } |
4581 | |
4582 | - for (i = 0; i < RING_SIZE; i ++) { |
4583 | + for (i = 0; i < RING_SIZE - 1; i ++) { |
4584 | rte_ring_dequeue(rp, &obj[i]); |
4585 | } |
4586 | |
4587 | diff --git a/app/test/test_ring_perf.c b/app/test/test_ring_perf.c |
4588 | index 70ee46f..3cf2796 100644 |
4589 | --- a/app/test/test_ring_perf.c |
4590 | +++ b/app/test/test_ring_perf.c |
4591 | @@ -296,12 +296,13 @@ load_loop_fn(void *p) |
4592 | static int |
4593 | run_on_all_cores(struct rte_ring *r) |
4594 | { |
4595 | - uint64_t total = 0; |
4596 | + uint64_t total; |
4597 | struct thread_params param; |
4598 | unsigned int i, c; |
4599 | |
4600 | memset(¶m, 0, sizeof(struct thread_params)); |
4601 | for (i = 0; i < RTE_DIM(bulk_sizes); i++) { |
4602 | + total = 0; |
4603 | printf("\nBulk enq/dequeue count on size %u\n", bulk_sizes[i]); |
4604 | param.size = bulk_sizes[i]; |
4605 | param.r = r; |
4606 | diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c |
4607 | index a922c7d..2a4978e 100644 |
4608 | --- a/app/test/test_service_cores.c |
4609 | +++ b/app/test/test_service_cores.c |
4610 | @@ -114,6 +114,7 @@ unregister_all(void) |
4611 | } |
4612 | |
4613 | rte_service_lcore_reset_all(); |
4614 | + rte_eal_mp_wait_lcore(); |
4615 | |
4616 | return TEST_SUCCESS; |
4617 | } |
4618 | diff --git a/buildtools/call-sphinx-build.py b/buildtools/call-sphinx-build.py |
4619 | new file mode 100755 |
4620 | index 0000000..b9a3994 |
4621 | --- /dev/null |
4622 | +++ b/buildtools/call-sphinx-build.py |
4623 | @@ -0,0 +1,31 @@ |
4624 | +#! /usr/bin/env python3 |
4625 | +# SPDX-License-Identifier: BSD-3-Clause |
4626 | +# Copyright(c) 2019 Intel Corporation |
4627 | +# |
4628 | + |
4629 | +import sys |
4630 | +import os |
4631 | +from os.path import join |
4632 | +from subprocess import run, PIPE |
4633 | +from distutils.version import StrictVersion |
4634 | + |
4635 | +(sphinx, src, dst) = sys.argv[1:] # assign parameters to variables |
4636 | + |
4637 | +# for sphinx version >= 1.7 add parallelism using "-j auto" |
4638 | +ver = run([sphinx, '--version'], stdout=PIPE).stdout.decode().split()[-1] |
4639 | +sphinx_cmd = [sphinx] |
4640 | +if StrictVersion(ver) >= StrictVersion('1.7'): |
4641 | + sphinx_cmd += ['-j', 'auto'] |
4642 | + |
4643 | +# find all the files sphinx will process so we can write them as dependencies |
4644 | +srcfiles = [] |
4645 | +for root, dirs, files in os.walk(src): |
4646 | + srcfiles.extend([join(root, f) for f in files]) |
4647 | + |
4648 | +# run sphinx, putting the html output in a "html" directory |
4649 | +process = run(sphinx_cmd + ['-b', 'html', src, join(dst, 'html')], check=True) |
4650 | +print(str(process.args) + ' Done OK') |
4651 | + |
4652 | +# create a gcc format .d file giving all the dependencies of this doc build |
4653 | +with open(join(dst, '.html.d'), 'w') as d: |
4654 | + d.write('html: ' + ' '.join(srcfiles) + '\n') |
4655 | diff --git a/buildtools/meson.build b/buildtools/meson.build |
4656 | index cd6f4c1..ea13d9f 100644 |
4657 | --- a/buildtools/meson.build |
4658 | +++ b/buildtools/meson.build |
4659 | @@ -12,10 +12,12 @@ ldflags_ibverbs_static = find_program('options-ibverbs-static.sh') |
4660 | # set up map-to-def script using python, either built-in or external |
4661 | python3 = import('python').find_installation(required: false) |
4662 | if python3.found() |
4663 | - map_to_def_cmd = [python3, files('map_to_def.py')] |
4664 | + py3 = [python3] |
4665 | else |
4666 | - map_to_def_cmd = ['meson', 'runpython', files('map_to_def.py')] |
4667 | + py3 = ['meson', 'runpython'] |
4668 | endif |
4669 | +map_to_def_cmd = py3 + files('map_to_def.py') |
4670 | +sphinx_wrapper = py3 + files('call-sphinx-build.py') |
4671 | |
4672 | # stable ABI always starts with "DPDK_" |
4673 | is_experimental_cmd = [find_program('grep', 'findstr'), '^DPDK_'] |
4674 | diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build |
4675 | new file mode 100644 |
4676 | index 0000000..5f19304 |
4677 | --- /dev/null |
4678 | +++ b/buildtools/pkg-config/meson.build |
4679 | @@ -0,0 +1,55 @@ |
4680 | +# SPDX-License-Identifier: BSD-3-Clause |
4681 | +# Copyright(c) 2020 Intel Corporation |
4682 | + |
4683 | +pkg = import('pkgconfig') |
4684 | +pkg_extra_cflags = ['-include', 'rte_config.h'] + machine_args |
4685 | +if is_freebsd |
4686 | + pkg_extra_cflags += ['-D__BSD_VISIBLE'] |
4687 | +endif |
4688 | + |
4689 | +# When calling pkg-config --static --libs, pkg-config will always output the |
4690 | +# regular libs first, and then the extra libs from Libs.private field, |
4691 | +# since the assumption is that those are additional dependencies for building |
4692 | +# statically that the .a files depend upon. The output order of .pc fields is: |
4693 | +# Libs Libs.private Requires Requires.private |
4694 | +# The fields Requires* are for package names. |
4695 | +# The flags of the DPDK libraries must be defined in Libs* fields. |
4696 | +# However, the DPDK drivers are linked only in static builds (Libs.private), |
4697 | +# and those need to come *before* the regular libraries (Libs field). |
4698 | +# This requirement is satisfied by moving the regular libs in a separate file |
4699 | +# included in the field Requires (after Libs.private). |
4700 | +# Another requirement is to allow linking dependencies as shared libraries, |
4701 | +# while linking static DPDK libraries and drivers. It is satisfied by |
4702 | +# listing the static files in Libs.private with the explicit syntax -l:libfoo.a. |
4703 | +# As a consequence, the regular DPDK libraries are already listed as static |
4704 | +# in the field Libs.private. The second occurences of DPDK libraries, |
4705 | +# included from Requires and used for shared library linkage case, |
4706 | +# are skipped in the case of static linkage thanks to the flag --as-needed. |
4707 | + |
4708 | + |
4709 | +pkg.generate(name: 'dpdk-libs', |
4710 | + filebase: 'libdpdk-libs', |
4711 | + description: '''Internal-only DPDK pkgconfig file. Not for direct use. |
4712 | +Use libdpdk.pc instead of this file to query DPDK compile/link arguments''', |
4713 | + version: meson.project_version(), |
4714 | + subdirs: [get_option('include_subdir_arch'), '.'], |
4715 | + extra_cflags: pkg_extra_cflags, |
4716 | + libraries: ['-Wl,--as-needed'] + dpdk_libraries, |
4717 | + libraries_private: dpdk_extra_ldflags) |
4718 | + |
4719 | +pkg.generate(name: 'DPDK', # main DPDK pkgconfig file |
4720 | + filebase: 'libdpdk', |
4721 | + version: meson.project_version(), |
4722 | + description: '''The Data Plane Development Kit (DPDK). |
4723 | +Note that CFLAGS might contain an -march flag higher than typical baseline. |
4724 | +This is required for a number of static inline functions in the public headers.''', |
4725 | + requires: ['libdpdk-libs', libbsd], # may need libbsd for string funcs |
4726 | + # if libbsd is not enabled, then this is blank |
4727 | + libraries_private: ['-Wl,--whole-archive'] + |
4728 | + dpdk_drivers + dpdk_static_libraries + |
4729 | + ['-Wl,--no-whole-archive'] |
4730 | +) |
4731 | + |
4732 | +# For static linking with dependencies as shared libraries, |
4733 | +# the internal static libraries must be flagged explicitly. |
4734 | +run_command(py3, 'set-static-linker-flags.py', check: true) |
4735 | diff --git a/buildtools/pkg-config/set-static-linker-flags.py b/buildtools/pkg-config/set-static-linker-flags.py |
4736 | new file mode 100644 |
4737 | index 0000000..2745db3 |
4738 | --- /dev/null |
4739 | +++ b/buildtools/pkg-config/set-static-linker-flags.py |
4740 | @@ -0,0 +1,38 @@ |
4741 | +#!/usr/bin/env python3 |
4742 | +# SPDX-License-Identifier: BSD-3-Clause |
4743 | +# Copyright(c) 2020 Intel Corporation |
4744 | + |
4745 | +# Script to fix flags for static linking in pkgconfig files from meson |
4746 | +# Should be called from meson build itself |
4747 | +import os |
4748 | +import sys |
4749 | + |
4750 | + |
4751 | +def fix_ldflag(f): |
4752 | + if not f.startswith('-lrte_'): |
4753 | + return f |
4754 | + return '-l:lib' + f[2:] + '.a' |
4755 | + |
4756 | + |
4757 | +def fix_libs_private(line): |
4758 | + if not line.startswith('Libs.private'): |
4759 | + return line |
4760 | + ldflags = [fix_ldflag(flag) for flag in line.split()] |
4761 | + return ' '.join(ldflags) + '\n' |
4762 | + |
4763 | + |
4764 | +def process_pc_file(filepath): |
4765 | + print('Processing', filepath) |
4766 | + with open(filepath) as src: |
4767 | + lines = src.readlines() |
4768 | + with open(filepath, 'w') as dst: |
4769 | + dst.writelines([fix_libs_private(line) for line in lines]) |
4770 | + |
4771 | + |
4772 | +if 'MESON_BUILD_ROOT' not in os.environ: |
4773 | + print('This script must be called from a meson build environment') |
4774 | + sys.exit(1) |
4775 | +for root, dirs, files in os.walk(os.environ['MESON_BUILD_ROOT']): |
4776 | + pc_files = [f for f in files if f.endswith('.pc')] |
4777 | + for f in pc_files: |
4778 | + process_pc_file(os.path.join(root, f)) |
4779 | diff --git a/buildtools/pmdinfogen/pmdinfogen.h b/buildtools/pmdinfogen/pmdinfogen.h |
4780 | index c8a9e21..467216d 100644 |
4781 | --- a/buildtools/pmdinfogen/pmdinfogen.h |
4782 | +++ b/buildtools/pmdinfogen/pmdinfogen.h |
4783 | @@ -82,7 +82,7 @@ if ((fend) == ELFDATA2LSB) \ |
4784 | ___x = le##width##toh(x); \ |
4785 | else \ |
4786 | ___x = be##width##toh(x); \ |
4787 | - ___x; \ |
4788 | +___x; \ |
4789 | }) |
4790 | |
4791 | #define TO_NATIVE(fend, width, x) CONVERT_NATIVE(fend, width, x) |
4792 | diff --git a/config/common_base b/config/common_base |
4793 | index 861f7d1..3406146 100644 |
4794 | --- a/config/common_base |
4795 | +++ b/config/common_base |
4796 | @@ -572,7 +572,6 @@ CONFIG_RTE_CRYPTO_MAX_DEVS=64 |
4797 | # Compile PMD for ARMv8 Crypto device |
4798 | # |
4799 | CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO=n |
4800 | -CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO_DEBUG=n |
4801 | |
4802 | # |
4803 | # Compile NXP CAAM JR crypto Driver |
4804 | diff --git a/config/defconfig_arm-armv7a-linuxapp-gcc b/config/defconfig_arm-armv7a-linuxapp-gcc |
4805 | index c91423f..749f992 100644 |
4806 | --- a/config/defconfig_arm-armv7a-linuxapp-gcc |
4807 | +++ b/config/defconfig_arm-armv7a-linuxapp-gcc |
4808 | @@ -45,7 +45,6 @@ CONFIG_RTE_LIBRTE_CXGBE_PMD=n |
4809 | CONFIG_RTE_LIBRTE_E1000_PMD=n |
4810 | CONFIG_RTE_LIBRTE_ENIC_PMD=n |
4811 | CONFIG_RTE_LIBRTE_FM10K_PMD=n |
4812 | -CONFIG_RTE_LIBRTE_I40E_PMD=n |
4813 | CONFIG_RTE_LIBRTE_IXGBE_PMD=n |
4814 | CONFIG_RTE_LIBRTE_MLX4_PMD=n |
4815 | CONFIG_RTE_LIBRTE_VMXNET3_PMD=n |
4816 | diff --git a/config/defconfig_arm64-graviton2-linux-gcc b/config/defconfig_arm64-graviton2-linux-gcc |
4817 | new file mode 120000 |
4818 | index 0000000..80ac94d |
4819 | --- /dev/null |
4820 | +++ b/config/defconfig_arm64-graviton2-linux-gcc |
4821 | @@ -0,0 +1 @@ |
4822 | +defconfig_arm64-graviton2-linuxapp-gcc |
4823 | \ No newline at end of file |
4824 | diff --git a/config/defconfig_arm64-graviton2-linuxapp-gcc b/config/defconfig_arm64-graviton2-linuxapp-gcc |
4825 | new file mode 100644 |
4826 | index 0000000..e99fef3 |
4827 | --- /dev/null |
4828 | +++ b/config/defconfig_arm64-graviton2-linuxapp-gcc |
4829 | @@ -0,0 +1,13 @@ |
4830 | +# SPDX-License-Identifier: BSD-3-Clause |
4831 | +# Copyright(c) Amazon.com, Inc or its affiliates |
4832 | +# |
4833 | + |
4834 | +#include "defconfig_arm64-armv8a-linux-gcc" |
4835 | + |
4836 | +CONFIG_RTE_MACHINE="graviton2" |
4837 | +CONFIG_RTE_MAX_LCORE=64 |
4838 | +CONFIG_RTE_CACHE_LINE_SIZE=64 |
4839 | +CONFIG_RTE_MAX_MEM_MB=1048576 |
4840 | +CONFIG_RTE_MAX_NUMA_NODES=1 |
4841 | +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n |
4842 | +CONFIG_RTE_LIBRTE_VHOST_NUMA=n |
4843 | diff --git a/config/defconfig_graviton2 b/config/defconfig_graviton2 |
4844 | new file mode 120000 |
4845 | index 0000000..80ac94d |
4846 | --- /dev/null |
4847 | +++ b/config/defconfig_graviton2 |
4848 | @@ -0,0 +1 @@ |
4849 | +defconfig_arm64-graviton2-linuxapp-gcc |
4850 | \ No newline at end of file |
4851 | diff --git a/config/meson.build b/config/meson.build |
4852 | index 78bfdf3..bab00f1 100644 |
4853 | --- a/config/meson.build |
4854 | +++ b/config/meson.build |
4855 | @@ -54,9 +54,11 @@ eal_pmd_path = join_paths(get_option('prefix'), driver_install_path) |
4856 | # driver .so files often depend upon the bus drivers for their connect bus, |
4857 | # e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need |
4858 | # to be in the library path, so symlink the drivers from the main lib directory. |
4859 | -meson.add_install_script('../buildtools/symlink-drivers-solibs.sh', |
4860 | - get_option('libdir'), |
4861 | - pmd_subdir_opt) |
4862 | +if not is_windows |
4863 | + meson.add_install_script('../buildtools/symlink-drivers-solibs.sh', |
4864 | + get_option('libdir'), |
4865 | + pmd_subdir_opt) |
4866 | +endif |
4867 | |
4868 | # set the machine type and cflags for it |
4869 | if meson.is_cross_build() |
4870 | @@ -144,6 +146,15 @@ if numa_dep.found() and cc.has_header('numaif.h') |
4871 | dpdk_extra_ldflags += '-lnuma' |
4872 | endif |
4873 | |
4874 | +has_libfdt = 0 |
4875 | +fdt_dep = cc.find_library('libfdt', required: false) |
4876 | +if fdt_dep.found() and cc.has_header('fdt.h') |
4877 | + dpdk_conf.set10('RTE_HAS_LIBFDT', true) |
4878 | + has_libfdt = 1 |
4879 | + add_project_link_arguments('-lfdt', language: 'c') |
4880 | + dpdk_extra_ldflags += '-lfdt' |
4881 | +endif |
4882 | + |
4883 | # check for libbsd |
4884 | libbsd = dependency('libbsd', required: false) |
4885 | if libbsd.found() |
4886 | @@ -151,11 +162,9 @@ if libbsd.found() |
4887 | endif |
4888 | |
4889 | # check for pcap |
4890 | -pcap_dep = dependency('pcap', required: false) |
4891 | -if pcap_dep.found() |
4892 | - # pcap got a pkg-config file only in 1.9.0 and before that meson uses |
4893 | - # an internal pcap-config finder, which is not compatible with |
4894 | - # cross-compilation, so try to fallback to find_library |
4895 | +pcap_dep = dependency('libpcap', required: false, method: 'pkg-config') |
4896 | +if not pcap_dep.found() |
4897 | + # pcap got a pkg-config file only in 1.9.0 |
4898 | pcap_dep = cc.find_library('pcap', required: false) |
4899 | endif |
4900 | if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep) |
4901 | @@ -174,6 +183,7 @@ warning_flags = [ |
4902 | # additional warnings in alphabetical order |
4903 | '-Wcast-qual', |
4904 | '-Wdeprecated', |
4905 | + '-Wformat', |
4906 | '-Wformat-nonliteral', |
4907 | '-Wformat-security', |
4908 | '-Wmissing-declarations', |
4909 | @@ -214,6 +224,11 @@ dpdk_conf.set('RTE_LIBEAL_USE_HPET', get_option('use_hpet')) |
4910 | dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64) |
4911 | dpdk_conf.set('RTE_DRIVER_MEMPOOL_BUCKET_SIZE_KB', 64) |
4912 | dpdk_conf.set('RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', true) |
4913 | +if dpdk_conf.get('RTE_ARCH_64') |
4914 | + dpdk_conf.set('RTE_MAX_MEM_MB', 524288) |
4915 | +else # for 32-bit we need smaller reserved memory areas |
4916 | + dpdk_conf.set('RTE_MAX_MEM_MB', 2048) |
4917 | +endif |
4918 | |
4919 | |
4920 | compile_time_cpuflags = [] |
4921 | diff --git a/config/rte_config.h b/config/rte_config.h |
4922 | index d30786b..0f9dae3 100644 |
4923 | --- a/config/rte_config.h |
4924 | +++ b/config/rte_config.h |
4925 | @@ -38,7 +38,6 @@ |
4926 | #define RTE_MAX_MEM_MB_PER_LIST 32768 |
4927 | #define RTE_MAX_MEMSEG_PER_TYPE 32768 |
4928 | #define RTE_MAX_MEM_MB_PER_TYPE 65536 |
4929 | -#define RTE_MAX_MEM_MB 524288 |
4930 | #define RTE_MAX_MEMZONE 2560 |
4931 | #define RTE_MAX_TAILQ 32 |
4932 | #define RTE_LOG_DP_LEVEL RTE_LOG_INFO |
4933 | @@ -100,6 +99,9 @@ |
4934 | |
4935 | /****** driver defines ********/ |
4936 | |
4937 | +/* Packet prefetching in PMDs */ |
4938 | +#define RTE_PMD_PACKET_PREFETCH 1 |
4939 | + |
4940 | /* QuickAssist device */ |
4941 | /* Max. number of QuickAssist devices which can be attached */ |
4942 | #define RTE_PMD_QAT_MAX_PCI_DEVICES 48 |
4943 | diff --git a/debian/changelog b/debian/changelog |
4944 | index ad9df40..f45df9d 100644 |
4945 | --- a/debian/changelog |
4946 | +++ b/debian/changelog |
4947 | @@ -1,3 +1,19 @@ |
4948 | +dpdk (19.11.6-0ubuntu0.20.04.1) focal; urgency=medium |
4949 | + |
4950 | + * Merge latest upstream stable minor release 19.11.6 (LP: #1912464) |
4951 | + For a detailed list of changes check out: |
4952 | + 19.11.4 https://doc.dpdk.org/guides-19.11/rel_notes/release_19_11.html#id7 |
4953 | + 19.11.5 https://doc.dpdk.org/guides-19.11/rel_notes/release_19_11.html#id11 |
4954 | + 19.11.6 https://doc.dpdk.org/guides-19.11/rel_notes/release_19_11.html#id14 |
4955 | + - update d/p/revert-net-ipn3ke-fix-meson-build.patch: to match 19.11.6 |
4956 | + - drop debian/patches/CVE-2020-1437x/*.patch being part of 19.11.5 |
4957 | + - drop d/p/19.11-remove-zero-copy-and-client-mode-restriction.patch being |
4958 | + part of 19.11.5 |
4959 | + - Add "Adjust dpdk-doc install path for guides" from 19.11.4-1 as it is |
4960 | + needed for the newer upstream version |
4961 | + |
4962 | + -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Wed, 20 Jan 2021 09:43:42 +0100 |
4963 | + |
4964 | dpdk (19.11.3-0ubuntu0.2) focal-security; urgency=medium |
4965 | |
4966 | * SECURITY UPDATE: Multiple security issues |
4967 | diff --git a/debian/dpdk-doc.doc-base.guides b/debian/dpdk-doc.doc-base.guides |
4968 | index 3cfff55..be10fd1 100644 |
4969 | --- a/debian/dpdk-doc.doc-base.guides |
4970 | +++ b/debian/dpdk-doc.doc-base.guides |
4971 | @@ -6,5 +6,5 @@ Abstract: |
4972 | Section: Programming/C |
4973 | |
4974 | Format: HTML |
4975 | -Index: /usr/share/doc/dpdk/guides/index.html |
4976 | -Files: /usr/share/doc/dpdk/guides/*/*.html |
4977 | +Index: /usr/share/doc/dpdk/html/index.html |
4978 | +Files: /usr/share/doc/dpdk/html/*/*.html |
4979 | diff --git a/debian/dpdk-doc.install b/debian/dpdk-doc.install |
4980 | index cc6cf9b..a55aa9c 100644 |
4981 | --- a/debian/dpdk-doc.install |
4982 | +++ b/debian/dpdk-doc.install |
4983 | @@ -1,4 +1,4 @@ |
4984 | -doc/guides/custom.css usr/share/doc/dpdk/guides/_static/css |
4985 | +doc/guides/custom.css usr/share/doc/dpdk/html/_static/css |
4986 | examples usr/share/dpdk |
4987 | obj-*/doc/api/api usr/share/doc/dpdk |
4988 | -obj-*/doc/guides/guides usr/share/doc/dpdk |
4989 | +obj-*/doc/guides/html usr/share/doc/dpdk |
4990 | diff --git a/debian/patches/19.11-remove-zero-copy-and-client-mode-restriction.patch b/debian/patches/19.11-remove-zero-copy-and-client-mode-restriction.patch |
4991 | deleted file mode 100644 |
4992 | index c46c560..0000000 |
4993 | --- a/debian/patches/19.11-remove-zero-copy-and-client-mode-restriction.patch |
4994 | +++ /dev/null |
4995 | @@ -1,56 +0,0 @@ |
4996 | -Subject: [dpdk-stable] [PATCH 19.11] vhost: remove zero-copy and client mode restriction |
4997 | -From: Kevin Traynor ktraynor@redhat.com |
4998 | - |
4999 | -Commits [1] were backported as fixes from the latest DPDK release |
5000 | -to the stable branches. They are detecting if vhost-user client and |
PPA: https:/ /launchpad. net/~ci- train-ppa- service/ +archive/ ubuntu/ 4403/+packages /bugs.launchpad .net/ubuntu/ +source/ dpdk/+bug/ 1912464
Bug: https:/