dpdk.git
3 years agonet/txgbe: support VF register dump
Jiawen Wu [Thu, 25 Feb 2021 08:08:58 +0000 (16:08 +0800)]
net/txgbe: support VF register dump

Add support to dump registers for VF.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF MTU update
Jiawen Wu [Thu, 25 Feb 2021 08:08:57 +0000 (16:08 +0800)]
net/txgbe: support VF MTU update

Add MTU set operation for VF device.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF multicast MAC filter
Jiawen Wu [Thu, 25 Feb 2021 08:08:56 +0000 (16:08 +0800)]
net/txgbe: support VF multicast MAC filter

Add multicast MAC filter support for VF driver.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF promiscuous and allmulticast
Jiawen Wu [Thu, 25 Feb 2021 08:08:55 +0000 (16:08 +0800)]
net/txgbe: support VF promiscuous and allmulticast

Support to enable and disable promiscuous and allmulticast mode on VF
device.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF RSS
Jiawen Wu [Thu, 25 Feb 2021 08:08:54 +0000 (16:08 +0800)]
net/txgbe: support VF RSS

Support RSS hash and RETA operations for VF device.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF VLAN
Jiawen Wu [Thu, 25 Feb 2021 08:08:53 +0000 (16:08 +0800)]
net/txgbe: support VF VLAN

Add VLAN filter, offload and strip set support to VF driver.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF stats and xstats
Jiawen Wu [Thu, 25 Feb 2021 08:08:52 +0000 (16:08 +0800)]
net/txgbe: support VF stats and xstats

Add VF device stats and extended stats get from reading hardware
registers.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF Rx/Tx
Jiawen Wu [Thu, 25 Feb 2021 08:08:51 +0000 (16:08 +0800)]
net/txgbe: support VF Rx/Tx

Configure VF device with RX port. Initialize receive and transmit unit,
set the receive and transmit functions. And support to check the
status of RX and TX descriptors.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF get link status
Jiawen Wu [Thu, 25 Feb 2021 08:08:50 +0000 (16:08 +0800)]
net/txgbe: support VF get link status

Add support to get link speed, duplex mode and state of VF device.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF interrupt
Jiawen Wu [Thu, 25 Feb 2021 08:08:49 +0000 (16:08 +0800)]
net/txgbe: support VF interrupt

Add VF device interrupt handler, support to enable and disable RX queue
interrupt, and configure MSI-X interrupt.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF get information
Jiawen Wu [Thu, 25 Feb 2021 08:08:48 +0000 (16:08 +0800)]
net/txgbe: support VF get information

Add information get operation for VF device.
RX and TX offload capabilities are same as the PF device.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF MAC address
Jiawen Wu [Thu, 25 Feb 2021 08:08:47 +0000 (16:08 +0800)]
net/txgbe: support VF MAC address

Generate a random MAC address if none was assigned by PF during
the initialization of VF device. And support to add and remove
MAC address.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: add VF base code
Jiawen Wu [Thu, 25 Feb 2021 08:08:46 +0000 (16:08 +0800)]
net/txgbe: add VF base code

Implement VF device init and uninit function with hardware operations,
and negotiate with PF in mailbox.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agonet/txgbe: support VF probe and remove
Jiawen Wu [Thu, 25 Feb 2021 08:08:45 +0000 (16:08 +0800)]
net/txgbe: support VF probe and remove

Introduce virtual function driver in txgbe PMD,
add simple init and uninit function to probe and remove the device.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
3 years agoapp/testpmd: remove unnecessary UDP tunnel check
Xiaoyun Li [Thu, 18 Feb 2021 03:06:10 +0000 (11:06 +0800)]
app/testpmd: remove unnecessary UDP tunnel check

cmd_tunnel_udp_config checked 'cmd' to set prot_type but this cmd is
only for rx_vxlan_port. The unnecessary cmd check will cause uninit
coverity issue. So remove it and rename 'cmd' to 'rx_vxlan_port'.

Coverity issue: 366155
Fixes: bd948f20d609 ("app/testpmd: VXLAN packet identification")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/ionic: fix completion type in lif init
Andrew Boyer [Tue, 16 Feb 2021 20:35:40 +0000 (12:35 -0800)]
net/ionic: fix completion type in lif init

The completion type was wrong.
Don't check the completion if the wait timed out.

Fixes: 669c8de67c88 ("net/ionic: support basic LIF")
Cc: stable@dpdk.org
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: store Tx fragment limit in queue
Andrew Boyer [Tue, 16 Feb 2021 20:35:39 +0000 (12:35 -0800)]
net/ionic: store Tx fragment limit in queue

A future patch will allow Tx scatter/gather to be disabled. Store the
value in the queue so it can be changed at runtime based on the
configuration.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: send as many packets as possible
Andrew Boyer [Tue, 16 Feb 2021 20:35:38 +0000 (12:35 -0800)]
net/ionic: send as many packets as possible

Rather than dropping the whole burst if some don't fit.
This improves performance.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Signed-off-by: Vishwas Danivas <vishwas@pensando.io>
3 years agonet/ionic: ring doorbell once at the end of each burst
Andrew Boyer [Tue, 16 Feb 2021 20:35:37 +0000 (12:35 -0800)]
net/ionic: ring doorbell once at the end of each burst

This improves performance.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: break up queue post function
Andrew Boyer [Tue, 16 Feb 2021 20:35:36 +0000 (12:35 -0800)]
net/ionic: break up queue post function

Break it up rather than inlining it, so that we can remove
branches from the hot path.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: log queue counters when tearing down
Andrew Boyer [Tue, 16 Feb 2021 20:35:35 +0000 (12:35 -0800)]
net/ionic: log queue counters when tearing down

This improves debuggability.

To see the logs, use EAL arg: --log-level=pmd.net.ionic,debug

While here, stop counting fragments, but start counting mtods.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: use socket id passed in for Rx and Tx queues
Andrew Boyer [Tue, 16 Feb 2021 20:35:34 +0000 (12:35 -0800)]
net/ionic: use socket id passed in for Rx and Tx queues

Pipe the value from the queue setup routines through to
ionic_qcq_alloc().

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: split up queue-completion queue structure
Andrew Boyer [Tue, 16 Feb 2021 20:35:33 +0000 (12:35 -0800)]
net/ionic: split up queue-completion queue structure

Create a unique Q-CQ struct for adminq, notifyq, rxq, and txq to
reduce the size of each object.

Minimize the size of each field to squeeze into as few cachelines
as possible.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: cut down queue structure
Andrew Boyer [Tue, 16 Feb 2021 20:35:32 +0000 (12:35 -0800)]
net/ionic: cut down queue structure

This will conserve resources.

Rename ionic_qcq_alloc() arg from 'base' to 'type_name' for clarity.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: remove unused interrupt free function
Andrew Boyer [Tue, 16 Feb 2021 20:35:31 +0000 (12:35 -0800)]
net/ionic: remove unused interrupt free function

This will conserve resources.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: remove unused field from queue structure
Andrew Boyer [Tue, 16 Feb 2021 20:35:30 +0000 (12:35 -0800)]
net/ionic: remove unused field from queue structure

This will conserve resources.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: convert info array to generic pointers
Andrew Boyer [Tue, 16 Feb 2021 20:35:29 +0000 (12:35 -0800)]
net/ionic: convert info array to generic pointers

Drop the callback part of the object and store only the pointers.
This saves a bit of space and simplifies the code.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: consolidate adminq code
Andrew Boyer [Tue, 16 Feb 2021 20:35:28 +0000 (12:35 -0800)]
net/ionic: consolidate adminq code

The adminq is the only caller of ionic_q_service(), so absorb it
into ionic_adminq_service().
Move all of the adminq code together into ionic_main.c.
Staticize a few things.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: remove unused filter delete function
Andrew Boyer [Tue, 16 Feb 2021 20:35:27 +0000 (12:35 -0800)]
net/ionic: remove unused filter delete function

This function is unused.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: cut down completion queue structure
Andrew Boyer [Tue, 16 Feb 2021 20:35:26 +0000 (12:35 -0800)]
net/ionic: cut down completion queue structure

Add Q_NEXT_TO_POST() and Q_NEXT_TO_SRVC() macros.
Use a precomputed size mask.

This will conserve resources.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/dpaa: support Rx buffer size
Hemant Agrawal [Wed, 24 Feb 2021 12:43:11 +0000 (18:13 +0530)]
net/dpaa: support Rx buffer size

This patch adds Rx buf size support in rxq info for dpaa.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: support Rx buffer size
Hemant Agrawal [Wed, 24 Feb 2021 12:43:10 +0000 (18:13 +0530)]
net/dpaa2: support Rx buffer size

This patch adds RX buf size support in queue info

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agobus/dpaa: enhance checks for bus and device detection
Hemant Agrawal [Wed, 24 Feb 2021 12:43:09 +0000 (18:13 +0530)]
bus/dpaa: enhance checks for bus and device detection

1. It is not a error if no network device available. One can
only use crypto device
2. Improve logging for failure in detecting the bus

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agobus/dpaa: support shared MAC interface
Nipun Gupta [Wed, 24 Feb 2021 12:43:08 +0000 (18:13 +0530)]
bus/dpaa: support shared MAC interface

DPAA can share an interface on classification criteria with kernel.

This patch enables default kernel driver to be used as a shared MAC
interface with DPDK interface. (provided that VSP is enabled on that
interface.)

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agobus/dpaa: support secondary process init
Hemant Agrawal [Wed, 24 Feb 2021 12:43:07 +0000 (18:13 +0530)]
bus/dpaa: support secondary process init

Secondary process also need the access the qman and bman
ccsr map.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa: prevent multiple mempool config
Nipun Gupta [Wed, 24 Feb 2021 12:43:06 +0000 (18:13 +0530)]
net/dpaa: prevent multiple mempool config

The current driver only support single buffer pool on a given
PMD instance. Return error, if trying to configure more.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa: do not release CGR ranges
Nipun Gupta [Wed, 24 Feb 2021 12:43:05 +0000 (18:13 +0530)]
net/dpaa: do not release CGR ranges

CGR are automatically freed up in the kernel. As we do not cleanup
the queues, if we release the CGR here, kernel reports them in use.
So have them freed up in the kernel.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agomempool/dpaa2: support stats for secondary process
Hemant Agrawal [Wed, 24 Feb 2021 12:43:04 +0000 (18:13 +0530)]
mempool/dpaa2: support stats for secondary process

DPAA2 DPBP object access need availability of MCP object
pointer. In case of secondary process, we need to use local
MCP pointer instead of primary process.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: change Tx queue congestion settings
Hemant Agrawal [Wed, 24 Feb 2021 12:43:03 +0000 (18:13 +0530)]
net/dpaa2: change Tx queue congestion settings

Change the Tx queue congestion notification to
the ratio of current queue size instead of fixed.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: enable error queues optionally
Nipun Gupta [Wed, 24 Feb 2021 12:43:02 +0000 (18:13 +0530)]
net/dpaa2: enable error queues optionally

In case error packets are received by the Ethernet interface,
this patch enables receiving packets on the error queue,
printing the error and the error packet.

To enable, use the dev_arg as : fslmc:dpni.1,drv_error_queue=1

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: support optional Tx confirmation
Hemant Agrawal [Wed, 24 Feb 2021 12:43:01 +0000 (18:13 +0530)]
net/dpaa2: support optional Tx confirmation

Add support for dev arg ``fslmc:dpni.1,drv_tx_conf=1``

It is optional for dpaa2 to use TX confirmation. DPAA2
can free the transmitted packets. However some use-case
requires the TX confirmation to be explicit.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: do not drop parse error packets by dpdmux
Hemant Agrawal [Wed, 24 Feb 2021 12:43:00 +0000 (18:13 +0530)]
net/dpaa2: do not drop parse error packets by dpdmux

DPDMUX should not drop parse error packets. They shall
be left to the decision of the connected DPNI interfaces

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: skip resetting dpdmux
Apeksha Gupta [Wed, 24 Feb 2021 12:42:59 +0000 (18:12 +0530)]
net/dpaa2: skip resetting dpdmux

This is require as the interface is shared with Linux and we do not want
the dpdmux to be reset. Rather the default interface to kernel shall
continue.
command dpdmux_set_resetable is used to skip DPDMUX reset.

By default the DPDMUX_RESET command will reset the DPDMUX completely,
dpdmux_set_resetable command will be ignored in old MC firmware.

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: support raw pattern in dpdmux
Akhil Goyal [Wed, 24 Feb 2021 12:42:58 +0000 (18:12 +0530)]
net/dpaa2: support raw pattern in dpdmux

Added support for flow raw pattern and check that the call
for dpdmux_set_custom_key() which should be called
only once for a particular DPDMUX as all previous rules
will be erased with this call.
Hence calling it for the first time only.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: support configuring dpdmux max Rx frame length
Hemant Agrawal [Wed, 24 Feb 2021 12:42:57 +0000 (18:12 +0530)]
net/dpaa2: support configuring dpdmux max Rx frame length

This patch introduce a new PMD API, which can help the applications
to configure the max frame length for a given dpdmux interface

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: support traffic management
Gagandeep Singh [Wed, 24 Feb 2021 12:42:56 +0000 (18:12 +0530)]
net/dpaa2: support traffic management

Add basic support for scheduling and shaping on dpaa2
platform.

HW supports 2 level of scheduling and shaping.
However the current patch only support single level.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa: support external buffers in Tx
Hemant Agrawal [Wed, 24 Feb 2021 12:42:55 +0000 (18:12 +0530)]
net/dpaa: support external buffers in Tx

This patch support tx of external buffers

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: support external buffers in Tx
Nipun Gupta [Wed, 24 Feb 2021 12:42:54 +0000 (18:12 +0530)]
net/dpaa2: support external buffers in Tx

This patch support Tx of external allocated buffers.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Signed-off-by: Sachin Saxena <sachin.saxena@oss.nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: allocate SGT from first segment
Hemant Agrawal [Wed, 24 Feb 2021 12:42:53 +0000 (18:12 +0530)]
net/dpaa2: allocate SGT from first segment

This patch enables support to use the first segment
headroom to build the HW required Scatter Gather
Table. (if space is available).
This will avoid 1 less buffer for SG buffer creation.

Signed-off-by: Sachin Saxena <sachin.saxena@oss.nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa: fix getting link status
Rohit Raj [Wed, 24 Feb 2021 12:42:52 +0000 (18:12 +0530)]
net/dpaa: fix getting link status

According to DPDK Documentation, rte_eth_link_get API can wait up to 9
seconds for auto-negotiation to finish and then returns link status.

In current implementation of rte_eth_link_get API in DPAA drivers, it
was not waiting for auto negotiation to finish and was returning link
status DOWN
It can cause issues with DPDK applications which relies
on rte_eth_link_get API for link statusand does not support link status
interrupt.

This patch fixes this bug by adding wait for up to 9 seconds for auto
negotiation to finish.

Fixes: 2aa10990a8dd ("bus/dpaa: enable link state interrupt")
Cc: stable@dpdk.org
Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agonet/dpaa2: fix getting link status
Rohit Raj [Wed, 24 Feb 2021 12:42:51 +0000 (18:12 +0530)]
net/dpaa2: fix getting link status

According to DPDK Documentation, rte_eth_link_get API can wait up to 9
seconds for auto-negotiation to finish and then returns link status.

In current implementation of rte_eth_link_get API in DPAA2 drivers, it
was not waiting for auto negotiation to finish and was returning link
status DOWN
It can cause issues with DPDK applications which relies on
rte_eth_link_get API for link status and does not support link status
interrupt.
Similar kind of issue was seen in TRex Application.

This patch fixes this bug by adding wait for up to 9 seconds for auto
negotiation to finish.

Fixes: c56c86ff87c1 ("net/dpaa2: update link status")
Cc: stable@dpdk.org
Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agobus/dpaa: fix statistics reading
Nipun Gupta [Wed, 24 Feb 2021 12:42:50 +0000 (18:12 +0530)]
bus/dpaa: fix statistics reading

Reading of word un-aligned values after reading word aligned
values lead to corruption of memory.
This patch make changes such that word aligned access is made,
before making an un-aligned access

Fixes: 6d6b4f49a155 ("bus/dpaa: add FMAN hardware operations")
Cc: stable@dpdk.org
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agobus/fslmc: fix random portal hangs with qbman 5.0
Youri Querry [Wed, 24 Feb 2021 12:42:49 +0000 (18:12 +0530)]
bus/fslmc: fix random portal hangs with qbman 5.0

Random portal hangs observed on device with QBMAN 5.0

This fixes few random packet hang issues in event mode.
Few things fixed it.
1. Generally, pi == ci, no need for extra checks.
2. The proper initializations in init with ci

Fixes: 1b49352f41be ("bus/fslmc: rename portal pi index to consumer index")
Cc: stable@dpdk.org
Signed-off-by: Youri Querry <youri.querry_1@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agoapp/testpmd: remove duplicated offload display
Ferruh Yigit [Fri, 5 Feb 2021 14:26:50 +0000 (14:26 +0000)]
app/testpmd: remove duplicated offload display

"show port cap all|<port_id>" was to display offload configuration of
port(s).

But later two other commands added to show same information in more
accurate way:
 show port (port_id) rx_offload configuration
 show port (port_id) tx_offload configuration

These new commands can both show port and queue level configuration,
also with their capabilities counterparts easier to see offload
capability and configuration of the port in similar syntax.

So the functionality is duplicated and removing this version, to favor
the new commands.

Another problem with this command is it requires each new offload to be
added into the function to display them, and there were missing offloads
that are not displayed, this requirement for sure will create gaps by
time as new offloads added.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
3 years agoapp/testpmd: count outer IP checksum errors
Lance Richardson [Fri, 29 Jan 2021 22:35:54 +0000 (17:35 -0500)]
app/testpmd: count outer IP checksum errors

Count and display outer IP checksum errors in the checksum
forwarder.

Example forwarder stats output:
  RX-packets: 158            RX-dropped: 0             RX-total: 158
  Bad-ipcsum: 48             Bad-l4csum: 48            Bad-outer-l4csum: 6
  Bad-outer-ipcsum: 40
  TX-packets: 0              TX-dropped: 0             TX-total: 0

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Acked-by: Wisam Jaddo <wisamm@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/iavf: fix VLAN tag extraction handling
Haiyue Wang [Tue, 23 Feb 2021 03:10:58 +0000 (11:10 +0800)]
net/iavf: fix VLAN tag extraction handling

The new VIRTCHNL_VF_OFFLOAD_VLAN_V2 capability added support that allows
the PF to set the location of the RX VLAN tag for stripping offloads.

So the VF needs to extract the VLAN tag according to the location flags.

Fixes: 1c301e8c3cff ("net/iavf: support new VLAN capabilities")
Cc: stable@dpdk.org
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Tested-by: Wei Xie <weix.xie@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/mlx5: fix metadata item validation for ingress flows
Viacheslav Ovsiienko [Wed, 10 Feb 2021 09:30:51 +0000 (11:30 +0200)]
net/mlx5: fix metadata item validation for ingress flows

In legacy metadata mode the metadata register B is engaged to
handle the metadata item. In the ingress domain the hardware
supports the register setting only, the match on register B
is not supported.

Due to this limitation only the SET_META action can be supported
for the ingress flows, the META item should be rejected on
flow validation.

Fixes: 5f3541724e08 ("net/mlx5: fix flow META item validation")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agocommon/mlx5: fix DevX read output buffer size
Dekel Peled [Thu, 18 Feb 2021 16:18:05 +0000 (18:18 +0200)]
common/mlx5: fix DevX read output buffer size

Previous patch included a glue function call, with wrong size
calculation for an output buffer.
This patch fixes the issue, using the correct size calculation.

Fixes: bb7ef9a96281 ("common/mlx5: add register access DevX routine")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agonet/mlx5: fix TCP flag field modification
Alexander Kozyrev [Fri, 5 Feb 2021 03:03:04 +0000 (03:03 +0000)]
net/mlx5: fix TCP flag field modification

