Merge ~paelzer/ubuntu/+source/dpdk:bug-1848585-18.11.3-eoan into ubuntu/+source/dpdk:ubuntu/eoan-devel

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Christian Ehrhardt 
Approved revision: f2a31822f1605f1c3ab30a9db6ae7619bd3cca47
Merge reported by: Christian Ehrhardt 
Merged at revision: f2a31822f1605f1c3ab30a9db6ae7619bd3cca47
Proposed branch: ~paelzer/ubuntu/+source/dpdk:bug-1848585-18.11.3-eoan
Merge into: ubuntu/+source/dpdk:ubuntu/eoan-devel
Diff against target: 16928 lines (+3840/-2621)
389 files modified
app/meson.build (+0/-3)
app/test-crypto-perf/cperf_test_latency.c (+2/-3)
app/test-crypto-perf/cperf_test_pmd_cyclecount.c (+4/-6)
app/test-crypto-perf/cperf_test_throughput.c (+3/-5)
app/test-crypto-perf/cperf_test_verify.c (+3/-5)
app/test-crypto-perf/main.c (+8/-2)
app/test-eventdev/test_order_common.c (+21/-11)
app/test-eventdev/test_perf_common.c (+2/-1)
app/test-pmd/cmdline.c (+26/-7)
app/test-pmd/cmdline_flow.c (+11/-4)
app/test-pmd/config.c (+4/-0)
app/test-pmd/testpmd.c (+11/-3)
app/test-pmd/util.c (+4/-3)
config/arm/meson.build (+2/-3)
config/meson.build (+12/-1)
config/ppc_64/meson.build (+3/-1)
config/x86/meson.build (+1/-2)
debian/changelog (+14/-0)
debian/control (+2/-1)
debian/dpdk-dev.install (+1/-1)
debian/librte-security18.11.symbols (+6/-6)
debian/patches/0004-build-bump-minimum-Meson-version-to-0.47.1.patch (+2/-2)
debian/patches/avoid-as-needed-as-it-causes-overlinking.patch (+2/-2)
dev/null (+0/-39)
devtools/build-tags.sh (+2/-0)
doc/api/meson.build (+2/-2)
doc/guides/conf.py (+4/-0)
doc/guides/contributing/documentation.rst (+2/-2)
doc/guides/contributing/patches.rst (+0/-9)
doc/guides/cryptodevs/armv8.rst (+0/-1)
doc/guides/cryptodevs/openssl.rst (+0/-1)
doc/guides/howto/rte_flow.rst (+2/-2)
doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst (+1/-0)
doc/guides/linux_gsg/linux_drivers.rst (+1/-1)
doc/guides/meson.build (+1/-1)
doc/guides/nics/bnx2x.rst (+21/-9)
doc/guides/nics/enic.rst (+0/-6)
doc/guides/nics/features/mlx4.ini (+3/-0)
doc/guides/nics/features/mlx5.ini (+1/-0)
doc/guides/nics/ixgbe.rst (+25/-0)
doc/guides/nics/mlx5.rst (+2/-1)
doc/guides/nics/qede.rst (+22/-3)
doc/guides/prog_guide/bbdev.rst (+2/-2)
doc/guides/prog_guide/compressdev.rst (+14/-4)
doc/guides/prog_guide/cryptodev_lib.rst (+2/-2)
doc/guides/prog_guide/img/linuxapp_launch.svg (+2/-2)
doc/guides/prog_guide/kernel_nic_interface.rst (+6/-2)
doc/guides/prog_guide/mempool_lib.rst (+8/-0)
doc/guides/prog_guide/rawdev.rst (+2/-2)
doc/guides/prog_guide/rte_flow.rst (+19/-19)
doc/guides/rel_notes/release_18_11.rst (+490/-0)
doc/guides/sample_app_ug/l2_forward_real_virtual.rst (+0/-12)
drivers/bus/fslmc/portal/dpaa2_hw_pvt.h (+1/-4)
drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h (+1/-1)
drivers/bus/pci/linux/pci.c (+0/-1)
drivers/bus/pci/linux/pci_uio.c (+5/-6)
drivers/bus/vmbus/linux/vmbus_bus.c (+23/-5)
drivers/common/dpaax/dpaax_iova_table.c (+2/-2)
drivers/compress/isal/isal_compress_pmd_ops.c (+4/-10)
drivers/compress/zlib/zlib_pmd.c (+1/-0)
drivers/crypto/caam_jr/caam_jr.c (+1/-1)
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c (+7/-6)
drivers/crypto/dpaa_sec/dpaa_sec.c (+1/-1)
drivers/crypto/mvsam/rte_mrvl_pmd_ops.c (+1/-1)
drivers/crypto/openssl/rte_openssl_pmd.c (+9/-16)
drivers/crypto/openssl/rte_openssl_pmd_ops.c (+15/-30)
drivers/crypto/qat/qat_sym.c (+2/-0)
drivers/crypto/virtio/virtio_pci.c (+6/-2)
drivers/event/dpaa2/dpaa2_eventdev.c (+1/-1)
drivers/event/octeontx/meson.build (+5/-0)
drivers/event/opdl/meson.build (+5/-0)
drivers/event/opdl/opdl_evdev.c (+5/-5)
drivers/event/opdl/opdl_evdev_init.c (+6/-6)
drivers/event/opdl/opdl_ring.c (+1/-1)
drivers/event/sw/sw_evdev.c (+4/-4)
drivers/meson.build (+0/-3)
drivers/net/af_packet/rte_eth_af_packet.c (+0/-2)
drivers/net/ark/ark_ethdev.c (+20/-37)
drivers/net/ark/ark_ethdev_rx.c (+3/-5)
drivers/net/ark/ark_ethdev_tx.c (+2/-4)
drivers/net/atlantic/atl_ethdev.c (+1/-2)
drivers/net/atlantic/atl_rxtx.c (+2/-2)
drivers/net/avf/avf_ethdev.c (+1/-0)
drivers/net/avf/avf_rxtx.c (+15/-7)
drivers/net/avf/avf_rxtx_vec_sse.c (+1/-0)
drivers/net/axgbe/axgbe_ethdev.c (+16/-9)
drivers/net/axgbe/axgbe_rxtx.c (+1/-1)
drivers/net/bnx2x/bnx2x.c (+65/-42)
drivers/net/bnx2x/bnx2x.h (+8/-2)
drivers/net/bnx2x/bnx2x_ethdev.c (+25/-20)
drivers/net/bnx2x/bnx2x_vfpf.c (+84/-56)
drivers/net/bnx2x/bnx2x_vfpf.h (+1/-0)
drivers/net/bnx2x/ecore_sp.c (+0/-4)
drivers/net/bnxt/bnxt.h (+1/-0)
drivers/net/bnxt/bnxt_cpr.h (+5/-4)
drivers/net/bnxt/bnxt_ethdev.c (+204/-152)
drivers/net/bnxt/bnxt_flow.c (+5/-5)
drivers/net/bnxt/bnxt_hwrm.c (+58/-50)
drivers/net/bnxt/bnxt_irq.c (+50/-20)
drivers/net/bnxt/bnxt_irq.h (+1/-1)
drivers/net/bnxt/bnxt_ring.c (+1/-1)
drivers/net/bnxt/bnxt_rxq.c (+4/-4)
drivers/net/bnxt/bnxt_rxr.c (+33/-10)
drivers/net/bnxt/bnxt_rxr.h (+100/-20)
drivers/net/bnxt/bnxt_stats.c (+28/-15)
drivers/net/bnxt/bnxt_txq.c (+1/-1)
drivers/net/bnxt/bnxt_txq.h (+0/-1)
drivers/net/bnxt/bnxt_txr.c (+69/-42)
drivers/net/bnxt/bnxt_txr.h (+2/-0)
drivers/net/bnxt/bnxt_vnic.c (+5/-2)
drivers/net/bnxt/rte_pmd_bnxt.c (+16/-16)
drivers/net/bonding/rte_eth_bond_pmd.c (+7/-13)
drivers/net/cxgbe/base/adapter.h (+1/-1)
drivers/net/cxgbe/cxgbe_ethdev.c (+30/-30)
drivers/net/cxgbe/cxgbe_filter.c (+1/-1)
drivers/net/cxgbe/cxgbe_main.c (+5/-6)
drivers/net/cxgbe/cxgbevf_ethdev.c (+3/-3)
drivers/net/cxgbe/cxgbevf_main.c (+1/-1)
drivers/net/cxgbe/sge.c (+4/-4)
drivers/net/dpaa/dpaa_ethdev.c (+10/-0)
drivers/net/dpaa/dpaa_ethdev.h (+0/-4)
drivers/net/dpaa/dpaa_rxtx.c (+10/-0)
drivers/net/dpaa2/dpaa2_ethdev.c (+10/-0)
drivers/net/dpaa2/dpaa2_rxtx.c (+2/-1)
drivers/net/e1000/base/e1000_ich8lan.h (+1/-0)
drivers/net/e1000/em_rxtx.c (+19/-3)
drivers/net/e1000/igb_ethdev.c (+6/-12)
drivers/net/e1000/igb_rxtx.c (+4/-4)
drivers/net/ena/base/ena_com.c (+1/-1)
drivers/net/ena/ena_ethdev.c (+37/-65)
drivers/net/ena/ena_ethdev.h (+1/-0)
drivers/net/enic/base/vnic_dev.c (+0/-105)
drivers/net/enic/base/vnic_dev.h (+0/-8)
drivers/net/enic/base/vnic_devcmd.h (+2/-56)
drivers/net/enic/enic.h (+1/-7)
drivers/net/enic/enic_flow.c (+4/-146)
drivers/net/enic/enic_main.c (+2/-10)
drivers/net/enic/enic_res.c (+2/-4)
drivers/net/enic/enic_rxtx.c (+2/-2)
drivers/net/enic/meson.build (+2/-2)
drivers/net/failsafe/failsafe_eal.c (+2/-2)
drivers/net/failsafe/failsafe_ether.c (+1/-1)
drivers/net/failsafe/failsafe_ops.c (+109/-110)
drivers/net/failsafe/failsafe_private.h (+0/-1)
drivers/net/fm10k/base/fm10k_api.c (+16/-4)
drivers/net/fm10k/base/fm10k_pf.c (+2/-2)
drivers/net/fm10k/base/fm10k_pf.h (+6/-0)
drivers/net/fm10k/base/fm10k_vf.c (+2/-2)
drivers/net/fm10k/base/fm10k_vf.h (+5/-0)
drivers/net/fm10k/fm10k_ethdev.c (+9/-0)
drivers/net/fm10k/fm10k_rxtx.c (+4/-4)
drivers/net/fm10k/fm10k_rxtx_vec.c (+2/-1)
drivers/net/i40e/i40e_ethdev.c (+14/-35)
drivers/net/i40e/i40e_ethdev_vf.c (+6/-5)
drivers/net/i40e/i40e_flow.c (+15/-6)
drivers/net/i40e/i40e_rxtx.c (+25/-9)
drivers/net/i40e/i40e_rxtx_vec_avx2.c (+1/-0)
drivers/net/i40e/i40e_rxtx_vec_sse.c (+1/-0)
drivers/net/i40e/rte_pmd_i40e.c (+4/-2)
drivers/net/ixgbe/base/ixgbe_common.c (+1/-1)
drivers/net/ixgbe/ixgbe_ethdev.c (+82/-22)
drivers/net/ixgbe/ixgbe_ethdev.h (+5/-0)
drivers/net/ixgbe/ixgbe_ipsec.c (+5/-1)
drivers/net/ixgbe/ixgbe_rxtx.c (+26/-15)
drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c (+1/-0)
drivers/net/mlx4/mlx4.c (+8/-9)
drivers/net/mlx4/mlx4.h (+1/-0)
drivers/net/mlx4/mlx4_ethdev.c (+1/-3)
drivers/net/mlx5/mlx5.c (+4/-2)
drivers/net/mlx5/mlx5.h (+8/-2)
drivers/net/mlx5/mlx5_ethdev.c (+3/-2)
drivers/net/mlx5/mlx5_flow.c (+23/-18)
drivers/net/mlx5/mlx5_flow_dv.c (+11/-5)
drivers/net/mlx5/mlx5_rxq.c (+20/-15)
drivers/net/mlx5/mlx5_rxtx_vec_neon.h (+1/-1)
drivers/net/mlx5/mlx5_stats.c (+37/-16)
drivers/net/mlx5/mlx5_trigger.c (+1/-1)
drivers/net/mlx5/mlx5_txq.c (+6/-4)
drivers/net/mvneta/mvneta_ethdev.c (+1/-4)
drivers/net/netvsc/hn_ethdev.c (+12/-7)
drivers/net/netvsc/hn_var.h (+1/-1)
drivers/net/netvsc/hn_vf.c (+18/-8)
drivers/net/netvsc/ndis.h (+13/-13)
drivers/net/nfp/meson.build (+1/-1)
drivers/net/null/rte_eth_null.c (+0/-2)
drivers/net/pcap/rte_eth_pcap.c (+41/-68)
drivers/net/qede/base/bcm_osal.c (+2/-2)
drivers/net/qede/qede_ethdev.c (+0/-1)
drivers/net/qede/qede_filter.c (+1/-1)
drivers/net/qede/qede_rxtx.c (+5/-5)
drivers/net/ring/rte_eth_ring.c (+0/-2)
drivers/net/sfc/base/ef10_impl.h (+5/-4)
drivers/net/sfc/base/ef10_nic.c (+57/-2)
drivers/net/sfc/base/ef10_nvram.c (+2/-1)
drivers/net/sfc/base/ef10_rx.c (+6/-5)
drivers/net/sfc/base/efx.h (+17/-4)
drivers/net/sfc/base/efx_mcdi.h (+6/-3)
drivers/net/sfc/base/efx_tx.c (+2/-2)
drivers/net/sfc/base/hunt_nic.c (+2/-39)
drivers/net/sfc/base/mcdi_mon.c (+2/-1)
drivers/net/sfc/base/medford2_nic.c (+0/-3)
drivers/net/sfc/base/medford_nic.c (+0/-3)
drivers/net/sfc/efsys.h (+24/-27)
drivers/net/sfc/meson.build (+1/-1)
drivers/net/sfc/sfc_ethdev.c (+3/-1)
drivers/net/sfc/sfc_rx.c (+1/-1)
drivers/net/tap/rte_eth_tap.c (+0/-2)
drivers/net/thunderx/nicvf_ethdev.c (+12/-1)
drivers/net/vdev_netvsc/vdev_netvsc.c (+2/-2)
drivers/net/vhost/rte_eth_vhost.c (+0/-2)
drivers/net/virtio/virtio_ethdev.c (+25/-5)
drivers/net/virtio/virtio_ethdev.h (+3/-0)
drivers/net/virtio/virtio_pci.c (+1/-0)
drivers/net/virtio/virtio_rxtx.c (+47/-35)
drivers/net/virtio/virtio_user/vhost.h (+1/-1)
drivers/net/virtio/virtio_user_ethdev.c (+0/-2)
drivers/net/vmxnet3/vmxnet3_ethdev.c (+2/-2)
drivers/net/vmxnet3/vmxnet3_rxtx.c (+4/-4)
drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c (+0/-3)
drivers/raw/ifpga_rawdev/base/ifpga_api.c (+3/-2)
drivers/raw/ifpga_rawdev/base/ifpga_api.h (+1/-1)
drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h (+1/-1)
drivers/raw/ifpga_rawdev/base/ifpga_fme_pr.c (+16/-11)
drivers/raw/ifpga_rawdev/base/opae_hw_api.c (+2/-2)
drivers/raw/ifpga_rawdev/base/opae_hw_api.h (+2/-2)
drivers/raw/ifpga_rawdev/ifpga_rawdev.c (+6/-1)
drivers/raw/skeleton_rawdev/skeleton_rawdev.c (+0/-3)
drivers/raw/skeleton_rawdev/skeleton_rawdev_test.c (+3/-8)
examples/bbdev_app/Makefile (+2/-3)
examples/bond/Makefile (+2/-3)
examples/cmdline/Makefile (+2/-3)
examples/distributor/Makefile (+2/-3)
examples/eventdev_pipeline/Makefile (+2/-3)
examples/exception_path/Makefile (+2/-3)
examples/fips_validation/Makefile (+2/-3)
examples/flow_classify/Makefile (+2/-3)
examples/flow_filtering/Makefile (+2/-3)
examples/helloworld/Makefile (+2/-3)
examples/ip_fragmentation/Makefile (+2/-3)
examples/ip_fragmentation/main.c (+11/-12)
examples/ip_pipeline/Makefile (+2/-3)
examples/ip_reassembly/Makefile (+2/-3)
examples/ipsec-secgw/Makefile (+2/-3)
examples/ipsec-secgw/esp.c (+8/-9)
examples/ipsec-secgw/ipsec.c (+16/-14)
examples/ipsec-secgw/ipsec.h (+35/-0)
examples/ipsec-secgw/sa.c (+112/-10)
examples/ipsec-secgw/sp4.c (+45/-0)
examples/ipsec-secgw/sp6.c (+63/-0)
examples/ipv4_multicast/Makefile (+2/-3)
examples/kni/Makefile (+2/-3)
examples/l2fwd-cat/Makefile (+2/-3)
examples/l2fwd-crypto/Makefile (+2/-3)
examples/l2fwd-jobstats/Makefile (+2/-3)
examples/l2fwd-keepalive/Makefile (+2/-3)
examples/l2fwd/Makefile (+2/-3)
examples/l3fwd-acl/Makefile (+2/-3)
examples/l3fwd-acl/main.c (+1/-5)
examples/l3fwd-power/Makefile (+2/-3)
examples/l3fwd-power/main.c (+1/-5)
examples/l3fwd-power/meson.build (+4/-2)
examples/l3fwd-vf/Makefile (+2/-3)
examples/l3fwd-vf/main.c (+1/-25)
examples/l3fwd/Makefile (+2/-3)
examples/l3fwd/l3fwd_em.c (+4/-0)
examples/l3fwd/main.c (+1/-5)
examples/link_status_interrupt/Makefile (+2/-3)
examples/load_balancer/Makefile (+2/-3)
examples/meson.build (+0/-3)
examples/multi_process/client_server_mp/mp_server/main.c (+0/-1)
examples/multi_process/client_server_mp/shared/common.h (+1/-1)
examples/multi_process/symmetric_mp/main.c (+1/-1)
examples/packet_ordering/Makefile (+2/-3)
examples/performance-thread/l3fwd-thread/main.c (+4/-5)
examples/ptpclient/Makefile (+2/-3)
examples/ptpclient/ptpclient.c (+8/-1)
examples/qos_meter/Makefile (+2/-3)
examples/qos_sched/Makefile (+2/-3)
examples/qos_sched/args.c (+3/-4)
examples/rxtx_callbacks/Makefile (+2/-3)
examples/server_node_efd/shared/common.h (+1/-1)
examples/service_cores/Makefile (+2/-3)
examples/skeleton/Makefile (+2/-3)
examples/tep_termination/Makefile (+2/-3)
examples/tep_termination/main.c (+0/-5)
examples/timer/Makefile (+2/-3)
examples/vdpa/Makefile (+1/-1)
examples/vhost/Makefile (+2/-3)
examples/vhost_crypto/main.c (+0/-6)
examples/vhost_crypto/meson.build (+0/-1)
examples/vhost_scsi/Makefile (+2/-3)
examples/vhost_scsi/meson.build (+0/-1)
examples/vm_power_manager/guest_cli/main.c (+1/-1)
examples/vm_power_manager/guest_cli/meson.build (+5/-0)
examples/vm_power_manager/meson.build (+7/-3)
examples/vmdq/Makefile (+2/-3)
examples/vmdq_dcb/Makefile (+2/-3)
kernel/freebsd/contigmem/contigmem.c (+3/-0)
kernel/freebsd/nic_uio/nic_uio.c (+1/-0)
kernel/linux/igb_uio/igb_uio.c (+3/-3)
kernel/linux/igb_uio/meson.build (+2/-2)
kernel/linux/kni/ethtool/igb/igb_main.c (+10/-2)
kernel/linux/kni/ethtool/igb/kcompat.h (+10/-3)
kernel/linux/kni/ethtool/ixgbe/kcompat.h (+8/-2)
kernel/linux/kni/kni_misc.c (+5/-11)
kernel/linux/kni/kni_net.c (+38/-22)
kernel/linux/kni/meson.build (+2/-2)
kernel/linux/meson.build (+2/-2)
lib/librte_acl/acl_bld.c (+3/-3)
lib/librte_acl/acl_gen.c (+2/-2)
lib/librte_acl/acl_run_neon.h (+3/-3)
lib/librte_bpf/bpf_def.h (+8/-0)
lib/librte_bpf/bpf_load_elf.c (+13/-2)
lib/librte_bpf/bpf_validate.c (+6/-6)
lib/librte_bpf/meson.build (+1/-1)
lib/librte_bpf/rte_bpf.h (+3/-0)
lib/librte_cryptodev/rte_crypto_asym.h (+1/-1)
lib/librte_distributor/rte_distributor.c (+9/-5)
lib/librte_eal/bsdapp/eal/eal.c (+8/-1)
lib/librte_eal/common/eal_common_dev.c (+4/-1)
lib/librte_eal/common/eal_common_memory.c (+1/-1)
lib/librte_eal/common/eal_common_options.c (+10/-9)
lib/librte_eal/common/eal_common_thread.c (+2/-1)
lib/librte_eal/common/eal_filesystem.h (+4/-5)
lib/librte_eal/common/eal_internal_cfg.h (+4/-0)
lib/librte_eal/common/eal_thread.h (+0/-11)
lib/librte_eal/common/hotplug_mp.c (+1/-1)
lib/librte_eal/common/hotplug_mp.h (+9/-0)
lib/librte_eal/common/include/rte_dev.h (+1/-1)
lib/librte_eal/common/include/rte_eal.h (+0/-9)
lib/librte_eal/common/include/rte_interrupts.h (+1/-1)
lib/librte_eal/common/include/rte_lcore.h (+29/-0)
lib/librte_eal/common/include/rte_memory.h (+1/-1)
lib/librte_eal/common/include/rte_option.h (+1/-1)
lib/librte_eal/common/include/rte_version.h (+1/-1)
lib/librte_eal/common/malloc_heap.c (+2/-2)
lib/librte_eal/linuxapp/eal/eal.c (+3/-2)
lib/librte_eal/linuxapp/eal/eal_alarm.c (+4/-3)
lib/librte_eal/linuxapp/eal/eal_memalloc.c (+7/-4)
lib/librte_eal/linuxapp/eal/eal_memory.c (+1/-1)
lib/librte_eal/linuxapp/eal/eal_vfio.c (+21/-1)
lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h (+1/-1)
lib/librte_ethdev/rte_ethdev.c (+6/-1)
lib/librte_ethdev/rte_ethdev.h (+2/-2)
lib/librte_ethdev/rte_ethdev_pci.h (+1/-1)
lib/librte_ethdev/rte_flow.h (+1/-1)
lib/librte_eventdev/rte_event_eth_tx_adapter.h (+4/-4)
lib/librte_eventdev/rte_event_timer_adapter.c (+6/-6)
lib/librte_eventdev/rte_eventdev.c (+8/-8)
lib/librte_eventdev/rte_eventdev.h (+15/-16)
lib/librte_flow_classify/rte_flow_classify_parse.c (+0/-2)
lib/librte_hash/rte_cuckoo_hash.c (+23/-14)
lib/librte_ip_frag/rte_ipv6_fragmentation.c (+4/-2)
lib/librte_kni/meson.build (+1/-1)
lib/librte_kni/rte_kni.c (+39/-20)
lib/librte_kni/rte_kni_fifo.h (+11/-0)
lib/librte_net/rte_ether.h (+5/-0)
lib/librte_net/rte_ip.h (+7/-1)
lib/librte_net/rte_net.h (+5/-5)
lib/librte_security/rte_security_version.map (+0/-3)
lib/librte_table/rte_table_lpm_ipv6.c (+1/-1)
lib/librte_telemetry/Makefile (+1/-6)
lib/librte_telemetry/meson.build (+1/-1)
lib/librte_telemetry/rte_telemetry.c (+14/-15)
lib/librte_telemetry/rte_telemetry_internal.h (+3/-0)
lib/librte_telemetry/rte_telemetry_parser.c (+5/-3)
lib/librte_telemetry/rte_telemetry_parser_test.c (+14/-13)
lib/librte_vhost/Makefile (+1/-1)
lib/librte_vhost/rte_vhost.h (+1/-0)
lib/librte_vhost/vhost_crypto.c (+43/-54)
lib/meson.build (+0/-3)
meson.build (+6/-2)
meson_options.txt (+1/-1)
mk/arch/arm/rte.vars.mk (+1/-1)
mk/arch/i686/rte.vars.mk (+1/-1)
mk/machine/armv8a/rte.vars.mk (+1/-1)
mk/rte.sdkinstall.mk (+1/-1)
mk/target/generic/rte.vars.mk (+5/-0)
pkg/dpdk.spec (+1/-1)
test/bpf/mbuf.h (+22/-2)
test/test/autotest_runner.py (+10/-3)
test/test/meson.build (+4/-7)
test/test/test_distributor.c (+2/-1)
test/test/test_eal_flags.c (+86/-58)
test/test/test_flow_classify.c (+1/-29)
test/test/test_hash_readwrite_lf.c (+24/-26)
test/test/test_rwlock.c (+79/-0)
usertools/dpdk-devbind.py (+1/-0)
usertools/dpdk-telemetry-client.py (+7/-2)
Reviewer Review Type Date Requested Status
Rafael David Tinoco (community) Approve
Canonical Server Pending
git-ubuntu developers Pending
Review via email: mp+374897@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

I'll review this today.

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

I had to recreate my dpdk virtual machines, and I made it in a way that I wont destroy them and will be able to verify this faster next time. Will finish the review before monday.

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

$ git log --pretty=oneline -6

