Honnappa Nagarahalli [Tue, 8 Oct 2019 21:12:20 +0000 (16:12 -0500)]
rcu: update QS only when there are updates from writer
When the writer is checking the quiescent state status, it is not
deleting any entries in the data structure. This means, the readers
do not need to update their quiescent state during that period.
Readers update the quiescent state only when there are updates
available from the writer.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Honnappa Nagarahalli [Tue, 8 Oct 2019 21:12:19 +0000 (16:12 -0500)]
rcu: add least acknowledged token optimization
When the rte_rcu_qsbr_check API is called, it is possible to
calculate the least valued token acknowledged by all the readers.
When the API is called next time, the readers' token counters do
not need to be scanned if the value of the token being queried is
less than the last least token acknowledged. This avoids the
cache line bounces between readers and writer.
Fixes:
64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Honnappa Nagarahalli [Tue, 8 Oct 2019 21:12:18 +0000 (16:12 -0500)]
test/rcu: enhance log nomenclature
Use 'quiescent state updates' instead of just 'updates'.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Honnappa Nagarahalli [Tue, 8 Oct 2019 21:12:17 +0000 (16:12 -0500)]
test/rcu: fix memory size integer truncate
Variables used to store the return value of rte_rcu_qsbr_get_memsize
in variables of type 'int' or 'uint32_t'.
While the former variables are a problem, the latter have been aligned
for consistency.
The variables are of type 'size_t' now.
Fixes:
b87089b0bb19 ("test/rcu: add API and functional tests")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Honnappa Nagarahalli [Tue, 8 Oct 2019 21:12:16 +0000 (16:12 -0500)]
doc: describe token and resource retention in RCU guide
After calling rte_rcu_qsbr_start API, the token and the deleted
resource need to be stored for subsequent query/free.
Fixes:
64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Honnappa Nagarahalli [Tue, 8 Oct 2019 21:12:15 +0000 (16:12 -0500)]
doc: remove wrong limitation in RCU guide
There is no limitation of 1024 reader threads.
Fixes:
64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Honnappa Nagarahalli [Tue, 8 Oct 2019 21:12:14 +0000 (16:12 -0500)]
doc: proofread RCU guide
Fixes:
64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
David Marchand [Mon, 21 Oct 2019 15:44:54 +0000 (17:44 +0200)]
examples/ntb: fix build
lcore indexes can't be represented with uint8_t.
Seen on armv8 target:
examples/ntb/ntb_fwd.c: In function ‘cmd_quit_parsed’:
arm64-armv8a-linux-gcc/include/rte_lcore.h:296:8:
error: comparison is always true due to limited range of data type
[-Werror=type-limits]
i<RTE_MAX_LCORE; \
^
examples/ntb/ntb_fwd.c:164:2: note: in expansion of
macro ‘RTE_LCORE_FOREACH_SLAVE’
RTE_LCORE_FOREACH_SLAVE(lcore_id) {
^~~~~~~~~~~~~~~~~~~~~~~
Fixes:
5194299d6ef5 ("examples/ntb: support more functions")
Signed-off-by: David Marchand <david.marchand@redhat.com>
David Marchand [Tue, 13 Aug 2019 06:38:22 +0000 (08:38 +0200)]
devtools: fix cleanup of checkpatch temporary file
The regexp part of the cleanup routine was not updated accordingly when
a common prefix for temp files was introduced.
Set the trap handler only when required.
Fixes:
ff37ca5d3773 ("devtools: use a common prefix for temporary files")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
David Marchand [Mon, 12 Aug 2019 07:00:54 +0000 (09:00 +0200)]
clean bare metal support traces
Bare metal support has been gone for quite some time but we still had
some checks on system includes.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Xiaoyun Li [Thu, 26 Sep 2019 03:20:22 +0000 (11:20 +0800)]
examples/ntb: support more functions
Support to transmit files between two systems.
Support iofwd between one ethdev and NTB device.
Support rxonly and txonly for NTB device.
Support to set forwarding mode as file-trans, txonly,
rxonly or iofwd.
Support to show/clear port stats and throughput.
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Xiaoyun Li [Thu, 26 Sep 2019 03:20:21 +0000 (11:20 +0800)]
raw/ntb: add enqueue and dequeue functions
Introduce enqueue and dequeue functions to support packet based
processing. And enable write-combining for ntb driver since it
can improve the performance a lot.
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Xiaoyun Li [Thu, 26 Sep 2019 03:20:20 +0000 (11:20 +0800)]
raw/ntb: support xstats
Add xstats support for NTB rawdev.
Support tx-packets, tx-bytes, tx-errors and
rx-packets, rx-bytes, rx-missed.
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Xiaoyun Li [Thu, 26 Sep 2019 03:20:19 +0000 (11:20 +0800)]
raw/ntb: setup queues
Setup and init NTB txq and rxq. And negotiate queue information
with the peer. If queue size and number of queues are not
consistent on both sides, return error.
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Phil Yang [Fri, 18 Oct 2019 11:21:30 +0000 (19:21 +0800)]
stack: enable lock-free implementation for aarch64
Enable both C11 atomic and non C11 atomic lock-free stack for aarch64.
Introduced a new header to reduce the ifdef clutter across generic and C11
files. The rte_stack_lf_stubs.h contains stub implementations of
__rte_stack_lf_count, __rte_stack_lf_push_elems and
__rte_stack_lf_pop_elems.
Suggested-by: Gage Eads <gage.eads@intel.com>
Suggested-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Tested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Phil Yang [Fri, 18 Oct 2019 11:21:29 +0000 (19:21 +0800)]
test/atomic: add 128-bit atomic compare exchange test
Add 128-bit atomic compare and swap test for aarch64 and x86_64.
Extend the test iteration from 10 thousand to 1 million times to test
the stability of the atomic APIs.
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Phil Yang [Fri, 18 Oct 2019 11:21:28 +0000 (19:21 +0800)]
eal/arm64: add 128-bit atomic compare exchange
This patch adds the implementation of the 128-bit atomic compare
exchange API on aarch64. Using 64-bit 'ldxp/stxp' instructions
can perform this operation. Moreover, on the LSE atomic extension
accelerated platforms, it is implemented by 'casp' instructions for
better performance.
Since the '__ARM_FEATURE_ATOMICS' flag only supports GCC-9, this
patch adds a new config flag 'RTE_ARM_FEATURE_ATOMICS' to enable
the 'cas' version on older version compilers.
For octeontx2, we make sure that the lse (and other) extensions are
enabled even if the compiler does not know of the octeontx2 target
cpu.
Since direct x0 register used in the code and cas_op_name() and
rte_atomic128_cmp_exchange() is inline function, based on parent
function load, it may corrupt x0 register aka break aarch64 ABI.
Define CAS operations as rte_noinline functions to avoid an ABI
break [1].
1: https://git.dpdk.org/dpdk/commit/?id=
5b40ec6b9662
Suggested-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Tested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Jim Harris [Mon, 7 Oct 2019 15:28:21 +0000 (08:28 -0700)]
eal: calibrate TSC only in primary process
This ensures secondary processes never have to calculate the TSC rate
themselves, which can be noticeable in VMs that don't have access to
arch-specific detection mechanism (such as CPUID leaf 0x15 or MSR 0xCE
on x86).
Since rte_mem_config is now internal to the EAL library, we can add
tsc_hz without ABI breakage concerns.
Reduces rte_eal_init() execution time in a secondary process from 165ms
to 66ms on my test system.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Ruifeng Wang [Mon, 9 Sep 2019 13:51:42 +0000 (21:51 +0800)]
rcu: fix spurious thread unregister
Thread unregister returns success while unregister not been performed.
This is due to incorrect thread registration status check.
Fix this issue by correcting bitmap check.
Fixes:
64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism")
Cc: stable@dpdk.org
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Nikhil Rao [Mon, 16 Sep 2019 10:01:02 +0000 (15:31 +0530)]
service: avoid false sharing on core state
For a valid service, the core mask of the service
is checked against the current core and the corresponding
entry in the active_on_lcore array is set or reset.
Upto 8 cores share the same cache line for their
service active_on_lcore array entries since each entry is a uint8_t.
Some number of these entries also share the cache line with
the internal_flags member of struct rte_service_spec_impl,
hence this false sharing also makes the service_valid() check
expensive.
Eliminate false sharing by moving the active_on_lcore array to
a per-core data structure. The array is now indexed by service id.
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Jim Harris [Mon, 7 Oct 2019 15:40:05 +0000 (08:40 -0700)]
timer: remove useless check on x86 TSC reliability
This code was added 7+ years ago in
commit
fb022b85bae4 ("timer: check TSC reliability")
presumably when variant TSCs were still somewhat common.
But this code doesn't do anything except print a warning,
and the warning doesn't give any kind of advice to the user,
so let's just remove it.
While the warning has no functional meaning, the /proc/cpuinfo
parsing consumes a non-trivial amount of time which is especially
noticeable in secondary processes.
On my test system, it consumes 21ms out of the 66ms total execution
time for rte_eal_init() in a secondary process.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Hemant Agrawal [Fri, 27 Sep 2019 09:04:28 +0000 (14:34 +0530)]
eal/ppc: add SPDX license tag
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: David Christensen <drc@linux.vnet.ibm.com>
David Christensen [Tue, 15 Oct 2019 21:16:14 +0000 (14:16 -0700)]
eal/ppc: fix 64-bit atomic exchange operation
The rte_atomic64_exchange operation for ppc_64 incorrectly linked
back to a 32 bit generic operation (__atomic_exchange_4) rather than
the 64 bit generic operation (__atomic_exchange_8). As a result,
applications that used rte_eth_link_get_nowait() would only receive
the link speed, they would not receive the link state, link duplex,
or link autoneg properties.
Fixes:
ff2863570fcc ("eal: introduce atomic exchange operation")
Cc: stable@dpdk.org
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Stephen Hemminger [Tue, 8 Oct 2019 16:33:49 +0000 (09:33 -0700)]
mbuf: add a copy routine
This is a commonly used operation that surprisingly the
DPDK has not supported. The new rte_pktmbuf_copy does a
deep copy of packet. This is a complete copy including
meta-data.
It handles the case where the source mbuf comes from a pool
with larger data area than the destination pool. The routine
also has options for skipping data, or truncating at a fixed
length.
This patch also introduces internal inline to copy the
metadata fields of mbuf.
Add a test for this new function, based of the clone tests.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Stephen Hemminger [Tue, 8 Oct 2019 16:33:48 +0000 (09:33 -0700)]
mbuf: deinline clone function
Cloning mbufs requires allocations and iteration
and therefore should not be an inline.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Stephen Hemminger [Tue, 8 Oct 2019 16:33:47 +0000 (09:33 -0700)]
mbuf: deinline linearize function
This copy part of this function is too big to be put inline.
The places it is used are only in special exception paths
where a highly fragmented mbuf arrives at a device that can't handle it.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Stephen Hemminger [Tue, 8 Oct 2019 16:33:46 +0000 (09:33 -0700)]
test/mbuf: fix forged mbuf in clone test
The test for cloning changed mbuf would generate an mbuf whose length
and segments count were invalid.
This would cause a crash if test was run with mbuf debugging enabled.
Fixes:
4ccd2bb3a9e2 ("app/test: enhance mbuf refcnt check")
Fixes:
af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Tue, 8 Oct 2019 09:34:06 +0000 (11:34 +0200)]
mempool: clarify default populate function
No functional change.
Clarify the populate function to make future changes easier to
understand.
Rename the variables:
- to avoid negation in the name
- to have more understandable names
Remove useless variable (no_pageshift is equivalent to pg_sz == 0).
Remove duplicate affectation of "external" variable.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Xiaolong Ye [Mon, 12 Aug 2019 03:06:30 +0000 (11:06 +0800)]
kni: support allmulticast mode set
This patch adds support to allow users enable/disable allmulticast mode for
kni interface.
This requirement comes from bugzilla 312, more details can refer to:
https://bugs.dpdk.org/show_bug.cgi?id=312
Bugzilla ID: 312
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Stephen Hemminger [Wed, 21 Aug 2019 09:12:52 +0000 (10:12 +0100)]
service: use log for error messages
EAL should always use rte_log instead of putting errors to
stderr (which maybe redirected to /dev/null in a daemon).
Also checks for null before rte_free are unnecessary.
Minor code consistency improvements.
Fixes:
21698354c832 ("service: introduce service cores concept")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Arnon Warshavsky [Mon, 19 Aug 2019 13:57:44 +0000 (16:57 +0300)]
eal: fix mapping leak in secondary process
Have rte_eal_config_reattach clean up the mapped address which is a valid
address but not the one intended.
Coverity issue: 343439
Fixes:
4e8854ae89fa ("eal: do not panic on shared memory init")
Fixes:
b149a7064261 ("eal/freebsd: add config reattach in secondary process")
Cc: stable@dpdk.org
Signed-off-by: Arnon Warshavsky <arnon@qwilt.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Jim Harris [Fri, 16 Aug 2019 12:13:42 +0000 (05:13 -0700)]
vfio: fix leak with multiprocess
The code checks both rte_mp_request_sync() return code and that the number
of messages in the reply equals 1. If rte_mp_request_sync() succeeds but
there was more than one message, those messages would get leaked.
Found via code review by Anatoly Burakov of patches that used the vhost
code as a template for using rte_mp_request_sync().
Fixes:
83a73c5fef66 ("vfio: use generic multi-process channel")
Cc: stable@dpdk.org
Reported-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Christian Ehrhardt [Thu, 29 Aug 2019 15:30:03 +0000 (17:30 +0200)]
build: avoid overlinking
A while ago telemetry was added in
57ae0ec6 and it also added as-needed
to config/meson.build. This seems no more needed these days as due to other
build changes the ordering in buildlogs is:
[...] -lrte_telemetry [...] -Wl,--no-as-needed [...]
Which means telemetry no more benefits from --no-as-needed anyway.
Overlinking problems get triggered by the meson generated pkgconfig which
will have:
[...] -Wl,--no-as-needed <somelibsusedbydpdk>
This will overlink <somelibs> and in addition anything that follows
as it also doesn't wrap back to --as-needed. So if a projects includes
dpdk libs + <other> it will also consider <other> with --no-as-needed.
Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/
1841759
Fixes:
57ae0ec62620 ("build: add dependency on telemetry to apps with meson")
Cc: stable@dpdk.org
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Jerin Jacob [Wed, 14 Aug 2019 13:09:53 +0000 (18:39 +0530)]
bpf: hide internal program argument type
RTE_BPF_ARG_PTR_STACK is used as internal program
arg type. Rename to RTE_BPF_ARG_RESERVED to
avoid exposing internal program type.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Jerin Jacob [Tue, 3 Sep 2019 10:59:38 +0000 (16:29 +0530)]
bpf/arm: add branch operation
Add branch and call operations.
jump_offset_* APIs used for finding the relative offset
to jump w.r.t current eBPF program PC.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Jerin Jacob [Tue, 3 Sep 2019 10:59:37 +0000 (16:29 +0530)]
bpf/arm: add atomic-exchange-and-add operation
Implement XADD eBPF instruction using STADD arm64 instruction.
If the given platform does not have atomics support,
use LDXR and STXR pair for critical section instead of STADD.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Jerin Jacob [Tue, 3 Sep 2019 10:59:36 +0000 (16:29 +0530)]
bpf/arm: add load and store operations
Add load and store operations.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Jerin Jacob [Tue, 3 Sep 2019 10:59:35 +0000 (16:29 +0530)]
bpf/arm: add byte swap operations
add le16, le32, le64, be16, be32 and be64 operations.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Jerin Jacob [Tue, 3 Sep 2019 10:59:34 +0000 (16:29 +0530)]
bpf/arm: add logical operations
Add OR, AND, NEG, XOR, shift operations for immediate
and source register variants.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Jerin Jacob [Tue, 3 Sep 2019 10:59:33 +0000 (16:29 +0530)]
bpf/arm: add basic arithmetic operations
Add mov, add, sub, mul, div and mod arithmetic
operations for immediate and source register variants.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Jerin Jacob [Tue, 3 Sep 2019 10:59:32 +0000 (16:29 +0530)]
bpf/arm: add prologue and epilogue
Add prologue and epilogue as per arm64 procedure call standard.
As an optimization the generated instructions are
the function of whether eBPF program has stack and/or
CALL class.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Jerin Jacob [Tue, 3 Sep 2019 10:59:31 +0000 (16:29 +0530)]
bpf/arm: add build infrastructure
Add build infrastructure and documentation
update for arm64 JIT support.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Pavan Nikhilesh [Mon, 30 Sep 2019 16:48:41 +0000 (22:18 +0530)]
app/eventdev: add options for mbuf and packet sizes
Add options to set mbuf size and max packet size which allow the user to
enable jumbo frames and Rx/Tx scatter gather.
Arrange `struct evt_options` based on ascending order of data type to
make it more readable.
Packet mbuf size can be modified by using `--mbuf_sz=N`.
Max packet size can be modified by using `--max_pkt_sz=N`.
These options are only applicable `pipeline_atq` and `pipeline_queue`
tests.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Hemant Agrawal [Mon, 30 Sep 2019 08:32:15 +0000 (14:02 +0530)]
test/event: enable dpaa2 self test
This patch add the support to include dpaa2 event test
from the test framework.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Mon, 30 Sep 2019 08:32:14 +0000 (14:02 +0530)]
event/dpaa2: add self test
This patch add support for testing dpaa2 eventdev self test
for basic sanity for parallel and atomic queues.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Nipun Gupta [Mon, 30 Sep 2019 08:32:13 +0000 (14:02 +0530)]
event/dpaa2: add retry break in packet enqueue
The patch adds the break in the TX function, if it is failing
to send the packets out. Previously the system was trying
infinitely to send packet out.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Hemant Agrawal [Mon, 30 Sep 2019 08:32:12 +0000 (14:02 +0530)]
event/dpaa2: support destroy
This patch add support to destroy the event device
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Mon, 30 Sep 2019 08:32:11 +0000 (14:02 +0530)]
event/dpaa2: remove conditional compilation
This patch removes the conditional compilation for
cryptodev event support from RTE_LIBRTE_SECURITY flag.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Mon, 30 Sep 2019 08:32:10 +0000 (14:02 +0530)]
event/dpaa2: fix default queue configuration
Test vector expect only one type of scheduling as default.
The old code is provide support scheduling types instead of default.
Fixes:
13370a3877a5 ("eventdev: fix inconsistency in queue config")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Fri, 27 Sep 2019 08:16:06 +0000 (13:46 +0530)]
test/event_crypto: check adapter config failure
Return error when the adapter creation fails.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Hemant Agrawal [Fri, 27 Sep 2019 08:16:05 +0000 (13:46 +0530)]
test/event_crypto: change cipher algo
The existing code uses NULL as the cipher algo
for testing crypto event adapter.
DPAA1/DPAA2 do not support NULL algo. Hence changing
it to the most common algo AES-CBC, which is supported
by all crypto drivers implementing event crypto adapter.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Hemant Agrawal [Fri, 27 Sep 2019 08:16:04 +0000 (13:46 +0530)]
test/event_crypto: fix mempool name
The longer mempool name size is causing error in
rte_mempool_create_empty for dpaa1
ret = snprintf(mz_name, sizeof(mz_name), RTE_MEMPOOL_MZ_FORMAT, name);
This patch reduce the size of mempool name string
Fixes:
24054e3640a2 ("test/crypto: use separate session mempools")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Pavan Nikhilesh [Mon, 19 Aug 2019 10:46:51 +0000 (16:16 +0530)]
event/octeontx2: fix Rx adapter capabilities
Octeontx2 SSO co-processor allows multiple ethernet device Rx queues
connected to a single Event device queue.
Fix the Rx adapter capabilities to allow application to configure
Rx queueus in n:1 ratio to event queues by adding
`RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ` as a capability.
Fixes:
37720fc1fba8 ("event/octeontx2: add Rx adapter")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Gage Eads [Tue, 27 Aug 2019 21:34:59 +0000 (16:34 -0500)]
event/sw: fix xstats reset value
The sw PMD implements xstats reset by having the xstat get operations
return a value to the statistic's value at the last reset. The value at the
last reset is maintained in the per-xstat reset_value field, but the PMD
was setting reset_value = current - reset_value instead of reset_value =
current.
Fixes:
c1ad03df7ad5 ("event/sw: support xstats")
Cc: stable@dpdk.org
Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Hemant Agrawal [Fri, 6 Sep 2019 10:44:34 +0000 (16:14 +0530)]
test/event_crypto: no service core when HW support available
If HW support is available, service core shall not come
into play by default. This shall be for both FWD/NEW modes.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Hemant Agrawal [Fri, 6 Sep 2019 10:42:28 +0000 (16:12 +0530)]
test/event_crypto: check session init failure
Mismatch in algo or sec capability can cause session to fail.
This patch handle it and return error timely.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Viacheslav Ovsiienko [Mon, 7 Oct 2019 13:58:22 +0000 (13:58 +0000)]
net/mlx5: fix direct call to rdma-core library
The routine mlx5dv_query_devx_port() was called directly
instead of using the mlx5 glue thunk.
Fixes:
d5c06b1b10ae ("net/mlx5: query vport index match mode and parameters")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Viacheslav Ovsiienko [Mon, 7 Oct 2019 13:56:19 +0000 (13:56 +0000)]
net/mlx5: fix device scan within switch domain
In LAG configuration the devices in the same switch domain
might be spawned on the base of different PCI devices, so
we should check all devices backed by mlx5 PMD whether they
belong to specified switch domain. When the new devices are
being created it is not possible to detect whether the
sibling devices created in the current probe() loop belong
to the driver, driver field is not filled yet (it will be
done on returned success of current probe()). This patch
updates the device scanning, allowing extra match on
current backing PCI device, is being used to create siblings.
Fixes:
f7e95215ac7c ("net/mlx5: extend switch domain searching range")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Viacheslav Ovsiienko [Tue, 1 Oct 2019 06:53:37 +0000 (06:53 +0000)]
net/mlx5: adjust inline setting for large Tx queue sizes
The hardware may have limitations on maximal amount of
supported Tx descriptors building blocks (WQEBB). Application
requires the Tx queue must accept the specified amount of packets.
If inline data feature is engaged the packet may require more WQEBBs
and overall amount of blocks may exceed the hardware capabilities.
Application has to make a trade-off between Tx queue size and maximal
data inline size.
In case if the inline settings are not requested explicitly with
devarg keys the default values are used. This patch adjusts the
applied default values if large Tx queue size is requested and
default inline settings can not be satisfied due to hardware
limitations.
The explicitly requested inline setting may be aligned (enlarging
only) by configurations routines to provide better WQEBB filling,
this implicit alignment is the subject for adjustment either.
The warning message is emitted to the log if adjustment happens.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Rahul Lakkireddy [Fri, 4 Oct 2019 14:24:17 +0000 (19:54 +0530)]
net/cxgbe: fix races on flow API operations
When rules are being inserted from multiple cores, there are several
race conditions during rte_flow operations.
For example, when inserting rules from 2 cores simultaneously, both
the cores try to fetch a free available filter entry and they both
end up fetching the same entry. Both of them start overwriting the
same filter entry before sending to firmware, which results in wrong
rule being inserted to hardware.
Fix the races by adding spinlock to serialize the rte_flow operations.
Fixes:
ee61f5113b17 ("net/cxgbe: parse and validate flows")
Fixes:
9eb2c9a48072 ("net/cxgbe: implement flow create operation")
Fixes:
da23bc9d33f4 ("net/cxgbe: implement flow destroy operation")
Fixes:
8d3c12e19368 ("net/cxgbe: implement flow query operation")
Fixes:
86910379d335 ("net/cxgbe: implement flow flush operation")
Cc: stable@dpdk.org
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Lance Richardson [Fri, 4 Oct 2019 03:49:03 +0000 (20:49 -0700)]
net/bnxt: improve CPR handling in vector path
Reduce overhead of CPR descriptor validity checking in vector
receive and transmit functions.
Preserve raw cpr consumer index in vector transmit completion
function.
Remove an unneeded prefetch (per benchmarking) from vector
transmit completion function.
Fixes:
bc4a000f2f53 ("net/bnxt: implement SSE vector mode")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Lance Richardson [Fri, 4 Oct 2019 03:49:02 +0000 (20:49 -0700)]
net/bnxt: advertise scatter Rx offload capability
Scattered receive is supported but not included in receive offload
capabilities. Fix by adding it and including in scattered receive
calculation.
Fixes:
9c1507d96ab8 ("net/bnxt: switch to the new offload API")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Lance Richardson [Fri, 4 Oct 2019 03:49:01 +0000 (20:49 -0700)]
net/bnxt: fix default Rx queue for Thor
Use first receive queue assigned to VNIC as the default receive queue
when configuring Thor VNICs. This is necessary e.g. in order for flow
redirection to a specific receive queue to work correctly.
Fixes:
f8168ca0e690 ("net/bnxt: support thor controller")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Lance Richardson [Fri, 4 Oct 2019 03:49:00 +0000 (20:49 -0700)]
net/bnxt: fix stats context calculation
The required number of statistics contexts is computed as the sum
of the number of receive and transmit rings plus one for the async
completion ring. A statistics context is not actually required for
the async completion ring, so remove it from the calculation.
Fixes:
bd0a14c99f65 ("net/bnxt: use dedicated CPR for async events")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Lance Richardson [Fri, 4 Oct 2019 03:48:59 +0000 (20:48 -0700)]
net/bnxt: use common NQ ring
Thor queue scaling is currently limited by the number of NQs that
can be allocated. Fix by using a common NQ for all receive/transmit
rings instead of allocating a separate NQ for each ring.
Fixes:
f8168ca0e690 ("net/bnxt: support thor controller")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Venkat Duvvuru [Fri, 4 Oct 2019 03:48:58 +0000 (20:48 -0700)]
net/bnxt: support CoS classification
Class of Service (CoS) is a way to manage multiple types of
traffic over a network to offer different types of services
to applications. CoS classification (priority to cosqueue) is
determined by the user and configured through the PF driver.
DPDK driver queries this configuration and maps the cos queue
ids to different VNICs. This patch adds this support.
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Lance Richardson [Fri, 4 Oct 2019 03:48:57 +0000 (20:48 -0700)]
net/bnxt: support LRO on Thor adapters
Add support for LRO for adapters based on Thor (BCM57508).
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Lance Richardson [Fri, 4 Oct 2019 03:48:56 +0000 (20:48 -0700)]
net/bnxt: fix ring alignment for Thor-based adapters
When using transmit/receive queue sizes smaller than 256, alignment
requirements are not being met for Thor-based adapters. Fix by
forcing memory addresses used for transmit/receive/aggregation ring
allocations to be on 4K boundaries.
Fixes:
f8168ca0e690 ("net/bnxt: support thor controller")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Lance Richardson [Fri, 4 Oct 2019 03:48:55 +0000 (20:48 -0700)]
net/bnxt: increase TQM entry allocation
The current TQM backing store size isn't sufficient to allow 512
transmit rings. Fix by correcting TQM SP queue size calculation.
Fixes:
f8168ca0e690 ("net/bnxt: support thor controller")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Pavel Belous [Fri, 20 Sep 2019 16:22:07 +0000 (16:22 +0000)]
net/atlantic: add FW mailbox guard mutex
Driver uses the Firmware mailbox to read statistics and configure
some features.
This patch introduces a mutex to provide consistent access to the
FW mailbox to prevent potential data corruption.
Fixes:
86d36773bd42 ("net/atlantic: implement firmware operations")
Cc: stable@dpdk.org
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Pavel Belous [Fri, 20 Sep 2019 16:22:05 +0000 (16:22 +0000)]
net/atlantic: fix reported flow control mode
Driver reports current flow control mode based on internal flow control
settings. Currently this logic works incorrectly.
Fixes:
921eb6b8ce31 ("net/atlantic: fix flow control by sync settings on Rx")
Cc: stable@dpdk.org
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Pavel Belous [Fri, 20 Sep 2019 16:22:02 +0000 (16:22 +0000)]
net/atlantic: exclude MACsec counters from xstats
Currently, driver always return full set of xstats counters, including
MACSEC counters. But this driver also supports AQC100 chips, which
does not have MACSEC feature.
This fix adds checking for MACSEC availability (based on FW capability
bits) and returns xstats without MACSEC counters if MACSEC feature
is not available.
Fixes:
09d4dfa85359 ("net/atlantic: implement MACsec statistics")
Cc: stable@dpdk.org
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Kommula Shiva Shankar [Fri, 13 Sep 2019 15:31:12 +0000 (21:01 +0530)]
net/octeontx2: fix CQE ring prefetch on wrap around
When computing the head of CQE ring of prefetch, use qmask to point to
the correct head index on wrap around case.
Fixes:
cc4d7693f2d9 ("net/octeontx2: support Rx")
Cc: stable@dpdk.org
Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Rasesh Mody [Wed, 2 Oct 2019 19:14:56 +0000 (12:14 -0700)]
net/bnx2x: update to latest FW 7.13.11
Use latest firmware 7.13.11.
7.13.11 FW changelog:
- Packets from a VF with pvid configured which were sent with a
different vlan were transmitted instead of being discarded.
- In some multi-function configurations, inter-PF and inter-VF
Tx switching is incorrectly enabled.
- Wrong assert code in FLR final cleanup in case it is sent not
after FLR.
- Chip may stall in very rare cases under heavy traffic with FW GRO
enabled.
- VF malicious notification error fixes.
- Default gre tunnel to IPGRE which allows proper RSS for IPGRE
packets, L2GRE traffic will reach single queue.
- Removes unnecessary internal mem config, latest FW performs this
autonomously.
Update the PMD version to 1.1.0.1.
Signed-off-by: Rasesh Mody <rmody@marvell.com>
Rasesh Mody [Wed, 2 Oct 2019 19:14:55 +0000 (12:14 -0700)]
net/bnx2x: update HSI
Update hardware software common base driver code in preparation to
update the firmware to version 7.13.11.
Signed-off-by: Rasesh Mody <rmody@marvell.com>
Rasesh Mody [Wed, 2 Oct 2019 19:14:54 +0000 (12:14 -0700)]
net/bnx2x: update and reorganize HW registers
Update and reorganize HW registers in preparation to update the firmware
to version 7.13.11.
Move HW_INTERRUT_ASSERT_SET_0 out from ecore_reg.h to bnx2x.h.
Signed-off-by: Rasesh Mody <rmody@marvell.com>
David Marchand [Fri, 27 Sep 2019 11:28:49 +0000 (13:28 +0200)]
net/qede: limit Rx ring index read for debug
Caught by clang, this idx value is only used for a debug message when
the mbufs allocation fails.
No need to use idx as a temporary storage.
Fixes:
8f2312474529 ("net/qede: fix performance bottleneck in Rx path")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
Nithin Dabilpuram [Wed, 25 Sep 2019 04:54:07 +0000 (10:24 +0530)]
net/octeontx2: support GRE TSO offload
Extends existing TSO support to GRE tunnel on the
same SoC revisions.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Nithin Dabilpuram [Wed, 25 Sep 2019 04:36:29 +0000 (10:06 +0530)]
net/octeontx2: support TSO offload
Add support to below TCP segmentation offloads for
96XX A1 onwards and 95xx B0 onwards.
- TCPv4, TCPv6
- VXLAN[v4 | v6][v4 | v6]
- GENEVE[v4 | v6][v4 | v6]
This patch also modifies a fastpath function to be forced
inline due to performance reasons for multi-seg mode.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Kiran Kumar K [Wed, 11 Sep 2019 09:19:25 +0000 (14:49 +0530)]
net/octeontx2: extract NVGRE as ltype
Adding change to sync RTE Flow with KPU profile to extract
NVGRE as ltype.
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Kiran Kumar K [Fri, 6 Sep 2019 12:43:02 +0000 (18:13 +0530)]
net/octeontx2: support Tx descriptor status
Adding support for tx descriptor status dev ops for octeontx2.
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Vivek Sharma [Fri, 6 Sep 2019 00:13:59 +0000 (05:43 +0530)]
net/octeontx2: update KPU parser profile
Update LB ltypes and use the updated ones so as replace
LB_STAG and LB_QINQ by single LB_STAG_QINQ ltype.
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Nithin Dabilpuram [Fri, 30 Aug 2019 04:04:43 +0000 (09:34 +0530)]
net/octeontx2: allow VFs to enable back pressure
Allow VFs to enable backpressure for performance reasons.
The backpressure control is with kernel AF driver that will enable
backpressure even if one PF/VF requests it and disable it only
after all the PFs/VFs request for disable.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Sunil Kumar Kori [Thu, 3 Oct 2019 06:32:29 +0000 (12:02 +0530)]
net/octeontx2: fix checksum flag translation
NPC errors were incorrectly translated to ol_flag as
error code enum was not in sync with NPC profile.
Fixes:
371d3212cbed ("common/octeontx2: add build infrastructure and HW definition")
Cc: stable@dpdk.org
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
David Marchand [Fri, 27 Sep 2019 11:30:35 +0000 (13:30 +0200)]
net: add missing rte prefix for ESP tail
This structure has been missed during the big rework.
Fixes:
5ef254676752 ("net: add rte prefix to ESP structure")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ajit Khaparde [Wed, 2 Oct 2019 23:26:01 +0000 (16:26 -0700)]
net/bnxt: fix flow flush handling
We are not freeing all the flows when a flow_flush is called.
Iterate through all the flows belonging to all the VNICs in use and
free the filters.
Fixes:
4ace85a7da25 ("net/bnxt: allocate rings and groups")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Kalesh AP [Wed, 2 Oct 2019 23:26:00 +0000 (16:26 -0700)]
net/bnxt: fix multicast filter programming
Fixed multicast filter programming and allmulti programming.
Fixed to skip programming multicast macs if the user requests
allmulti mode.
Also removed a comment in bnxt_hwrm_cfa_l2_set_rx_mask() which is
no longer valid now.
Fixes:
d69851df12b2 ("net/bnxt: support multicast filter and set MAC addr")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Venkat Duvvuru [Wed, 2 Oct 2019 23:25:59 +0000 (16:25 -0700)]
net/bnxt: fix VLAN filtering
Currently, when hw-vlan-filter is enabled on testpmd, driver is
receiving all vlan packets. Instead, it should only receive untagged
packets and vlan packets for which the VLAN filter is programmed.
This is because, the default rule to match on MAC is not getting
deleted, when hw-vlan-filter is ON.
This patch fixes the problem, by deleting the default MAC rule and
programming a new rule to receive only untagged packets, when
hw-vlan-filter is enabled & another rule for each vlan, as and when
that vlan is configured on that port.
Fixes:
246c5cc5f05e ("net/bnxt: use correct flags during VLAN configuration")
Cc: stable@dpdk.org
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Ajit Khaparde [Wed, 2 Oct 2019 23:25:58 +0000 (16:25 -0700)]
net/bnxt: drop untagged frames when specified
When a drop action for L2 filters is specified, support it.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Venkat Duvvuru [Wed, 2 Oct 2019 23:25:57 +0000 (16:25 -0700)]
net/bnxt: synchronize between flow related functions
Currently, there are four flow related functions, namely
bnxt_flow_create, bnxt_flow_destroy, bnxt_flow_validate,
bnxt_flow_flush. All these functions are not multi-thread safe.
This patch fixes it by synchronizing these functions with a lock.
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Ajit Khaparde [Wed, 2 Oct 2019 23:25:56 +0000 (16:25 -0700)]
net/bnxt: handle cleanup if flow creation fails
If flow creation fails because of an HWRM command failure or
or some other reason, reset the vnic and rxq info set earlier.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Venkat Duvvuru [Wed, 2 Oct 2019 23:25:55 +0000 (16:25 -0700)]
net/bnxt: validate RSS hash key length
In bnxt_rss_hash_update_op, driver is proceeding with
bnxt_hwrm_vnic_rss_cfg even though RSS hashkey length is invalid.
This patch fixes the problem by returning -EINVAL when RSS hashkey
length is invalid.
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Somnath Kotur [Wed, 2 Oct 2019 23:25:54 +0000 (16:25 -0700)]
net/bnxt: check for VNIC ID in rollback
If driver init/probe fails as part of cleanup/rollback, we may end
up invoking this HWRM cmd even on an invalid vNIC which will
unnecessarily log an error message as the cmd will fail.
Check for invalid ID before issuing the HWRM cmd
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Ajit Khaparde [Wed, 2 Oct 2019 23:25:53 +0000 (16:25 -0700)]
net/bnxt: check if device is started before flow creation
Check device is started before flow creation.
Since the vnic data structures aren't created until device start,
the driver dereferences NULL vnic if flow creation is attempted before
device is started,
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Rahul Gupta [Wed, 2 Oct 2019 23:25:52 +0000 (16:25 -0700)]
net/bnxt: handle ring cleanup in case of error
Initialize all rings to INVALID_HW_RING_ID.
This can be used to determine the rings to free if allocation fails.
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Ajit Khaparde [Wed, 2 Oct 2019 23:25:51 +0000 (16:25 -0700)]
net/bnxt: allow only unicast MAC address filter creation
Check if the application is trying to create filters using
broadcast and multicast MAC address and reject it.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Kalesh AP [Wed, 2 Oct 2019 23:25:50 +0000 (16:25 -0700)]
net/bnxt: fix setting default MAC address
Driver was incorrectly programming the MAC with the already
configured one instead of the newly requested MAC by user.
Also, fix to restore the old mac address back to the default
vnic filter if the mac update operation fails.
Fixes:
68f589f2c728 ("net/bnxt: fix setting primary MAC address")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Ajit Khaparde [Wed, 2 Oct 2019 23:25:49 +0000 (16:25 -0700)]
net/bnxt: cleanup VNIC after flow validate
When an application issues flow validate, we free the temporary
filter that is created. But the vnic is not freed up. This can
potentially interfere with subsequent flow creation. So free the vnic.
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Wed, 2 Oct 2019 23:25:48 +0000 (16:25 -0700)]
net/bnxt: delete and flush L2 filters cleanly
Once the last filter associated with a VNIC is deleted when using
RSS action or the Queue action free the VNIC. Also free the RSS
context if the VNIC is using it.
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Wed, 2 Oct 2019 23:25:47 +0000 (16:25 -0700)]
net/bnxt: parse priority attribute for flow creation
Parse priority attribute during flow creation.
This information will be used to give a hint to the FW to
place the flow rule accordingly in the CFA tables.
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>