dpdk.git
5 years agomaintainers: add Andrew for next-net tree
Ferruh Yigit [Wed, 17 Jul 2019 17:50:20 +0000 (18:50 +0100)]
maintainers: add Andrew for next-net tree

Adding Andrew as co-maintainer to next-net sub-tree.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
5 years agomempool/octeontx2: fix possible arm64 ABI break
Pavan Nikhilesh [Thu, 18 Jul 2019 06:51:11 +0000 (12:21 +0530)]
mempool/octeontx2: fix possible arm64 ABI break

Since direct register access is used in npa_lf_aura_op_alloc_bulk()
use __rte_noinline instead of __rte_always_inline to preserve ABI.
Based on the compiler npa_lf_aura_op_alloc_bulk might be inlined
differently which may lead to undefined behaviour due to handcoded
asm.

Fixes: 29893042c29d ("mempool/octeontx2: fix clang build for arm64")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agodoc: add LBK to Marvell OCTEON TX2 guide
Jerin Jacob [Wed, 17 Jul 2019 15:55:19 +0000 (21:25 +0530)]
doc: add LBK to Marvell OCTEON TX2 guide

Add LBK HW block abstraction details and the application
usage models.

This patch also updates missing DPI HW block to DPDK
subsystem mapping as well.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
5 years agodoc: fix PDF build of bbdev prog guide
Thomas Monjalon [Thu, 18 Jul 2019 06:24:39 +0000 (23:24 -0700)]
doc: fix PDF build of bbdev prog guide

Some machine (like on dpdk.org) may fail to build the prog guide PDF
because of a table characher being "+" instead of "|".

Some figure references are also fixed with automatic numbering.

Fixes: 3f3f608142cf ("doc: update bbdev guide for 5GNR operations")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
5 years agokni: fix segmented mbuf data overflow
Ferruh Yigit [Thu, 11 Jul 2019 12:35:07 +0000 (13:35 +0100)]
kni: fix segmented mbuf data overflow

'kni_net_rx_lo_fifo()' can get segmented buffers, using 'pkt_len' for
that case will be wrong and some values can cause buffer overflow
in destination mbuf data.

Fixes: d89a58dfe90b ("kni: support chained mbufs")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agoexamples/performance-thread: init timer subsystem
Erik Gabriel Carrillo [Mon, 15 Jul 2019 15:39:32 +0000 (10:39 -0500)]
examples/performance-thread: init timer subsystem

The timer subsystem should be initialized in the l3fwd-thread app before
the L-thread subsystem can be used.

Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app")
Cc: stable@dpdk.org
Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
5 years agotimer: fix null access if not initialized
Erik Gabriel Carrillo [Mon, 15 Jul 2019 15:39:31 +0000 (10:39 -0500)]
timer: fix null access if not initialized

If the timer subsystem is not initialized before rte_timer_manage (for
example) is invoked, a pointer to a shared hugepage memory region will
still be null and dereferenced when it is checked for validity; handle
this case.

Fixes: c0749f7096c7 ("timer: allow management in shared memory")
Cc: stable@dpdk.org
Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
5 years agoexamples/tep_term: remove duplicate definitions
Haiyue Wang [Tue, 16 Jul 2019 17:04:07 +0000 (01:04 +0800)]
examples/tep_term: remove duplicate definitions

The state of virtio device has been defined in both header file and
source file, keep the definition in header file for public use.

Fixes: a50245ede72a ("examples/tep_term: initialize VXLAN sample")
Cc: stable@dpdk.org
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
5 years agoexamples/ip_frag: fix unknown ethernet type
Konstantin Ananyev [Thu, 18 Jul 2019 10:11:13 +0000 (11:11 +0100)]
examples/ip_frag: fix unknown ethernet type

Right now app blindly set IPv4 ether type for all non IPv6 packets.
Instead we can save and later restore original type value.

Fixes: 74de12b7b63a ("examples/ip_fragmentation: overhaul")
Cc: stable@dpdk.org
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
5 years agoexamples/ip_frag: fix Tx un-fragmented packets
Konstantin Ananyev [Thu, 18 Jul 2019 10:11:12 +0000 (11:11 +0100)]
examples/ip_frag: fix Tx un-fragmented packets

With latest changes l3fwd_simple_forward() blindly set
(PKT_TX_IPV4 | PKT_TX_IP_CKSUM) ol_flags for all IPv4 packets.
Though for un-fragmented packets we also do have to set l3_len
to make HW IP cksum offload to work properly.
That causes HW/PMD to drop or generate invalid packets.
Though for un-fragmented packets we don't need to regenerate
IPv4 cksum, as L3 header is not modified.
Fix by setting ol_flags only when required.

Fixes: 16863bbb4a41 ("examples/ip_fragmentation: enable IP checksum offload")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
5 years agoexamples/ip_frag: fix use of ethdev internal device array
Marcin Zapolski [Wed, 17 Jul 2019 07:58:05 +0000 (09:58 +0200)]
examples/ip_frag: fix use of ethdev internal device array

Modify ip_fragmentation example app to use rte_eth_info_get instead
of global rte_eth_devices structure.
Apps should not be using internal DPDK data structures directly.

Fixes: 9758b956dcf4 ("examples/ip_fragmentation: fix Tx queues init")
Cc: stable@dpdk.org
Signed-off-by: Marcin Zapolski <marcinx.a.zapolski@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agoexamples/ipsec-secgw: fix use of ethdev internal struct
Marcin Zapolski [Wed, 17 Jul 2019 07:58:06 +0000 (09:58 +0200)]
examples/ipsec-secgw: fix use of ethdev internal struct

Modify ipsec-secgw example app to use rte_eth_dev_info_get instead of
rte_eth_dev.
Apps should not be using internal DPDK data structures directly.

