dpdk.git
3 years agonet/ice: fix outer UDP Tx checksum offload
Murphy Yang [Mon, 23 Nov 2020 07:05:23 +0000 (07:05 +0000)]
net/ice: fix outer UDP Tx checksum offload

If hardware outer UDP Tx checksum offload enabled, it doesn't take
effect when 'IPv6/UDP/VXLAN' packet sent with wrong outer UDP checksum.

In order to take effect, set the 'L4T_CS' flag valid only when 'L4TUNT'
equals one and 'EIPT' is not zero. If 'L4T_CS' flag marked, the hardware
can calculate the outer tunneling UDP checksum.

Fixes: bd70c451532c ("net/ice: support Tx checksum offload for tunnel")
Cc: stable@dpdk.org
Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Tested-by: Wei Xie <weix.xie@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/ixgbe: enable NEON path with checksum offload
Feifei Wang [Wed, 18 Nov 2020 10:48:59 +0000 (04:48 -0600)]
net/ixgbe: enable NEON path with checksum offload

IXGBE NEON vector PMD now supports checksum offloading, hence can be
used when DEV_RX_OFFLOAD_CHECKSUM is set.

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
3 years agonet/ixgbe: mark good checksum for NEON Rx
Feifei Wang [Wed, 18 Nov 2020 10:48:58 +0000 (04:48 -0600)]
net/ixgbe: mark good checksum for NEON Rx

Add CKSUM_GOOD flag to distinguish a good checksum from an unknown one
in neon vector RX function.

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
3 years agonet/ixgbe: mark bad checksum for NEON Rx
Feifei Wang [Wed, 18 Nov 2020 10:48:57 +0000 (04:48 -0600)]
net/ixgbe: mark bad checksum for NEON Rx

Updated desc_to_olflags_v() to support PKT_RX_IP_CKSUM_BAD and
PKT_RX_L4_CKSUM_BAD in the ol_flags of the mbuf.

And then the NEON vector RX function can be called with hw_ip_checksum
enabled.

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
3 years agonet/ixgbe: set VLAN strip flag for NEON Rx
Feifei Wang [Wed, 18 Nov 2020 10:48:56 +0000 (04:48 -0600)]
net/ixgbe: set VLAN strip flag for NEON Rx

For NEON vector of IXGBE PMD, introduce new flag PKT_RX_VLAN_STRIPPED to
show the case that the VLAN is stripped from the VLAN tagged packet.

This is because that the old flag PKT_RX_VLAN_PKT only indicates that
the packet is VLAN tagged, but cannot show whether VLAN is in
m->vlan_tci or in the packet at present. So add new flag to show the
vlan has been stripped by the hardware and its tci is saved in
m->vlan_tci when vlan stripping is enabled in the RX configuration of
the IXGBE PMD.

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
3 years agonet/hns3: fix FEC state query
Min Hu (Connor) [Thu, 10 Dec 2020 12:48:43 +0000 (20:48 +0800)]
net/hns3: fix FEC state query

As FEC is not supported below 10 Gbps,
CMD(HNS3_OPC_CONFIG_FEC_MODE) offered from
Firmware read will return fail in 10 Gbps device.

This patch will prevent read this CMD when below 10 Gbps,
as this is non-sense.

Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")
Cc: stable@dpdk.org
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/hns3: adjust MAC address logging
Lijun Ou [Thu, 10 Dec 2020 12:48:42 +0000 (20:48 +0800)]
net/hns3: adjust MAC address logging

Here the printing of MAC addresses is adjusted. After the
modification, only some bytes of the MAC address are
displayed.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
3 years agonet/bnxt: disable end of packet padding for Rx
Lance Richardson [Thu, 3 Dec 2020 14:16:21 +0000 (09:16 -0500)]
net/bnxt: disable end of packet padding for Rx

Testing has shown that the packet forwarding rate for packet sizes
that are not a multiple of the cache line size is reduced when the
DMA size is padded to a multiple of the cache line size. Improve
performance for these packet sizes by disabling EOP padding.

Fixes: f4253e97e7b0 ("net/bnxt: set padding flags in Rx descriptor")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
3 years agonet/bnxt: fix memory leak when mapping fails
Yunjian Wang [Tue, 1 Dec 2020 00:59:34 +0000 (08:59 +0800)]
net/bnxt: fix memory leak when mapping fails

We allocated memory for the 'buf' when sending message to HWRM,
but we don't free it when mapping the address to IO address
fails. It will lead to memory leak.

Fixes: 19e6af01bb36 ("net/bnxt: support get/set EEPROM")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
3 years agonet/mlx5: optimize tunnel offload index pool
Suanming Mou [Mon, 7 Dec 2020 05:58:34 +0000 (13:58 +0800)]
net/mlx5: optimize tunnel offload index pool

Currently, when creating the index pool, if the trunk size is not
configured, the index pool default trunk size will be 4096.

The maximum tunnel offload supported now is 256(MLX5_MAX_TUNNELS),
create the index pool with trunk size 4096 wastes the memory.

This commits changes the tunnel offload index pool trunk size to
MLX5_MAX_TUNNELS to save the memory.

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Reviewed-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/mlx5: optimize hash list entry memory
Suanming Mou [Thu, 3 Dec 2020 02:18:52 +0000 (04:18 +0200)]
net/mlx5: optimize hash list entry memory

Currently, the hash list saves the hash key in the hash entry. And the
key is mostly used to get the bucket index only.

Save the entire 64 bits key to the entry will not be a good option if
the key is only used to get the bucket index. Since 64 bits costs more
memory for the entry, mostly the signature data in the key only uses
32 bits. And in the unregister function, the key in the entry causes
extra bucket index calculation.

This commit saves the bucket index to the entry instead of the hash key.
For the hash list like table, tag and mreg_copy which save the signature
data in the key, the signature data is moved to the resource data struct
itself.

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/mlx5: optimize hash list synchronization
Suanming Mou [Thu, 3 Dec 2020 02:18:51 +0000 (04:18 +0200)]
net/mlx5: optimize hash list synchronization

Since all the hash table operations are related with one dedicated
bucket, the hash table lock and gen_cnt can be allocated per-bucket.