f2a31822 (HEAD -> bug-1848585-18.11.3-eoan, paelzer/bug-1848585-18.11.3-eoan) update-maintainer
652881b1 changelog: release 18.11.3 for Eoan
d17aea66 d/librte-security18.11.symbols: mark some experimental symbols now as such (none is gone)
8eaa47f7 d/dpdk-dev.install: dpdk-test is now properly in usr/bin
a035bdab d/p/*: refresh patches for 18.11.3 context
160fdcdf New upstream version 18.11.3

micro releases are always trickier to be reviewed but going through the changes of most important parts, related to packaging, all looks good to me:

$ git log -p -6 | diffstat | egrep -E "(debian|deletions)"
...
 b/debian/changelog | 14
 b/debian/control | 3
 b/debian/dpdk-dev.install | 2
 b/debian/librte-security18.11.symbols | 12
 b/debian/patches/0004-build-bump-minimum-Meson-version-to-0.47.1.patch | 4
 b/debian/patches/avoid-as-needed-as-it-causes-overlinking.patch | 4
...
 389 files changed, 3840 insertions(+), 2621 deletions(-)

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :
Download full text (3.6 KiB)

Functional tests before the upgrade (to PPA's package):

### host

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.10
Release: 19.10
Codename: eoan

### host kernel

Linux dpdkeoan 5.3.0-21-generic #22-Ubuntu SMP Tue Oct 29 22:55:51 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

### dpdk / openvswitch

$ dpkg -l | grep -i dpdk
ii dpdk 18.11.2-4 amd64 Data Plane Development Kit (runtime)
ii openvswitch-switch-dpdk 2.12.0-0ubuntu1 amd64 DPDK enabled Open vSwitch switch implementation

$ sudo ovs-vsctl show
ec8171e5-c5c0-43aa-93fc-1a16ffac94eb
    Bridge "dpdkbr0"
        datapath_type: netdev
        Port "vhost-user-client-1"
            Interface "vhost-user-client-1"
                type: dpdkvhostuserclient
                options: {vhost-server-path="/var/run/openvswitch/vhost-user-client-1"}
        Port "dpdkbr0"
            Interface "dpdkbr0"
                type: internal
        Port "vhost-user-2"
            Interface "vhost-user-2"
                type: dpdkvhostuser
    ovs_version: "2.12.0"

### kvm guest 01 (vhost-user-client with 4 queues) with 2 vCPUs and 2GB RAM

    <interface type='vhostuser'>
      <mac address='52:54:00:d2:50:81'/>
      <source type='unix' path='/var/run/openvswitch/vhost-user-client-1' mode='server'/>
      <target dev='vhost-user-client-1'/>
      <model type='virtio'/>
      <driver queues='4'/>
      <alias name='net1'/>
    </interface>

### kvm guest 02 (vhost-user with 1 queue) with 2 vCPUs and 2GB RAM

    <interface type='vhostuser'>
      <mac address='52:54:00:d9:18:39'/>
      <source type='unix' path='/var/run/openvswitch/vhost-user-2' mode='client'/>
      <target dev='vhost-user-2'/>
      <model type='virtio'/>
      <alias name='net1'/>
    </interface>

### iperf BEFORE the update

$ sudo iperf -c 172.16.1.2
------------------------------------------------------------
Client connecting to 172.16.1.2, TCP port 5001
TCP window size: 731 KByte (default)
------------------------------------------------------------
[ 3] local 172.16.1.1 port 36882 connected with 172.16.1.2 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 5.56 GBytes 4.78 Gbits/sec

----

$ sudo iperf -c 172.16.1.2 -P 2
------------------------------------------------------------
Client connecting to 172.16.1.2, TCP port 5001
TCP window size: 774 KByte (default)
------------------------------------------------------------
[ 4] local 172.16.1.1 port 36902 connected with 172.16.1.2 port 5001
[ 3] local 172.16.1.1 port 36900 connected with 172.16.1.2 port 5001
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 4.57 GBytes 3.93 Gbits/sec
[ 3] 0.0-10.0 sec 2.92 GBytes 2.51 Gbits/sec
[SUM] 0.0-10.0 sec 7.49 GBytes 6.43 Gbits/sec

----

$ sudo iperf -c 172.16.1.2 -P 4
------------------------------------------------------------
Client connecting to 172.16.1.2, TCP port 5001
TCP window size: 255 KByte (default)
------------------------------------------------------------
[ 4] local 172.16.1.1 port 36906 connected with 172.16.1.2 port 5001
[ 3] local 172.16.1.1 port 36904 connect...

Read more...

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :
Download full text (3.6 KiB)

Functional tests after the upgrade (to PPA's pkgs):

### host

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.10
Release: 19.10
Codename: eoan

### host kernel

Linux dpdkeoan 5.3.0-21-generic #22-Ubuntu SMP Tue Oct 29 22:55:51 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

### dpdk / openvswitch

$ dpkg -l | grep -i dpdk
ii dpdk 18.11.3-1ubuntu0.19.10.1 amd64 Data Plane Development Kit (runtime)
ii openvswitch-switch-dpdk 2.12.0-0ubuntu1 amd64 DPDK enabled Open vSwitch switch implementation

$ sudo ovs-vsctl show
ec8171e5-c5c0-43aa-93fc-1a16ffac94eb
    Bridge "dpdkbr0"
        datapath_type: netdev
        Port "vhost-user-client-1"
            Interface "vhost-user-client-1"
                type: dpdkvhostuserclient
                options: {vhost-server-path="/var/run/openvswitch/vhost-user-client-1"}
        Port "dpdkbr0"
            Interface "dpdkbr0"
                type: internal
        Port "vhost-user-2"
            Interface "vhost-user-2"
                type: dpdkvhostuser
    ovs_version: "2.12.0"

### kvm guest 01 (vhost-user-client with 4 queues) with 2 vCPUs and 2GB RAM

    <interface type='vhostuser'>
      <mac address='52:54:00:d2:50:81'/>
      <source type='unix' path='/var/run/openvswitch/vhost-user-client-1' mode='server'/>
      <target dev='vhost-user-client-1'/>
      <model type='virtio'/>
      <driver queues='4'/>
      <alias name='net1'/>
    </interface>

### kvm guest 02 (vhost-user with 1 queue) with 2 vCPUs and 2GB RAM

    <interface type='vhostuser'>
      <mac address='52:54:00:d9:18:39'/>
      <source type='unix' path='/var/run/openvswitch/vhost-user-2' mode='client'/>
      <target dev='vhost-user-2'/>
      <model type='virtio'/>
      <alias name='net1'/>
    </interface>

### iperf BEFORE the update

$ sudo iperf -c 172.16.1.2
------------------------------------------------------------
Client connecting to 172.16.1.2, TCP port 5001
TCP window size: 858 KByte (default)
------------------------------------------------------------
[ 3] local 172.16.1.1 port 53466 connected with 172.16.1.2 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 6.15 GBytes 5.28 Gbits/sec

----

$ sudo iperf -c 172.16.1.2 -P 2
------------------------------------------------------------
Client connecting to 172.16.1.2, TCP port 5001
TCP window size: 357 KByte (default)
------------------------------------------------------------
[ 4] local 172.16.1.1 port 53470 connected with 172.16.1.2 port 5001
[ 3] local 172.16.1.1 port 53468 connected with 172.16.1.2 port 5001
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 4.00 GBytes 3.43 Gbits/sec
[ 3] 0.0-10.0 sec 3.94 GBytes 3.39 Gbits/sec
[SUM] 0.0-10.0 sec 7.94 GBytes 6.82 Gbits/sec

----

$ sudo iperf -c 172.16.1.2 -P 4
------------------------------------------------------------
Client connecting to 172.16.1.2, TCP port 5001
TCP window size: 1.21 MByte (default)
------------------------------------------------------------
[ 4] local 172.16.1.1 port 53474 connected with 172.16.1.2 port 5001
[ 3] local 172.16.1.1 po...

Read more...

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Code looks good, functional tests looks good (with a small increase in throughput in my test case). I'm +1 to this change.

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

Tagged and uploaded

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

pushed through security

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/app/meson.build b/app/meson.build
2index a9a026b..fd5f701 100644
3--- a/app/meson.build
4+++ b/app/meson.build
5@@ -13,9 +13,6 @@ lib_execinfo = cc.find_library('execinfo', required: false)
6
7 default_cflags = machine_args
8
9-# specify -D_GNU_SOURCE unconditionally
10-default_cflags += '-D_GNU_SOURCE'
11-
12 foreach app:apps
13 build = true
14 name = app
15diff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c
16index c9c98dc..ec229be 100644
17--- a/app/test-crypto-perf/cperf_test_latency.c
18+++ b/app/test-crypto-perf/cperf_test_latency.c
19@@ -128,7 +128,7 @@ cperf_latency_test_runner(void *arg)
20 uint8_t burst_size_idx = 0;
21 uint32_t imix_idx = 0;
22
23- static int only_once;
24+ static rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0);
25
26 if (ctx == NULL)
27 return 0;
28@@ -310,7 +310,7 @@ cperf_latency_test_runner(void *arg)
29 time_min = tunit*(double)(tsc_min) / tsc_hz;
30
31 if (ctx->options->csv) {
32- if (!only_once)
33+ if (rte_atomic16_test_and_set(&display_once))
34 printf("\n# lcore, Buffer Size, Burst Size, Pakt Seq #, "
35 "Packet Size, cycles, time (us)");
36
37@@ -325,7 +325,6 @@ cperf_latency_test_runner(void *arg)
38 / tsc_hz);
39
40 }
41- only_once = 1;
42 } else {
43 printf("\n# Device %d on lcore %u\n", ctx->dev_id,
44 ctx->lcore_id);
45diff --git a/app/test-crypto-perf/cperf_test_pmd_cyclecount.c b/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
46index c8d16db..1f700a3 100644
47--- a/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
48+++ b/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
49@@ -16,7 +16,7 @@
50 #define PRETTY_HDR_FMT "%12s%12s%12s%12s%12s%12s%12s%12s%12s%12s\n\n"
51 #define PRETTY_LINE_FMT "%12u%12u%12u%12u%12u%12u%12u%12.0f%12.0f%12.0f\n"
52 #define CSV_HDR_FMT "%s,%s,%s,%s,%s,%s,%s,%s,%s,%s\n"
53-#define CSV_LINE_FMT "%10u;%10u;%u;%u;%u;%u;%u;%.f3;%.f3;%.f3\n"
54+#define CSV_LINE_FMT "%10u;%10u;%u;%u;%u;%u;%u;%.3f;%.3f;%.3f\n"
55
56 struct cperf_pmd_cyclecount_ctx {
57 uint8_t dev_id;
58@@ -390,7 +390,7 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx)
59 state.lcore = rte_lcore_id();
60 state.linearize = 0;
61
62- static int only_once;
63+ static rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0);
64 static bool warmup = true;
65
66 /*
67@@ -436,13 +436,12 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx)
68 }
69
70 if (!opts->csv) {
71- if (!only_once)
72+ if (rte_atomic16_test_and_set(&display_once))
73 printf(PRETTY_HDR_FMT, "lcore id", "Buf Size",
74 "Burst Size", "Enqueued",
75 "Dequeued", "Enq Retries",
76 "Deq Retries", "Cycles/Op",
77 "Cycles/Enq", "Cycles/Deq");
78- only_once = 1;
79
80 printf(PRETTY_LINE_FMT, state.ctx->lcore_id,
81 opts->test_buffer_size, test_burst_size,
82@@ -453,13 +452,12 @@ cperf_pmd_cyclecount_test_runner(void *test_ctx)
83 state.cycles_per_enq,
84 state.cycles_per_deq);
85 } else {
86- if (!only_once)
87+ if (rte_atomic16_test_and_set(&display_once))
88 printf(CSV_HDR_FMT, "# lcore id", "Buf Size",
89 "Burst Size", "Enqueued",
90 "Dequeued", "Enq Retries",
91 "Deq Retries", "Cycles/Op",
92 "Cycles/Enq", "Cycles/Deq");
93- only_once = 1;
94
95 printf(CSV_LINE_FMT, state.ctx->lcore_id,
96 opts->test_buffer_size, test_burst_size,
97diff --git a/app/test-crypto-perf/cperf_test_throughput.c b/app/test-crypto-perf/cperf_test_throughput.c
98index 8766d6e..5838f8c 100644
99--- a/app/test-crypto-perf/cperf_test_throughput.c
100+++ b/app/test-crypto-perf/cperf_test_throughput.c
101@@ -94,7 +94,7 @@ cperf_throughput_test_runner(void *test_ctx)
102 uint8_t burst_size_idx = 0;
103 uint32_t imix_idx = 0;
104
105- static int only_once;
106+ static rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0);
107
108 struct rte_crypto_op *ops[ctx->options->max_burst_size];
109 struct rte_crypto_op *ops_processed[ctx->options->max_burst_size];
110@@ -261,13 +261,12 @@ cperf_throughput_test_runner(void *test_ctx)
111 ctx->options->total_ops);
112
113 if (!ctx->options->csv) {
114- if (!only_once)
115+ if (rte_atomic16_test_and_set(&display_once))
116 printf("%12s%12s%12s%12s%12s%12s%12s%12s%12s%12s\n\n",
117 "lcore id", "Buf Size", "Burst Size",
118 "Enqueued", "Dequeued", "Failed Enq",
119 "Failed Deq", "MOps", "Gbps",
120 "Cycles/Buf");
121- only_once = 1;
122
123 printf("%12u%12u%12u%12"PRIu64"%12"PRIu64"%12"PRIu64
124 "%12"PRIu64"%12.4f%12.4f%12.2f\n",
125@@ -282,12 +281,11 @@ cperf_throughput_test_runner(void *test_ctx)
126 throughput_gbps,
127 cycles_per_packet);
128 } else {
129- if (!only_once)
130+ if (rte_atomic16_test_and_set(&display_once))
131 printf("#lcore id,Buffer Size(B),"
132 "Burst Size,Enqueued,Dequeued,Failed Enq,"
133 "Failed Deq,Ops(Millions),Throughput(Gbps),"
134 "Cycles/Buf\n\n");
135- only_once = 1;
136
137 printf("%u;%u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";"
138 "%.3f;%.3f;%.3f\n",
139diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c
140index 9134b92..2f11b73 100644
141--- a/app/test-crypto-perf/cperf_test_verify.c
142+++ b/app/test-crypto-perf/cperf_test_verify.c
143@@ -232,7 +232,7 @@ cperf_verify_test_runner(void *test_ctx)
144 uint64_t ops_deqd = 0, ops_deqd_total = 0, ops_deqd_failed = 0;
145 uint64_t ops_failed = 0;
146
147- static int only_once;
148+ static rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0);
149
150 uint64_t i;
151 uint16_t ops_unused = 0;
152@@ -375,12 +375,11 @@ cperf_verify_test_runner(void *test_ctx)
153 }
154
155 if (!ctx->options->csv) {
156- if (!only_once)
157+ if (rte_atomic16_test_and_set(&display_once))
158 printf("%12s%12s%12s%12s%12s%12s%12s%12s\n\n",
159 "lcore id", "Buf Size", "Burst size",
160 "Enqueued", "Dequeued", "Failed Enq",
161 "Failed Deq", "Failed Ops");
162- only_once = 1;
163
164 printf("%12u%12u%12u%12"PRIu64"%12"PRIu64"%12"PRIu64
165 "%12"PRIu64"%12"PRIu64"\n",
166@@ -393,11 +392,10 @@ cperf_verify_test_runner(void *test_ctx)
167 ops_deqd_failed,
168 ops_failed);
169 } else {
170- if (!only_once)
171+ if (rte_atomic16_test_and_set(&display_once))
172 printf("\n# lcore id, Buffer Size(B), "
173 "Burst Size,Enqueued,Dequeued,Failed Enq,"
174 "Failed Deq,Failed Ops\n");
175- only_once = 1;
176
177 printf("%10u;%10u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";"
178 "%"PRIu64"\n",
179diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
180index 0aa0de8..9213947 100644
181--- a/app/test-crypto-perf/main.c
182+++ b/app/test-crypto-perf/main.c
183@@ -627,9 +627,12 @@ main(int argc, char **argv)
184
185 if (i == total_nb_qps)
186 break;
187- rte_eal_wait_lcore(lcore_id);
188+ ret |= rte_eal_wait_lcore(lcore_id);
189 i++;
190 }
191+
192+ if (ret != EXIT_SUCCESS)
193+ goto err;
194 } else {
195
196 /* Get next size from range or list */
197@@ -654,10 +657,13 @@ main(int argc, char **argv)
198
199 if (i == total_nb_qps)
200 break;
201- rte_eal_wait_lcore(lcore_id);
202+ ret |= rte_eal_wait_lcore(lcore_id);
203 i++;
204 }
205
206+ if (ret != EXIT_SUCCESS)
207+ goto err;
208+
209 /* Get next size from range or list */
210 if (opts.inc_buffer_size != 0)
211 opts.test_buffer_size += opts.inc_buffer_size;
212diff --git a/app/test-eventdev/test_order_common.c b/app/test-eventdev/test_order_common.c
213index 8a34201..252e4a1 100644
214--- a/app/test-eventdev/test_order_common.c
215+++ b/app/test-eventdev/test_order_common.c
216@@ -67,6 +67,11 @@ order_producer(void *arg)
217 int
218 order_opt_check(struct evt_options *opt)
219 {
220+ if (opt->prod_type != EVT_PROD_TYPE_SYNT) {
221+ evt_err("Invalid producer type");
222+ return -EINVAL;
223+ }
224+
225 /* 1 producer + N workers + 1 master */
226 if (rte_lcore_count() < 3) {
227 evt_err("test need minimum 3 lcores");
228@@ -298,12 +303,23 @@ order_event_dev_port_setup(struct evt_test *test, struct evt_options *opt,
229 int ret;
230 uint8_t port;
231 struct test_order *t = evt_test_priv(test);
232+ struct rte_event_dev_info dev_info;
233+
234+ memset(&dev_info, 0, sizeof(struct rte_event_dev_info));
235+ ret = rte_event_dev_info_get(opt->dev_id, &dev_info);
236+ if (ret) {
237+ evt_err("failed to get eventdev info %d", opt->dev_id);
238+ return ret;
239+ }
240+
241+ if (opt->wkr_deq_dep > dev_info.max_event_port_dequeue_depth)
242+ opt->wkr_deq_dep = dev_info.max_event_port_dequeue_depth;
243
244 /* port configuration */
245- const struct rte_event_port_conf wkr_p_conf = {
246+ const struct rte_event_port_conf p_conf = {
247 .dequeue_depth = opt->wkr_deq_dep,
248- .enqueue_depth = 64,
249- .new_event_threshold = 4096,
250+ .enqueue_depth = dev_info.max_event_port_dequeue_depth,
251+ .new_event_threshold = dev_info.max_num_events,
252 };
253
254 /* setup one port per worker, linking to all queues */
255@@ -314,7 +330,7 @@ order_event_dev_port_setup(struct evt_test *test, struct evt_options *opt,
256 w->port_id = port;
257 w->t = t;
258
259- ret = rte_event_port_setup(opt->dev_id, port, &wkr_p_conf);
260+ ret = rte_event_port_setup(opt->dev_id, port, &p_conf);
261 if (ret) {
262 evt_err("failed to setup port %d", port);
263 return ret;
264@@ -326,12 +342,6 @@ order_event_dev_port_setup(struct evt_test *test, struct evt_options *opt,
265 return -EINVAL;
266 }
267 }
268- /* port for producer, no links */
269- const struct rte_event_port_conf prod_conf = {
270- .dequeue_depth = 8,
271- .enqueue_depth = 32,
272- .new_event_threshold = 1200,
273- };
274 struct prod_data *p = &t->prod;
275
276 p->dev_id = opt->dev_id;
277@@ -339,7 +349,7 @@ order_event_dev_port_setup(struct evt_test *test, struct evt_options *opt,
278 p->queue_id = 0;
279 p->t = t;
280
281- ret = rte_event_port_setup(opt->dev_id, port, &prod_conf);
282+ ret = rte_event_port_setup(opt->dev_id, port, &p_conf);
283 if (ret) {
284 evt_err("failed to setup producer port %d", port);
285 return ret;
286diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
287index f99a6a6..f93729a 100644
288--- a/app/test-eventdev/test_perf_common.c
289+++ b/app/test-eventdev/test_perf_common.c
290@@ -583,7 +583,8 @@ perf_opt_check(struct evt_options *opt, uint64_t nb_queues)
291 return -1;
292 }
293
294- if (opt->prod_type == EVT_PROD_TYPE_SYNT) {
295+ if (opt->prod_type == EVT_PROD_TYPE_SYNT ||
296+ opt->prod_type == EVT_PROD_TYPE_EVENT_TIMER_ADPTR) {
297 /* Validate producer lcores */
298 if (evt_lcores_has_overlap(opt->plcores,
299 rte_get_master_lcore())) {
300diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
301index eeadb2d..8a6f246 100644
302--- a/app/test-pmd/cmdline.c
303+++ b/app/test-pmd/cmdline.c
304@@ -2042,6 +2042,7 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
305 {
306 struct cmd_config_rx_mode_flag *res = parsed_result;
307 portid_t pid;
308+ int k;
309
310 if (!all_ports_stopped()) {
311 printf("Please stop all ports first\n");
312@@ -2142,6 +2143,10 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
313 return;
314 }
315 port->dev_conf.rxmode.offloads = rx_offloads;
316+ /* Apply Rx offloads configuration */
317+ for (k = 0; k < port->dev_info.max_rx_queues; k++)
318+ port->rx_conf[k].offloads =
319+ port->dev_conf.rxmode.offloads;
320 }
321
322 init_port_config();
323@@ -4355,6 +4360,17 @@ csum_show(int port_id)
324 }
325
326 static void
327+cmd_config_queue_tx_offloads(struct rte_port *port)
328+{
329+ int k;
330+
331+ /* Apply queue tx offloads configuration */
332+ for (k = 0; k < port->dev_info.max_rx_queues; k++)
333+ port->tx_conf[k].offloads =
334+ port->dev_conf.txmode.offloads;
335+}
336+
337+static void
338 cmd_csum_parsed(void *parsed_result,
339 __attribute__((unused)) struct cmdline *cl,
340 __attribute__((unused)) void *data)
341@@ -4438,6 +4454,7 @@ cmd_csum_parsed(void *parsed_result,
342 ports[res->port_id].dev_conf.txmode.offloads &=
343 (~csum_offloads);
344 }
345+ cmd_config_queue_tx_offloads(&ports[res->port_id]);
346 }
347 csum_show(res->port_id);
348
349@@ -4589,6 +4606,7 @@ cmd_tso_set_parsed(void *parsed_result,
350 printf("TSO segment size for non-tunneled packets is %d\n",
351 ports[res->port_id].tso_segsz);
352 }
353+ cmd_config_queue_tx_offloads(&ports[res->port_id]);
354
355 /* display warnings if configuration is not supported by the NIC */
356 rte_eth_dev_info_get(res->port_id, &dev_info);
357@@ -4744,6 +4762,7 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,
358 "if outer L3 is IPv4; not necessary for IPv6\n");
359 }
360
361+ cmd_config_queue_tx_offloads(&ports[res->port_id]);
362 cmd_reconfig_device_queue(res->port_id, 1, 1);
363 }
364
365@@ -8348,19 +8367,19 @@ cmd_set_vf_rxmode_parsed(void *parsed_result,
366 __attribute__((unused)) void *data)
367 {
368 int ret = -ENOTSUP;
369- uint16_t rx_mode = 0;
370+ uint16_t vf_rxmode = 0;
371 struct cmd_set_vf_rxmode *res = parsed_result;
372
373 int is_on = (strcmp(res->on, "on") == 0) ? 1 : 0;
374 if (!strcmp(res->what,"rxmode")) {
375 if (!strcmp(res->mode, "AUPE"))
376- rx_mode |= ETH_VMDQ_ACCEPT_UNTAG;
377+ vf_rxmode |= ETH_VMDQ_ACCEPT_UNTAG;
378 else if (!strcmp(res->mode, "ROPE"))
379- rx_mode |= ETH_VMDQ_ACCEPT_HASH_UC;
380+ vf_rxmode |= ETH_VMDQ_ACCEPT_HASH_UC;
381 else if (!strcmp(res->mode, "BAM"))
382- rx_mode |= ETH_VMDQ_ACCEPT_BROADCAST;
383+ vf_rxmode |= ETH_VMDQ_ACCEPT_BROADCAST;
384 else if (!strncmp(res->mode, "MPE",3))
385- rx_mode |= ETH_VMDQ_ACCEPT_MULTICAST;
386+ vf_rxmode |= ETH_VMDQ_ACCEPT_MULTICAST;
387 }
388
389 RTE_SET_USED(is_on);
390@@ -8368,12 +8387,12 @@ cmd_set_vf_rxmode_parsed(void *parsed_result,
391 #ifdef RTE_LIBRTE_IXGBE_PMD
392 if (ret == -ENOTSUP)
393 ret = rte_pmd_ixgbe_set_vf_rxmode(res->port_id, res->vf_id,
394- rx_mode, (uint8_t)is_on);
395+ vf_rxmode, (uint8_t)is_on);
396 #endif
397 #ifdef RTE_LIBRTE_BNXT_PMD
398 if (ret == -ENOTSUP)
399 ret = rte_pmd_bnxt_set_vf_rxmode(res->port_id, res->vf_id,
400- rx_mode, (uint8_t)is_on);
401+ vf_rxmode, (uint8_t)is_on);
402 #endif
403 if (ret < 0)
404 printf("bad VF receive mode parameter, return code = %d \n",
405diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
406index d202566..d1fd273 100644
407--- a/app/test-pmd/cmdline_flow.c
408+++ b/app/test-pmd/cmdline_flow.c
409@@ -3378,6 +3378,7 @@ parse_vc_action_rss_queue(struct context *ctx, const struct token *token,
410 {
411 static const enum index next[] = NEXT_ENTRY(ACTION_RSS_QUEUE);
412 struct action_rss_data *action_rss_data;
413+ const struct arg *arg;
414 int ret;
415 int i;
416
417@@ -3393,10 +3394,10 @@ parse_vc_action_rss_queue(struct context *ctx, const struct token *token,
418 }
419 if (i >= ACTION_RSS_QUEUE_NUM)
420 return -1;
421- if (push_args(ctx,
422- ARGS_ENTRY_ARB(offsetof(struct action_rss_data, queue) +
423- i * sizeof(action_rss_data->queue[i]),
424- sizeof(action_rss_data->queue[i]))))
425+ arg = ARGS_ENTRY_ARB(offsetof(struct action_rss_data, queue) +
426+ i * sizeof(action_rss_data->queue[i]),
427+ sizeof(action_rss_data->queue[i]));
428+ if (push_args(ctx, arg))
429 return -1;
430 ret = parse_int(ctx, token, str, len, NULL, 0);
431 if (ret < 0) {
432@@ -3746,6 +3747,8 @@ parse_vc_action_mplsogre_encap(struct context *ctx, const struct token *token,
433 .src_addr = mplsogre_encap_conf.ipv4_src,
434 .dst_addr = mplsogre_encap_conf.ipv4_dst,
435 .next_proto_id = IPPROTO_GRE,
436+ .version_ihl = IPV4_VHL_DEF,
437+ .time_to_live = IPDEFTTL,
438 },
439 };
440 struct rte_flow_item_ipv6 ipv6 = {
441@@ -3847,6 +3850,7 @@ parse_vc_action_mplsogre_decap(struct context *ctx, const struct token *token,
442 struct rte_flow_item_ipv6 ipv6 = {
443 .hdr = {
444 .proto = IPPROTO_GRE,
445+ .hop_limits = IPDEFTTL,
446 },
447 };
448 struct rte_flow_item_gre gre = {
449@@ -3934,6 +3938,8 @@ parse_vc_action_mplsoudp_encap(struct context *ctx, const struct token *token,
450 .src_addr = mplsoudp_encap_conf.ipv4_src,
451 .dst_addr = mplsoudp_encap_conf.ipv4_dst,
452 .next_proto_id = IPPROTO_UDP,
453+ .version_ihl = IPV4_VHL_DEF,
454+ .time_to_live = IPDEFTTL,
455 },
456 };
457 struct rte_flow_item_ipv6 ipv6 = {
458@@ -4038,6 +4044,7 @@ parse_vc_action_mplsoudp_decap(struct context *ctx, const struct token *token,
459 struct rte_flow_item_ipv6 ipv6 = {
460 .hdr = {
461 .proto = IPPROTO_UDP,
462+ .hop_limits = IPDEFTTL,
463 },
464 };
465 struct rte_flow_item_udp udp = {
466diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
467index 4004e3a..4870b90 100644
468--- a/app/test-pmd/config.c
469+++ b/app/test-pmd/config.c
470@@ -510,6 +510,10 @@ port_infos_display(portid_t port_id)
471 printf("Min possible number of TXDs per queue: %hu\n",
472 dev_info.tx_desc_lim.nb_min);
473 printf("TXDs number alignment: %hu\n", dev_info.tx_desc_lim.nb_align);
474+ printf("Max segment number per packet: %hu\n",
475+ dev_info.tx_desc_lim.nb_seg_max);
476+ printf("Max segment number per MTU/TSO: %hu\n",
477+ dev_info.tx_desc_lim.nb_mtu_seg_max);
478
479 /* Show switch info only if valid switch domain and port id is set */
480 if (dev_info.switch_info.domain_id !=
481diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
482index cf983b1..83b5e42 100644
483--- a/app/test-pmd/testpmd.c
484+++ b/app/test-pmd/testpmd.c
485@@ -2290,7 +2290,7 @@ attach_port(char *identifier)
486 return;
487 }
488
489- if (rte_dev_probe(identifier) != 0) {
490+ if (rte_dev_probe(identifier) < 0) {
491 TESTPMD_LOG(ERR, "Failed to attach port %s\n", identifier);
492 return;
493 }
494@@ -2360,7 +2360,7 @@ detach_port_device(portid_t port_id)
495 port_flow_flush(port_id);
496 }
497
498- if (rte_dev_remove(dev) != 0) {
499+ if (rte_dev_remove(dev) < 0) {
500 TESTPMD_LOG(ERR, "Failed to detach device %s\n", dev->name);
501 return;
502 }
503@@ -2735,9 +2735,13 @@ static void
504 rxtx_port_config(struct rte_port *port)
505 {
506 uint16_t qid;
507+ uint64_t offloads;
508
509 for (qid = 0; qid < nb_rxq; qid++) {
510+ offloads = port->rx_conf[qid].offloads;
511 port->rx_conf[qid] = port->dev_info.default_rxconf;
512+ if (offloads != 0)
513+ port->rx_conf[qid].offloads = offloads;
514
515 /* Check if any Rx parameters have been passed */
516 if (rx_pthresh != RTE_PMD_PARAM_UNSET)
517@@ -2759,7 +2763,10 @@ rxtx_port_config(struct rte_port *port)
518 }
519
520 for (qid = 0; qid < nb_txq; qid++) {
521+ offloads = port->tx_conf[qid].offloads;
522 port->tx_conf[qid] = port->dev_info.default_txconf;
523+ if (offloads != 0)
524+ port->tx_conf[qid].offloads = offloads;
525
526 /* Check if any Tx parameters have been passed */
527 if (tx_pthresh != RTE_PMD_PARAM_UNSET)
528@@ -3071,7 +3078,8 @@ signal_handler(int signum)
529 rte_pdump_uninit();
530 #endif
531 #ifdef RTE_LIBRTE_LATENCY_STATS
532- rte_latencystats_uninit();
533+ if (latencystats_enabled != 0)
534+ rte_latencystats_uninit();
535 #endif
536 force_quit();
537 /* Set flag to indicate the force termination. */
538diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c
539index 687bfa4..042dc6f 100644
540--- a/app/test-pmd/util.c
541+++ b/app/test-pmd/util.c
542@@ -14,7 +14,7 @@
543 #include "testpmd.h"
544
545 static inline void
546-print_ether_addr(const char *what, struct ether_addr *eth_addr)
547+print_ether_addr(const char *what, const struct ether_addr *eth_addr)
548 {
549 char buf[ETHER_ADDR_FMT_SIZE];
550 ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
551@@ -26,7 +26,8 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
552 uint16_t nb_pkts, int is_rx)
553 {
554 struct rte_mbuf *mb;
555- struct ether_hdr *eth_hdr;
556+ const struct ether_hdr *eth_hdr;
557+ struct ether_hdr _eth_hdr;
558 uint16_t eth_type;
559 uint64_t ol_flags;
560 uint16_t i, packet_type;
561@@ -45,7 +46,7 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
562 (unsigned int) nb_pkts);
563 for (i = 0; i < nb_pkts; i++) {
564 mb = pkts[i];
565- eth_hdr = rte_pktmbuf_mtod(mb, struct ether_hdr *);
566+ eth_hdr = rte_pktmbuf_read(mb, 0, sizeof(_eth_hdr), &_eth_hdr);
567 eth_type = RTE_BE_TO_CPU_16(eth_hdr->ether_type);
568 ol_flags = mb->ol_flags;
569 packet_type = mb->packet_type;
570diff --git a/config/arm/meson.build b/config/arm/meson.build
571index 9feb54f..0457e6f 100644
572--- a/config/arm/meson.build
573+++ b/config/arm/meson.build
574@@ -9,7 +9,7 @@ arm_force_native_march = false
575 arm_force_default_march = (machine == 'default')
576
577 machine_args_generic = [
578- ['default', ['-march=armv8-a+crc+crypto']],
579+ ['default', ['-march=armv8-a+crc']],
580 ['native', ['-march=native']],
581 ['0xd03', ['-mcpu=cortex-a53']],
582 ['0xd04', ['-mcpu=cortex-a35']],
583@@ -90,7 +90,7 @@ impl_dpaa2 = ['NXP DPAA2', flags_dpaa2, machine_args_generic]
584
585 dpdk_conf.set('RTE_FORCE_INTRINSICS', 1)
586
587-if cc.sizeof('void *') != 8
588+if not dpdk_conf.get('RTE_ARCH_64')
589 dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
590 dpdk_conf.set('RTE_ARCH_ARM', 1)
591 dpdk_conf.set('RTE_ARCH_ARMv7', 1)
592@@ -100,7 +100,6 @@ if cc.sizeof('void *') != 8
593 else
594 dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
595 dpdk_conf.set('RTE_ARCH_ARM64', 1)
596- dpdk_conf.set('RTE_ARCH_64', 1)
597
598 machine = []
599 cmd_generic = ['generic', '', '', 'default', '']
600diff --git a/config/meson.build b/config/meson.build
601index 80d2538..d4d4508 100644
602--- a/config/meson.build
603+++ b/config/meson.build
604@@ -50,6 +50,8 @@ toolchain = cc.get_id()
605 dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain)
606 dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
607
608+dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
609+
610 add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
611 dpdk_extra_ldflags += '-Wl,--no-as-needed'
612
613@@ -97,7 +99,7 @@ warning_flags = [
614 '-Wcast-qual',
615 '-Wno-address-of-packed-member'
616 ]
617-if cc.sizeof('void *') == 4
618+if not dpdk_conf.get('RTE_ARCH_64')
619 # for 32-bit, don't warn about casting a 32-bit pointer to 64-bit int - it's fine!!
620 warning_flags += '-Wno-pointer-to-int-cast'
621 endif
622@@ -117,6 +119,7 @@ dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64)
623 dpdk_conf.set('RTE_DRIVER_MEMPOOL_BUCKET_SIZE_KB', 64)
624 dpdk_conf.set('RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', true)
625
626+
627 compile_time_cpuflags = []
628 if host_machine.cpu_family().startswith('x86')
629 arch_subdir = 'x86'
630@@ -135,3 +138,11 @@ install_headers('rte_config.h', subdir: get_option('include_subdir_arch'))
631
632 # enable VFIO only if it is linux OS
633 dpdk_conf.set('RTE_EAL_VFIO', host_machine.system() == 'linux')
634+
635+# specify -D_GNU_SOURCE unconditionally
636+add_project_arguments('-D_GNU_SOURCE', language: 'c')
637+
638+# specify -D__BSD_VISIBLE for FreeBSD
639+if host_machine.system() == 'freebsd'
640+ add_project_arguments('-D__BSD_VISIBLE', language: 'c')
641+endif
642diff --git a/config/ppc_64/meson.build b/config/ppc_64/meson.build
643index e207c43..7ceae1d 100644
644--- a/config/ppc_64/meson.build
645+++ b/config/ppc_64/meson.build
646@@ -1,9 +1,11 @@
647 # SPDX-License-Identifier: BSD-3-Clause
648 # Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
649
650+if not dpdk_conf.get('RTE_ARCH_64')
651+ error('Only 64-bit compiles are supported for this platform type')
652+endif
653 dpdk_conf.set('RTE_ARCH', 'ppc_64')
654 dpdk_conf.set('RTE_ARCH_PPC_64', 1)
655-dpdk_conf.set('RTE_ARCH_64', 1)
656
657 # overrides specific to ppc64
658 dpdk_conf.set('RTE_MAX_LCORE', 256)
659diff --git a/config/x86/meson.build b/config/x86/meson.build
660index ae92f86..50a9edc 100644
661--- a/config/x86/meson.build
662+++ b/config/x86/meson.build
663@@ -29,10 +29,9 @@ foreach f:base_flags
664 endforeach
665
666 dpdk_conf.set('RTE_ARCH_X86', 1)
667-if (host_machine.cpu_family() == 'x86_64')
668+if dpdk_conf.get('RTE_ARCH_64')
669 dpdk_conf.set('RTE_ARCH_X86_64', 1)
670 dpdk_conf.set('RTE_ARCH', 'x86_64')
671- dpdk_conf.set('RTE_ARCH_64', 1)
672 else
673 dpdk_conf.set('RTE_ARCH_I686', 1)
674 dpdk_conf.set('RTE_ARCH', 'i686')
675diff --git a/debian/changelog b/debian/changelog
676index fef91b6..23536a9 100644
677--- a/debian/changelog
678+++ b/debian/changelog
679@@ -1,3 +1,17 @@
680+dpdk (18.11.3-1ubuntu0.19.10.1) eoan; urgency=medium
681+
682+ * Merge stable update to 18.11.3; For a list of changes see
683+ http://doc.dpdk.org/guides-18.11/rel_notes/release_18_11.html#id2
684+ - refresh d/p/0004-build-bump-minimum-Meson-version-to-0.47.1.patch
685+ - refresh d/p/avoid-as-needed-as-it-causes-overlinking.patch
686+ - d/dpdk-dev.install: dpdk-test is now properly in usr/bin
687+ - d/librte-security18.11.symbols: mark some symbols that now properly
688+ are experimental as such (none is gone)
689+ - among other things it fixes a dkms build issue with kernel 5.4
690+ (LP: #1848585)
691+
692+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Wed, 30 Oct 2019 09:11:49 +0100
693+
694 dpdk (18.11.2-4) unstable; urgency=medium
695
696 * d/p/avoid-as-needed-as-it-causes-overlinking.patch: fix overlinking in
697diff --git a/debian/control b/debian/control
698index e19547e..cf35b95 100644
699--- a/debian/control
700+++ b/debian/control
701@@ -1,6 +1,7 @@
702 Source: dpdk
703 Priority: optional
704-Maintainer: Debian DPDK Maintainers <pkg-dpdk-devel@lists.alioth.debian.org>
705+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
706+XSBC-Original-Maintainer: Debian DPDK Maintainers <pkg-dpdk-devel@lists.alioth.debian.org>
707 Uploaders: Luca Boccassi <bluca@debian.org>,
708 Christian Ehrhardt <christian.ehrhardt@canonical.com>,
709 Santiago Ruano Rincón <santiagorr@riseup.net>,
710diff --git a/debian/dpdk-dev.install b/debian/dpdk-dev.install
711index 9a537c9..5fe168c 100644
712--- a/debian/dpdk-dev.install
713+++ b/debian/dpdk-dev.install
714@@ -1,4 +1,3 @@
715-obj-*/test/test/dpdk-test usr/bin/
716 test/test/autotest.py usr/share/dpdk/test/
717 test/test/autotest_data.py usr/share/dpdk/test/
718 test/test/autotest_runner.py usr/share/dpdk/test/
719@@ -9,3 +8,4 @@ usr/bin/dpdk-test-bbdev
720 usr/bin/dpdk-test-crypto-perf
721 usr/bin/dpdk-test-eventdev
722 usr/bin/dpdk-testpmd
723+usr/bin/dpdk-test
724diff --git a/debian/librte-security18.11.symbols b/debian/librte-security18.11.symbols
725index f2b9654..121df8d 100644
726--- a/debian/librte-security18.11.symbols
727+++ b/debian/librte-security18.11.symbols
728@@ -5,17 +5,17 @@ librte_security.so.18.11 librte-security18.11 #MINVER#
729 #MISSING: 18.11# rte_security_capabilities_get@EXPERIMENTAL 17.11
730 rte_security_capability_get@DPDK_18.11 18.11
731 #MISSING: 18.11# rte_security_capability_get@EXPERIMENTAL 17.11
732- rte_security_get_userdata@DPDK_18.11 18.11
733-#MISSING: 18.11# rte_security_get_userdata@EXPERIMENTAL 18.02
734+#MISSING: 18.11.3# rte_security_get_userdata@DPDK_18.11 18.11
735+ rte_security_get_userdata@EXPERIMENTAL 18.11.3
736 rte_security_session_create@DPDK_18.11 18.11
737 #MISSING: 18.11# rte_security_session_create@EXPERIMENTAL 17.11
738 rte_security_session_destroy@DPDK_18.11 18.11
739 #MISSING: 18.11# rte_security_session_destroy@EXPERIMENTAL 17.11
740 rte_security_session_get_size@DPDK_18.11 18.11
741 #MISSING: 18.11# rte_security_session_get_size@EXPERIMENTAL 18.02
742- rte_security_session_stats_get@DPDK_18.11 18.11
743-#MISSING: 18.11# rte_security_session_stats_get@EXPERIMENTAL 17.11
744- rte_security_session_update@DPDK_18.11 18.11
745-#MISSING: 18.11# rte_security_session_update@EXPERIMENTAL 17.11
746+#MISSING: 18.11.3# rte_security_session_stats_get@DPDK_18.11 18.11
747+ rte_security_session_stats_get@EXPERIMENTAL 18.11.3
748+#MISSING: 18.11.3# rte_security_session_update@DPDK_18.11 18.11
749+ rte_security_session_update@EXPERIMENTAL 18.11.3
750 rte_security_set_pkt_metadata@DPDK_18.11 18.11
751 #MISSING: 18.11# rte_security_set_pkt_metadata@EXPERIMENTAL 17.11
752diff --git a/debian/patches/0004-build-bump-minimum-Meson-version-to-0.47.1.patch b/debian/patches/0004-build-bump-minimum-Meson-version-to-0.47.1.patch
753index 59c4e88..fed7e96 100644
754--- a/debian/patches/0004-build-bump-minimum-Meson-version-to-0.47.1.patch
755+++ b/debian/patches/0004-build-bump-minimum-Meson-version-to-0.47.1.patch
756@@ -20,7 +20,7 @@ Origin: https://patches.dpdk.org/patch/49995/
757 --- a/kernel/linux/meson.build
758 +++ b/kernel/linux/meson.build
759 @@ -27,11 +27,7 @@ else
760- make_returncode = run_command('make', '-sC', kernel_dir,
761+ make_returncode = run_command('make', '-sC', kernel_dir + '/build',
762 'kernelversion').returncode()
763 if make_returncode != 0
764 - if meson.version().version_compare('>=0.44')
765@@ -35,7 +35,7 @@ Origin: https://patches.dpdk.org/patch/49995/
766 --- a/meson.build
767 +++ b/meson.build
768 @@ -5,7 +5,7 @@ project('DPDK', 'C',
769- version: '18.11.2',
770+ version: '18.11.3',
771 license: 'BSD',
772 default_options: ['buildtype=release', 'default_library=static'],
773 - meson_version: '>= 0.41'
774diff --git a/debian/patches/avoid-as-needed-as-it-causes-overlinking.patch b/debian/patches/avoid-as-needed-as-it-causes-overlinking.patch
775index 7bafc5c..61944ce 100644
776--- a/debian/patches/avoid-as-needed-as-it-causes-overlinking.patch
777+++ b/debian/patches/avoid-as-needed-as-it-causes-overlinking.patch
778@@ -31,8 +31,8 @@ Last-Update: 2019-09-04
779
780 --- a/config/meson.build
781 +++ b/config/meson.build
782-@@ -44,7 +44,6 @@ dpdk_conf.set_quoted('RTE_TOOLCHAIN', to
783- dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
784+@@ -53,7 +53,6 @@ dpdk_conf.set('RTE_TOOLCHAIN_' + toolcha
785+ dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
786
787 add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
788 -dpdk_extra_ldflags += '-Wl,--no-as-needed'
789diff --git a/devtools/build-tags.sh b/devtools/build-tags.sh
790index 78001f0..5bfbf7e 100755
791--- a/devtools/build-tags.sh
792+++ b/devtools/build-tags.sh
793@@ -68,11 +68,13 @@ common_sources()
794 linux_sources()
795 {
796 find_sources "lib/librte_eal/linuxapp" '*.[chS]'
797+ find_sources "kernel/linux" '*.[chS]'
798 }
799
800 bsd_sources()
801 {
802 find_sources "lib/librte_eal/bsdapp" '*.[chS]'
803+ find_sources "kernel/freebsd" '*.[chS]'
804 }
805
806 arm_common()
807diff --git a/doc/api/meson.build b/doc/api/meson.build
808index 30bdc57..1c48b76 100644
809--- a/doc/api/meson.build
810+++ b/doc/api/meson.build
811@@ -26,7 +26,7 @@ if doxygen.found()
812 command: [generate_examples, '@INPUT@', '@OUTPUT@'],
813 install: get_option('enable_docs'),
814 install_dir: htmldir,
815- build_by_default: false)
816+ build_by_default: get_option('enable_docs'))
817
818 cdata = configuration_data()
819 cdata.set('VERSION', meson.project_version())
820@@ -48,7 +48,7 @@ if doxygen.found()
821 command: [generate_doxygen, '@INPUT@', '@OUTPUT@', generate_css],
822 install: get_option('enable_docs'),
823 install_dir: htmldir,
824- build_by_default: false)
825+ build_by_default: get_option('enable_docs'))
826
827 doc_targets += doxy_build
828 doc_target_names += 'Doxygen_API'
829diff --git a/doc/guides/conf.py b/doc/guides/conf.py
830index a85f6c9..94b97dc 100644
831--- a/doc/guides/conf.py
832+++ b/doc/guides/conf.py
833@@ -64,9 +64,13 @@ latex_documents = [
834 custom_latex_preamble = r"""
835 \usepackage[utf8]{inputenc}
836 \usepackage[T1]{fontenc}
837+\usepackage{textalpha}
838 \usepackage{helvet}
839 \renewcommand{\familydefault}{\sfdefault}
840 \RecustomVerbatimEnvironment{Verbatim}{Verbatim}{xleftmargin=5mm}
841+\usepackage{etoolbox}
842+\robustify\(
843+\robustify\)
844 """
845
846 # Configuration for the latex/pdf docs.
847diff --git a/doc/guides/contributing/documentation.rst b/doc/guides/contributing/documentation.rst
848index 408859e..a45b62b 100644
849--- a/doc/guides/contributing/documentation.rst
850+++ b/doc/guides/contributing/documentation.rst
851@@ -200,10 +200,10 @@ The main required packages can be installed as follows:
852 .. code-block:: console
853
854 # Ubuntu/Debian.
855- sudo apt-get -y install texlive-latex-extra
856+ sudo apt-get -y install texlive-latex-extra texlive-lang-greek
857
858 # Red Hat/Fedora, selective install.
859- sudo dnf -y install texlive-collection-latexextra
860+ sudo dnf -y install texlive-collection-latexextra texlive-greek-fontenc
861
862 `Latexmk <http://personal.psu.edu/jcc8/software/latexmk-jcc/>`_ is a perl script
863 for running LaTeX for resolving cross references,
864diff --git a/doc/guides/contributing/patches.rst b/doc/guides/contributing/patches.rst
865index 1bd91b7..02cd055 100644
866--- a/doc/guides/contributing/patches.rst
867+++ b/doc/guides/contributing/patches.rst
868@@ -637,12 +637,3 @@ patch accepted. The general cycle for patch review and acceptance is:
869 than rework of the original.
870 * Trivial patches may be merged sooner than described above at the tree committer's
871 discretion.
872-
873-DPDK Maintainers
874-----------------
875-
876-The following are the DPDK maintainers as listed in the ``MAINTAINERS`` file
877-in the DPDK root directory.
878-
879-.. literalinclude:: ../../../MAINTAINERS
880- :lines: 3-
881diff --git a/doc/guides/cryptodevs/armv8.rst b/doc/guides/cryptodevs/armv8.rst
882index 725398d..81d7f8e 100644
883--- a/doc/guides/cryptodevs/armv8.rst
884+++ b/doc/guides/cryptodevs/armv8.rst
885@@ -59,7 +59,6 @@ User can use app/test application to check how to use this PMD and to verify
886 crypto processing.
887
888 Test name is cryptodev_sw_armv8_autotest.
889-For performance test cryptodev_sw_armv8_perftest can be used.
890
891 Limitations
892 -----------
893diff --git a/doc/guides/cryptodevs/openssl.rst b/doc/guides/cryptodevs/openssl.rst
894index 2ac8090..f9a54fe 100644
895--- a/doc/guides/cryptodevs/openssl.rst
896+++ b/doc/guides/cryptodevs/openssl.rst
897@@ -87,7 +87,6 @@ User can use app/test application to check how to use this pmd and to verify
898 crypto processing.
899
900 Test name is cryptodev_openssl_autotest.
901-For performance test cryptodev_openssl_perftest can be used.
902 For asymmetric crypto operations testing, run cryptodev_openssl_asym_autotest.
903
904 To verify real traffic l2fwd-crypto example can be used with this command:
905diff --git a/doc/guides/howto/rte_flow.rst b/doc/guides/howto/rte_flow.rst
906index e080570..81fa805 100644
907--- a/doc/guides/howto/rte_flow.rst
908+++ b/doc/guides/howto/rte_flow.rst
909@@ -45,7 +45,7 @@ Code
910 pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH;
911 pattern[0].spec = &eth;
912
913- /* set the vlan to pas all packets */
914+ /* set the vlan to pass all packets */
915 pattern[1] = RTE_FLOW_ITEM_TYPE_VLAN;
916 pattern[1].spec = &vlan;
917
918@@ -141,7 +141,7 @@ Code
919 pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH;
920 pattern[0].spec = &eth;
921
922- /* set the vlan to pas all packets */
923+ /* set the vlan to pass all packets */
924 pattern[1] = RTE_FLOW_ITEM_TYPE_VLAN;
925 pattern[1].spec = &vlan;
926
927diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
928index fd7a46c..73a0b87 100644
929--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
930+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
931@@ -71,6 +71,7 @@ Copy the NUMA header files and lib to the cross compiler's directories:
932
933 cp <numa_install_dir>/include/numa*.h <cross_install_dir>/gcc-arm-8.2-2019.01-x86_64-aarch64-linux-gnu/bin/../aarch64-linux-gnu/libc/usr/include/
934 cp <numa_install_dir>/lib/libnuma.a <cross_install_dir>/gcc-arm-8.2-2019.01-x86_64-aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/8.2/
935+ cp <numa_install_dir>/lib/libnuma.so <cross_install_dir>/gcc-arm-8.2-2019.01-x86_64-aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/8.2/
936
937 .. _configure_and_cross_compile_dpdk_build:
938
939diff --git a/doc/guides/linux_gsg/linux_drivers.rst b/doc/guides/linux_gsg/linux_drivers.rst
940index 8da6a31..ef8f504 100644
941--- a/doc/guides/linux_gsg/linux_drivers.rst
942+++ b/doc/guides/linux_gsg/linux_drivers.rst
943@@ -103,7 +103,7 @@ Such model has the following benefits:
944
945 More about the bifurcated driver can be found in
946 `Mellanox Bifurcated DPDK PMD
947-<https://dpdksummit.com/Archive/pdf/2016Userspace/Day02-Session04-RonyEfraim-Userspace2016.pdf>`__.
948+<https://www.dpdk.org/wp-content/uploads/sites/35/2016/10/Day02-Session04-RonyEfraim-Userspace2016.pdf>`__.
949
950 .. _linux_gsg_binding_kernel:
951
952diff --git a/doc/guides/meson.build b/doc/guides/meson.build
953index 06f1488..7931ef3 100644
954--- a/doc/guides/meson.build
955+++ b/doc/guides/meson.build
956@@ -11,7 +11,7 @@ if sphinx.found()
957 command: [sphinx, '-b', 'html',
958 '-d', meson.current_build_dir() + '/.doctrees',
959 '@INPUT@', meson.current_build_dir() + '/guides'],
960- build_by_default: false,
961+ build_by_default: get_option('enable_docs'),
962 install: get_option('enable_docs'),
963 install_dir: htmldir)
964
965diff --git a/doc/guides/nics/bnx2x.rst b/doc/guides/nics/bnx2x.rst
966index cecbfc2..8577c1a 100644
967--- a/doc/guides/nics/bnx2x.rst
968+++ b/doc/guides/nics/bnx2x.rst
969@@ -34,7 +34,7 @@ BNX2X Poll Mode Driver
970 The BNX2X poll mode driver library (**librte_pmd_bnx2x**) implements support
971 for **QLogic 578xx** 10/20 Gbps family of adapters as well as their virtual
972 functions (VF) in SR-IOV context. It is supported on several standard Linux
973-distros like Red Hat 7.x and SLES12 OS. It is compile-tested under FreeBSD OS.
974+distros like RHEL and SLES. It is compile-tested under FreeBSD OS.
975
976 More information can be found at `QLogic Corporation's Official Website
977 <http://www.qlogic.com>`_.
978@@ -65,14 +65,26 @@ The features not yet supported include:
979 Co-existence considerations
980 ---------------------------
981
982-- BCM578xx being a CNA can have both NIC and Storage personalities.
983- However, coexistence with storage protocol drivers (cnic, bnx2fc and
984- bnx2fi) is not supported on the same adapter. So storage personality
985- has to be disabled on that adapter when used in DPDK applications.
986-
987-- For SR-IOV case, bnx2x PMD will be used to bind to SR-IOV VF device and
988- Linux native kernel driver (bnx2x) will be attached to SR-IOV PF.
989-
990+- QLogic 578xx CNAs support Ethernet, iSCSI and FCoE functionalities.
991+ These functionalities are supported using QLogic Linux kernel
992+ drivers bnx2x, cnic, bnx2i and bnx2fc. DPDK is supported on these
993+ adapters using bnx2x PMD.
994+
995+- When SR-IOV is not enabled on the adapter,
996+ QLogic Linux kernel drivers (bnx2x, cnic, bnx2i and bnx2fc) and bnx2x
997+ PMD can’t be attached to different PFs on a given QLogic 578xx
998+ adapter.
999+ A given adapter needs to be completely used by DPDK or Linux drivers.
1000+ Before binding DPDK driver to one or more PFs on the adapter,
1001+ please make sure to unbind Linux drivers from all PFs of the adapter.
1002+ If there are multiple adapters on the system, one or more adapters
1003+ can be used by DPDK driver completely and other adapters can be used
1004+ by Linux drivers completely.
1005+
1006+- When SR-IOV is enabled on the adapter,
1007+ Linux kernel drivers (bnx2x, cnic, bnx2i and bnx2fc) can be bound
1008+ to the PFs of a given adapter and either bnx2x PMD or Linux drivers
1009+ bnx2x can be bound to the VFs of the adapter.
1010
1011 Supported QLogic NICs
1012 ---------------------
1013diff --git a/doc/guides/nics/enic.rst b/doc/guides/nics/enic.rst
1014index c1b83b9..773f13b 100644
1015--- a/doc/guides/nics/enic.rst
1016+++ b/doc/guides/nics/enic.rst
1017@@ -260,12 +260,6 @@ Generic Flow API is supported. The baseline support is:
1018 - Selectors: 'is', 'spec' and 'mask'. 'last' is not supported
1019 - In total, up to 64 bytes of mask is allowed across all headers
1020
1021-- **1400 and later series VICS with advanced filters enabled**
1022-
1023- All the above plus:
1024-
1025- - Action: count
1026-
1027 The VIC performs packet matching after applying VLAN strip. If VLAN
1028 stripping is enabled, EtherType in the ETH item corresponds to the
1029 stripped VLAN header's EtherType. Stripping does not affect the VLAN
1030diff --git a/doc/guides/nics/features/mlx4.ini b/doc/guides/nics/features/mlx4.ini
1031index 98a3f61..659c6b1 100644
1032--- a/doc/guides/nics/features/mlx4.ini
1033+++ b/doc/guides/nics/features/mlx4.ini
1034@@ -21,6 +21,9 @@ Multicast MAC filter = Y
1035 RSS hash = Y
1036 SR-IOV = Y
1037 VLAN filter = Y
1038+Flow control = Y
1039+Flow API = Y
1040+CRC offload = Y
1041 L3 checksum offload = Y
1042 L4 checksum offload = Y
1043 Inner L3 checksum = Y
1044diff --git a/doc/guides/nics/features/mlx5.ini b/doc/guides/nics/features/mlx5.ini
1045index b28b43e..d92d589 100644
1046--- a/doc/guides/nics/features/mlx5.ini
1047+++ b/doc/guides/nics/features/mlx5.ini
1048@@ -25,6 +25,7 @@ Inner RSS = Y
1049 SR-IOV = Y
1050 VLAN filter = Y
1051 Flow director = Y
1052+Flow control = Y
1053 Flow API = Y
1054 CRC offload = Y
1055 VLAN offload = Y
1056diff --git a/doc/guides/nics/ixgbe.rst b/doc/guides/nics/ixgbe.rst
1057index 975143f..5c3a7e4 100644
1058--- a/doc/guides/nics/ixgbe.rst
1059+++ b/doc/guides/nics/ixgbe.rst
1060@@ -82,6 +82,31 @@ To guarantee the constraint, capabilities in dev_conf.rxmode.offloads will be ch
1061
1062 fdir_conf->mode will also be checked.
1063
1064+VF Runtime Options
1065+^^^^^^^^^^^^^^^^^^
1066+
1067+The following ``devargs`` options can be enabled at runtime. They must
1068+be passed as part of EAL arguments. For example,
1069+
1070+.. code-block:: console
1071+
1072+ testpmd -w af:10.0,pflink_fullchk=1 -- -i
1073+
1074+- ``pflink_fullchk`` (default **0**)
1075+
1076+ When calling ``rte_eth_link_get_nowait()`` to get VF link status,
1077+ this option is used to control how VF synchronizes its status with
1078+ PF's. If set, VF will not only check the PF's physical link status
1079+ by reading related register, but also check the mailbox status. We
1080+ call this behavior as fully checking. And checking mailbox will
1081+ trigger PF's mailbox interrupt generation. If unset, the application
1082+ can get the VF's link status quickly by just reading the PF's link
1083+ status register, this will avoid the whole system's mailbox interrupt
1084+ generation.
1085+
1086+ ``rte_eth_link_get()`` will still use the mailbox method regardless
1087+ of the pflink_fullchk setting.
1088+
1089 RX Burst Size
1090 ^^^^^^^^^^^^^
1091
1092diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
1093index 31238ae..6acbbca 100644
1094--- a/doc/guides/nics/mlx5.rst
1095+++ b/doc/guides/nics/mlx5.rst
1096@@ -56,6 +56,7 @@ Features
1097 - Several RSS hash keys, one for each flow type.
1098 - Default RSS operation with no hash key specification.
1099 - Configurable RETA table.
1100+- Link flow control (pause frame).
1101 - Support for multiple MAC addresses.
1102 - VLAN filtering.
1103 - RX VLAN stripping.
1104@@ -177,7 +178,7 @@ Statistics
1105
1106 MLX5 supports various of methods to report statistics:
1107
1108-Port statistics can be queried using ``rte_eth_stats_get()``. The port statistics are through SW only and counts the number of packets received or sent successfully by the PMD.
1109+Port statistics can be queried using ``rte_eth_stats_get()``. The received and sent statistics are through SW only and counts the number of packets received or sent successfully by the PMD. The imissed counter is the amount of packets that could not be delivered to SW because a queue was full. Packets not received due to congestion in the bus or on the NIC can be queried via the rx_discards_phy xstats counter.
1110
1111 Extended statistics can be queried using ``rte_eth_xstats_get()``. The extended statistics expose a wider set of counters counted by the device. The extended port statistics counts the number of packets received or sent successfully by the port. As Mellanox NICs are using the :ref:`Bifurcated Linux Driver <linux_gsg_linux_drivers>` those counters counts also packet received or sent by the Linux kernel. The counters with ``_phy`` suffix counts the total events on the physical port, therefore not valid for VF.
1112
1113diff --git a/doc/guides/nics/qede.rst b/doc/guides/nics/qede.rst
1114index c0a3833..05a6aef 100644
1115--- a/doc/guides/nics/qede.rst
1116+++ b/doc/guides/nics/qede.rst
1117@@ -7,7 +7,7 @@ QEDE Poll Mode Driver
1118
1119 The QEDE poll mode driver library (**librte_pmd_qede**) implements support
1120 for **QLogic FastLinQ QL4xxxx 10G/25G/40G/50G/100G Intelligent Ethernet Adapters (IEA) and Converged Network Adapters (CNA)** family of adapters as well as SR-IOV virtual functions (VF). It is supported on
1121-several standard Linux distros like RHEL7.x, SLES12.x and Ubuntu.
1122+several standard Linux distros like RHEL, SLES, Ubuntu etc.
1123 It is compile-tested under FreeBSD OS.
1124
1125 More information can be found at `QLogic Corporation's Website
1126@@ -47,8 +47,27 @@ Non-supported Features
1127
1128 Co-existence considerations
1129 ---------------------------
1130-- QLogic FastLinQ QL4xxxx CNAs can have both NIC and Storage personalities. However, coexistence with storage protocol drivers (qedi and qedf) is not supported on the same adapter. So storage personality has to be disabled on that adapter when used in DPDK applications.
1131-- For SR-IOV case, qede PMD will be used to bind to SR-IOV VF device and Linux native kernel driver (qede) will be attached to SR-IOV PF.
1132+
1133+- QLogic FastLinQ QL4xxxx CNAs support Ethernet, RDMA, iSCSI and FCoE
1134+ functionalities. These functionalities are supported using
1135+ QLogic Linux kernel drivers qed, qede, qedr, qedi and qedf. DPDK is
1136+ supported on these adapters using qede PMD.
1137+
1138+- When SR-IOV is not enabled on the adapter,
1139+ QLogic Linux kernel drivers (qed, qede, qedr, qedi and qedf) and qede
1140+ PMD can’t be attached to different PFs on a given QLogic FastLinQ
1141+ QL4xxx adapter.
1142+ A given adapter needs to be completely used by DPDK or Linux drivers
1143+ Before binding DPDK driver to one or more PFs on the adapter,
1144+ please make sure to unbind Linux drivers from all PFs of the adapter.
1145+ If there are multiple adapters on the system, one or more adapters
1146+ can be used by DPDK driver completely and other adapters can be used
1147+ by Linux drivers completely.
1148+
1149+- When SR-IOV is enabled on the adapter,
1150+ Linux kernel drivers (qed, qede, qedr, qedi and qedf) can be bound
1151+ to the PFs of a given adapter and either qede PMD or Linux drivers
1152+ (qed and qede) can be bound to the VFs of the adapter.
1153
1154 Supported QLogic Adapters
1155 -------------------------
1156diff --git a/doc/guides/prog_guide/bbdev.rst b/doc/guides/prog_guide/bbdev.rst
1157index 658ffd4..12e948a 100644
1158--- a/doc/guides/prog_guide/bbdev.rst
1159+++ b/doc/guides/prog_guide/bbdev.rst
1160@@ -44,7 +44,7 @@ From the command line using the --vdev EAL option
1161
1162 --vdev 'baseband_turbo_sw,max_nb_queues=8,socket_id=0'
1163
1164-Our using the rte_vdev_init API within the application code.
1165+Or using the rte_vdev_init API within the application code.
1166
1167 .. code-block:: c
1168
1169@@ -284,7 +284,7 @@ baseband operations is usually completed during the enqueue call to the bbdev
1170 device. The dequeue burst API will retrieve any processed operations available
1171 from the queue on the bbdev device, from physical devices this is usually
1172 directly from the device's processed queue, and for virtual device's from a
1173-``rte_ring`` where processed operations are place after being processed on the
1174+``rte_ring`` where processed operations are placed after being processed on the
1175 enqueue call.
1176
1177
1178diff --git a/doc/guides/prog_guide/compressdev.rst b/doc/guides/prog_guide/compressdev.rst
1179index 3ba4238..0e8d8c3 100644
1180--- a/doc/guides/prog_guide/compressdev.rst
1181+++ b/doc/guides/prog_guide/compressdev.rst
1182@@ -201,7 +201,7 @@ for stateful processing of ops.
1183 Operation Status
1184 ~~~~~~~~~~~~~~~~
1185 Each operation carries a status information updated by PMD after it is processed.
1186-following are currently supported status:
1187+Following are currently supported:
1188
1189 - RTE_COMP_OP_STATUS_SUCCESS,
1190 Operation is successfully completed
1191@@ -227,14 +227,24 @@ following are currently supported status:
1192 is not an error case. Output data up to op.produced can be used and
1193 next op in the stream should continue on from op.consumed+1.
1194
1195+Operation status after enqueue / dequeue
1196+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1197+Some of the above values may arise in the op after an
1198+``rte_compressdev_enqueue_burst()``. If number ops enqueued < number ops requested then
1199+the app should check the op.status of nb_enqd+1. If status is RTE_COMP_OP_STATUS_NOT_PROCESSED,
1200+it likely indicates a full-queue case for a hardware device and a retry after dequeuing some ops is likely
1201+to be successful. If the op holds any other status, e.g. RTE_COMP_OP_STATUS_INVALID_ARGS, a retry with
1202+the same op is unlikely to be successful.
1203+
1204+
1205 Produced, Consumed And Operation Status
1206 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1207
1208 - If status is RTE_COMP_OP_STATUS_SUCCESS,
1209 consumed = amount of data read from input buffer, and
1210 produced = amount of data written in destination buffer
1211-- If status is RTE_COMP_OP_STATUS_FAILURE,
1212- consumed = produced = 0 or undefined
1213+- If status is RTE_COMP_OP_STATUS_ERROR,
1214+ consumed = produced = undefined
1215 - If status is RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED,
1216 consumed = 0 and
1217 produced = usually 0, but in decompression cases a PMD may return > 0
1218@@ -568,7 +578,7 @@ operations is usually completed during the enqueue call to the compression
1219 device. The dequeue burst API will retrieve any processed operations available
1220 from the queue pair on the compression device, from physical devices this is usually
1221 directly from the devices processed queue, and for virtual device's from a
1222-``rte_ring`` where processed operations are place after being processed on the
1223+``rte_ring`` where processed operations are placed after being processed on the
1224 enqueue call.
1225
1226 A burst in DPDK compression can be a combination of stateless and stateful operations with a condition
1227diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
1228index 23770ff..7a95053 100644
1229--- a/doc/guides/prog_guide/cryptodev_lib.rst
1230+++ b/doc/guides/prog_guide/cryptodev_lib.rst
1231@@ -52,7 +52,7 @@ From the command line using the --vdev EAL option
1232
1233 Example: ``--vdev 'crypto_aesni_mb0' --vdev 'crypto_aesni_mb1'``
1234
1235-Our using the rte_vdev_init API within the application code.
1236+Or using the rte_vdev_init API within the application code.
1237
1238 .. code-block:: c
1239
1240@@ -294,7 +294,7 @@ Crypto operations is usually completed during the enqueue call to the Crypto
1241 device. The dequeue burst API will retrieve any processed operations available
1242 from the queue pair on the Crypto device, from physical devices this is usually
1243 directly from the devices processed queue, and for virtual device's from a
1244-``rte_ring`` where processed operations are place after being processed on the
1245+``rte_ring`` where processed operations are placed after being processed on the
1246 enqueue call.
1247
1248
1249diff --git a/doc/guides/prog_guide/img/linuxapp_launch.svg b/doc/guides/prog_guide/img/linuxapp_launch.svg
1250index af68589..c2bd34e 100644
1251--- a/doc/guides/prog_guide/img/linuxapp_launch.svg
1252+++ b/doc/guides/prog_guide/img/linuxapp_launch.svg
1253@@ -659,7 +659,7 @@
1254 sodipodi:role="line"
1255 id="tspan11522"
1256 x="69.303398"
1257- y="858.42419">rte_eal_remote_lauch(app)</tspan></text>
1258+ y="858.42419">rte_eal_remote_launch(app)</tspan></text>
1259 <path
1260 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
1261 d="m 176.30173,890.61234 0,15.67127"
1262@@ -692,7 +692,7 @@
1263 sodipodi:role="line"
1264 id="tspan11522-1"
1265 x="87.641663"
1266- y="644.07324">rte_eal_remote_lauch(</tspan><tspan
1267+ y="644.07324">rte_eal_remote_launch(</tspan><tspan
1268 sodipodi:role="line"
1269 x="87.641663"
1270 y="664.07324"
1271diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst
1272index 7b8a481..9c1483a 100644
1273--- a/doc/guides/prog_guide/kernel_nic_interface.rst
1274+++ b/doc/guides/prog_guide/kernel_nic_interface.rst
1275@@ -266,12 +266,16 @@ Use Case: Ingress
1276 -----------------
1277
1278 On the DPDK RX side, the mbuf is allocated by the PMD in the RX thread context.
1279-This thread will enqueue the mbuf in the rx_q FIFO.
1280+This thread will enqueue the mbuf in the rx_q FIFO,
1281+and the next pointers in mbuf-chain will convert to physical address.
1282 The KNI thread will poll all KNI active devices for the rx_q.
1283 If an mbuf is dequeued, it will be converted to a sk_buff and sent to the net stack via netif_rx().
1284-The dequeued mbuf must be freed, so the same pointer is sent back in the free_q FIFO.
1285+The dequeued mbuf must be freed, so the same pointer is sent back in the free_q FIFO,
1286+and next pointers must convert back to virtual address if exists before put in the free_q FIFO.
1287
1288 The RX thread, in the same main loop, polls this FIFO and frees the mbuf after dequeuing it.
1289+The address conversion of the next pointer is to prevent the chained mbuf
1290+in different hugepage segments from causing kernel crash.
1291
1292 Use Case: Egress
1293 ----------------
1294diff --git a/doc/guides/prog_guide/mempool_lib.rst b/doc/guides/prog_guide/mempool_lib.rst
1295index 52a569f..3bb84b0 100644
1296--- a/doc/guides/prog_guide/mempool_lib.rst
1297+++ b/doc/guides/prog_guide/mempool_lib.rst
1298@@ -133,6 +133,14 @@ For applications that use ``rte_pktmbuf_create()``, there is a config setting
1299 (``RTE_MBUF_DEFAULT_MEMPOOL_OPS``) that allows the application to make use of
1300 an alternative mempool handler.
1301
1302+ .. note::
1303+
1304+ When running a DPDK application with shared libraries, mempool handler
1305+ shared objects specified with the '-d' EAL command-line parameter are
1306+ dynamically loaded. When running a multi-process application with shared
1307+ libraries, the -d arguments for mempool handlers *must be specified in the
1308+ same order for all processes* to ensure correct operation.
1309+
1310
1311 Use Cases
1312 ---------
1313diff --git a/doc/guides/prog_guide/rawdev.rst b/doc/guides/prog_guide/rawdev.rst
1314index 42c195c..a712c7f 100644
1315--- a/doc/guides/prog_guide/rawdev.rst
1316+++ b/doc/guides/prog_guide/rawdev.rst
1317@@ -32,7 +32,7 @@ Key factors guiding design of the Rawdevice library:
1318
1319 1. Following are some generic operations which can be treated as applicable
1320 to a large subset of device types. None of the operations are mandatory to
1321- be implemented by a driver. Application should also be design for proper
1322+ be implemented by a driver. Application should also be designed for proper
1323 handling for unsupported APIs.
1324
1325 * Device Start/Stop - In some cases, 'reset' might also be required which
1326@@ -100,7 +100,7 @@ From the command line using the --vdev EAL option
1327
1328 --vdev 'rawdev_dev1'
1329
1330-Our using the rte_vdev_init API within the application code.
1331+Or using the rte_vdev_init API within the application code.
1332
1333 .. code-block:: c
1334
1335diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
1336index 4e9b444..9c6fc5e 100644
1337--- a/doc/guides/prog_guide/rte_flow.rst
1338+++ b/doc/guides/prog_guide/rte_flow.rst
1339@@ -240,29 +240,29 @@ Example of an item specification matching an Ethernet header:
1340
1341 .. table:: Ethernet item
1342
1343- +----------+----------+--------------------+
1344- | Field | Subfield | Value |
1345- +==========+==========+====================+
1346- | ``spec`` | ``src`` | ``00:01:02:03:04`` |
1347- | +----------+--------------------+
1348- | | ``dst`` | ``00:2a:66:00:01`` |
1349- | +----------+--------------------+
1350- | | ``type`` | ``0x22aa`` |
1351- +----------+----------+--------------------+
1352- | ``last`` | unspecified |
1353- +----------+----------+--------------------+
1354- | ``mask`` | ``src`` | ``00:ff:ff:ff:00`` |
1355- | +----------+--------------------+
1356- | | ``dst`` | ``00:00:00:00:ff`` |
1357- | +----------+--------------------+
1358- | | ``type`` | ``0x0000`` |
1359- +----------+----------+--------------------+
1360+ +----------+----------+-----------------------+
1361+ | Field | Subfield | Value |
1362+ +==========+==========+=======================+
1363+ | ``spec`` | ``src`` | ``00:00:01:02:03:04`` |
1364+ | +----------+-----------------------+
1365+ | | ``dst`` | ``00:00:2a:66:00:01`` |
1366+ | +----------+-----------------------+
1367+ | | ``type`` | ``0x22aa`` |
1368+ +----------+----------+-----------------------+
1369+ | ``last`` | unspecified |
1370+ +----------+----------+-----------------------+
1371+ | ``mask`` | ``src`` | ``00:00:ff:ff:ff:00`` |
1372+ | +----------+-----------------------+
1373+ | | ``dst`` | ``00:00:00:00:00:ff`` |
1374+ | +----------+-----------------------+
1375+ | | ``type`` | ``0x0000`` |
1376+ +----------+----------+-----------------------+
1377
1378 Non-masked bits stand for any value (shown as ``?`` below), Ethernet headers
1379 with the following properties are thus matched:
1380
1381-- ``src``: ``??:01:02:03:??``
1382-- ``dst``: ``??:??:??:??:01``
1383+- ``src``: ``??:??:01:02:03:??``
1384+- ``dst``: ``??:??:??:??:??:01``
1385 - ``type``: ``0x????``
1386
1387 Matching pattern
1388diff --git a/doc/guides/rel_notes/release_18_11.rst b/doc/guides/rel_notes/release_18_11.rst
1389index 071e010..f9b9fae 100644
1390--- a/doc/guides/rel_notes/release_18_11.rst
1391+++ b/doc/guides/rel_notes/release_18_11.rst
1392@@ -1688,3 +1688,493 @@ Fixes skipped and status unresolved
1393 * 281bd1aa3 net/iavf: fix stats reset (18.02)
1394 * fe252fb69 test/rwlock: benchmark on all available cores (1.2.3r0)
1395 * 6fef1ae4f test/rwlock: amortize the cost of getting time (1.2.3r0)
1396+
1397+18.11.3 Release Notes
1398+---------------------
1399+
1400+18.11.3 Fixes
1401+~~~~~~~~~~~~~
1402+
1403+* acl: fix build with some arm64 compiler
1404+* acl: fix undefined behavior of bit shifts
1405+* app/crypto-perf: check lcore job failure
1406+* app/crypto-perf: fix CSV format
1407+* app/crypto-perf: fix display once detection
1408+* app/eventdev: fix order test port creation
1409+* app/testpmd: fix eth packet dump for small buffers
1410+* app/testpmd: fix latency stats deinit on signal
1411+* app/testpmd: fix MPLS IPv4 encapsulation fields
1412+* app/testpmd: fix offloads config
1413+* app/testpmd: fix parsing RSS queue rule
1414+* app/testpmd: fix queue offload configuration
1415+* app/testpmd: fix show port info routine
1416+* app/testpmd: rename ambiguous VF config variable
1417+* bpf: fix check array size
1418+* bpf: fix pseudo calls for program loaded from ELF
1419+* bpf: fix validate for function return value
1420+* build: add libatomic dependency for 32-bit clang
1421+* build: enable BSD features visibility for FreeBSD
1422+* build: enable large file support on 32-bit
1423+* build: remove unnecessary large file support defines
1424+* build: set RTE_ARCH_64 based on pointer size
1425+* bus/fslmc: fix build with 0 headroom
1426+* bus/pci: fix TOCTOU for sysfs access
1427+* bus/pci: remove unused x86 Linux constant
1428+* bus/vmbus: skip non-network devices
1429+* compress/isal: fix use after free
1430+* compress/zlib: fix error handling
1431+* config: disable armv8 crypto extension
1432+* cryptodev: fix typo in comment
1433+* crypto/dpaa2_sec: fix handling of session init failure
1434+* crypto/mvsam: fix typo in comment
1435+* crypto/openssl: fix free of asymmetric crypto keys
1436+* crypto/openssl: fix usage of non constant time memcmp
1437+* crypto/openssl: remove useless check before freeing
1438+* crypto/qat: set message field to zero in sym SGL case
1439+* crypto/virtio: check PCI config read
1440+* devtools: fix building kernel component tags
1441+* distributor: fix check of workers number
1442+* distributor: fix livelock on flush
1443+* doc: add a note for multi-process in mempool guide
1444+* doc: add co-existence consideration for bnx2x
1445+* doc: add co-existence consideration for qede
1446+* doc: clarify data plane error handling in compressdev
1447+* doc: cleanup test removal in armv8 and openssl guides
1448+* doc: fix a grammar mistake in rawdev guide
1449+* doc: fix build with latest meson
1450+* doc: fix ethernet addresses in flow API guide
1451+* doc: fix grammar in prog guides
1452+* doc: fix link about bifurcated model in Linux guide
1453+* doc: fix Linux guide for arm64 cross-compilation
1454+* doc: fix PDF build
1455+* doc: fix PDF with greek letter
1456+* doc: fix triplicated typo in prog guides
1457+* doc: fix typo in EAL guide
1458+* doc: fix typos in flow API guide
1459+* doc: remove useless Rx configuration in l2fwd guide
1460+* doc: robustify PDF build
1461+* doc: update features supported by mlx
1462+* drivers: fix typo in NXP comments
1463+* drivers/net: fix double free on init failure
1464+* eal: correct log for alarm error
1465+* eal: fix control thread affinity with --lcores
1466+* eal: fix positive error codes from probe/remove
1467+* eal: fix typo in comments
1468+* eal/freebsd: fix config creation
1469+* eal/freebsd: fix init completion
1470+* eal: hide internal function
1471+* eal: hide internal hotplug function
1472+* eal: increase maximum different hugepage sizes on Arm
1473+* eal/linux: fix return after alarm registration failure
1474+* ethdev: avoid error on PCI unplug of closed port
1475+* ethdev: avoid getting uninitialized info for bad port
1476+* ethdev: fix endian annotation for SPI item
1477+* ethdev: fix Tx prepare documentation to use positive errno
1478+* eventdev: fix doxygen comment
1479+* eventdev: fix error sign
1480+* event/dpaa2: fix timeout ticks
1481+* event/opdl: fix error sign
1482+* event/sw: fix error sign
1483+* examples/bpf: fix build
1484+* examples: fix make clean when using pkg-config
1485+* examples: fix pkg-config detection with older make
1486+* examples: fix use of ethdev internal device array
1487+* examples/ip_frag: fix stale content of ethdev info
1488+* examples/ip_frag: fix unknown ethernet type
1489+* examples/ip_frag: fix use of ethdev internal device array
1490+* examples/ip_fragmentation: fix Tx queues init
1491+* examples/ip_frag: remove Tx fast free offload flag
1492+* examples/ipsec-secgw: fix error sign
1493+* examples/ipsec-secgw: fix inline modes
1494+* examples/ipsec-secgw: fix use of ethdev internal struct
1495+* examples/l3fwd: fix unaligned memory access on x86
1496+* examples/l3fwd-vf: remove unused Rx/Tx configuration
1497+* examples/multi_process: do not dereference global config struct
1498+* examples/multi_process: fix FreeBSD build
1499+* examples/performance-thread: init timer subsystem
1500+* examples/power: fix FreeBSD meson lib dependency
1501+* examples/power: fix strcpy buffer overrun
1502+* examples/ptpclient: fix delay request message
1503+* examples/qos_sched: do not dereference global config struct
1504+* examples/tep_term: remove duplicate definitions
1505+* examples/vdpa: remove trace of legacy linuxapp
1506+* examples/vhost_crypto: remove unused function
1507+* fix off-by-one errors in snprintf
1508+* flow_classify: fix out-of-bounds access
1509+* hash: use ordered loads only if signature matches
1510+* igb_uio: fix build on Linux 5.3 for fall through
1511+* ip_frag: fix IPv6 fragment size calculation
1512+* kernel/freebsd: fix module build on latest head
1513+* kernel/linux: fix modules install path
1514+* kni: abort when IOVA is not PA
1515+* kni: fix build on RHEL8
1516+* kni: fix copy_from_user failure handling
1517+* kni: fix kernel 5.4 build - merged pci_aspm.h
1518+* kni: fix kernel 5.4 build - num_online_cpus
1519+* kni: fix kernel 5.4 build - skb_frag_t to bio_vec
1520+* kni: fix kernel crash with multi-segments
1521+* kni: fix segmented mbuf data overflow
1522+* kni: fix style
1523+* mem: ease init in a docker container
1524+* mem: fix typo in API description
1525+* mem: mark unused function in 32-bit builds
1526+* mem: remove incorrect experimental tag on static symbol
1527+* mk: fix custom kernel directory name
1528+* net: adjust L2 length on soft VLAN insertion
1529+* net/af_packet: remove redundant declaration
1530+* net/ark: fix queue packet replacement
1531+* net/ark: remove unnecessary cast
1532+* net/atlantic: fix Tx prepare to set positive rte_errno
1533+* net/atlantic: remove unnecessary cast
1534+* net/avf: fix address of first segment
1535+* net/avf: fix driver crash when enable TSO
1536+* net/avf: fix endless loop
1537+* net/avf: fix Rx bytes stats
1538+* net/axgbe: remove unnecessary cast
1539+* net/bnx2x: fix fastpath SB allocation for SRIOV
1540+* net/bnx2x: fix interrupt flood
1541+* net/bnx2x: fix invalid free on unplug
1542+* net/bnx2x: fix link events polling for SRIOV
1543+* net/bnx2x: fix link state
1544+* net/bnx2x: fix memory leak
1545+* net/bnx2x: fix packet drop
1546+* net/bnx2x: fix reading VF id
1547+* net/bnx2x: fix supported max Rx/Tx descriptor count
1548+* net/bnx2x: fix warnings from invalid assert
1549+* net/bnxt: check for error conditions in Tx path
1550+* net/bnxt: check for null completion ring doorbell
1551+* net/bnxt: check invalid VNIC id for firmware
1552+* net/bnxt: check invalid VNIC in cleanup path
1553+* net/bnxt: fix adding MAC address
1554+* net/bnxt: fix checking result of HWRM command
1555+* net/bnxt: fix check of address mapping
1556+* net/bnxt: fix compiler warning
1557+* net/bnxt: fix crash on probe failure
1558+* net/bnxt: fix device init error path
1559+* net/bnxt: fix enabling/disabling interrupts
1560+* net/bnxt: fix endianness in ring macros
1561+* net/bnxt: fix error handling in port start
1562+* net/bnxt: fix extended port counter statistics
1563+* net/bnxt: fix getting statistics
1564+* net/bnxt: fix icc build
1565+* net/bnxt: fix interrupt rearm logic
1566+* net/bnxt: fix interrupt vector initialization
1567+* net/bnxt: fix L4 checksum error indication in Rx
1568+* net/bnxt: fix lock release on getting NVM info
1569+* net/bnxt: fix return values to standard error codes
1570+* net/bnxt: fix ring type macro name
1571+* net/bnxt: fix RSS RETA indirection table ops
1572+* net/bnxt: fix Rx interrupt vector
1573+* net/bnxt: fix RxQ count if ntuple filtering is disabled
1574+* net/bnxt: fix setting primary MAC address
1575+* net/bnxt: fix TSO
1576+* net/bnxt: fix Tx batching
1577+* net/bnxt: fix Tx hang after port stop/start
1578+* net/bnxt: fix unconditional wait in link update
1579+* net/bnxt: fix variable width in endian conversion
1580+* net/bnxt: fix xstats
1581+* net/bnxt: optimize Tx batching
1582+* net/bnxt: reduce verbosity of a message
1583+* net/bnxt: remove unnecessary cast
1584+* net/bnxt: remove unnecessary interrupt disable
1585+* net/bnxt: reset filters before registering interrupts
1586+* net/bnxt: retry IRQ callback deregistration
1587+* net/bnxt: save the number of EM flow count
1588+* net/bonding: remove unnecessary cast
1589+* net/cxgbe: do not dereference global config struct
1590+* net/cxgbe: remove unnecessary cast
1591+* net: define IPv4 IHL and VHL
1592+* net/dpaa2: fix multi-segment Tx
1593+* net/dpaa: check multi-segment external buffers
1594+* net/dpaa: fix build with 0 headroom
1595+* net/e1000: fix buffer overrun while i219 processing DMA
1596+* net/e1000: fix Tx prepare to set positive rte_errno
1597+* net/e1000: remove unnecessary cast
1598+* net/ena: fix admin CQ polling for 32-bit
1599+* net/ena: fix assigning NUMA node to IO queue
1600+* net/ena: fix L4 checksum Tx offload
1601+* net/ena: fix Rx checksum errors statistics
1602+* net/ena: remove unnecessary cast
1603+* net/enic: fix Tx prepare to set positive rte_errno
1604+* net/enic: remove flow count action support
1605+* net/enic: remove flow locks
1606+* net/enic: remove unnecessary cast
1607+* net/failsafe: fix reported device info
1608+* net: fix definition of IPv6 traffic class mask
1609+* net: fix encapsulation markers for inner L3 offset
1610+* net: fix how L4 checksum choice is tested
1611+* net/fm10k: advertise supported RSS hash function
1612+* net/fm10k: fix address of first segment
1613+* net/fm10k: fix descriptor filling in vector Tx
1614+* net/fm10k: fix stats crash in multi-process
1615+* net/fm10k: fix Tx prepare to set positive rte_errno
1616+* net/i40e: fix address of first segment
1617+* net/i40e: fix crash when TxQ/RxQ set to 0 in VF
1618+* net/i40e: fix dropped packets statistics name
1619+* net/i40e: fix ethernet flow rule
1620+* net/i40e: fix flow director rule destroy
1621+* net/i40e: fix MAC removal check
1622+* net/i40e: fix RSS hash update for X722 VF
1623+* net/i40e: fix SFP X722 with FW4.16
1624+* net/i40e: fix Tx prepare to set positive rte_errno
1625+* net/i40e: fix Tx threshold setup
1626+* net/i40e: fix unexpected skip FDIR setup
1627+* net/i40e: remove empty queue stats mapping set devops
1628+* net/i40e: remove unnecessary cast
1629+* net/iavf: fix Tx prepare to set positive rte_errno
1630+* net/ixgbe/base: fix product version check
1631+* net/ixgbe: fix address of first segment
1632+* net/ixgbe: fix IP type for crypto session
1633+* net/ixgbe: fix RETA size for VF
1634+* net/ixgbe: fix Tx prepare to set positive rte_errno
1635+* net/ixgbe: fix Tx threshold setup
1636+* net/ixgbe: fix unexpected link handler
1637+* net/ixgbe: remove unnecessary cast
1638+* net/ixgbevf: add full link status check option
1639+* net/mlx4: fix crash on info query in secondary process
1640+* net/mlx5: check memory allocation in flow creation
1641+* net/mlx5: fix 32-bit build
1642+* net/mlx5: fix condition for link update fallback
1643+* net/mlx5: fix crash for empty raw encap data
1644+* net/mlx5: fix crash on null operation
1645+* net/mlx5: fix description of return value
1646+* net/mlx5: fix device arguments error detection
1647+* net/mlx5: fix link speed info when link is down
1648+* net/mlx5: fix memory free on queue create error
1649+* net/mlx5: fix missing validation of null pointer
1650+* net/mlx5: fix order of items in NEON scatter
1651+* net/mlx5: fix typos in comments
1652+* net/mlx5: fix validation of VLAN PCP item
1653+* net/mlx5: fix VLAN inner type matching on DR/DV
1654+* net/mlx5: remove redundant item from union
1655+* net/mlx5: remove unnecessary cast
1656+* net/mlx5: report imissed statistics
1657+* net/mvneta: fix ierror statistics
1658+* net/netvsc: fix definition of offload values
1659+* net/netvsc: fix RSS offload settings
1660+* net/netvsc: fix xstats for VF device
1661+* net/netvsc: fix xstats id
1662+* net/netvsc: initialize VF spinlock
1663+* net/nfp: disable for 32-bit meson builds
1664+* net/null: remove redundant declaration
1665+* net/pcap: fix concurrent multiseg Tx
1666+* net/pcap: fix possible mbuf double freeing
1667+* net/pcap: fix Rx with small buffers
1668+* net/pcap: fix Tx return count in error conditions
1669+* net/pcap: remove redundant declaration
1670+* net/qede: fix Tx prepare to set positive rte_errno
1671+* net/qede: fix warnings from invalid assert
1672+* net/ring: remove redundant declaration
1673+* net/sfc/base: enable chained multicast on all EF10 cards
1674+* net/sfc/base: fix shift by more bits than field width
1675+* net/sfc/base: fix signed/unsigned mismatch
1676+* net/sfc: ensure that device is closed on removal
1677+* net/sfc: fix align to power of 2 when align has smaller type
1678+* net/sfc: fix power of 2 round up when align has smaller type
1679+* net/sfc: unify power of 2 alignment check macro
1680+* net/tap: remove redundant declarations
1681+* net/thunderx: fix crash on detach
1682+* net/vhost: remove redundant declaration
1683+* net/virtio: add Tx preparation
1684+* net/virtio: fix build
1685+* net/virtio: fix build with 0 headroom
1686+* net/virtio: fix in-order Rx with segmented packet
1687+* net/virtio: fix memory leak in in-order Rx
1688+* net/virtio: fix queue memory leak on error
1689+* net/virtio: move VLAN tag insertion to Tx prepare
1690+* net/virtio: remove useless check on mempool
1691+* net/virtio: unmap device on initialization error
1692+* net/virtio: unmap port IO for legacy device
1693+* net/virtio_user: remove redundant declaration
1694+* net/vmxnet3: fix Tx prepare to set positive rte_errno
1695+* net/vmxnet3: fix uninitialized variable
1696+* raw/dpaa2_cmdif: remove redundant declaration
1697+* raw/ifpga/base: fix physical address info
1698+* raw/ifpga/base: fix use of untrusted scalar value
1699+* raw/skeleton: fix test of attribute set/get
1700+* raw/skeleton: remove redundant declaration
1701+* security: remove duplicated symbols from map file
1702+* table: fix crash in LPM IPv6
1703+* telemetry: add missing header include
1704+* telemetry: fix build
1705+* telemetry: fix build warnings seen when using gcc 9
1706+* telemetry: fix memory leak
1707+* test: add rawdev autotest to meson
1708+* test/distributor: fix flush with worker shutdown
1709+* test/eal: fix --socket-mem option
1710+* test: enable installing app with meson
1711+* test/eventdev: fix producer core validity checks
1712+* test: fix autotest crash
1713+* test/flow_classify: fix undefined behavior
1714+* test/hash: fix data reset on new run
1715+* test/hash: fix off-by-one check on core count
1716+* test/hash: rectify slave id to point to valid cores
1717+* test/hash: use existing lcore API
1718+* test: remove link to ixgbe/i40e with meson
1719+* test/rwlock: amortize the cost of getting time
1720+* test/rwlock: benchmark on all available cores
1721+* usertools: fix input handling in telemetry script
1722+* usertools: fix refresh binding infos
1723+* usertools: replace unsafe input function
1724+* version: 18.11.3-rc1
1725+* version: 18.11.3-rc2
1726+* vfio: remove incorrect experimental tag
1727+* vfio: use contiguous mapping for IOVA as VA mode
1728+* vhost/crypto: fix inferred misuse of enum
1729+* vhost/crypto: fix logically dead code
1730+* vhost: fix missing include
1731+
1732+18.11.3 Validation
1733+~~~~~~~~~~~~~~~~~~
1734+
1735+* Intel(R) Testing
1736+
1737+ * Basic Intel(R) NIC(ixgbe and i40e) testing
1738+
1739+ * PF (i40e)
1740+ * PF (ixgbe)
1741+ * VF
1742+ * Compile Testing
1743+ * Intel NIC single core/NIC performance
1744+
1745+ * Basic cryptodev and virtio testing
1746+
1747+ * cryptodev
1748+ * vhost/virtio basic loopback, PVP and performance test
1749+
1750+* Red Hat(R) Testing
1751+
1752+ * RHEL 8
1753+ * Functionality
1754+
1755+ * PF
1756+ * VF
1757+ * vhost single/multi queues and cross-NUMA
1758+ * vhostclient reconnect
1759+ * vhost live migration with single/multi queues and cross-NUMA
1760+ * OVS PVP
1761+
1762+ * Tested NICs
1763+
1764+ * X540-AT2 NIC(ixgbe, 10G)
1765+
1766+* IBM(R) - DPDK on Power result
1767+
1768+ * Basic PF on Mellanox: No new errors or regressions seen
1769+ * Performance: no degradation compared to 18.11.2
1770+
1771+ * System tested
1772+
1773+ * IBM Power9 Model 8335-101 CPU: 2.3 (pvr 004e 1203)
1774+
1775+ * Tested NICs
1776+
1777+ * Mellanox Technologies MT28800 Family [ConnectX-5 Ex]
1778+ * firmware version: 16.26.292
1779+ * MLNX_OFED_LINUX-4.7-1.0.0.1
1780+
1781+* Intel(R) Openvswitch Testing (Ian Stokes)
1782+
1783+ * OVS testing against head OVS Master, 2.12.2 and 2.11.3 with VSPERF
1784+
1785+ * Tested NICs
1786+
1787+ * i40e (X710) and i40eVF
1788+ * ixgbe (82599ES) and ixgbeVF
1789+ * igb (I350) and igbVF
1790+
1791+ * Functionality
1792+
1793+ * P2P
1794+ * PVP
1795+ * PVVP
1796+ * PV-PV in parallel
1797+ * Hotplug
1798+ * Multiqueue
1799+ * Vhostuserclient reconnect
1800+ * Vhost cross-NUMA awareness
1801+ * Jumbo frames
1802+ * Rate limiting
1803+ * QoS policer
1804+
1805+* Mellanox(R) Testing
1806+
1807+ * Basic functionality with testpmd
1808+
1809+ * ConnectX-5
1810+
1811+ * RHEL 7.4
1812+ * Kernel 5.3.0
1813+ * Driver rdma-core v25.1
1814+ * fw 16.26.1040
1815+
1816+ * ConnectX-4 Lx
1817+
1818+ * RHEL 7.4
1819+ * Kernel 5.3.0
1820+ * Driver rdma-core v25.1
1821+ * fw 14.26.1040
1822+
1823+ * ConnectX-5
1824+
1825+ * RHEL 7.4
1826+ * Kernel 3.10.0-693.el7.x86_64
1827+ * Driver MLNX_OFED_LINUX-4.7-1.0.0.1
1828+ * fw 16.26.1040
1829+
1830+ * ConnectX-4 Lx
1831+
1832+ * RHEL 7.4
1833+ * Kernel 3.10.0-693.el7.x86_64
1834+ * Driver MLNX_OFED_LINUX-4.7-1.0.0.1
1835+ * fw 14.26.1040
1836+
1837+* Microsoft(R) Azure Testing
1838+
1839+ * Images
1840+
1841+ * Canonical UbuntuServer 16.04-LTS latest
1842+ * Canonical UbuntuServer 18.04-DAILY-LTS latest
1843+ * RedHat RHEL 7-RAW latest
1844+ * RedHat RHEL 7.5 latest
1845+ * Openlogic CentOS 7.5 latest
1846+ * SUSE SLES 15 latest
1847+
1848+ * Drivers
1849+
1850+ * Mellanox and netvsc poll-mode drivers
1851+
1852+ * Functionality
1853+
1854+ * VM to VM traffic
1855+ * SRIOV/Failsafe
1856+ * Single core performance
1857+ * Multicore performance - see known issues below
1858+
1859+18.11.3 Known Issues
1860+~~~~~~~~~~~~~~~~~~~~
1861+
1862+* DPDK 18.11.3 contains fixes up to DPDK v19.08. Issues identified/fixed in DPDK master branch after DPDK v19.08 may be present in DPDK 18.11.3
1863+* Microsoft validation team testing saw a performance drop with some multicore tests compared to previous testing at time of DPDK 18.11.2 release. A re-run of DPDK 18.11.2 showed a similar drop, so it is not believed that there is any regression in DPDK.
1864+
1865+18.11.3 Fixes skipped and status unresolved
1866+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1867+
1868+* dcfbc594f net/iavf: fix queue interrupt for ice
1869+* 281bd1aa3 net/iavf: fix stats reset
1870+* b149a7064 eal/freebsd: add config reattach in secondary process
1871+* 6f43682e0 test/hash: init parameters in the correct function
1872+* a135e050a examples/ipsec-secgw: fix packet length
1873+* b0437f8b0 hash: load value after full key compare
1874+* 9d10f53e4 test/metrics: fix second run
1875+* 2967612f4 test/crypto: fix session init failure for wireless case
1876+* 96b0931d5 net/bnxt: fix extended port counter statistics
1877+* 72aaa312e net/bnxt: fix VF probe when MAC address is zero
1878+* fe7848521 net/bnxt: fix doorbell register offset for Tx ring
1879+* 1f3cea004 net/bnxt: fix check of address mapping
1880+* 324c56551 net/bnxt: fix error checking of FW commands
1881+* b4e190d55 net/bnxt: fix MAC/VLAN filter allocation
1882+* ea81c1b81 net/mlx5: fix NVGRE matching
1883+* dbda2092d net/i40e: fix request queue in VF
1884+* 721c95301 net/mlx5: fix Rx scatter mode validation
1885+* aa2c00702 net/bnxt: fix traffic stall on Rx queue stop/start
1886diff --git a/doc/guides/sample_app_ug/l2_forward_real_virtual.rst b/doc/guides/sample_app_ug/l2_forward_real_virtual.rst
1887index 2b2d5af..87653ec 100644
1888--- a/doc/guides/sample_app_ug/l2_forward_real_virtual.rst
1889+++ b/doc/guides/sample_app_ug/l2_forward_real_virtual.rst
1890@@ -281,18 +281,6 @@ The list of queues that must be polled for a given lcore is stored in a private
1891 The values n_rx_port and rx_port_list[] are used in the main packet processing loop
1892 (see :ref:`l2_fwd_app_rx_tx_packets`).
1893
1894-The global configuration for the RX queues is stored in a static structure:
1895-
1896-.. code-block:: c
1897-
1898- static const struct rte_eth_rxconf rx_conf = {
1899- .rx_thresh = {
1900- .pthresh = RX_PTHRESH,
1901- .hthresh = RX_HTHRESH,
1902- .wthresh = RX_WTHRESH,
1903- },
1904- };
1905-
1906 .. _l2_fwd_app_tx_init:
1907
1908 TX Queue Initialization
1909diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
1910index efbeebe..473f779 100644
1911--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
1912+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
1913@@ -67,10 +67,6 @@
1914 #define DPAA2_MBUF_HW_ANNOTATION 64
1915 #define DPAA2_FD_PTA_SIZE 0
1916
1917-#if (DPAA2_MBUF_HW_ANNOTATION + DPAA2_FD_PTA_SIZE) > RTE_PKTMBUF_HEADROOM
1918-#error "Annotation requirement is more than RTE_PKTMBUF_HEADROOM"
1919-#endif
1920-
1921 /* we will re-use the HEADROOM for annotation in RX */
1922 #define DPAA2_HW_BUF_RESERVE 0
1923 #define DPAA2_PACKET_LAYOUT_ALIGN 64 /*changing from 256 */
1924@@ -206,6 +202,7 @@ enum qbman_fd_format {
1925 ((fd)->simple.frc = (0x80000000 | (len)))
1926 #define DPAA2_GET_FD_FRC_PARSE_SUM(fd) \
1927 ((uint16_t)(((fd)->simple.frc & 0xffff0000) >> 16))
1928+#define DPAA2_RESET_FD_FRC(fd) ((fd)->simple.frc = 0)
1929 #define DPAA2_SET_FD_FRC(fd, _frc) ((fd)->simple.frc = _frc)
1930 #define DPAA2_RESET_FD_CTRL(fd) ((fd)->simple.ctrl = 0)
1931
1932diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
1933index 10c72e0..00b353a 100644
1934--- a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
1935+++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
1936@@ -15,7 +15,7 @@
1937 * - Enqueue, including setting the enqueue descriptor, and issuing enqueue
1938 * command etc.
1939 * - Dequeue, including setting the dequeue descriptor, issuing dequeue command,
1940- * parsing the dequeue response in DQRR and memeory, parsing the state change
1941+ * parsing the dequeue response in DQRR and memory, parsing the state change
1942 * notifications etc.
1943 * - Release, including setting the release descriptor, and issuing the buffer
1944 * release command.
1945diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
1946index c99d523..74794a3 100644
1947--- a/drivers/bus/pci/linux/pci.c
1948+++ b/drivers/bus/pci/linux/pci.c
1949@@ -583,7 +583,6 @@ pci_one_device_iommu_support_va(struct rte_pci_device *dev)
1950 {
1951 #define VTD_CAP_MGAW_SHIFT 16
1952 #define VTD_CAP_MGAW_MASK (0x3fULL << VTD_CAP_MGAW_SHIFT)
1953-#define X86_VA_WIDTH 47 /* From Documentation/x86/x86_64/mm.txt */
1954 struct rte_pci_addr *addr = &dev->addr;
1955 char filename[PATH_MAX];
1956 FILE *fp;
1957diff --git a/drivers/bus/pci/linux/pci_uio.c b/drivers/bus/pci/linux/pci_uio.c
1958index 09ecbb7..0d1b9aa 100644
1959--- a/drivers/bus/pci/linux/pci_uio.c
1960+++ b/drivers/bus/pci/linux/pci_uio.c
1961@@ -314,12 +314,11 @@ pci_uio_map_resource_by_index(struct rte_pci_device *dev, int res_idx,
1962 loc->domain, loc->bus, loc->devid,
1963 loc->function, res_idx);
1964
1965- if (access(devname, R_OK|W_OK) != -1) {
1966- fd = open(devname, O_RDWR);
1967- if (fd < 0)
1968- RTE_LOG(INFO, EAL, "%s cannot be mapped. "
1969- "Fall-back to non prefetchable mode.\n",
1970- devname);
1971+ fd = open(devname, O_RDWR);
1972+ if (fd < 0 && errno != ENOENT) {
1973+ RTE_LOG(INFO, EAL, "%s cannot be mapped. "
1974+ "Fall-back to non prefetchable mode.\n",
1975+ devname);
1976 }
1977 }
1978
1979diff --git a/drivers/bus/vmbus/linux/vmbus_bus.c b/drivers/bus/vmbus/linux/vmbus_bus.c
1980index a4755a3..3c924ee 100644
1981--- a/drivers/bus/vmbus/linux/vmbus_bus.c
1982+++ b/drivers/bus/vmbus/linux/vmbus_bus.c
1983@@ -25,6 +25,18 @@
1984 /** Pathname of VMBUS devices directory. */
1985 #define SYSFS_VMBUS_DEVICES "/sys/bus/vmbus/devices"
1986
1987+/*
1988+ * GUID associated with network devices
1989+ * {f8615163-df3e-46c5-913f-f2d2f965ed0e}
1990+ */
1991+static const rte_uuid_t vmbus_nic_uuid = {
1992+ 0xf8, 0x61, 0x51, 0x63,
1993+ 0xdf, 0x3e,
1994+ 0x46, 0xc5,
1995+ 0x91, 0x3f,
1996+ 0xf2, 0xd2, 0xf9, 0x65, 0xed, 0xe
1997+};
1998+
1999 extern struct rte_vmbus_bus rte_vmbus_bus;
2000
2001 /* Read sysfs file to get UUID */
2002@@ -242,16 +254,22 @@ vmbus_scan_one(const char *name)
2003 snprintf(dirname, sizeof(dirname), "%s/%s",
2004 SYSFS_VMBUS_DEVICES, name);
2005
2006- /* get device id */
2007- snprintf(filename, sizeof(filename), "%s/device_id", dirname);
2008- if (parse_sysfs_uuid(filename, dev->device_id) < 0)
2009- goto error;
2010-
2011 /* get device class */
2012 snprintf(filename, sizeof(filename), "%s/class_id", dirname);
2013 if (parse_sysfs_uuid(filename, dev->class_id) < 0)
2014 goto error;
2015
2016+ /* skip non-network devices */
2017+ if (rte_uuid_compare(dev->class_id, vmbus_nic_uuid) != 0) {
2018+ free(dev);
2019+ return 0;
2020+ }
2021+
2022+ /* get device id */
2023+ snprintf(filename, sizeof(filename), "%s/device_id", dirname);
2024+ if (parse_sysfs_uuid(filename, dev->device_id) < 0)
2025+ goto error;
2026+
2027 /* get relid */
2028 snprintf(filename, sizeof(filename), "%s/id", dirname);
2029 if (eal_parse_sysfs_value(filename, &tmp) < 0)
2030diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
2031index 2dd38a9..ae0af09 100644
2032--- a/drivers/common/dpaax/dpaax_iova_table.c
2033+++ b/drivers/common/dpaax/dpaax_iova_table.c
2034@@ -99,7 +99,7 @@ read_memory_node(unsigned int *count)
2035 goto cleanup;
2036 }
2037
2038- DPAAX_DEBUG("Size of device-tree mem node: %lu", statbuf.st_size);
2039+ DPAAX_DEBUG("Size of device-tree mem node: %" PRIu64, statbuf.st_size);
2040 if (statbuf.st_size > MEM_NODE_FILE_LEN) {
2041 DPAAX_DEBUG("More memory nodes available than assumed.");
2042 DPAAX_DEBUG("System may not work properly!");
2043@@ -118,7 +118,7 @@ read_memory_node(unsigned int *count)
2044 */
2045 *count = (statbuf.st_size / 16);
2046 if ((*count) <= 0 || (statbuf.st_size % 16 != 0)) {
2047- DPAAX_DEBUG("Invalid memory node values or count. (size=%lu)",
2048+ DPAAX_DEBUG("Invalid memory node values or count. (size=%" PRIu64 ")",
2049 statbuf.st_size);
2050 goto cleanup;
2051 }
2052diff --git a/drivers/compress/isal/isal_compress_pmd_ops.c b/drivers/compress/isal/isal_compress_pmd_ops.c
2053index 472e54e..a395a66 100644
2054--- a/drivers/compress/isal/isal_compress_pmd_ops.c
2055+++ b/drivers/compress/isal/isal_compress_pmd_ops.c
2056@@ -169,18 +169,12 @@ isal_comp_pmd_qp_release(struct rte_compressdev *dev, uint16_t qp_id)
2057 if (qp == NULL)
2058 return -EINVAL;
2059
2060- if (qp->stream != NULL)
2061- rte_free(qp->stream);
2062-
2063- if (qp->stream->level_buf != NULL)
2064+ if (qp->stream)
2065 rte_free(qp->stream->level_buf);
2066
2067- if (qp->state != NULL)
2068- rte_free(qp->state);
2069-
2070- if (qp->processed_pkts != NULL)
2071- rte_ring_free(qp->processed_pkts);
2072-
2073+ rte_free(qp->state);
2074+ rte_ring_free(qp->processed_pkts);
2075+ rte_free(qp->stream);
2076 rte_free(qp);
2077 dev->data->queue_pairs[qp_id] = NULL;
2078
2079diff --git a/drivers/compress/zlib/zlib_pmd.c b/drivers/compress/zlib/zlib_pmd.c
2080index 5a4d47d..19f9200 100644
2081--- a/drivers/compress/zlib/zlib_pmd.c
2082+++ b/drivers/compress/zlib/zlib_pmd.c
2083@@ -30,6 +30,7 @@ process_zlib_deflate(struct rte_comp_op *op, z_stream *strm)
2084 default:
2085 op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
2086 ZLIB_PMD_ERR("Invalid flush value\n");
2087+ return;
2088 }
2089
2090 if (unlikely(!strm)) {
2091diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
2092index efc69b6..a4e70ba 100644
2093--- a/drivers/crypto/caam_jr/caam_jr.c
2094+++ b/drivers/crypto/caam_jr/caam_jr.c
2095@@ -70,7 +70,7 @@ static inline void
2096 caam_jr_op_ending(struct caam_jr_op_ctx *ctx)
2097 {
2098 PMD_INIT_FUNC_TRACE();
2099- /* report op status to sym->op and then free the ctx memeory */
2100+ /* report op status to sym->op and then free the ctx memory */
2101 rte_mempool_put(ctx->ctx_pool, (void *)ctx);
2102 }
2103
2104diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
2105index a7973cc..ae06438 100644
2106--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
2107+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
2108@@ -2193,6 +2193,7 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev,
2109 struct rte_crypto_sym_xform *xform, void *sess)
2110 {
2111 dpaa2_sec_session *session = sess;
2112+ int ret;
2113
2114 PMD_INIT_FUNC_TRACE();
2115
2116@@ -2208,37 +2209,37 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev,
2117 /* Cipher Only */
2118 if (xform->type == RTE_CRYPTO_SYM_XFORM_CIPHER && xform->next == NULL) {
2119 session->ctxt_type = DPAA2_SEC_CIPHER;
2120- dpaa2_sec_cipher_init(dev, xform, session);
2121+ ret = dpaa2_sec_cipher_init(dev, xform, session);
2122
2123 /* Authentication Only */
2124 } else if (xform->type == RTE_CRYPTO_SYM_XFORM_AUTH &&
2125 xform->next == NULL) {
2126 session->ctxt_type = DPAA2_SEC_AUTH;
2127- dpaa2_sec_auth_init(dev, xform, session);
2128+ ret = dpaa2_sec_auth_init(dev, xform, session);
2129
2130 /* Cipher then Authenticate */
2131 } else if (xform->type == RTE_CRYPTO_SYM_XFORM_CIPHER &&
2132 xform->next->type == RTE_CRYPTO_SYM_XFORM_AUTH) {
2133 session->ext_params.aead_ctxt.auth_cipher_text = true;
2134- dpaa2_sec_aead_chain_init(dev, xform, session);
2135+ ret = dpaa2_sec_aead_chain_init(dev, xform, session);
2136
2137 /* Authenticate then Cipher */
2138 } else if (xform->type == RTE_CRYPTO_SYM_XFORM_AUTH &&
2139 xform->next->type == RTE_CRYPTO_SYM_XFORM_CIPHER) {
2140 session->ext_params.aead_ctxt.auth_cipher_text = false;
2141- dpaa2_sec_aead_chain_init(dev, xform, session);
2142+ ret = dpaa2_sec_aead_chain_init(dev, xform, session);
2143
2144 /* AEAD operation for AES-GCM kind of Algorithms */
2145 } else if (xform->type == RTE_CRYPTO_SYM_XFORM_AEAD &&
2146 xform->next == NULL) {
2147- dpaa2_sec_aead_init(dev, xform, session);
2148+ ret = dpaa2_sec_aead_init(dev, xform, session);
2149
2150 } else {
2151 DPAA2_SEC_ERR("Invalid crypto type");
2152 return -EINVAL;
2153 }
2154
2155- return 0;
2156+ return ret;
2157 }
2158
2159 static int
2160diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
2161index 10201c5..742e24c 100644
2162--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
2163+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
2164@@ -60,7 +60,7 @@ dpaa_sec_op_ending(struct dpaa_sec_op_ctx *ctx)
2165 ctx->op->status = RTE_CRYPTO_OP_STATUS_ERROR;
2166 }
2167
2168- /* report op status to sym->op and then free the ctx memeory */
2169+ /* report op status to sym->op and then free the ctx memory */
2170 rte_mempool_put(ctx->ctx_pool, (void *)ctx);
2171 }
2172
2173diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
2174index 9956f05..0e7ade6 100644
2175--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
2176+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
2177@@ -726,7 +726,7 @@ mrvl_crypto_pmd_sym_session_get_size(__rte_unused struct rte_cryptodev *dev)
2178 /** Configure the session from a crypto xform chain (PMD ops callback).
2179 *
2180 * @param dev Pointer to the device structure.
2181- * @param xform Pointer to the crytpo configuration structure.
2182+ * @param xform Pointer to the crypto configuration structure.
2183 * @param sess Pointer to the empty session structure.
2184 * @returns 0 upon success, negative value otherwise.
2185 */
2186diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
2187index 5b27bb9..29f4ed6 100644
2188--- a/drivers/crypto/openssl/rte_openssl_pmd.c
2189+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
2190@@ -1528,7 +1528,7 @@ process_openssl_auth_op(struct openssl_qp *qp, struct rte_crypto_op *op,
2191 }
2192
2193 if (sess->auth.operation == RTE_CRYPTO_AUTH_OP_VERIFY) {
2194- if (memcmp(dst, op->sym->auth.digest.data,
2195+ if (CRYPTO_memcmp(dst, op->sym->auth.digest.data,
2196 sess->auth.digest_length) != 0) {
2197 op->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED;
2198 }
2199@@ -1605,12 +1605,9 @@ process_openssl_dsa_verify_op(struct rte_crypto_op *cop,
2200 op->y.length,
2201 pub_key);
2202 if (!r || !s || !pub_key) {
2203- if (r)
2204- BN_free(r);
2205- if (s)
2206- BN_free(s);
2207- if (pub_key)
2208- BN_free(pub_key);
2209+ BN_free(r);
2210+ BN_free(s);
2211+ BN_free(pub_key);
2212
2213 cop->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
2214 return -1;
2215@@ -1781,10 +1778,8 @@ process_openssl_modinv_op(struct rte_crypto_op *cop,
2216 BIGNUM *res = BN_CTX_get(sess->u.m.ctx);
2217
2218 if (unlikely(base == NULL || res == NULL)) {
2219- if (base)
2220- BN_free(base);
2221- if (res)
2222- BN_free(res);
2223+ BN_free(base);
2224+ BN_free(res);
2225 cop->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
2226 return -1;
2227 }
2228@@ -1815,10 +1810,8 @@ process_openssl_modexp_op(struct rte_crypto_op *cop,
2229 BIGNUM *res = BN_CTX_get(sess->u.e.ctx);
2230
2231 if (unlikely(base == NULL || res == NULL)) {
2232- if (base)
2233- BN_free(base);
2234- if (res)
2235- BN_free(res);
2236+ BN_free(base);
2237+ BN_free(res);
2238 cop->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
2239 return -1;
2240 }
2241@@ -1920,7 +1913,7 @@ process_openssl_rsa_op(struct rte_crypto_op *cop,
2242 "Length of public_decrypt %d "
2243 "length of message %zd\n",
2244 ret, op->rsa.message.length);
2245- if ((ret <= 0) || (memcmp(tmp, op->rsa.message.data,
2246+ if ((ret <= 0) || (CRYPTO_memcmp(tmp, op->rsa.message.data,
2247 op->rsa.message.length))) {
2248 OPENSSL_LOG(ERR, "RSA sign Verification failed");
2249 cop->status = RTE_CRYPTO_OP_STATUS_ERROR;
2250diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
2251index a65f9e5..234089c 100644
2252--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
2253+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
2254@@ -911,22 +911,14 @@ static int openssl_set_asym_session_parameters(
2255 asym_session->xfrm_type = RTE_CRYPTO_ASYM_XFORM_RSA;
2256 break;
2257 err_rsa:
2258- if (n)
2259- BN_free(n);
2260- if (e)
2261- BN_free(e);
2262- if (d)
2263- BN_free(d);
2264- if (p)
2265- BN_free(p);
2266- if (q)
2267- BN_free(q);
2268- if (dmp1)
2269- BN_free(dmp1);
2270- if (dmq1)
2271- BN_free(dmq1);
2272- if (iqmp)
2273- BN_free(iqmp);
2274+ BN_clear_free(n);
2275+ BN_clear_free(e);
2276+ BN_clear_free(d);
2277+ BN_clear_free(p);
2278+ BN_clear_free(q);
2279+ BN_clear_free(dmp1);
2280+ BN_clear_free(dmq1);
2281+ BN_clear_free(iqmp);
2282
2283 return -1;
2284 }
2285@@ -1048,10 +1040,8 @@ err_rsa:
2286
2287 err_dh:
2288 OPENSSL_LOG(ERR, " failed to set dh params\n");
2289- if (p)
2290- BN_free(p);
2291- if (g)
2292- BN_free(g);
2293+ BN_free(p);
2294+ BN_free(g);
2295 return -1;
2296 }
2297 case RTE_CRYPTO_ASYM_XFORM_DSA:
2298@@ -1117,16 +1107,11 @@ err_dh:
2299 break;
2300
2301 err_dsa:
2302- if (p)
2303- BN_free(p);
2304- if (q)
2305- BN_free(q);
2306- if (g)
2307- BN_free(g);
2308- if (priv_key)
2309- BN_free(priv_key);
2310- if (pub_key)
2311- BN_free(pub_key);
2312+ BN_free(p);
2313+ BN_free(q);
2314+ BN_free(g);
2315+ BN_free(priv_key);
2316+ BN_free(pub_key);
2317 return -1;
2318 }
2319 default:
2320diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
2321index 8801ca5..7515a55 100644
2322--- a/drivers/crypto/qat/qat_sym.c
2323+++ b/drivers/crypto/qat/qat_sym.c
2324@@ -530,6 +530,8 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
2325 qat_req->comn_mid.dest_data_addr =
2326 cookie->qat_sgl_dst_phys_addr;
2327 }
2328+ qat_req->comn_mid.src_length = 0;
2329+ qat_req->comn_mid.dst_length = 0;
2330 } else {
2331 qat_req->comn_mid.src_data_addr = src_buf_start;
2332 qat_req->comn_mid.dest_data_addr = dst_buf_start;
2333diff --git a/drivers/crypto/virtio/virtio_pci.c b/drivers/crypto/virtio/virtio_pci.c
2334index 832c465..e24ccb6 100644
2335--- a/drivers/crypto/virtio/virtio_pci.c
2336+++ b/drivers/crypto/virtio/virtio_pci.c
2337@@ -397,9 +397,13 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_crypto_hw *hw)
2338 hw->common_cfg = get_cfg_addr(dev, &cap);
2339 break;
2340 case VIRTIO_PCI_CAP_NOTIFY_CFG:
2341- rte_pci_read_config(dev, &hw->notify_off_multiplier,
2342+ ret = rte_pci_read_config(dev, &hw->notify_off_multiplier,
2343 4, pos + sizeof(cap));
2344- hw->notify_base = get_cfg_addr(dev, &cap);
2345+ if (ret != 4)
2346+ VIRTIO_CRYPTO_INIT_LOG_ERR(
2347+ "failed to read notify_off_multiplier: ret %d", ret);
2348+ else
2349+ hw->notify_base = get_cfg_addr(dev, &cap);
2350 break;
2351 case VIRTIO_PCI_CAP_DEVICE_CFG:
2352 hw->dev_cfg = get_cfg_addr(dev, &cap);
2353diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
2354index 8d168b0..926b7ed 100644
2355--- a/drivers/event/dpaa2/dpaa2_eventdev.c
2356+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
2357@@ -640,7 +640,7 @@ dpaa2_eventdev_timeout_ticks(struct rte_eventdev *dev, uint64_t ns,
2358 EVENTDEV_INIT_FUNC_TRACE();
2359
2360 RTE_SET_USED(dev);
2361- *timeout_ticks = ns * scale;
2362+ *timeout_ticks = ns / scale;
2363
2364 return 0;
2365 }
2366diff --git a/drivers/event/octeontx/meson.build b/drivers/event/octeontx/meson.build
2367index 0418553..0b8ba54 100644
2368--- a/drivers/event/octeontx/meson.build
2369+++ b/drivers/event/octeontx/meson.build
2370@@ -12,3 +12,8 @@ sources = files('ssovf_worker.c',
2371
2372 allow_experimental_apis = true
2373 deps += ['common_octeontx', 'mempool_octeontx', 'bus_vdev', 'pmd_octeontx']
2374+
2375+# for clang 32-bit compiles we need libatomic for 64-bit atomic ops
2376+if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false
2377+ ext_deps += cc.find_library('atomic')
2378+endif
2379diff --git a/drivers/event/opdl/meson.build b/drivers/event/opdl/meson.build
2380index cc6029c..1fe034e 100644
2381--- a/drivers/event/opdl/meson.build
2382+++ b/drivers/event/opdl/meson.build
2383@@ -9,3 +9,8 @@ sources = files(
2384 'opdl_test.c',
2385 )
2386 deps += ['bus_vdev']
2387+
2388+# for clang 32-bit compiles we need libatomic for 64-bit atomic ops
2389+if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false
2390+ ext_deps += cc.find_library('atomic')
2391+endif
2392diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c
2393index d2d2be4..3beca89 100644
2394--- a/drivers/event/opdl/opdl_evdev.c
2395+++ b/drivers/event/opdl/opdl_evdev.c
2396@@ -102,7 +102,7 @@ opdl_port_link(struct rte_eventdev *dev,
2397 dev->data->dev_id,
2398 queues[0],
2399 p->id);
2400- rte_errno = -EINVAL;
2401+ rte_errno = EINVAL;
2402 return 0;
2403 }
2404
2405@@ -113,7 +113,7 @@ opdl_port_link(struct rte_eventdev *dev,
2406 dev->data->dev_id,
2407 num,
2408 p->id);
2409- rte_errno = -EDQUOT;
2410+ rte_errno = EDQUOT;
2411 return 0;
2412 }
2413
2414@@ -123,7 +123,7 @@ opdl_port_link(struct rte_eventdev *dev,
2415 dev->data->dev_id,
2416 p->id,
2417 queues[0]);
2418- rte_errno = -EINVAL;
2419+ rte_errno = EINVAL;
2420 return 0;
2421 }
2422
2423@@ -134,7 +134,7 @@ opdl_port_link(struct rte_eventdev *dev,
2424 p->id,
2425 p->external_qid,
2426 queues[0]);
2427- rte_errno = -EINVAL;
2428+ rte_errno = EINVAL;
2429 return 0;
2430 }
2431
2432@@ -160,7 +160,7 @@ opdl_port_unlink(struct rte_eventdev *dev,
2433 dev->data->dev_id,
2434 queues[0],
2435 p->id);
2436- rte_errno = -EINVAL;
2437+ rte_errno = EINVAL;
2438 return 0;
2439 }
2440 RTE_SET_USED(nb_unlinks);
2441diff --git a/drivers/event/opdl/opdl_evdev_init.c b/drivers/event/opdl/opdl_evdev_init.c
2442index 582ad69..15aae47 100644
2443--- a/drivers/event/opdl/opdl_evdev_init.c
2444+++ b/drivers/event/opdl/opdl_evdev_init.c
2445@@ -35,7 +35,7 @@ enqueue_check(struct opdl_port *p,
2446 p->id,
2447 ev[i].queue_id,
2448 p->next_external_qid);
2449- rte_errno = -EINVAL;
2450+ rte_errno = EINVAL;
2451 return 0;
2452 }
2453 }
2454@@ -63,7 +63,7 @@ enqueue_check(struct opdl_port *p,
2455 } else {
2456 if (num > 0 &&
2457 ev[0].queue_id != p->next_external_qid) {
2458- rte_errno = -EINVAL;
2459+ rte_errno = EINVAL;
2460 return 0;
2461 }
2462 }
2463@@ -116,7 +116,7 @@ opdl_rx_error_enqueue(struct opdl_port *p,
2464 RTE_SET_USED(ev);
2465 RTE_SET_USED(num);
2466
2467- rte_errno = -ENOSPC;
2468+ rte_errno = ENOSPC;
2469
2470 return 0;
2471 }
2472@@ -145,7 +145,7 @@ opdl_rx_enqueue(struct opdl_port *p,
2473
2474
2475 if (enqueued < num)
2476- rte_errno = -ENOSPC;
2477+ rte_errno = ENOSPC;
2478
2479 return enqueued;
2480 }
2481@@ -164,7 +164,7 @@ opdl_tx_error_dequeue(struct opdl_port *p,
2482 RTE_SET_USED(ev);
2483 RTE_SET_USED(num);
2484
2485- rte_errno = -ENOSPC;
2486+ rte_errno = ENOSPC;
2487
2488 return 0;
2489 }
2490@@ -240,7 +240,7 @@ opdl_claim(struct opdl_port *p, struct rte_event ev[], uint16_t num)
2491 "Attempt to dequeue num of events larger than port (%d) max",
2492 opdl_pmd_dev_id(p->opdl),
2493 p->id);
2494- rte_errno = -EINVAL;
2495+ rte_errno = EINVAL;
2496 return 0;
2497 }
2498
2499diff --git a/drivers/event/opdl/opdl_ring.c b/drivers/event/opdl/opdl_ring.c
2500index 8aca481..c0bc4b0 100644
2501--- a/drivers/event/opdl/opdl_ring.c
2502+++ b/drivers/event/opdl/opdl_ring.c
2503@@ -755,7 +755,7 @@ int
2504 opdl_stage_disclaim(struct opdl_stage *s, uint32_t num_entries, bool block)
2505 {
2506 if (num_entries != s->num_event) {
2507- rte_errno = -EINVAL;
2508+ rte_errno = EINVAL;
2509 return 0;
2510 }
2511 if (s->threadsafe == false) {
2512diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
2513index 1175d6c..fb8e8be 100644
2514--- a/drivers/event/sw/sw_evdev.c
2515+++ b/drivers/event/sw/sw_evdev.c
2516@@ -38,12 +38,12 @@ sw_port_link(struct rte_eventdev *dev, void *port, const uint8_t queues[],
2517
2518 /* check for qid map overflow */
2519 if (q->cq_num_mapped_cqs >= RTE_DIM(q->cq_map)) {
2520- rte_errno = -EDQUOT;
2521+ rte_errno = EDQUOT;
2522 break;
2523 }
2524
2525 if (p->is_directed && p->num_qids_mapped > 0) {
2526- rte_errno = -EDQUOT;
2527+ rte_errno = EDQUOT;
2528 break;
2529 }
2530
2531@@ -59,12 +59,12 @@ sw_port_link(struct rte_eventdev *dev, void *port, const uint8_t queues[],
2532 if (q->type == SW_SCHED_TYPE_DIRECT) {
2533 /* check directed qids only map to one port */
2534 if (p->num_qids_mapped > 0) {
2535- rte_errno = -EDQUOT;
2536+ rte_errno = EDQUOT;
2537 break;
2538 }
2539 /* check port only takes a directed flow */
2540 if (num > 1) {
2541- rte_errno = -EDQUOT;
2542+ rte_errno = EDQUOT;
2543 break;
2544 }
2545
2546diff --git a/drivers/meson.build b/drivers/meson.build
2547index c3c66bb..f965c33 100644
2548--- a/drivers/meson.build
2549+++ b/drivers/meson.build
2550@@ -17,9 +17,6 @@ if cc.has_argument('-Wno-format-truncation')
2551 default_cflags += '-Wno-format-truncation'
2552 endif
2553
2554-# specify -D_GNU_SOURCE unconditionally
2555-default_cflags += '-D_GNU_SOURCE'
2556-
2557 foreach class:driver_classes
2558 drivers = []
2559 std_deps = []
2560diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
2561index 264cfc0..cca2239 100644
2562--- a/drivers/net/af_packet/rte_eth_af_packet.c
2563+++ b/drivers/net/af_packet/rte_eth_af_packet.c
2564@@ -527,8 +527,6 @@ open_packet_iface(const char *key __rte_unused,
2565 return 0;
2566 }
2567
2568-static struct rte_vdev_driver pmd_af_packet_drv;
2569-
2570 static int
2571 rte_pmd_init_internals(struct rte_vdev_device *dev,
2572 const int sockfd,
2573diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
2574index 4f52e2b..18eb15e 100644
2575--- a/drivers/net/ark/ark_ethdev.c
2576+++ b/drivers/net/ark/ark_ethdev.c
2577@@ -241,8 +241,7 @@ check_for_ext(struct ark_adapter *ark)
2578 static int
2579 eth_ark_dev_init(struct rte_eth_dev *dev)
2580 {
2581- struct ark_adapter *ark =
2582- (struct ark_adapter *)dev->data->dev_private;
2583+ struct ark_adapter *ark = dev->data->dev_private;
2584 struct rte_pci_device *pci_dev;
2585 int ret;
2586 int port_count = 1;
2587@@ -403,9 +402,9 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
2588
2589 return ret;
2590
2591- error:
2592- if (dev->data->mac_addrs)
2593- rte_free(dev->data->mac_addrs);
2594+error:
2595+ rte_free(dev->data->mac_addrs);
2596+ dev->data->mac_addrs = NULL;
2597 return -1;
2598 }
2599
2600@@ -417,8 +416,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
2601 static int
2602 ark_config_device(struct rte_eth_dev *dev)
2603 {
2604- struct ark_adapter *ark =
2605- (struct ark_adapter *)dev->data->dev_private;
2606+ struct ark_adapter *ark = dev->data->dev_private;
2607 uint16_t num_q, i;
2608 struct ark_mpu_t *mpu;
2609
2610@@ -493,8 +491,7 @@ ark_config_device(struct rte_eth_dev *dev)
2611 static int
2612 eth_ark_dev_uninit(struct rte_eth_dev *dev)
2613 {
2614- struct ark_adapter *ark =
2615- (struct ark_adapter *)dev->data->dev_private;
2616+ struct ark_adapter *ark = dev->data->dev_private;
2617
2618 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
2619 return 0;
2620@@ -516,8 +513,7 @@ static int
2621 eth_ark_dev_configure(struct rte_eth_dev *dev)
2622 {
2623 PMD_FUNC_LOG(DEBUG, "\n");
2624- struct ark_adapter *ark =
2625- (struct ark_adapter *)dev->data->dev_private;
2626+ struct ark_adapter *ark = dev->data->dev_private;
2627
2628 eth_ark_dev_set_link_up(dev);
2629 if (ark->user_ext.dev_configure)
2630@@ -543,8 +539,7 @@ delay_pg_start(void *arg)
2631 static int
2632 eth_ark_dev_start(struct rte_eth_dev *dev)
2633 {
2634- struct ark_adapter *ark =
2635- (struct ark_adapter *)dev->data->dev_private;
2636+ struct ark_adapter *ark = dev->data->dev_private;
2637 int i;
2638
2639 PMD_FUNC_LOG(DEBUG, "\n");
2640@@ -596,8 +591,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
2641 {
2642 uint16_t i;
2643 int status;
2644- struct ark_adapter *ark =
2645- (struct ark_adapter *)dev->data->dev_private;
2646+ struct ark_adapter *ark = dev->data->dev_private;
2647 struct ark_mpu_t *mpu;
2648
2649 PMD_FUNC_LOG(DEBUG, "\n");
2650@@ -687,8 +681,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
2651 static void
2652 eth_ark_dev_close(struct rte_eth_dev *dev)
2653 {
2654- struct ark_adapter *ark =
2655- (struct ark_adapter *)dev->data->dev_private;
2656+ struct ark_adapter *ark = dev->data->dev_private;
2657 uint16_t i;
2658
2659 if (ark->user_ext.dev_close)
2660@@ -718,8 +711,7 @@ static void
2661 eth_ark_dev_info_get(struct rte_eth_dev *dev,
2662 struct rte_eth_dev_info *dev_info)
2663 {
2664- struct ark_adapter *ark =
2665- (struct ark_adapter *)dev->data->dev_private;
2666+ struct ark_adapter *ark = dev->data->dev_private;
2667 struct ark_mpu_t *tx_mpu = RTE_PTR_ADD(ark->bar0, ARK_MPU_TX_BASE);
2668 struct ark_mpu_t *rx_mpu = RTE_PTR_ADD(ark->bar0, ARK_MPU_RX_BASE);
2669 uint16_t ports = ark->num_ports;
2670@@ -754,8 +746,7 @@ eth_ark_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete)
2671 {
2672 PMD_DEBUG_LOG(DEBUG, "link status = %d\n",
2673 dev->data->dev_link.link_status);
2674- struct ark_adapter *ark =
2675- (struct ark_adapter *)dev->data->dev_private;
2676+ struct ark_adapter *ark = dev->data->dev_private;
2677
2678 if (ark->user_ext.link_update) {
2679 return ark->user_ext.link_update
2680@@ -769,8 +760,7 @@ static int
2681 eth_ark_dev_set_link_up(struct rte_eth_dev *dev)
2682 {
2683 dev->data->dev_link.link_status = 1;
2684- struct ark_adapter *ark =
2685- (struct ark_adapter *)dev->data->dev_private;
2686+ struct ark_adapter *ark = dev->data->dev_private;
2687
2688 if (ark->user_ext.dev_set_link_up)
2689 return ark->user_ext.dev_set_link_up(dev,
2690@@ -782,8 +772,7 @@ static int
2691 eth_ark_dev_set_link_down(struct rte_eth_dev *dev)
2692 {
2693 dev->data->dev_link.link_status = 0;
2694- struct ark_adapter *ark =
2695- (struct ark_adapter *)dev->data->dev_private;
2696+ struct ark_adapter *ark = dev->data->dev_private;
2697
2698 if (ark->user_ext.dev_set_link_down)
2699 return ark->user_ext.dev_set_link_down(dev,
2700@@ -795,8 +784,7 @@ static int
2701 eth_ark_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
2702 {
2703 uint16_t i;
2704- struct ark_adapter *ark =
2705- (struct ark_adapter *)dev->data->dev_private;
2706+ struct ark_adapter *ark = dev->data->dev_private;
2707
2708 stats->ipackets = 0;
2709 stats->ibytes = 0;
2710@@ -819,8 +807,7 @@ static void
2711 eth_ark_dev_stats_reset(struct rte_eth_dev *dev)
2712 {
2713 uint16_t i;
2714- struct ark_adapter *ark =
2715- (struct ark_adapter *)dev->data->dev_private;
2716+ struct ark_adapter *ark = dev->data->dev_private;
2717
2718 for (i = 0; i < dev->data->nb_tx_queues; i++)
2719 eth_tx_queue_stats_reset(dev->data->tx_queues[i]);
2720@@ -837,8 +824,7 @@ eth_ark_macaddr_add(struct rte_eth_dev *dev,
2721 uint32_t index,
2722 uint32_t pool)
2723 {
2724- struct ark_adapter *ark =
2725- (struct ark_adapter *)dev->data->dev_private;
2726+ struct ark_adapter *ark = dev->data->dev_private;
2727
2728 if (ark->user_ext.mac_addr_add) {
2729 ark->user_ext.mac_addr_add(dev,
2730@@ -854,8 +840,7 @@ eth_ark_macaddr_add(struct rte_eth_dev *dev,
2731 static void
2732 eth_ark_macaddr_remove(struct rte_eth_dev *dev, uint32_t index)
2733 {
2734- struct ark_adapter *ark =
2735- (struct ark_adapter *)dev->data->dev_private;
2736+ struct ark_adapter *ark = dev->data->dev_private;
2737
2738 if (ark->user_ext.mac_addr_remove)
2739 ark->user_ext.mac_addr_remove(dev, index,
2740@@ -866,8 +851,7 @@ static int
2741 eth_ark_set_default_mac_addr(struct rte_eth_dev *dev,
2742 struct ether_addr *mac_addr)
2743 {
2744- struct ark_adapter *ark =
2745- (struct ark_adapter *)dev->data->dev_private;
2746+ struct ark_adapter *ark = dev->data->dev_private;
2747
2748 if (ark->user_ext.mac_addr_set) {
2749 ark->user_ext.mac_addr_set(dev, mac_addr,
2750@@ -880,8 +864,7 @@ eth_ark_set_default_mac_addr(struct rte_eth_dev *dev,
2751 static int
2752 eth_ark_set_mtu(struct rte_eth_dev *dev, uint16_t size)
2753 {
2754- struct ark_adapter *ark =
2755- (struct ark_adapter *)dev->data->dev_private;
2756+ struct ark_adapter *ark = dev->data->dev_private;
2757
2758 if (ark->user_ext.set_mtu)
2759 return ark->user_ext.set_mtu(dev, size,
2760diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c
2761index 300029d..6156730 100644
2762--- a/drivers/net/ark/ark_ethdev_rx.c
2763+++ b/drivers/net/ark/ark_ethdev_rx.c
2764@@ -121,15 +121,13 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
2765 struct rte_mempool *mb_pool)
2766 {
2767 static int warning1; /* = 0 */
2768- struct ark_adapter *ark = (struct ark_adapter *)dev->data->dev_private;
2769+ struct ark_adapter *ark = dev->data->dev_private;
2770
2771 struct ark_rx_queue *queue;
2772 uint32_t i;
2773 int status;
2774
2775- /* Future works: divide the Q's evenly with multi-ports */
2776- int port = dev->data->port_id;
2777- int qidx = port + queue_idx;
2778+ int qidx = queue_idx;
2779
2780 /* We may already be setup, free memory prior to re-allocation */
2781 if (dev->data->rx_queues[queue_idx] != NULL) {
2782@@ -611,7 +609,7 @@ eth_rx_queue_stats_reset(void *vqueue)
2783 void
2784 eth_ark_udm_force_close(struct rte_eth_dev *dev)
2785 {
2786- struct ark_adapter *ark = (struct ark_adapter *)dev->data->dev_private;
2787+ struct ark_adapter *ark = dev->data->dev_private;
2788 struct ark_rx_queue *queue;
2789 uint32_t index;
2790 uint16_t i;
2791diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
2792index 94da5f9..08bcf43 100644
2793--- a/drivers/net/ark/ark_ethdev_tx.c
2794+++ b/drivers/net/ark/ark_ethdev_tx.c
2795@@ -207,13 +207,11 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
2796 unsigned int socket_id,
2797 const struct rte_eth_txconf *tx_conf __rte_unused)
2798 {
2799- struct ark_adapter *ark = (struct ark_adapter *)dev->data->dev_private;
2800+ struct ark_adapter *ark = dev->data->dev_private;
2801 struct ark_tx_queue *queue;
2802 int status;
2803
2804- /* Future: divide the Q's evenly with multi-ports */
2805- int port = dev->data->port_id;
2806- int qidx = port + queue_idx;
2807+ int qidx = queue_idx;
2808
2809 if (!rte_is_power_of_2(nb_desc)) {
2810 PMD_DRV_LOG(ERR,
2811diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
2812index 2d05bb4..06d4f2e 100644
2813--- a/drivers/net/atlantic/atl_ethdev.c
2814+++ b/drivers/net/atlantic/atl_ethdev.c
2815@@ -322,8 +322,7 @@ atl_disable_intr(struct aq_hw_s *hw)
2816 static int
2817 eth_atl_dev_init(struct rte_eth_dev *eth_dev)
2818 {
2819- struct atl_adapter *adapter =
2820- (struct atl_adapter *)eth_dev->data->dev_private;
2821+ struct atl_adapter *adapter = eth_dev->data->dev_private;
2822 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
2823 struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
2824 struct aq_hw_s *hw = ATL_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
2825diff --git a/drivers/net/atlantic/atl_rxtx.c b/drivers/net/atlantic/atl_rxtx.c
2826index fe00770..449ffd4 100644
2827--- a/drivers/net/atlantic/atl_rxtx.c
2828+++ b/drivers/net/atlantic/atl_rxtx.c
2829@@ -824,13 +824,13 @@ atl_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
2830 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
2831 ret = rte_validate_tx_offload(m);
2832 if (ret != 0) {
2833- rte_errno = ret;
2834+ rte_errno = -ret;
2835 return i;
2836 }
2837 #endif
2838 ret = rte_net_intel_cksum_prepare(m);
2839 if (ret != 0) {
2840- rte_errno = ret;
2841+ rte_errno = -ret;
2842 return i;
2843 }
2844 }
2845diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
2846index 4dc61d9..9739dc9 100644
2847--- a/drivers/net/avf/avf_ethdev.c
2848+++ b/drivers/net/avf/avf_ethdev.c
2849@@ -993,6 +993,7 @@ avf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
2850 stats->imissed = pstats->rx_discards;
2851 stats->oerrors = pstats->tx_errors + pstats->tx_discards;
2852 stats->ibytes = pstats->rx_bytes;
2853+ stats->ibytes -= stats->ipackets * ETHER_CRC_LEN;
2854 stats->obytes = pstats->tx_bytes;
2855 } else {
2856 PMD_DRV_LOG(ERR, "Get statistics failed");
2857diff --git a/drivers/net/avf/avf_rxtx.c b/drivers/net/avf/avf_rxtx.c
2858index 8c7a967..8c8771e 100644
2859--- a/drivers/net/avf/avf_rxtx.c
2860+++ b/drivers/net/avf/avf_rxtx.c
2861@@ -144,7 +144,8 @@ check_rx_bulk_allow(struct avf_rx_queue *rxq)
2862 static inline void
2863 reset_rx_queue(struct avf_rx_queue *rxq)
2864 {
2865- uint16_t len, i;
2866+ uint16_t len;
2867+ uint32_t i;
2868
2869 if (!rxq)
2870 return;
2871@@ -174,7 +175,8 @@ static inline void
2872 reset_tx_queue(struct avf_tx_queue *txq)
2873 {
2874 struct avf_tx_entry *txe;
2875- uint16_t i, prev, size;
2876+ uint32_t i, size;
2877+ uint16_t prev;
2878
2879 if (!txq) {
2880 PMD_DRV_LOG(DEBUG, "Pointer to txq is NULL");
2881@@ -1583,6 +1585,9 @@ avf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
2882 /* Setup TX context descriptor if required */
2883 uint64_t cd_type_cmd_tso_mss =
2884 AVF_TX_DESC_DTYPE_CONTEXT;
2885+ volatile struct avf_tx_context_desc *ctx_txd =
2886+ (volatile struct avf_tx_context_desc *)
2887+ &txr[tx_id];
2888
2889 txn = &sw_ring[txe->next_id];
2890 RTE_MBUF_PREFETCH_TO_FREE(txn->mbuf);
2891@@ -1596,6 +1601,9 @@ avf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
2892 cd_type_cmd_tso_mss |=
2893 avf_set_tso_ctx(tx_pkt, tx_offload);
2894
2895+ ctx_txd->type_cmd_tso_mss =
2896+ rte_cpu_to_le_64(cd_type_cmd_tso_mss);
2897+
2898 AVF_DUMP_TX_DESC(txq, &txr[tx_id], tx_id);
2899 txe->last_id = tx_last;
2900 tx_id = txe->next_id;
2901@@ -1698,31 +1706,31 @@ avf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
2902 /* Check condition for nb_segs > AVF_TX_MAX_MTU_SEG. */
2903 if (!(ol_flags & PKT_TX_TCP_SEG)) {
2904 if (m->nb_segs > AVF_TX_MAX_MTU_SEG) {
2905- rte_errno = -EINVAL;
2906+ rte_errno = EINVAL;
2907 return i;
2908 }
2909 } else if ((m->tso_segsz < AVF_MIN_TSO_MSS) ||
2910 (m->tso_segsz > AVF_MAX_TSO_MSS)) {
2911 /* MSS outside the range are considered malicious */
2912- rte_errno = -EINVAL;
2913+ rte_errno = EINVAL;
2914 return i;
2915 }
2916
2917 if (ol_flags & AVF_TX_OFFLOAD_NOTSUP_MASK) {
2918- rte_errno = -ENOTSUP;
2919+ rte_errno = ENOTSUP;
2920 return i;
2921 }
2922
2923 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
2924 ret = rte_validate_tx_offload(m);
2925 if (ret != 0) {
2926- rte_errno = ret;
2927+ rte_errno = -ret;
2928 return i;
2929 }
2930 #endif
2931 ret = rte_net_intel_cksum_prepare(m);
2932 if (ret != 0) {
2933- rte_errno = ret;
2934+ rte_errno = -ret;
2935 return i;
2936 }
2937 }
2938diff --git a/drivers/net/avf/avf_rxtx_vec_sse.c b/drivers/net/avf/avf_rxtx_vec_sse.c
2939index 343a6aa..13e94ce 100644
2940--- a/drivers/net/avf/avf_rxtx_vec_sse.c
2941+++ b/drivers/net/avf/avf_rxtx_vec_sse.c
2942@@ -521,6 +521,7 @@ avf_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
2943 i++;
2944 if (i == nb_bufs)
2945 return nb_bufs;
2946+ rxq->pkt_first_seg = rx_pkts[i];
2947 }
2948 return i + reassemble_packets(rxq, &rx_pkts[i], nb_bufs - i,
2949 &split_flags[i]);
2950diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
2951index e89c0ec..8e534a7 100644
2952--- a/drivers/net/axgbe/axgbe_ethdev.c
2953+++ b/drivers/net/axgbe/axgbe_ethdev.c
2954@@ -157,7 +157,7 @@ axgbe_dev_configure(struct rte_eth_dev *dev)
2955 static int
2956 axgbe_dev_rx_mq_config(struct rte_eth_dev *dev)
2957 {
2958- struct axgbe_port *pdata = (struct axgbe_port *)dev->data->dev_private;
2959+ struct axgbe_port *pdata = dev->data->dev_private;
2960
2961 if (dev->data->dev_conf.rxmode.mq_mode == ETH_MQ_RX_RSS)
2962 pdata->rss_enable = 1;
2963@@ -171,10 +171,11 @@ axgbe_dev_rx_mq_config(struct rte_eth_dev *dev)
2964 static int
2965 axgbe_dev_start(struct rte_eth_dev *dev)
2966 {
2967- PMD_INIT_FUNC_TRACE();
2968- struct axgbe_port *pdata = (struct axgbe_port *)dev->data->dev_private;
2969+ struct axgbe_port *pdata = dev->data->dev_private;
2970 int ret;
2971
2972+ PMD_INIT_FUNC_TRACE();
2973+
2974 /* Multiqueue RSS */
2975 ret = axgbe_dev_rx_mq_config(dev);
2976 if (ret) {
2977@@ -209,9 +210,10 @@ axgbe_dev_start(struct rte_eth_dev *dev)
2978 static void
2979 axgbe_dev_stop(struct rte_eth_dev *dev)
2980 {
2981- PMD_INIT_FUNC_TRACE();
2982 struct axgbe_port *pdata = dev->data->dev_private;
2983
2984+ PMD_INIT_FUNC_TRACE();
2985+
2986 rte_intr_disable(&pdata->pci_dev->intr_handle);
2987
2988 if (axgbe_test_bit(AXGBE_STOPPED, &pdata->dev_state))
2989@@ -237,27 +239,30 @@ axgbe_dev_close(struct rte_eth_dev *dev)
2990 static void
2991 axgbe_dev_promiscuous_enable(struct rte_eth_dev *dev)
2992 {
2993- PMD_INIT_FUNC_TRACE();
2994 struct axgbe_port *pdata = dev->data->dev_private;
2995
2996+ PMD_INIT_FUNC_TRACE();
2997+
2998 AXGMAC_IOWRITE_BITS(pdata, MAC_PFR, PR, 1);
2999 }
3000
3001 static void
3002 axgbe_dev_promiscuous_disable(struct rte_eth_dev *dev)
3003 {
3004- PMD_INIT_FUNC_TRACE();
3005 struct axgbe_port *pdata = dev->data->dev_private;
3006
3007+ PMD_INIT_FUNC_TRACE();
3008+
3009 AXGMAC_IOWRITE_BITS(pdata, MAC_PFR, PR, 0);
3010 }
3011
3012 static void
3013 axgbe_dev_allmulticast_enable(struct rte_eth_dev *dev)
3014 {
3015- PMD_INIT_FUNC_TRACE();
3016 struct axgbe_port *pdata = dev->data->dev_private;
3017
3018+ PMD_INIT_FUNC_TRACE();
3019+
3020 if (AXGMAC_IOREAD_BITS(pdata, MAC_PFR, PM))
3021 return;
3022 AXGMAC_IOWRITE_BITS(pdata, MAC_PFR, PM, 1);
3023@@ -266,9 +271,10 @@ axgbe_dev_allmulticast_enable(struct rte_eth_dev *dev)
3024 static void
3025 axgbe_dev_allmulticast_disable(struct rte_eth_dev *dev)
3026 {
3027- PMD_INIT_FUNC_TRACE();
3028 struct axgbe_port *pdata = dev->data->dev_private;
3029
3030+ PMD_INIT_FUNC_TRACE();
3031+
3032 if (!AXGMAC_IOREAD_BITS(pdata, MAC_PFR, PM))
3033 return;
3034 AXGMAC_IOWRITE_BITS(pdata, MAC_PFR, PM, 0);
3035@@ -578,7 +584,7 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
3036 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
3037 return 0;
3038
3039- pdata = (struct axgbe_port *)eth_dev->data->dev_private;
3040+ pdata = eth_dev->data->dev_private;
3041 /* initial state */
3042 axgbe_set_bit(AXGBE_DOWN, &pdata->dev_state);
3043 axgbe_set_bit(AXGBE_STOPPED, &pdata->dev_state);
3044@@ -694,6 +700,7 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
3045 ret = pdata->phy_if.phy_init(pdata);
3046 if (ret) {
3047 rte_free(eth_dev->data->mac_addrs);
3048+ eth_dev->data->mac_addrs = NULL;
3049 return ret;
3050 }
3051
3052diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
3053index b5a29a9..d80f378 100644
3054--- a/drivers/net/axgbe/axgbe_rxtx.c
3055+++ b/drivers/net/axgbe/axgbe_rxtx.c
3056@@ -342,7 +342,7 @@ int axgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
3057 const struct rte_memzone *tz;
3058
3059 tx_desc = nb_desc;
3060- pdata = (struct axgbe_port *)dev->data->dev_private;
3061+ pdata = dev->data->dev_private;
3062
3063 /*
3064 * validate tx descriptors count
3065diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
3066index 3e705c7..3b034b1 100644
3067--- a/drivers/net/bnx2x/bnx2x.c
3068+++ b/drivers/net/bnx2x/bnx2x.c
3069@@ -2015,6 +2015,8 @@ bnx2x_nic_unload(struct bnx2x_softc *sc, uint32_t unload_mode, uint8_t keep_link
3070 uint8_t global = FALSE;
3071 uint32_t val;
3072
3073+ PMD_INIT_FUNC_TRACE(sc);
3074+
3075 PMD_DRV_LOG(DEBUG, sc, "Starting NIC unload...");
3076
3077 /* mark driver as unloaded in shmem2 */
3078@@ -2118,6 +2120,9 @@ bnx2x_nic_unload(struct bnx2x_softc *sc, uint32_t unload_mode, uint8_t keep_link
3079 bnx2x_free_mem(sc);
3080 }
3081
3082+ /* free the host hardware/software hsi structures */
3083+ bnx2x_free_hsi_mem(sc);
3084+
3085 bnx2x_free_fw_stats_mem(sc);
3086
3087 sc->state = BNX2X_STATE_CLOSED;
3088@@ -4572,6 +4577,8 @@ static void bnx2x_handle_fp_tq(struct bnx2x_fastpath *fp)
3089 }
3090 }
3091
3092+ /* Assuming we have completed slow path completion, clear the flag */
3093+ rte_atomic32_set(&sc->scan_fp, 0);
3094 bnx2x_ack_sb(sc, fp->igu_sb_id, USTORM_ID,
3095 le16toh(fp->fp_hc_idx), IGU_INT_ENABLE, 1);
3096 }
3097@@ -7228,6 +7235,14 @@ int bnx2x_nic_load(struct bnx2x_softc *sc)
3098 }
3099 }
3100
3101+ /* allocate the host hardware/software hsi structures */
3102+ if (bnx2x_alloc_hsi_mem(sc) != 0) {
3103+ PMD_DRV_LOG(ERR, sc, "bnx2x_alloc_hsi_mem was failed");
3104+ sc->state = BNX2X_STATE_CLOSED;
3105+ rc = -ENOMEM;
3106+ goto bnx2x_nic_load_error0;
3107+ }
3108+
3109 if (bnx2x_alloc_fw_stats_mem(sc) != 0) {
3110 sc->state = BNX2X_STATE_CLOSED;
3111 rc = -ENOMEM;
3112@@ -7443,6 +7458,7 @@ bnx2x_nic_load_error1:
3113 bnx2x_nic_load_error0:
3114
3115 bnx2x_free_fw_stats_mem(sc);
3116+ bnx2x_free_hsi_mem(sc);
3117 bnx2x_free_mem(sc);
3118
3119 return rc;
3120@@ -8888,9 +8904,9 @@ int bnx2x_alloc_hsi_mem(struct bnx2x_softc *sc)
3121 uint32_t i;
3122
3123 if (IS_PF(sc)) {
3124-/************************/
3125-/* DEFAULT STATUS BLOCK */
3126-/************************/
3127+ /************************/
3128+ /* DEFAULT STATUS BLOCK */
3129+ /************************/
3130
3131 if (bnx2x_dma_alloc(sc, sizeof(struct host_sp_status_block),
3132 &sc->def_sb_dma, "def_sb",
3133@@ -8900,9 +8916,9 @@ int bnx2x_alloc_hsi_mem(struct bnx2x_softc *sc)
3134
3135 sc->def_sb =
3136 (struct host_sp_status_block *)sc->def_sb_dma.vaddr;
3137-/***************/
3138-/* EVENT QUEUE */
3139-/***************/
3140+ /***************/
3141+ /* EVENT QUEUE */
3142+ /***************/
3143
3144 if (bnx2x_dma_alloc(sc, BNX2X_PAGE_SIZE,
3145 &sc->eq_dma, "ev_queue",
3146@@ -8913,9 +8929,9 @@ int bnx2x_alloc_hsi_mem(struct bnx2x_softc *sc)
3147
3148 sc->eq = (union event_ring_elem *)sc->eq_dma.vaddr;
3149
3150-/*************/
3151-/* SLOW PATH */
3152-/*************/
3153+ /*************/
3154+ /* SLOW PATH */
3155+ /*************/
3156
3157 if (bnx2x_dma_alloc(sc, sizeof(struct bnx2x_slowpath),
3158 &sc->sp_dma, "sp",
3159@@ -8927,9 +8943,9 @@ int bnx2x_alloc_hsi_mem(struct bnx2x_softc *sc)
3160
3161 sc->sp = (struct bnx2x_slowpath *)sc->sp_dma.vaddr;
3162
3163-/*******************/
3164-/* SLOW PATH QUEUE */
3165-/*******************/
3166+ /*******************/
3167+ /* SLOW PATH QUEUE */
3168+ /*******************/
3169
3170 if (bnx2x_dma_alloc(sc, BNX2X_PAGE_SIZE,
3171 &sc->spq_dma, "sp_queue",
3172@@ -8942,9 +8958,9 @@ int bnx2x_alloc_hsi_mem(struct bnx2x_softc *sc)
3173
3174 sc->spq = (struct eth_spe *)sc->spq_dma.vaddr;
3175
3176-/***************************/
3177-/* FW DECOMPRESSION BUFFER */
3178-/***************************/
3179+ /***************************/
3180+ /* FW DECOMPRESSION BUFFER */
3181+ /***************************/
3182
3183 if (bnx2x_dma_alloc(sc, FW_BUF_SIZE, &sc->gz_buf_dma,
3184 "fw_buf", RTE_CACHE_LINE_SIZE) != 0) {
3185@@ -8968,9 +8984,9 @@ int bnx2x_alloc_hsi_mem(struct bnx2x_softc *sc)
3186 fp->sc = sc;
3187 fp->index = i;
3188
3189-/*******************/
3190-/* FP STATUS BLOCK */
3191-/*******************/
3192+ /*******************/
3193+ /* FP STATUS BLOCK */
3194+ /*******************/
3195
3196 snprintf(buf, sizeof(buf), "fp_%d_sb", i);
3197 if (bnx2x_dma_alloc(sc, sizeof(union bnx2x_host_hc_status_block),
3198@@ -9001,43 +9017,50 @@ void bnx2x_free_hsi_mem(struct bnx2x_softc *sc)
3199 for (i = 0; i < sc->num_queues; i++) {
3200 fp = &sc->fp[i];
3201
3202-/*******************/
3203-/* FP STATUS BLOCK */
3204-/*******************/
3205+ /*******************/
3206+ /* FP STATUS BLOCK */
3207+ /*******************/
3208
3209 memset(&fp->status_block, 0, sizeof(fp->status_block));
3210+ bnx2x_dma_free(&fp->sb_dma);
3211 }
3212
3213- /***************************/
3214- /* FW DECOMPRESSION BUFFER */
3215- /***************************/
3216-
3217- sc->gz_buf = NULL;
3218+ if (IS_PF(sc)) {
3219+ /***************************/
3220+ /* FW DECOMPRESSION BUFFER */
3221+ /***************************/
3222
3223- /*******************/
3224- /* SLOW PATH QUEUE */
3225- /*******************/
3226+ bnx2x_dma_free(&sc->gz_buf_dma);
3227+ sc->gz_buf = NULL;
3228
3229- sc->spq = NULL;
3230+ /*******************/
3231+ /* SLOW PATH QUEUE */
3232+ /*******************/
3233
3234- /*************/
3235- /* SLOW PATH */
3236- /*************/
3237+ bnx2x_dma_free(&sc->spq_dma);
3238+ sc->spq = NULL;
3239
3240- sc->sp = NULL;
3241+ /*************/
3242+ /* SLOW PATH */
3243+ /*************/
3244
3245- /***************/
3246- /* EVENT QUEUE */
3247- /***************/
3248+ bnx2x_dma_free(&sc->sp_dma);
3249+ sc->sp = NULL;
3250
3251- sc->eq = NULL;
3252+ /***************/
3253+ /* EVENT QUEUE */
3254+ /***************/
3255
3256- /************************/
3257- /* DEFAULT STATUS BLOCK */
3258- /************************/
3259+ bnx2x_dma_free(&sc->eq_dma);
3260+ sc->eq = NULL;
3261
3262- sc->def_sb = NULL;
3263+ /************************/
3264+ /* DEFAULT STATUS BLOCK */
3265+ /************************/
3266
3267+ bnx2x_dma_free(&sc->def_sb_dma);
3268+ sc->def_sb = NULL;
3269+ }
3270 }
3271
3272 /*
3273diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
3274index ef1688f..ceaecb0 100644
3275--- a/drivers/net/bnx2x/bnx2x.h
3276+++ b/drivers/net/bnx2x/bnx2x.h
3277@@ -155,13 +155,14 @@ struct bnx2x_device_type {
3278 * Transmit Buffer Descriptor (tx_bd) definitions*
3279 */
3280 /* NUM_TX_PAGES must be a power of 2. */
3281+#define NUM_TX_PAGES 16
3282 #define TOTAL_TX_BD_PER_PAGE (BNX2X_PAGE_SIZE / sizeof(union eth_tx_bd_types)) /* 256 */
3283 #define USABLE_TX_BD_PER_PAGE (TOTAL_TX_BD_PER_PAGE - 1) /* 255 */
3284
3285 #define TOTAL_TX_BD(q) (TOTAL_TX_BD_PER_PAGE * q->nb_tx_pages) /* 512 */
3286 #define USABLE_TX_BD(q) (USABLE_TX_BD_PER_PAGE * q->nb_tx_pages) /* 510 */
3287 #define MAX_TX_BD(q) (TOTAL_TX_BD(q) - 1) /* 511 */
3288-
3289+#define MAX_TX_AVAIL (USABLE_TX_BD_PER_PAGE * NUM_TX_PAGES - 2)
3290 #define NEXT_TX_BD(x) \
3291 ((((x) & USABLE_TX_BD_PER_PAGE) == \
3292 (USABLE_TX_BD_PER_PAGE - 1)) ? (x) + 2 : (x) + 1)
3293@@ -182,13 +183,14 @@ struct bnx2x_device_type {
3294 /*
3295 * Receive Buffer Descriptor (rx_bd) definitions*
3296 */
3297-//#define NUM_RX_PAGES 1
3298+#define MAX_RX_PAGES 8
3299 #define TOTAL_RX_BD_PER_PAGE (BNX2X_PAGE_SIZE / sizeof(struct eth_rx_bd)) /* 512 */
3300 #define USABLE_RX_BD_PER_PAGE (TOTAL_RX_BD_PER_PAGE - 2) /* 510 */
3301 #define RX_BD_PER_PAGE_MASK (TOTAL_RX_BD_PER_PAGE - 1) /* 511 */
3302 #define TOTAL_RX_BD(q) (TOTAL_RX_BD_PER_PAGE * q->nb_rx_pages) /* 512 */
3303 #define USABLE_RX_BD(q) (USABLE_RX_BD_PER_PAGE * q->nb_rx_pages) /* 510 */
3304 #define MAX_RX_BD(q) (TOTAL_RX_BD(q) - 1) /* 511 */
3305+#define MAX_RX_AVAIL (USABLE_RX_BD_PER_PAGE * MAX_RX_PAGES - 2)
3306 #define RX_BD_NEXT_PAGE_DESC_CNT 2
3307
3308 #define NEXT_RX_BD(x) \
3309@@ -244,6 +246,10 @@ struct bnx2x_device_type {
3310 #define MIN_RX_AVAIL(sc) \
3311 ((sc)->dropless_fc ? BD_TH_HI(sc) + 128 : 128)
3312
3313+#define MIN_RX_SIZE_NONTPA_HW ETH_MIN_RX_CQES_WITHOUT_TPA
3314+#define MIN_RX_SIZE_NONTPA (RTE_MAX((uint32_t)MIN_RX_SIZE_NONTPA_HW,\
3315+ (uint32_t)MIN_RX_AVAIL(sc)))
3316+
3317 /*
3318 * dropless fc calculations for RCQs
3319 * Number of RCQs should be as number of buffers in BRB:
3320diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
3321index c628cdc..5cff773 100644
3322--- a/drivers/net/bnx2x/bnx2x_ethdev.c
3323+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
3324@@ -87,7 +87,6 @@ bnx2x_link_update(struct rte_eth_dev *dev)
3325
3326 PMD_INIT_FUNC_TRACE(sc);
3327
3328- bnx2x_link_status_update(sc);
3329 memset(&link, 0, sizeof(link));
3330 mb();
3331 link.link_speed = sc->link_vars.line_speed;
3332@@ -150,7 +149,6 @@ static void bnx2x_periodic_start(void *param)
3333 if (ret) {
3334 PMD_DRV_LOG(ERR, sc, "Unable to start periodic"
3335 " timer rc %d", ret);
3336- assert(false && "Unable to start periodic timer");
3337 }
3338 }
3339 }
3340@@ -206,13 +204,6 @@ bnx2x_dev_configure(struct rte_eth_dev *dev)
3341 return -ENXIO;
3342 }
3343
3344- /* allocate the host hardware/software hsi structures */
3345- if (bnx2x_alloc_hsi_mem(sc) != 0) {
3346- PMD_DRV_LOG(ERR, sc, "bnx2x_alloc_hsi_mem was failed");
3347- bnx2x_free_ilt_mem(sc);
3348- return -ENXIO;
3349- }
3350-
3351 bnx2x_dev_rxtx_init_dummy(dev);
3352 return 0;
3353 }
3354@@ -226,9 +217,12 @@ bnx2x_dev_start(struct rte_eth_dev *dev)
3355 PMD_INIT_FUNC_TRACE(sc);
3356
3357 /* start the periodic callout */
3358- if (atomic_load_acq_long(&sc->periodic_flags) == PERIODIC_STOP) {
3359- bnx2x_periodic_start(dev);
3360- PMD_DRV_LOG(DEBUG, sc, "Periodic poll re-started");
3361+ if (IS_PF(sc)) {
3362+ if (atomic_load_acq_long(&sc->periodic_flags) ==
3363+ PERIODIC_STOP) {
3364+ bnx2x_periodic_start(dev);
3365+ PMD_DRV_LOG(DEBUG, sc, "Periodic poll re-started");
3366+ }
3367 }
3368
3369 ret = bnx2x_init(sc);
3370@@ -266,10 +260,10 @@ bnx2x_dev_stop(struct rte_eth_dev *dev)
3371 rte_intr_disable(&sc->pci_dev->intr_handle);
3372 rte_intr_callback_unregister(&sc->pci_dev->intr_handle,
3373 bnx2x_interrupt_handler, (void *)dev);
3374- }
3375
3376- /* stop the periodic callout */
3377- bnx2x_periodic_stop(dev);
3378+ /* stop the periodic callout */
3379+ bnx2x_periodic_stop(dev);
3380+ }
3381
3382 ret = bnx2x_nic_unload(sc, UNLOAD_NORMAL, FALSE);
3383 if (ret) {
3384@@ -293,9 +287,6 @@ bnx2x_dev_close(struct rte_eth_dev *dev)
3385 bnx2x_dev_clear_queues(dev);
3386 memset(&(dev->data->dev_link), 0 , sizeof(struct rte_eth_link));
3387
3388- /* free the host hardware/software hsi structures */
3389- bnx2x_free_hsi_mem(sc);
3390-
3391 /* free ilt */
3392 bnx2x_free_ilt_mem(sc);
3393 }
3394@@ -491,6 +482,7 @@ static void
3395 bnx2x_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
3396 {
3397 struct bnx2x_softc *sc = dev->data->dev_private;
3398+
3399 dev_info->max_rx_queues = sc->max_rx_queues;
3400 dev_info->max_tx_queues = sc->max_tx_queues;
3401 dev_info->min_rx_bufsize = BNX2X_MIN_RX_BUF_SIZE;
3402@@ -498,6 +490,10 @@ bnx2x_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
3403 dev_info->max_mac_addrs = BNX2X_MAX_MAC_ADDRS;
3404 dev_info->speed_capa = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_20G;
3405 dev_info->rx_offload_capa = DEV_RX_OFFLOAD_JUMBO_FRAME;
3406+
3407+ dev_info->rx_desc_lim.nb_max = MAX_RX_AVAIL;
3408+ dev_info->rx_desc_lim.nb_min = MIN_RX_SIZE_NONTPA;
3409+ dev_info->tx_desc_lim.nb_max = MAX_TX_AVAIL;
3410 }
3411
3412 static int
3413@@ -686,7 +682,9 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
3414 return 0;
3415
3416 out:
3417- bnx2x_periodic_stop(eth_dev);
3418+ if (IS_PF(sc))
3419+ bnx2x_periodic_stop(eth_dev);
3420+
3421 return ret;
3422 }
3423
3424@@ -706,6 +704,13 @@ eth_bnx2xvf_dev_init(struct rte_eth_dev *eth_dev)
3425 return bnx2x_common_dev_init(eth_dev, 1);
3426 }
3427
3428+static int eth_bnx2x_dev_uninit(struct rte_eth_dev *eth_dev)
3429+{
3430+ /* mac_addrs must not be freed alone because part of dev_private */
3431+ eth_dev->data->mac_addrs = NULL;
3432+ return 0;
3433+}
3434+
3435 static struct rte_pci_driver rte_bnx2x_pmd;
3436 static struct rte_pci_driver rte_bnx2xvf_pmd;
3437
3438@@ -724,7 +729,7 @@ static int eth_bnx2x_pci_probe(struct rte_pci_driver *pci_drv,
3439
3440 static int eth_bnx2x_pci_remove(struct rte_pci_device *pci_dev)
3441 {
3442- return rte_eth_dev_pci_generic_remove(pci_dev, NULL);
3443+ return rte_eth_dev_pci_generic_remove(pci_dev, eth_bnx2x_dev_uninit);
3444 }
3445
3446 static struct rte_pci_driver rte_bnx2x_pmd = {
3447diff --git a/drivers/net/bnx2x/bnx2x_vfpf.c b/drivers/net/bnx2x/bnx2x_vfpf.c
3448index 048bf12..6d966ff 100644
3449--- a/drivers/net/bnx2x/bnx2x_vfpf.c
3450+++ b/drivers/net/bnx2x/bnx2x_vfpf.c
3451@@ -162,20 +162,26 @@ static inline uint16_t bnx2x_check_me_flags(uint32_t val)
3452 #define BNX2X_ME_ANSWER_DELAY 100
3453 #define BNX2X_ME_ANSWER_TRIES 10
3454
3455-static inline int bnx2x_read_vf_id(struct bnx2x_softc *sc)
3456+static inline int bnx2x_read_vf_id(struct bnx2x_softc *sc, uint32_t *vf_id)
3457 {
3458 uint32_t val;
3459 uint8_t i = 0;
3460
3461 while (i <= BNX2X_ME_ANSWER_TRIES) {
3462 val = BNX2X_DB_READ(DOORBELL_ADDR(sc, 0));
3463- if (bnx2x_check_me_flags(val))
3464- return VF_ID(val);
3465+ if (bnx2x_check_me_flags(val)) {
3466+ PMD_DRV_LOG(DEBUG, sc,
3467+ "valid register value: 0x%08x", val);
3468+ *vf_id = VF_ID(val);
3469+ return 0;
3470+ }
3471
3472 DELAY_MS(BNX2X_ME_ANSWER_DELAY);
3473 i++;
3474 }
3475
3476+ PMD_DRV_LOG(ERR, sc, "Invalid register value: 0x%08x", val);
3477+
3478 return -EINVAL;
3479 }
3480
3481@@ -240,14 +246,13 @@ int bnx2x_loop_obtain_resources(struct bnx2x_softc *sc)
3482 int bnx2x_vf_get_resources(struct bnx2x_softc *sc, uint8_t tx_count, uint8_t rx_count)
3483 {
3484 struct vf_acquire_tlv *acq = &sc->vf2pf_mbox->query[0].acquire;
3485- int vf_id;
3486+ uint32_t vf_id;
3487 int rc;
3488
3489 bnx2x_vf_close(sc);
3490 bnx2x_vf_prep(sc, &acq->first_tlv, BNX2X_VF_TLV_ACQUIRE, sizeof(*acq));
3491
3492- vf_id = bnx2x_read_vf_id(sc);
3493- if (vf_id < 0) {
3494+ if (bnx2x_read_vf_id(sc, &vf_id)) {
3495 rc = -EAGAIN;
3496 goto out;
3497 }
3498@@ -318,25 +323,30 @@ bnx2x_vf_close(struct bnx2x_softc *sc)
3499 {
3500 struct vf_release_tlv *query;
3501 struct vf_common_reply_tlv *reply = &sc->vf2pf_mbox->resp.common_reply;
3502- int vf_id = bnx2x_read_vf_id(sc);
3503+ uint32_t vf_id;
3504 int rc;
3505
3506- if (vf_id >= 0) {
3507- query = &sc->vf2pf_mbox->query[0].release;
3508- bnx2x_vf_prep(sc, &query->first_tlv, BNX2X_VF_TLV_RELEASE,
3509- sizeof(*query));
3510+ query = &sc->vf2pf_mbox->query[0].release;
3511+ bnx2x_vf_prep(sc, &query->first_tlv, BNX2X_VF_TLV_RELEASE,
3512+ sizeof(*query));
3513
3514- query->vf_id = vf_id;
3515- bnx2x_add_tlv(sc, query, query->first_tlv.tl.length,
3516- BNX2X_VF_TLV_LIST_END,
3517- sizeof(struct channel_list_end_tlv));
3518+ if (bnx2x_read_vf_id(sc, &vf_id)) {
3519+ rc = -EAGAIN;
3520+ goto out;
3521+ }
3522
3523- rc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);
3524- if (rc || reply->status != BNX2X_VF_STATUS_SUCCESS)
3525- PMD_DRV_LOG(ERR, sc, "Failed to release VF");
3526+ query->vf_id = vf_id;
3527
3528- bnx2x_vf_finalize(sc, &query->first_tlv);
3529- }
3530+ bnx2x_add_tlv(sc, query, query->first_tlv.tl.length,
3531+ BNX2X_VF_TLV_LIST_END,
3532+ sizeof(struct channel_list_end_tlv));
3533+
3534+ rc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);
3535+ if (rc || reply->status != BNX2X_VF_STATUS_SUCCESS)
3536+ PMD_DRV_LOG(ERR, sc, "Failed to release VF");
3537+
3538+out:
3539+ bnx2x_vf_finalize(sc, &query->first_tlv);
3540 }
3541
3542 /* Let PF know the VF status blocks phys_addrs */
3543@@ -347,6 +357,8 @@ bnx2x_vf_init(struct bnx2x_softc *sc)
3544 struct vf_common_reply_tlv *reply = &sc->vf2pf_mbox->resp.common_reply;
3545 int i, rc;
3546
3547+ PMD_INIT_FUNC_TRACE(sc);
3548+
3549 query = &sc->vf2pf_mbox->query[0].init;
3550 bnx2x_vf_prep(sc, &query->first_tlv, BNX2X_VF_TLV_INIT,
3551 sizeof(*query));
3552@@ -383,51 +395,38 @@ bnx2x_vf_unload(struct bnx2x_softc *sc)
3553 {
3554 struct vf_close_tlv *query;
3555 struct vf_common_reply_tlv *reply = &sc->vf2pf_mbox->resp.common_reply;
3556- struct vf_q_op_tlv *query_op;
3557- int i, vf_id, rc;
3558-
3559- vf_id = bnx2x_read_vf_id(sc);
3560- if (vf_id > 0) {
3561- FOR_EACH_QUEUE(sc, i) {
3562- query_op = &sc->vf2pf_mbox->query[0].q_op;
3563- bnx2x_vf_prep(sc, &query_op->first_tlv,
3564- BNX2X_VF_TLV_TEARDOWN_Q,
3565- sizeof(*query_op));
3566-
3567- query_op->vf_qid = i;
3568+ uint32_t vf_id;
3569+ int i, rc;
3570
3571- bnx2x_add_tlv(sc, query_op,
3572- query_op->first_tlv.tl.length,
3573- BNX2X_VF_TLV_LIST_END,
3574- sizeof(struct channel_list_end_tlv));
3575+ PMD_INIT_FUNC_TRACE(sc);
3576
3577- rc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);
3578- if (rc || reply->status != BNX2X_VF_STATUS_SUCCESS)
3579- PMD_DRV_LOG(ERR, sc,
3580- "Bad reply for vf_q %d teardown", i);
3581+ FOR_EACH_QUEUE(sc, i)
3582+ bnx2x_vf_teardown_queue(sc, i);
3583
3584- bnx2x_vf_finalize(sc, &query_op->first_tlv);
3585- }
3586+ bnx2x_vf_set_mac(sc, false);
3587
3588- bnx2x_vf_set_mac(sc, false);
3589+ query = &sc->vf2pf_mbox->query[0].close;
3590+ bnx2x_vf_prep(sc, &query->first_tlv, BNX2X_VF_TLV_CLOSE,
3591+ sizeof(*query));
3592
3593- query = &sc->vf2pf_mbox->query[0].close;
3594- bnx2x_vf_prep(sc, &query->first_tlv, BNX2X_VF_TLV_CLOSE,
3595- sizeof(*query));
3596+ if (bnx2x_read_vf_id(sc, &vf_id)) {
3597+ rc = -EAGAIN;
3598+ goto out;
3599+ }
3600
3601- query->vf_id = vf_id;
3602+ query->vf_id = vf_id;
3603
3604- bnx2x_add_tlv(sc, query, query->first_tlv.tl.length,
3605- BNX2X_VF_TLV_LIST_END,
3606- sizeof(struct channel_list_end_tlv));
3607+ bnx2x_add_tlv(sc, query, query->first_tlv.tl.length,
3608+ BNX2X_VF_TLV_LIST_END,
3609+ sizeof(struct channel_list_end_tlv));
3610
3611- rc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);
3612- if (rc || reply->status != BNX2X_VF_STATUS_SUCCESS)
3613- PMD_DRV_LOG(ERR, sc,
3614- "Bad reply from PF for close message");
3615+ rc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);
3616+ if (rc || reply->status != BNX2X_VF_STATUS_SUCCESS)
3617+ PMD_DRV_LOG(ERR, sc,
3618+ "Bad reply from PF for close message");
3619
3620- bnx2x_vf_finalize(sc, &query->first_tlv);
3621- }
3622+out:
3623+ bnx2x_vf_finalize(sc, &query->first_tlv);
3624 }
3625
3626 static inline uint16_t
3627@@ -522,6 +521,35 @@ out:
3628 }
3629
3630 int
3631+bnx2x_vf_teardown_queue(struct bnx2x_softc *sc, int qid)
3632+{
3633+ struct vf_q_op_tlv *query_op;
3634+ struct vf_common_reply_tlv *reply = &sc->vf2pf_mbox->resp.common_reply;
3635+ int rc;
3636+
3637+ query_op = &sc->vf2pf_mbox->query[0].q_op;
3638+ bnx2x_vf_prep(sc, &query_op->first_tlv,
3639+ BNX2X_VF_TLV_TEARDOWN_Q,
3640+ sizeof(*query_op));
3641+
3642+ query_op->vf_qid = qid;
3643+
3644+ bnx2x_add_tlv(sc, query_op,
3645+ query_op->first_tlv.tl.length,
3646+ BNX2X_VF_TLV_LIST_END,
3647+ sizeof(struct channel_list_end_tlv));
3648+
3649+ rc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);
3650+ if (rc || reply->status != BNX2X_VF_STATUS_SUCCESS)
3651+ PMD_DRV_LOG(ERR, sc,
3652+ "Bad reply for vf_q %d teardown", qid);
3653+
3654+ bnx2x_vf_finalize(sc, &query_op->first_tlv);
3655+
3656+ return rc;
3657+}
3658+
3659+int
3660 bnx2x_vf_set_mac(struct bnx2x_softc *sc, int set)
3661 {
3662 struct vf_set_q_filters_tlv *query;
3663diff --git a/drivers/net/bnx2x/bnx2x_vfpf.h b/drivers/net/bnx2x/bnx2x_vfpf.h
3664index cc6fef9..0030e19 100644
3665--- a/drivers/net/bnx2x/bnx2x_vfpf.h
3666+++ b/drivers/net/bnx2x/bnx2x_vfpf.h
3667@@ -328,6 +328,7 @@ struct bnx2x_vf_mbx_msg {
3668 union resp_tlvs resp;
3669 };
3670
3671+int bnx2x_vf_teardown_queue(struct bnx2x_softc *sc, int qid);
3672 int bnx2x_vf_set_mac(struct bnx2x_softc *sc, int set);
3673 int bnx2x_vf_config_rss(struct bnx2x_softc *sc, struct ecore_config_rss_params *params);
3674
3675diff --git a/drivers/net/bnx2x/ecore_sp.c b/drivers/net/bnx2x/ecore_sp.c
3676index 4319409..5ac22e7 100644
3677--- a/drivers/net/bnx2x/ecore_sp.c
3678+++ b/drivers/net/bnx2x/ecore_sp.c
3679@@ -291,10 +291,6 @@ static int ecore_state_wait(struct bnx2x_softc *sc, int state,
3680 cnt *= 20;
3681
3682 ECORE_MSG(sc, "waiting for state to become %d", state);
3683- /* being over protective to remind bnx2x_intr_legacy() to
3684- * process RAMROD
3685- */
3686- rte_atomic32_set(&sc->scan_fp, 1);
3687
3688 ECORE_MIGHT_SLEEP();
3689 while (cnt--) {
3690diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
3691index 5535c37..0ef5afc 100644
3692--- a/drivers/net/bnxt/bnxt.h
3693+++ b/drivers/net/bnxt/bnxt.h
3694@@ -332,6 +332,7 @@ struct bnxt {
3695 uint16_t max_tx_rings;
3696 uint16_t max_rx_rings;
3697 uint16_t max_l2_ctx;
3698+ uint16_t max_rx_em_flows;
3699 uint16_t max_vnics;
3700 uint16_t max_stat_ctx;
3701 uint16_t vlan;
3702diff --git a/drivers/net/bnxt/bnxt_cpr.h b/drivers/net/bnxt/bnxt_cpr.h
3703index c7af569..ee5ca82 100644
3704--- a/drivers/net/bnxt/bnxt_cpr.h
3705+++ b/drivers/net/bnxt/bnxt_cpr.h
3706@@ -10,11 +10,12 @@
3707 #include <rte_io.h>
3708
3709 #define CMP_VALID(cmp, raw_cons, ring) \
3710- (!!(((struct cmpl_base *)(cmp))->info3_v & CMPL_BASE_V) == \
3711- !((raw_cons) & ((ring)->ring_size)))
3712+ (!!(rte_le_to_cpu_32(((struct cmpl_base *)(cmp))->info3_v) & \
3713+ CMPL_BASE_V) == !((raw_cons) & ((ring)->ring_size)))
3714
3715 #define CMPL_VALID(cmp, v) \
3716- (!!(((struct cmpl_base *)(cmp))->info3_v & CMPL_BASE_V) == !(v))
3717+ (!!(rte_le_to_cpu_32(((struct cmpl_base *)(cmp))->info3_v) & \
3718+ CMPL_BASE_V) == !(v))
3719
3720 #define CMP_TYPE(cmp) \
3721 (((struct cmpl_base *)cmp)->type & CMPL_BASE_TYPE_MASK)
3722@@ -31,7 +32,7 @@
3723
3724 #define NEXT_CMPL(cpr, idx, v, inc) do { \
3725 (idx) += (inc); \
3726- if (unlikely((idx) == (cpr)->cp_ring_struct->ring_size)) { \
3727+ if (unlikely((idx) >= (cpr)->cp_ring_struct->ring_size)) { \
3728 (v) = !(v); \
3729 (idx) = 0; \
3730 } \
3731diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
3732index e26b9e3..2f3e067 100644
3733--- a/drivers/net/bnxt/bnxt_ethdev.c
3734+++ b/drivers/net/bnxt/bnxt_ethdev.c
3735@@ -211,9 +211,6 @@ static int bnxt_init_chip(struct bnxt *bp)
3736 unsigned int i, j;
3737 int rc;
3738
3739- /* disable uio/vfio intr/eventfd mapping */
3740- rte_intr_disable(intr_handle);
3741-
3742 if (bp->eth_dev->data->mtu > ETHER_MTU) {
3743 bp->eth_dev->data->dev_conf.rxmode.offloads |=
3744 DEV_RX_OFFLOAD_JUMBO_FRAME;
3745@@ -354,8 +351,9 @@ static int bnxt_init_chip(struct bnxt *bp)
3746 bp->rx_cp_nr_rings);
3747 return -ENOTSUP;
3748 }
3749- if (rte_intr_efd_enable(intr_handle, intr_vector))
3750- return -1;
3751+ rc = rte_intr_efd_enable(intr_handle, intr_vector);
3752+ if (rc)
3753+ return rc;
3754 }
3755
3756 if (rte_intr_dp_is_en(intr_handle) && !intr_handle->intr_vec) {
3757@@ -366,28 +364,31 @@ static int bnxt_init_chip(struct bnxt *bp)
3758 if (intr_handle->intr_vec == NULL) {
3759 PMD_DRV_LOG(ERR, "Failed to allocate %d rx_queues"
3760 " intr_vec", bp->eth_dev->data->nb_rx_queues);
3761- return -ENOMEM;
3762+ rc = -ENOMEM;
3763+ goto err_disable;
3764 }
3765 PMD_DRV_LOG(DEBUG, "intr_handle->intr_vec = %p "
3766 "intr_handle->nb_efd = %d intr_handle->max_intr = %d\n",
3767 intr_handle->intr_vec, intr_handle->nb_efd,
3768 intr_handle->max_intr);
3769- }
3770-
3771- for (queue_id = 0; queue_id < bp->eth_dev->data->nb_rx_queues;
3772- queue_id++) {
3773- intr_handle->intr_vec[queue_id] = vec;
3774- if (vec < base + intr_handle->nb_efd - 1)
3775- vec++;
3776+ for (queue_id = 0; queue_id < bp->eth_dev->data->nb_rx_queues;
3777+ queue_id++) {
3778+ intr_handle->intr_vec[queue_id] =
3779+ vec + BNXT_RX_VEC_START;
3780+ if (vec < base + intr_handle->nb_efd - 1)
3781+ vec++;
3782+ }
3783 }
3784
3785 /* enable uio/vfio intr/eventfd mapping */
3786- rte_intr_enable(intr_handle);
3787+ rc = rte_intr_enable(intr_handle);
3788+ if (rc)
3789+ goto err_free;
3790
3791 rc = bnxt_get_hwrm_link_config(bp, &new);
3792 if (rc) {
3793 PMD_DRV_LOG(ERR, "HWRM Get link config failure rc: %x\n", rc);
3794- goto err_out;
3795+ goto err_free;
3796 }
3797
3798 if (!bp->link_info.link_up) {
3799@@ -395,16 +396,18 @@ static int bnxt_init_chip(struct bnxt *bp)
3800 if (rc) {
3801 PMD_DRV_LOG(ERR,
3802 "HWRM link config failure rc: %x\n", rc);
3803- goto err_out;
3804+ goto err_free;
3805 }
3806 }
3807 bnxt_print_link_info(bp->eth_dev);
3808
3809 return 0;
3810
3811+err_free:
3812+ rte_free(intr_handle->intr_vec);
3813+err_disable:
3814+ rte_intr_efd_disable(intr_handle);
3815 err_out:
3816- bnxt_free_all_hwrm_resources(bp);
3817-
3818 /* Some of the error status returned by FW may not be from errno.h */
3819 if (rc > 0)
3820 rc = -EIO;
3821@@ -441,7 +444,7 @@ static int bnxt_init_nic(struct bnxt *bp)
3822 static void bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
3823 struct rte_eth_dev_info *dev_info)
3824 {
3825- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
3826+ struct bnxt *bp = eth_dev->data->dev_private;
3827 uint16_t max_vnics, i, j, vpool, vrxq;
3828 unsigned int max_rx_rings;
3829
3830@@ -452,7 +455,7 @@ static void bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
3831 /* PF/VF specifics */
3832 if (BNXT_PF(bp))
3833 dev_info->max_vfs = bp->pdev->max_vfs;
3834- max_rx_rings = RTE_MIN(bp->max_vnics, bp->max_stat_ctx);
3835+ max_rx_rings = RTE_MIN(bp->max_rx_rings, bp->max_stat_ctx);
3836 /* For the sake of symmetry, max_rx_queues = max_tx_queues */
3837 dev_info->max_rx_queues = max_rx_rings;
3838 dev_info->max_tx_queues = max_rx_rings;
3839@@ -537,7 +540,7 @@ found:
3840 /* Configure the device based on the configuration provided */
3841 static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
3842 {
3843- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
3844+ struct bnxt *bp = eth_dev->data->dev_private;
3845 uint64_t rx_offloads = eth_dev->data->dev_conf.rxmode.offloads;
3846 int rc;
3847
3848@@ -618,15 +621,9 @@ static void bnxt_print_link_info(struct rte_eth_dev *eth_dev)
3849 eth_dev->data->port_id);
3850 }
3851
3852-static int bnxt_dev_lsc_intr_setup(struct rte_eth_dev *eth_dev)
3853-{
3854- bnxt_print_link_info(eth_dev);
3855- return 0;
3856-}
3857-
3858 static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
3859 {
3860- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
3861+ struct bnxt *bp = eth_dev->data->dev_private;
3862 uint64_t rx_offloads = eth_dev->data->dev_conf.rxmode.offloads;
3863 int vlan_mask = 0;
3864 int rc;
3865@@ -636,7 +633,6 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
3866 "RxQ cnt %d > CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS %d\n",
3867 bp->rx_cp_nr_rings, RTE_ETHDEV_QUEUE_STAT_CNTRS);
3868 }
3869- bp->dev_stopped = 0;
3870
3871 rc = bnxt_init_chip(bp);
3872 if (rc)
3873@@ -652,7 +648,9 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
3874 if (rc)
3875 goto error;
3876
3877+ bnxt_enable_int(bp);
3878 bp->flags |= BNXT_FLAG_INIT_DONE;
3879+ bp->dev_stopped = 0;
3880 return 0;
3881
3882 error:
3883@@ -664,7 +662,7 @@ error:
3884
3885 static int bnxt_dev_set_link_up_op(struct rte_eth_dev *eth_dev)
3886 {
3887- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
3888+ struct bnxt *bp = eth_dev->data->dev_private;
3889 int rc = 0;
3890
3891 if (!bp->link_info.link_up)
3892@@ -678,7 +676,7 @@ static int bnxt_dev_set_link_up_op(struct rte_eth_dev *eth_dev)
3893
3894 static int bnxt_dev_set_link_down_op(struct rte_eth_dev *eth_dev)
3895 {
3896- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
3897+ struct bnxt *bp = eth_dev->data->dev_private;
3898
3899 eth_dev->data->dev_link.link_status = 0;
3900 bnxt_set_hwrm_link_config(bp, false);
3901@@ -690,7 +688,14 @@ static int bnxt_dev_set_link_down_op(struct rte_eth_dev *eth_dev)
3902 /* Unload the driver, release resources */
3903 static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
3904 {
3905- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
3906+ struct bnxt *bp = eth_dev->data->dev_private;
3907+ struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
3908+ struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
3909+
3910+ bnxt_disable_int(bp);
3911+
3912+ /* disable uio/vfio intr/eventfd mapping */
3913+ rte_intr_disable(intr_handle);
3914
3915 bp->flags &= ~BNXT_FLAG_INIT_DONE;
3916 if (bp->eth_dev->data->dev_started) {
3917@@ -698,6 +703,14 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
3918 eth_dev->data->dev_link.link_status = 0;
3919 }
3920 bnxt_set_hwrm_link_config(bp, false);
3921+
3922+ /* Clean queue intr-vector mapping */
3923+ rte_intr_efd_disable(intr_handle);
3924+ if (intr_handle->intr_vec != NULL) {
3925+ rte_free(intr_handle->intr_vec);
3926+ intr_handle->intr_vec = NULL;
3927+ }
3928+
3929 bnxt_hwrm_port_clr_stats(bp);
3930 bnxt_free_tx_mbufs(bp);
3931 bnxt_free_rx_mbufs(bp);
3932@@ -707,7 +720,7 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
3933
3934 static void bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
3935 {
3936- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
3937+ struct bnxt *bp = eth_dev->data->dev_private;
3938
3939 if (bp->dev_stopped == 0)
3940 bnxt_dev_stop_op(eth_dev);
3941@@ -727,7 +740,7 @@ static void bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
3942 static void bnxt_mac_addr_remove_op(struct rte_eth_dev *eth_dev,
3943 uint32_t index)
3944 {
3945- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
3946+ struct bnxt *bp = eth_dev->data->dev_private;
3947 uint64_t pool_mask = eth_dev->data->mac_pool_sel[index];
3948 struct bnxt_vnic_info *vnic;
3949 struct bnxt_filter_info *filter, *temp_filter;
3950@@ -763,9 +776,10 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
3951 struct ether_addr *mac_addr,
3952 uint32_t index, uint32_t pool)
3953 {
3954- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
3955+ struct bnxt *bp = eth_dev->data->dev_private;
3956 struct bnxt_vnic_info *vnic = &bp->vnic_info[pool];
3957 struct bnxt_filter_info *filter;
3958+ int rc = 0;
3959
3960 if (BNXT_VF(bp) & !BNXT_VF_IS_TRUSTED(bp)) {
3961 PMD_DRV_LOG(ERR, "Cannot add MAC address to a VF interface\n");
3962@@ -789,16 +803,26 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
3963 PMD_DRV_LOG(ERR, "L2 filter alloc failed\n");
3964 return -ENODEV;
3965 }
3966- STAILQ_INSERT_TAIL(&vnic->filter, filter, next);
3967+
3968 filter->mac_index = index;
3969 memcpy(filter->l2_addr, mac_addr, ETHER_ADDR_LEN);
3970- return bnxt_hwrm_set_l2_filter(bp, vnic->fw_vnic_id, filter);
3971+
3972+ rc = bnxt_hwrm_set_l2_filter(bp, vnic->fw_vnic_id, filter);
3973+ if (!rc) {
3974+ STAILQ_INSERT_TAIL(&vnic->filter, filter, next);
3975+ } else {
3976+ filter->mac_index = INVALID_MAC_INDEX;
3977+ memset(&filter->l2_addr, 0, ETHER_ADDR_LEN);
3978+ bnxt_free_filter(bp, filter);
3979+ }
3980+
3981+ return rc;
3982 }
3983
3984 int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
3985 {
3986 int rc = 0;
3987- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
3988+ struct bnxt *bp = eth_dev->data->dev_private;
3989 struct rte_eth_link new;
3990 unsigned int cnt = BNXT_LINK_WAIT_CNT;
3991
3992@@ -813,11 +837,12 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
3993 "Failed to retrieve link rc = 0x%x!\n", rc);
3994 goto out;
3995 }
3996- rte_delay_ms(BNXT_LINK_WAIT_INTERVAL);
3997
3998- if (!wait_to_complete)
3999+ if (!wait_to_complete || new.link_status)
4000 break;
4001- } while (!new.link_status && cnt--);
4002+
4003+ rte_delay_ms(BNXT_LINK_WAIT_INTERVAL);
4004+ } while (cnt--);
4005
4006 out:
4007 /* Timed out or success */
4008@@ -838,7 +863,7 @@ out:
4009
4010 static void bnxt_promiscuous_enable_op(struct rte_eth_dev *eth_dev)
4011 {
4012- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
4013+ struct bnxt *bp = eth_dev->data->dev_private;
4014 struct bnxt_vnic_info *vnic;
4015
4016 if (bp->vnic_info == NULL)
4017@@ -852,7 +877,7 @@ static void bnxt_promiscuous_enable_op(struct rte_eth_dev *eth_dev)
4018
4019 static void bnxt_promiscuous_disable_op(struct rte_eth_dev *eth_dev)
4020 {
4021- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
4022+ struct bnxt *bp = eth_dev->data->dev_private;
4023 struct bnxt_vnic_info *vnic;
4024
4025 if (bp->vnic_info == NULL)
4026@@ -866,7 +891,7 @@ static void bnxt_promiscuous_disable_op(struct rte_eth_dev *eth_dev)
4027
4028 static void bnxt_allmulticast_enable_op(struct rte_eth_dev *eth_dev)
4029 {
4030- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
4031+ struct bnxt *bp = eth_dev->data->dev_private;
4032 struct bnxt_vnic_info *vnic;
4033
4034 if (bp->vnic_info == NULL)
4035@@ -880,7 +905,7 @@ static void bnxt_allmulticast_enable_op(struct rte_eth_dev *eth_dev)
4036
4037 static void bnxt_allmulticast_disable_op(struct rte_eth_dev *eth_dev)
4038 {
4039- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
4040+ struct bnxt *bp = eth_dev->data->dev_private;
4041 struct bnxt_vnic_info *vnic;
4042
4043 if (bp->vnic_info == NULL)
4044@@ -892,30 +917,72 @@ static void bnxt_allmulticast_disable_op(struct rte_eth_dev *eth_dev)
4045 bnxt_hwrm_cfa_l2_set_rx_mask(bp, vnic, 0, NULL);
4046 }
4047
4048+/* Return bnxt_rx_queue pointer corresponding to a given rxq. */
4049+static struct bnxt_rx_queue *bnxt_qid_to_rxq(struct bnxt *bp, uint16_t qid)
4050+{
4051+ if (qid >= bp->rx_nr_rings)
4052+ return NULL;
4053+
4054+ return bp->eth_dev->data->rx_queues[qid];
4055+}
4056+
4057+/* Return rxq corresponding to a given rss table ring/group ID. */
4058+static uint16_t bnxt_rss_to_qid(struct bnxt *bp, uint16_t fwr)
4059+{
4060+ unsigned int i;
4061+
4062+ for (i = 0; i < bp->rx_nr_rings; i++) {
4063+ if (bp->grp_info[i].fw_grp_id == fwr)
4064+ return i;
4065+ }
4066+
4067+ return INVALID_HW_RING_ID;
4068+}
4069+
4070 static int bnxt_reta_update_op(struct rte_eth_dev *eth_dev,
4071 struct rte_eth_rss_reta_entry64 *reta_conf,
4072 uint16_t reta_size)
4073 {
4074- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
4075+ struct bnxt *bp = eth_dev->data->dev_private;
4076 struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf;
4077- struct bnxt_vnic_info *vnic;
4078+ struct bnxt_vnic_info *vnic = &bp->vnic_info[0];
4079+ uint16_t tbl_size = HW_HASH_INDEX_SIZE;
4080+ uint16_t idx, sft;
4081 int i;
4082
4083+ if (!vnic->rss_table)
4084+ return -EINVAL;
4085+
4086 if (!(dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG))
4087 return -EINVAL;
4088
4089- if (reta_size != HW_HASH_INDEX_SIZE) {
4090+ if (reta_size != tbl_size) {
4091 PMD_DRV_LOG(ERR, "The configured hash table lookup size "
4092 "(%d) must equal the size supported by the hardware "
4093- "(%d)\n", reta_size, HW_HASH_INDEX_SIZE);
4094+ "(%d)\n", reta_size, tbl_size);
4095 return -EINVAL;
4096 }
4097- /* Update the RSS VNIC(s) */
4098- for (i = 0; i < bp->max_vnics; i++) {
4099- vnic = &bp->vnic_info[i];
4100- memcpy(vnic->rss_table, reta_conf, reta_size);
4101- bnxt_hwrm_vnic_rss_cfg(bp, vnic);
4102+
4103+ for (i = 0; i < reta_size; i++) {
4104+ struct bnxt_rx_queue *rxq;
4105+
4106+ idx = i / RTE_RETA_GROUP_SIZE;
4107+ sft = i % RTE_RETA_GROUP_SIZE;
4108+
4109+ if (!(reta_conf[idx].mask & (1ULL << sft)))
4110+ continue;
4111+
4112+ rxq = bnxt_qid_to_rxq(bp, reta_conf[idx].reta[sft]);
4113+ if (!rxq) {
4114+ PMD_DRV_LOG(ERR, "Invalid ring in reta_conf.\n");
4115+ return -EINVAL;
4116+ }
4117+
4118+ vnic->rss_table[i] =
4119+ vnic->fw_grp_ids[reta_conf[idx].reta[sft]];
4120 }
4121+
4122+ bnxt_hwrm_vnic_rss_cfg(bp, vnic);
4123 return 0;
4124 }
4125
4126@@ -923,10 +990,10 @@ static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev,
4127 struct rte_eth_rss_reta_entry64 *reta_conf,
4128 uint16_t reta_size)
4129 {
4130- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
4131+ struct bnxt *bp = eth_dev->data->dev_private;
4132 struct bnxt_vnic_info *vnic = &bp->vnic_info[0];
4133- struct rte_intr_handle *intr_handle
4134- = &bp->pdev->intr_handle;
4135+ uint16_t tbl_size = HW_HASH_INDEX_SIZE;
4136+ uint16_t idx, sft, i;
4137
4138 /* Retrieve from the default VNIC */
4139 if (!vnic)
4140@@ -934,18 +1001,28 @@ static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev,
4141 if (!vnic->rss_table)
4142 return -EINVAL;
4143
4144- if (reta_size != HW_HASH_INDEX_SIZE) {
4145+ if (reta_size != tbl_size) {
4146 PMD_DRV_LOG(ERR, "The configured hash table lookup size "
4147 "(%d) must equal the size supported by the hardware "
4148- "(%d)\n", reta_size, HW_HASH_INDEX_SIZE);
4149+ "(%d)\n", reta_size, tbl_size);
4150 return -EINVAL;
4151 }
4152- /* EW - need to revisit here copying from uint64_t to uint16_t */
4153- memcpy(reta_conf, vnic->rss_table, reta_size);
4154
4155- if (rte_intr_allow_others(intr_handle)) {
4156- if (eth_dev->data->dev_conf.intr_conf.lsc != 0)
4157- bnxt_dev_lsc_intr_setup(eth_dev);
4158+ for (idx = 0, i = 0; i < reta_size; i++) {
4159+ idx = i / RTE_RETA_GROUP_SIZE;
4160+ sft = i % RTE_RETA_GROUP_SIZE;
4161+
4162+ if (reta_conf[idx].mask & (1ULL << sft)) {
4163+ uint16_t qid;
4164+
4165+ qid = bnxt_rss_to_qid(bp, vnic->rss_table[i]);
4166+
4167+ if (qid == INVALID_HW_RING_ID) {
4168+ PMD_DRV_LOG(ERR, "Inv. entry in rss table.\n");
4169+ return -EINVAL;
4170+ }
4171+ reta_conf[idx].reta[sft] = qid;
4172+ }
4173 }
4174
4175 return 0;
4176@@ -954,7 +1031,7 @@ static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev,
4177 static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
4178 struct rte_eth_rss_conf *rss_conf)
4179 {
4180- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
4181+ struct bnxt *bp = eth_dev->data->dev_private;
4182 struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf;
4183 struct bnxt_vnic_info *vnic;
4184 uint16_t hash_type = 0;
4185@@ -1010,7 +1087,7 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
4186 static int bnxt_rss_hash_conf_get_op(struct rte_eth_dev *eth_dev,
4187 struct rte_eth_rss_conf *rss_conf)
4188 {
4189- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
4190+ struct bnxt *bp = eth_dev->data->dev_private;
4191 struct bnxt_vnic_info *vnic = &bp->vnic_info[0];
4192 int len;
4193 uint32_t hash_types;
4194@@ -1068,7 +1145,7 @@ static int bnxt_rss_hash_conf_get_op(struct rte_eth_dev *eth_dev,
4195 static int bnxt_flow_ctrl_get_op(struct rte_eth_dev *dev,
4196 struct rte_eth_fc_conf *fc_conf)
4197 {
4198- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4199+ struct bnxt *bp = dev->data->dev_private;
4200 struct rte_eth_link link_info;
4201 int rc;
4202
4203@@ -1100,7 +1177,7 @@ static int bnxt_flow_ctrl_get_op(struct rte_eth_dev *dev,
4204 static int bnxt_flow_ctrl_set_op(struct rte_eth_dev *dev,
4205 struct rte_eth_fc_conf *fc_conf)
4206 {
4207- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4208+ struct bnxt *bp = dev->data->dev_private;
4209
4210 if (!BNXT_SINGLE_PF(bp) || BNXT_VF(bp)) {
4211 PMD_DRV_LOG(ERR, "Flow Control Settings cannot be modified\n");
4212@@ -1156,7 +1233,7 @@ static int
4213 bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
4214 struct rte_eth_udp_tunnel *udp_tunnel)
4215 {
4216- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
4217+ struct bnxt *bp = eth_dev->data->dev_private;
4218 uint16_t tunnel_type = 0;
4219 int rc = 0;
4220
4221@@ -1204,7 +1281,7 @@ static int
4222 bnxt_udp_tunnel_port_del_op(struct rte_eth_dev *eth_dev,
4223 struct rte_eth_udp_tunnel *udp_tunnel)
4224 {
4225- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
4226+ struct bnxt *bp = eth_dev->data->dev_private;
4227 uint16_t tunnel_type = 0;
4228 uint16_t port = 0;
4229 int rc = 0;
4230@@ -1404,7 +1481,7 @@ exit:
4231 static int bnxt_vlan_filter_set_op(struct rte_eth_dev *eth_dev,
4232 uint16_t vlan_id, int on)
4233 {
4234- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
4235+ struct bnxt *bp = eth_dev->data->dev_private;
4236
4237 /* These operations apply to ALL existing MAC/VLAN filters */
4238 if (on)
4239@@ -1416,7 +1493,7 @@ static int bnxt_vlan_filter_set_op(struct rte_eth_dev *eth_dev,
4240 static int
4241 bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask)
4242 {
4243- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4244+ struct bnxt *bp = dev->data->dev_private;
4245 uint64_t rx_offloads = dev->data->dev_conf.rxmode.offloads;
4246 unsigned int i;
4247
4248@@ -1453,7 +1530,7 @@ bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask)
4249 static int
4250 bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev, struct ether_addr *addr)
4251 {
4252- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4253+ struct bnxt *bp = dev->data->dev_private;
4254 /* Default Filter is tied to VNIC 0 */
4255 struct bnxt_vnic_info *vnic = &bp->vnic_info[0];
4256 struct bnxt_filter_info *filter;
4257@@ -1462,26 +1539,28 @@ bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev, struct ether_addr *addr)
4258 if (BNXT_VF(bp) && !BNXT_VF_IS_TRUSTED(bp))
4259 return -EPERM;
4260
4261- memcpy(bp->mac_addr, addr, sizeof(bp->mac_addr));
4262+ if (is_zero_ether_addr(addr))
4263+ return -EINVAL;
4264
4265 STAILQ_FOREACH(filter, &vnic->filter, next) {
4266 /* Default Filter is at Index 0 */
4267 if (filter->mac_index != 0)
4268 continue;
4269- rc = bnxt_hwrm_clear_l2_filter(bp, filter);
4270- if (rc)
4271- return rc;
4272+
4273 memcpy(filter->l2_addr, bp->mac_addr, ETHER_ADDR_LEN);
4274 memset(filter->l2_addr_mask, 0xff, ETHER_ADDR_LEN);
4275 filter->flags |= HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX;
4276 filter->enables |=
4277 HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR |
4278 HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR_MASK;
4279+
4280 rc = bnxt_hwrm_set_l2_filter(bp, vnic->fw_vnic_id, filter);
4281 if (rc)
4282 return rc;
4283- filter->mac_index = 0;
4284+
4285+ memcpy(bp->mac_addr, addr, ETHER_ADDR_LEN);
4286 PMD_DRV_LOG(DEBUG, "Set MAC addr\n");
4287+ return 0;
4288 }
4289
4290 return 0;
4291@@ -1492,7 +1571,7 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
4292 struct ether_addr *mc_addr_set,
4293 uint32_t nb_mc_addr)
4294 {
4295- struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
4296+ struct bnxt *bp = eth_dev->data->dev_private;
4297 char *mc_addr_list = (char *)mc_addr_set;
4298 struct bnxt_vnic_info *vnic;
4299 uint32_t off = 0, i = 0;
4300@@ -1520,7 +1599,7 @@ allmulti:
4301 static int
4302 bnxt_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
4303 {
4304- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4305+ struct bnxt *bp = dev->data->dev_private;
4306 uint8_t fw_major = (bp->fw_ver >> 24) & 0xff;
4307 uint8_t fw_minor = (bp->fw_ver >> 16) & 0xff;
4308 uint8_t fw_updt = (bp->fw_ver >> 8) & 0xff;
4309@@ -1629,7 +1708,7 @@ static int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
4310 static int
4311 bnxt_vlan_pvid_set_op(struct rte_eth_dev *dev, uint16_t pvid, int on)
4312 {
4313- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4314+ struct bnxt *bp = dev->data->dev_private;
4315 uint16_t vlan = bp->vlan;
4316 int rc;
4317
4318@@ -1649,7 +1728,7 @@ bnxt_vlan_pvid_set_op(struct rte_eth_dev *dev, uint16_t pvid, int on)
4319 static int
4320 bnxt_dev_led_on_op(struct rte_eth_dev *dev)
4321 {
4322- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4323+ struct bnxt *bp = dev->data->dev_private;
4324
4325 return bnxt_hwrm_port_led_cfg(bp, true);
4326 }
4327@@ -1657,7 +1736,7 @@ bnxt_dev_led_on_op(struct rte_eth_dev *dev)
4328 static int
4329 bnxt_dev_led_off_op(struct rte_eth_dev *dev)
4330 {
4331- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4332+ struct bnxt *bp = dev->data->dev_private;
4333
4334 return bnxt_hwrm_port_led_cfg(bp, false);
4335 }
4336@@ -1849,7 +1928,7 @@ bnxt_ethertype_filter(struct rte_eth_dev *dev,
4337 enum rte_filter_op filter_op,
4338 void *arg)
4339 {
4340- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4341+ struct bnxt *bp = dev->data->dev_private;
4342 struct rte_eth_ethertype_filter *efilter =
4343 (struct rte_eth_ethertype_filter *)arg;
4344 struct bnxt_filter_info *bfilter, *filter1;
4345@@ -1892,7 +1971,7 @@ bnxt_ethertype_filter(struct rte_eth_dev *dev,
4346
4347 filter1 = bnxt_get_l2_filter(bp, bfilter, vnic0);
4348 if (filter1 == NULL) {
4349- ret = -1;
4350+ ret = -EINVAL;
4351 goto cleanup;
4352 }
4353 bfilter->enables |=
4354@@ -2086,7 +2165,7 @@ bnxt_cfg_ntuple_filter(struct bnxt *bp,
4355 vnic0 = &bp->vnic_info[0];
4356 filter1 = STAILQ_FIRST(&vnic0->filter);
4357 if (filter1 == NULL) {
4358- ret = -1;
4359+ ret = -EINVAL;
4360 goto free_filter;
4361 }
4362
4363@@ -2153,7 +2232,7 @@ bnxt_ntuple_filter(struct rte_eth_dev *dev,
4364 enum rte_filter_op filter_op,
4365 void *arg)
4366 {
4367- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4368+ struct bnxt *bp = dev->data->dev_private;
4369 int ret;
4370
4371 if (filter_op == RTE_ETH_FILTER_NOP)
4372@@ -2469,7 +2548,7 @@ bnxt_fdir_filter(struct rte_eth_dev *dev,
4373 enum rte_filter_op filter_op,
4374 void *arg)
4375 {
4376- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4377+ struct bnxt *bp = dev->data->dev_private;
4378 struct rte_eth_fdir_filter *fdir = (struct rte_eth_fdir_filter *)arg;
4379 struct bnxt_filter_info *filter, *match;
4380 struct bnxt_vnic_info *vnic, *mvnic;
4381@@ -2755,7 +2834,7 @@ static int
4382 bnxt_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts)
4383 {
4384 uint64_t ns;
4385- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4386+ struct bnxt *bp = dev->data->dev_private;
4387 struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
4388
4389 if (!ptp)
4390@@ -2772,7 +2851,7 @@ static int
4391 bnxt_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts)
4392 {
4393 uint64_t ns, systime_cycles;
4394- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4395+ struct bnxt *bp = dev->data->dev_private;
4396 struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
4397
4398 if (!ptp)
4399@@ -2787,7 +2866,7 @@ bnxt_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts)
4400 static int
4401 bnxt_timesync_enable(struct rte_eth_dev *dev)
4402 {
4403- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4404+ struct bnxt *bp = dev->data->dev_private;
4405 struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
4406 uint32_t shift = 0;
4407
4408@@ -2823,7 +2902,7 @@ bnxt_timesync_enable(struct rte_eth_dev *dev)
4409 static int
4410 bnxt_timesync_disable(struct rte_eth_dev *dev)
4411 {
4412- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4413+ struct bnxt *bp = dev->data->dev_private;
4414 struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
4415
4416 if (!ptp)
4417@@ -2845,7 +2924,7 @@ bnxt_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
4418 struct timespec *timestamp,
4419 uint32_t flags __rte_unused)
4420 {
4421- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4422+ struct bnxt *bp = dev->data->dev_private;
4423 struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
4424 uint64_t rx_tstamp_cycles = 0;
4425 uint64_t ns;
4426@@ -2863,7 +2942,7 @@ static int
4427 bnxt_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
4428 struct timespec *timestamp)
4429 {
4430- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4431+ struct bnxt *bp = dev->data->dev_private;
4432 struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
4433 uint64_t tx_tstamp_cycles = 0;
4434 uint64_t ns;
4435@@ -2881,7 +2960,7 @@ bnxt_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
4436 static int
4437 bnxt_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta)
4438 {
4439- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4440+ struct bnxt *bp = dev->data->dev_private;
4441 struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
4442
4443 if (!ptp)
4444@@ -2895,7 +2974,7 @@ bnxt_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta)
4445 static int
4446 bnxt_get_eeprom_length_op(struct rte_eth_dev *dev)
4447 {
4448- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4449+ struct bnxt *bp = dev->data->dev_private;
4450 int rc;
4451 uint32_t dir_entries;
4452 uint32_t entry_length;
4453@@ -2915,7 +2994,7 @@ static int
4454 bnxt_get_eeprom_op(struct rte_eth_dev *dev,
4455 struct rte_dev_eeprom_info *in_eeprom)
4456 {
4457- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4458+ struct bnxt *bp = dev->data->dev_private;
4459 uint32_t index;
4460 uint32_t offset;
4461
4462@@ -2986,7 +3065,7 @@ static int
4463 bnxt_set_eeprom_op(struct rte_eth_dev *dev,
4464 struct rte_dev_eeprom_info *in_eeprom)
4465 {
4466- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4467+ struct bnxt *bp = dev->data->dev_private;
4468 uint8_t index, dir_op;
4469 uint16_t type, ext, ordinal, attr;
4470
4471@@ -3026,7 +3105,6 @@ bnxt_set_eeprom_op(struct rte_eth_dev *dev,
4472
4473 return bnxt_hwrm_flash_nvram(bp, type, ordinal, ext, attr,
4474 in_eeprom->data, in_eeprom->length);
4475- return 0;
4476 }
4477
4478 /*
4479@@ -3128,54 +3206,27 @@ bool bnxt_stratus_device(struct bnxt *bp)
4480
4481 static int bnxt_init_board(struct rte_eth_dev *eth_dev)
4482 {
4483- struct bnxt *bp = eth_dev->data->dev_private;
4484 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
4485- int rc;
4486+ struct bnxt *bp = eth_dev->data->dev_private;
4487
4488 /* enable device (incl. PCI PM wakeup), and bus-mastering */
4489- if (!pci_dev->mem_resource[0].addr) {
4490- PMD_DRV_LOG(ERR,
4491- "Cannot find PCI device base address, aborting\n");
4492- rc = -ENODEV;
4493- goto init_err_disable;
4494+ bp->bar0 = (void *)pci_dev->mem_resource[0].addr;
4495+ bp->doorbell_base = (void *)pci_dev->mem_resource[2].addr;
4496+ if (!bp->bar0 || !bp->doorbell_base) {
4497+ PMD_DRV_LOG(ERR, "Unable to access Hardware\n");
4498+ return -ENODEV;
4499 }
4500
4501 bp->eth_dev = eth_dev;
4502 bp->pdev = pci_dev;
4503
4504- bp->bar0 = (void *)pci_dev->mem_resource[0].addr;
4505- if (!bp->bar0) {
4506- PMD_DRV_LOG(ERR, "Cannot map device registers, aborting\n");
4507- rc = -ENOMEM;
4508- goto init_err_release;
4509- }
4510-
4511- if (!pci_dev->mem_resource[2].addr) {
4512- PMD_DRV_LOG(ERR,
4513- "Cannot find PCI device BAR 2 address, aborting\n");
4514- rc = -ENODEV;
4515- goto init_err_release;
4516- } else {
4517- bp->doorbell_base = (void *)pci_dev->mem_resource[2].addr;
4518- }
4519-
4520 return 0;
4521-
4522-init_err_release:
4523- if (bp->bar0)
4524- bp->bar0 = NULL;
4525- if (bp->doorbell_base)
4526- bp->doorbell_base = NULL;
4527-
4528-init_err_disable:
4529-
4530- return rc;
4531 }
4532
4533
4534 #define ALLOW_FUNC(x) \
4535 { \
4536- typeof(x) arg = (x); \
4537+ uint32_t arg = (x); \
4538 bp->pf.vf_req_fwd[((arg) >> 5)] &= \
4539 ~rte_cpu_to_le_32(1 << ((arg) & 0x1f)); \
4540 }
4541@@ -3200,8 +3251,16 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
4542
4543 bp->dev_stopped = 1;
4544
4545+ eth_dev->dev_ops = &bnxt_dev_ops;
4546+ eth_dev->rx_pkt_burst = &bnxt_recv_pkts;
4547+ eth_dev->tx_pkt_burst = &bnxt_xmit_pkts;
4548+
4549+ /*
4550+ * For secondary processes, we don't initialise any further
4551+ * as primary has already done this work.
4552+ */
4553 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
4554- goto skip_init;
4555+ return 0;
4556
4557 if (bnxt_vf_pciid(pci_dev->id.device_id))
4558 bp->flags |= BNXT_FLAG_VF;
4559@@ -3212,12 +3271,6 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
4560 "Board initialization failed rc: %x\n", rc);
4561 goto error;
4562 }
4563-skip_init:
4564- eth_dev->dev_ops = &bnxt_dev_ops;
4565- eth_dev->rx_pkt_burst = &bnxt_recv_pkts;
4566- eth_dev->tx_pkt_burst = &bnxt_xmit_pkts;
4567- if (rte_eal_process_type() != RTE_PROC_PRIMARY)
4568- return 0;
4569
4570 if (pci_dev->id.device_id != BROADCOM_DEV_ID_NS2) {
4571 snprintf(mz_name, RTE_MEMZONE_NAMESIZE,
4572@@ -3303,7 +3356,8 @@ skip_init:
4573 goto skip_ext_stats;
4574
4575 bp->hw_rx_port_stats_ext = (void *)
4576- (bp->hw_rx_port_stats + sizeof(struct rx_port_stats));
4577+ ((uint8_t *)bp->hw_rx_port_stats +
4578+ sizeof(struct rx_port_stats));
4579 bp->hw_rx_port_stats_ext_map = bp->hw_rx_port_stats_map +
4580 sizeof(struct rx_port_stats);
4581 bp->flags |= BNXT_FLAG_EXT_RX_PORT_STATS;
4582@@ -3311,7 +3365,8 @@ skip_init:
4583
4584 if (bp->hwrm_spec_code < HWRM_SPEC_CODE_1_9_2) {
4585 bp->hw_tx_port_stats_ext = (void *)
4586- (bp->hw_tx_port_stats + sizeof(struct tx_port_stats));
4587+ ((uint8_t *)bp->hw_tx_port_stats +
4588+ sizeof(struct tx_port_stats));
4589 bp->hw_tx_port_stats_ext_map =
4590 bp->hw_tx_port_stats_map +
4591 sizeof(struct tx_port_stats);
4592@@ -3464,22 +3519,16 @@ skip_ext_stats:
4593
4594 rc = bnxt_alloc_mem(bp);
4595 if (rc)
4596- goto error_free_int;
4597+ goto error_free;
4598+
4599+ bnxt_init_nic(bp);
4600
4601 rc = bnxt_request_int(bp);
4602 if (rc)
4603- goto error_free_int;
4604-
4605- bnxt_enable_int(bp);
4606- bnxt_init_nic(bp);
4607+ goto error_free;
4608
4609 return 0;
4610
4611-error_free_int:
4612- bnxt_disable_int(bp);
4613- bnxt_hwrm_func_buf_unrgtr(bp);
4614- bnxt_free_int(bp);
4615- bnxt_free_mem(bp);
4616 error_free:
4617 bnxt_dev_uninit(eth_dev);
4618 error:
4619@@ -3499,6 +3548,9 @@ bnxt_dev_uninit(struct rte_eth_dev *eth_dev)
4620 bnxt_disable_int(bp);
4621 bnxt_free_int(bp);
4622 bnxt_free_mem(bp);
4623+
4624+ bnxt_hwrm_func_buf_unrgtr(bp);
4625+
4626 if (bp->grp_info != NULL) {
4627 rte_free(bp->grp_info);
4628 bp->grp_info = NULL;
4629diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
4630index 1afe674..6a59953 100644
4631--- a/drivers/net/bnxt/bnxt_flow.c
4632+++ b/drivers/net/bnxt/bnxt_flow.c
4633@@ -715,7 +715,7 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
4634 {
4635 const struct rte_flow_action *act =
4636 bnxt_flow_non_void_action(actions);
4637- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4638+ struct bnxt *bp = dev->data->dev_private;
4639 const struct rte_flow_action_queue *act_q;
4640 const struct rte_flow_action_vf *act_vf;
4641 struct bnxt_vnic_info *vnic, *vnic0;
4642@@ -900,7 +900,7 @@ bnxt_flow_validate(struct rte_eth_dev *dev,
4643 const struct rte_flow_action actions[],
4644 struct rte_flow_error *error)
4645 {
4646- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4647+ struct bnxt *bp = dev->data->dev_private;
4648 struct bnxt_filter_info *filter;
4649 int ret = 0;
4650
4651@@ -998,7 +998,7 @@ bnxt_flow_create(struct rte_eth_dev *dev,
4652 const struct rte_flow_action actions[],
4653 struct rte_flow_error *error)
4654 {
4655- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4656+ struct bnxt *bp = dev->data->dev_private;
4657 struct bnxt_filter_info *filter;
4658 struct bnxt_vnic_info *vnic = NULL;
4659 bool update_flow = false;
4660@@ -1099,7 +1099,7 @@ bnxt_flow_destroy(struct rte_eth_dev *dev,
4661 struct rte_flow *flow,
4662 struct rte_flow_error *error)
4663 {
4664- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4665+ struct bnxt *bp = dev->data->dev_private;
4666 struct bnxt_filter_info *filter = flow->filter;
4667 struct bnxt_vnic_info *vnic = flow->vnic;
4668 int ret = 0;
4669@@ -1128,7 +1128,7 @@ bnxt_flow_destroy(struct rte_eth_dev *dev,
4670 static int
4671 bnxt_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
4672 {
4673- struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
4674+ struct bnxt *bp = dev->data->dev_private;
4675 struct bnxt_vnic_info *vnic;
4676 struct rte_flow *flow;
4677 unsigned int i;
4678diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
4679index 9999760..69b4528 100644
4680--- a/drivers/net/bnxt/bnxt_hwrm.c
4681+++ b/drivers/net/bnxt/bnxt_hwrm.c
4682@@ -139,14 +139,11 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
4683 }
4684
4685 if (i >= HWRM_CMD_TIMEOUT) {
4686- PMD_DRV_LOG(ERR, "Error sending msg 0x%04x\n",
4687- req->req_type);
4688- goto err_ret;
4689+ PMD_DRV_LOG(ERR, "Error(timeout) sending msg 0x%04x\n",
4690+ req->req_type);
4691+ return -ETIMEDOUT;
4692 }
4693 return 0;
4694-
4695-err_ret:
4696- return -1;
4697 }
4698
4699 /*
4700@@ -576,7 +573,9 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
4701 bp->max_cp_rings = rte_le_to_cpu_16(resp->max_cmpl_rings);
4702 bp->max_tx_rings = rte_le_to_cpu_16(resp->max_tx_rings);
4703 bp->max_rx_rings = rte_le_to_cpu_16(resp->max_rx_rings);
4704- bp->max_l2_ctx = rte_le_to_cpu_16(resp->max_l2_ctxs);
4705+ bp->max_rx_em_flows = rte_le_to_cpu_16(resp->max_rx_em_flows);
4706+ bp->max_l2_ctx =
4707+ rte_le_to_cpu_16(resp->max_l2_ctxs) + bp->max_rx_em_flows;
4708 /* TODO: For now, do not support VMDq/RFS on VFs. */
4709 if (BNXT_PF(bp)) {
4710 if (bp->pf.max_vfs)
4711@@ -770,7 +769,12 @@ int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp)
4712 bp->max_tx_rings = rte_le_to_cpu_16(resp->max_tx_rings);
4713 bp->max_rx_rings = rte_le_to_cpu_16(resp->max_rx_rings);
4714 bp->max_ring_grps = rte_le_to_cpu_32(resp->max_hw_ring_grps);
4715- bp->max_l2_ctx = rte_le_to_cpu_16(resp->max_l2_ctxs);
4716+ /* func_resource_qcaps does not return max_rx_em_flows.
4717+ * So use the value provided by func_qcaps.
4718+ */
4719+ bp->max_l2_ctx =
4720+ rte_le_to_cpu_16(resp->max_l2_ctxs) +
4721+ bp->max_rx_em_flows;
4722 bp->max_vnics = rte_le_to_cpu_16(resp->max_vnics);
4723 bp->max_stat_ctx = rte_le_to_cpu_16(resp->max_stat_ctx);
4724 }
4725@@ -850,7 +854,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)
4726 rte_mem_lock_page(bp->hwrm_cmd_resp_addr);
4727 bp->hwrm_cmd_resp_dma_addr =
4728 rte_mem_virt2iova(bp->hwrm_cmd_resp_addr);
4729- if (bp->hwrm_cmd_resp_dma_addr == 0) {
4730+ if (bp->hwrm_cmd_resp_dma_addr == RTE_BAD_IOVA) {
4731 PMD_DRV_LOG(ERR,
4732 "Unable to map response buffer to physical memory.\n");
4733 rc = -ENOMEM;
4734@@ -876,7 +880,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)
4735 rte_mem_lock_page(bp->hwrm_short_cmd_req_addr);
4736 bp->hwrm_short_cmd_req_dma_addr =
4737 rte_mem_virt2iova(bp->hwrm_short_cmd_req_addr);
4738- if (bp->hwrm_short_cmd_req_dma_addr == 0) {
4739+ if (bp->hwrm_short_cmd_req_dma_addr == RTE_BAD_IOVA) {
4740 rte_free(bp->hwrm_short_cmd_req_addr);
4741 PMD_DRV_LOG(ERR,
4742 "Unable to map buffer to physical memory.\n");
4743@@ -1109,7 +1113,7 @@ int bnxt_hwrm_ring_alloc(struct bnxt *bp,
4744 case HWRM_RING_ALLOC_INPUT_RING_TYPE_RX:
4745 req.ring_type = ring_type;
4746 req.cmpl_ring_id = rte_cpu_to_le_16(cmpl_ring_id);
4747- req.stat_ctx_id = rte_cpu_to_le_16(stats_ctx_id);
4748+ req.stat_ctx_id = rte_cpu_to_le_32(stats_ctx_id);
4749 if (stats_ctx_id != INVALID_STATS_CTX_ID)
4750 enables |=
4751 HWRM_RING_ALLOC_INPUT_ENABLES_STAT_CTX_ID_VALID;
4752@@ -1126,7 +1130,7 @@ int bnxt_hwrm_ring_alloc(struct bnxt *bp,
4753 PMD_DRV_LOG(ERR, "hwrm alloc invalid ring type %d\n",
4754 ring_type);
4755 HWRM_UNLOCK();
4756- return -1;
4757+ return -EINVAL;
4758 }
4759 req.enables = rte_cpu_to_le_32(enables);
4760
4761@@ -1136,17 +1140,17 @@ int bnxt_hwrm_ring_alloc(struct bnxt *bp,
4762 if (rc == 0 && resp->error_code)
4763 rc = rte_le_to_cpu_16(resp->error_code);
4764 switch (ring_type) {
4765- case HWRM_RING_FREE_INPUT_RING_TYPE_L2_CMPL:
4766+ case HWRM_RING_ALLOC_INPUT_RING_TYPE_L2_CMPL:
4767 PMD_DRV_LOG(ERR,
4768 "hwrm_ring_alloc cp failed. rc:%d\n", rc);
4769 HWRM_UNLOCK();
4770 return rc;
4771- case HWRM_RING_FREE_INPUT_RING_TYPE_RX:
4772+ case HWRM_RING_ALLOC_INPUT_RING_TYPE_RX:
4773 PMD_DRV_LOG(ERR,
4774 "hwrm_ring_alloc rx failed. rc:%d\n", rc);
4775 HWRM_UNLOCK();
4776 return rc;
4777- case HWRM_RING_FREE_INPUT_RING_TYPE_TX:
4778+ case HWRM_RING_ALLOC_INPUT_RING_TYPE_TX:
4779 PMD_DRV_LOG(ERR,
4780 "hwrm_ring_alloc tx failed. rc:%d\n", rc);
4781 HWRM_UNLOCK();
4782@@ -1259,7 +1263,7 @@ int bnxt_hwrm_stat_clear(struct bnxt *bp, struct bnxt_cp_ring_info *cpr)
4783
4784 HWRM_PREP(req, STAT_CTX_CLR_STATS, BNXT_USE_CHIMP_MB);
4785
4786- req.stat_ctx_id = rte_cpu_to_le_16(cpr->hw_stats_ctx_id);
4787+ req.stat_ctx_id = rte_cpu_to_le_32(cpr->hw_stats_ctx_id);
4788
4789 rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
4790
4791@@ -1287,7 +1291,7 @@ int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
4792
4793 HWRM_CHECK_RESULT();
4794
4795- cpr->hw_stats_ctx_id = rte_le_to_cpu_16(resp->stat_ctx_id);
4796+ cpr->hw_stats_ctx_id = rte_le_to_cpu_32(resp->stat_ctx_id);
4797
4798 HWRM_UNLOCK();
4799
4800@@ -1303,7 +1307,7 @@ int bnxt_hwrm_stat_ctx_free(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
4801
4802 HWRM_PREP(req, STAT_CTX_FREE, BNXT_USE_CHIMP_MB);
4803
4804- req.stat_ctx_id = rte_cpu_to_le_16(cpr->hw_stats_ctx_id);
4805+ req.stat_ctx_id = rte_cpu_to_le_32(cpr->hw_stats_ctx_id);
4806
4807 rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
4808
4809@@ -1382,6 +1386,11 @@ static int bnxt_hwrm_vnic_plcmodes_cfg(struct bnxt *bp,
4810 struct hwrm_vnic_plcmodes_cfg_input req = {.req_type = 0 };
4811 struct hwrm_vnic_plcmodes_cfg_output *resp = bp->hwrm_cmd_resp_addr;
4812
4813+ if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
4814+ PMD_DRV_LOG(DEBUG, "VNIC ID %x\n", vnic->fw_vnic_id);
4815+ return rc;
4816+ }
4817+
4818 HWRM_PREP(req, VNIC_PLCMODES_CFG, BNXT_USE_CHIMP_MB);
4819
4820 req.vnic_id = rte_cpu_to_le_16(vnic->fw_vnic_id);
4821@@ -1408,8 +1417,8 @@ int bnxt_hwrm_vnic_cfg(struct bnxt *bp, struct bnxt_vnic_info *vnic)
4822 int rc = 0;
4823 struct hwrm_vnic_cfg_input req = {.req_type = 0 };
4824 struct hwrm_vnic_cfg_output *resp = bp->hwrm_cmd_resp_addr;
4825+ struct bnxt_plcmodes_cfg pmodes = { 0 };
4826 uint32_t ctx_enable_flag = 0;
4827- struct bnxt_plcmodes_cfg pmodes;
4828
4829 if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
4830 PMD_DRV_LOG(DEBUG, "VNIC ID %x\n", vnic->fw_vnic_id);
4831@@ -1607,6 +1616,7 @@ int bnxt_hwrm_vnic_rss_cfg(struct bnxt *bp,
4832 req.hash_key_tbl_addr =
4833 rte_cpu_to_le_64(vnic->rss_hash_key_dma_addr);
4834 req.rss_ctx_idx = rte_cpu_to_le_16(vnic->rss_rule);
4835+ req.vnic_id = rte_cpu_to_le_16(vnic->fw_vnic_id);
4836
4837 rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
4838
4839@@ -1896,6 +1906,7 @@ static void bnxt_free_cp_ring(struct bnxt *bp, struct bnxt_cp_ring_info *cpr)
4840 memset(cpr->cp_desc_ring, 0, cpr->cp_ring_struct->ring_size *
4841 sizeof(*cpr->cp_desc_ring));
4842 cpr->cp_raw_cons = 0;
4843+ cpr->valid = 0;
4844 }
4845
4846 void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)
4847@@ -2008,7 +2019,7 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp)
4848 return -ENOMEM;
4849 bp->hwrm_cmd_resp_dma_addr =
4850 rte_mem_virt2iova(bp->hwrm_cmd_resp_addr);
4851- if (bp->hwrm_cmd_resp_dma_addr == 0) {
4852+ if (bp->hwrm_cmd_resp_dma_addr == RTE_BAD_IOVA) {
4853 PMD_DRV_LOG(ERR,
4854 "unable to map response address to physical memory\n");
4855 return -ENOMEM;
4856@@ -2046,7 +2057,7 @@ bnxt_clear_hwrm_vnic_flows(struct bnxt *bp, struct bnxt_vnic_info *vnic)
4857
4858 STAILQ_FOREACH(flow, &vnic->flow_list, next) {
4859 filter = flow->filter;
4860- PMD_DRV_LOG(ERR, "filter type %d\n", filter->filter_type);
4861+ PMD_DRV_LOG(DEBUG, "filter type %d\n", filter->filter_type);
4862 if (filter->filter_type == HWRM_CFA_EM_FILTER)
4863 rc = bnxt_hwrm_clear_em_filter(bp, filter);
4864 else if (filter->filter_type == HWRM_CFA_NTUPLE_FILTER)
4865@@ -2109,6 +2120,11 @@ void bnxt_free_all_hwrm_resources(struct bnxt *bp)
4866 for (i = bp->nr_vnics - 1; i >= 0; i--) {
4867 struct bnxt_vnic_info *vnic = &bp->vnic_info[i];
4868
4869+ if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
4870+ PMD_DRV_LOG(DEBUG, "Invalid vNIC ID\n");
4871+ return;
4872+ }
4873+
4874 bnxt_clear_hwrm_vnic_flows(bp, vnic);
4875
4876 bnxt_clear_hwrm_vnic_filters(bp, vnic);
4877@@ -2641,14 +2657,7 @@ int bnxt_hwrm_func_qcfg_current_vf_vlan(struct bnxt *bp, int vf)
4878 HWRM_PREP(req, FUNC_QCFG, BNXT_USE_CHIMP_MB);
4879 req.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);
4880 rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
4881- if (rc) {
4882- PMD_DRV_LOG(ERR, "hwrm_func_qcfg failed rc:%d\n", rc);
4883- return -1;
4884- } else if (resp->error_code) {
4885- rc = rte_le_to_cpu_16(resp->error_code);
4886- PMD_DRV_LOG(ERR, "hwrm_func_qcfg error %d\n", rc);
4887- return -1;
4888- }
4889+ HWRM_CHECK_RESULT();
4890 rc = rte_le_to_cpu_16(resp->vlan);
4891
4892 HWRM_UNLOCK();
4893@@ -2683,7 +2692,7 @@ int bnxt_hwrm_allocate_pf_only(struct bnxt *bp)
4894
4895 if (!BNXT_PF(bp)) {
4896 PMD_DRV_LOG(ERR, "Attempt to allcoate VFs on a VF!\n");
4897- return -1;
4898+ return -EINVAL;
4899 }
4900
4901 rc = bnxt_hwrm_func_qcaps(bp);
4902@@ -2710,7 +2719,7 @@ int bnxt_hwrm_allocate_vfs(struct bnxt *bp, int num_vfs)
4903
4904 if (!BNXT_PF(bp)) {
4905 PMD_DRV_LOG(ERR, "Attempt to allcoate VFs on a VF!\n");
4906- return -1;
4907+ return -EINVAL;
4908 }
4909
4910 rc = bnxt_hwrm_func_qcaps(bp);
4911@@ -2929,7 +2938,7 @@ int bnxt_hwrm_func_buf_rgtr(struct bnxt *bp)
4912 req.req_buf_len = rte_cpu_to_le_16(HWRM_MAX_REQ_LEN);
4913 req.req_buf_page_addr0 =
4914 rte_cpu_to_le_64(rte_mem_virt2iova(bp->pf.vf_req_buf));
4915- if (req.req_buf_page_addr0 == 0) {
4916+ if (req.req_buf_page_addr0 == RTE_BAD_IOVA) {
4917 PMD_DRV_LOG(ERR,
4918 "unable to map buffer address to physical memory\n");
4919 return -ENOMEM;
4920@@ -2949,6 +2958,9 @@ int bnxt_hwrm_func_buf_unrgtr(struct bnxt *bp)
4921 struct hwrm_func_buf_unrgtr_input req = {.req_type = 0 };
4922 struct hwrm_func_buf_unrgtr_output *resp = bp->hwrm_cmd_resp_addr;
4923
4924+ if (!(BNXT_PF(bp) && bp->pdev->max_vfs))
4925+ return 0;
4926+
4927 HWRM_PREP(req, FUNC_BUF_UNRGTR, BNXT_USE_CHIMP_MB);
4928
4929 rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
4930@@ -3327,12 +3339,11 @@ int bnxt_hwrm_nvm_get_dir_info(struct bnxt *bp, uint32_t *entries,
4931 rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
4932
4933 HWRM_CHECK_RESULT();
4934- HWRM_UNLOCK();
4935
4936- if (!rc) {
4937- *entries = rte_le_to_cpu_32(resp->entries);
4938- *length = rte_le_to_cpu_32(resp->entry_length);
4939- }
4940+ *entries = rte_le_to_cpu_32(resp->entries);
4941+ *length = rte_le_to_cpu_32(resp->entry_length);
4942+
4943+ HWRM_UNLOCK();
4944 return rc;
4945 }
4946
4947@@ -3362,7 +3373,7 @@ int bnxt_get_nvram_directory(struct bnxt *bp, uint32_t len, uint8_t *data)
4948 if (buf == NULL)
4949 return -ENOMEM;
4950 dma_handle = rte_mem_virt2iova(buf);
4951- if (dma_handle == 0) {
4952+ if (dma_handle == RTE_BAD_IOVA) {
4953 PMD_DRV_LOG(ERR,
4954 "unable to map response address to physical memory\n");
4955 return -ENOMEM;
4956@@ -3397,7 +3408,7 @@ int bnxt_hwrm_get_nvram_item(struct bnxt *bp, uint32_t index,
4957 return -ENOMEM;
4958
4959 dma_handle = rte_mem_virt2iova(buf);
4960- if (dma_handle == 0) {
4961+ if (dma_handle == RTE_BAD_IOVA) {
4962 PMD_DRV_LOG(ERR,
4963 "unable to map response address to physical memory\n");
4964 return -ENOMEM;
4965@@ -3451,7 +3462,7 @@ int bnxt_hwrm_flash_nvram(struct bnxt *bp, uint16_t dir_type,
4966 return -ENOMEM;
4967
4968 dma_handle = rte_mem_virt2iova(buf);
4969- if (dma_handle == 0) {
4970+ if (dma_handle == RTE_BAD_IOVA) {
4971 PMD_DRV_LOG(ERR,
4972 "unable to map response address to physical memory\n");
4973 return -ENOMEM;
4974@@ -3515,7 +3526,7 @@ static int bnxt_hwrm_func_vf_vnic_query(struct bnxt *bp, uint16_t vf,
4975 req.max_vnic_id_cnt = rte_cpu_to_le_32(bp->pf.total_vnics);
4976 req.vnic_id_tbl_addr = rte_cpu_to_le_64(rte_mem_virt2iova(vnic_ids));
4977
4978- if (req.vnic_id_tbl_addr == 0) {
4979+ if (req.vnic_id_tbl_addr == RTE_BAD_IOVA) {
4980 HWRM_UNLOCK();
4981 PMD_DRV_LOG(ERR,
4982 "unable to map VNIC ID table address to physical memory\n");
4983@@ -3559,10 +3570,9 @@ int bnxt_hwrm_func_vf_vnic_query_and_config(struct bnxt *bp, uint16_t vf,
4984 vnic_id_sz = bp->pf.total_vnics * sizeof(*vnic_ids);
4985 vnic_ids = rte_malloc("bnxt_hwrm_vf_vnic_ids_query", vnic_id_sz,
4986 RTE_CACHE_LINE_SIZE);
4987- if (vnic_ids == NULL) {
4988- rc = -ENOMEM;
4989- return rc;
4990- }
4991+ if (vnic_ids == NULL)
4992+ return -ENOMEM;
4993+
4994 for (sz = 0; sz < vnic_id_sz; sz += getpagesize())
4995 rte_mem_lock_page(((char *)vnic_ids) + sz);
4996
4997@@ -3629,10 +3639,8 @@ int bnxt_hwrm_func_qcfg_vf_dflt_vnic_id(struct bnxt *bp, int vf)
4998 vnic_id_sz = bp->pf.total_vnics * sizeof(*vnic_ids);
4999 vnic_ids = rte_malloc("bnxt_hwrm_vf_vnic_ids_query", vnic_id_sz,
5000 RTE_CACHE_LINE_SIZE);
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches