dpdk.git
4 years agonet/mlx5: fix masks of encap and decap actions
Dekel Peled [Wed, 22 Jan 2020 14:27:13 +0000 (16:27 +0200)]
net/mlx5: fix masks of encap and decap actions

PUSH_VLAN and POP_VLAN actions flags were added to ENCAP_ACTIONS
and DECAP_ACTIONS bit masks, respectively.
This is incorrect, because VLAN actions are considered as 'modify
header' actions, not as 'packet reformat' actions.

This patch removes the PUSH_VLAN and POP_VLAN actions flags from
ENCAP_ACTIONS and DECAP_ACTIONS bit masks.

Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")
Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/ice: add outer IPv4 matching for GTP-U flow
Chenmin Sun [Tue, 21 Jan 2020 11:56:53 +0000 (19:56 +0800)]
net/ice: add outer IPv4 matching for GTP-U flow

This patch adds the capability of matching the outer IPv4
headers for GTPU flows.

Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel")
Cc: stable@dpdk.org
Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/ice: fix flow director GTP-U pattern
Qi Zhang [Tue, 21 Jan 2020 01:30:48 +0000 (09:30 +0800)]
net/ice: fix flow director GTP-U pattern

Based on current FDIR implementation for GTP-U, inner specification is
not supported, issue a rule for eth/ipv4/gtpu/ipv4 will also match
eth/ipv4/gtpu/ipv6, the patch adds new pattern list to align with
existed implementation.

Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/tap: fix memory leak when unregister intr handler
Yunjian Wang [Tue, 21 Jan 2020 02:12:43 +0000 (10:12 +0800)]
net/tap: fix memory leak when unregister intr handler

The return check of function tap_lsc_intr_handle_set() is wrong, it should
be 0 or a positive number if success. So the intr_handle->intr_vec was not
been freed when tap_lsc_intr_handle_set() returned a positive number.

Fixes: 4870a8cdd968 ("net/tap: support Rx interrupt")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/enic: use common min and max macros
John Daley [Tue, 21 Jan 2020 20:35:07 +0000 (12:35 -0800)]
net/enic: use common min and max macros

Use the RTE_MIN and RTE_MAX macros instead of private macros.

Fixes: aae7dd40cda4 ("net/enic: move min/max macros")

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
4 years agonet/bnxt: remove unnecessary memset
Stephen Hemminger [Wed, 22 Jan 2020 17:55:14 +0000 (09:55 -0800)]
net/bnxt: remove unnecessary memset

The rte_ethdev layer already zeros statistics before calling
the device.

Fixes: 57d5e5bc86e4 ("net/bnxt: add statistics")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: do not log error if stats queried before start
Stephen Hemminger [Wed, 22 Jan 2020 17:55:13 +0000 (09:55 -0800)]
net/bnxt: do not log error if stats queried before start

When using pktgen lots of unnecessary errors are printed
because pktgen queries statistics before device is started.

Fixes: 3e92fd4e4ec0 ("net/bnxt: use dynamic log type")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: fix VLAN strip flags in SSE Rx
Stephen Hemminger [Wed, 22 Jan 2020 00:47:33 +0000 (16:47 -0800)]
net/bnxt: fix VLAN strip flags in SSE Rx

When the VLAN is stripped from the packet on receive the
driver must set the PKT_RX_VLAN_STRIPPED flag in the mbuf.
This is done correctly for normal receive in the bnxt driver
but was not being handled correctly in the new SSE code.

Fixes: bc4a000f2f53 ("net/bnxt: implement SSE vector mode")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/ice: fix flow FDIR/switch memory leak
Tao Zhu [Thu, 16 Jan 2020 16:38:36 +0000 (16:38 +0000)]
net/ice: fix flow FDIR/switch memory leak

1. Fix ice FDIR and hash flow memory leak.
2. Fix the ice definition of LIST_FOR_EACH_ENTRY_SAFE not
   save tmp which cause list deletion incompletely.