Currently, the hash table uses one global lock to protect all the
buckets, that global lock avoids the buckets to be operated at one
time, it hurts the hash table performance. And the gen_cnt updated
by the entire hash table causes incorrect redundant list research.

This commit optimized the lock and gen_cnt to bucket solid allows
different bucket entries can be operated more efficiently.

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/mlx5: fix shared age action validation
Dekel Peled [Tue, 24 Nov 2020 13:45:35 +0000 (15:45 +0200)]
net/mlx5: fix shared age action validation

Previous patch added support of shared age action.
This feature is supported on group 1 and higher, and validation was
added accordingly.
On FDB table the group 0 is skipped to improve performance.
As a result the mentioned validation is not relevant for transfer rules.
This patch adds the required check to ensure proper validation.

Fixes: f9bc5274a6f9 ("net/mlx5: allow age modes combination")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/mlx5: fix Verbs memory allocation callback
Viacheslav Ovsiienko [Tue, 24 Nov 2020 10:26:43 +0000 (10:26 +0000)]
net/mlx5: fix Verbs memory allocation callback

The rdma-core library uses callbacks to allocate and free memory
from DPDK. The memory allocation callback used the complicated
and incorrect way to get the NUMA socket ID from the context.
The context was wrong that might result in wrong socket ID
and allocating memory from wrong node.

The callbacks are assigned once as Infinibande device context
is created allowing early access to shared DPDK memory for all
Verbs internal objects need that.

Fixes: 36dabcea78f0 ("net/mlx5: use anonymous Direct Verbs allocator argument")
Fixes: 2eb4d0107acc ("net/mlx5: refactor PCI probing on Linux")
Fixes: 17e19bc4dde7 ("net/mlx5: add IB shared context alloc/free functions")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/ionic: do minor logging fixups
Andrew Boyer [Thu, 10 Dec 2020 02:57:37 +0000 (18:57 -0800)]
net/ionic: do minor logging fixups

Expose ionic_opcode_to_str() so it can be used for dev cmds, too.
Store the device name in struct adapter.

Switch to memcpy() to work around gcc false positives.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/ionic: make minor refactorings
Andrew Boyer [Thu, 10 Dec 2020 02:57:36 +0000 (18:57 -0800)]
net/ionic: make minor refactorings

This makes the code clearer and conserves resources.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/ionic: warn if loopback mode is requested
Andrew Boyer [Thu, 10 Dec 2020 02:57:35 +0000 (18:57 -0800)]
net/ionic: warn if loopback mode is requested

The ionic FW does not support loopback mode at this time.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/ionic: convert boolean to flag bit
Andrew Boyer [Thu, 10 Dec 2020 02:57:34 +0000 (18:57 -0800)]
net/ionic: convert boolean to flag bit

This conserves resources.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/ionic: remove some unused fields
Andrew Boyer [Thu, 10 Dec 2020 02:57:33 +0000 (18:57 -0800)]
net/ionic: remove some unused fields

This conserves resources.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/ionic: check for command completion more frequently
Andrew Boyer [Thu, 10 Dec 2020 02:57:32 +0000 (18:57 -0800)]
net/ionic: check for command completion more frequently

This reduces the startup time a bit.

Signed-off-by: Neel Patel <neel@pensando.io>
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/ionic: update maintainer and documentation
Andrew Boyer [Thu, 10 Dec 2020 02:57:31 +0000 (18:57 -0800)]
net/ionic: update maintainer and documentation

The UNMAINTAINED flag will be removed in a future patch.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/ionic: update interface file
Andrew Boyer [Thu, 10 Dec 2020 02:57:30 +0000 (18:57 -0800)]
net/ionic: update interface file

The ionic_if.h file contains the firmware interface definitions.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/ionic: enable meson build
Andrew Boyer [Thu, 10 Dec 2020 02:57:29 +0000 (18:57 -0800)]
net/ionic: enable meson build

Otherwise the ionic PMD is never built.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/axgbe: support VLAN
Girish Nandibasappa [Tue, 1 Dec 2020 11:57:19 +0000 (11:57 +0000)]
net/axgbe: support VLAN

Added VLAN support for AMD XGBE driver

Adding below APIs for axgbe
- axgbe_enable_rx_vlan_stripping: to enable vlan header stripping
- axgbe_disable_rx_vlan_stripping: to disable vlan header stripping
- axgbe_enable_rx_vlan_filtering: to enable vlan filter mode
- axgbe_disable_rx_vlan_filtering: to disable vlan filter mode
- axgbe_update_vlan_hash_table: crc calculation and hash table update
  based on vlan values post filter enable
- axgbe_vlan_filter_set: setting of active vlan out of max 4K values
  before doing hash update of same
- axgbe_vlan_tpid_set: setting of default tpid values
- axgbe_vlan_offload_set: a top layer function to call strip/filter etc
  based on mask values

Signed-off-by: Girish Nandibasappa <girish.nandibasappa@amd.com>
Acked-by: Somalapuram Amaranath <asomalap@amd.com>
3 years agocommon/sfc_efx/base: support alternative MAE match fields
Ivan Malov [Tue, 1 Dec 2020 07:30:10 +0000 (10:30 +0300)]
common/sfc_efx/base: support alternative MAE match fields

If MAE slice is configured without conntrack support, outer
rules must match on IP SRC/DST. This isn't reported clearly
by the FW because IPv4 and IPv6 have separate SRC/DST pairs.
The FW reports status ALWAYS for all these four fields, and
having an all-zeros mask for either field prevents the spec
from being certified by the existing spec validation method.

Extend the spec validation to take the "alternative" fields
into account so that legitimate specs don't get turned down.

Fixes: ed15d7f8e064 ("common/sfc_efx/base: validate and compare outer match specs")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
3 years agocommon/sfc_efx/base: fix signed/unsigned mismatch warnings
Ivan Malov [Tue, 1 Dec 2020 07:24:21 +0000 (10:24 +0300)]
common/sfc_efx/base: fix signed/unsigned mismatch warnings

Fix signed/unsigned mismatch issues found by Windows build.