Wrong modification field ID is used for TCP flags: the inner
TCP flag field is changing instead of the outermost one.
Use the proper field ID to match the expectations.

Fixes: 641dbe4fb053 ("net/mlx5: support modify field flow action")
Cc: stable@dpdk.org
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agonet/mlx5: fix external buffer pool registration for Rx queue
Viacheslav Ovsiienko [Fri, 12 Feb 2021 11:06:30 +0000 (13:06 +0200)]
net/mlx5: fix external buffer pool registration for Rx queue

On Rx queue creation the mlx5 PMD registers the data buffers of the
specified pools for DMA operations. It scans the mem_list of the pools
and creates the MRs (DMA related NIC objects) for the chunks found.
If the pool is created with rte_pktmbuf_pool_create_extbuf() and
refers to the external attached buffers (whose are in the area of
application responsibility and it should explicitly register the
data buffer memory for DMA with rte_dev_dma_map() call) the chunks
contain the mbuf structures only, w/o any built-in data buffers.
Hence, DMA with mlx5 NIC never happens to this area and there is
no need to create MRs for these ones.

The extra not needed MRs were created for the pools with external
buffers causing MR cache load and performance was slightly affected.
The patch checks the mbuf pool type and skips MR creation for the
pools with external buffers.

Fixes: bdb8e5b1ea7b ("net/mlx5: allow allocated mbuf with external buffer")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agoapp/testpmd: remove unused struct member
Kathleen Capella [Tue, 9 Feb 2021 15:40:26 +0000 (15:40 +0000)]
app/testpmd: remove unused struct member

The tx_queue member of the fwd_lcore struct is unused as it is already
part of the fwd_stream structure. Deleting helps improve code readability.

Signed-off-by: Kathleen Capella <kathleen.capella@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
3 years agonet/pcap: support imissed stats
Ido Goshen [Thu, 4 Feb 2021 10:33:57 +0000 (12:33 +0200)]
net/pcap: support imissed stats

Get value from pcap_stats.ps_drop (see man pcap_stats)
the value is adjusted in this cases:
 - port stop - pcap is closed and will lose count
 - stats reset - pcap doesn't provide reset api
 - rollover - pcap counter size is u_32 only

Signed-off-by: Ido Goshen <ido@cgstowernetworks.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agodrivers/net: redefine array size macros
Andrew Boyer [Fri, 29 Jan 2021 22:44:32 +0000 (14:44 -0800)]
drivers/net: redefine array size macros

Replace copies of size(arr)/size(arr[0]) with RTE_DIM().
Eventually all of these macro definitions should be removed.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/vmxnet3: support device reset
Dheemanth Mallikarjun [Mon, 4 Jan 2021 19:43:08 +0000 (11:43 -0800)]
net/vmxnet3: support device reset

The vmxnet3 driver didn't have the dev_reset function
pointer set. Hence, provided the necessary function
pointer so that DPDK developers can use the rte_eth_dev_reset
API to reset the vmxnet3 device data.

Signed-off-by: Dheemanth Mallikarjun <dheemanthm@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
3 years agonet/failsafe: report minimum and maximum MTU
Andrew Rybchenko [Tue, 22 Dec 2020 08:51:49 +0000 (11:51 +0300)]
net/failsafe: report minimum and maximum MTU

Take minimum and maximum MTU values for subdevices and
report maximum of minimums and minimum of maximums.

Fixes: ad97ceece12c ("ethdev: add min/max MTU to device info")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Gaetan Rivet <grive@u256.net>
3 years agonet/failsafe: fix RSS hash offload reporting
Andrew Rybchenko [Tue, 22 Dec 2020 08:00:04 +0000 (11:00 +0300)]
net/failsafe: fix RSS hash offload reporting

If sub-devices support RSS hash offload, the offload should be
reported by the failsafe device since handling is transparent
from failsafe point of view.

Fixes: 5d308972954c ("ethdev: add mbuf RSS update as an offload")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Gaetan Rivet <grive@u256.net>
3 years agoapp/testpmd: display Rx queue used descriptor count
Lance Richardson [Fri, 12 Feb 2021 21:24:52 +0000 (16:24 -0500)]
app/testpmd: display Rx queue used descriptor count

Add support for displaying the count of used (filled by hardware
but not yet processed by the driver) descriptors on a receive
queue in order to allow the rte_eth_dev rx_queue_count() API to
be exercised and tested.

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
3 years agofbarray: fix log message on truncation error
Anatoly Burakov [Fri, 19 Feb 2021 17:54:45 +0000 (17:54 +0000)]
fbarray: fix log message on truncation error

When file truncation fails, the log message attempts to print a path of
file we failed to truncate, but this path was never set to anything and,
what's worse, was uninitialized. Fix it by passing path from the caller.

Coverity issue: 366122
Fixes: c44d09811b40 ("eal: add shared indexed file-backed array")
Cc: stable@dpdk.org
Reported-by: Andrew Boyer <aboyer@pensando.io>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agoeal/ppc: provide arch-specific TSC frequency
David Christensen [Wed, 3 Feb 2021 21:54:13 +0000 (13:54 -0800)]
eal/ppc: provide arch-specific TSC frequency