Fixes: 5f0978e96220 ("net/ice/base: add OS specific implementation")
Fixes: f5cafa961fae ("net/ice: add flow director create and destroy")
Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")
Cc: stable@dpdk.org
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Reviewed-by: Simei Su <simei.su@intel.com>
Reviewed-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/i40e/base: skip further adminq init for VF
Xiaolong Ye [Wed, 22 Jan 2020 03:58:10 +0000 (11:58 +0800)]
net/i40e/base: skip further adminq init for VF

Since VF has no need of firmware, we can skip further adminq init which
involves firmware operation, this patch fixes the testpmd segfault issue
when starting with i40e VF.

Fixes: d5e1a149362e ("net/i40e/base: check MAC type")

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
4 years agonet/ice: fix flow director flag
Beilei Xing [Tue, 21 Jan 2020 11:42:11 +0000 (19:42 +0800)]
net/ice: fix flow director flag

If there's no mark action when creating a FDIR rule,
there shouldn't be FDIR flags in mbuf.

Fixes: f5cafa961fae ("net/ice: add flow director create and destroy")
Fixes: bd984f155f49 ("net/ice/base: support FDIR")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/bnxt: fix max rings calculation
Somnath Kotur [Thu, 16 Jan 2020 13:04:55 +0000 (18:34 +0530)]
net/bnxt: fix max rings calculation

Max Tx rings count could be lesser than max Rx rings in some
cases, so take this into account as well.

Account for stat contexts available(one for each ring) along with
no: of completion rings(one for each ring) to cap the max no: of
Tx /Rx rings that can be possibly created.

Fixes: f03e66cb64ce ("net/bnxt: limit queue count for NS3/Stingray devices")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: release port upon close
Somnath Kotur [Thu, 16 Jan 2020 13:04:54 +0000 (18:34 +0530)]
net/bnxt: release port upon close

Set RTE_ETH_DEV_CLOSE_REMOVE upon probe so all the private resources
for the port can be freed by rte_eth_dev_close().

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: use macro for PCI log format
Kalesh AP [Thu, 16 Jan 2020 13:04:53 +0000 (18:34 +0530)]
net/bnxt: use macro for PCI log format

