Commit Graph

26884 Commits

Author SHA1 Message Date
Xiaoyu Min
71b09bd950 doc: add more explanation about flow shared action
Added more information of shared action on
how to update, query, and the benefits.

Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Reviewed-by: Asaf Penso <asafp@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-02-04 15:38:36 +01:00
Pallavi Kadam
1b0801390b doc: update i40e Windows support
Add documentation to support i40e PMD on Windows.
Update the release notes and features list for the same.

Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-02-04 15:38:32 +01:00
Ivan Malov
be56d20ff1 net/sfc: fix TSO and checksum offloads for EF10
This is workaround for 8000-series EF10 hardware TSO bug.
Innermost IP length and outer UDP datagram length must be
greater than or equal to the corresponding values derived
from the MSS; otherwise, the checksum offloads will break.

Fixes: c1ce2ba218 ("net/sfc: support tunnel TSO on EF10 native Tx datapath")
Fixes: 6bc985e411 ("net/sfc: support TSO in EF10 Tx datapath")
Fixes: fec33d5bb3 ("net/sfc: support firmware-assisted TSO")
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>
2021-02-03 11:37:08 +01:00
Heinrich Kuhn
3c4f2a4ff7 maintainers: update for nfp
Release-on-close has been implemented for the NFP PMD. Remove the
UNMAINTAINED flag.

Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-02-03 10:53:35 +01:00
Lijun Ou
a951fbbe91 doc: fix product link in hns3 guide
Here fixes the Kunpeng introduction address link with hns3.rst

Fixes: 565829db8b ("net/hns3: add build and doc infrastructure")
Cc: stable@dpdk.org

Signed-off-by: Lijun Ou <oulijun@huawei.com>
2021-02-03 10:42:11 +01:00
Lijun Ou
a3e9010d97 doc: update release notes for hns3
Add TM(Traffic Management) feature with hns3 in release notes.
It includes:
1. configure port's peak rate with PF
2. configure TC's peak rate with PF

Fixes: c09c7847d8 ("net/hns3: support traffic management")
Cc: stable@dpdk.org

Signed-off-by: Lijun Ou <oulijun@huawei.com>
2021-02-03 10:42:11 +01:00
Min Hu (Connor)
fa5dbd825a doc: add FEC to NIC features
Document FEC in NIC features, add information about FEC and add
implementation related support.

Fixes: b7ccfb09da ("ethdev: introduce FEC API")
Fixes: 9bf2ea8dbc ("net/hns3: support FEC")
Fixes: 62aafe0358 ("net/cxgbe: support configuring link FEC")
Cc: stable@dpdk.org

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-02-03 10:42:11 +01:00
Lingyu Liu
ffc7bc7c36 doc: add mirror rule limitation of X722
Currently, X722 firmware doesn't support to add more than
one mirror rule in one VSI.

Signed-off-by: Lingyu Liu <lingyu.liu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2021-02-03 00:48:11 +01:00
Xuan Ding
3b0181038d net/ice: fix RSS type checking
For pattern MAC_PPPOE_IPV4/6, add ETH_RSS_ETH into input_set_mask
to fix RSS rule cannot be created when set eth as RSS type.

Fixes: 0d84f86c30 ("net/ice: fix GTPU header parsing")

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-02-03 00:48:11 +01:00
Maxime Coquelin
b93c3530c1 net/virtio: fix PCI ops assignment
VIRTIO_OPS() macro relies on the port ID stored in the
virtio_hw struct. Issue is that it is used before being
assigned at init time. It results in all devices setting
ops on port ID 0, causing crash later when calling ops
for port IDs other than 0.

This patch ensures port ID assignment is done at early
primary process probe time, before it is being used.

Bugzilla ID: 631
Fixes: 512e27eeb7 ("net/virtio: move PCI specific dev init to PCI ethdev init")

Reported-by: Wei Ling <weix.ling@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Tested-by: Wei Ling <weix.ling@intel.com>
2021-02-03 00:48:11 +01:00
Maxime Coquelin
0ea5be8d25 net/virtio: fix listen file initialization
When running in client mode, the listen file descriptor
is not initialized, and so has value 0. At destroy time,
the listen FD is closed if its value is greater than or
equal to zero, which causes STDIN to be closed.

Bugzilla ID: 630
Fixes: 949735312f ("net/virtio: move vhost-user specifics to its backend")