Fixes: a4677f78368b ("examples/ipsec-secgw: add target queues in flow actions")
Cc: stable@dpdk.org
Signed-off-by: Marcin Zapolski <marcinx.a.zapolski@intel.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
5 years agoexamples: fix use of ethdev internal device array
Marcin Zapolski [Wed, 17 Jul 2019 07:58:04 +0000 (09:58 +0200)]
examples: fix use of ethdev internal device array

Modify l3fwd and related example apps to use locally defined port_conf
instead of global rte_eth_devices which is not a part of public API.
Apps should not be using internal DPDK data structures directly.

Fixes: 1ef9600b2d20 ("examples/l3fwd: convert to ethdev offloads API")
Fixes: ba8c103d2455 ("examples/l3fwd-acl: convert to new ethdev offloads API")
Fixes: 40df1d7a695d ("examples/l3fwd-power: convert to new ethdev offloads API")
Fixes: 43fc038262b8 ("examples/l3fwd-vf: convert to new ethdev offloads API")
Fixes: 373149c631fe ("examples/performance-thread: convert to new offloads API")
Cc: stable@dpdk.org
Signed-off-by: Marcin Zapolski <marcinx.a.zapolski@intel.com>
5 years agoexamples/power: fix policy handling for FIFO
David Hunt [Tue, 16 Jul 2019 11:11:12 +0000 (12:11 +0100)]
examples/power: fix policy handling for FIFO

While the core frequency scale-up and scale down all works fine with the
fifo-per-core functionality, there was a gap for policy handling. When
creating or destroying a policy, the core associated with the FIFO
needs to be automatically added to the core list, so the policy is
associated with the correct core.

Fixes: 221e7026d521 ("examples/power: add FIFO per core for JSON interface")

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agoexamples/l3fwd-power: fix busyness number
David Hunt [Mon, 15 Jul 2019 14:07:04 +0000 (15:07 +0100)]
examples/l3fwd-power: fix busyness number

Current implementation only outputs 3 numbers for busyness, 0, 50 and 100.
Fix this so that the 50% is replaced by a curve, more meaningful.
This can be replaced in each use case by a suitable calculation for
that use case.

Fixes: 609e79841fcf ("examples/l3fwd-power: add telemetry mode")

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agodistributor: fix check of workers number
Harman Kalra [Fri, 5 Jul 2019 10:05:12 +0000 (10:05 +0000)]
distributor: fix check of workers number

No of workers should never exceed RTE_MAX_LCORE.
RTE_DIST_ALG_SINGLE also require no of workers check.

Fixes: 775003ad2f96 ("distributor: add new burst-capable library")
Cc: stable@dpdk.org
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: David Hunt <david.hunt@intel.com>
5 years agotest/distributor: fix flush with worker shutdown
Harman Kalra [Fri, 5 Jul 2019 10:05:04 +0000 (10:05 +0000)]
test/distributor: fix flush with worker shutdown

On restarting worker 0 after shutdown, packets handled by
worker 0 must be incremented only when a packet is received by
it.

Fixes: c3eabff124e6 ("distributor: add unit tests")
Cc: stable@dpdk.org
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: David Hunt <david.hunt@intel.com>
5 years agoeal: update comment about --no-huge option
Thomas Monjalon [Wed, 17 Jul 2019 08:56:24 +0000 (10:56 +0200)]
eal: update comment about --no-huge option

The old comment, on top of the function rte_eal_has_hugepages(),
is really outdated and not generic enough.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agohash: flush rings instead of dequeuing one by one
Gavin Hu [Tue, 16 Jul 2019 19:23:56 +0000 (03:23 +0800)]
hash: flush rings instead of dequeuing one by one

Within rte_hash_reset, calling a while loop to dequeue one by
one from the ring, while not using them at all, is wasting cycles,
The patch just flush the ring by resetting the indices can save CPU
cycles.

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
5 years agoring: add reset function for flushing
Gavin Hu [Tue, 16 Jul 2019 19:23:55 +0000 (03:23 +0800)]
ring: add reset function for flushing

Currently, the flush is done by dequeuing the ring in a while loop. It is
much simpler to flush the queue by resetting the head and tail indices.

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
5 years agobus/fslmc: fix error handling in device iterator
Hemant Agrawal [Wed, 17 Jul 2019 15:55:18 +0000 (21:25 +0530)]
bus/fslmc: fix error handling in device iterator

When initializing EAL with "-w 0:0.0", this error is blocking:
munmap_chunk(): invalid pointer
ElectricFence reports this root cause:
free(7fffeec25a11): address not from malloc()

Fixes: e67a61614d0b ("bus/fslmc: support device iteration")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Tested-by: Thomas Monjalon <thomas@monjalon.net>
5 years agoexamples/power: fix strcpy buffer overrun
David Hunt [Tue, 16 Jul 2019 11:19:00 +0000 (12:19 +0100)]
examples/power: fix strcpy buffer overrun

replace strcpy with strlcpy to prevent buffer overrun
With fix, attempting to use a VERY lonng vm name results in a nicely
truncated 32 character name rather than a segfault:
Setting VM Name to [sdfdsfsfsdffdsdsasdsadasdakjshd]

Using strlcpy rather than rte_strlcpy, as the rte_ version is only a
fallback.

As well as the fix in main.c, this patch also changes an occurrence of
rte_strlcpy in channel_manager.c and channel_monitor.c to strlcpy.

Fixes: 59287933a0bb ("examples/vm_power: add options to guest app")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agoip_frag: remove remaining IP checkum offload flag
Sunil Kumar Kori [Tue, 16 Jul 2019 06:23:28 +0000 (11:53 +0530)]
ip_frag: remove remaining IP checkum offload flag

