dpdk.git
3 years agonet/mvpp2: expose max MTU
Liron Himi [Wed, 27 Jan 2021 16:09:40 +0000 (18:09 +0200)]
net/mvpp2: expose max MTU

Expose max-MTU based on the max frame size that
l4 checksum generation can be done by HW.

Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Yuri Chipchev <yuric@marvell.com>
3 years agonet/mvpp2: update flow control autoneg disable handling
Yuri Chipchev [Wed, 27 Jan 2021 16:09:39 +0000 (18:09 +0200)]
net/mvpp2: update flow control autoneg disable handling

Flow control autoneg disable is not supported

Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: introduce fixup for FIFO overrun
Liron Himi [Wed, 27 Jan 2021 16:09:38 +0000 (18:09 +0200)]
net/mvpp2: introduce fixup for FIFO overrun

Currently the HW is configured with only one pool which its
buffer size may be larger than the rx-fifo-size.
In that situation, frame size larger than the fifo-size
is gets dropped due to fifo overrun.
This is cause because the HW works in cut-through mode which
waits to have in the fifo at least the amount of bytes as define
in the smallest pool's buffer size.

This patch add a dummy pool which its buffer size
is very small (smaller than 64B frame). This tricks the HW and
any frame size is gets passed from the FIFO to the PP2.

Signed-off-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: rearrange functions order
Liron Himi [Wed, 27 Jan 2021 16:09:37 +0000 (18:09 +0200)]
net/mvpp2: rearrange functions order

Rearrange functions order

Signed-off-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: support user defined configuration
Liron Himi [Wed, 27 Jan 2021 16:09:36 +0000 (18:09 +0200)]
net/mvpp2: support user defined configuration

Extend the config file with 'udf' (user-defined) settings

Signed-off-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: skip QoS init if not requested
Liron Himi [Wed, 27 Jan 2021 16:09:35 +0000 (18:09 +0200)]
net/mvpp2: skip QoS init if not requested

Skip qos init if not requested

Signed-off-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: support raw flow pattern
Liron Himi [Wed, 27 Jan 2021 16:09:34 +0000 (18:09 +0200)]
net/mvpp2: support raw flow pattern

Add support for RAW type and connect it to MUSDK UDF

Signed-off-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: move common functions to common location
Liron Himi [Wed, 27 Jan 2021 16:09:33 +0000 (18:09 +0200)]
net/mvpp2: move common functions to common location

Move common functions to common location

Signed-off-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: build flow table key along with rule
Liron Himi [Wed, 27 Jan 2021 16:09:32 +0000 (18:09 +0200)]
net/mvpp2: build flow table key along with rule

Currently the key is always built in network order
regardless of user input.
Besides the fact that it is not in user order,
it prevent future support for udf header between standard headers.
This patch builds the key while parsing the given rule.

Signed-off-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: support generic flow pattern combinations
Liron Himi [Wed, 27 Jan 2021 16:09:31 +0000 (18:09 +0200)]
net/mvpp2: support generic flow pattern combinations

Currently only specific pattern combinations are supported.
This makes it hard to support additional pattern.
In addition there is no a real limitation that prevent any combination.
This patch iterate the input patterns and convert them to a mvpp2 API.

The doc doesn't describes those limitation so
just update the action list

Signed-off-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: use generic name for global config variable
Liron Himi [Wed, 27 Jan 2021 16:09:30 +0000 (18:09 +0200)]
net/mvpp2: use generic name for global config variable

As the config file is not just for 'qos'
it is more accurate to replace the name from 'qos_cfg'
to 'cfg'

Signed-off-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: adjust number of unicast address
Liron Himi [Wed, 27 Jan 2021 16:09:29 +0000 (18:09 +0200)]
net/mvpp2: adjust number of unicast address

HW support 25 mac address for filtering plus one for
the primary mac address.

Signed-off-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: add Tx flow control
Yuri Chipchev [Wed, 27 Jan 2021 16:09:28 +0000 (18:09 +0200)]
net/mvpp2: add Tx flow control

Add tx flow control operations.

Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: support DSA mode
Liron Himi [Wed, 27 Jan 2021 16:09:27 +0000 (18:09 +0200)]
net/mvpp2: support DSA mode

Extend the config file with 'dsa-mode' field.
Currently 'eth' (default) and 'dsa' headers are supported.

Signed-off-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: update Tx checksum
Liron Himi [Wed, 27 Jan 2021 16:09:26 +0000 (18:09 +0200)]
net/mvpp2: update Tx checksum

According to the dpdk spec, only 'ol_flags'
should be used for tx checksum generation

Signed-off-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: support VLAN offload
Yuri Chipchev [Wed, 27 Jan 2021 16:09:25 +0000 (18:09 +0200)]
net/mvpp2: support VLAN offload