Fixes: 34285fd0891d ("common/sfc_efx/base: add match spec validate API")
Fixes: bb71f7e0a35a ("common/sfc_efx/base: add match specs class comparison API")
Fixes: e9d5c5fb6872 ("common/sfc_efx/base: avoid reading past buffer")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
3 years agocommon/sfc_efx/base: remove warnings about inline specifiers
Ivan Malov [Tue, 1 Dec 2020 07:24:20 +0000 (10:24 +0300)]
common/sfc_efx/base: remove warnings about inline specifiers

Windows build of the current libefx rejects these specifiers.
They're unneeded anyway; the compiler should decide inlining.

Fixes: 34285fd0891d ("common/sfc_efx/base: add match spec validate API")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
3 years agoapp/testpmd: fix queue stats mapping configuration
Huisong Li [Wed, 2 Dec 2020 12:48:55 +0000 (20:48 +0800)]
app/testpmd: fix queue stats mapping configuration

Currently, the queue stats mapping has the following problems:
1) Many PMD drivers don't support queue stats mapping. But there is no
   failure message after executing the command "set stat_qmap rx 0 2 2".
2) Once queue mapping is set, unrelated and unmapped queues are also
   displayed.
3) The configuration result does not take effect or can not be queried
   in real time.
4) The mapping arrays, "tx_queue_stats_mappings_array" &
   "rx_queue_stats_mappings_array" are global and their sizes are based
   on fixed max port and queue size assumptions.
5) These record structures, 'map_port_queue_stats_mapping_registers()'
   and its sub functions are redundant for majority of drivers.
6) The display of the queue stats and queue stats mapping is mixed
   together.

Since xstats is used to obtain queue statistics, we have made the
following simplifications and adjustments:
1) If PMD requires and supports queue stats mapping, configure to driver
   in real time by calling ethdev API after executing the command "set
   stat_qmap rx/tx ...". If not, the command can not be accepted.
2) Based on the above adjustments, these record structures,
   'map_port_queue_stats_mapping_registers()' and its sub functions can
   be removed. "tx-queue-stats-mapping" & "rx-queue-stats-mapping"
   parameters, and 'parse_queue_stats_mapping_config()' can be removed
   too.
3) remove display of queue stats mapping in 'fwd_stats_display()' &
   'nic_stats_display()', and obtain queue stats by xstats.  Since the
   record structures are removed, 'nic_stats_mapping_display()' can be
   deleted.

Fixes: 4dccdc789bf4 ("app/testpmd: simplify handling of stats mappings error")
Fixes: 013af9b6b64f ("app/testpmd: various updates")
Fixes: ed30d9b691b2 ("app/testpmd: add stats per queue")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/af_xdp: optimize Rx mbuf allocation
RongQing Li [Wed, 25 Nov 2020 11:01:32 +0000 (19:01 +0800)]
net/af_xdp: optimize Rx mbuf allocation

While receiving packets, the max bunch number of mbufs are allocated
and if hardware does not receive the max bunch number packets, it
will free redundancy mbufs, this is low performance.

So optimize Rx performance, by allocating number of mbuf based on
result of xsk_ring_cons__peek, to avoid to redundancy allocation,
and free mbuf when receive packets.

And Rx cached_cons must be roll backed if fails to allocate mbuf.

Signed-off-by: RongQing Li <lirongqing@baidu.com>
Signed-off-by: Dongsheng Rong <rongdongsheng@baidu.com>
Acked-by: Ciara Loftus <ciara.loftus@intel.com>
3 years agonet/axgbe: support device reset
Selwin Sebastian [Thu, 19 Nov 2020 13:21:58 +0000 (18:51 +0530)]
net/axgbe: support device reset

Added support for device reset

Signed-off-by: Selwin Sebastian <selwin.sebastian@amd.com>
Acked-by: Amaranath Somalapuram <asomalap@amd.com>
3 years agonet/bonding: accommodate jumbo frames
Kiran KN [Tue, 21 Apr 2020 07:48:34 +0000 (07:48 +0000)]
net/bonding: accommodate jumbo frames

Propagate max rx packet length and jumbo offload capabilities
to slaves from master

Signed-off-by: Kiran KN <kirankn@juniper.net>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
3 years agonet/bonding: fix port id validity check on parsing
Gaetan Rivet [Fri, 17 Apr 2020 16:42:06 +0000 (18:42 +0200)]
net/bonding: fix port id validity check on parsing

If the port_id is equal to RTE_MAX_ETHPORTS, it should be considered
invalid. Additionally, UNUSED ports are also not valid port ids to be
used afterward.

To simplify following the ethdev API rules, use the exposed function
checking whether a port id is valid.

Fixes: 2efb58cbab6e ("bond: new link bonding library")
Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <grive@u256.net>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
3 years agorcu: use EAL memory barrier API
Joyce Kong [Mon, 21 Dec 2020 07:38:48 +0000 (15:38 +0800)]
rcu: use EAL memory barrier API

Use rte_atomic_thread_fence wrapper which has been provided for
__atomic_thread_fence builtins to support optimized code for
__ATOMIC_SEQ_CST memory order on x86 platforms.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
3 years agombuf: add C++ include guard for dynamic fields header
Ashish Sadanandan [Thu, 7 Jan 2021 01:31:14 +0000 (18:31 -0700)]
mbuf: add C++ include guard for dynamic fields header

The header was missing the extern "C" directive which causes name
mangling of functions by C++ compilers, leading to linker errors
complaining of undefined references to these functions.

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
Cc: stable@dpdk.org
Signed-off-by: Ashish Sadanandan <ashish.sadanandan@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
3 years agoeal/linux: fix handling of error events from epoll
Yunjian Wang [Wed, 15 Jul 2020 02:40:10 +0000 (10:40 +0800)]
eal/linux: fix handling of error events from epoll

The "rev->epdata.event" assigned to "events.epdata.event" directly, which
was wrong in case of epoll events. It should be set to the "evs.events".

Fixes: 9efe9c6cdcac ("eal/linux: add epoll wrappers")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
3 years agonet/avp: remove always true condition
Ferruh Yigit [Thu, 19 Nov 2020 11:59:00 +0000 (11:59 +0000)]
net/avp: remove always true condition

There is already a break above for the case "count >= 1", so at this
stage 'count' should be always '0'.

Fixes: 1a85922369c4 ("net/avp: add device configuration")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Steven Webster <steven.webster@windriver.com>
3 years agoapp/crypto-perf: remove always true condition
Ferruh Yigit [Thu, 19 Nov 2020 11:58:59 +0000 (11:58 +0000)]
app/crypto-perf: remove always true condition