Currently PKT_TX_IP_CKSUM is being set into mbuf->ol_flags during
fragmentation operation implicitly by the library. Because of this,
application is forced to use checksum offload whether it is supported
by platform or not.

Also documentation does not provide any expected value of ol_flags in
returned fragmented mbufs so application will never come to know that which
offloads are enabled. So transmission may be failed for the platforms which
does not support checksum offload.

So removing mentioned flag from the library.

Mentioned change is part of http://patches.dpdk.org/patch/53475.
Changes for reassembly operation is already accepted. This patch set
implements the similar change for fragmentation operation.

Fixes: e29fc44370c2 ("ip_frag: remove IP checkum offload flag")

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
5 years agotest: add procfs error message for multi-process launch
Anatoly Burakov [Fri, 12 Jul 2019 16:02:05 +0000 (17:02 +0100)]
test: add procfs error message for multi-process launch

Currently, if there is no procfs mounted, test application will
fail to run any multiprocess-related autotests (EAL flags etc.)
without a clear explanation as to why this happens.

Add a check specifically for that condition, as well as add a
general stringified error message to rte_panic.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agovfio: fix expanding DMA area in ppc64le
Takeshi Yoshimura [Sat, 13 Jul 2019 01:15:32 +0000 (18:15 -0700)]
vfio: fix expanding DMA area in ppc64le

In ppc64le, expanding DMA areas always fail because we cannot remove
a DMA window. As a result, we cannot allocate more than one memseg in
ppc64le. This is because vfio_spapr_dma_mem_map() doesn't unmap all
the mapped DMA before removing the window. This patch fixes this
incorrect behavior.

I also fixed the order of ioctl for unregister and unmap. The ioctl
for unregister sometimes report device busy errors due to the
existence of mapped area.

Signed-off-by: Takeshi Yoshimura <tyos@jp.ibm.com>
Acked-by: David Christensen <drc@linux.vnet.ibm.com>
5 years agotest/metrics: fix second run
Harman Kalra [Thu, 11 Jul 2019 09:26:12 +0000 (09:26 +0000)]
test/metrics: fix second run

Issue is observed while running 'metrics_autotest' continuously
without quiting. During first execution all test cases pass but
second run onwards first test case fails as library is already
initialized.

To resolve, introduced a new API to deinitialise the library
after all test cases are executed.

Fixes: cd3804242901 ("test/metrics: add unit tests for metrics library")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Tested-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
5 years agometrics: add function to deinitialise library
Harman Kalra [Thu, 11 Jul 2019 09:26:05 +0000 (09:26 +0000)]
metrics: add function to deinitialise library

Once the library usage is over, it must be deinitialized which
will free the shared memory reserved during initialization.

Observed an issue while running 'metrics_autotest' continuously
without quiting. For the first run 'metrics_autotest' passes
all test cases but second run onwards first test case fails
because metrics library is already initialized during first run.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
5 years agoconfig: fix meson build on ThunderX2
Gavin Hu [Fri, 12 Jul 2019 09:58:34 +0000 (17:58 +0800)]
config: fix meson build on ThunderX2

Since gcc-8.3(I tried 8.3 and 9.1), the meson build failed on ThunderX2.
It got the following compiling errors:
/usr/lib/gcc/aarch64-linux-gnu/9/include/arm_neon.h:26493:1: error:
inlining failed in call to always_inline ‘vmull_p64’:
target specific option mismatch 26493 | vmull_p64 (poly64_t a, poly64_t b)

Fixes: 7286c9d7234f ("config: add thunderx2 machine")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Jingzhao Ni <jingzhao.ni@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agocommon/octeontx2: remove escape sequences in log
Stephen Hemminger [Thu, 11 Jul 2019 03:11:54 +0000 (20:11 -0700)]
common/octeontx2: remove escape sequences in log

Putting color escape sequences in the log look pretty for the
developer but fails in real world DPDK usage. A real application
will put DPDK log to syslog, and syslog does not handle escape
sequences.

Fixes: dd543124cd93 ("common/octeontx2: add runtime log infra")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agomaintainers: claim maintainership of NXP net PMDs
Sachin Saxena [Mon, 15 Jul 2019 11:38:30 +0000 (17:08 +0530)]
maintainers: claim maintainership of NXP net PMDs

Shreyansh is no longer with NXP.
Pankaj is no longer working on DPDK.

Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agomaintainers: claim maintainership of DPAA eventdev
Nipun Gupta [Mon, 15 Jul 2019 11:38:29 +0000 (17:08 +0530)]
maintainers: claim maintainership of DPAA eventdev

Sunil Kori is no longer with NXP

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agomempool/dpaa2: map external memory with VFIO
Sachin Saxena [Mon, 15 Jul 2019 08:44:42 +0000 (14:14 +0530)]
mempool/dpaa2: map external memory with VFIO

This patch help in adding a routine to help memory map
the user provided memory via VFIO.

Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
5 years agobus/fslmc: use CINH read on LS1088 platform
Nipun Gupta [Mon, 15 Jul 2019 08:44:41 +0000 (14:14 +0530)]
bus/fslmc: use CINH read on LS1088 platform

LS1088 platform CENA operation are causing issues
at high load. CINH (cache inhibited) mode is working
fine with minor performance impact.

This patch enables CINH mode selectively on LS1088 platform

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
5 years agobus/fslmc: detect IOMMU mode
Shreyansh Jain [Mon, 15 Jul 2019 08:44:40 +0000 (14:14 +0530)]
bus/fslmc: detect IOMMU mode