Enable VLAN filter configuration

Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: support loopback
Yuri Chipchev [Wed, 27 Jan 2021 16:09:24 +0000 (18:09 +0200)]
net/mvpp2: support loopback

Add support for loopback mode

Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: save initial configuration
Yuri Chipchev [Wed, 27 Jan 2021 16:09:23 +0000 (18:09 +0200)]
net/mvpp2: save initial configuration

Save configuration that was done prior 'start' as
only then the ppio is being configured.

Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: align checking order
Yuri Chipchev [Wed, 27 Jan 2021 16:09:22 +0000 (18:09 +0200)]
net/mvpp2: align checking order

First check for 'isolated' and then for '!ppio'

Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: do cosmetic changes to cookie usage
Yuri Chipchev [Wed, 27 Jan 2021 16:09:21 +0000 (18:09 +0200)]
net/mvpp2: do cosmetic changes to cookie usage

No need to add high address to cookie on transmit side, as it has
already 64bit value

Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: update RSS tables reservation
Yuri Chipchev [Wed, 27 Jan 2021 16:09:20 +0000 (18:09 +0200)]
net/mvpp2: update RSS tables reservation

In kernel-4.14 the pp2 kernel occupied 4 RSS tables
as opposed to 1 RSS table in older version.

Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: fix frame size checking
Liron Himi [Wed, 27 Jan 2021 16:09:19 +0000 (18:09 +0200)]
net/mvpp2: fix frame size checking

Need to add CRC len to the frame-size to compare against
max_rx_pkt_len which includes it.

Fixes: 79ec62028b9a ("net/mvpp2: update MTU and MRU related calculations")
Cc: stable@dpdk.org
Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Yuri Chipchev <yuric@marvell.com>
3 years agonet/mvpp2: remove CRC length from MRU validation
Liron Himi [Wed, 27 Jan 2021 16:09:18 +0000 (18:09 +0200)]
net/mvpp2: remove CRC length from MRU validation

CRC is being removed by HW before packet get
write to the buffer, so CRC len should not be
included in MRU validation

Fixes: 79ec62028b9a ("net/mvpp2: update MTU and MRU related calculations")
Cc: stable@dpdk.org
Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Yuri Chipchev <yuric@marvell.com>
3 years agonet/mvpp2: remove VLAN flush
Liron Himi [Wed, 27 Jan 2021 16:09:17 +0000 (18:09 +0200)]
net/mvpp2: remove VLAN flush

VLAN-flush in MUSDK is not supported yet.
Until it does, the code should be removed as currently
an redundant error message is displayed.

Fixes: a8f3d6783a3c ("net/mrvl: support VLAN filtering")
Cc: stable@dpdk.org
Signed-off-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: remove debug log on fast-path
Liron Himi [Wed, 27 Jan 2021 16:09:16 +0000 (18:09 +0200)]
net/mvpp2: remove debug log on fast-path

In case of non-ip frame the current code reached the 'default'
case which result with function call to log a msg.
Those kind of calls should not be performed on fast-path.

The performance for this kind of frames increased by 50%

Fixes: acab7d58c81b ("net/mvpp2: convert to dynamic logging")
Cc: stable@dpdk.org
Signed-off-by: Liron Himi <lironh@marvell.com>
3 years agonet/mvpp2: fix stack corruption
Yuri Chipchev [Wed, 27 Jan 2021 16:09:15 +0000 (18:09 +0200)]
net/mvpp2: fix stack corruption

Fixes stack corruption in mrvl_fill_bpool function
in case num > MRVL_PP2_RXD_MAX

Fixes: c3637258d894 ("net/mrvl: fix Rx descriptors number")
Cc: stable@dpdk.org
Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
3 years agonet/bnxt: update copyright year
Ajit Khaparde [Wed, 27 Jan 2021 16:09:43 +0000 (08:09 -0800)]
net/bnxt: update copyright year

Update copyright year in various files.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
3 years agonet/nfp: free port private data on close
Heinrich Kuhn [Tue, 19 Jan 2021 11:56:17 +0000 (13:56 +0200)]
net/nfp: free port private data on close

Free the private data of a port when the .dev_close() callback is
invoked. For NFP6000/4000 devices multiple ports may exist under a
single PF device. In this situation the PF resources will only be freed
when all the ports associated with the PF has been freed too.

PF hot plugging isn't explicitly supported for NFP6000/4000 devices but
all the private data of all the ports under the PF in question will be
freed upon device removal.

Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Reviewed-by: Louis Peens <louis.peens@netronome.com>
3 years agonet/nfp: create separate entity for PF device
Heinrich Kuhn [Tue, 19 Jan 2021 11:56:16 +0000 (13:56 +0200)]
net/nfp: create separate entity for PF device

