The memory for mark table is allocated during port start.
But the allocated memory is freed only during port close
or driver unload which in turn causes a memory leakage
on each port start/stop.
Fixed it by moving the memory free to port stop.
Fixes: 94eb699bc8 ("net/bnxt: support flow mark action")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Driver destroy the VNIC when the port is brought down.
Port HW filter setting such as promiscuos, allmulti and
VLAN filtering will be applied when port is started.
Fixed to return success silently for these callbacks
when port is stopped. Also fixed to clear "bp->dev_stopped"
before invoking bnxt_vlan_offload_set_op() in bnxt_dev_start_op().
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
HWRM_VNIC_CFG command to configure VNIC dynamically with
traffic running is not working. Driver has to free and
recreate the VNIC and then reconfigure the VNIC filters.
Fixes: 7fe5668d2e ("net/bnxt: support VLAN filter and strip")
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>
There is no condition check for the user requested operation
for VLAN filtering. As a result, VLAN filtering is getting disabled
when the user enables/disables VLAN stripping on same port.
The function bnxt_hwrm_clear_l2_filter() didn't actually free
L2 filter in HW if the reference count of filter is zero.
Fixed it by incrementing the reference count of filter in
bnxt_alloc_filter() routine.
Because of the recent changes in bnxt_hwrm_clear_l2_filter(),
change was needed in the routine bnxt_set_default_mac_addr_op()
to destroy and re-create the default filter when the user
changes the default MAC of the port.
Fixes: 5c1171c972 ("net/bnxt: refactor filter/flow")
Fixes: 6118503d80 ("net/bnxt: fix VLAN filtering")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Use rte_malloc_virt2iova() to obtain the IO address of a
virtual address obtained through rte_malloc().
Fixed to use the iova address returned by rte_memzone_reserve_aligned()
as the call always returns with populating "mz->iova" with
rte_malloc_virt2iova(mz->addr).
Removed redundant rte_mem_lock_page() call to lock the pages.
Fixes: f55e12f334 ("net/bnxt: support extended port counters")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
In FreeBSD environment, nic_uio driver does not support interrupts
and rte_intr_callback_register() will fail to register interrupts
which in turn causes bnxt driver probe failure.
Fixed driver to ignore interrupt callback failures in FreeBSD.
Also fixed to not use a dedicated completion ring for async events
from FW and process these events on RXQ0 in FreeBSD.
Fixes: 6de4c538b3 ("net/bnxt: fix error handling in port start")
Fixes: 43f78b380f ("net/bnxt: retry IRQ callback deregistration")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
If flow create fails due to not enough filter resources,
driver does not populate the rte_flow_error using
rte_flow_error_set().
Since "rte_errno" could have garbage value and is not reliable,
it could cause a segfault in the stack in port_flow_complain().
Fix it to set rte_flow_error using rte_flow_error_set()
when flow create fails due to not enough filter resources.
Fixes: 5c1171c972 ("net/bnxt: refactor filter/flow")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
ppc64le failed when using large physical memory. I found problems in my two
commits in the past.
In commit e072d16f89 ("vfio: fix expanding DMA area in ppc64le"), I added
a sanity check using a mapped address to resolve an issue around expanding
IOMMU window, but this was not enough, since memory allocation can return
memory anywhere dependent on memory fragmentation. DPDK may still skip DMA
mapping and attempts to unmap non-mapped DMA during expanding IOMMU window.
As a result, SPDK apps using large physical memory frequently failed to
proceed the communication with NVMe and/or went into an infinite loop.
The root cause of the bug was in a gap between memory segments managed by
DPDK and firmware-level DMA mapping. DPDK's memory segments don't contain
the state of DMA mapping, and so, the memesg_walk cannot determine if an
iterated memory segment is mapped or not. This resulted in incorrect DMA
maps and unmaps.
At this time, I added the code to avoid iterating non-mapped memory
segments during DMA mapping. The memseg_walk iterates over memory segments
marked as "used", and so, the code sets memory segments that will be
mapped or unmapped as "free" transiently.
The commit db90b4969e ("vfio: retry creating sPAPR DMA window") allows
retring different page levels and sizes to create DMA window. However, this
allows page sizes different from hugepage sizes. This inconsistency caused
failures at the time of DMA mapping after the window creation. This patch
fixes to retry only different page levels.
Fixes: e072d16f89 ("vfio: fix expanding DMA area in ppc64le")
Fixes: db90b4969e ("vfio: retry creating sPAPR DMA window")
Cc: stable@dpdk.org
Signed-off-by: Takeshi Yoshimura <tyos@jp.ibm.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
Timer, LPM and Distributor libraries no longer use function versioning
and therefore do not need separate build for static and shared version
of libraries.
This patch removes use_function_versioning from their meson build files
and corresponding include from the sources.
Fixes: f2fb215843 ("timer: remove deprecated code")
Fixes: 6e5b516761 ("distributor: remove deprecated code")
Fixes: c381a8d554 ("lpm: remove deprecated code")
Cc: stable@dpdk.org
Signed-off-by: Andrzej Ostruszka <aostruszka@marvell.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
The logtype USER1 should not be overloaded for library function.
Instead use a dynamic log type.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Add lock-free reader writer concurrency functional tests.
These tests will provide the same coverage that non lock-free
APIs have.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
hash_readwrite test was taking too much time to complete in Travis.
Test is split into functional and perf test.
perf test is being moved under perf testsuites in meson.
Signed-off-by: Amit Gupta <agupta3@marvell.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
If a driver has no info generated by pmdinfogen,
and if this driver is compiled as pedantic,
then an failure would occur:
drivers/rte_common_mlx5.pmd.c:1: error:
ISO C forbids an empty translation unit [-Werror=pedantic]
Such error is triggered with the new mlx5 common directory.
In order to allow an "empty driver info" compiled in pedantic mode,
the script generating .pmd.c file is modified to add a static string
unconditionnaly.
The minimal generated code is:
static __attribute__((unused)) const char *generator =
"/path/to/dpdk/buildtools/gen-pmdinfo-cfile.sh";
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
API makes think that rte_cryptodev_info_get() cannot return
a value >= 3 (RTE_CRYPTO_AEAD_LIST_END in 19.11).
20.02-rc1 was returning 3 (RTE_CRYPTO_AEAD_CHACHA20_POLY1305).
So the ABI compatibility contract was broken.
It could be solved with some function versioning,
but because a lack of time, the feature is reverted for now.
This reverts following commits:
- 6c9f3b347e ("cryptodev: add Chacha20-Poly1305 AEAD algorithm")
- 2c512e64d6 ("crypto/qat: support Chacha Poly")
- d55e01f579 ("test/crypto: add Chacha Poly cases")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
For normal developers, those checks are disabled.
Enabling them requires a configuration that will trigger the ABI dumps
generation as part of the existing devtools/test-build.sh and
devtools/test-meson-builds.sh scripts.
Those checks are enabled in the CI for the default meson options on x86
and aarch64 so that proposed patches are validated via our CI robot.
A cache of the ABI is stored in travis jobs to avoid rebuilding too
often.
Checks can be informational only, by setting ABI_CHECKS_WARN_ONLY when
breaking the ABI in a future release.
Explicit suppression rules have been added on internal structures
exposed to crypto drivers as the current ABI policy does not apply to
them.
This could be improved in the future by carefully splitting the headers
content with application and driver "users" in mind.
We currently have issues reported for librte_crypto recent changes for
which suppression rules have been added too.
Mellanox glue libraries are explicitly skipped as they are not part of
the application ABI.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
No functional change intended, prepare for reusing this code.
The config and compilation parts are separated in helpers.
Unsetting CC is moved to the caller of the helper.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Those headers are internal and should not be distributed.
Fixes: 5b9656b157 ("lib: build with meson")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Use RTE_DIM macro to calculate array size.
Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Use RTE_DIM macro to calculate array size.
Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Update l3fwd user guide to include event device related information.
Update release notes.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add graceful teardown that addresses both event mode and poll mode.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add em main loop for handling events based on capabilities of the
event device.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add lpm main loop for handling events based on capabilities of the
event device.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add service core setup when eventdev and Rx/Tx adapter don't have
internal port capability.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add event eth Rx/Tx adapter setup for both generic and internal port
event device pipelines.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add event device queue and port setup based on event eth Tx adapter
capabilities.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add ethernet port Rx/Tx queue setup for event device which are later
used for setting up event eth Rx/Tx adapters.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add event device configuration based on the capabilities of the
probed event device.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add infra to split eventdev framework based on event Tx adapter
capability.
If event Tx adapter has internal port capability then we use
`rte_event_eth_tx_adapter_enqueue` to transmitting packets else
we use a SINGLE_LINK event queue to enqueue packets to a service
core which is responsible for transmitting packets.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Add framework to enable event device as a producer of packets.
To switch between event mode and poll mode the following options
have been added:
`--mode="eventdev"` or `--mode="poll"`
Allow the user to select the schedule type to be either
RTE_SCHED_TYPE_ORDERED, RTE_SCHED_TYPE_ATOMIC or RTE_SCHED_TYPE_PARALLEL
through:
`--eventq-sched="ordered"` or `--eventq-sched="atomic"` or
`--eventq-sched="parallel"`
Allow the user to specify the number of Rx queues to be connected to
event queue using:
`--event-eth-rxqs`
Poll mode is still the default operation mode.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Replace DSW's use of regular DPDK rings (and code for
packing/unpacking control messages into void pointers) with custom
size rings.
In addition to cleaner code, this change allows DSW to support up to
the eventdev API's maximum of 255 ports by tweaking DSW_MAX_PORTS.
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Without a git tree, the "guess" script from dpdk-ci will ignore all files
that are referenced in those sections and let a patchset land in any
subtree.
Changes in the EAL, mbuf, mempool... go through the main repository.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Mark librte_meter and librte_sched as being handled in the dpdk-next-qos
subtree.
The packet framework bits go through dpdk-next-pipeline.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Changes on the main test applications should be considered against
subtrees where most of the API changes and development happen:
- testpmd goes through dpdk-next-net as it is mainly about ethdev,
- dpdk-test-compress-perf goes through dpdk-next-crypto since the
compress API goes through this tree,
- dpdk-test-crypto-perf through dpdk-next-crypto,
- dpdk-test-eventdev through dpdk-next-eventdev,
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Since Anand is no longer with Intel, Pallavi will replace him
as maintainer.
Signed-off-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Unfortunately due to lack of time, I've been unable to even participate to
flow API discussions for several months. Better make it official since this
is not going to improve anytime soon.
This doesn't mean I won't contribute to rte_flow in the future!
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Ori Kam <orika@mellanox.com>
The compiler warning is:
from .../drivers/net/ionic/ionic_dev.c:7:
.../drivers/net/ionic/ionic_if.h:202:5: note: ‘rsvd’ declared here
u8 rsvd[62];
^
This has been observed with gcc 4.8.5, newer 9+ compiler are not giving
this warning.
Warning is a reminder to the user that there are some fields in the
struct not initialized with the default value.
But the C standard clarifies that in that case the field value will be
zero and code is aware of this behavior, so no initializing to a default
value is intentional and it is safe to ignore this compiler warning.
Adding '-Wno-missing-field-initializers' compiler flag to disable the
warning.
Reported-by: Anoob Joseph <anoobj@marvell.com>
Reported-by: Raslan Darawsheh <rasland@mellanox.com>
Reported-by: Xueming Zhang <xuemingx.zhang@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Contrary to the -c/-l options, where a logical core runs on the same
physical core in a 1:1 fashion (example: lcore 0 runs on core 0, lcore
16 runs on core 16), the --lcores option makes it possible to select the
physical cores on which runs a logical core.
However the current parsing code still limits the cpuset to the
[0, RTE_MAX_LCORE] range.
Example, before the patch, on a 24 cores system with RTE_MAX_LCORE == 16:
$ ./master/app/testpmd --no-huge --no-pci -m 512 --log-level *:debug \
--lcores 0@16,1@17 -- -i --total-num-mbufs 2048
EAL: Detected lcore 0 as core 0 on socket 0
EAL: Detected lcore 1 as core 1 on socket 0
EAL: Detected lcore 2 as core 2 on socket 0
EAL: Detected lcore 3 as core 3 on socket 0
EAL: Detected lcore 4 as core 4 on socket 0
EAL: Detected lcore 5 as core 5 on socket 0
EAL: Detected lcore 6 as core 6 on socket 0
EAL: Detected lcore 7 as core 8 on socket 0
EAL: Detected lcore 8 as core 9 on socket 0
EAL: Detected lcore 9 as core 10 on socket 0
EAL: Detected lcore 10 as core 11 on socket 0
EAL: Detected lcore 11 as core 12 on socket 0
EAL: Detected lcore 12 as core 13 on socket 0
EAL: Detected lcore 13 as core 14 on socket 0
EAL: Detected lcore 14 as core 0 on socket 0
EAL: Detected lcore 15 as core 1 on socket 0
EAL: Skipped lcore 16 as core 2 on socket 0
EAL: Skipped lcore 17 as core 3 on socket 0
EAL: Skipped lcore 18 as core 4 on socket 0
EAL: Skipped lcore 19 as core 5 on socket 0
EAL: Skipped lcore 20 as core 6 on socket 0
EAL: Skipped lcore 21 as core 8 on socket 0
EAL: Skipped lcore 22 as core 9 on socket 0
EAL: Skipped lcore 23 as core 10 on socket 0
EAL: Skipped lcore 24 as core 11 on socket 0
EAL: Skipped lcore 25 as core 12 on socket 0
EAL: Skipped lcore 26 as core 13 on socket 0
EAL: Skipped lcore 27 as core 14 on socket 0
EAL: Support maximum 16 logical core(s) by configuration.
EAL: Detected 16 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: invalid parameter for --lcores
We can remove this limitation by using a cpuset_t (which is a more
natural type since this is what gets passed to pthread_setaffinity*
in the end).
After the patch:
$ ./master/app/testpmd --no-huge --no-pci -m 512 --log-level *:debug \
--lcores 0@16,1@17 -- -i --total-num-mbufs 2048
[...]
EAL: Master lcore 0 is ready (tid=7f94217bbc00;cpuset=[16])
EAL: lcore 1 is ready (tid=7f941f491700;cpuset=[17])
Signed-off-by: David Marchand <david.marchand@redhat.com>
Add debug logs to have a trace of unused cores for -c/-l options on
systems with more cores than RTE_MAX_LCORE.
Signed-off-by: David Marchand <david.marchand@redhat.com>
We use this state in control path only for services cores and -c/-l
options.
The value is not updated when using --lcores.
Use the internal helper where needed.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Fix the name of CPU_SETSIZE in hope we can reuse it in other parts of
the dpdk manipulating some rte_cpuset_t.
Fixes: 4dc2b4d2a4 ("eal/windows: add headers for compatibility")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
In the root table, there is some limitation of total number of header
modify actions, 16 or 8 for each. But in other tables, there is no
such strict limitation. In an IPv6 case, the IP fields modifying
will occupy more actions than that in IPv4, so the total support
number should be increased in order to support as many actions as
possible for an IPv6 + TCP packet.
And in the meanwhile, the memory consumption should also be taken
into consideration because sometimes only several actions are needed.
The root table checking could also be done in low layer driver and
the error code will be returned if the actions number is over the
maximal supported value.
Fixes: 0e9d000276 ("net/mlx5: check maximum modify actions number")
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
The meter suffix flow item pointer restore is not correct to decrease
a fixed value. The incorrect operation will cause incorrect match to
the meter suffix flow, the flow create will fail once the magic number
in the wrong offset memory start with RTE_FLOW_ITEM_TYPE_END.
The pointer should decrease the real offset it increases.
Set the decrease value to the real offset the pointer increases to fix
the issue.
Fixes: 9ea9b049a9 ("net/mlx5: split meter flow")
Cc: stable@dpdk.org
Reported-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>