Fixes: 19e6af01bb36 ("net/bnxt: support get/set EEPROM")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
4 years agonet/bnxt: fix a memory leak in port stop
Kalesh AP [Thu, 16 Jan 2020 13:04:52 +0000 (18:34 +0530)]
net/bnxt: fix a memory leak in port stop

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: 94eb699bc82e ("net/bnxt: support flow mark action")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: handle HW filter setting when port is stopped
Kalesh AP [Thu, 16 Jan 2020 13:04:51 +0000 (18:34 +0530)]
net/bnxt: handle HW filter setting when port is stopped

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>
4 years agonet/bnxt: fix VLAN strip
Kalesh AP [Thu, 16 Jan 2020 13:04:50 +0000 (18:34 +0530)]
net/bnxt: fix VLAN strip

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: 7fe5668d2ea3 ("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>
4 years agonet/bnxt: fix enable/disable VLAN filtering
Kalesh AP [Thu, 16 Jan 2020 13:04:49 +0000 (18:34 +0530)]
net/bnxt: fix enable/disable VLAN filtering

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: 5c1171c97216 ("net/bnxt: refactor filter/flow")
Fixes: 6118503d8071 ("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>
4 years agonet/bnxt: fix IOVA mapping
Kalesh AP [Thu, 16 Jan 2020 13:04:48 +0000 (18:34 +0530)]
net/bnxt: fix IOVA mapping

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: f55e12f33416 ("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>
4 years agonet/bnxt: fix probe in FreeBSD
Kalesh AP [Thu, 16 Jan 2020 13:04:47 +0000 (18:34 +0530)]
net/bnxt: fix probe in FreeBSD

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: 6de4c538b393 ("net/bnxt: fix error handling in port start")
Fixes: 43f78b380f89 ("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>
4 years agonet/bnxt: fix flow creation
Kalesh AP [Thu, 16 Jan 2020 13:04:46 +0000 (18:34 +0530)]
net/bnxt: fix flow creation

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: 5c1171c97216 ("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>
4 years agovfio: fix mapping failures in ppc64le
Takeshi Yoshimura [Fri, 17 Jan 2020 04:25:55 +0000 (13:25 +0900)]
vfio: fix mapping failures in ppc64le

ppc64le failed when using large physical memory. I found problems in my two
commits in the past.

In commit e072d16f8920 ("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 db90b4969e2e ("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: e072d16f8920 ("vfio: fix expanding DMA area in ppc64le")
Fixes: db90b4969e2e ("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>
4 years agobuild: remove unneeded function versioning
Andrzej Ostruszka [Thu, 30 Jan 2020 09:25:30 +0000 (10:25 +0100)]
build: remove unneeded function versioning

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: f2fb215843a9 ("timer: remove deprecated code")
Fixes: 6e5b51676176 ("distributor: remove deprecated code")
Fixes: c381a8d554b7 ("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>
4 years agopdump: use dynamic log type
Stephen Hemminger [Fri, 8 Nov 2019 16:47:17 +0000 (08:47 -0800)]
pdump: use dynamic log type

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>
4 years agopdump: use mbuf copy function
Stephen Hemminger [Fri, 8 Nov 2019 16:47:16 +0000 (08:47 -0800)]
pdump: use mbuf copy function

The rte_pktmbuf_copy handles varying size mbuf pools correctly.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
4 years agohash: fix lock-free flag doxygen
Honnappa Nagarahalli [Mon, 3 Feb 2020 19:49:12 +0000 (13:49 -0600)]
hash: fix lock-free flag doxygen

Lock-free extendable table is supported. Correct the comments.

Fixes: f401363d984a ("hash: support lock-free extendable bucket")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
4 years agotest/hash: move lock-free tests to perf tests
Honnappa Nagarahalli [Mon, 3 Feb 2020 19:49:11 +0000 (13:49 -0600)]
test/hash: move lock-free tests to perf tests

Move reader writer lock free tests to performance tests.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
4 years agotest/hash: add lock-free functional tests
Honnappa Nagarahalli [Mon, 3 Feb 2020 19:49:10 +0000 (13:49 -0600)]
test/hash: add lock-free functional tests

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>
4 years agotest/hash: split into shorter subtests
Amit Gupta [Mon, 3 Feb 2020 19:49:08 +0000 (13:49 -0600)]
test/hash: split into shorter subtests

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>
4 years agobuildtools: allow pedantic empty pmdinfo
Thomas Monjalon [Wed, 5 Feb 2020 15:39:23 +0000 (16:39 +0100)]
buildtools: allow pedantic empty pmdinfo

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>
4 years agocryptodev: revert Chacha20-Poly1305 AEAD algorithm
Thomas Monjalon [Wed, 5 Feb 2020 11:04:32 +0000 (12:04 +0100)]
cryptodev: revert Chacha20-Poly1305 AEAD algorithm

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:
6c9f3b347e21 ("cryptodev: add Chacha20-Poly1305 AEAD algorithm")
2c512e64d600 ("crypto/qat: support Chacha Poly")
d55e01f579e1 ("test/crypto: add Chacha Poly cases")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodevtools: add ABI checks
David Marchand [Sun, 2 Feb 2020 21:08:34 +0000 (22:08 +0100)]
devtools: add ABI checks

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>
4 years agodevtools: split meson build helper
David Marchand [Sun, 2 Feb 2020 21:08:33 +0000 (22:08 +0100)]
devtools: split meson build helper

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>
4 years agohash: fix meson headers packaging
David Marchand [Sun, 2 Feb 2020 21:08:32 +0000 (22:08 +0100)]
hash: fix meson headers packaging

Those headers are internal and should not be distributed.

Fixes: 5b9656b157d3 ("lib: build with meson")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
4 years agolib: use common macro RTE_DIM
Pavan Nikhilesh [Fri, 24 Jan 2020 04:55:44 +0000 (10:25 +0530)]
lib: use common macro RTE_DIM

Use RTE_DIM to calculate array size.

Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoexamples: use common macro RTE_DIM
Pavan Nikhilesh [Fri, 24 Jan 2020 04:55:43 +0000 (10:25 +0530)]
examples: use common macro RTE_DIM

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>
4 years agoapp: use common macro RTE_DIM
Pavan Nikhilesh [Fri, 24 Jan 2020 04:55:42 +0000 (10:25 +0530)]
app: use common macro RTE_DIM

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>
4 years agodoc: add event mode to l3fwd guide
Pavan Nikhilesh [Tue, 28 Jan 2020 05:35:05 +0000 (11:05 +0530)]
doc: add event mode to l3fwd guide

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>
4 years agoexamples/l3fwd: add graceful teardown for eventdev
Pavan Nikhilesh [Tue, 28 Jan 2020 05:35:04 +0000 (11:05 +0530)]
examples/l3fwd: add graceful teardown for eventdev

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>
4 years agoexamples/l3fwd: add event em main loop
Pavan Nikhilesh [Tue, 28 Jan 2020 05:35:03 +0000 (11:05 +0530)]
examples/l3fwd: add event em main loop

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>
4 years agoexamples/l3fwd: add event lpm main loop
Pavan Nikhilesh [Tue, 28 Jan 2020 05:35:02 +0000 (11:05 +0530)]
examples/l3fwd: add event lpm main loop

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>
4 years agoexamples/l3fwd: add service core setup based on caps
Pavan Nikhilesh [Tue, 28 Jan 2020 05:35:01 +0000 (11:05 +0530)]
examples/l3fwd: add service core setup based on caps

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>
4 years agoexamples/l3fwd: add event eth Rx/Tx adapter setup
Pavan Nikhilesh [Tue, 28 Jan 2020 05:35:00 +0000 (11:05 +0530)]
examples/l3fwd: add event eth Rx/Tx adapter setup

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>
4 years agoexamples/l3fwd: add event port and queue setup
Sunil Kumar Kori [Tue, 28 Jan 2020 05:34:59 +0000 (11:04 +0530)]
examples/l3fwd: add event port and queue setup

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>
4 years agoexamples/l3fwd: add ethdev setup based on eventdev
Sunil Kumar Kori [Tue, 28 Jan 2020 05:34:58 +0000 (11:04 +0530)]
examples/l3fwd: add ethdev setup based on eventdev

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>
4 years agoexamples/l3fwd: add event device configuration
Pavan Nikhilesh [Tue, 28 Jan 2020 05:34:57 +0000 (11:04 +0530)]
examples/l3fwd: add event device configuration

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>
4 years agoexamples/l3fwd: split pipelines based on capability
Sunil Kumar Kori [Tue, 28 Jan 2020 05:34:56 +0000 (11:04 +0530)]
examples/l3fwd: split pipelines based on capability

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>
4 years agoexamples/l3fwd: add framework for event device
Sunil Kumar Kori [Tue, 28 Jan 2020 05:34:55 +0000 (11:04 +0530)]
examples/l3fwd: add framework for event device

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>
4 years agoevent/dsw: use custom element size ring for control
Mattias Rönnblom [Mon, 20 Jan 2020 15:03:00 +0000 (16:03 +0100)]
event/dsw: use custom element size ring for control

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>
4 years agomaintainers: set git tree for EAL and core libraries
David Marchand [Mon, 20 Jan 2020 20:35:13 +0000 (21:35 +0100)]
maintainers: set git tree for EAL and core libraries

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>
4 years agomaintainers: set git tree for packet framework and QoS
David Marchand [Tue, 14 Jan 2020 13:09:02 +0000 (14:09 +0100)]
maintainers: set git tree for packet framework and QoS

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>
4 years agomaintainers: set git tree for test applications
David Marchand [Tue, 14 Jan 2020 09:18:15 +0000 (10:18 +0100)]
maintainers: set git tree for test applications

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>
4 years agomaintainers: update for Windows
Ranjit Menon [Mon, 13 Jan 2020 19:35:34 +0000 (11:35 -0800)]
maintainers: update for Windows

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>
4 years agomaintainers: resign from flow API maintenance
Adrien Mazarguil [Wed, 8 Jan 2020 10:10:00 +0000 (11:10 +0100)]
maintainers: resign from flow API maintenance

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>
4 years agomaintainers: update for failsafe and PCI library
Gaetan Rivet [Wed, 8 Jan 2020 14:13:32 +0000 (15:13 +0100)]
maintainers: update for failsafe and PCI library

My email address has changed, gaetan.rivet@6wind.com is no longer valid.

Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <grive@u256.net>
4 years agonet/ionic: ignore missing field initializers warning
Ferruh Yigit [Tue, 21 Jan 2020 09:58:01 +0000 (09:58 +0000)]
net/ionic: ignore missing field initializers warning

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>
4 years agoversion: 20.02-rc1
Thomas Monjalon [Tue, 21 Jan 2020 00:26:11 +0000 (01:26 +0100)]
version: 20.02-rc1

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agoeal: remove limitation on cpuset with --lcores
David Marchand [Mon, 2 Dec 2019 15:42:20 +0000 (16:42 +0100)]
eal: remove limitation on cpuset with --lcores

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>
4 years agoeal: log all detected cores on startup
David Marchand [Mon, 2 Dec 2019 15:42:10 +0000 (16:42 +0100)]
eal: log all detected cores on startup

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>
4 years agoeal: do not cache lcore detection state
David Marchand [Mon, 2 Dec 2019 15:42:01 +0000 (16:42 +0100)]
eal: do not cache lcore detection state

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>
4 years agoeal/windows: fix cpuset macro name
David Marchand [Mon, 2 Dec 2019 15:41:46 +0000 (16:41 +0100)]
eal/windows: fix cpuset macro name

Fix the name of CPU_SETSIZE in hope we can reuse it in other parts of
the dpdk manipulating some rte_cpuset_t.

Fixes: 4dc2b4d2a4cd ("eal/windows: add headers for compatibility")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
4 years agodoc: add flow dump command in testpmd guide
Xiaoyu Min [Mon, 20 Jan 2020 04:01:45 +0000 (06:01 +0200)]
doc: add flow dump command in testpmd guide

Explanation of flow dump command is added into testpmd functions.

Fixes: 1e8a4e97b057 ("app/testpmd: add flow dump command")

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/mlx5: fix modify actions support limitation
Bing Zhao [Mon, 20 Jan 2020 09:43:07 +0000 (11:43 +0200)]
net/mlx5: fix modify actions support limitation

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: 0e9d00027686 ("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>
4 years agonet/mlx5: fix meter suffix flow
Suanming Mou [Wed, 8 Jan 2020 10:41:09 +0000 (12:41 +0200)]
net/mlx5: fix meter suffix flow

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: 9ea9b049a960 ("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>
4 years agonet/mlx5: support GTP
Dekel Peled [Thu, 16 Jan 2020 18:36:23 +0000 (20:36 +0200)]
net/mlx5: support GTP

This patch adds to MLX5 PMD support of matching on GTP item,
fields msg_type and teid, according to RFC [1].
GTP item validation and translation functions are added and called.
GTP tunnel type is added to supported tunnels.

[1] http://mails.dpdk.org/archives/dev/2019-December/152799.html

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
4 years agonet/mlx5: optimize Rx hash fields conversion
Dekel Peled [Wed, 15 Jan 2020 21:19:39 +0000 (23:19 +0200)]
net/mlx5: optimize Rx hash fields conversion

Previous fix added translation of Rx hash fields to PRM format.

This patch optimizes the fix, to perform value translation only
if value is not zero.
In case value is zero, there is no need to translate it.

Fixes: c3e33304a7f6 ("net/mlx5: fix setting of Rx hash fields")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/mlx5: engage free on completion queue
Viacheslav Ovsiienko [Thu, 9 Jan 2020 17:16:07 +0000 (17:16 +0000)]
net/mlx5: engage free on completion queue

The free on completion queue keeps the indices of elts array,
all mbuf stored below this index should be freed on arrival
of normal send completion. In debug version it also contains
an index of completed transmitting descriptor (WQE) to check
queues synchronization.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: add free on completion queue
Viacheslav Ovsiienko [Thu, 9 Jan 2020 17:16:06 +0000 (17:16 +0000)]
net/mlx5: add free on completion queue

The new software manged entity is introduced in Tx datapath
- free on completion queue. This queue keeps the information
how many buffers stored in elts array must freed on send
completion. Each element of the queue contains transmitting
descriptor index to be in synch with completion entries (in
debug build only) and the index in elts array to free buffers.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: update Tx error handling routine
Viacheslav Ovsiienko [Thu, 9 Jan 2020 17:16:05 +0000 (17:16 +0000)]
net/mlx5: update Tx error handling routine

This is preparation step, we are going to store the index
of elts to free on completion in the dedicated free on
completion queue, this patch updates the elts freeing routine
and updates Tx error handling routine to be synced with
coming new queue.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: move Tx complete request routine
Viacheslav Ovsiienko [Thu, 9 Jan 2020 17:16:04 +0000 (17:16 +0000)]
net/mlx5: move Tx complete request routine

The complete request flag is set once per Tx burst call,
the code of appropriate routine moved to the end of sending
loop. This is preparation step to remove WQE reserved field
usage to store index of elts to free.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/ionic: support FW version
Alfredo Cardigliano [Sun, 19 Jan 2020 15:53:55 +0000 (16:53 +0100)]
net/ionic: support FW version

Add support for reading the firmware version.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
4 years agonet/ionic: support Tx checksum
Alfredo Cardigliano [Sun, 19 Jan 2020 15:53:54 +0000 (16:53 +0100)]
net/ionic: support Tx checksum

Add support for Tx checksumming.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
4 years agonet/ionic: add stats
Alfredo Cardigliano [Sun, 19 Jan 2020 15:53:53 +0000 (16:53 +0100)]
net/ionic: add stats

Add basic, per queue and extended statistics for
RX and TX, both from the adapter and the driver.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
4 years agonet/ionic: support RSS
Alfredo Cardigliano [Sun, 19 Jan 2020 15:53:52 +0000 (16:53 +0100)]
net/ionic: support RSS

Add code to manipulate the RSS configuration
used by the adapter.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
4 years agonet/ionic: add Rx and Tx handling
Alfredo Cardigliano [Sun, 19 Jan 2020 15:53:51 +0000 (16:53 +0100)]
net/ionic: add Rx and Tx handling

Add Rx and Tx queues setup and handling.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
4 years agonet/ionic: support flow control
Alfredo Cardigliano [Sun, 19 Jan 2020 15:53:50 +0000 (16:53 +0100)]
net/ionic: support flow control

Add support for managing Flow Control.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
4 years agonet/ionic: support Rx filters
Alfredo Cardigliano [Sun, 19 Jan 2020 15:53:49 +0000 (16:53 +0100)]
net/ionic: support Rx filters

Add support for managing RX filters based on MAC and VLAN.
Hardware cannot provide the list of filters, thus we keep
a local list.
Add support for promisc and allmulticast modes.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
4 years agonet/ionic: add basic port operations
Alfredo Cardigliano [Sun, 19 Jan 2020 15:53:48 +0000 (16:53 +0100)]
net/ionic: add basic port operations

Add support for port start/stop and handle basic features
including MTU and link up/down.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
4 years agonet/ionic: support notify queue
Alfredo Cardigliano [Sun, 19 Jan 2020 15:53:47 +0000 (16:53 +0100)]
net/ionic: support notify queue

Add support for the notify queue, which is used for events
published by the NIC.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
4 years agonet/ionic: support admin queue
Alfredo Cardigliano [Sun, 19 Jan 2020 15:53:46 +0000 (16:53 +0100)]
net/ionic: support admin queue

Add support for the admin queue, which is used for most
of the NIC configurations.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
4 years agonet/ionic: add doorbells
Alfredo Cardigliano [Sun, 19 Jan 2020 15:53:45 +0000 (16:53 +0100)]
net/ionic: add doorbells

Doorbell registers are used by the driver to signal to the NIC
that requests are waiting on the message queues.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
4 years agonet/ionic: support basic LIF
Alfredo Cardigliano [Sun, 19 Jan 2020 15:53:44 +0000 (16:53 +0100)]
net/ionic: support basic LIF

Initialize LIFs (Logical Interfaces) which represents
external connections. The NIC can multiplex many LIFs
to a single port, but in most setups, LIF0 is the
primary control for the port.
Create a device for each LIF.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
4 years agonet/ionic: add port management commands
Alfredo Cardigliano [Sun, 19 Jan 2020 15:53:43 +0000 (16:53 +0100)]
net/ionic: add port management commands

Add port management commands that apply to the physical
ports associated with the PCI device, which might be
shared among several logical interfaces.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
4 years agonet/ionic: register and initialize adapter
Alfredo Cardigliano [Sun, 19 Jan 2020 15:53:42 +0000 (16:53 +0100)]
net/ionic: register and initialize adapter

Register the Pensando ionic PMD (net_ionic) and define initial probe
and remove callbacks with adapter initialization.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
4 years agonet/ionic: add log
Alfredo Cardigliano [Sun, 19 Jan 2020 15:53:41 +0000 (16:53 +0100)]
net/ionic: add log

Add debug options to the config file.
Define macros used for logs and make use of config file options
to enable them.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
4 years agonet/ionic: add hardware structures definitions
Alfredo Cardigliano [Sun, 19 Jan 2020 15:53:40 +0000 (16:53 +0100)]
net/ionic: add hardware structures definitions

Add hardware structures and message commands definitions for
Pensando network adapters.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
4 years agonet/ionic: add skeleton
Alfredo Cardigliano [Sun, 19 Jan 2020 15:53:39 +0000 (16:53 +0100)]
net/ionic: add skeleton

Add makefile and config file options to compile the Pensando ionic PMD.
Add feature and version map file.
Update maintainers file.

Signed-off-by: Alfredo Cardigliano <cardigliano@ntop.org>
Reviewed-by: Shannon Nelson <snelson@pensando.io>
4 years agonet/axgbe: add a HW quirk for register definitions
Selwin Sebastian [Mon, 20 Jan 2020 16:42:58 +0000 (22:12 +0530)]
net/axgbe: add a HW quirk for register definitions

V1000/R1000 processors are using the same PCI ids for the network
device as SNOWYOWL processor but has altered register definitions
for determining the window settings for the indirect PCS access.
Add support to check for this hardware and if found use the new
register values.

Signed-off-by: Selwin Sebastian <selwin.sebastian@amd.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agomk: disable OCTEON TX2 EP with old arm64 compilers
Ali Alnubani [Mon, 20 Jan 2020 19:51:14 +0000 (19:51 +0000)]
mk: disable OCTEON TX2 EP with old arm64 compilers

OCTEON TX2 isn't built for gcc 4.8.5 as the compiler emits
"internal compiler error" on aarch64. This causes the following
build error when OCTEON TX2 EP is enabled:

  /usr/bin/ld: cannot find -lrte_common_octeontx2
  collect2: error: ld returned 1 exit status

Fixes: 56d46d13f736 ("raw/octeontx2_ep: add build infra and device probe")

Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
4 years agonet/mlx5: allow allocated mbuf with external buffer
Viacheslav Ovsiienko [Mon, 20 Jan 2020 19:16:26 +0000 (19:16 +0000)]
net/mlx5: allow allocated mbuf with external buffer

In the Rx datapath the flags in the newly allocated mbufs
are all explicitly cleared but the EXT_ATTACHED_MBUF must be
preserved. It would allow to use mbuf pools with pre-attached
external data buffers.

The vectorized rx_burst routines are updated in order to
inherit the EXT_ATTACHED_MBUF from mbuf pool private
RTE_PKTMBUF_POOL_F_PINNED_EXT_BUF flag.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agoapp/testpmd: add mempool with external data buffers
Viacheslav Ovsiienko [Mon, 20 Jan 2020 19:16:25 +0000 (19:16 +0000)]
app/testpmd: add mempool with external data buffers

The new mbuf pool type is added to testpmd. To engage the
mbuf pool with externally attached data buffers the parameter
"--mp-alloc=xbuf" should be specified in testpmd command line.

The objective of this patch is just to test whether mbuf pool
with externally attached data buffers works OK. The memory for
data buffers is allocated from DPDK memory, so this is not
"true" external memory from some physical device (this is
supposed the most common use case for such kind of mbuf pool).

The user should be aware that not all drivers support the mbuf
with EXT_ATTACHED_BUF flags set in newly allocated mbuf (many
PMDs just overwrite ol_flags field and flag value is getting
lost).

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agombuf: create pool with external memory buffers
Viacheslav Ovsiienko [Mon, 20 Jan 2020 19:16:24 +0000 (19:16 +0000)]
mbuf: create pool with external memory buffers

The dedicated routine rte_pktmbuf_pool_create_extbuf() is
provided to create mbuf pool with data buffers located in
the pinned external memory. The application provides the
external memory description and routine initializes each
mbuf with appropriate virtual and physical buffer address.
It is entirely application responsibility to register
external memory with rte_extmem_register() API, map this
memory, etc.

The new introduced flag RTE_PKTMBUF_POOL_F_PINNED_EXT_BUF
is set in private pool structure, specifying the new special
pool type. The allocated mbufs from pool of this kind will
have the EXT_ATTACHED_MBUF flag set and initialiazed shared
info structure, allowing cloning with regular mbufs (without
attached external buffers of any kind).

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agombuf: detach mbuf with pinned external buffer
Viacheslav Ovsiienko [Mon, 20 Jan 2020 19:16:23 +0000 (19:16 +0000)]
mbuf: detach mbuf with pinned external buffer

Update detach routine to check the mbuf pool type.
Introduce the special internal version of detach routine to handle
the special case of pinned external bufferon mbuf freeing.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agombuf: introduce routine to get private mbuf pool flags
Viacheslav Ovsiienko [Mon, 20 Jan 2020 19:16:22 +0000 (19:16 +0000)]
mbuf: introduce routine to get private mbuf pool flags

The routine rte_pktmbuf_priv_flags is introduced to fetch
the flags from the mbuf memory pool private structure
in unified fashion.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agombuf: use structure marker from EAL
Jerin Jacob [Thu, 19 Dec 2019 11:25:07 +0000 (16:55 +0530)]
mbuf: use structure marker from EAL

Use new marker typedef available in EAL and remove private marker
typedef.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agodrivers/net: use structure marker from EAL
Jerin Jacob [Thu, 19 Dec 2019 11:25:06 +0000 (16:55 +0530)]
drivers/net: use structure marker from EAL

Use new marker typedef available in EAL.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agoeal: introduce structure markers
Jerin Jacob [Thu, 19 Dec 2019 11:25:05 +0000 (16:55 +0530)]
eal: introduce structure markers

Introduce EAL typedef for structure 1B, 2B, 4B, 8B alignment marking and
a generic marker for a point in a structure.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agomem: improve log message for too low memzone segments
Artur Trybula [Fri, 20 Dec 2019 15:08:39 +0000 (16:08 +0100)]
mem: improve log message for too low memzone segments

In case of too low number of memzone segments user notification
was misleading. This patch improves the description by providing
better explanation about the cause.

Signed-off-by: Artur Trybula <arturx.trybula@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
4 years agoconfig: disable Linux kernel modules by default
Jerin Jacob [Fri, 17 Jan 2020 19:14:00 +0000 (00:44 +0530)]
config: disable Linux kernel modules by default

Based on the techboard meeting held on 2019-11-06,
It's been decided to disable all kmods by default from v20.02.

http://mails.dpdk.org/archives/dev/2019-November/151763.html

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
4 years agocontigmem: update for FreeBSD 13
Bruce Richardson [Fri, 3 Jan 2020 11:52:43 +0000 (11:52 +0000)]
contigmem: update for FreeBSD 13

FreeBSD 13 has changed the definition of vm_page_replace so we need
to have slightly different code paths around this function depending on
the BSD version.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>