This is already 'else' leg of the opposite comparison, simple 'else'
will be logically same.

Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
3 years agonet/bnxt: remove redundant return
Ferruh Yigit [Thu, 19 Nov 2020 11:58:58 +0000 (11:58 +0000)]
net/bnxt: remove redundant return

Removing useless 'return' statement.

Fixes: b2da02480cb7 ("net/bnxt: support EEM system memory")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
3 years agonet/af_xdp: remove useless assignment
Ferruh Yigit [Thu, 19 Nov 2020 11:58:57 +0000 (11:58 +0000)]
net/af_xdp: remove useless assignment

Assignment of function parameter 'umem' removed.

Fixes: f0ce7af0e182 ("net/af_xdp: remove resources when port is closed")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agonet/bonding: remove local variable shadowing outer one
Ferruh Yigit [Thu, 19 Nov 2020 11:58:56 +0000 (11:58 +0000)]
net/bonding: remove local variable shadowing outer one

'retval' is already defined in the function scope, removing the 'retval'
in the block scope.

Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
3 years agonet/pcap: remove local variable shadowing outer one
Ferruh Yigit [Thu, 19 Nov 2020 11:58:55 +0000 (11:58 +0000)]
net/pcap: remove local variable shadowing outer one

'ret' is already defined in the function scope, removing the 'ret' in
the block scope.

Fixes: c9507cd0cada ("net/pcap: support physical interface MAC address")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agoapp/procinfo: remove useless assignment
Ferruh Yigit [Thu, 19 Nov 2020 11:58:54 +0000 (11:58 +0000)]
app/procinfo: remove useless assignment

'flag' is initialized to '0' but it is overwritten later, moving the
declaration where it is used and initialize with actual value.

Fixes: 0101a0ec6217 ("app/procinfo: add --show-mempool")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agoapp/procinfo: remove useless memset
Ferruh Yigit [Thu, 19 Nov 2020 11:58:53 +0000 (11:58 +0000)]
app/procinfo: remove useless memset

The intention with the "sizeof(0)" usage is not clear, but the 'stats'
already 'memset' by 'rte_cryptodev_stats_get()' API, removing 'memset'
in application.

Fixes: fe773600fe3e ("app/procinfo: add --show-crypto")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agoapp/procinfo: fix check on xstats-ids
Ferruh Yigit [Thu, 19 Nov 2020 11:58:52 +0000 (11:58 +0000)]
app/procinfo: fix check on xstats-ids

'parse_xstats_ids()' return 'int'. The return value is assigned to
'nb_xstats_ids' unsigned value, later negative check on this variable is
wrong.

Adding interim 'int' variable for negative check.

Fixes: 7ac16a3660c0 ("app/proc-info: support xstats by ID and by name")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agoapp/procinfo: fix _filters stats reporting
Ferruh Yigit [Thu, 19 Nov 2020 11:58:51 +0000 (11:58 +0000)]
app/procinfo: fix _filters stats reporting

'_filters' is compared twice, second one will be always false, removing
it using the message more relevant to the '_filters'.

Fixes: 2deb6b5246d7 ("app/procinfo: add collectd format and host id")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agoregex/octeontx2: fix PCI table overflow
Guy Kaneti [Sun, 3 Jan 2021 11:01:28 +0000 (13:01 +0200)]
regex/octeontx2: fix PCI table overflow

Sentinel was missing from pci_id_ree_table[] array initialization
which caused it to overflow.

Bugzilla ID: 603
Fixes: 4cd1c5fd9 ("regex/octeontx2: introduce REE driver")
Cc: stable@dpdk.org
Signed-off-by: Guy Kaneti <guyk@marvell.com>
3 years agoapp/flow-perf: simplify objects initialization
Wisam Jaddo [Thu, 26 Nov 2020 11:15:43 +0000 (13:15 +0200)]
app/flow-perf: simplify objects initialization

Since items are static then the default values will be zero,
thus the memset to zero value is just a redundant code.

Also remove the all not needed variables, that can be replaced
with direct set to the structure itself.

Fixes: bf3688f1e816 ("app/flow-perf: add insertion rate calculation")
Cc: stable@dpdk.org
Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Reviewed-by: Alexander Kozyrev <akozyrev@nvidia.com>
Reviewed-by: Suanming Mou <suanmingm@nvidia.com>
3 years agoapp/flow-perf: change clock measurement
Wisam Jaddo [Thu, 26 Nov 2020 11:15:42 +0000 (13:15 +0200)]
app/flow-perf: change clock measurement

The clock() function is not good practice to use for multiple
cores/threads, since it measures the CPU time used by the process
and not the wall clock time, while when running through multiple
cores/threads simultaneously, we can burn through CPU time much
faster.

As a result this commit will change the way of measurement to use
rd_tsc, and the results will be divided by the processor frequency.

Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Reviewed-by: Alexander Kozyrev <akozyrev@nvidia.com>
Reviewed-by: Suanming Mou <suanmingm@nvidia.com>
3 years agoapp/flow-perf: add multi-core rule insertion and deletion
Wisam Jaddo [Thu, 26 Nov 2020 11:15:41 +0000 (13:15 +0200)]
app/flow-perf: add multi-core rule insertion and deletion

One of the ways to increase the insertion/deletion rate is to use
multi-threaded insertion/deletion. Thus it's needed to have support
for testing and measure those rates using flow-perf application.

Now we generate cores and distribute all flows to those cores,
and start inserting/deleting in parallel.

The app now receive the cores count to use from command line option,
then it distribute the rte_flow rules evenly between the cores, and
start inserting/deleting. Each worker will report it's own results,
and in the end the MAIN worker will report the total results for all
cores.

The total results are calculated using RULES_COUNT divided over
max time used between all cores.

Also this touches the memory area, since inserting using multiple cores
in same time the pre solution for memory is not valid, thus now we save
memory before and after each allocation for all cores. In the end we
pick the min pre memory and the max post memory from all cores.

The difference between those values represent the total memory consumed
by the total rte_flow rules from all cores, and then report the total
size of single rte_flow in byte for each port.

How to use this feature:
--cores=N