This patch adds following:
1. 'g_container' variable name is not right way to represent the
FSLMC container. Renaming it to fslmc_container.
2. dynamic selection of IOMMU mode based on run environment

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
5 years agobus/fslmc: enhance error handling for dev parsing
Shreyansh Jain [Mon, 15 Jul 2019 08:44:39 +0000 (14:14 +0530)]
bus/fslmc: enhance error handling for dev parsing

In case an incorrect device is found, it was quiting further search
rather than skipping it.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
5 years agobus/fslmc: support device iteration
Shreyansh Jain [Mon, 15 Jul 2019 08:44:38 +0000 (14:14 +0530)]
bus/fslmc: support device iteration

Recent (18.11+), devargs structure was changed and so was DPDK port
usage in applications like OVS. Applications are now allowed to
plug/unplug ports (eth) using APIs (hotplug) based on device
arguments.

This patch enables the plug/unplug function (which are dummy for
FSLMC) and the iterator function for rte_dev_probe() and similar
API support.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
5 years agokni: fix kernel crash with multi-segments
Yangchao Zhou [Tue, 25 Jun 2019 15:04:14 +0000 (23:04 +0800)]
kni: fix kernel crash with multi-segments

va2pa depends on the physical address and virtual address offset of
current mbuf. It may get the wrong physical address of next mbuf which
allocated in another hugepage segment.

In rte_mempool_populate_default(), trying to allocate whole block of
contiguous memory could be failed. Then, it would reserve memory in
several memzones that have different physical address and virtual address
offsets. The rte_mempool_populate_default() is used by
rte_pktmbuf_pool_create().

Fixes: 8451269e6d7b ("kni: remove continuous memory restriction")
Cc: stable@dpdk.org
Signed-off-by: Yangchao Zhou <zhouyates@gmail.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agodoc: update KNI guides
Stephen Hemminger [Mon, 24 Jun 2019 16:47:14 +0000 (09:47 -0700)]
doc: update KNI guides

Update KNI documentation to reflect current ethtool support.

Replace references to out dated tools (ifconfig) with
modern iproute2.  Tshark is a better replacement for tcpdump.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agokni: support minimal ethtool
Stephen Hemminger [Mon, 24 Jun 2019 16:47:13 +0000 (09:47 -0700)]
kni: support minimal ethtool

Some applications use ethtool so add the minimum ethtool ops.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agokni: fix style
Stephen Hemminger [Mon, 24 Jun 2019 16:47:12 +0000 (09:47 -0700)]
kni: fix style

rte_kni does not follow standard style rules.
Noticed some extra \ line continuation etc.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agokni: fix copy_from_user failure handling
Stephen Hemminger [Mon, 24 Jun 2019 16:47:11 +0000 (09:47 -0700)]
kni: fix copy_from_user failure handling

The correct thing to return if user gives a bad data
is to return -EFAULT. Logging is also discouraged because
it could be used as a DoS attack.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agokni: replace void pointer with FIFO types
Stephen Hemminger [Mon, 24 Jun 2019 16:47:10 +0000 (09:47 -0700)]
kni: replace void pointer with FIFO types

Using void * instead of proper type is unsafe practice.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agokni: drop unused fields
Stephen Hemminger [Mon, 24 Jun 2019 16:47:09 +0000 (09:47 -0700)]
kni: drop unused fields

Several fields were either totally unused or set and never used.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agokni: remove stats from private struct
Stephen Hemminger [Mon, 24 Jun 2019 16:47:08 +0000 (09:47 -0700)]
kni: remove stats from private struct

Since kernel 2.6.28 the network subsystem has provided
dev->stats for devices to use statistics handling and is the
default if no ndo_get_stats is provided.

This allow allows for 64 bit (rather than just 32 bit)
statistics with KNI.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agokni: use netdev_alloc_skb
Stephen Hemminger [Mon, 24 Jun 2019 16:47:07 +0000 (09:47 -0700)]
kni: use netdev_alloc_skb

netdev_alloc_skb is optimized to any alignment or setup
of skb->dev that is required. The kernel has chosen to not pad
packets on x86 (for many years), because it is faster.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agokni: remove stubs for Rx mode or ioctl
Stephen Hemminger [Mon, 24 Jun 2019 16:47:06 +0000 (09:47 -0700)]
kni: remove stubs for Rx mode or ioctl

The netdev subsystem already handles case where
network sevice does not support ioctl.

If device has no rx_mode hook it is not called.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agocommon/cpt: remove redundant code in datapath
Anoob Joseph [Sat, 6 Jul 2019 13:23:40 +0000 (18:53 +0530)]
common/cpt: remove redundant code in datapath

Removing redundant checks and unused local variables from datapath.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
5 years agocommon/cpt: remove redundant bit swaps
Anoob Joseph [Sat, 6 Jul 2019 13:23:39 +0000 (18:53 +0530)]
common/cpt: remove redundant bit swaps

The bit swaps can be removed by re-arranging the structure.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
5 years agocommon/octeontx2: support CNF95xx SoC
Nithin Dabilpuram [Fri, 12 Jul 2019 09:25:54 +0000 (14:55 +0530)]
common/octeontx2: support CNF95xx SoC

Update platform support of CNF95xx in documentation and
also, update the HW cap based on PCI subsystem id and revision id.
This patch also changes HW capability handling to be based on
PCI Revision ID. PCI Revision ID contains a unique identifier
to identify chip, major and minor revisions.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agoeal/freebsd: fix config creation
Anatoly Burakov [Fri, 12 Jul 2019 14:48:08 +0000 (15:48 +0100)]
eal/freebsd: fix config creation

The config create function did not store the mem config address in
the shared memconfig structure, so the secondary processes couldn't
map it at the required address.