Reported-by: Jun W Zhou <junx.w.zhou@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Tested-by: Jun W Zhou <junx.w.zhou@intel.com>
2021-02-03 00:48:11 +01:00
Hyong Youb Kim
d700f0d0d7 net/enic: fix filter type used for flow API
The filter type (struct filter_v2.type) should always be set to
FILTER_DPDK_1, when advanced filtering is enabled in firmware.
Otherwise, for some old firmware versions, the driver sets
it to FILTER_USNIC_IP, and attempts to install filters fail. This
behavior matches that of the now-removed flow director implementation
(enic_clsf.c).

Fixes: 26faa126d8 ("net/enic: flow API for NICs with advanced filters disabled")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2021-02-03 00:48:11 +01:00
Andrew Boyer
5611763610 net/ionic: clean up Tx queue version support
The ionic PMD only supports Tx queue version 1 or greater.
Version 1 introduced a new SGL format with support for more
fragments per descriptor.

Add release notes and an explanation to the docs.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
2021-02-03 00:48:11 +01:00
Andrew Boyer
76276d716b net/ionic: use existing array size macro
Using the RTE_DIM() macro makes the code clearer.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
2021-02-03 00:48:11 +01:00
Chengwen Feng
e63ae349e1 net/hns3: support LSC event report
This patch support LSC (Link Status Change) event report.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
2021-02-03 00:48:11 +01:00
Bernard Iremonger
836cdce488 doc: fix QinQ flow rules in testpmd guide
In the Testpmd Flow rules management section, correct
the TPID values in the Sample QinQ flow rules sub section.
Also replace the keyword qinq_strip with extend in the
vlan set command.

Fixes: bef3bfe7d5 ("doc: revise sample testpmd flow commands")
Cc: stable@dpdk.org

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
2021-02-03 00:48:11 +01:00
Satheesh Paul
5f94de1b3a app/testpmd: add PF and VF targets to sample flow action
Add support to specify PF or VF as targets in "set sample_actions"
command.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Ori Kam <orika@nvidia.com>
2021-02-03 00:48:11 +01:00
Dekel Peled
c83456cdd7 net/mlx5: fix shared RSS translation and cleanup
This patch includes several updates of the shared RSS action:

(1)
The shared RSS action, introduced recently, uses existing definitions
of the regular RSS action.
The new defined value MLX5_RSS_HASH_IPV4_TCP uses existing definition
IBV_RX_HASH_SRC_PORT_TCP twice, instead of using
IBV_RX_HASH_SRC_PORT_TCP and IBV_RX_HASH_DST_PORT_TCP.
            ---                          ---
The same is true for IPv4-UDP, IPv6-TCP, IPv6-UDP.
As result, a shared RSS action with L4 type is specified as src-only.
Flow rule using such shared action, while specifying L4 item in flow
pattern, will fail to create.
This patch updates the new definitions, to use the existing values
correctly.

(2)
On shared RSS action destroy, in function __flow_dv_action_rss_release,
the indirection table shared_rss->ind_tbl was released before
shared_rss->refcnt was checked.
This order is incorrect, since the indirection table should be
released only when the shared RSS action is destroyed.
This patch puts release function calls in correct order.

(3)
Variables declared of type "struct mlx5_shared_action_rss" are named
"shared_rss", "action", and "shared_action".
To improve code readability, this patch renames all to "shared_rss".

Fixes: d7cfcddded ("net/mlx5: translate shared action for RSS action")
Fixes: d2046c09aa ("net/mlx5: support shared action for RSS")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-02-03 00:48:11 +01:00
Dekel Peled
b65057385f net/mlx5: update flow meter capability flags names
Existing names of the flags denoting flow meter capability are unclear
and may be misleading.

This patch updates the names to align with the updated documentation.
Comments were edited, describing the names clearly.

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-02-03 00:48:11 +01:00
Lance Richardson
8e18a019c1 net/bnxt: fix Rx completion ring size calculation
The size of the receive completion ring should be recalculated
when MTU is increased to a size that requires scattered receive
or when LRO is enabled. Move logic for this calculation from
the ring configuration path to the device start path.
   - Made size calculation dependent only on scattered_rx
     status.
   - Moved calculation of scattered_rx up in the initialization
     sequence.
   - Made LRO offload status part of scattered_rx calculation.

When the completion ring size is too small, completion overflows
can occur causing the ring to be disabled in hardware.

Fixes: 04067844a3 ("net/bnxt: reduce CQ queue size without aggregation ring")
Cc: stable@dpdk.org

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-02-03 00:48:11 +01:00
Xuan Ding
c678299594 net/iavf: fix default RSS configuration
Add advanced RSS offloads check due to some legacy driver (kernel/DPDK
PF) does not support virtual channel command VIRTCHNL_OP_RSS_HENA with
hena = 0 and VIRTCHNL_OP_ADD_RSS_CFG.