Before this change memory for the private data of all physical ports
where allocated with single rte_zmalloc() call. Specific port private
data was accessed by means of an offset into this memory. This scheme is
problematic when attempting to free only one port's private data at a
time.

To address this, a new entity is created called struct nfp_pf_dev. This
struct represents the PF device. It has a number of PF specific members.
Notably it has a pointer of type rte_eth_dev that points to the eth_dev
associated with the first physical port of the device. It also has an
array of nfp_net_hw's containing pointers to all the physical ports
under the PF.

Memory is first allocated for the PF and PF specific initialization is
attempted. Next, all the physical ports under the PF is iterated and
memory is allocated separately for the private data of each port. Port 0
is skipped during this phase because memory has already been allocated
and an eth_dev already exits for the 0th port.

Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Reviewed-by: Louis Peens <louis.peens@netronome.com>
3 years agonet/ionic: fix address handling in Tx
Andrew Boyer [Mon, 18 Jan 2021 20:35:08 +0000 (12:35 -0800)]
net/ionic: fix address handling in Tx

Don't assume standard headroom.
Use helper variables to improve readability.

Fixes: a27d901331da ("net/ionic: add Rx and Tx handling")
Cc: stable@dpdk.org
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: fix up function attribute tags
Andrew Boyer [Mon, 18 Jan 2021 20:35:07 +0000 (12:35 -0800)]
net/ionic: fix up function attribute tags

One function marked cold is in the hot path.
Make sure to always inline hot path functions.

Fixes: a27d901331da ("net/ionic: add Rx and Tx handling")
Cc: stable@dpdk.org
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: convert per-queue offloads into queue flags
Andrew Boyer [Mon, 18 Jan 2021 20:35:06 +0000 (12:35 -0800)]
net/ionic: convert per-queue offloads into queue flags

This will conserve resources by reducing struct ionic_qcq.

Saving a cacheline or two in the rxq and txq structs helps when
running in embedded configurations where CPU cache space is at a
premium.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: allow separate L3 and L4 checksum offload
Andrew Boyer [Mon, 18 Jan 2021 20:35:05 +0000 (12:35 -0800)]
net/ionic: allow separate L3 and L4 checksum offload

DTS, at least, expects to be able to specify L4 checksum offload
without L3 csum offload. Split up the flag checks.

Fixes: a27d901331da ("net/ionic: add Rx and Tx handling")
Cc: stable@dpdk.org
Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: observe endiannness in ioread/iowrite
Andrew Boyer [Mon, 18 Jan 2021 20:35:04 +0000 (12:35 -0800)]
net/ionic: observe endiannness in ioread/iowrite

The IONIC FW is little-endian.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: inline queue space function
Andrew Boyer [Mon, 18 Jan 2021 20:35:03 +0000 (12:35 -0800)]
net/ionic: inline queue space function

This is a hot-path function.
Remove ionic_q_has_space() while here.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: inline queue flush function
Andrew Boyer [Mon, 18 Jan 2021 20:35:02 +0000 (12:35 -0800)]
net/ionic: inline queue flush function

This is hot-path function.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Signed-off-by: Neel Patel <neel@pensando.io>
3 years agonet/ionic: query firmware for supported queue versions
Andrew Boyer [Mon, 18 Jan 2021 20:35:00 +0000 (12:35 -0800)]
net/ionic: query firmware for supported queue versions

This allows the PMD to better support FW changes.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Signed-off-by: Shannon Nelson <snelson@pensando.io>
3 years agonet/ionic: observe endianness in Rx filter
Andrew Boyer [Mon, 18 Jan 2021 20:34:58 +0000 (12:34 -0800)]
net/ionic: observe endianness in Rx filter

The IONIC firmware is little-endian.
Add a new field to struct ionic_rx_filter to store the CPU-endian
match type.
Use a local variable for the VLAN when searching the hash table.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: observe endianness in firmware commands
Andrew Boyer [Mon, 18 Jan 2021 20:34:57 +0000 (12:34 -0800)]
net/ionic: observe endianness in firmware commands

The IONIC firmware is little-endian.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agonet/ionic: strip out unneeded interrupt code
Andrew Boyer [Mon, 18 Jan 2021 20:34:56 +0000 (12:34 -0800)]
net/ionic: strip out unneeded interrupt code

Only the NotifyQ uses an interrupt, so simplify the other queues.