Fixes: b149a7064261 ("eal/freebsd: add config reattach in secondary process")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agoexamples/power: fix FreeBSD meson lib dependency
David Hunt [Fri, 12 Jul 2019 09:06:51 +0000 (10:06 +0100)]
examples/power: fix FreeBSD meson lib dependency

Samples apps that depend on the power library should not build if
the power library is not present. So now the following apps will
check to see if it's built, else skip building.
* l3fwd-pwer
* vm_power_manager
* guest_cli

Fixes: e0130788576f ("examples/power: support meson/ninja build")
Fixes: 89f0711f9ddf ("examples: build some samples with meson")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agovfio: fix build on Linux < 4.2
Takeshi Yoshimura [Thu, 11 Jul 2019 02:22:35 +0000 (19:22 -0700)]
vfio: fix build on Linux < 4.2

The commit db90b4969e2e ("vfio: retry creating sPAPR DMA window")
introduced a build breakage on old Linux. Linux <4.2 does not define ddw in
struct vfio_iommu_spapr_tce_info. Without ddw, we cannot change window size
and so should give up the creation. I just exculuded the retrying code if
ddw is not supported.

Fixes: db90b4969e2e ("vfio: retry creating sPAPR DMA window")

Signed-off-by: Takeshi Yoshimura <tyos@jp.ibm.com>
Tested-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agoapp/pdump: exit with primary process
Suanming Mou [Wed, 15 May 2019 05:10:39 +0000 (05:10 +0000)]
app/pdump: exit with primary process

The pdump tool works as the secondary process. When the primary process
exits and the residual secondary process keeps running, it will make the
primary process can't start up again. Since the ex-fbarry files are still
attached by the secondary process pdump, the 'new' primary process can't
get these files locked.

The patch is to set up an alarm which runs every 0.5s periodically
to monitor the primary process in the pdump. Once the primary exits,
so will the pdump.

Signed-off-by: Suanming Mou <mousuanming@huawei.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
5 years agoapp/pdump: enforce to use SW mempool
Harman Kalra [Wed, 10 Jul 2019 09:22:25 +0000 (09:22 +0000)]
app/pdump: enforce to use SW mempool

A secondary process cannot access HW mempool already
initiazed by primary, and neither it can setup its own
HW mempool due to its own restrictions.

Since dpdk-pdump creates mempool for managing its local
mbufs, SW mempool is capable enough to solve this purpose.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
5 years agoexamples/l3fwd-power: fix metrics divisions
David Hunt [Wed, 10 Jul 2019 15:26:20 +0000 (16:26 +0100)]
examples/l3fwd-power: fix metrics divisions

6 issues caught by Coverity 343465
* Possible divide by zero on 3 lines
* Convert to float then back to int, losing precision on 3 lines

This patch modifies the code so that it only assigns calculated
values if the divisor is > 0, otherwise sets metrics to zero.
Also removes the un-needed round() function.

Coverity issue: 343465
Fixes: 609e79841fcf ("examples/l3fwd-power: add telemetry mode")

Signed-off-by: David Hunt <david.hunt@intel.com>
5 years agoexamples/power: add FIFO per core for JSON interface
Marcin Hajkowski [Tue, 9 Jul 2019 15:21:30 +0000 (16:21 +0100)]
examples/power: add FIFO per core for JSON interface

This patch implements a separate FIFO for each cpu core to improve the
previous functionality where anyone with access to the FIFO could affect
any core on the system. By using appropriate permissions, FIFO interfaces
can be configured to only affect the particular cores.

Because each FIFO is per core, the following fields have been removed
from the command JSON format: core_list, resource_id, name.

Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Signed-off-by: Lukasz Gosiewski <lukaszx.gosiewski@intel.com>
Signed-off-by: Marcin Hajkowski <marcinx.hajkowski@intel.com>
Tested-by: David Hunt <david.hunt@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agoflow_classify: fix out-of-bounds access
Bernard Iremonger [Tue, 9 Jul 2019 11:09:56 +0000 (12:09 +0100)]
flow_classify: fix out-of-bounds access

This patch fixes the out-of-bounds coverity issue by removing the
offending line of code at line 107 in rte_flow_classify_parse.c
which is never executed.

Coverity issue: 343454
Fixes: be41ac2a330f ("flow_classify: introduce flow classify library")
Cc: stable@dpdk.org
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
5 years agofbarray: fix destruction
Anatoly Burakov [Tue, 9 Jul 2019 14:00:27 +0000 (15:00 +0100)]
fbarray: fix destruction

Currently, when fbarray is destroyed, the fbarray structure is not
zeroed out, which leads to stale data being there and confusing
secondary process init in legacy mem mode. Fix it by always
memsetting the fbarray to zero when destroying it.

Fixes: 5b61c62cfd76 ("fbarray: add internal tailq for mapped areas")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agovfio: fix interrupts race condition
David Marchand [Wed, 10 Jul 2019 12:33:40 +0000 (14:33 +0200)]
vfio: fix interrupts race condition

Populating the eventfd in rte_intr_enable in each request to vfio
triggers a reconfiguration of the interrupt handler on the kernel side.
The problem is that rte_intr_enable is often used to re-enable masked
interrupts from drivers interrupt handlers.

This reconfiguration leaves a window during which a device could send
an interrupt and then the kernel logs this (unsolicited from the kernel
point of view) interrupt:
[158764.159833] do_IRQ: 9.34 No irq handler for vector

VFIO api makes it possible to set the fd at setup time.
Make use of this and then we only need to ask for masking/unmasking
legacy interrupts and we have nothing to do for MSI/MSIX.

