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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Bruce Richardson [Fri, 3 Jan 2020 11:52:42 +0000 (11:52 +0000)]
eal/freebsd: update CPU macro for FreeBSD 13
In (currently unreleased) FreeBSD 13, the CPU_NAND macro has been renamed
to CPU_ANDNOT, so we need to use different DPDK-specific macros depending
on what system-defined ones are present.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Bruce Richardson [Mon, 20 Jan 2020 12:22:18 +0000 (12:22 +0000)]
app/test: remove meson dependency on file in /sys
Meson versions 0.52 and 0.53 are being overly smart and detecting the path
"/sys/devices/system/cpu/present" in the call to cat in
app/test/meson.build and then adding it as a dependency to the build
configuration. This causes issues on systems where the timestamp of that
file always returns the current time, since it means that the build.ninja
file is always out of date, and therefore needs to be rebuilt.
We can fix this by just using a simple shell script to return the coremask
appropriately for BSD and Linux, and removing that code logic from meson -
thereby hiding the use of the /sys file.
Fixes:
c70622ac6f72 ("test: detect number of cores with meson")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Eelco Chaudron [Tue, 17 Dec 2019 13:07:53 +0000 (08:07 -0500)]
meter: remove experimental flag from RFC4115 trTCM API
Moved RFC4115 APIs to non-experimental as they have been there
since 19.02. Also, these APIs are the same as the non RFC4115 APIs.
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Jörg Thalheim [Thu, 26 Dec 2019 12:54:10 +0000 (13:54 +0100)]
mbuf: improve API doc for attaching external buffer
Enhance API documentation of rte_pktmbuf_attach_extbuf() to
explain that the attached mbuf is initialized with length = 0.
Link: https://bugs.dpdk.org/show_bug.cgi?id=362
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Jerin Jacob [Tue, 14 Jan 2020 21:06:03 +0000 (02:36 +0530)]
mempool: remove memory wastage on non-x86
The existing optimize_object_size() function address the memory object
alignment constraint on x86 for better performance.
Different (micro) architecture may have different memory alignment
constraint for better performance and it not the same as the existing
optimize_object_size().
Some use, XOR(kind of CRC) scheme to enable DRAM channel distribution
based on the address and some may have a different formula.
Introducing arch_mem_object_align() function to abstract
the difference between different (micro) architectures to avoid
wasting memory for mempool object alignment for the architecture
that it is not required to do so.
Details on the amount of memory saving:
Currently, arm64 based architectures use the default (nchan=4,
nrank=1). The worst case is for an object whose size (including mempool
header) is 2 cache lines, where it is optimized to 3 cache lines (+50%).
Examples for cache lines size = 64:
orig optimized
64 -> 64 +0%
128 -> 192 +50%
192 -> 192 +0%
256 -> 320 +25%
320 -> 320 +0%
384 -> 448 +16%
...
2304 -> 2368 +2.7% (~mbuf size)
Additional details:
https://www.mail-archive.com/dev@dpdk.org/msg149157.html
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Fri, 17 Jan 2020 14:57:53 +0000 (15:57 +0100)]
doc: announce API change for mempool IOVA populate
Starting from v20.05, rte_mempool_populate_iova() will return 0.
The ABI will be preserved through symbol versioning until 20.11.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Fri, 17 Jan 2020 14:57:52 +0000 (15:57 +0100)]
mempool: fix populate with small virtual chunks
To populate a mempool with a virtual area, the mempool code calls
rte_mempool_populate_iova() for each iova-contiguous area. It happens
(rarely) that this area is too small to store one object. In this case,
rte_mempool_populate_iova() returns an error, which is forwarded by
rte_mempool_populate_virt().
This case should not throw an error in rte_mempool_populate_virt().
Instead, the area that is too small should just be ignored.
To fix this issue, change the return value of
rte_mempool_populate_iova() to 0 when no object can be populated,
so it can be ignored by the caller. As this would be an API/ABI change,
only do this modification internally for now.
Fixes:
354788b60cfd ("mempool: allow populating with unaligned virtual area")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Alvin Zhang <alvinx.zhang@intel.com>
Olivier Matz [Fri, 17 Jan 2020 09:51:49 +0000 (10:51 +0100)]
mempool: fix slow allocation of large pools
When allocating a mempool which is larger than the largest
available area, it can take a lot of time:
a- the mempool calculate the required memory size, and tries
to allocate it, it fails
b- then it tries to allocate the largest available area (this
does not request new huge pages)
c- add this zone to the mempool, this triggers the allocation
of a mem hdr, which request a new huge page
d- back to a- until mempool is populated or until there is no
more memory
This can take a lot of time to finally fail (several minutes): in step
a- it takes all available hugepages on the system, then release them
after it fails.
The problem appeared with commit
eba11e364614 ("mempool: reduce wasted
space on populate"), because smaller chunks are now allowed. Previously,
it had to be at least one page size, which is not the case in step b-.
To fix this, implement our own way to allocate the largest available
area instead of using the feature from memzone: if an allocation fails,
try to divide the size by 2 and retry. When the requested size falls
below min_chunk_size, stop and return an error.
Fixes:
eba11e364614 ("mempool: reduce wasted space on populate")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Tested-by: Ali Alnubani <alialnu@mellanox.com>
Olivier Matz [Fri, 17 Jan 2020 14:34:29 +0000 (15:34 +0100)]
mempool: fix anonymous populate
The documentation says that a negative errno is returned on error, but
in most places that's not the case.
Fix the documentation and the exceptions in code. The second one
(return from populate_virt) also fixes a memory leak.
Note that testpmd was using the function correctly.
Fixes:
aa10457eb4c2 ("mempool: make mempool populate and free api public")
Fixes:
6780f72fb82f ("mempool: populate with anonymous memory")
Fixes:
66e7ba0bad4c ("mempool: ensure mempool is initialized before populating")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Anoob Joseph [Sun, 8 Dec 2019 10:41:23 +0000 (16:11 +0530)]
ethdev: allow multiple security sessions to use flow rule
The rte_security API which enables inline protocol/crypto feature
mandates that for every security session an rte_flow is created. This
would internally translate to a rule in the hardware which would do
packet classification.
In rte_security, one SA would be one security session. And if an rte_flow
need to be created for every session, the number of SAs supported by an
inline implementation would be limited by the number of rte_flows the
PMD would be able to support.
If the fields SPI & IP addresses are allowed to be a range, then this
limitation can be overcome. Multiple flows will be able to use one rule
for SECURITY processing. In this case, the security session provided as
conf would be NULL.
Application should do an rte_flow_validate() to make sure the flow is
supported on the PMD.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Thomas Monjalon [Mon, 20 Jan 2020 10:58:54 +0000 (11:58 +0100)]
raw/octeontx2_ep: fix shared library
The version of the PMD should not be overwritten with LIBABIVER.
All internal libs must have the same version.
Moreover, specifying LIBABIVER in the driver causes a symbolic link loop:
librte_rawdev_octeontx2_ep.so.1 -> librte_rawdev_octeontx2_ep.so.1
Fixes:
56d46d13f736 ("raw/octeontx2_ep: add build infra and device probe")
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Xiaoyun Li [Wed, 25 Dec 2019 09:09:42 +0000 (17:09 +0800)]
examples/ntb: fix mempool ops setting
Mempool ops may register in different order when compiling. The default
ops index is always zero but the wanted ops is ring_mp_mc. This patch
sets best mempool ops before generating mbuf pool to fix this issue.
Fixes:
5194299d6ef5 ("examples/ntb: support more functions")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Xiaoyun Li [Wed, 4 Dec 2019 15:19:31 +0000 (23:19 +0800)]
doc: fix igb_uio parameter in ntb guide
In prerequisites of ntb guide, the correct flag when loading igb_uio
module should be `wc_activate=1`, not `wc_active=1`.
Fixes:
11b5c7daf019 ("raw/ntb: add enqueue and dequeue functions")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Xiaoyun Li [Wed, 4 Dec 2019 15:19:16 +0000 (23:19 +0800)]
raw/ntb: fix write memory barrier
All buffers and ring info should be written before tail register update.
This patch relocates the write memory barrier before updating tail register
to avoid potential issues.
Fixes:
11b5c7daf019 ("raw/ntb: add enqueue and dequeue functions")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Mahipal Challa [Mon, 13 Jan 2020 06:00:41 +0000 (11:30 +0530)]
raw/octeontx2_ep: add driver self test
Add rawdev's selftest feature in SDP VF driver, which
verifies the EP mode functionality test.
Signed-off-by: Mahipal Challa <mchalla@marvell.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Mahipal Challa [Mon, 13 Jan 2020 06:00:40 +0000 (11:30 +0530)]
raw/octeontx2_ep: add dequeue operation
Add rawdev dequeue operation for SDP VF devices.
Signed-off-by: Mahipal Challa <mchalla@marvell.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Mahipal Challa [Mon, 13 Jan 2020 06:00:39 +0000 (11:30 +0530)]
raw/octeontx2_ep: add enqueue operation
Add rawdev enqueue operation for SDP VF devices.
Signed-off-by: Mahipal Challa <mchalla@marvell.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Mahipal Challa [Mon, 13 Jan 2020 06:00:38 +0000 (11:30 +0530)]
raw/octeontx2_ep: add device uninitialization
Add rawdev close/uninitialize operation for SDP
VF devices.
Signed-off-by: Mahipal Challa <mchalla@marvell.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Mahipal Challa [Mon, 13 Jan 2020 06:00:37 +0000 (11:30 +0530)]
raw/octeontx2_ep: add device configuration
Register "dev_configure" API to configure/initialize the SDP
VF PCIe devices.
Signed-off-by: Mahipal Challa <mchalla@marvell.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Mahipal Challa [Mon, 13 Jan 2020 06:00:36 +0000 (11:30 +0530)]
raw/octeontx2_ep: add build infra and device probe
Add the OCTEON TX2 SDP EP device probe along with the
build infrastructure for Make and meson builds.
Signed-off-by: Mahipal Challa <mchalla@marvell.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Stephen Hemminger [Tue, 17 Dec 2019 00:55:03 +0000 (16:55 -0800)]
timer: add API to query ticks until the next timer
It is useful to know when the next timer will expire when
using rte_epoll_wait (or sleep when idle). This experimental
API provides a hook to query the number of ticks remaining.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Reshma Pattan [Thu, 5 Dec 2019 17:18:11 +0000 (17:18 +0000)]
latency: fix calculation for multi-thread
Make latency calculation multithread safe by
using spinlock.
Fixes:
5cd3cac9ed ("latency: added new library for latency stats")
Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Kumar Amber [Tue, 26 Nov 2019 02:39:13 +0000 (02:39 +0000)]
hash: add max key id query API
Adding new API function to query the maximum key ID
that could possibly be returned by rte_hash_add_key and
rte_hash_add_key_with_hash. When RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD
is set, the maximum key id is larger than the entry count specified
by the user.
Signed-off-by: Kumar Amber <kumar.amber@intel.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
Dharmik Thakkar [Thu, 21 Nov 2019 18:17:59 +0000 (12:17 -0600)]
hash: remove unnecessary locks in lock-free
Remove __hash_rw_reader_unlock() calls from lock free hash lookup
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
Liron Himi [Tue, 17 Dec 2019 11:52:03 +0000 (13:52 +0200)]
cfgfile: fix symbols map
rte_cfgfile_section_num_entries_by_index was missing from the map file.
meson build failed when calling this function,
due to linking a binary to cfgfile built as a shared library.
Fixes:
3d2e0448ebb5 ("cfgfile: add section number of entries by index")
Cc: stable@dpdk.org
Signed-off-by: Liron Himi <lironh@marvell.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Stephen Hemminger [Sat, 21 Dec 2019 01:02:14 +0000 (17:02 -0800)]
kni: rename variable with namespace prefix
All global variables in kernel should be prefixed by the same
to avoid any symbol conflics. Rename dflt_carrier to kni_default_carrier.
Fixes:
89397a01ce4a ("kni: set default carrier state of interface")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ali Alnubani [Wed, 11 Dec 2019 18:25:59 +0000 (18:25 +0000)]
eal/linux: fix build when VFIO is disabled
The header linux/version.h isn't included when CONFIG_RTE_EAL_VFIO
is explicitly disabled. LINUX_VERSION_CODE and KERNEL_VERSION are
therefore undefined, causing the build failure:
lib/librte_eal/linux/eal/eal.c: In function ‘rte_eal_init’:
lib/librte_eal/linux/eal/eal.c:1076:32: error: "LINUX_VERSION_CODE" is
not defined, evaluates to 0 [-Werror=undef]
Fixes:
a0dede62a537 ("eal/linux: remove KNI restriction on IOVA")
Cc: stable@dpdk.org
Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
Rafael Ávila de Espíndola [Thu, 12 Dec 2019 17:53:12 +0000 (09:53 -0800)]
mk: avoid combining -r and -export-dynamic linker options
Running ld with -r switches the linker to a very special mode where
some other linker options don't make sense.
In particular, -export-dynamic normally requires that all global
symbols be included in the dynamic symbol table, but a .o file doesn't
even have a dynamic symbol table.
When given both options it looks like the gnu linker just ignores
-export-dynamic.
Unfortunately some versions of lld (https://lld.llvm.org/) have a bug
that causes it to try to create a dynamic symbol table in the output
.o file and ends up corrupting it
(https://bugs.llvm.org/show_bug.cgi?id=43552). Current (git) version
of lld now issues an error.
This patch filters out -export-dynamic from $(LDFLAGS) when using
-r. With this patch I can build dpdk with lld.
Fixes:
3d781ca32874 ("mk: do post processing on objects that register a driver")
Cc: stable@dpdk.org
Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com>
Xueming Li [Fri, 17 Jan 2020 11:56:03 +0000 (13:56 +0200)]
doc: add flow dump to mlx5 guide
Guide of mlx5 is updated on how to dump HW flows.
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Xueming Li [Fri, 17 Jan 2020 11:56:02 +0000 (13:56 +0200)]
net/mlx5: add socket server for external tools
Add pmd unix socket server to enable external tool applications to
trigger flow dump.
Socket path:
/var/tmp/dpdk_mlx5_<pid>
Socket format:
io_raw: port_id of uint16
file: file descriptor of int
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Xueming Li [Fri, 17 Jan 2020 11:56:01 +0000 (13:56 +0200)]
app/testpmd: add flow dump command
New flow dump CLI to dump device internal representation information
of flows into screen.
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Xiaoyu Min [Fri, 17 Jan 2020 11:56:00 +0000 (13:56 +0200)]
net/mlx5: support flow dump API
Dump fdb/nic_rx/nic_tx raw flow data into specified file.
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Xiaoyu Min [Fri, 17 Jan 2020 11:55:59 +0000 (13:55 +0200)]
ethdev: add API to dump device internal flow info
Introduce an API which dump the device's internal representation
information of rte flows in hardware.
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Fang TongHao [Fri, 17 Jan 2020 02:08:04 +0000 (10:08 +0800)]
ethdev: fix secondary process memory overwrite
Avoid overwriting device flags and other information in device
data stored in shared memory when a secondary process
probes PCI device.
Fixes:
494adb7f63f2 ("ethdev: add device fields from PCI layer")
Cc: stable@dpdk.org
Signed-off-by: Fang TongHao <fangtonghao@sangfor.com.cn>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Viacheslav Ovsiienko [Fri, 17 Jan 2020 14:59:32 +0000 (14:59 +0000)]
net/mlx5: fix metadata item endianness conversion
The mlx5 datapath does not implement any endianness conversions
for the metadata being sent and received to provide the better
performance (because these conversions would be performed for
each packet). These metadata are also involved into flow processing
(there might be some flows matching on metadata patterns or setting
the new metadata values) inside the NIC. It order to configure
hardware in correct way all necessary endianness conversions are
done by rte_flow handling code (only once on flow creation). This
patch fixes one of these conversions for the little-endian hosts
in case if META/MARK items are less than 32 bits.
Fixes:
acfcd5c52f94 ("net/mlx5: update meta register matcher set")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Viacheslav Ovsiienko [Fri, 17 Jan 2020 11:16:06 +0000 (11:16 +0000)]
net/mlx5: fix matcher field usage for metadata entities
Matcher is flow table related structure providing the flow pattern
to be translated directly in hardware controlling data. This structure
includes the metadata register c0 field, that might be engaged to
support META and MARK related flow items and actions. Also, this
register might be used by kernel to specify the source vport index.
In this case (if kernel uses the field) the register c0 is split
into two 16-bit subfields - one for META/MARK items and another
to handle vport.
The actual configuration is queried by PMD from kernel in runtime
and depending on the mask returned by kernel the PMD can use upper
or lower half of register c0 field. This patch adds the missing
support for upper half. This missed support caused the non-operational
META/MARK items on some kernel configurations.
Fixes:
e554b672aa05 ("net/mlx5: support flow tag")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Viacheslav Ovsiienko [Fri, 17 Jan 2020 11:01:34 +0000 (11:01 +0000)]
net/mlx5: fix shared metadata matcher field setup
Matcher is flow table related structure providing the flow pattern
to be translated directly in hardware controlling data. Some fields
in this structure might be split (by software) between multiple items.
For example, the metadata register c0 field in the matcher might be
split into two independent subfields - the source vport index and
META item value. These subfields have no permanent assigned masks,
the actual configuration is queried from the kernel drivers in
runtime. To handle source vport value (the port of e-Switch which
is origin of the packet) the kernel might use the dedicated vport
field in the matcher or the part of register c0 field, depending
on configuration.
To setup the matcher structure fields the macro MLX5_SET is used.
MLX5_SET configures the specified 32-bit field as whole entity.
For metadata register c0 we should take into account the provided
mask in order to configure the specified subfield bits only,
otherwise setting vport overrides the META values and vice versa.
Fixes:
acfcd5c52f94 ("net/mlx5: update meta register matcher set")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Wei Hu (Xavier) [Fri, 17 Jan 2020 11:49:14 +0000 (19:49 +0800)]
ethdev: fix VLAN offloads set if no driver callback
Currently, there is a potential problem that changing the content of
dev->data->dev_conf.rxmode.offloads even when there is no
vlan_offload_set driver callback.
It is a good idea that prevent the side effect and make the API return
success if no change requested. This patch fixes the problem, the detail
information as below:
- keep possibility to do dummy set even if there is no driver callback
- do not touch Rx mode offloads in device data before checking the
driver callback availability
- ensure that Rx mode offloads are rolled back correctly if driver
callback returns error
Fixes:
81f9db8ecc2c ("ethdev: add vlan offload support")
Cc: stable@dpdk.org
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>
Signed-off-by: Min Wang (Jushui) <wangmin3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Dekel Peled [Thu, 16 Jan 2020 18:49:25 +0000 (20:49 +0200)]
app/testpmd: support GTP message type
This patch adds CLI option to enter the msg_type value for GTP
flow pattern item.
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Viacheslav Ovsiienko [Thu, 16 Jan 2020 16:19:54 +0000 (16:19 +0000)]
ethdev: fix switching domain allocation
The maximum amount of unique swutching domain is supposed
to be equal RTE_MAX_ETHPORTS. Current implementation allows
to allocate only RTE_MAX_ETHPORTS-1 domains.
The definition of RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID is
changed from 0 to UINT16_MAX, the rte_eth_dev_info_get is
updated to initialize dev_ibfo structure accordingly.
Fixes:
ce9250406323 ("ethdev: add switch domain allocator")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Girish Nandibasappa [Fri, 10 Jan 2020 13:00:11 +0000 (18:30 +0530)]
net/axgbe: support auto-negotiation for 1Gbps
Added CL37 Auto-neg support for 1Gbps interface in axgbe DPDK driver
Signed-off-by: Girish Nandibasappa <girish.nandibasappa@amd.com>
Acked-by: Ravi Kumar <ravi1.kumar@amd.com>
Girish Nandibasappa [Fri, 10 Jan 2020 12:59:37 +0000 (18:29 +0530)]
net/axgbe: support 1/2.5Gbps
Added support for 1Gbps and 2.5Gbps in axgbe dpdk driver
Signed-off-by: Girish Nandibasappa <girish.nandibasappa@amd.com>
Acked-by: Ravi Kumar <ravi1.kumar@amd.com>
Xiaolong Ye [Fri, 17 Jan 2020 06:55:42 +0000 (14:55 +0800)]
doc: add release notes for Intel PMDs
Add release notes for Intel ice/iavf/i40e PMDs.
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tao Zhu [Fri, 17 Jan 2020 14:35:56 +0000 (14:35 +0000)]
net/i40e: add PF MDD event handler
Add warning and counter to handle the malicious driver detection (MDD)
event.
When the hardware determines that a malicious driver on VF, this VF will
become unworkable, the PF records and gives a warning message.
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Lijun Ou [Thu, 16 Jan 2020 09:27:05 +0000 (17:27 +0800)]
net/hns3: remove unnecessary branch
Because the rte layer of DPDK framework has already processed the case
when the idx is zero before calling the '.mac_addr_remove' ops function,
the input parameter named idx can not be zero in the '.mac_addr_remove'
function. This patch removes unnecessary branch process to check whether
input parameter named idx is zero in the '.mac_addr_remove' ops
implementation function named hns3_remove_mac_addr.
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Lijun Ou [Thu, 16 Jan 2020 09:27:04 +0000 (17:27 +0800)]
net/hns3: remove unnecessary input parameter check
Since the input parameter named dev has been guaranteed not to be NULL
in the rte layer of DPDK framework, it doesn't need to check dev whether
is null in the 'filter_ctrl' ops implementation function named
hns3_dev_filter_ctrl.
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Chengwen Feng [Thu, 16 Jan 2020 09:27:03 +0000 (17:27 +0800)]
net/hns3: replace memory barrier with data dependency order
This patch optimizes the Rx performance by using data dependency
ordering to instead of memory barrier which is rte_cio_rmb in the
'.rx_pkt_burst' ops implementation function named hns3_recv_pkts.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Apeksha Gupta [Thu, 16 Jan 2020 07:56:38 +0000 (13:26 +0530)]
net/dpaa: fix Rx offload flags on jumbo MTU set
The JUMBO frame handling in dpaa_dev_mtu_set api was not correct.
When frame_size is greater than RTE_ETHER_MAX_LEN, the
intention is to add JUMBO flag in rx offload while it was resetting
all other flags other than JUMBO as AND operator was used instead of OR.
Fixes:
0ebce6129bc6 ("net/dpaa2: support new ethdev offload APIs")
Cc: stable@dpdk.org
Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>