Simplify ionic_dev_cmd_adminq_init() and ionic_cq_init().
Move ionic_intr_alloc() into ionic_notify_qcq_alloc().
Create ionic_lif_notifyq_deinit().
Simplify ionic_lif_qcq_deinit().
Remove unneeded flags and defines.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
3 years agovdpa/mlx5: fix configuration mutex cleanup
Matan Azrad [Wed, 6 Jan 2021 06:43:29 +0000 (06:43 +0000)]
vdpa/mlx5: fix configuration mutex cleanup

When the vDPA device is closed, the driver polling thread is canceled.
The polling thread locks the configuration mutex while it polls the CQs.

When the cancellation happens, it may terminate the thread inside the
critical section what remains the configuration mutex locked.

After device close, the driver may be configured again, in this case,
for example, when the first queue state is updated, the driver tries to
lock the mutex again and deadlock appears.

Initialize the mutex after the polling thread cancellation.

Fixes: 99abbd62c272 ("vdpa/mlx5: fix queue update synchronization")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
3 years agonet/virtio: fix Arm build with old compiler
Joyce Kong [Tue, 26 Jan 2021 09:57:43 +0000 (17:57 +0800)]
net/virtio: fix Arm build with old compiler

In file included from ../drivers/net/virtio/virtio_rxtx_packed.c:22:0:
../drivers/net/virtio/virtio_rxtx_packed_neon.h:
In function ‘virtqueue_enqueue_batch_packed_vec’:
../drivers/net/virtio/virtio_rxtx_packed_neon.h:74:2: warning:
implicit declaration of function ‘vreinterpretq_p128_u32’
[-Wimplicit-function-declaration]
poly128_t cmp1 = vreinterpretq_p128_u32(~vceqq_u32(ref_seg, def_ref_seg));

The message shows ‘vreinterpretq_p128_u32’ intrinsic is not supported
because an old version gcc (gcc 4.8.5) is used. So fix the issue with
implementing the logic with other intrinsics.

Bugzilla ID: 621
Fixes: 530887469350 ("net/virtio: add vectorized packed ring NEON Tx")
Fixes: 5971ce5e2a59 ("net/virtio: add vectorized packed ring NEON Rx")

Reported-by: Subhi Masri <subhim@nvidia.com>
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Subhi Masri <subhim@nvidia.com>
3 years agoexamples/vhost: refactor vhost data path
Cheng Jiang [Tue, 12 Jan 2021 04:38:57 +0000 (04:38 +0000)]
examples/vhost: refactor vhost data path

Change the vm2vm data path to batch enqueue for better performance.
Support latest async vhost API, refactor vhost async data path,
replace rte_atomicNN_xxx to __atomic_XXX and clean some codes.

Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com>
Reviewed-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
3 years agoexamples/vhost: add ioat ring space count and check
Cheng Jiang [Tue, 12 Jan 2021 04:38:56 +0000 (04:38 +0000)]
examples/vhost: add ioat ring space count and check

Add ioat ring space count and check, if ioat ring space is not enough
for the next async vhost packet enqueue, then just return to prevent
enqueue failure. Add rte_ioat_completed_ops() fail handler.

Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com>
Reviewed-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
3 years agonet/virtio: handle virtio-user setup failure properly
Maxime Coquelin [Tue, 26 Jan 2021 10:16:39 +0000 (11:16 +0100)]
net/virtio: handle virtio-user setup failure properly

This patch fixes virtio_user_dev_setup() error path,
by cleaning all resources it allocates. It introduces
virtio_user_dev_uninit_notify() that cleans all open
FDs. It implies assigning all FDs to -1 at init time.

With these changes done, virtio_user_dev_init_notify()
can be simplified.

Suggested-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: improve vhost-user error logging
Maxime Coquelin [Tue, 26 Jan 2021 10:16:38 +0000 (11:16 +0100)]
net/virtio: improve vhost-user error logging

This patch improves error logging in vhost_user_read,
especially printing errno when recv() fails.

Suggested-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: move vhost-vDPA data to its backend
Maxime Coquelin [Tue, 26 Jan 2021 10:16:37 +0000 (11:16 +0100)]
net/virtio: move vhost-vDPA data to its backend

As done earlier for Vhost-user and Vhost-kernel, this
patch moves the Vhost-vDPA specific data to its backend
file.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: move vhost-kernel data to its backend
Maxime Coquelin [Tue, 26 Jan 2021 10:16:36 +0000 (11:16 +0100)]
net/virtio: move vhost-kernel data to its backend

As done earlier for Vhost-user, this patch moves the
Vhost-Kernel specific data to its backend file.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: move vhost-user specifics to its backend
Maxime Coquelin [Tue, 26 Jan 2021 10:16:35 +0000 (11:16 +0100)]
net/virtio: move vhost-user specifics to its backend

This patch moves all the Vhost-user backend specific
logic like Vhost FD, listen FD and interrupt handling
to the vhost-user backend implementation.