Fixes: 95f2f0e9fc ("net/iavf: improve default RSS")

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-02-03 00:48:11 +01:00
David Marchand
f6f2d22401 devtools: fix examples build test
Since we don't check ABI on the x86-default target anymore, installation
of the target must always happen for examples external compilation check
to work.

Fixes: 6a426d733e ("devtools: reduce ABI checks and static binaries")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2021-02-02 23:58:22 +01:00
Ferruh Yigit
b3d7b8d732 devtools: add acronyms in dictionary for commit checks
eCPRI -> enhanced Common Public Radio Interface
FEC   -> Forward Error Correction
SMP   -> Symmetric MultiProcessing

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-02-02 23:48:09 +01:00
Juraj Linkeš
9186e5a07f config/arm: replace native machine args
There are compiler issues when building with -mcpu=native with popular
compilers, such as GCC-8.4:
In file included from ../lib/librte_eal/arm/include/rte_vect.h:11,
                 from ../lib/librte_net/net_crc_neon.c:10:
../lib/librte_net/net_crc_neon.c: In function ‘crcr32_folding_round’:
/usr/lib/gcc/aarch64-linux-gnu/8/include/arm_neon.h:26094:1: error:
inlining failed in call to always_inline ‘vmull_p64’:
target specific option mismatch
 vmull_p64 (poly64_t a, poly64_t b)
../lib/librte_net/net_crc_neon.c:50:20: note: called from here
  uint64x2_t tmp1 = vreinterpretq_u64_p128(vmull_p64(
    vgetq_lane_p64(vreinterpretq_p64_u64(fold), 0),
    vgetq_lane_p64(vreinterpretq_p64_u64(precomp), 1)));

and clang:
gcc -E -dM -mcpu="native" - < /dev/null | grep __ARM_FEATURE_ATOMICS
clang-9 -E -dM -mcpu="native" - < /dev/null | grep __ARM_FEATURE_ATOMICS
<no output> # no clang support

Fix this by always specifying the proper machine args and never using
the native flags.

Fixes: 78ac8eac7e ("config/arm: use native machine build arguments")

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
2021-02-02 10:26:14 +01:00
Ferruh Yigit
16e5de05f5 config/arm: fix variable names
A config variable rename seems missed to update all config files and new
config file get with old variable names.

Reflect config variable rename to all config files, changed
'implementor_id' to 'implementer_id',
'implementor_pn' to 'part_number'.

Fixes: 3d01d65ba0 ("config: add aarch64 clang for Ubuntu 18.04")
Fixes: 7870ae8994 ("config/arm: rename variables")

Reported-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
2021-02-02 10:25:39 +01:00
David Marchand
1e90d1b67b ci: ignore APT update failure in GitHub Actions
Ubuntu 18.04 GHA virtual machine images point at an invalid APT
repository.
We have no control over this, simply ignore the failure.

This was caught by Ilya for OVS and the robot just hit the same issue
for DPDK:

"""
Get:46 http://security.ubuntu.com/ubuntu bionic-security/restricted
Translation-en [29.9 kB]
Get:47 http://security.ubuntu.com/ubuntu bionic-security/universe amd64
Packages [1104 kB]
Get:48 http://security.ubuntu.com/ubuntu bionic-security/universe
Translation-en [247 kB]
Reading package lists...
E: The repository 'https://apt.postgresql.org/pub/repos/apt bionic-pgdg
Release' no longer has a Release file.
Error: Process completed with exit code 100.
"""

Fixes: 9d620630ea ("ci: fix package installation in GitHub Actions")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ilya Maximets <i.maximets@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
2021-02-02 09:24:49 +01:00
Thomas Monjalon
3021257a81 version: 21.02-rc2
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2021-01-30 01:35:54 +01:00
Bruce Richardson
5a19633079 examples: warn about broken pkg-config
Since the examples are designed to be built by end-users using Make, we
can detect and warn about broken pkg-config on the user's system as part
of the build process.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2021-01-30 01:27:28 +01:00
Anatoly Burakov
7e54f18326 mem: fix deadlock on secondary allocation
Previous fix used `rte_malloc_heap_socket_is_external()` to check if the
heap was an external heap. However, that API is thread-safe, and when
we're inside the allocation process, we're already write-locked, so
calling `rte_malloc_heap_socket_is_external()` will result in a
deadlock followed by a timeout.

Fix it by replacing the API call with a check against maximum number of
NUMA nodes, because external heaps always have higher socket ID's.

Fixes: 7ac31e82bc ("mem: improve parameter checking on memory hotplug")