Where 1 =< N <= RTE_MAX_LCORE

Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Reviewed-by: Alexander Kozyrev <akozyrev@nvidia.com>
Reviewed-by: Suanming Mou <suanmingm@nvidia.com>
3 years agoapp/flow-perf: refactor flows handler
Wisam Jaddo [Thu, 26 Nov 2020 11:15:40 +0000 (13:15 +0200)]
app/flow-perf: refactor flows handler

Provide the flows_handler() function the ability to control
flow performance processes. It is made possible after the
introduction of the insert_flows() function.

Also provide to the flows_handler() function the ability to print
the DPDK layer memory consumption of rte_flow rule, regardless
if deletion feature is enabled or not, while in previous
solution it was printing all memory changes after flows_handler().
Thus if deletion is there, it will not provide any memory that
represents the rte_flow rule size.

Also current design is easier to read and understand.

Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Reviewed-by: Alexander Kozyrev <akozyrev@nvidia.com>
Reviewed-by: Suanming Mou <suanmingm@nvidia.com>
3 years agobuild: fix plugin load on static build
Olivier Matz [Fri, 18 Dec 2020 13:14:22 +0000 (14:14 +0100)]
build: fix plugin load on static build

When dpdk is compiled as static libraries, it is not possible
to load a plugin from an application. We get the following error:

  EAL: librte_pmd_xxxx.so: undefined symbol: per_lcore__rte_errno

This happens because the dpdk symbols are not exported. Add them to the
dynamic symbol table by using '-Wl,--export-dynamic'. This option was
previously present when compiled with Makefiles, it was introduced in
commit f9a08f650211 ("eal: add support for shared object drivers")

Also add it to the pkg-config file.

Fixes: 16ade738fd0d ("app/testpmd: build with meson")
Fixes: 89f0711f9ddf ("examples: build some samples with meson")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agobus/pci: ignore missing NUMA node on Windows
Tal Shnaiderman [Sun, 13 Dec 2020 14:16:04 +0000 (16:16 +0200)]
bus/pci: ignore missing NUMA node on Windows

On older processors, NUMA isn't bound to PCIe locality.
those cases return ERROR_NOT_FOUND in response to the
SetupDiGetDevicePropertyW call with DEVPKEY_Device_Numa_Node
attribute.

This error fails the probe process for the PCIe device.
this commit will ignore such failure and will set the
numa_node to 0.

Fixes: b762221ac24f ("bus/pci: support Windows with bifurcated drivers")
Cc: stable@dpdk.org
Reported-by: Odi Assli <odia@nvidia.com>
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Tested-by: Odi Assli <odia@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
3 years agoeal/windows: add interrupt functions stub
Pallavi Kadam [Tue, 15 Dec 2020 00:26:22 +0000 (16:26 -0800)]
eal/windows: add interrupt functions stub

Add some missing interrupt implementations on Windows.
Also add respective functions to export file.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
3 years agobus/pci: fix hardware ID limit on Windows
Dmitry Kozlyuk [Fri, 11 Dec 2020 20:09:30 +0000 (23:09 +0300)]
bus/pci: fix hardware ID limit on Windows

Length of hardware IDs list is limited by REGSTR_VAL_MAX_HCID_LEN [1],
which is currently 1024. With the old limit of 260, obtaining the list
could fail in a rare occasion of a very long result (no examples known).
This also removes a bogus dependency on the maximum path length.

[1]: https://docs.microsoft.com/en-us/windows-hardware/drivers/install/hardware-ids

Fixes: b762221ac24f ("bus/pci: support Windows with bifurcated drivers")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
3 years agoci: fix package installation in GitHub Actions
David Marchand [Sat, 19 Dec 2020 08:05:33 +0000 (09:05 +0100)]
ci: fix package installation in GitHub Actions

APT cache must be updated to avoid trying to install an unavailable
version of a package.

Fixes: 87009585e293 ("ci: hook to GitHub Actions")

Signed-off-by: David Marchand <david.marchand@redhat.com>
3 years agorib: fix insertion in some cases
Vladimir Medvedkin [Tue, 8 Dec 2020 17:00:04 +0000 (17:00 +0000)]
rib: fix insertion in some cases

According to GCC documentation for __builtin_clz:
Returns the number of leading 0-bits in x,
starting at the most significant bit position.
If x is 0, the result is undefined.
__builtin_clz will be called with 0 if the existing
prefix address matches the one we want to insert.

Fixes: 5a5793a5ffa2 ("rib: add RIB library")
Cc: stable@dpdk.org
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
3 years agoci: enable v21 ABI checks
David Marchand [Fri, 4 Dec 2020 17:36:22 +0000 (18:36 +0100)]
ci: enable v21 ABI checks

v21 ABI will be maintained until v21.11.

Let's use the latest released libabigail 1.8.

In GitHub Actions, libabigail binaries and the ABI reference are stored
in two shared caches as all branches can use the same.

While at it, we can reproduce changes from the commit 0b8086ce3fe7
("devtools: remove useless files from ABI reference").
This will save some space in the CI caches.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
3 years agoci: hook to GitHub Actions
David Marchand [Fri, 4 Dec 2020 17:36:21 +0000 (18:36 +0100)]
ci: hook to GitHub Actions

With the recent changes in terms of free access to the Travis CI, let's
offer an alternative with GitHub Actions.
Running jobs on ARM is not supported unless using external runners, so
this commit only adds builds for x86_64 and cross compiling for i386 and
aarch64.

Differences with the Travis CI integration:
- Error logs are not dumped to the console when something goes wrong.
  Instead, they are gathered in a "catch-all" step and attached as
  artifacts.
- A cache entry is stored once and for all, but if no cache is found you
  can inherit from the default branch cache. The cache is 5GB large, for
  the whole git repository.
- The maximum retention of logs and artifacts is 3 months.
- /home/runner is world writable, so a workaround has been added for
  starting dpdk processes.
- Ilya, working on OVS GHA support, noticed that jobs can run with
  processors that don't have the same capabilities. For DPDK, this
  impacts the ccache content since everything was built with
  -march=native so far, and we will end up with binaries that can't run
  in a later build. The problem has not been seen in Travis CI (?) but
  it is safer to use a fixed "-Dmachine=default" in any case.