Return a PPC specific value for get_tsc_freq_arch() rather than
depending on the EAL framework to estimate the frequency.

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
3 years agomem: detach memsegs on cleanup
Anatoly Burakov [Mon, 14 Sep 2020 13:04:05 +0000 (14:04 +0100)]
mem: detach memsegs on cleanup

Currently, we don't detach the shared memory on EAL cleanup, which
leaves the page table descriptors still holding on to the file
descriptors as well as memory space occupied by them. Fix it by adding
another detach stage that closes the internal memory allocator resource
references, detaches shared fbarrays and unmaps the shared mem config.

Bugzilla ID: 380
Bugzilla ID: 381

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agoci: catch coredumps
David Marchand [Mon, 25 Jan 2021 15:05:39 +0000 (16:05 +0100)]
ci: catch coredumps

Parts of the unit tests code rely on forked/secondary processes
(expectedly) failing.
A crash in those situations could be missed so add a check on coredumps
presence after unit tests have run.
When unit tests fail, it can also help checking for coredumps as it
could give more insights on what happened.

In some situations (like explicit call to rte_panic), coredump generation
must be disabled to avoid false positives.

Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Aaron Conole <aconole@redhat.com>
3 years agovfio: fix API description
Yunjian Wang [Sat, 6 Jun 2020 09:17:20 +0000 (17:17 +0800)]
vfio: fix API description

Fix few comments and add detailed comments for return value.

Fixes: 279b581c897d ("vfio: expose functions")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
3 years agopower: remove duplicated symbols from map file
Ferruh Yigit [Thu, 25 Feb 2021 10:54:49 +0000 (10:54 +0000)]
power: remove duplicated symbols from map file

This is causing build error, like:
https://travis-ci.com/github/ovsrobot/dpdk/jobs/482121104

Also '@internal' marker removed from doxygen comment, since public API
should not be internal.
Experimental tag removed from 'rte_power_guest_channel_send_msg()'

Fixes: 4d3892dcd77b ("power: make channel message functions public")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agoci: update arm64 Travis jobs to Graviton2
Juraj Linkeš [Tue, 23 Feb 2021 08:28:24 +0000 (09:28 +0100)]
ci: update arm64 Travis jobs to Graviton2

Use only the newer Graviton2 environment in Travis CI instead of using
the older platform, which has intermittent issues:
1. collect2: fatal error: ld terminated with signal 9 [Killed]
2. ticketlock_autotest sometimes times out

These failures hint at resource availability issues in container
environments. The Graviton2 environment is using VMs and these failures
are not observed in it.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Aaron Conole <aconole@redhat.com>
3 years agotest/mem: fix page size for external memory
Nithin Dabilpuram [Fri, 15 Jan 2021 07:32:43 +0000 (13:02 +0530)]
test/mem: fix page size for external memory

Currently external memory test uses 4K page size.
VFIO DMA mapping works only with system page granularity.

Earlier it was working because all the contiguous mappings
were coalesced and mapped in one-go which ended up becoming
a lot bigger page. Now that VFIO DMA mappings both in IOVA as VA
and IOVA as PA mode, are being done at memseg list granularity,
we need to use system page size.

Fixes: b270daa43b3d ("test: support external memory")
Cc: stable@dpdk.org
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
3 years agovfio: fix DMA mapping granularity for IOVA as VA
Nithin Dabilpuram [Fri, 15 Jan 2021 07:32:42 +0000 (13:02 +0530)]
vfio: fix DMA mapping granularity for IOVA as VA

Partial unmapping is not supported for VFIO IOMMU type1
by kernel. Though kernel gives return as zero, the unmapped size
returned will not be same as expected. So check for
returned unmap size and return error.

For IOVA as PA, DMA mapping is already at memseg size
granularity. Do the same even for IOVA as VA mode as
DMA map/unmap triggered by heap allocations,
maintain granularity of memseg page size so that heap
expansion and contraction does not have this issue.

For user requested DMA map/unmap disallow partial unmapping
for VFIO type1.

Fixes: 73a639085938 ("vfio: allow to map other memory regions")
Cc: stable@dpdk.org
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: David Christensen <drc@linux.vnet.ibm.com>
3 years agovfio: do not merge contiguous areas
Nithin Dabilpuram [Fri, 15 Jan 2021 07:32:41 +0000 (13:02 +0530)]
vfio: do not merge contiguous areas

In order to save DMA entries limited by kernel both for external
memory and hugepage memory, an attempt was made to map physically
contiguous memory in one go. This cannot be done as VFIO IOMMU type1
does not support partially unmapping a previously mapped memory
region while Heap can request for multi page mapping and
partial unmapping.
Hence for going back to old method of mapping/unmapping at
memseg granularity, this commit reverts
commit d1c7c0cdf7ba ("vfio: map contiguous areas in one go")

Also add documentation on what module parameter needs to be used
to increase the per-container dma map limit for VFIO.

Fixes: d1c7c0cdf7ba ("vfio: map contiguous areas in one go")
Cc: stable@dpdk.org
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: David Christensen <drc@linux.vnet.ibm.com>
3 years agomaintainers: update for crypto
Akhil Goyal [Tue, 23 Feb 2021 08:42:49 +0000 (14:12 +0530)]
maintainers: update for crypto