Reported-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2021-01-30 00:26:49 +01:00
Viacheslav Ovsiienko
293ca0aaaf app/testpmd: fix queue reconfig request on Rx split update
There is the "set rxpkts" command in the testpmd interactive mode,
it configures the segment sizes to split the packet on receiving.
The mentioned segment sizes are provided on the Rx queue setup
as part of queue configuration. Hence, to take the rxpkts command
into effect the Rx queues must be explicitly reconfigured.

The explained above is related to the "set rxoffs" as well.

The patch sets the queue reconfiguration request flag for
all devices once Rx split settings are updated, to take
the changes into effect the port(s) should be restarted.

Fixes: 0f2096d7ab ("app/testpmd: add rxpkts commands and parameters")
Fixes: 91c78e090e ("app/testpmd: add rxoffs commands and parameters")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-01-29 18:16:12 +01:00
Jingjing Wu
b08728b4a0 net/iavf: fix vector mapping with queue
Fix the vector mapping with queue by changing the recircle when
exceeds RX_VEC_START + nb_msix;

Fixes: d6bde6b5ea ("net/avf: enable Rx interrupt")
Cc: stable@dpdk.org

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2021-01-29 18:16:12 +01:00
Kalesh AP
d3376cdc7d net/bnxt: fix mbuf flags for PTP packets
Commit "899f06130724" broke the update of mbuf flags for PTP packets.
"mbuf->ol_flags" is overwritten in bnxt_set_ol_flags() function.

Fixes: 899f061307 ("net/bnxt: add Rx logic for 58818 chips")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-01-29 18:16:12 +01:00
Nalla Pradeep
9526f3003e net/octeontx_ep: add Tx path
1. Packet transmit function for both otx and otx2 are added.
2. Flushing transmit(command) queue when pending commands are more than
   maximum allowed value (currently 16).
3. Scatter gather support if the packet spans multiple buffers.

Signed-off-by: Nalla Pradeep <pnalla@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-01-29 18:16:12 +01:00
Nalla Pradeep
9fb8d63e7c net/octeontx_ep: add Rx path
Function to deliver packets from DROQ to application is added. It also
fills DROQ with receive buffers timely such that device can fill them
with incoming packets.

Signed-off-by: Nalla Pradeep <pnalla@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-01-29 18:16:12 +01:00
Nalla Pradeep
2c82554c98 net/octeontx_ep: add device start and stop
Dev start and stop operations are added. To accomplish this internal
functions to enable or disable IO queues are incorporated.

Signed-off-by: Nalla Pradeep <pnalla@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-01-29 18:16:12 +01:00
Nalla Pradeep
6195062454 net/octeontx_ep: set up IQ and OQ registers
Configuring hardware registers with command queue (IQ) and driver output
queue (OQ) parameters.
List of parameters configured for IQ after making sure it is idle
1. Base address
2. Instruction size
3. Disabling interrupts for fastpath

List of parameters configured for OQ after making sure it is idle
1. Base address
2. Output buffer size
3. Clear output queue doorbell
4. Disable interrupts for fastpath

Signed-off-by: Nalla Pradeep <pnalla@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-01-29 18:16:12 +01:00
Nalla Pradeep
edb1273cb6 net/octeontx_ep: add Tx queue setup and release
Transmit queue setup involves allocating memory for the command queue
considering tx descriptor count and initializing data structure
representing the queue. Transmit queue release function frees the
command queue.

Signed-off-by: Nalla Pradeep <pnalla@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-01-29 18:16:12 +01:00
Nalla Pradeep
242e18c056 net/octeontx_ep: add Rx queue setup and release
Receive queue setup involves allocating memory for the queue,
initializing data structure representing the queue and filling queue
with receive buffers of rx descriptor count. Receive queues are referred
as droq. Hardware fills the receive buffers in queue with the packet.

In receive queue release, receive buffers are freed along with the
receive queue.

Signed-off-by: Nalla Pradeep <pnalla@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-01-29 18:16:12 +01:00
Nalla Pradeep
e73b6899e1 net/octeontx_ep: add device info get and configure
Add device information get and device configure operations.

Signed-off-by: Nalla Pradeep <pnalla@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-01-29 18:16:12 +01:00
Nalla Pradeep
ead27910c6 net/octeontx_ep: add basic device setup
Functions to setup device, basic input queue and output queue registers
are added.

Signed-off-by: Nalla Pradeep <pnalla@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-01-29 18:16:12 +01:00
Nalla Pradeep
4a5ac38685 net/octeontx_ep: add device init and uninit
Add basic init and uninit function which includes
initializing fields of ethdev private structure.