- Scheduling jobs is part of the configuration and takes the form of a
  crontab. A build is scheduled every Monday at 0:00 (UTC) to provide a
  default ccache for the week (useful for the ovsrobot).

Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
3 years agolicense: add licenses for exception cases
John McNamara [Wed, 2 Dec 2020 19:01:40 +0000 (19:01 +0000)]
license: add licenses for exception cases

The license/exceptions.txt file lists a small number of files
that have licenses that are exceptions to the three main
licenses defined in the Intellectual Property Policy of the
DPDK Charter.

The three exception licenses are MIT, ISC and BSD-2-Clause.
Each of these licenses states that the content of the license
message should be included in the code distribution. This
change adds the text of the MIT, ISC and BSD-2-Clause licenses
as defined on the SPDX website.

Cc: stable@dpdk.org
Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agobuild: disable Windows warnings for insecure funtions
Nick Connolly [Sun, 29 Nov 2020 16:00:24 +0000 (16:00 +0000)]
build: disable Windows warnings for insecure funtions

Microsoft CRT defines Windows-specific secure alternatives to
standard library functions and triggers warnings when "insecure"
functions are used [1]. However, calling code already has all
necessary checks around those functions, so these warnings are not
useful for DPDK. MinGW provides its own CRT without this issue.

[1]:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/security-features-in-the-crt?view=msvc-160

Disable this by defining -D_CRT_SECURE_NO_WARNINGS.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
3 years agoeal/windows: fix vfprintf warning with clang
Nick Connolly [Sun, 29 Nov 2020 13:00:47 +0000 (13:00 +0000)]
eal/windows: fix vfprintf warning with clang

When building with clang (11.0,--buildtype=debug), eal_lcore.c
produces a -Wformat-nonliteral warning from the vfprintf call
in log_early.

Add __rte_format_printf annotation.

Fixes: b8a36b086625 ("eal/windows: improve CPU and NUMA node detection")
Cc: stable@dpdk.org
Suggested-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
3 years agoeal/windows: fix debug build with MinGW
Nick Connolly [Fri, 27 Nov 2020 11:07:26 +0000 (11:07 +0000)]
eal/windows: fix debug build with MinGW

Compiling with MinGW in --buildtype=debug produces a redefinition
error for strncasecmp.

The root cause is that rte_os.h shouldn't be injecting POSIX definitions
into the environment.  It is the applications responsibility to decide
how to handle missing functionality.

Resolving this properly will require further work, but in the meantime
wrap all such definitions with #ifndef/#endif.  This resolves the specific
issue with strncasecmp and handles similar issues that applications may
encounter.

Fixes: e8428a9d89f1 ("eal/windows: add some basic functions and macros")
Cc: stable@dpdk.org
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
3 years agobus/pci: fix build with MinGW-w64 8
Dmitry Kozlyuk [Tue, 1 Dec 2020 16:39:59 +0000 (19:39 +0300)]
bus/pci: fix build with MinGW-w64 8

Fix redefinition of GUID, missing from previous versions.

Fixes: b762221ac24f ("bus/pci: support Windows with bifurcated drivers")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Thomas Monjalon <thomas@monjalon.net>
3 years agoeal/windows: fix build with MinGW-w64 8
Dmitry Kozlyuk [Tue, 1 Dec 2020 16:39:58 +0000 (19:39 +0300)]
eal/windows: fix build with MinGW-w64 8

MinGW-w64 above 8.0.0 exposes VirtualAlloc2() API in headers, but lacks
it in import libraries. Hence, availability of this API at compile-time
can't be used to choose between locating VirtualAlloc2() manually or
relying on the dynamic linker.

Fix redefinition compile-time errors.
Always link VirtualAlloc2() when using GCC.

Fixes: 2a5d547a4a9b ("eal/windows: implement basic memory management")
Cc: stable@dpdk.org
Reported-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Thomas Monjalon <thomas@monjalon.net>
3 years agoversion: 21.02-rc0
David Marchand [Mon, 30 Nov 2020 07:47:11 +0000 (08:47 +0100)]
version: 21.02-rc0

Start a new release cycle with empty release notes.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
3 years agoversion: 20.11.0
Thomas Monjalon [Fri, 27 Nov 2020 18:48:48 +0000 (19:48 +0100)]
version: 20.11.0

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
3 years agodoc: announce deprecation of maximum Rx length field
Ferruh Yigit [Tue, 24 Nov 2020 17:36:28 +0000 (17:36 +0000)]
doc: announce deprecation of maximum Rx length field

The configuration related to the MTU is complex
and have some design issues.
This area should be redesigned a bit.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
3 years agodoc: announce flow API matching structs changes
Ferruh Yigit [Tue, 24 Nov 2020 13:15:35 +0000 (13:15 +0000)]
doc: announce flow API matching structs changes

Proposing to replace protocol header fields in the ``rte_flow_item_*``
structures with the protocol structs.

This is both for documenting the intention and to be sure
``rte_flow_item_*`` always starts with complete protocol header.

Change will be done in two steps, at first step in v21.02 release,
protocol header struct will be added as union, for example:

Current ``struct rte_flow_item_eth``,

struct rte_flow_item_eth {
struct rte_ether_addr dst;
struct rte_ether_addr src;
rte_be16_t type;
uint32_t has_vlan:1;
uint32_t reserved:31;
}

will become in v21.02:

__extension__
struct rte_flow_item_eth {
union {
struct {
struct rte_ether_addr dst;
struct rte_ether_addr src;
rte_be16_t type;
};
struct rte_ether_hdr hdr;
};
uint32_t has_vlan:1;
uint32_t reserved:31;
}

After this point usage should switch to 'hdr' struct.

And in the second step, in the v21.11 LTS release the protocol fields
will be removed, and the struct will become:

struct rte_flow_item_eth {
struct rte_ether_hdr hdr;
uint32_t has_vlan:1;
uint32_t reserved:31;
}

Already many ``rte_flow_item_*`` structures implemented to have protocol
struct, target is convert all to this usage.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
3 years agoethdev: deprecate shared counters using action attribute
Andrew Rybchenko [Tue, 3 Nov 2020 14:26:16 +0000 (14:26 +0000)]
ethdev: deprecate shared counters using action attribute