In order to achieve that, new ops are created to update
the link status, disconnect and reconnect the server,
and fetch the link state interrupt FD.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: introduce backend data
Maxime Coquelin [Tue, 26 Jan 2021 10:16:34 +0000 (11:16 +0100)]
net/virtio: introduce backend data

The goal of this patch is to introduce backend-specific
data in order to better isolate what is backend-specific
from what is generic to Virtio-user.

For now, only Vhost-user protocol features are moved to
Vhost-user backend data.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: move protocol features to vhost-user
Maxime Coquelin [Tue, 26 Jan 2021 10:16:33 +0000 (11:16 +0100)]
net/virtio: move protocol features to vhost-user

Since only protocol features are specific to Vhost-user
backend, this patch moves all related code to Vhost-user
file.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: make server mode blocking
Maxime Coquelin [Tue, 26 Jan 2021 10:16:32 +0000 (11:16 +0100)]
net/virtio: make server mode blocking

This patch makes the Vhost-user backend server mode
blocking at init, waiting for the client connection.

The goal is to make the driver more reliable, as without
waiting for client connection, the Virtio driver has to
assume the Vhost-user backend will support all the
features it has advertized, which could lead to undefined
behaviour.

For example, without this patch, if the user enables packed
ring Virtio feature but the backend does not support it,
the ring initialized by the driver will not be compatible
with the backend.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: move vhost-user requests to vhost-user backend
Maxime Coquelin [Tue, 26 Jan 2021 10:16:31 +0000 (11:16 +0100)]
net/virtio: move vhost-user requests to vhost-user backend

Now that we have a proper isolation of the backends,
we can move Vhost-user requests declaration to the
Vhost-user backend file.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: improve virtio-user errors handling
Maxime Coquelin [Tue, 26 Jan 2021 10:16:30 +0000 (11:16 +0100)]
net/virtio: improve virtio-user errors handling

This patch adds error logs and propagates errors reported
by the backend. It also adds the device path in error logs
to make it easier to distinguish which device is facing the
issue.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: remove useless request ops
Maxime Coquelin [Tue, 26 Jan 2021 10:16:29 +0000 (11:16 +0100)]
net/virtio: remove useless request ops

Now that all the ops have been implemented, we
can remove the send_request ops for all backends.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: add virtio-user status ops
Maxime Coquelin [Tue, 26 Jan 2021 10:16:28 +0000 (11:16 +0100)]
net/virtio: add virtio-user status ops

This patch introduces new callbacks to
get and set the device status.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: add virtio-user vring address ops
Maxime Coquelin [Tue, 26 Jan 2021 10:16:27 +0000 (11:16 +0100)]
net/virtio: add virtio-user vring address ops

This patch introduces a new callback for setting
vrings addresses.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: add virtio-user vring file ops
Maxime Coquelin [Tue, 26 Jan 2021 10:16:26 +0000 (11:16 +0100)]
net/virtio: add virtio-user vring file ops

This patch introduces new callbacks for setting
vring files (kick and call).

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: add virtio-user vring setting ops
Maxime Coquelin [Tue, 26 Jan 2021 10:16:25 +0000 (11:16 +0100)]
net/virtio: add virtio-user vring setting ops

This patch introduces new callbacks for setting
and getting vring state.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: add virtio-user memory tables ops
Maxime Coquelin [Tue, 26 Jan 2021 10:16:24 +0000 (11:16 +0100)]
net/virtio: add virtio-user memory tables ops

This patch implements a dedicated callback for
preparing and sending memory table to the backends.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: add virtio-user protocol features ops
Maxime Coquelin [Tue, 26 Jan 2021 10:16:23 +0000 (11:16 +0100)]
net/virtio: add virtio-user protocol features ops

This patch introduces new callbacks for getting
and setting Vhost-user protocol features.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: add virtio-user features ops
Maxime Coquelin [Tue, 26 Jan 2021 10:16:22 +0000 (11:16 +0100)]
net/virtio: add virtio-user features ops

This patch introduces new callbacks for getting
and setting Virtio features, and implements them
for the different backend types.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: add virtio-user ops to set owner
Maxime Coquelin [Tue, 26 Jan 2021 10:16:21 +0000 (11:16 +0100)]
net/virtio: add virtio-user ops to set owner

This patch implements a dedicated callback for
sending owner request. All the requests will be
converted that way so that backends other than
Vhost-user don't have to work around being it.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: make vhost-user request sender consistent
Maxime Coquelin [Tue, 26 Jan 2021 10:16:20 +0000 (11:16 +0100)]
net/virtio: make vhost-user request sender consistent

