Viacheslav Ovsiienko [Fri, 13 Nov 2020 15:32:52 +0000 (15:32 +0000)]
net/mlx5: add wire vport hint
The kernel can use two approaches to distinguish the E-Switch
source vport in the packet metadata - either with dedicated
source_port field or register C0. To eliminate the extra source
vport matching in the hardware the source_port field can be
set to specific values (0xFFFF) for the wire source port.
This match can be applied to recognize wire port only in FDB
domain. Missing the register C0 match in the NIC Rx domain causes
incorrect representor steering within shared IB device ports
and must be always specified (if kernel uses this approach).
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Harman Kalra [Mon, 16 Nov 2020 14:41:55 +0000 (20:11 +0530)]
common/octeontx2: fix mbox response by syncing data types
Syncing the data types of msix offset mbox response structure
fields wrt rvu_pfvf structure as in msix offset mbox handler,
respective block LFs response field is initialised with rvu_pfvf
and mismatch in the data types of respective fields may lead
to issues.
This mismatch in data types resulted in a bug where no sso msix
offsets are returned. For 256 SSO hwgrps, 256 msix offsets
are required, but since num of sso lf field (rsp->sso) in
response structure is u8 and is initialised with same field
in pfvf structure viz u16, value 256 corresponds to 0 hence
no sso_msixoff.
Similar mbox changes are required in kernel side also which are
available in marvell SDK version SDK-11.0.
Fixes:
2b71657c8660 ("common/octeontx2: add mbox request and response definition")
Cc: stable@dpdk.org
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Didier Pallard [Tue, 17 Nov 2020 11:26:47 +0000 (12:26 +0100)]
net/mlx5: fix Rx descriptor status
Three bugs in rx_queue_count function:
- One entry may contain several segments, so 'used' must be multiplied
by number of segments per entry to properly reflect the queue usage.
- The number of cqes is equals to (1U << rxq->elts_n) - 1 in SPRQ mode.
The range returned by rx_queue_count should be the number of entries
used in queue, so it ranges from 0 to max number of entries
in queue, not this number minus one.
- For MPRQ mode, we need to take into account of the number of strd.
Fixes:
8788fec1f269 ("net/mlx5: implement descriptor status API")
Cc: stable@dpdk.org
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Maxime Leroy [Tue, 17 Nov 2020 11:26:46 +0000 (12:26 +0100)]
net/mlx5: fix Rx queue count calculation
The commit
d2d57605522d ("net/mlx5: fix Rx queue count calculation") is
incorrect because the count calculation is wrong for the next cqe:
Example:
Compressed Set of packets 1 | Compressed Set of packets 2
C | a | e0 | e1 | e2 | e3 | e4 | e5 | C | a | e0
There are 2 compressed set of packets in the first queue. For the first
set, n is computed correctly.
But for the second, n is not computed properly. Because the zip context
is for the first set. The second set is not yet decompressed, so
there are no context.
To fix the issue, we should only use the zip context for the first CQEs
series.
Fixes:
d2d57605522d ("net/mlx5: fix Rx queue count calculation")
Cc: stable@dpdk.org
Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Xiaoyu Min [Mon, 16 Nov 2020 02:07:59 +0000 (10:07 +0800)]
net/mlx5: fix RSS queue type validation
When the RSS queues' types are not uniformed, i.e, mixed with normal Rx
queue and hairpin queue, PMD accept this flow after commit[1] instead of
rejecting it.
This because commit[1] creates Rx queue object as DevX type via DevX API
instead of IBV type via Verbs, in which the latter will check the queues'
type when creating Verbs ind table but the former doesn't check when
creating DevX ind table.
However, in any case, logically PMD should check whether the input
configuration of RSS action is reasonable or not, which should
include queues' type check as well as the others.
So add the check of RSS queues' type in validation function to fix issue.
[1]:
commit
6deb19e1b2d2 ("net/mlx5: separate Rx queue object creations")
Fixes:
63bd16292c3a ("net/mlx5: support RSS on hairpin")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Alexander Kozyrev [Sun, 15 Nov 2020 14:25:34 +0000 (14:25 +0000)]
net/mlx5: fix Rx packet padding config via DevX
Received packets can be aligned to the size of the cache line on
PCI transactions. This could improve performance by avoiding
partial cache line writes in exchange for increased PCI bandwidth.
This feature is supposed to be controlled by the rxq_pkt_pad_en
devarg and it is true for an RxQ created via the Verbs API.
But in the DevX API case, it is erroneously controlled by the
rxq_cqe_pad_en devarg instead, which is in charge of the CQE
padding instead and should not control the RxQ creation.
Fix DevX RxQ creation by using the proper configuration flag for
Rx packet padding that is being set by the rxq_pkt_pad_en devarg.
Fixes:
dc9ceff73c99 ("net/mlx5: create advanced RxQ via DevX")
Cc: stable@dpdk.org
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Gregory Etelson [Mon, 16 Nov 2020 14:02:23 +0000 (16:02 +0200)]
net/mlx5: fix crash in tunnel offload setup
The new flow table resource management API triggered a PMD crash in
tunnel offload mode, when tunnel match flow rule was inserted before
tunnel set rule.
Reason for the crash was double flow table registration. The table was
registered by the tunnel offload code for the first time and once
more by PMD code, as part of general table processing. The table
counter was decremented only once during the rule destruction and
caused a resource leak that triggered the crash.
The patch updates PMD registration with tunnel offload parameters and
removes table registration in tunnel related code.
Fixes:
afd7a62514ad ("net/mlx5: make flow table cache thread safe")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Gregory Etelson [Mon, 16 Nov 2020 14:02:22 +0000 (16:02 +0200)]
net/mlx5: fix tunnel offload hub multi-thread protection
The original patch was removing active tunnel offload objects from a
tunnels db list without checking its reference counter value.
That action was leading to a PMD crash.
Current patch isolates tunnels db list into a separate API. That API
manages MT protection of the tunnel offload db.
Fixes:
5b38d8cd4663 ("net/mlx5: make tunnel hub list thread safe")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Gregory Etelson [Mon, 16 Nov 2020 14:02:21 +0000 (16:02 +0200)]
net/mlx5: fix tunnel offload object allocation
The original patch allocated tunnel offload objects with invalid
indexes. As the result, PMD tunnel object allocation failed.
In this patch indexed pool provides both an index and memory for a new
tunnel offload object.
Also tunnel offload ipool moved to dv enabled code only.
Fixes:
4ae8825c5085 ("net/mlx5: use indexed pool as id generator")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Gregory Etelson [Mon, 16 Nov 2020 14:02:20 +0000 (16:02 +0200)]
net/mlx5: fix structure passing method in function call
Tunnel offload implementation introduced 64 bit-field flow_grp_info
structure. Since the structure size is 64 bits, the code passed that
type by value in function calls.
The patch changes that structure passing method to reference.
Fixes:
4ec6360de37d ("net/mlx5: implement tunnel offload")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Gregory Etelson [Mon, 16 Nov 2020 14:02:19 +0000 (16:02 +0200)]
net/mlx5: fix build with Direct Verbs disabled
Tunnel offload API is implemented for Direct Verbs environment only.
Current patch re-arranges tunnel related functions for compilation in
non Direct Verbs setups to prevent compilation failures. The patch
does not introduce new functions.
Fixes:
4ec6360de37d ("net/mlx5: implement tunnel offload")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Gregory Etelson [Mon, 16 Nov 2020 14:02:18 +0000 (16:02 +0200)]
net/mlx5: fix tunnel offload callback names
Fix mlx5_flow_tunnel_action_release and mlx5_flow_tunnel_item_release
callback names to match tunnel offload names pattern.
Fixes:
4ec6360de37d ("net/mlx5: implement tunnel offload")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Ivan Malov [Mon, 16 Nov 2020 19:40:29 +0000 (22:40 +0300)]
net/sfc: rely on native thread safety in flow mechanism
The changeset that introduced common flow API thread safety
in fact introduced double locking to this particular PMD as
RTE flow API implementation in the PMD has been thread-safe
since the day zero. State this by setting the corresponding
device flag to skip locking imposed by generic RTE flow API.
Fixes:
80d1a9aff7f6 ("ethdev: make flow API thread safe")
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Ivan Malov [Mon, 16 Nov 2020 19:23:03 +0000 (22:23 +0300)]
net/sfc: fix double free on encap transfer flow rule path
Don't free the outer match spec by its pointer in the parsing context
if it has already been tracked by an entry in the outer rule registry.
Fixes:
dadff137931c ("net/sfc: support encap flow items in transfer rules")
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Bruce Richardson [Mon, 16 Nov 2020 09:33:37 +0000 (09:33 +0000)]
examples/multi_process: add SPDX license tag to makefiles
The makefiles for some of the multi_process example files were missing
SPDX license headers, so add them. These Makefiles completely replaced
the older makefiles and were written from scratch, not based on previous
versions, so add a new copyright year on them.
Fixes:
13abe17c3cd4 ("examples/multi_process: convert to pkg-config-based build")
Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Thomas Monjalon [Tue, 17 Nov 2020 10:38:26 +0000 (11:38 +0100)]
devtools: rename build test verbosity variables
The verbosity was meant to be set with options -v and -vv,
or possibly with the environment variables TEST_MESON_BUILD_VERBOSE
and TEST_MESON_BUILD_VERY_VERBOSE.
It is decided to keep only the options -v and -vv,
so the variables are renamed with lower case, marking them as privates.
The handling of the verbosity level is also moved upper in the script,
closer to other initializations.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Thomas Monjalon [Fri, 6 Nov 2020 17:08:32 +0000 (18:08 +0100)]
build: align wording of non-support reasons
Reasons for building not supported generally start with lowercase
because printed as the second part of a line.
Other changes:
- "linux" should be "Linux" with a capital letter.
- ARCH_X86_64 may be simply x86_64.
- aarch64 is preferred over arm64.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Tal Shnaiderman [Thu, 19 Nov 2020 15:43:10 +0000 (17:43 +0200)]
eal/windows: remove definition of ETOOMANYREFS
The definition of ETOOMANYREFS is reverted as it breaks build of
external applications already defining it.
Fixes:
c917b54b0c74 ("eal/windows: add definition of ETOOMANYREFS")
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Reviewed-by: Nick Connolly <nick.connolly@mayadata.io>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Savinay Dharmappa [Tue, 17 Nov 2020 10:16:08 +0000 (10:16 +0000)]
doc: fix subport configuration in ip pipeline guide
Update the user guide of ip pipeline sample application
to reflect the changes in command line arguments.
Fixes:
54a298e5f7f4 ("examples/ip_pipeline: update subport rate dynamically")
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Savinay Dharmappa [Tue, 17 Nov 2020 10:06:05 +0000 (10:06 +0000)]
examples/qos_sched: fix subport configuration
Update the qos_sched user guide and profile config file
with default subport profile.
Fixes:
802d214dc880 ("examples/qos_sched: update subport rate dynamically")
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Ibtisam Tariq [Mon, 2 Nov 2020 11:19:15 +0000 (11:19 +0000)]
doc: fix rule file parameters in l3fwd-acl guide
Add "--" and remove extra spaces in l3fwd-acl commands.
Fixes:
d0dff9ba445e ("doc: sample application user guide")
Cc: stable@dpdk.org
Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Anatoly Burakov [Thu, 19 Nov 2020 10:41:56 +0000 (10:41 +0000)]
doc: allow external build
Currently, when building sphinx documentation, the build will only
succeed if being run from the build system, because the conf.py script
expects DPDK_VERSION environment variable to be set, and crashes if it
is not.
However, there are certain external tools (such as sphinx documentation
preview extensions for certain IDE's) that use live preview and thus
rely on running their own sphinx commands. In these cases, it is useful
to permit building sphinx documentation without specifying the
DPDK_VERSION environment variable. The version string is the only thing
preventing manual sphinx build commands from working.
Fix the conf.py to use "None" as a version string in cases when
DPDK_VERSION environment variable is not set.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Gaetan Rivet [Mon, 16 Nov 2020 10:12:12 +0000 (11:12 +0100)]
bus/pci: fix comment explaining device naming
The original triple negative was hard to read and the attempt
to improve the formulation was commendable, unfortunately the new
comment is the inverse of correct.
Fixes:
a65a34a85ebf ("eal: replace usage of blacklist/whitelist in enums")
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Gaetan Rivet <grive@u256.net>
Acked-by: Luca Boccassi <bluca@debian.org>
Reviewed-by: David Marchand <david.marchand@redhat.com>
David Marchand [Mon, 16 Nov 2020 10:06:18 +0000 (11:06 +0100)]
bus/vdev: fix comment
RTE_DEV_WHITELISTED is now replaced with RTE_DEV_ALLOWED.
Fixes:
a65a34a85ebf ("eal: replace usage of blacklist/whitelist in enums")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
David Marchand [Mon, 16 Nov 2020 10:06:17 +0000 (11:06 +0100)]
doc: fix coremask option for eventdev pipeline
-w option in this context is an application option for coremask.
Restore it.
Fixes:
db27370b5720 ("eal: replace blacklist/whitelist options")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
David Marchand [Mon, 16 Nov 2020 10:06:16 +0000 (11:06 +0100)]
test/eal: remove unneeded command
All EAL flags tests are run by calling the "eal_flags_autotest" command.
There is no compatibility to maintain for sub commands only called by
meson.
Fixes:
db27370b5720 ("eal: replace blacklist/whitelist options")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Thomas Monjalon [Sun, 15 Nov 2020 23:12:26 +0000 (00:12 +0100)]
version: 20.11-rc4
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tal Shnaiderman [Sat, 14 Nov 2020 22:21:29 +0000 (00:21 +0200)]
eal/windows: add definition of ETOOMANYREFS
The ETOOMANYREFS errno was missing from the Windows build.
It is used in initialization of flow error structures.
It is defined with the same error code used by WSAETOOMANYREFS.
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Stephen Hemminger [Tue, 10 Nov 2020 22:55:40 +0000 (14:55 -0800)]
doc: replace usage of blacklist/whitelist
The words blacklist and whitelist are avoided in text
about MAC filtering or kernel module.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Stephen Hemminger [Tue, 10 Nov 2020 22:55:40 +0000 (14:55 -0800)]
test: rename blacklist/whitelist in autotest scripts
The options and variables are renamed to use block/allow terminology.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Stephen Hemminger [Tue, 10 Nov 2020 22:55:40 +0000 (14:55 -0800)]
eal: replace blacklist/whitelist options
Replace -w / --pci-whitelist with -a / --allow options
and --pci-blacklist with --block.
The -b short option remains unchanged.
Allow the old options for now, but print a nag
warning since old options are deprecated.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Stephen Hemminger [Tue, 10 Nov 2020 22:55:38 +0000 (14:55 -0800)]
eal: replace usage of blacklist/whitelist in enums
Rename the enum values in the EAL include files.
As a backward compatible temporary migration tool, define
a replacement mapping for old values.
The old names relating to blacklist and whitelist are replaced
by block list and allow list, but applications may be using the
older compatibility macros, marked as deprecated.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Gaetan Rivet <grive@u256.net>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Cristian Dumitrescu [Thu, 12 Nov 2020 14:50:13 +0000 (14:50 +0000)]
pipeline: fix multiple SWX emit pattern detection
Fix the detection of instruction pattern with multiple emits followed
by TX. Once detected, this is one of the instruction patterns that is
internally replaced with a single optimized instruction, as long as
none of the instructions to be replaced is referenced by a jump
instruction. The fix enforces this check for the TX instruction of
the pattern.
Fixes:
31035e87b207 ("pipeline: add SWX instruction optimizer")
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Honnappa Nagarahalli [Mon, 2 Nov 2020 19:56:59 +0000 (13:56 -0600)]
test/ring: remove unused code
Remove unused assignment statement as the assigned variable is
not used in the code further.
Coverity issue: 363690
Fixes:
6c583103a2d1 ("test/ring: factorize object checks")
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Conor Walsh [Tue, 10 Nov 2020 11:03:13 +0000 (11:03 +0000)]
test/ring: fix build for O1 optimization
When DPDK is compiled with gcc < 9 with the optimization level set to 1
gcc sees zcd in test_ring.h as possibly being uninitialised. To correct
this error if statements from _st_ring_dequeue_bulk and
_st_ring_enqueue_bulk were corrected within test_ring_mt_peek_stress_zc.c
Fixes:
f72299fd157d ("test/ring: add stress tests for zero copy API")
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
David Marchand [Sat, 14 Nov 2020 09:05:33 +0000 (10:05 +0100)]
examples: restore trace point
Before make removal, those examples were built with experimental flag
for tracepoints to be compiled in but the pkg-config part of those
makefiles were missed.
Fixes:
78d44153de8f ("ethdev: add tracepoints")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
David Marchand [Sat, 14 Nov 2020 09:05:32 +0000 (10:05 +0100)]
examples/rxtx_callbacks: fix build with pkg-config
This example is missing the experimental flag since it uses an
experimental API.
Fixes:
cd1dadeb9b2a ("examples/rxtx_callbacks: support HW timestamp")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
David Marchand [Sat, 14 Nov 2020 09:05:31 +0000 (10:05 +0100)]
examples/vhost_blk: fix build with pkg-config
vhost_blk.c: In function ‘ctrlr_worker’:
vhost_blk.c:543:2: warning: implicit declaration of function ‘CPU_ZERO’
[-Wimplicit-function-declaration]
543 | CPU_ZERO(&cpuset);
| ^~~~~~~~
vhost_blk.c:544:2: warning: implicit declaration of function ‘CPU_SET’
[-Wimplicit-function-declaration]
544 | CPU_SET(0, &cpuset);
| ^~~~~~~
vhost_blk.c:545:2: warning: implicit declaration of function
‘pthread_setaffinity_np’ [-Wimplicit-function-declaration]
545 | pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);
| ^~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/cczpiMWH.o: in function `ctrlr_worker':
vhost_blk.c:(.text+0x1076): undefined reference to `CPU_ZERO'
/usr/bin/ld: vhost_blk.c:(.text+0x1082): undefined reference to
`CPU_SET'
collect2: error: ld returned 1 exit status
gmake: *** [Makefile:34: build/vhost-blk-shared] Error 1
Explicitly pass _GNU_SOURCE and include missing headers (rather than
rely on automagic inclusion from other system headers).
Fixes:
c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
David Marchand [Sat, 14 Nov 2020 09:05:30 +0000 (10:05 +0100)]
examples/performance-thread: fix build with pkg-config
main.c: In function ‘lthread_tx’:
main.c:2091:25: error: implicit declaration of function ‘sched_getcpu’;
did you mean ‘sched_getparam’? [-Werror=implicit-function-declaration]
2091 | tx_conf->conf.cpu_id = sched_getcpu();
| ^~~~~~~~~~~~
| sched_getparam
cc1: all warnings being treated as errors
Explicitly pass _GNU_SOURCE and include missing header (rather than
rely on automagic inclusion from other system headers).
Fixes:
d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
David Marchand [Sat, 14 Nov 2020 09:05:29 +0000 (10:05 +0100)]
examples/ntb: fix clean target
When introducing this example, the cleanup from commit
7e9562a107f1
("examples: fix make clean when using pkg-config") was missed.
Fixes:
c5eebf85badc ("examples/ntb: add example for NTB")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
David Marchand [Sat, 14 Nov 2020 09:05:28 +0000 (10:05 +0100)]
examples/l3fwd-graph: fix pkg-config usage
This example missed the fixes from commit
69b1bb49ed82
("examples: hide error for missing pkg-config path flag") and
commit
12a652a02b08 ("examples: fix build with old pkg-config").
Fixes:
08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
David Marchand [Sat, 14 Nov 2020 09:05:27 +0000 (10:05 +0100)]
examples/l3fwd-graph: fix static build
This example missed the rework from commit
8549295db07b
("build/pkg-config: improve static linking flags").
Fixes:
08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
David Marchand [Sat, 14 Nov 2020 09:05:26 +0000 (10:05 +0100)]
examples/l2fwd-crypto: fix build with pkg-config
Two issues fixed here.
First add the experimental flag.
Then fix a link issue with the crypto scheduler driver:
/usr/bin/ld: /tmp/cchr7aHA.o: in function `main':
main.c:(.text.startup+0x1673): undefined reference to
`rte_cryptodev_scheduler_workers_get'
collect2: error: ld returned 1 exit status
Fixes:
e3bcb99a5e13 ("examples/l2fwd-crypto: limit number of sessions")
Fixes:
261bbff75e34 ("examples: use separate crypto session mempools")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
David Marchand [Sat, 14 Nov 2020 09:05:25 +0000 (10:05 +0100)]
examples/kni: fix build with pkg-config
rm -f build/kni build/kni-static build/kni-shared
test -d build && rmdir -p build || true
[...]
/usr/bin/ld: /tmp/cc72ssnK.o: undefined reference to symbol
'pthread_join@@GLIBC_2.2.5'
This example explicitly call pthread API and should be linked against
the pthread library.
Fixes:
724beb913b44 ("examples/kni: monitor and update link state continually")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
David Marchand [Sat, 14 Nov 2020 09:05:24 +0000 (10:05 +0100)]
examples/ipsec-gw: fix build with pkg-config
flow.c: In function ‘parse_flow_tokens’:
flow.c:153:23: error: taking address of packed member of ‘struct
rte_ipv4_hdr’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
153 | if (ipv4_addr_cpy(&rule->ipv4.spec.hdr.src_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flow.c:154:9: error: taking address of packed member of ‘struct
rte_ipv4_hdr’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
154 | &rule->ipv4.mask.hdr.src_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flow.c:170:23: error: taking address of packed member of ‘struct
rte_ipv4_hdr’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
170 | if (ipv4_addr_cpy(&rule->ipv4.spec.hdr.dst_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flow.c:171:9: error: taking address of packed member of ‘struct
rte_ipv4_hdr’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
171 | &rule->ipv4.mask.hdr.dst_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Meson build is fine since we waive those warnings.
Replicate it for make.
Fixes:
8e693616fcb2 ("examples/ipsec-secgw: enable flow based distribution")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
David Marchand [Sat, 14 Nov 2020 09:05:23 +0000 (10:05 +0100)]
examples/fips_validation: fix build with pkg-config
When this example started using rte_cryptodev_sym_session_pool_create,
the part for pkg-config builds was not updated.
Fixes:
261bbff75e34 ("examples: use separate crypto session mempools")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Pavan Nikhilesh [Thu, 12 Nov 2020 17:43:29 +0000 (23:13 +0530)]
app/eventdev: check timer adadpters number
Fix SEGFAULT when nb_timer_adapters command line parameter is
set to 0.
Fixes:
98c6292105d4 ("app/eventdev: add options for event timer adapter")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Timothy McDaniel [Wed, 11 Nov 2020 20:27:02 +0000 (14:27 -0600)]
event/dlb: remove duplicate/unused PCI code
Use rte_pci_find_ext_capability instead of private version,
Remove unused PCI offsets and values
Use PCI definitions from rte_pci.h, where available.
Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Timothy McDaniel [Wed, 11 Nov 2020 20:27:01 +0000 (14:27 -0600)]
event/dlb: skip memzone freeing if port created
Add missing returns so that the memzone free is not called if
port create is successful.
Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Mike Ximing Chen <mike.ximing.chen@intel.com>
Timothy McDaniel [Wed, 11 Nov 2020 20:27:00 +0000 (14:27 -0600)]
event/dlb2: remove duplicate/unused PCI code
Use rte_pci_find_ext_capability instead of private version,
Remove unused PCI offsets and values
Use PCI definitions from rte_pci.h, where available.
Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Timothy McDaniel [Wed, 11 Nov 2020 20:26:59 +0000 (14:26 -0600)]
event/dlb2: add delayed token pop logic
The code contained in this commit was inadvertently omitted
when dissecting the dlb2 code base into discrete patches for
upstream.
Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Mike Ximing Chen <mike.ximing.chen@intel.com>
Timothy McDaniel [Thu, 5 Nov 2020 21:22:51 +0000 (15:22 -0600)]
doc: add some features to DLB2 guide
Add queue depth threshold and class of service sections
to DLB2 rst file.
Fixes:
5433956 ("event/dlb2: add eventdev probe")
Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Timothy McDaniel [Thu, 5 Nov 2020 21:22:52 +0000 (15:22 -0600)]
event/dlb2: fix mempool query in self test
Add NULL check before using t->mbuf_pool.
Coverity issue: 363719
Fixes:
6f1b828 ("event/dlb2: add self-tests")
Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Timothy McDaniel [Thu, 5 Nov 2020 21:22:54 +0000 (15:22 -0600)]
event/dlb: remove useless assignment
Remove nonproductive assignment of qmport->cq_depth.
Coverity issue: 363717
Fixes:
ee57517 ("event/dlb: add port setup")
Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Timothy McDaniel [Thu, 5 Nov 2020 21:22:53 +0000 (15:22 -0600)]
event/dlb: fix memory overrun in PF reset
Fix memory corruption bug caused by passing address of a 16b value,
instead of address of a 32b value.
Coverity issue: 363715
Fixes:
1998008 ("event/dlb: add eventdev probe")
Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Pablo de Lara [Thu, 12 Nov 2020 16:36:21 +0000 (16:36 +0000)]
doc: support IPsec Multi-buffer lib v0.55
Updated AESNI MB and AESNI GCM PMD documentation guides
with information about the latest Intel IPSec Multi-buffer
library supported.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Ciara Power [Wed, 11 Nov 2020 09:42:54 +0000 (09:42 +0000)]
test/crypto: fix typo in block cipher output
The print statement had a typo, "sesionless" should have been
"sessionless". This is now fixed.
Fixes:
afcfa2fd0431 ("test/crypto: check session-less support")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Fan Zhang [Thu, 5 Nov 2020 13:58:57 +0000 (13:58 +0000)]
test/crypto: fix out-of-place test
This patch fixes bypassed out of place test for PMDs that support it.
Fixes:
4868f6591c6f ("test/crypto: add cases for raw datapath API")
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
David Marchand [Thu, 5 Nov 2020 08:36:17 +0000 (09:36 +0100)]
doc: fix typo in ipsec-secgw guide
Fixes:
02dc5b7d58c7 ("doc: update ipsec-secgw guide and release notes")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Nicolas Chautru [Tue, 3 Nov 2020 19:39:36 +0000 (11:39 -0800)]
doc: add reference to Intel baseband configuration tool
Adding reference to pf_bb_config in github to do
device configuration of the fpga_5gnr, fpga_lte and
acc100 devices and pmds.
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Tom Rix <trix@redhat.com>
Archana Muniganti [Tue, 3 Nov 2020 08:37:17 +0000 (14:07 +0530)]
common/cpt: remove redundant structure
Replaced structure 'rid' which has single field with its
field itself.
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Archana Muniganti [Tue, 3 Nov 2020 08:37:16 +0000 (14:07 +0530)]
common/cpt: use predefined macros
Replace redundant macro ROUNDUP* with predefined macros.
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Archana Muniganti [Tue, 3 Nov 2020 08:37:15 +0000 (14:07 +0530)]
common/cpt: remove temporary variables
Remove temporary variable used in datapath.
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Archana Muniganti [Tue, 3 Nov 2020 08:37:14 +0000 (14:07 +0530)]
common/cpt: prepopulate word7 in session
CPT inst word7 is an immutable data for a session.
This data can be populated in a session.
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Ciara Power [Fri, 30 Oct 2020 13:11:26 +0000 (13:11 +0000)]
test/crypto: fix null dereference of crypto op
In two test cases, the op value is set by the return of the
process_crypto_request function, which may be NULL. The op->status
value was checked afterwards, which was causing a dereference issue.
To fix this, a temporary op variable is used to hold the return
from the process_crypto_request function, so the original op->status
can be checked after the possible NULL return value.
The original op value is then set to hold the temporary op value.
Coverity issue: 363452, 363465
Fixes:
4868f6591c6f ("test/crypto: add cases for raw datapath API")
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Fan Zhang [Thu, 29 Oct 2020 14:46:31 +0000 (14:46 +0000)]
test/crypto: fix GMAC SGL case
This patch fixes the GMAC SGL test that fails to bypass
unsupported PMDs.
Fixes:
dcdd01691f39 ("test/crypto: add GMAC SGL")
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: Yu Jiang <yux.jiang@intel.com>
Michael Baum [Wed, 11 Nov 2020 07:36:48 +0000 (07:36 +0000)]
common/mlx5: fix freeing on flex parser creation failure
The mlx5_devx_cmd_create_flex_parser function defines a local array
(with constant size) named in, and then allocates a pointer to
mlx5_devx_obj structure by the mlx5_malloc function.
If the allocation fails, the function releases the array in and returns
NULL. However, the array has been defined locally on the stack and the
mlx5_free function is not required to release it.
Remove the call to the mlx5_free function.
Fixes:
66914d19d135 ("common/mlx5: convert control path memory to unified malloc")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Michael Baum [Wed, 11 Nov 2020 07:36:47 +0000 (07:36 +0000)]
net/mlx5/linux: fix probing adjustment depending on DevX
Bonding adjustment is done only when DEVX_PORT is supported in the
rdma-core.
Some bonding condition was done even when DEVX_PORT is not supported.
Remove it.
Fixes:
2eb4d0107acc ("net/mlx5: refactor PCI probing on Linux")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Michael Baum [Wed, 11 Nov 2020 07:36:46 +0000 (07:36 +0000)]
net/mlx5: fix leak on ASO age pools resize failure
In ASO age pools resize, the PMD starts ASO data-path.
When starting ASO data-path is failed, the pools memory was not freed
what caused a memory leak.
Free it.
Fixes:
f935ed4b645a ("net/mlx5: support flow hit action for aging")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Michael Baum [Wed, 11 Nov 2020 07:36:45 +0000 (07:36 +0000)]
net/mlx5: fix leak on Rx queue creation failure
In Rx queue creation, there is a validation for the Rx configuration.
When scatter offload validation for buffer split is failed, the Rx queue
object memory was not freed what caused a memory leak.
Free it.
Fixes:
a0a45e8af723 ("net/mlx5: configure Rx queue for buffer split")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Michael Baum [Wed, 11 Nov 2020 07:36:44 +0000 (07:36 +0000)]
net/mlx5: remove unused calculation in RSS expansion
The RSS flow expansion get a memory buffer to fill the new patterns of
the expanded flows.
This memory management saves the next address to write into the buffer
in a dedicated variable.
The calculation for the next address was wrongly also done when all the
patterns were ready.
Remove it.
Fixes:
4ed05fcd441b ("ethdev: add flow API to expand RSS flows")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Xueming Li [Mon, 9 Nov 2020 22:57:59 +0000 (22:57 +0000)]
net/mlx5: fix nested flow creation
If xmedata mode 1 enabled and create a flow with RSS and mark action,
there was an error that rdma-core failed to create RQT due to wrong
queue definition. This was due to mixed flow creation in thread specific
flow workspace.
This patch introduces nested flow workspace(context data), each flow
uses dedicate flow workspace, pop and restore workspace when nested flow
creation done, the original flow with continue with original flow
workspace. The total number of thread specific flow workspace should be
2 due to only one nested flow creation scenario so far.
Fixes:
8bb81f2649b1 ("net/mlx5: use thread specific flow workspace")
Fixes:
3ac3d8234b82 ("net/mlx5: fix index when creating flow")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Xueming Li [Tue, 3 Nov 2020 08:28:43 +0000 (08:28 +0000)]
net/mlx5: fix Unix socket path
mlx_steering_dump_parser.py tool failed to dump flow due to socket file
name changed.
Change socket file name back to make it consistent.
Fixes:
e4b7b8d082db ("common/mlx5: fix PCI driver name")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Suanming Mou [Thu, 12 Nov 2020 08:51:43 +0000 (16:51 +0800)]
net/mlx5: fix detection of counter offset support
Currently, the counter offset support is discovered by creating the
rule with invalid offset counter and jump action in root table. If
the rule creation fails with EINVAL errno, that mean counter offset
is not supported in root table.
However, jump action may not be supported in some rdma-core version.
In this case, the discover code will not work properly.
This commits changes the jump action to generic drop action. That
makes the discover code to be more compatible.
Fixes:
994829e695c0 ("net/mlx5: remove single counter container")
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Bing Zhao [Fri, 13 Nov 2020 07:05:33 +0000 (15:05 +0800)]
net/mlx5: fix hairpin unbind
In the implementation of mlx5_hairpin_unbind, a copy-paste error was
inside. If a single peer Rx port needed to be unbound, it would be
bound again by mistake.
All the hardware resources were released when stopping the device and
no mess of the configuration was introduced. But when trying to unbind
the ports again, the issue would appear.
The typo of the function call is fixed. If there is no hairpin queue
bound between two ports, the unbinding process should be considered
successful.
Fixes:
37cd4501e873 ("net/mlx5: support two ports hairpin mode")
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Xiaoyu Min [Tue, 10 Nov 2020 11:59:53 +0000 (19:59 +0800)]
net/mlx5: validate MPLSoGRE with GRE key
Currently PMD only accept flow which item_mpls directly follow item_gre,
means to match the GRE header without GRE optional field key in MPLSoGRE
encapsulation.
However, for the MPLSoGRE, the GRE header could have the optional field
(i.e, key) according to the RFC. So PMD need to accept this.
Add MLX5_FLOW_LAYER_GRE_KEY into allowed prev_layer to fix
Fixes:
a7a0365565a4 ("net/mlx5: match GRE key and present bits")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Bing Zhao [Wed, 11 Nov 2020 09:28:50 +0000 (17:28 +0800)]
net/mlx5: fix check of eCPRI previous layer
Based on the specification, eCPRI can only follow ETH (VLAN) layer
or UDP layer. When creating a flow with eCPRI item, this should be
checked and invalid layout of the layers should be rejected.
Fixes:
c7eca23657b7 ("net/mlx5: add flow validation of eCPRI header")
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Alexander Kozyrev [Sun, 8 Nov 2020 04:28:04 +0000 (04:28 +0000)]
net/mlx5: fix Rx descriptors info for MPRQ
The number of descriptors configured is returned to a user
via the rxq_info_get API. This number is incorrect for MPRQ.
For SPRQ this number matches the number of mbufs allocated.
For MPRQ we have fewer external MPRQ buffers that can hold
multiple packets in strides of this big buffer. Take that
into account and return the number of MPRQ buffers multiplied
by the number of strides in this case.
Fixes:
26f1bae837eb ("net/mlx5: add Rx/Tx burst mode info")
Cc: stable@dpdk.org
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Alexander Kozyrev [Sun, 8 Nov 2020 04:23:57 +0000 (04:23 +0000)]
net/mlx5: improve vectorized MPRQ descriptors locality
There is a performance penalty for the replenish scheme
used in vectorized Rx burst for both MPRQ and SPRQ.
Mbuf elements are being filled at the end of the mbufs
array and being replenished at the beginning. That leads
to an increase in cache misses and the performance drop.
The more Rx descriptors are used the worse the situation.
Change the allocation scheme for vectorized MPRQ Rx burst:
allocate new mbufs only when consumed mbufs are almost
depleted (always have one burst gap between allocated and
consumed indices). Keeping a small number of mbufs allocated
improves cache locality and improves performance a lot.
Unfortunately, this approach cannot be applied to SPRQ Rx
burst routine. In MPRQ Rx burst we simply copy packets from
external MPRQ buffers or attach these buffers to mbufs.
In SPRQ Rx burst we allow the NIC to fill mbufs for us.
Hence keeping a small number of allocated mbufs will limit
NIC ability to fill as many buffers as possible. This fact
offsets the advantage of better cache locality.
Fixes:
0f20acbf5eda ("net/mlx5: implement vectorized MPRQ burst")
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Lance Richardson [Fri, 13 Nov 2020 16:04:45 +0000 (11:04 -0500)]
net/bnxt: fix doorbell barrier location
Simplify some doorbell functions now that rte_cio_wmb() has been
eliminated and rte_io_wmb() is equivalent for Arm.
Fix a performance degradation on x86 platforms caused by a
previous Arm performance fix by moving the compiler barrier
closer to the I/O write.
Fixes:
f0f5d844d138 ("eal: remove deprecated coherent IO memory barriers")
Fixes:
bfc1d45875e2 ("net/bnxt: fix performance for Arm")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Olivier Matz [Fri, 13 Nov 2020 10:39:57 +0000 (11:39 +0100)]
net/pcap: fix registration of timestamp dynamic field
In pcap pmd, the timestamp mbuf dynamic field is mandatory. When the
pcap pmd is created in a secondary process (this is the case for pdump),
it cannot be registered because this is not allowed from a secondary
process.
To ensure that the field is properly registered, do it from probe()
instead of configure(). Indeed, probe() is first invoked on the primary
process when a device is created in a secondary, this enables
registering dynfield from secondary process.
Bugzilla ID: 571
Fixes:
d23d73d088c1 ("net/pcap: switch Rx timestamp to dynamic mbuf field")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ferruh Yigit [Fri, 13 Nov 2020 11:44:00 +0000 (11:44 +0000)]
app/testpmd: fix MTU after device configure
In 'rte_eth_dev_configure()', if 'DEV_RX_OFFLOAD_JUMBO_FRAME' is not set
the max frame size is limited to 'RTE_ETHER_MAX_LEN' (1518).
This is mistake because for the PMDs that has frame size bigger than
"RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN" (18 bytes), the MTU becomes
less than 1500, causing a valid frame with 1500 bytes payload to be
dropped.
Since 'rte_eth_dev_set_mtu()' works as expected, it is called after
'rte_eth_dev_configure()' to fix the MTU.
It may look redundant to set MTU after 'rte_eth_dev_configure()', both
with default values, but it is not, the resulting MTU config can be
different in the device based on frame overhead of the PMD.
And instead of setting the MTU to default value, it is first get via
'rte_eth_dev_get_mtu()' and set again, this is to cover cases MTU
changed from testpmd command line.
'rte_eth_dev_set_mtu()', '-ENOTSUP' error is ignored to prevent
irrelevant warning messages for the virtual PMDs.
Fixes:
af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Tested-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Michael Pfeiffer [Fri, 13 Nov 2020 14:03:32 +0000 (15:03 +0100)]
net/tap: allow all-zero checksum for UDP over IPv4
Unlike TCP, UDP checksums are optional and may be zero to indicate "not
set" [RFC 768] (except for IPv6, where this prohibited [RFC 8200]). Add
this special case to the checksum offload emulation in net/tap.
Signed-off-by: Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Fri, 13 Nov 2020 08:42:40 +0000 (08:42 +0000)]
common/sfc_efx/base: fix macro to extract from 256-bit type
Fixes:
eda1cc20c3bc ("common/sfc_efx/base: add 256-bit type")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Maxime Coquelin [Thu, 12 Nov 2020 17:10:29 +0000 (18:10 +0100)]
vhost: fix fd leak in kick setup
This patch fixes a file descriptor leak which happens
in the error path of vhost_user_set_vring_kick().
Fixes:
4796ad63ba1f ("examples/vhost: import userspace vhost application")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
Maxime Coquelin [Thu, 12 Nov 2020 17:10:28 +0000 (18:10 +0100)]
vhost: fix fd leak in dirty logging setup
This patch fixes a file descriptor leak which happens
in the error path of vhost_user_set_log_base().
Fixes:
4796ad63ba1f ("examples/vhost: import userspace vhost application")
Cc: stable@dpdk.org
Reported-by: Xuan Ding <xuan.ding@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
Maxime Coquelin [Thu, 12 Nov 2020 17:10:27 +0000 (18:10 +0100)]
vhost: fix error path when setting memory tables
If an error is encountered before the memory regions are
parsed, the file descriptors for these shared buffers are
leaked.
This patch fixes this by closing the message file descriptors
on error, taking care of avoiding double closing of the file
descriptors. guest_pages is also freed, even though it was not
leaked as its pointer was not overridden on subsequent function
calls.
Fixes:
8f972312b8f4 ("vhost: support vhost-user")
Cc: stable@dpdk.org
Reported-by: Xuan Ding <xuan.ding@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
Cheng Jiang [Thu, 12 Nov 2020 15:49:02 +0000 (15:49 +0000)]
examples/vhost: fix ioat dependency
Fix vhost-switch compiling issue when ioat dependency is missing.
Change 'RTE_x86' check into 'RTE_RAW_IOAT' check in meson build file.
Use 'RTE_RAW_IOAT' to control conditional compiling in source file.
Clean some codes.
Fixes:
abec60e7115d ("examples/vhost: support vhost async data path")
Fixes:
3a04ecb21420 ("examples/vhost: add async vhost args parsing")
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Cheng Jiang [Wed, 11 Nov 2020 09:08:06 +0000 (09:08 +0000)]
examples/vhost: fix string split error handling
Add checking return value of string split function to fix the
coverity issue.
Coverity issue: 363739
Fixes:
3a04ecb21420 ("examples/vhost: add async vhost args parsing")
Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Cheng Jiang [Fri, 6 Nov 2020 03:24:01 +0000 (03:24 +0000)]
examples/vhost: check argument length
Add args length check before copying to fix the coverity issue.
Coverity issue: 363741
Fixes:
3a04ecb21420 ("examples/vhost: add async vhost args parsing")
Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Steve Yang [Fri, 13 Nov 2020 00:46:42 +0000 (00:46 +0000)]
net/iavf: fix RSS when VF port closed
Check the VF RSS offload flag and ignore relative operation when
iavf hash uninit to avoid reset/close error.
Fixes:
7be10c3004be ("net/iavf: add RSS configuration for VF")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Alvin Zhang [Fri, 13 Nov 2020 02:51:18 +0000 (10:51 +0800)]
net/ice: support flow mark ID in AVX512
Support flow director mark ID parsing from flexible Rx descriptor
in avx512 path.
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Tested-by: Qin Sun <qinx.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Haiyue Wang [Thu, 12 Nov 2020 02:00:06 +0000 (10:00 +0800)]
net/ixgbe: remove redundant MAC flag check
The flag of RTE_ETHTYPE_FLAGS_MAC has been checked twice, so remove the
first error message "Not supported by ethertype filter" which is not so
specific, and keep the error message "mac compare is unsupported" which
aligns to the definition of RTE_ETHTYPE_FLAGS_MAC.
Fixes:
eb3539fc8550 ("net/ixgbe: parse ethertype filter")
Cc: stable@dpdk.org
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Mike Baucom [Thu, 12 Nov 2020 15:29:45 +0000 (07:29 -0800)]
net/bnxt: fix assignment instead of comparison
Use comparison operator instead of incorrectly using the assignment
operator.
Coverity issue: 363566, 36357
Fixes:
42c40f8902f7 ("net/bnxt: consolidate template table processing")
Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Conor Walsh [Wed, 11 Nov 2020 15:39:33 +0000 (15:39 +0000)]
net/txgbe: fix build by simplifying xstats return
When DPDK is compiled with gcc 7.5 with the optimization level set to 1
gcc sees the 'offset' variable in txgbe_ethdev.c as possibly being
uninitialised.
The 'txgbe_get_offset_by_id()' return value, "-(int)(id + 1)", seems
confusing gcc that it assumes '0' can be returned in the failure case.
To correct this the return statement for error case in
'txgbe_get_offset_by_id()' is simplified to return '-1'.
Fixes:
91fe49c87d76 ("net/txgbe: support device xstats")
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Guoyang Zhou [Wed, 11 Nov 2020 06:33:37 +0000 (14:33 +0800)]
net/hinic/base: add message check for command channel
In the command channel, a message may has several fragments,
and the several fragments should have same message id. To
prevent problems, this check is added.
Fixes:
1e4593db1d58 ("net/hinic/base: fix log info for PF command channel")
Cc: stable@dpdk.org
Signed-off-by: Guoyang Zhou <zhouguoyang@huawei.com>
Leyi Rong [Thu, 12 Nov 2020 05:51:54 +0000 (13:51 +0800)]
net/iavf: fix performance drop after port reset
Needs to reset rxq->rxrearm_start to 0 when reset_rx_queue(),
otherwise, the random value of rxrearm_start will cause performance drop
due to L3 contested accesses.
Fixes:
69dd4c3d0898 ("net/avf: enable queue and device")
Cc: stable@dpdk.org
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Shougang Wang [Wed, 11 Nov 2020 03:27:17 +0000 (03:27 +0000)]
doc: update firmware/driver mapping table for i40e
Update i40e PMD firmware/driver mapping table.
Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Simei Su [Wed, 11 Nov 2020 11:30:05 +0000 (19:30 +0800)]
net/ice: fix perfect match for ACL rule
A rule with an imperfect match (wildcarding) will be routed through
ACL. A perfect match should be rejected by ACL.
Fixes:
40d466fa9f76 ("net/ice: support ACL filter in DCF")
Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Ferruh Yigit [Mon, 9 Nov 2020 13:30:05 +0000 (13:30 +0000)]
net/af_xdp: fix pointer storage size
'uint64_t' is used to hold the pointer, for 32-bits build this
assumption is wrong and giving following build error:
rte_eth_af_xdp.c: In function ‘xdp_umem_configure’:
rte_eth_af_xdp.c:970:15:
error: cast to pointer from integer of different size
[-Werror=int-to-pointer-cast]
970 | base_addr = (void *)get_base_addr(mb_pool, &align);
| ^
Replacing the 'uint64_t' return type of the 'get_base_addr()' to the
'uintptr_t'.
Although not sure if the overall logic supports the 32-bits, using
'uintptr_t' should be safe both for 64/32 bits.
Fixes:
d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Ciara Loftus <ciara.loftus@intel.com>