"rxtx" interrupts are left untouched but are most likely subject to the
same issue.

Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1654824
Fixes: 5c782b3928b8 ("vfio: interrupts")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Shahed Shaikh <shshaikh@marvell.com>
5 years agodoc: fix PDF build in octeontx2 guide
Thomas Monjalon [Wed, 10 Jul 2019 10:01:47 +0000 (12:01 +0200)]
doc: fix PDF build in octeontx2 guide

The unicode characters to draw the debugfs tree
may fail with some Latex distributions.
These characters are replaced with some ASCII equivalents.

Fixes: 14ad4f018453 ("doc: add Marvell OCTEON TX2 platform guide")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agodoc: add OCTEON TX2 in release notes
Jerin Jacob [Tue, 9 Jul 2019 13:35:25 +0000 (19:05 +0530)]
doc: add OCTEON TX2 in release notes

Update release notes for various OCTEON TX2 drivers supported for 19.08.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
5 years agodoc: fix PDF build
Thomas Monjalon [Tue, 9 Jul 2019 13:11:17 +0000 (15:11 +0200)]
doc: fix PDF build

The command "make doc-guides-pdf" is failing because
there are more than 1500 lines in the file MAINTAINERS
which is included in the contributing guide.

We are facing the issue mentioned in this comment:
https://github.com/sphinx-doc/sphinx/issues/3099#issuecomment-256440704

Anyway the file MAINTAINERS is mentioned several times in the guide.
So the "literalinclude" is removed from the guide to fix the build
of the PDF.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agoversion: 19.08-rc1
Thomas Monjalon [Mon, 8 Jul 2019 21:04:37 +0000 (23:04 +0200)]
version: 19.08-rc1

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
5 years agonet/memif: use new ethernet address parser
Stephen Hemminger [Fri, 5 Jul 2019 17:16:26 +0000 (10:16 -0700)]
net/memif: use new ethernet address parser

Use rte_ether_unformat_addr rather than sscanf.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/vdev_netvsc: use new ethernet address parser
Stephen Hemminger [Fri, 5 Jul 2019 17:16:25 +0000 (10:16 -0700)]
net/vdev_netvsc: use new ethernet address parser

Use rte_ether_unformat_addr rather than sscanf.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Matan Azrad <matan@mellanox.com>
5 years agonet/failsafe: use new ethernet address parser
Stephen Hemminger [Fri, 5 Jul 2019 17:16:24 +0000 (10:16 -0700)]
net/failsafe: use new ethernet address parser

Use rte_ether_unformat_addr rather than sscanf.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
5 years agonet/virtio: use new ethernet address parser
Stephen Hemminger [Fri, 5 Jul 2019 17:16:23 +0000 (10:16 -0700)]
net/virtio: use new ethernet address parser

Use rte_ether_unformat_addr rather than sscanf.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agoapp/testpmd: use new ethernet address parser
Stephen Hemminger [Fri, 5 Jul 2019 17:16:22 +0000 (10:16 -0700)]
app/testpmd: use new ethernet address parser

The cmdline_parse_ether_addr does not need to be used everywhere
in testpmd. Can use rte_ether_unformat_addr instead.
As an added bonus it eliminates some code for copying.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
5 years agonet/bonding: use new ethernet address parser
Stephen Hemminger [Fri, 5 Jul 2019 17:16:21 +0000 (10:16 -0700)]
net/bonding: use new ethernet address parser

The cmdline library used to be the only way to parse a
mac address. Now there is rte_ether_unformat_addr.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agocmdline: use new ethernet address parser
Stephen Hemminger [Fri, 5 Jul 2019 17:16:20 +0000 (10:16 -0700)]
cmdline: use new ethernet address parser

Now that there is a version of ether_aton in rte_ether, it can
be used by the cmdline ethernet address parser.

Note: ether_aton_r can not be used in cmdline because
the old code would accept either bytes XX:XX:XX:XX:XX:XX
or words XXXX:XXXX:XXXX and we need to keep compatibility.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
5 years agonet: speedup ethernet address comparison with bitops
Stephen Hemminger [Fri, 5 Jul 2019 17:16:19 +0000 (10:16 -0700)]
net: speedup ethernet address comparison with bitops

Using bit operations like or and xor is faster than a loop
on all architectures. Really just explicit unrolling.

Similar cast to uint16 unaligned is already done in
other functions here.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
5 years agoethdev: use new ethernet parsing function
Stephen Hemminger [Fri, 5 Jul 2019 17:16:18 +0000 (10:16 -0700)]
ethdev: use new ethernet parsing function

Use rte_eth_unformat_addr, so that ethdev can be built and work
without the cmdline library. The dependency on cmdline was
an arrangement of convenience anyway.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet: add function to convert string to ethernet address
Stephen Hemminger [Fri, 5 Jul 2019 17:16:17 +0000 (10:16 -0700)]
net: add function to convert string to ethernet address

Make a function that can be used in place of eth_aton_r
to convert a string to rte_ether_addr. This function
allows both byte (xx:xx:xx:xx:xx:xx) and word (XXXX:XXXX:XXXX)
format and has the same lack of error handling as the original.

This also allows ethdev to no longer have a hard dependency
on the cmdline library.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
5 years agonet: deinline non-critical ethernet functions
Stephen Hemminger [Fri, 5 Jul 2019 17:16:16 +0000 (10:16 -0700)]
net: deinline non-critical ethernet functions

Formatting Ethernet address and getting a random value are
not in critical path so they should not be inlined.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Rami Rosen <ramirose@gmail.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
5 years agonet/af_xdp: correct XDP frame size
Xiaolong Ye [Sun, 7 Jul 2019 15:57:05 +0000 (23:57 +0800)]
net/af_xdp: correct XDP frame size