This patch makes vhost_user_write() consistent with
vhost_user_read(), by passing a Vhost-user message
pointer instead of a buffer pointer and its length, which
is now calculated in the function.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: remove last PCI refs in non-PCI code
Maxime Coquelin [Tue, 26 Jan 2021 10:16:19 +0000 (11:16 +0100)]
net/virtio: remove last PCI refs in non-PCI code

This patch finalizes the bus isolation part of this
refactoring.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agonet/virtio: move vring alignment to generic header
Maxime Coquelin [Tue, 26 Jan 2021 10:16:18 +0000 (11:16 +0100)]
net/virtio: move vring alignment to generic header

This patch moves vring alignment define to the generic
Virtio header.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agonet/virtio: make interrupt handling more generic
Maxime Coquelin [Tue, 26 Jan 2021 10:16:17 +0000 (11:16 +0100)]
net/virtio: make interrupt handling more generic

This patch aims at isolating MSIX notion into PCI
layer.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agonet/virtio: move config definitions to generic header
Maxime Coquelin [Tue, 26 Jan 2021 10:16:16 +0000 (11:16 +0100)]
net/virtio: move config definitions to generic header

This patch moves config and status definitions from the PCI
header to the generic one.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: move virtqueue defines in generic header
Maxime Coquelin [Tue, 26 Jan 2021 10:16:15 +0000 (11:16 +0100)]
net/virtio: move virtqueue defines in generic header

This patch moves the virtqueues defines from PCI header
to the generic one.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: move features definition to generic header
Maxime Coquelin [Tue, 26 Jan 2021 10:16:14 +0000 (11:16 +0100)]
net/virtio: move features definition to generic header

This patch moves all the Virtio definition to the generic
header. It also renames some helpers to no more reference
PCI.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: introduce generic virtio header
Maxime Coquelin [Tue, 26 Jan 2021 10:16:13 +0000 (11:16 +0100)]
net/virtio: introduce generic virtio header

This patch moves virtio_hw and virtio callbacks into
a generic virtio header, now that they have been
curated from PCI references.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: move legacy IO to virtio PCI
Maxime Coquelin [Tue, 26 Jan 2021 10:16:12 +0000 (11:16 +0100)]
net/virtio: move legacy IO to virtio PCI

This patch moves Virtio PCI legacy IO handling to
virtio_pci.c. Two functions are created so that
virtio_pci_ethdev does not have to care about it.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agonet/virtio: pack virtio HW struct
Maxime Coquelin [Tue, 26 Jan 2021 10:16:11 +0000 (11:16 +0100)]
net/virtio: pack virtio HW struct

This patch improves the virtio_hw struct packing,
going from 88 down to 80 bytes with a 6 bytes hole in
the end of the first cacheline. Fields only used in the
slow path are placed in the end, so that hot path only
uses the first cacheline.

The patch also changes booleans fields to uint8_t type, and
fix inconsistencies in their assignments.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: move PCI-specific fields to PCI device
Maxime Coquelin [Tue, 26 Jan 2021 10:16:10 +0000 (11:16 +0100)]
net/virtio: move PCI-specific fields to PCI device

This patch moves the fields from virtio_hw structure that
are PCI-specific to virtio_pci_dev_struct.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agonet/virtio: remove bus type enum
Maxime Coquelin [Tue, 26 Jan 2021 10:16:09 +0000 (11:16 +0100)]
net/virtio: remove bus type enum

Bus type awareness at the generic ethdev level is no
more needed as previous patches have made it bus-agnostic.

This patch removes it from struct virtio_hw.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agonet/virtio: validate features at bus level
Maxime Coquelin [Tue, 26 Jan 2021 10:16:08 +0000 (11:16 +0100)]
net/virtio: validate features at bus level

This patch provides a new callback for the bus type
to validate negotiated features are compatible with it.

Only user for now is PCI modern bus type, which implies
that the device supports Virtio 1.0+.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: add callback for device closing
Maxime Coquelin [Tue, 26 Jan 2021 10:16:07 +0000 (11:16 +0100)]
net/virtio: add callback for device closing

This patch introduces a new callback for device closing,
making virtio_dev_close() bus-agnostic.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agonet/virtio: store PCI type in virtio device metadata
Maxime Coquelin [Tue, 26 Jan 2021 10:16:06 +0000 (11:16 +0100)]
net/virtio: store PCI type in virtio device metadata

Going further in making the Virtio ethdev layer bus agnostic,
this patch adds a boolean in the Virtio PCI device metadata.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agonet/virtio: force IOVA as VA mode for virtio-user
Maxime Coquelin [Tue, 26 Jan 2021 10:16:05 +0000 (11:16 +0100)]
net/virtio: force IOVA as VA mode for virtio-user

