Satha Rao [Wed, 22 Sep 2021 06:11:44 +0000 (02:11 -0400)]
common/cnxk: handle packet mode shaper limits
Add new macros to reflect HW shaper PPS limits. New API to validate
input rates for packet mode. Increase adjust value to support lesser
PPS (<61).
Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Nithin Dabilpuram [Wed, 22 Sep 2021 06:11:43 +0000 (02:11 -0400)]
common/cnxk: increase sched weight and shaper burst limit
Increase sched weight and shaper burst limit for cn10k.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Satha Rao [Wed, 22 Sep 2021 06:11:42 +0000 (02:11 -0400)]
common/cnxk: support SMQ flush
Each NIX interface had one or more SMQs connected to SQs to send
packets. When flush enabled on SMQ, hardware will push all packets
from SMQ to physical link. This API will enable flush on all SMQs
of an interface.
Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Satha Rao [Wed, 22 Sep 2021 06:11:41 +0000 (02:11 -0400)]
common/cnxk: set appropriate max frame size for SDP and LBK
For SDP interface all platforms supports up to 65535 frame size.
Updated API with new check for SDP interface.
Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Stephen Hemminger [Mon, 4 Oct 2021 19:33:01 +0000 (12:33 -0700)]
mbuf: promote Tx offload helper to stable
This function should be made stable now.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Stephen Hemminger [Mon, 4 Oct 2021 19:33:00 +0000 (12:33 -0700)]
mbuf: promote check helper to stable
This one has been in for required time period.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Stephen Hemminger [Mon, 4 Oct 2021 19:32:59 +0000 (12:32 -0700)]
mbuf: promote dynamic fields to stable
These functions to register dynamic fields were added in 19.11
and should be promoted to stable.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Stephen Hemminger [Mon, 4 Oct 2021 19:32:58 +0000 (12:32 -0700)]
mbuf: promote more helpers to stable
These two functions were added in 19.11 as experimental.
Time to promote the to stable status.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
David Marchand [Sat, 2 Oct 2021 14:16:14 +0000 (16:16 +0200)]
mbuf: promote some helpers to stable
Those accessors have been introduced more than two years ago
(rte_mbuf_to_priv in v18.08, rte_mbuf_*_addr* in v19.02).
Time to mark them stable.
rte_mbuf_to_baddr() could be removed, but since we lack a deprecation
notice, keep it as a simple wrapper.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Sean Morrissey [Mon, 4 Oct 2021 09:22:18 +0000 (09:22 +0000)]
ring: promote new sync modes and peek to stable
These methods were introduced in 20.05.
There has been no changes in their public API since then.
They seem mature enough to remove the experimental tag.
Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Bruce Richardson [Fri, 17 Sep 2021 15:09:17 +0000 (16:09 +0100)]
test/mem: fix memory autotests on FreeBSD
The memory autotests were failing on FreeBSD, due to an incorrect errno
variable being checked for ENOTSUP. The test checked "errno" while the
DPDK API sets "rte_errno". Changing to check the right variable makes
the test behave properly.
Fixes:
c3e35a0966b8 ("test/mem: check segment fd API")
Reported-by: Brandon Lo <blo@iol.unh.edu>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Bruce Richardson [Mon, 13 Sep 2021 14:08:48 +0000 (15:08 +0100)]
eal/freebsd: lock memory device to prevent conflicts
Only a single DPDK process on the system can be using the /dev/contigmem
mappings at a time, but this was never explicitly enforced, e.g. when
using --in-memory flag on two processes. To prevent possible conflict
issues, we lock the dev node when it's in use, preventing other DPDK
processes from starting up and causing problems for us.
Fixes:
764bf26873b9 ("add FreeBSD support")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Vladimir Medvedkin [Mon, 6 Sep 2021 16:01:15 +0000 (17:01 +0100)]
fib: promote API to stable
The fib and fib6 API's have been in since 19.11 and
should be marked as stable.
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Conor Walsh <conor.walsh@intel.com>
Stephen Hemminger [Tue, 31 Aug 2021 21:49:38 +0000 (14:49 -0700)]
rib: promote API to stable
The rib and rib6 API's have been in since 19.11 and
should be marked as stable.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Stephen Hemminger [Tue, 31 Aug 2021 20:07:18 +0000 (13:07 -0700)]
net: promote string to ethernet to stable
This function has been in since 19.11.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Xiao Wang [Wed, 8 Sep 2021 10:59:15 +0000 (18:59 +0800)]
net: promote make rarp packet function to stable
rte_net_make_rarp_packet was introduced in version v18.02, there was no
change in this public API since then, and it's still being used by vhost
lib and virtio driver, so promote it as stable ABI.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Ivan Malov [Tue, 31 Aug 2021 18:14:35 +0000 (21:14 +0300)]
log: promote some function to stable
This one might be quite mature to be attested as stable.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Mattias Rönnblom [Wed, 1 Sep 2021 07:29:12 +0000 (09:29 +0200)]
eal: promote random generator with upper bound to stable
Remove experimental tag from rte_rand_max().
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Bruce Richardson [Mon, 13 Sep 2021 10:51:37 +0000 (11:51 +0100)]
usertools: silence prompts for telemetry input pipe
When the input to the script is coming from a device which is not a TTY
then we become less verbose and skip the prompts and helpful messages
about what is happening.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Bruce Richardson [Mon, 13 Sep 2021 10:51:36 +0000 (11:51 +0100)]
usertools: fix handling EOF for telemetry input pipe
To allow the script to take queries from input pipes e.g. "echo
/ethdev/stats,0 | dpdk-telemetry.py", we need to handle the case of EOF
correctly without crashing with an exception. Do this by using a
try-except block around the input handling.
Fixes:
6a2967c112a3 ("usertools: add new telemetry script")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Bruce Richardson [Mon, 13 Sep 2021 10:51:35 +0000 (11:51 +0100)]
usertools: fix flake8 compliance of telemetry script
Fix style errors reported by flake8.
Fixes:
6a2967c112a3 ("usertools: add new telemetry script")
Fixes:
2d9a697e41ca ("usertools: add file-prefix option for telemetry")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Bruce Richardson [Wed, 15 Sep 2021 16:55:35 +0000 (17:55 +0100)]
telemetry: promote API to stable
The telemetry APIs have been present and unchanged for >1 year now,
so remove experimental tag from them.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Jie Zhou [Fri, 1 Oct 2021 00:50:12 +0000 (17:50 -0700)]
mempool/stack: build on Windows
Enable build of mempool/stack on Windows.
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Pablo de Lara [Tue, 28 Sep 2021 13:58:39 +0000 (13:58 +0000)]
efd: allow more CPU sockets in table creation
rte_efd_create() function was using uint8_t for a socket bitmask,
for one of its parameters.
This limits the maximum of NUMA sockets to be 8.
Changing to uint64_t increases it to 64, which should be
more future-proof.
Coverity issue: 366390
Fixes:
56b6ef874f8 ("efd: new Elastic Flow Distributor library")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
Tested-by: David Christensen <drc@linux.vnet.ibm.com>
Kevin Traynor [Fri, 9 Jul 2021 15:19:38 +0000 (16:19 +0100)]
bitrate: promote free function to stable
rte_stats_bitrate_free() has been in DPDK since 20.11.
Its signature is very basic as it just frees an opaque
data struct allocated in rte_stats_bitrate_create()
and returns void.
It's unlikely that such a basic signature would need to change
so might as well promote it to stable for the next major ABI.
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Kevin Traynor [Fri, 9 Jul 2021 15:19:37 +0000 (16:19 +0100)]
bitrate: fix calculation to match API description
rte_stats_bitrate_calc() API states it returns 'Negative value on error'.
However, the implementation will return the error code from
rte_eth_stats_get() which may be non-zero on error.
Change the implementation of rte_stats_bitrate_calc() to match
the API description by always returning a negative value on error.
Fixes:
2ad7ba9a6567 ("bitrate: add bitrate statistics library")
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Kevin Traynor [Fri, 9 Jul 2021 15:19:36 +0000 (16:19 +0100)]
bitrate: fix registration to match API description
rte_stats_bitrate_reg() API states it returns 'Zero on success'.
However, the implementation directly returns the return of
rte_metrics_reg_names() which may be zero or positive on success,
with a positive value also indicating the index.
The user of rte_stats_bitrate_reg() should not care about the
index as it is stored in the opaque rte_stats_bitrates struct.
Change the implementation of rte_stats_bitrate_reg() to match
the API description by always returning zero on success.
Fixes:
2ad7ba9a6567 ("bitrate: add bitrate statistics library")
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Stephen Hemminger [Thu, 19 Aug 2021 02:38:19 +0000 (19:38 -0700)]
telemetry: detach threads
There are a number telemetry threads which are created and
there is nothing that does pthread_join() to wait for them.
Mark these threads as detached, so that the pthread library
can cleanup state when the thread exits.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ciara Power <ciara.power@intel.com>
Cian Ferriter [Mon, 23 Aug 2021 17:28:44 +0000 (18:28 +0100)]
ring: fix Doxygen comment of internal function
Change "enqueue" to "dequeue" because the __rte_ring_move_cons_head()
function is updating the consumer head for dequeue.
Fixes:
0dfc98c507b1 ("ring: separate out head index manipulation")
Cc: stable@dpdk.org
Signed-off-by: Cian Ferriter <cian.ferriter@intel.com>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
William Tu [Tue, 24 Aug 2021 16:21:03 +0000 (16:21 +0000)]
eal: remove sys/queue.h from public headers
Currently there are some public headers that include 'sys/queue.h', which
is not POSIX, but usually provided by the Linux/BSD system library.
(Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008. Present on the BSDs.)
The file is missing on Windows. During the Windows build, DPDK uses a
bundled copy, so building a DPDK library works fine. But when OVS or other
applications use DPDK as a library, because some DPDK public headers
include 'sys/queue.h', on Windows, it triggers an error due to no such
file.
One solution is to install the 'lib/eal/windows/include/sys/queue.h' into
Windows environment, such as [1]. However, this means DPDK exports the
functionalities of 'sys/queue.h' into the environment, which might cause
symbols, macros, headers clashing with other applications.
The patch fixes it by removing the "#include <sys/queue.h>" from
DPDK public headers, so programs including DPDK headers don't depend
on the system to provide 'sys/queue.h'. When these public headers use
macros such as TAILQ_xxx, we replace it by the ones with RTE_ prefix.
For Windows, we copy the definitions from <sys/queue.h> to rte_os.h
in Windows EAL. Note that these RTE_ macros are compatible with
<sys/queue.h>, both at the level of API (to use with <sys/queue.h>
macros in C files) and ABI (to avoid breaking it).
Additionally, the TAILQ_FOREACH_SAFE is not part of <sys/queue.h>,
the patch replaces it with RTE_TAILQ_FOREACH_SAFE.
[1] http://mails.dpdk.org/archives/dev/2021-August/216304.html
Suggested-by: Nick Connolly <nick.connolly@mayadata.io>
Suggested-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Signed-off-by: William Tu <u9012063@gmail.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
Dmitry Kozlyuk [Sat, 28 Aug 2021 22:13:45 +0000 (01:13 +0300)]
lib: remove sched.h from public headers
Public headers including POSIX-specific <sched.h> were unusable
on Windows. These includes were superfluous, remove them.
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: William Tu <u9012063@gmail.com>
Dmitry Kozlyuk [Sun, 29 Aug 2021 02:16:02 +0000 (05:16 +0300)]
eal/windows: fix export list
* Version and randomness API were not added to .def file by mistake,
which is why they were later excluded from the export list.
* Device API stubs were added to EAL but not exported.
Fixes:
edd66d57d55c ("eal/windows: add random function")
Fixes:
3d2fcb0e0aec ("eal/windows: add device event stubs")
Fixes:
5b637a848195 ("eal: fix querying DPDK version at runtime")
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: William Tu <u9012063@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
Dmitry Kozlyuk [Sun, 29 Aug 2021 02:16:01 +0000 (05:16 +0300)]
eal: remove Windows-specific list of common files
The majority of common EAL sources that are built for all platforms were
listed separately for Windows and for other OS. It seems that developers
adding modules to EAL perceived this as if Windows supported
only a limited subset of modules and only added new ones into another.
Factor the truly common modules into a shared list,
then extend it with modules supported by different platforms.
When the two lists were created, UUID API implementation was removed
from Windows build (apparently by mistake), then excluded from the
export list for no reason other than not being built. Restore it.
Fixes:
df3ff6be2b33 ("eal: simplify meson build of common directory")
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: William Tu <u9012063@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
William Tu [Thu, 5 Aug 2021 17:48:19 +0000 (17:48 +0000)]
eal/windows: export version function
When OVS inits, it calls rte_version to get the DPDK's version.
The patch fixes the error below by exposing rte_version symbol.
libopenvswitch.a(dpdk.c.obj) : error LNK2019: unresolved external symbol
rte_version referenced in function dpdk_init
Fixes:
5b637a848195 ("eal: fix querying DPDK version at runtime")
Cc: stable@dpdk.org
Signed-off-by: William Tu <u9012063@gmail.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Pallavi Kadam [Thu, 9 Sep 2021 23:23:19 +0000 (16:23 -0700)]
net/iavf: build on Windows
- Enable IAVF PMD build on Windows
- Replace x86intrin.h with rte_vect.h to avoid __m_prefetchw conflicting
types
- Fix for pointer and integer sign warnings using Clang compiler on
Windows
- Add extra cflags '-fno-asynchronous-unwind-tables'
to avoid MinGW build error:
Error: invalid register for .seh_savexmm
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: Shivanshu Shukla <shivanshu.shukla@intel.com>
Pallavi Kadam [Thu, 9 Sep 2021 23:23:20 +0000 (16:23 -0700)]
net: enable random address on Windows
IAVF PMD needs to generate a random MAC address if it is not configured
by host.
'random' is now supported on Windows.
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: Shivanshu Shukla <shivanshu.shukla@intel.com>
Pallavi Kadam [Mon, 27 Sep 2021 18:43:22 +0000 (11:43 -0700)]
bus/pci: fix unknown NUMA node value on Windows
Based on the rte_eth_dev_socket_id() documentation,
set the default numa_node to -1. When the API is unsuccessful,
set numa_node to 0.
This change more correctly resembles the Linux code.
Fixes:
bf7cf1f947bd ("bus/pci: fix unknown NUMA node value on Windows")
Cc: stable@dpdk.org
Reported-by: Vipin Varghese <vipin.varghese@intel.com>
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
Olivier Matz [Wed, 29 Sep 2021 21:39:43 +0000 (23:39 +0200)]
kvargs: fix comments style
A '*' is missing at 2 places, add them.
Fixes:
e1a00536c8ed ("kvargs: add a new library to parse key/value arguments")
Fixes:
3ab385063cb9 ("kvargs: add get by key")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Olivier Matz [Wed, 29 Sep 2021 21:39:41 +0000 (23:39 +0200)]
kvargs: add function to get from key and value
A quite common scenario with kvargs is to lookup for a <key>=<value> in
a kvlist. For instance, check if name=foo is present in
name=toto,name=foo,name=bar. This is currently done in drivers/bus with
rte_kvargs_process() + the rte_kvargs_strcmp() handler.
This approach is not straightforward, and can be replaced by this new
function.
rte_kvargs_strcmp() is then removed.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Olivier Matz [Wed, 29 Sep 2021 21:39:40 +0000 (23:39 +0200)]
kvargs: promote get from key as stable
The function rte_kvargs_get() is used by eal and pci bus driver since
its introduction in commit
3ab385063cb9 ("kvargs: add get by key") and
commit
d2a66ad79480 ("bus: add device arguments name parsing"), in
dpdk 21.05.
Let's promote it as stable.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Olivier Matz [Wed, 29 Sep 2021 21:39:39 +0000 (23:39 +0200)]
kvargs: promote delimited parsing as stable
This function is used by EAL to parse key/value strings separated with
specified delimiters.
It was introduced in 2018 by commit
5d6af85ab00c ("kvargs: introduce a
more flexible parsing function"), and can be promoted as stable.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Tudor Cornea [Thu, 23 Sep 2021 18:13:24 +0000 (21:13 +0300)]
net/af_packet: remove timestamp from packet status
We should eliminate the timestamp status from the packet
status. This should only matter if timestamping is enabled
on the socket, but we might hit a kernel bug, which is fixed
in newer releases.
For interfaces of type 'veth', the sent skb is forwarded
to the peer and back into the network stack which timestamps
it on the RX path if timestamping is enabled globally
(which happens if any socket enables timestamping).
When the skb is destructed, tpacket_destruct_skb() is called
and it calls __packet_set_timestamp() which doesn't check
the flags on the socket and returns the timestamp if it is
set in the skb (and for veth it is, as mentioned above).
See the following kernel commit for reference [1]:
net: packetmmap: fix only tx timestamp on request
The packetmmap tx ring should only return timestamps if requested
via setsockopt PACKET_TIMESTAMP, as documented. This allows
compatibility with non-timestamp aware user-space code which checks
tp_status == TP_STATUS_AVAILABLE; not expecting additional timestamp
flags to be set in tp_status.
[1] https://www.spinics.net/lists/kernel/msg3959391.html
Signed-off-by: Mihai Pogonaru <pogonarumihai@gmail.com>
Signed-off-by: Tudor Cornea <tudor.cornea@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Raslan Darawsheh [Mon, 23 Aug 2021 10:55:39 +0000 (13:55 +0300)]
ethdev: use extension header for GTP PSC item
This updates the gtp_psc flow item to use the net header
definition of the gtp_psc to be based on RFC 38415-g30
Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Raslan Darawsheh [Mon, 23 Aug 2021 10:55:38 +0000 (13:55 +0300)]
net: add extension header for GTP PSC
Define new rte header for GTP PDU session container
based on RFC 38415-g30
Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Junxiao Shi [Thu, 9 Sep 2021 14:42:06 +0000 (14:42 +0000)]
net/memif: fix chained mbuf determination
Previously, TX functions call rte_pktmbuf_is_contiguous to determine
whether an mbuf is chained. However, rte_pktmbuf_is_contiguous is
designed to work on the first mbuf of a packet only. In case a packet
contains three or more segment mbufs in a chain, it may cause truncated
packets or rte_mbuf_sanity_check panics.
This patch updates TX functions to determine chained mbufs using
mbuf_head->nb_segs field, which works in all cases. Moreover, it
maintains that the second cacheline is only accessed when chained mbuf
is actually present.
Fixes:
09c7e63a71f9 ("net/memif: introduce memory interface PMD")
Fixes:
43b815d88188 ("net/memif: support zero-copy slave")
Cc: stable@dpdk.org
Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
Thomas Monjalon [Mon, 30 Aug 2021 10:42:32 +0000 (12:42 +0200)]
ethdev: group constant definitions in Doxygen
A lot of flags are parts of a group but are documented alone.
The Doxygen syntax @{ and @} for grouping is used
to make flags appear together and have a common description.
Some Rx/Tx offload flags and RSS definitions are not grouped
because they need to be all properly documented first.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Dmitry Kozlyuk [Wed, 1 Sep 2021 08:07:52 +0000 (11:07 +0300)]
net/mlx5: fix shared RSS destruction
Shared RSS resources were released before checking that the shared RSS
has no more references. If it had, the destruction was aborted, leaving
the shared RSS in an invalid state where it could no longer be used.
Move reference counter check before resource release.
Fixes:
d2046c09aa64 ("net/mlx5: support shared action for RSS")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Dmitry Kozlyuk [Wed, 1 Sep 2021 08:19:58 +0000 (11:19 +0300)]
net/mlx5: fix flow indirect action reference counting
When an indirect action is used in a flow rule with a pattern that
causes RSS expansion, each device flow generated by the expansion
incremented the reference counter of the action. When such a flow was
destroyed, its action reference counter had been decremented only once.
The action remained marked as being used and could not be destroyed.
COUNT, AGE, and CONNTRACK indirect actions have been affected
(for AGE the error was not immediately observable).
Increment action counter only once for the original flow rule.
Fixes:
81073e1f8ce1 ("net/mlx5: support shared age action")
Fixes:
2d084f69aa26 ("net/mlx5: add translation of connection tracking action")
Fixes:
f3191849f2c2 ("net/mlx5: support flow count action handle")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Dmitry Kozlyuk [Wed, 1 Sep 2021 08:19:57 +0000 (11:19 +0300)]
net/mlx5: report error on indirect CT action destroy
When an indirect CT action of mlx5 PMD could not be destroyed,
rte_action_handle_destroy() was returning (-1), but the error
structure was not filled. This lead to a segfault in testpmd
on an attempt to print it. Fill the details for each possible
cause of this error.
Fixes:
c5a49265fc23 ("net/mlx5: add ASO connection tracking destroy")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Michael Baum [Sun, 12 Sep 2021 10:36:28 +0000 (13:36 +0300)]
common/mlx5: fix resource cleaning in device removal
The common remove function call in a loop to remove function for each
driver which have been registered.
If all removes are succeeded, it return 0 without to free the device
which allocated in probe function. Otherwise, it free the device.
In fact we expect exactly the opposite behavior. If all removes are
failed, it returns error without freeing the device which allocated in
probe function. Otherwise, it free the device and return 0.
Replace it with the correct behavior.
Fixes:
8a41f4deccc3 ("common/mlx5: introduce layer for multiple class drivers")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Michael Baum [Sun, 12 Sep 2021 10:36:27 +0000 (13:36 +0300)]
common/mlx5: fix device list operations concurrency
The mlx5 common driver has a global list of mlx5 devices which are
probed.
In probe function it creates one and insert it to the list. Similarly it
removes the device in remove function.
These operations are not safe as there can be such operations in
parallel, by different threads.
Add global lock for the list and use it to insert or remove.
Fixes:
8a41f4deccc3 ("common/mlx5: introduce layer for multiple class drivers")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Michael Baum [Sun, 12 Sep 2021 10:36:26 +0000 (13:36 +0300)]
common/mlx5: fix class combination validation
The common probe function gets as a user argument the classes it should
create, and checks whether the combination is valid.
In case the device already exists, it checks the integration of the
above with the classes that the device has.
However, the function does not check the combination when the device
does not exist and it has to create it.
Check if the combination is valid for all cases.
Fixes:
ad435d320473 ("common/mlx5: add bus-agnostic layer")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Michael Baum [Sun, 12 Sep 2021 10:36:25 +0000 (13:36 +0300)]
net/mlx5: fix duplicate pattern option default
In order to allow/disallow configuring rules with identical patterns,
the new device argument 'allow_duplicate_pattern' was introduced.
The default is to allow, and it is initialized to 1 in PCI probe
function.
However, on auxiliary bus probing (for Sub-Function) it is not
initialized at all, so it's actually initialized to 0.
Move the initialization to default config function which is called from
both.
Fixes:
919488fbfa71 ("net/mlx5: support Sub-Function")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Michael Baum [Sun, 12 Sep 2021 10:36:24 +0000 (13:36 +0300)]
net/mlx5: fix PF leak on PCI probing failure
During PCI probe, the internal probe function is called per PF.
If one of them fails, it was missing a proper destroy for the previously
probed PFs.
This fixes the behavior by destroying all previously probed PFs.
Fixes:
08c2772fc747 ("net/mlx5: support list of representor PF")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Michael Baum [Sun, 12 Sep 2021 10:36:23 +0000 (13:36 +0300)]
net/mlx5: fix memory leak on context allocation failure
In shared device context creation, there is a missing validation when
one of the btree memory allocation fails that will cause a memory leak.
This adds a proper check to clean resources in case of failure.
Fixes:
632f0f19056f ("net/mlx5: manage shared counters in three-level table")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Kishore Padmanabha [Mon, 20 Sep 2021 07:42:14 +0000 (13:12 +0530)]
net/bnxt: add enhancements to TruFlow ULP
1. Added support to specify l4 port masks in the template. Also enabled
source mac in the wild card key for ingress flows.
2. Added support to enable offload for ipv6 traffic within the vxlan
tunnel connection.
3. The flow counters is reduced from 7168 to 6912 for Whitney.
The stats operation is updated to reflect counts for packets
at egress from CFA instead of ingress to CFA
4. The miss path for the l2 context table is updated with correct
parif and default action handler to handle the miss path for
egress flows.
5. This support enables allocation of encapsulation, modification and
action records dynamically based on a given flow actions.
6. Reduce the l2context resource requests during open_session. Move the
SMAC from the L2Context to the EM/WM
7. Remap the parif in the bd action in order to eliminate incorrect
replication of broadcast packets. The layer 4 source port mask
was incorrectly updated in the outer layer 4 source port mask
instead of inner layer 4. Add the l3 proto to egress rules, switch
to using computed fields for l4 ports, add internal smac to f1/f2
flows, add l3 proto to ingress ipv6 flows
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Farah Smith [Mon, 20 Sep 2021 07:42:13 +0000 (13:12 +0530)]
net/bnxt: add SRAM manager shared session
Fix shared session support issues due to SRAM manager
additions. Shared session does not support slices within
RM blocks. Calculate resources required without slices
and determine base addresses using old methods for the
shared session.
Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Randy Schacher [Mon, 20 Sep 2021 07:42:12 +0000 (13:12 +0530)]
net/bnxt: allocate space dynamically for EM defrag
The dynamic pool allocation defrag function currently uses stack
allocation. To improve use of stack space, dynamically allocate
and deallocate memory for use to defragment the dynamic pool of
EM resources.
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Farah Smith [Mon, 20 Sep 2021 07:42:11 +0000 (13:12 +0530)]
net/bnxt: decrease log level of a debug message
Adjust info message to debug level to prevent excessive
logging.
Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Mon, 20 Sep 2021 07:42:10 +0000 (13:12 +0530)]
net/bnxt: add flow templates for Thor
1. Add support for egress flows with port and count action for
Thor platform.
2. Added templates to support VXLAN encapsulation feature for Thor.
3. Added support for VXLAN decap and VLAN pop actions along with
the ingress flow.
4. Added templates to enable VXLAN decap support for f1 and f2 flows.
5. Added templates Thor VF Rep support
6. Added Thor ingress mod table actions for NAT, NAPT, and TTL.
7. Added mirror/sample table support
8. Added supported for IPv6 flows for Thor.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Mon, 20 Sep 2021 07:42:09 +0000 (13:12 +0530)]
net/bnxt: add wildcard TCAM byte order for Thor
The wild card TCAM for Thor platform is different from the profile TCAM
byte order.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Shuanglin Wang <shuanglin.wang@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Mon, 20 Sep 2021 07:42:08 +0000 (13:12 +0530)]
net/bnxt: support dynamic encap action
The encapsulation record processing is enhanced to handle data
dynamically. Different combinations of VXLAN encapsulation using
no VLAN or single or double VLAN can be supported and also supports
both IPv4 and IPv6 versions.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Mon, 20 Sep 2021 07:42:07 +0000 (13:12 +0530)]
net/bnxt: support tunnel offload
Add support for tunnel offload APIs. Specifically the following
are supported.
tunnel_decap_set, tunnel_match, tunnel_action_decap_release,
tunnel_item_release.
This provides support for VXLAN decap action where two flows
can indicate tunnel offload rule. The first flow indicates the
tunnel properties and second flow indicates the inner packet
structure. The templates are updated to support this
feature.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Mon, 20 Sep 2021 07:42:06 +0000 (13:12 +0530)]
net/bnxt: support flow template for Thor
Template adds non-VFR based support for testpmd with:
matches to include
- DMAC, SIP, DIP, Proto, Sport, Dport
- SIP, DIP, Proto, Sport, Dport
actions:
- count, drop
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Farah Smith [Mon, 20 Sep 2021 07:42:05 +0000 (13:12 +0530)]
net/bnxt: add SRAM manager model
The SRAM manager supports allocation and free of variable sized
records within SRAM memory. These record sizes are 8, 16, 32, or
64B. The SRAM manager algorithm will not fragment memory during
run time. Previous implementation only included fixed size 64B
records regardless of the size required.
Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Jay Ding [Mon, 20 Sep 2021 07:42:04 +0000 (13:12 +0530)]
net/bnxt: support flow meter drop counter
This patch adds flow meter drop counter support for Thor.
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Peter Spreadborough [Mon, 20 Sep 2021 07:42:03 +0000 (13:12 +0530)]
net/bnxt: enable dynamic pool allocator
Enable dynamic entry allocator for Exact Match SRAM entries.
Deprecate static entry allocator code.
Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Farah Smith [Mon, 20 Sep 2021 07:42:02 +0000 (13:12 +0530)]
net/bnxt: update TruFlow core index table
Update the TruFlow core index table and
remove unused shadow table functionality.
Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ashwin Sekhar T K [Fri, 17 Sep 2021 11:23:09 +0000 (16:53 +0530)]
common/cnxk: align NPA stack to ROC cache line size
Network Pool accelerator (NPA) is part of ROC (Rest Of Chip). So
NPA structures should be aligned to ROC Cache line size and not
CPU cache line size.
Non alignment of NPA stack to ROC cache line will result in
undefined runtime NPA behaviour.
Fixes:
f765f5611240 ("common/cnxk: add NPA pool HW operations")
Cc: stable@dpdk.org
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Harman Kalra [Mon, 20 Sep 2021 14:49:25 +0000 (20:19 +0530)]
net/octeontx: fix access to indirect buffers
Issue has been observed where fields of indirect buffers are
accessed after being set free by the diver. Also fixing freeing
of direct buffers to correct aura.
Fixes:
5cbe184802aa ("net/octeontx: support fast mbuf free")
Cc: stable@dpdk.org
Signed-off-by: David George <david.george@sophos.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Ashwin Sekhar T K [Fri, 17 Sep 2021 09:34:37 +0000 (15:04 +0530)]
common/cnxk: avoid using stashing option of stype
Avoid using stashing option of stype in NPA in cn10k-a0 stepping.
This is a workaround for a HW Errata due to which NPA stashing operations
will never result in writing the data into L2 cache. But instead, it will
be written into LLC.
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Ashwin Sekhar T K [Fri, 17 Sep 2021 09:34:36 +0000 (15:04 +0530)]
common/cnxk: update ROC models
Made following updates to ROC (Rest of Chip) models.
- Use consistent upper/lower case in macros defining different
ROC models.
- Add API to detect cn96 Cx stepping.
- Make all current cn10k models as A0 stepping.
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Yuying Zhang [Sat, 18 Sep 2021 06:49:30 +0000 (06:49 +0000)]
net/ice: fix flow priority support in non-pipeline mode
Lower values denote higher priority with 0 as the maximum.
The usage of priority in non-pipeline mode is wrong.
This patch fixed this issue in switch filter and added input
validation of priority in FDIR, RSS and ACL filter which
only support one priority level.
Fixes:
2321e34c23b3 ("net/ice: support flow priority for DCF switch filter")
Cc: stable@dpdk.org
Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Robin Zhang [Wed, 25 Aug 2021 08:34:35 +0000 (08:34 +0000)]
net/iavf: enable interrupt polling
For VF hosted by Intel 700 series NICs, internal Rx interrupt and adminq
interrupt share the same source, that cause a lot CPU cycles be wasted on
interrupt handler on Rx path.
The patch disable PCI interrupt and remove the interrupt handler, replace
it with a low frequency(50ms) interrupt polling daemon which is
implemented by registering an alarm callback periodically.
The virtual channel capability bit VIRTCHNL_VF_OFFLOAD_WB_ON_ITR can be
used to negotiate if iavf PMD needs to enable background alarm or not, so
ideally this change will not impact the case hosted by Intel 800 series
NICS.
This patch implements the same logic with an early i40e commit:
commit
864a800d706d ("net/i40e: remove VF interrupt handler")
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Wenjun Wu [Thu, 16 Sep 2021 05:04:27 +0000 (13:04 +0800)]
net/iavf: remove support for IP fragment default RSS
To support independent IP fragment default RSS, considerable
additional work need to be done, so we decide to remove this
feature to avoid some unexpected behavior we have observed,
meanwhile user always can use rte_flow to create RSS for IP
fragment packet explicitly.
Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Wenjun Wu [Thu, 16 Sep 2021 05:03:51 +0000 (13:03 +0800)]
net/ice: remove support for IP fragment default RSS
To support independent IP fragment default RSS, considerable
additional work need to be done, so we decide to remove this
feature to avoid some unexpected behavior we have observed,
meanwhile user always can use rte_flow to create RSS for IP
fragment packet explicitly.
Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Lingyu Liu [Mon, 13 Sep 2021 15:34:02 +0000 (15:34 +0000)]
net/iavf: fix QFI fields of GTPU UL/DL for flow director
Fix QFI (QoS Flow Identifier) fields matching of GTPU UL/DL for FDIR.
Fixes:
78e8a87f6324 ("net/iavf: fix GTPU UL and DL support for flow director")
Cc: stable@dpdk.org
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Signed-off-by: Lingyu Liu <lingyu.liu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Qiming Chen [Thu, 16 Sep 2021 14:04:00 +0000 (22:04 +0800)]
net/iavf: fix mbuf leak
In the iavf_dev_rx_queue_start function, if the iavf_switch_queue
or iavf_switch_queue_lv function fails, the previously applied mbuf
is not released, resulting in leakage. The patch fixes the problem.
Fixes:
9cf9c02bf6ee ("net/iavf: add enable/disable queues for large VF")
Cc: stable@dpdk.org
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Simei Su [Wed, 15 Sep 2021 05:34:22 +0000 (13:34 +0800)]
net/ice: support 1PPS
The E810 supports four single-ended GPIO signals (SDP[20:23]). The 1PPS
signal outputs via SDP[20:23], which is measured by an oscilloscope.
This feature can be turned by a devargs which can select GPIO pin index
flexibly. Pin index 0 means SDP20, pin index 1 means SDP21 and so on.
The example for test command is as below:
./build/app/dpdk-testpmd -a af:00.0,pps_out='[pin:2]' -c f -n 4 -- -i
Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:22 +0000 (22:43 +0800)]
net/ice/base: add API for parser profile initialization
Add API ice_parser_profile_init to init a parser profile base on
a parser result and a mask buffer. The ice_parser_profile can feed to
low level FXP engine to create HW profile / field vector directly.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:21 +0000 (22:43 +0800)]
net/ice/base: support tunnel port for parser
UDP tunnel can be added/deleted for vxlan, geneve, ecpri through
below APIs:
ice_parser_vxlan_tunnel_set
ice_parser_geneve_tunnel_set
ice_parser_ecpri_tunnel_set
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:20 +0000 (22:43 +0800)]
net/ice/base: support double VLAN mode configure for parser
Add API ice_parser_dvm_set to support turn on/off parser's
double vlan mode.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:19 +0000 (22:43 +0800)]
net/ice/base: add parser execution main loop
Implement function ice_parser_rt_execute which perform the main
loop of the parser.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:18 +0000 (22:43 +0800)]
net/ice/base: add helper function to aggregate flags
Add internal helper function ice_xlt_kb_flg_get to aggregate 64 bit
packet flag into 16 bit key builder flags.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:17 +0000 (22:43 +0800)]
net/ice/base: add helper function to redirect flags
Add internal helper function ice_flg_redirect to redirect parser flags
to packet flags.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:16 +0000 (22:43 +0800)]
net/ice/base: add helper for ptype markers match
Add internal helper function ice_ptype_mk_tcam_match for ptype markers
matching in tcam table.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:15 +0000 (22:43 +0800)]
net/ice/base: add helper for parse graph key matching
Add below two internal helper functions for parse graph key matching
in cam table:
ice_pg_cam_match
ice_pg_nm_cam_match
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:14 +0000 (22:43 +0800)]
net/ice/base: add helper function for boost TCAM match
Add internal helper function ice_bst_tcam_match to perform ternary
match on boost TCAM.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:13 +0000 (22:43 +0800)]
net/ice/base: add parser runtime skeleton
Add parser runtime data struct ice_parser_rt.
Add below APIs for parser runtime preparation:
ice_parser_rt_reset
ice_parser_rt_pkt_buf_set
Add below API skeleton for parser runtime execution:
ice_parser_rt_execute
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:12 +0000 (22:43 +0800)]
net/ice/base: init XLT key builder for parser
Parse below DDP section into struct ice_xlt_kb:
ICE_SID_XLT_KEY_BUILDER_SW
ICE_SID_XLT_KEY_BUILDER_FD
ICE_SID_XLT_KEY_BUILDER_RSS
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:11 +0000 (22:43 +0800)]
net/ice/base: init flag redirect table for parser
Parse DDP section ICE_SID_RXPARSER_FLAG_REDIR into an array of
ice_flag_rd_item.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:10 +0000 (22:43 +0800)]
net/ice/base: init protocol group table for parser
Parse DDP section ICE_SID_RXPARSER_PROTO_GRP into an array of
ice_proto_grp_item.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:09 +0000 (22:43 +0800)]
net/ice/base: init marker group table for parser
Parse DDP section ICE_SID_RXPARSER_MARKER_GRP into an array of
ice_mk_grp_item.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:08 +0000 (22:43 +0800)]
net/ice/base: init ptype marker TCAM table for parser
Parse DDP section ICE_SID_RXPARSER_MARKER_PTYPE into an array of
ice_ptype_mk_tcam_item.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:07 +0000 (22:43 +0800)]
net/ice/base: init boost TCAM table for parser
Parse DDP section ICE_SID_RXPARSER_CAM into an array of
ice_bst_tcam_item.
Parse DDP section ICE_SID_LBL_RXPARSER_TMEM into an array of
ice_lbl_item.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:06 +0000 (22:43 +0800)]
net/ice/base: init parse graph CAM table for parser
Parse DDP section ICE_SID_RXPARSER_CAM or ICE_SID_RXPARSER_PG_SPILL
into an array of struct ice_pg_cam_item.
Parse DDP section ICE_SID_RXPARSER_NOMATCH_CAM or
ICE_SID_RXPARSER_NOMATCH_SPILL into an array of struct ice_pg_nm_cam_item.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:05 +0000 (22:43 +0800)]
net/ice/base: init metainit table for parser
Parse DDP section ICE_SID_RXPARSER_METADATA_INIT into an array of
struct ice_metainit_item.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:04 +0000 (22:43 +0800)]
net/ice/base: init IMEM table for parser
Parse DDP section ICE_SID_RXPARSER_IMEM into an array of
struct ice_imem_item.
The Instruction Memory (IMEM) section contains three VLIW instructions
for the ALUs, a key extraction instruction for the Parse Graph CAM, and
several other fields.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Fri, 17 Sep 2021 14:43:03 +0000 (22:43 +0800)]
net/ice/base: add parser create and destroy skeleton
Add new parser module which can parse a packet in binary
and generate information like ptype, protocol/offset pairs
and flags which can be used to feed the FXP profile creation
directly.
The patch added skeleton of the parser instance create and
destroy APIs:
ice_parser_create
ice_parser_destroy
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
Qi Zhang [Thu, 16 Sep 2021 09:53:04 +0000 (17:53 +0800)]
net/ice/base: update auto-generated hardware register
Update ice_hw_autogen.h.
Remove duplicated one in ice_nvm.h.
Replace ICE_NVM_ACCESS_GL_HIBA_MAX with GL_HIBA_MAX_INDEX.
Signed-off-by: Scott W Taylor <scott.w.taylor@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>