XSK_UMEM__DEFAULT_FRAME_SIZE has been changed to 4096 in kernel commit
123e8da1d330 (xsk: Change the default frame size to 4096 and allow
controlling it),
but we still need to keep ETH_AF_XDP_FRAME_SIZE as 2048 to fit most
dpdk apps.

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agoapp/testpmd: match GRE key and present bits
Xiaoyu Min [Fri, 5 Jul 2019 09:54:26 +0000 (17:54 +0800)]
app/testpmd: match GRE key and present bits

Support matching on GRE key and present bits (C,K,S)

Example testpmd command could be:
  testpmd>flow create 0 ingress group 1 pattern eth / ipv4 /
  gre / gre_key value is 0x12345678 / end
  actions rss queues 1 0 end / mark id 196 / end

Which will match GRE packet with k present bit set and key value is
0x12345678.

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
5 years agoethdev: add GRE key field to flow API
Xiaoyu Min [Fri, 5 Jul 2019 09:54:23 +0000 (17:54 +0800)]
ethdev: add GRE key field to flow API

Add new rte_flow_item_gre_key in order to match the optional key field.

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
5 years agonet/mlx5: support matching on ICMP/ICMP6
Xiaoyu Min [Wed, 3 Jul 2019 07:22:49 +0000 (15:22 +0800)]
net/mlx5: support matching on ICMP/ICMP6

On DV/DR flow engine, MLX5 can match on ICMP/ICMP6's code and type field
via FLEX Parser, which can be enabled by config FW using FLEX Parser
profile 2:

mlxconfig -d <mst device> -y set FLEX_PARSER_PROFILE_ENABLE=2

The testpmd commands could be:

  testpmd> flow create 0 ingress pattern eth / ipv4 /
           icmp type is 8 code is 0 / end
   actions rss queues 0 1 end / end

  testpmd> flow create 0 ingress pattern  eth / ipv6 /
           icmp6 type is 128 code is 0 / end
   actions rss queues 0 1 end / end

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: zero out UDP checksum in encapsulation
Eli Britstein [Thu, 4 Jul 2019 11:16:28 +0000 (11:16 +0000)]
net/mlx5: zero out UDP checksum in encapsulation

Mellanox NICs do not support UDP checksum hardware tx offload over IPv6.
This limitation becomes critical for UDP based tunnels like VXLAN.
Beside the UDP checksum validity is required by IPv6 there is an option
in Linux to allow accepting UDP zero sum (see udp6zerocsumrx in iproute2
package).

This patch zeroes out the UDP checksum field for encapsulation headers
in raw encap action.

Signed-off-by: Eli Britstein <elibr@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx: allow build only on Linux
Thomas Monjalon [Mon, 8 Jul 2019 07:18:04 +0000 (09:18 +0200)]
net/mlx: allow build only on Linux

Currently mlx4/mlx5 support only Linux.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Matan Azrad <matan@mellanox.com>
5 years agovhost: log virtio and vhost-user negotiated features
Maxime Coquelin [Thu, 20 Jun 2019 20:07:12 +0000 (22:07 +0200)]
vhost: log virtio and vhost-user negotiated features

Having this info logged by default when analysing bug reports
has proved to be useful.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
5 years agonet/mvneta: remove resources when port is closed
Yuri Chipchev [Wed, 3 Jul 2019 07:58:12 +0000 (10:58 +0300)]
net/mvneta: remove resources when port is closed

Since 18.11, it is suggested that driver should release all its private
resources at the dev_close routine. So all resources previously released
in remove routine are now released at the dev_close routine, and the
dev_close routine will be called in driver remove routine in order to
support removing a device without closing its ports.

Above behavior changes are supported by setting RTE_ETH_DEV_CLOSE_REMOVE
flag during probe stage.

Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
5 years agonet/fm10k: fix descriptor filling in vector Tx
Xiao Wang [Wed, 3 Jul 2019 02:53:32 +0000 (10:53 +0800)]
net/fm10k: fix descriptor filling in vector Tx

The shift left operation "pkt->vlan_tci << 16" gets vlan_tci extended
to signed type and may cause invalid descriptor. Also the same issue for
the "data_len" field. This patch fixes it by casting them to uint64_t.

Fixes: 21f13c541eb0 ("fm10k: add vector Tx")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/ipn3ke: implement statistics
Andy Pei [Mon, 1 Jul 2019 10:36:28 +0000 (18:36 +0800)]
net/ipn3ke: implement statistics

This patch implements statistics read and reset function for ipn3ke.

Signed-off-by: Andy Pei <andy.pei@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
5 years agonet/ipn3ke: add stats register and clearing
Andy Pei [Mon, 1 Jul 2019 10:36:25 +0000 (18:36 +0800)]
net/ipn3ke: add stats register and clearing

ipn3ke can work on 10G mode and 25G mode.
10G mode and 25G mode has different MAC register address for statistics.
This patch implements statistics registers for 10G mode and 25G mode.

Also implements different stats clearing per mode.

Fixes: c01c748e4ae6 ("net/ipn3ke: add new driver")
Cc: stable@dpdk.org
Signed-off-by: Andy Pei <andy.pei@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
5 years agonet/ipn3ke: delete MAC register address mask
Andy Pei [Mon, 1 Jul 2019 10:36:26 +0000 (18:36 +0800)]
net/ipn3ke: delete MAC register address mask

Original code is compatible with older device, whose mac register
address is no more than 10 bits. Now we have mac register address
longer than 10 bits, so we just delete the mask here.

Fixes: c01c748e4ae6 ("net/ipn3ke: add new driver")
Cc: stable@dpdk.org
Signed-off-by: Andy Pei <andy.pei@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
5 years agonet/i40e: fix unexpected skip FDIR setup
Qi Zhang [Wed, 3 Jul 2019 06:34:49 +0000 (14:34 +0800)]
net/i40e: fix unexpected skip FDIR setup