At least Vhost-user backend of Virtio-user PMD requires
IOVA as VA mode. Until now, it was implemented as a hack
by forcing to use mbuf's buf_addr field instead of buf_iova.

This patch removes all this logic and just fails probing
if IOVA as VA mode is not selected. It simplifies the
code overall, and removes some bus-specific logic from
generic virtio_ethdev.c.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: move MSI-X detection to PCI ethdev
Maxime Coquelin [Tue, 26 Jan 2021 10:16:04 +0000 (11:16 +0100)]
net/virtio: move MSI-X detection to PCI ethdev

This patch introduces a new callback to notify the bus
driver some interrupt related operation was done.

This is used by Virtio PCI driver to check msix status.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: move PCI specific dev init to PCI ethdev init
Maxime Coquelin [Tue, 26 Jan 2021 10:16:03 +0000 (11:16 +0100)]
net/virtio: move PCI specific dev init to PCI ethdev init

This patch moves the PCI specific initialization from
eth_virtio_dev_init() to eth_virtio_pci_init().

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agonet/virtio: move PCI device init in dedicated file
Maxime Coquelin [Tue, 26 Jan 2021 10:16:02 +0000 (11:16 +0100)]
net/virtio: move PCI device init in dedicated file

This patch moves the PCI Ethernet device registration bits
in a dedicated patch. In following patches, more code will
be moved there, with the goal of making virtio_ethdev.c
truly bus-agnostic.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: introduce PCI device metadata
Maxime Coquelin [Tue, 26 Jan 2021 10:16:01 +0000 (11:16 +0100)]
net/virtio: introduce PCI device metadata

This patch initiate refactoring of Virtio PCI, by introducing
a new device structure for PCI-specific metadata.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: refactor virtio-user device
Maxime Coquelin [Tue, 26 Jan 2021 10:16:00 +0000 (11:16 +0100)]
net/virtio: refactor virtio-user device

This patch moves the virtio_hw structure into the virtio_user_dev
structure, with the goal of making virtio_hw bus-agnostic.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: introduce virtio bus type
Maxime Coquelin [Tue, 26 Jan 2021 10:15:59 +0000 (11:15 +0100)]
net/virtio: introduce virtio bus type

This patch is preliminary work for introducing a bus layer
in Virtio PMD, in order to improve Virtio-user integration.

A new bus type is added to provide a unified way to distinguish
which bus type is used (PCI modern, PCI legacy or Virtio-user).

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agonet/virtio: fix getting old status on reconnect
Maxime Coquelin [Tue, 26 Jan 2021 10:15:58 +0000 (11:15 +0100)]
net/virtio: fix getting old status on reconnect

This patch fixes getting reset status from the restarted
vhost-user backend in case of reconnection, instead of the
status at the time of the disconnection.

This issue was not spotted earlier because Vhost-user
protocol status feature was disabled in server mode.

Fixes: 47235f16505f ("net/virtio-user: set status on socket reconnect")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agobus/vdev: add driver IOVA VA mode requirement
Maxime Coquelin [Tue, 26 Jan 2021 10:15:57 +0000 (11:15 +0100)]
bus/vdev: add driver IOVA VA mode requirement

This patch adds driver flag in vdev bus driver so that
vdev drivers can require VA IOVA mode to be used, which
for example the case of Virtio-user PMD.

The patch implements the .get_iommu_class() callback, that
is called before devices probing to determine the IOVA mode
to be used, and adds a check right before the device is
probed to ensure compatible IOVA mode has been selected.

It also adds a ABI exception rule to accommodate with an
update on the driver registration API

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
3 years agobus/vdev: add helper to get vdev from ethdev
Maxime Coquelin [Tue, 26 Jan 2021 10:15:56 +0000 (11:15 +0100)]
bus/vdev: add helper to get vdev from ethdev

This patch adds an helper macro to get the rte_vdev_device
pointer from a rte_eth_dev pointer.

This is similar to RTE_ETH_DEV_TO_PCI().

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agonet/mlx5: use global default miss for E-Switch sampling
Jiawei Wang [Tue, 26 Jan 2021 12:53:33 +0000 (14:53 +0200)]
net/mlx5: use global default miss for E-Switch sampling

In E-Switch steering domain there was dedicated default miss action
created for every sampling flow.
The patch replaces this one with the global default miss action.

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agonet/mlx5: fix E-Switch sample action creation
Jiawei Wang [Tue, 26 Jan 2021 12:53:32 +0000 (14:53 +0200)]
net/mlx5: fix E-Switch sample action creation

This patch fixes the incorrect checking for the return value
of default miss action creation.