Recently joined Marvell, hence change in
email id for crypto sub tree, security API
and ipsec-secgw application maintainers list.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
3 years agomaintainers: update for NXP pfe and dpaax_sec
Hemant Agrawal [Thu, 18 Feb 2021 13:16:31 +0000 (18:46 +0530)]
maintainers: update for NXP pfe and dpaax_sec

remove Akhil
add Gagan

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agoversion: 21.05-rc0
Thomas Monjalon [Mon, 15 Feb 2021 09:12:57 +0000 (10:12 +0100)]
version: 21.05-rc0

Start a new release cycle with empty release notes.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
3 years agoversion: 21.02.0
Thomas Monjalon [Sun, 14 Feb 2021 09:58:34 +0000 (10:58 +0100)]
version: 21.02.0

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
3 years agodoc: update release notes for 21.02
John McNamara [Thu, 11 Feb 2021 12:04:21 +0000 (12:04 +0000)]
doc: update release notes for 21.02

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

Signed-off-by: John McNamara <john.mcnamara@intel.com>
3 years agodoc: add pmdinfogen rewrite to release notes
Dmitry Kozlyuk [Fri, 12 Feb 2021 10:40:53 +0000 (11:40 +0100)]
doc: add pmdinfogen rewrite to release notes

The build tool pmdinfogen was rewritten in DPDK 21.02,
adding Windows support.
There is a new build-time dependency: pyelftools.

Fixes: f0f93a7adfee ("buildtools: use Python pmdinfogen")
Fixes: 6b19edcb663c ("build: enable pmdinfogen for Windows")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agodoc: update pyelftools install method
Kevin Traynor [Fri, 12 Feb 2021 14:46:28 +0000 (14:46 +0000)]
doc: update pyelftools install method

python-pyelftools is not packaged for RHEL/CentOS with
the exception of RHEL7 EPEL.

Add command to install it with pip.

Fixes: f0f93a7adfee ("buildtools: use Python pmdinfogen")

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agoversion: 21.02-rc4
Thomas Monjalon [Thu, 11 Feb 2021 22:54:28 +0000 (23:54 +0100)]
version: 21.02-rc4

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
3 years agodoc: replace hugepages commands with dedicated tool
Thomas Monjalon [Thu, 11 Feb 2021 18:16:59 +0000 (19:16 +0100)]
doc: replace hugepages commands with dedicated tool

The tool dpdk-hugepages.py, added in DPDK 20.11,
is referenced in the guides instead of more complicate commands.

The original Linux commands are kept in linux_gsg/sys_reqs.rst
and nics/build_and_test.rst.

Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agousertools: fix binding built-in kernel driver
Yongxin Liu [Mon, 23 Nov 2020 03:05:33 +0000 (11:05 +0800)]
usertools: fix binding built-in kernel driver