Signed-off-by: Nalla Pradeep <pnalla@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-01-29 18:16:12 +01:00
Nalla Pradeep
aed044bedc net/octeontx_ep: add ethdev probe and remove
Add basic PCIe ethdev probe and remove.

Signed-off-by: Nalla Pradeep <pnalla@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-01-29 18:16:12 +01:00
Nalla Pradeep
c9b0c48736 net/octeontx_ep: add build and doc infrastructure
Adding bare minimum PMD library and doc build infrastructure
and claim the maintainership for octeontx end point PMD.

Signed-off-by: Nalla Pradeep <pnalla@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-01-29 18:16:12 +01:00
Nalla Pradeep
ba3c56b832 raw/octeontx2_ep: change PCI device ID
Device id to be probed by octeontx_ep raw device pmd is changed from
B203 to B204. B203 is for octeontx_ep net device pmd to probe.

Signed-off-by: Nalla Pradeep <pnalla@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-01-29 18:16:12 +01:00
Igor Chauskin
1d973d8f4c net/ena: prevent double doorbell
Add per-tx-ring flag for packets that were pushed to HW but await
doorbell. That is to prevent a situation when a doorbell is sent due to
reaching Tx burst threshold and next send fails (e.g., due to queue
full). In such case we shouldn't send another doorbell because there are
no actual packets waiting for transmission.

Fixes: c7519ea5eb ("net/ena: call additional doorbells if needed")
Cc: stable@dpdk.org

Signed-off-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
2021-01-29 18:16:12 +01:00
Igor Chauskin
8a90f3d8d0 net/ena: fix Tx SQ free space assessment
Before starting transmission of Tx burst, the driver checked the
available space in the sq and limited the number of packets for
transmission accordingly.
The calculation was incorrect for fragmented packets and potentially had
significantly limited the length of Tx bursts.

This patch removes the assessment and pushes packets to the sq as long
as the burst is not exhausted and space is available in the sq.

Correct evaluation of the required space isn't possible before the burst
because it depends on the number of segments of each packet.
This patch adds per-packet space evaluation for each packet before
attempting to process it. In case there is not enough queue space, the
burst will just stop without error.

Fixes: 2061fe41f2 ("net/ena: linearize Tx mbuf")
Cc: stable@dpdk.org

Signed-off-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
2021-01-29 18:16:12 +01:00
Michal Krawczyk
05cffdcfa0 net/ena: validate Rx req ID upon acquiring descriptor
Instead of verifying the Rx descriptor each time it's being used in the
driver code, now the verification happens on the HAL side.

This simplifies code a lot as instead of doing 2 validations, only
single one is needed. The driver have to check the rc value returned
by the ena_com upon reading the Rx descriptor and trigger the reset
if needed. It was previously the responsibility of the
validate_rx_req_id() function.

As part of the change, the version of the driver was bumped to v2.2.1.

Fixes: 2061fe41f2 ("net/ena: linearize Tx mbuf")
Cc: stable@dpdk.org

Signed-off-by: Ido Segev <idose@amazon.com>
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
2021-01-29 18:16:12 +01:00
Amit Bernstein
1f949ad90b net/ena: fix Tx doorbell statistics
Increment Tx doorbell statistics on tx_pkt_burst
after writing to doorbell and in case max burst size achieved

Fixes: c7519ea5eb ("net/ena: call additional doorbells if needed")
Cc: stable@dpdk.org

Signed-off-by: Amit Bernstein <amitbern@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
2021-01-29 18:16:12 +01:00
Ido Segev
4387e81c94 net/ena: flush Rx buffers memory pool cache
As the refill called as part of ena_start(), we end up the refill
progress with stuck buffers at the caller core cache.

Calling to flush the cache results with invalidate this cache and free
those stuck buffers.

Fixes: 1173fca25a ("ena: add polling-mode driver")
Cc: stable@dpdk.org

Signed-off-by: Ido Segev <idose@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
2021-01-29 18:16:12 +01:00
Heinrich Kuhn
c0a8b02475 net/nfp: read chip model from PluDevice register
For newer smartNIC NVRAM versions the chip model should be read from the
PluDevice register as it provides the authoritative chip model/revision.
This method of reading the chip model is backwards compatible with
legacy NVRAM versions too.

Since the model number is purely used for reporting purposes, follow the
hardware team convention of subtracting 0x10 from the PluDevice register
to obtain the chip model/revision number.

Fixes: c7e9729da6 ("net/nfp: support CPP")
Cc: stable@dpdk.org

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>
2021-01-29 18:16:12 +01:00