A new generic shared actions API may be used to create shared
counter. There is no point to keep duplicate COUNT action specific
capability to create shared counters.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agodoc: add vector mode limitation in bnxt guide
Ajit Khaparde [Fri, 27 Nov 2020 03:21:34 +0000 (19:21 -0800)]
doc: add vector mode limitation in bnxt guide

PMD can support vector mode when jumbo is enabled as long as MTU is not
large enough to require scattered RX (which also depends on the mbuf size).

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
3 years agodoc: add VFIO troubleshooting in Linux guide
Anatoly Burakov [Thu, 19 Nov 2020 11:32:32 +0000 (11:32 +0000)]
doc: add VFIO troubleshooting in Linux guide

There are common problems with VFIO that get asked over and over on the
mailing list. Document common problems with VFIO and how to fix them or
at least figure out what went wrong.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
3 years agodoc: add VFIO no-IOMMU in Linux guide
Anatoly Burakov [Thu, 19 Nov 2020 11:32:31 +0000 (11:32 +0000)]
doc: add VFIO no-IOMMU in Linux guide

Currently, we have no documentation on how to use VFIO in no-IOMMU mode.
Add such documentation.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agodoc: reword VFIO and UIO sections in Linux guide
Anatoly Burakov [Thu, 19 Nov 2020 11:32:30 +0000 (11:32 +0000)]
doc: reword VFIO and UIO sections in Linux guide

Make sure that we always prioritize VFIO over UIO. Also, minor wording
corrections and improvements.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
3 years agodoc: move VFIO driver to be first in Linux guide
Anatoly Burakov [Thu, 19 Nov 2020 11:32:29 +0000 (11:32 +0000)]
doc: move VFIO driver to be first in Linux guide

Currently, the Linux GSG mentions UIO drivers first. This is not ideal
as for the longest time, the recommended way to use DPDK with hardware
devices has been to use VFIO driver.

This commit simply moves UIO section after VFIO, with minor edits.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agousertools: remove dpdk-setup.sh
David Marchand [Fri, 27 Nov 2020 15:07:10 +0000 (16:07 +0100)]
usertools: remove dpdk-setup.sh

This old script relied on deprecated stuff, and especially make.
It also applied some scary 666 permissions on files under /dev/vfio.

Its deprecation had been notified in a previous release, remove it.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
3 years agonet/igc: fix build with gcc optimization level 0
Ruifeng Wang [Fri, 27 Nov 2020 08:09:03 +0000 (16:09 +0800)]
net/igc: fix build with gcc optimization level 0

GCC build with '-O0' failed for:
 ../drivers/net/igc/base/igc_api.c
 Assembler messages:
29: Error: selected processor does not support `casp x0,x1,x2,x3,[x4]'
82: Error: selected processor does not support `caspa x0,x1,x2,x3,[x4]'
135: Error: selected processor does not support `caspl x0,x1,x2,x3,[x4]'
188: Error: selected processor does not support `caspal x0,x1,x2,x3,[x4]'

This is due to c_args not been passed to meson.

Fixes: 8cb7c57d9b3c ("net/igc: support device initialization")
Cc: stable@dpdk.org
Reported-by: Feifei Wang <feifei.wang2@arm.com>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
3 years agoeal/arm: fix build with gcc optimization level 0
Ruifeng Wang [Fri, 27 Nov 2020 08:09:02 +0000 (16:09 +0800)]
eal/arm: fix build with gcc optimization level 0

GCC build with '-O0' on platforms with RTE_ARM_FEATURE_ATOMICS set
failed for:
 ../lib/librte_efd/rte_efd.c
 Assembler messages:
3866: Error: selected processor does not support `crc32cb w0,w0,w1'
3890: Error: selected processor does not support `crc32ch w0,w0,w1'
3914: Error: selected processor does not support `crc32cw w0,w0,w1'
3938: Error: selected processor does not support `crc32cx w0,w0,x1'

This was caused by an architecture specifier added for Clang.
Unlike Clang, GCC considers each inline assembly block to be dependent
and therefore, the architecture specifier impacts assemble of some
blocks require certain extension support.

Removed the architecture for GCC to fix the issue.

Fixes: 8fce34cd0a6a ("eal/arm: fix clang build of native target")
Cc: stable@dpdk.org
Reported-by: Feifei Wang <feifei.wang2@arm.com>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
3 years agodoc: update information on using hugepages
Anatoly Burakov [Thu, 19 Nov 2020 10:52:45 +0000 (10:52 +0000)]
doc: update information on using hugepages

Current information regarding hugepage usage is a little out of date.
Update it to include information on in-memory mode, as well as on
default mountpoints provided by systemd.

Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agodoc: clarify instructions on running as non-root
Anatoly Burakov [Thu, 19 Nov 2020 10:52:44 +0000 (10:52 +0000)]
doc: clarify instructions on running as non-root

The current instructions are slightly out of date when it comes to
providing information about setting up the system for using DPDK as
non-root, so update them.

Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agodoc: clarify reference version for ABI checks
Ray Kinsella [Mon, 10 Aug 2020 09:24:07 +0000 (10:24 +0100)]
doc: clarify reference version for ABI checks

Clarify the ABI reference version (DPDK_ABI_REF_VERSION) tag, to use
when testing builds with devtools/test-meson-builds.sh before
submitting patches.

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agodoc: add sample for ABI checks
Ferruh Yigit [Fri, 3 Jul 2020 17:15:38 +0000 (18:15 +0100)]
doc: add sample for ABI checks

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
3 years agomaintainers: update for netvsc
Stephen Hemminger [Tue, 15 Sep 2020 02:03:40 +0000 (19:03 -0700)]
maintainers: update for netvsc

The removed maintainers deal with the Linux side of netvsc and
are not relevant for DPDK.

With Long's help the driver is now stable enough for real usage,
so the experimental mark is removed.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agomaintainers: update for eventdev Rx/Tx adapters
Nikhil Rao [Wed, 26 Aug 2020 02:02:06 +0000 (07:32 +0530)]
maintainers: update for eventdev Rx/Tx adapters

Jay is the new maintainer since Nikhil no longer works on DPDK.

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
3 years agodoc: add tested platforms for Broadcom NICs
Ajit Khaparde [Tue, 24 Nov 2020 14:13:30 +0000 (06:13 -0800)]
doc: add tested platforms for Broadcom NICs