In i40e_flow_flush_fdir_filter, i40e_fdir_teardown is called, so
i40e_fdir_setup is required to be called before create a new fdir flow.

Bugzilla ID: 265
Fixes: 2e67a7fbf3ff ("net/i40e: config flow director automatically")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
5 years agodoc: add search engine for API
Aideen McLoughlin [Thu, 27 Jun 2019 13:58:19 +0000 (14:58 +0100)]
doc: add search engine for API

I modified the API config file to incorporate a search button into the
API documentation page.

Signed-off-by: Aideen McLoughlin <aideen.mcloughlin@intel.com>
5 years agodoc: add vdev doxygen
Aideen McLoughlin [Wed, 26 Jun 2019 15:20:55 +0000 (16:20 +0100)]
doc: add vdev doxygen

The APIs in the rte_bus_vdev.h file were not part of the API
documentation. I added this header file to the doxygen config file with
the name vdev.

Signed-off-by: Aideen McLoughlin <aideen.mcloughlin@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agodoc: fix link about bifurcated model in Linux guide
Ali Alnubani [Wed, 26 Jun 2019 15:23:06 +0000 (18:23 +0300)]
doc: fix link about bifurcated model in Linux guide

Since dpdksummit.com does not exist anymore,
the old link redirected to https://www.dpdk.org/events/.

Cc: stable@dpdk.org
Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
5 years agodoc: fix a grammar mistake in rawdev guide
Xiaolong Ye [Tue, 4 Jun 2019 08:41:00 +0000 (16:41 +0800)]
doc: fix a grammar mistake in rawdev guide

Fixes: a9bb0c44c775 ("doc: add rawdev library guide and doxygen page")
Cc: stable@dpdk.org
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
5 years agohash: load value after full key compare
Honnappa Nagarahalli [Tue, 2 Jul 2019 21:16:34 +0000 (16:16 -0500)]
hash: load value after full key compare

When a hash entry is added, there are 2 sets of stores.

1) The application writes its data to memory (whose address
is provided in rte_hash_add_key_with_hash_data API (or NULL))
2) The rte_hash library writes to its own internal data structures;
key store entry and the hash table.

The only ordering requirement between these 2 is that - store
to the application data must complete before the store to key_index.
There are no ordering requirements between the stores to
key/signature and store to application data. The synchronization
point for application data can be any point between the 'store to
application data' and 'store to the key_index'. So, 'pdata' should not
be a guard variable for the data in hash table. It should be a guard
variable only for the application data written to the memory location
pointed by 'pdata'. Hence, in the lookup functions, 'pdata' can be
loaded after full key comparison succeeds.

The synchronization point for the application data (store-release
to 'pdata' in key store) is changed to be consistent with the order
of loads in lookup function. However, this change is cosmetic and
does not affect the functionality.

Fixes: e605a1d36 ("hash: add lock-free r/w concurrency")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Tested-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
5 years agohash: use ordered loads only if signature matches
Honnappa Nagarahalli [Tue, 2 Jul 2019 21:16:33 +0000 (16:16 -0500)]
hash: use ordered loads only if signature matches

Relaxed signature comparison is done first. Further ordered loads
are done only if the signature matches. Any false positives are
caught by the full key comparison. This provides performance
benefits as load-acquire is executed only when required.

Fixes: e605a1d36 ("hash: add lock-free r/w concurrency")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Tested-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
5 years agoevent/octeontx2: add Tx adapter
Pavan Nikhilesh [Thu, 4 Jul 2019 02:19:39 +0000 (07:49 +0530)]
event/octeontx2: add Tx adapter

Add event eth Tx adapter support to octeontx2 SSO.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
5 years agoevent/octeontx2: support PTP for SSO
Harman Kalra [Thu, 4 Jul 2019 02:19:38 +0000 (07:49 +0530)]
event/octeontx2: support PTP for SSO

Add PTP support for SSO based on rx_offloads of the queue connected to
it.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
5 years agoevent/octeontx2: add Rx adapter fastpath ops
Pavan Nikhilesh [Thu, 4 Jul 2019 02:19:37 +0000 (07:49 +0530)]
event/octeontx2: add Rx adapter fastpath ops

Add support for event eth Rx adapter fastpath operations.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
5 years agoevent/octeontx2: resize SSO in-flight buffers
Pavan Nikhilesh [Thu, 4 Jul 2019 02:19:36 +0000 (07:49 +0530)]
event/octeontx2: resize SSO in-flight buffers

Resize SSO internal in-flight buffer count based on the Rx queues
mempool size connected to event queues.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
5 years agoevent/octeontx2: add Rx adapter
Pavan Nikhilesh [Thu, 4 Jul 2019 02:19:35 +0000 (07:49 +0530)]
event/octeontx2: add Rx adapter

Add event eth Rx adapter capabilities, queue add and delete functions.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
5 years agoapp/eventdev: optimize producer routine
Pavan Nikhilesh [Wed, 3 Jul 2019 05:51:35 +0000 (11:21 +0530)]
app/eventdev: optimize producer routine

When using synthetic and timer event producer reduce the calls made to
mempool library by using get_bulk() instead of get().

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agoevent/opdl: fix error sign
Dilshod Urazov [Thu, 4 Jul 2019 10:03:32 +0000 (11:03 +0100)]
event/opdl: fix error sign

Fixes: 0bf298e39286 ("event/opdl: add event port config get/set")
Fixes: 3c7f3dcfb099 ("event/opdl: add PMD main body and helper function")
Fixes: 4236ce9bf5bf ("event/opdl: add OPDL ring infrastructure library")
Cc: stable@dpdk.org
Signed-off-by: Dilshod Urazov <dilshod.urazov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>