Fixes: 14020ad53d4e ("net/mlx5: wrap default miss flow action per OS")
Cc: stable@dpdk.org
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
3 years agonet/mlx5: support mbuf fast free offload
Viacheslav Ovsiienko [Fri, 22 Jan 2021 17:12:09 +0000 (17:12 +0000)]
net/mlx5: support mbuf fast free offload

This patch adds support of the mbuf fast free offload to the
transmit datapath. This offload allows freeing the mbufs on
transmit completion in the most efficient way. It requires
the all mbufs were allocated from the same pool, have
the reference counter value as 1, and have no any externally
attached buffers.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/mlx5: optimize inline mbuf freeing
Viacheslav Ovsiienko [Fri, 22 Jan 2021 17:12:08 +0000 (17:12 +0000)]
net/mlx5: optimize inline mbuf freeing

The mlx5 PMD supports packet data inlining by pushing data
to the transmit descriptor. If packet is short enough and all
data are inline, the mbuf is not needed for data send anymore
and can be freed.

The mbuf free was performed in the most inner loop building
the transmit descriptors. This patch postpones the mbuf free
transaction to the tx_burst routine exit, optimizing the loop
and allowing the bulk freeing for the multiple mbufs in single
pool API call.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
3 years agonet/dpaa2: support MPLS distribution
Apeksha Gupta [Wed, 20 Jan 2021 06:22:38 +0000 (11:52 +0530)]
net/dpaa2: support MPLS distribution

add support for MPLS based distribution is supported.

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
3 years agoethdev: add MPLS RSS offload type
Hemant Agrawal [Wed, 20 Jan 2021 06:22:37 +0000 (11:52 +0530)]
ethdev: add MPLS RSS offload type

This patch defines new RSS offload types for MPLS. The distribution
will on the basis of MPLS tag.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agoethdev: add IPv6 DSCP option for modify field action
Alexander Kozyrev [Tue, 26 Jan 2021 15:13:35 +0000 (15:13 +0000)]
ethdev: add IPv6 DSCP option for modify field action

IPv6 DSCP field ID is missing from the original list of Field IDs
for MODIFY_FIELD action. Add it to support IPv6 header fully.
Add ipv6_dscp option for the corresponding header field in testpmd.

Fixes: 73b68f4c54a0 ("ethdev: introduce generic modify flow action")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agoethdev: fix close failure handling
Thomas Monjalon [Fri, 22 Jan 2021 17:58:04 +0000 (18:58 +0100)]
ethdev: fix close failure handling

If a failure happens when closing a port,
it was unnecessarily failing again in the function eth_err(),
because of a check against HW removal cause.
Indeed there is a big chance the port is released at this point.
Given the port is in the middle (or at the end) of a close process,
checking the error cause by accessing the port is a non-sense.
The error check is replaced by a simple return in the close function.

Bugzilla ID: 624
Fixes: 8a5a0aad5d3e ("ethdev: allow close function to return an error")
Cc: stable@dpdk.org
Reported-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Tested-by: Anatoly Burakov <anatoly.burakov@intel.com>
3 years agonet/sfc: fix generic byte statistics to exclude FCS bytes
Viacheslav Galaktionov [Wed, 20 Jan 2021 12:44:18 +0000 (15:44 +0300)]
net/sfc: fix generic byte statistics to exclude FCS bytes

Generic byte statistics should not include Ethernet FCS bytes.

Fixes: 1caab2f1e684 ("net/sfc: add basic statistics")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
3 years agoethdev: clarify what is included in generic byte statistics
Viacheslav Galaktionov [Wed, 20 Jan 2021 12:44:17 +0000 (15:44 +0300)]
ethdev: clarify what is included in generic byte statistics

Different hardware gathers statistics differently, so some general
rules need to be established.

Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
3 years agonet/ixgbe: disable NFS filtering
Dapeng Yu [Tue, 26 Jan 2021 03:03:08 +0000 (11:03 +0800)]
net/ixgbe: disable NFS filtering

Disable NFS header filtering whether NFS packets coalescing are
required or not, in order to make RSS can work on NFS packets.

The code without the patch does follow datasheet, but not consistent
with the ixgbe kernel driver. It causes NFS packets to be filtered
and make them flow into queue 0, before RSS can work on them.

Fixes: b826efba6de4 ("net/ixgbe: align register setting when RSC is disabled")
Fixes: 8eecb3295aed ("ixgbe: add LRO support")
Cc: stable@dpdk.org
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
3 years agonet/iavf: adjust VLAN initialize failure handling
Haiyue Wang [Mon, 25 Jan 2021 11:44:21 +0000 (19:44 +0800)]
net/iavf: adjust VLAN initialize failure handling

Instead of returning error on VLAN init failure, just log the error, so
that the VF device can continue to be configured.

Fixes: 1c301e8c3cff ("net/iavf: support new VLAN capabilities")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>