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

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Christian Ehrhardt 
Approved revision: 9f7497dcbb5f48ceb51225e67ae3f1c4f476eedb
Merge reported by: Christian Ehrhardt 
Merged at revision: 9f7497dcbb5f48ceb51225e67ae3f1c4f476eedb
Proposed branch: ~paelzer/ubuntu/+source/dpdk:bug-1848585-18.11.3-disco
Merge into: ubuntu/+source/dpdk:ubuntu/disco-devel
Diff against target: 17031 lines (+3907/-2622)
393 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 (+38/-0)
debian/control (+2/-2)
debian/copyright (+1/-0)
debian/dpdk-dev.NEWS (+1/-1)
debian/dpdk-dev.install (+1/-1)
debian/gbp.conf (+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 (+41/-0)
debian/patches/series (+1/-0)
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 packageset reviewers Pending
git-ubuntu developers Pending
Review via email: mp+374896@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 :

Okay, just like the eoan merge, I have reviewed this in the same way: functional tests against 2 different vhostuser setups: client and server, with one using 4 queues and the other a single queue.

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

Using the current dpdk packages:

### host

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.04
Release: 19.04
Codename: disco

### host kernel

Linux kdisco 5.0.0-34-generic #36-Ubuntu SMP Wed Oct 30 05:16:14 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

### dpdk / openvswitch

$ dpkg -l | grep -i dpdk
ii dpdk 18.11.2-1ubuntu0.19.04.1 amd64 Data Plane Development Kit (runtime)
ii openvswitch-switch-dpdk 2.11.0-0ubuntu2 amd64 DPDK enabled Open vSwitch switch implementation

$ sudo ovs-vsctl show
0b5d00d8-e2f0-4034-b39e-cbfd274f3cf4
    Bridge "dpdkbr0"
        Port "vhost-user-client-1"
            Interface "vhost-user-client-1"
                type: dpdkvhostuserclient
                options: {vhost-server-path="/var/run/openvswitch/vhost-user-client-1"}
        Port "vhost-user-2"
            Interface "vhost-user-2"
                type: dpdkvhostuser
        Port "dpdkbr0"
            Interface "dpdkbr0"
                type: internal
    ovs_version: "2.11.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 3GB 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: 1.55 MByte (default)
------------------------------------------------------------
[ 3] local 172.16.1.1 port 56060 connected with 172.16.1.2 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 5.40 GBytes 4.64 Gbits/sec

----

$ sudo iperf -c 172.16.1.2 -P 2
------------------------------------------------------------
Client connecting to 172.16.1.2, TCP port 5001
TCP window size: 1.38 MByte (default)
------------------------------------------------------------
[ 4] local 172.16.1.1 port 56064 connected with 172.16.1.2 port 5001
[ 3] local 172.16.1.1 port 56062 connected with 172.16.1.2 port 5001
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 5.03 GBytes 4.32 Gbits/sec
[ 3] 0.0-10.0 sec 3.49 GBytes 2.99 Gbits/sec
[SUM] 0.0-10.0 sec 8.52 GBytes 7.32 Gbits/sec

----

$ sudo iperf -c 172.16.1.2 -P 4
------------------------------------------------------------
Client connecting to 172.16.1.2, TCP port 5001
TCP window size: 960 KByte (default)
------------------------------------------------------------
[ 3] local 172.16.1.1 port 56066 connected with 172.16.1.2 port 5001
[ 4] local 172.16.1.1 port 56068 connected with 172.16.1.2 port 5001
[ 6] local...

Read more...

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

Using dpdk packages from ppa:

### host

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

### host kernel

Linux kdisco 5.0.0-34-generic #36-Ubuntu SMP Wed Oct 30 05:16:14 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

### dpdk / openvswitch

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

$ sudo ovs-vsctl show
0b5d00d8-e2f0-4034-b39e-cbfd274f3cf4
    Bridge "dpdkbr0"
        Port "vhost-user-client-1"
            Interface "vhost-user-client-1"
                type: dpdkvhostuserclient
                options: {vhost-server-path="/var/run/openvswitch/vhost-user-client-1"}
        Port "vhost-user-2"
            Interface "vhost-user-2"
                type: dpdkvhostuser
        Port "dpdkbr0"
            Interface "dpdkbr0"
                type: internal
    ovs_version: "2.11.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: 688 KByte (default)
------------------------------------------------------------
[ 3] local 172.16.1.1 port 47142 connected with 172.16.1.2 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 5.26 GBytes 4.52 Gbits/sec

----

$ sudo iperf -c 172.16.1.2 -P 2
------------------------------------------------------------
Client connecting to 172.16.1.2, TCP port 5001
TCP window size: 1.52 MByte (default)
------------------------------------------------------------
[ 3] local 172.16.1.1 port 47144 connected with 172.16.1.2 port 5001
[ 4] local 172.16.1.1 port 47146 connected with 172.16.1.2 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 3.94 GBytes 3.38 Gbits/sec
[ 4] 0.0-10.0 sec 4.17 GBytes 3.58 Gbits/sec
[SUM] 0.0-10.0 sec 8.11 GBytes 6.96 Gbits/sec

----

$ sudo iperf -c 172.16.1.2 -P 4
------------------------------------------------------------
Client connecting to 172.16.1.2, TCP port 5001
TCP window size: 978 KByte (default)
------------------------------------------------------------
[ 6] local 172.16.1.1 port 47154 connected with 172.16.1.2 port 5001
[ 3] local 172.16.1.1 port 47148 connected with 172.16.1.2 port 5001
[ 4] lo...

Read more...

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

Reviewing the code change:

git log -p -6 | diffstat | egrep -E "(debian|deletions)"
...
 b/debian/changelog | 16
 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
 388 files changed, 3839 insertions(+), 2621 deletions(-)
...

just like eoan's merge, this one looks fine for packaging files as well. All other changes are due to the new micro release, which is fine.

Functional test looked okay as well, with a small performance decrease for my test case, which is probably nothing as the deviation between one measurement and the other would be justified by not having my vCPUs pinned on my host.

+1 on my side.

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

Tagged and uploaded

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

Migrated, setting merged

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

Subscribers

People subscribed via source and target branches