Add tested platforms for Broadcom NICs to the 20.11 release notes.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
3 years agodoc: add tested platforms with Mellanox NICs
Raslan Darawsheh [Tue, 24 Nov 2020 09:54:37 +0000 (11:54 +0200)]
doc: add tested platforms with Mellanox NICs

Add tested platforms with Mellanox NICs to the 20.11 release notes.

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
3 years agodoc: add tested Intel platforms with Intel NICs
Bo Chen [Fri, 20 Nov 2020 20:46:12 +0000 (15:46 -0500)]
doc: add tested Intel platforms with Intel NICs

Add tested Intel platforms with Intel NICs to v20.11 release note.

Signed-off-by: Bo Chen <box.c.chen@intel.com>
3 years agodoc: update release notes for 20.11
John McNamara [Tue, 24 Nov 2020 20:40:47 +0000 (20:40 +0000)]
doc: update release notes for 20.11

Fix grammar, spelling and formatting of DPDK 20.11 release notes.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
3 years agodoc: remove meson version deprecation notice
Bruce Richardson [Fri, 13 Nov 2020 16:16:47 +0000 (16:16 +0000)]
doc: remove meson version deprecation notice

DPDK has been using meson 0.47 for some time now, so we can safely
remove the note calling out this fact.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
3 years agodoc: add pkg-config requirement for applications
Gregory Etelson [Thu, 26 Nov 2020 16:43:28 +0000 (17:43 +0100)]
doc: add pkg-config requirement for applications

DPDK relies on pkg-config(1) to provide correct parameters for
compiler and linker used in application build.  Inaccurate build
parameters, produced by pkg-config from DPDK .pc files could fail
application build or cause unpredicted results during application
runtime.

Update system requirements doc about a bug in pkg-config v0.27
used in RHEL-7.

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agodoc: remove Linux headers from requirements
Thomas Monjalon [Thu, 26 Nov 2020 16:08:37 +0000 (17:08 +0100)]
doc: remove Linux headers from requirements

The compilation of the kernel module KNI is optional.
The kernel headers should not be required for DPDK compilation.

Fixes: 91a861e54164 ("config: disable Linux kernel modules by default")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agodoc: add missing network layers in API index
Olivier Matz [Thu, 26 Nov 2020 14:26:39 +0000 (15:26 +0100)]
doc: add missing network layers in API index

Add missing files in doxy-api-index.md and add a short description
for files that hadn't one.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
3 years agokni: fix build on RHEL 8.3
Olivier Matz [Thu, 26 Nov 2020 14:23:45 +0000 (15:23 +0100)]
kni: fix build on RHEL 8.3

Like what was done for mainline kernel in commit 38ad54f3bc76 ("kni: fix
build with Linux 5.6"), a new parameter 'txqueue' has to be added to
'ndo_tx_timeout' ndo on RHEL 8.3 kernel.

Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Christophe Grosse <christophe.grosse@6wind.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agodoc: update BlueField platform guide
Asaf Penso [Tue, 24 Nov 2020 07:32:32 +0000 (07:32 +0000)]
doc: update BlueField platform guide

The documentation file contains some broken links to Mellanox's site.
Also now BlueField-2 platform is supported.

This patch provides new links and adds documentation for
BlueField-2 platform.

Signed-off-by: Asaf Penso <asafp@nvidia.com>
3 years agodoc: add ConnectX-6 Lx and BlueField-2 in mlx5 guide
Raslan Darawsheh [Tue, 24 Nov 2020 10:30:35 +0000 (12:30 +0200)]
doc: add ConnectX-6 Lx and BlueField-2 in mlx5 guide

This adds ConnectX-6 Lx and BlueField-2 to the list of NICs
supported by mlx5 PMD.

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
3 years agodoc: update hardware offloads support in mlx5 guide
Asaf Penso [Sun, 22 Nov 2020 12:05:55 +0000 (12:05 +0000)]
doc: update hardware offloads support in mlx5 guide

In DPDK 20.11 the following offload features are added:
* Buffer Split
* Sampling
* Tunnel offload
* 2-port hairpin
* RSS shared action
* Age shared action

Update the relevant tables with OFED/rdma-core/NIC versions.

Signed-off-by: Asaf Penso <asafp@nvidia.com>
3 years agodoc: add Rx functions limitations in mlx5 guide
Asaf Penso [Tue, 24 Nov 2020 07:44:16 +0000 (07:44 +0000)]
doc: add Rx functions limitations in mlx5 guide

The mlx5 PMD supports various Rx burst functions.
Each function is enabled differently and supports different features.

Signed-off-by: Asaf Penso <asafp@nvidia.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
3 years agodoc: update ice user guide
Qi Zhang [Wed, 18 Nov 2020 23:56:07 +0000 (07:56 +0800)]
doc: update ice user guide

Add link for firmware/OOT kernel driver/DDP download
Add matching List.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agodoc: update hns3 features
Lijun Ou [Tue, 24 Nov 2020 13:56:17 +0000 (21:56 +0800)]
doc: update hns3 features

Since the hns3 NIC hardware features are not counted
and it is supported in fact. Besides, the flow director
is not supported and need to delete it.

Fixes: fa29fe45a7b4 ("net/hns3: support queue start and stop")
Fixes: 521ab3e93361 ("net/hns3: add simple Rx path")
Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")
Fixes: 936eda25e8da ("net/hns3: support dump register")
Fixes: 53b9f2b9a560 ("doc: update feature list in hns3 guide")
Cc: stable@dpdk.org
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agodoc: update TRUFLOW support in bnxt guide
Ajit Khaparde [Wed, 25 Nov 2020 04:46:41 +0000 (20:46 -0800)]
doc: update TRUFLOW support in bnxt guide

Currently TRUFLOW is supported only on Whitney+ and Stingray devices.
Update the PMD doc with this info.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
3 years agodoc: announce end of support for some Broadcom devices
Ajit Khaparde [Mon, 26 Oct 2020 21:46:04 +0000 (14:46 -0700)]
doc: announce end of support for some Broadcom devices

Devices belonging to BCM573xx and BCM5740x family will not be supported
from the 21.02 release.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>