A driver can be loaded as a dynamic module or a built-in module.
In commit 681a67288655 ("usertools: check if module is loaded
before binding"), the script only checks modules in /sys/module/.

However, for built-in kernel driver, it only shows up in /sys/module/,
if it has a version or at least one parameter. So add check for
modules in /lib/modules/$(uname -r)/modules.builtin.

Fixes: 681a67288655 ("usertools: check if module is loaded before binding")
Cc: stable@dpdk.org
Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
3 years agousertools: show valid hugepage sizes if wrong request
Sarosh Arif [Thu, 11 Feb 2021 08:20:04 +0000 (13:20 +0500)]
usertools: show valid hugepage sizes if wrong request

If user requests a hugepage size which is not supported by the system,
currently user gets an error message saying that the requested size
is not a valid system huge page size. In addition to this if we display
the valid hugepage sizes it will be convenient for the user to request
the right size next time.

Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agodoc: replace testpmd with dpdk-testpmd in commands
Sarosh Arif [Thu, 11 Feb 2021 07:19:37 +0000 (12:19 +0500)]
doc: replace testpmd with dpdk-testpmd in commands

replace testpmd with dpdk-testpmd in all commands
because on compilation through meson, dpdk-testpmd is the default
application name.

Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agodoc: add tested platforms with NXP SoCs
Hemant Agrawal [Thu, 11 Feb 2021 13:25:34 +0000 (18:55 +0530)]
doc: add tested platforms with NXP SoCs

Add tested platforms with NXP SoCs to the 21.02 release notes.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agodoc: add tested platforms for Broadcom NICs
Ajit Khaparde [Thu, 11 Feb 2021 06:22:36 +0000 (22:22 -0800)]
doc: add tested platforms for Broadcom NICs

Add tested platforms for Broadcom NICs.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
3 years agodoc: add tested platforms with Mellanox NICs
Raslan Darawsheh [Wed, 10 Feb 2021 12:30:18 +0000 (14:30 +0200)]
doc: add tested platforms with Mellanox NICs

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

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
3 years agodoc: add tested Intel platforms with Intel NICs
Bo Chen [Tue, 9 Feb 2021 11:17:25 +0000 (06:17 -0500)]
doc: add tested Intel platforms with Intel NICs

Add tested Intel platforms with Intel NICs to v21.02 release note.

Signed-off-by: Bo Chen <box.c.chen@intel.com>
3 years agoapp/testpmd: fix help of metering commands
Ferruh Yigit [Tue, 9 Feb 2021 14:15:06 +0000 (14:15 +0000)]
app/testpmd: fix help of metering commands

Helps strings syntax is "command : description", the 'command' part was
missing, updated command help strings.

Fixes: 281eeb8afc55 ("app/testpmd: add commands for metering and policing")
Fixes: 30ffb4e67ee3 ("app/testpmd: add commands traffic metering and policing")
Fixes: e63b50162aa3 ("app/testpmd: clean metering and policing commands")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
3 years agodoc: fix mark action zero value in mlx5 guide
Viacheslav Ovsiienko [Fri, 5 Feb 2021 12:15:04 +0000 (14:15 +0200)]
doc: fix mark action zero value in mlx5 guide

The zero value in flow MARK action is reported in Rx datapath
as tagged with zero FDIR ID. Once packet is marked in flow engine
it will be always reported as tagged. For metadata only the zero
value means there is "no metadata" in the packet and the metadata
flag is not set for the case.

Fixes: 3ceeed9f7855 ("doc: update flow mark action in mlx5 guide")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agovdpa/mlx5: fix polling threads scheduling
Matan Azrad [Mon, 8 Feb 2021 09:28:01 +0000 (09:28 +0000)]
vdpa/mlx5: fix polling threads scheduling

When the event mode is with 0 fixed delay, the polling-thread will never
give-up CPU.

So, when multi-polling-threads are active, the context-switch between
them will be managed by the system which may affect latency according to
the time-out decided by the system.

In order to fix multi-devices polling thread scheduling, this patch
forces rescheduling for each CQ poll iteration.

Move the polling thread to SCHED_RR mode with maximum priority to
complete the fairness.

Fixes: 6956a48cabbb ("vdpa/mlx5: set polling mode default delay to zero")

Signed-off-by: Matan Azrad <matan@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Xueming Li <xuemingl@nvidia.com>
3 years agovhost: fix packed ring dequeue offloading
Marvin Liu [Fri, 5 Feb 2021 07:47:58 +0000 (15:47 +0800)]
vhost: fix packed ring dequeue offloading

When vhost is doing dequeue offloading, it parses ethernet and L3/L4
headers of the packet. Then vhost will set corresponding value in mbuf
attributes. It means offloading action should be after packet data copy.

Fixes: 75ed51697820 ("vhost: add packed ring batch dequeue")
Cc: stable@dpdk.org
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
3 years agonet/ixgbe: fix UDP zero checksum on Arm
Feifei Wang [Mon, 8 Feb 2021 09:07:04 +0000 (17:07 +0800)]
net/ixgbe: fix UDP zero checksum on Arm

There is an 82599 errata that UDP frames with a zero checksum are
incorrectly marked as checksum invalid by the hardware.  This was
leading to misleading PKT_RX_L4_CKSUM_BAD flag.

To fix it for the NEON path in Arm platform, change the bad UDP checksum to
unknown, and then let software application to recompute the checksum.

NICs: 82599(igb)
Driver: ixgbe(vector)
Architecture: arm64
$:./app/dpdk-testpmd -c 0x3 -w 0002:f9:00.0 -- -i
--port-topology=chained --enable-rx-cksum
test-pmd> set fwd rxonly
test-pmd> set verbose 1
test-pmd> start

1. UDP Test:
Package: (Ether()/IP()/UDP(checksum=0)
ol_flags: PKT_RX_L4_CKSUM_UNKNOWN PKT_RX_IP_CKSUM_GOOD

2. TCP Test:
Package: (Ether()/IP()/TCP(checksum=0)
ol_flags: PKT_RX_L4_CKSUM_BAD PKT_RX_IP_CKSUM_GOOD

Bugzilla ID: 629
Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Reported-by: Paolo Valerio <pvalerio@redhat.com>
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
3 years agonet/ixgbe: fix UDP zero checksum on x86
Haiyue Wang [Thu, 4 Feb 2021 14:39:48 +0000 (22:39 +0800)]
net/ixgbe: fix UDP zero checksum on x86

There is an 82599 errata that UDP frames with a zero checksum are
incorrectly marked as checksum invalid by the hardware.  This was
leading to misleading PKT_RX_L4_CKSUM_BAD flag.

This patch changes the bad UDP checksum to PKT_RX_L4_CKSUM_UNKNOWN,
so the software application will then have to recompute the checksum
itself if needed.

Bugzilla ID: 629
Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Reported-by: Paolo Valerio <pvalerio@redhat.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Paolo Valerio <pvalerio@redhat.com>
3 years agoethdev: refine doxygen comment of UDP tunnel API
Qi Zhang [Wed, 3 Feb 2021 20:02:20 +0000 (21:02 +0100)]
ethdev: refine doxygen comment of UDP tunnel API

Clarify what is the scope and impact of the UDP port tunnel API.

There are still missing infos to be improved in future:
- no capability flag
- dependency between ports of the same device
- required privilege

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>