Commit Graph

29776 Commits

Author SHA1 Message Date
Xueming Li
7483341ae5 ethdev: change queue release callback
Currently, most ethdev callback API use queue ID as parameter, but Rx
and Tx queue release callback use queue object which is used by Rx and
Tx burst data plane callback.

To align with other eth device queue configuration callbacks:
- queue release callbacks are changed to use queue ID
- all drivers are adapted

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-10-06 19:16:03 +02:00
Xueming Li
49ed322469 ethdev: make queue release callback optional
Some drivers don't need Rx and Tx queue release callback, make them
optional. Clean up empty queue release callbacks for some drivers.

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2021-10-06 19:16:03 +02:00
Satheesh Paul
d74d3744da common/cnxk: fix freeing MCAM counter
Upon MCAM allocation failure, free counters only if counters
were allocated earlier for the flow rule.

Fixes: f9af908074 ("common/cnxk: add mcam utility API")
Cc: stable@dpdk.org

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-04 17:43:07 +02:00
Nithin Dabilpuram
137fbfc6b6 net/cnxk: reflect globally enabled offloads in queue conf
Reflect globally enabled Rx and Tx offloads in queue conf.
Also fix issue with lmt data prepare for multi seg.

Fixes: a24af6361e ("net/cnxk: add Tx queue setup and release")
Fixes: a86144cd9d ("net/cnxk: add Rx queue setup and release")
Fixes: 305ca2c4c3 ("net/cnxk: support multi-segment vector Tx")
Cc: stable@dpdk.org

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:45:33 +02:00
Satheesh Paul
c91d30f46d net/cnxk: support configuring channel mask via devargs
This patch adds support to configure channel mask which will
be used by rte flow when adding flow rules with inline IPsec
action.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:45:32 +02:00
Srujana Challa
161fee38a8 net/cnxk: add crypto capabilities for AES-CBC and HMAC-SHA1
Adds capabitlities for AES_CBC and HMAC_SHA1 for 9k
security offload.

Signed-off-by: Srujana Challa <schalla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:45:30 +02:00
Srujana Challa
2a6d9fa8bc net/cnxk: allow zero UDP6 checksum for non-inline device
Sets IP6_UDP_OPT in NIX RX config to allow optional
UDP checksum for IPv6 in case of security offload.
Also disable drop_re when inline inbound is enabled.

Signed-off-by: Srujana Challa <schalla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:45:28 +02:00
Srujana Challa
9d422a38be net/cnxk: update ethertype for mixed IPsec tunnel versions
Adds support to update ethertype for mixed IPsec tunnel
versions. And also sets et_overwr for inbound IPsec.

Signed-off-by: Srujana Challa <schalla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:45:27 +02:00
Srujana Challa
34639f305e net/cnxk: support IPsec transport mode in cn10k
Adds IPsec transport mode capability to rte security
capabilities.

Signed-off-by: Srujana Challa <schalla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:45:25 +02:00
Srujana Challa
7206a1ca2b net/cnxk: support IPsec anti replay in cn9k
Adds anti replay support for cn9k platform using
SW anti replay check.

Signed-off-by: Srujana Challa <schalla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:45:23 +02:00
Nithin Dabilpuram
55bfac717c net/cnxk: support Tx security offload on cn10k
Add support to create and submit CPT instructions on Tx
on CN10K.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:45:19 +02:00
Nithin Dabilpuram
4382a7ccf7 net/cnxk: support Rx security offload on cn10k
Add support to receive CPT processed packets on Rx via
second pass on CN10K.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:45:15 +02:00
Nithin Dabilpuram
1a7da795f6 net/cnxk: support Tx security offload on cn9k
Add support to create and submit CPT instructions on Tx
on CN9K SoC.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:45:11 +02:00
Nithin Dabilpuram
c19f95b320 net/cnxk: support Rx security offload on cn9k
Add support to receive CPT processed packets on Rx for
CN9K.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:45:08 +02:00
Nithin Dabilpuram
69daa9e502 net/cnxk: support inline security setup for cn10k
Add support for inline inbound and outbound IPSec for SA create,
destroy and other NIX / CPT LF configurations.

This patch also changes dpdk-devbind.py to list new inline
device as misc device.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:45:05 +02:00
Nithin Dabilpuram
7eabd6c637 net/cnxk: support inline security setup for cn9k
Add support for inline inbound and outbound IPSec for SA create,
destroy and other NIX / CPT LF configurations.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:45:02 +02:00
Satheesh Paul
57f7b98283 common/cnxk: support inline IPsec flow action
Add support to configure flow rules with inline IPsec action.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:45:00 +02:00
Srujana Challa
1ec23c7523 common/cnxk: support anti-replay check in SW for cn9k
Adds anti replay SW implementation for cn9k platform.

Signed-off-by: Srujana Challa <schalla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:44:56 +02:00
Nithin Dabilpuram
5c36dcff44 common/cnxk: setup aura BP conf based on NIX
Currently only NIX0 conf is setup in AURA for backpressure.
This patch adds support for NIX1 as well.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:44:53 +02:00
Kommula Shiva Shankar
87254db8b4 common/cnxk: add CQ enable support in NIX Tx path
This patch provides applications to add CQ support
in Tx path. This enables packet completion events on
CQ for requested packets.

Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:44:51 +02:00
Nithin Dabilpuram
780f90e951 common/cnxk: restore NIX SQB pool limit before destroy
Restore SQB AURA/POOL limit before destroying SQB to be
able to drain all the buffers from the aura.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:44:47 +02:00
Nithin Dabilpuram
2a85deceee common/cnxk: align CPT LF enable/disable sequence
For CPT LF IQ enable, set CPT_LF_CTL[ENA] before setting
CPT_LF_INPROG[EENA] to true.

For CPT LF IQ disable, align sequence to that of HRM.

Also this patch aligns space for instructions in CPT LF
to ROC_ALIGN to make complete memory cache aligned and
has other minor fixes/additions.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:44:43 +02:00
Nithin Dabilpuram
5f56c674e4 common/cnxk: dump CPT LF registers on error interrupt
Dump CPT LF registers on error interrupt for debugging
purpose.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:44:38 +02:00
Nithin Dabilpuram
b4ea958b97 common/cnxk: disable CQ drop when inline inbound is enabled
Disable CQ drop when inline inbound is enabled. CQ drop
is not supported for second pass IPsec decrypted packets.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:44:35 +02:00
Nithin Dabilpuram
ee48f711f3 common/cnxk: support NIX inline inbound and outbound setup
Add API to support setting up NIX inline inbound and
NIX inline outbound. In case of inbound, SA base is setup
on NIX PFFUNC and in case of outbound, required number of
CPT LF's are attached to NIX PFFUNC.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:44:32 +02:00
Nithin Dabilpuram
bbcd191ccf common/cnxk: support NIX inline device init and fini
Add support to init and fini inline device with NIX LF,
SSO LF and SSOW LF for inline inbound IPSec in CN10K.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:44:28 +02:00
Nithin Dabilpuram
cfb4f96406 common/cnxk: support NIX inline device IRQ
Add API to setup NIX inline device IRQ's. This registers
IRQ's for errors in case of NIX, CPT LF, SSOW and get wor
interrupt in case of SSO.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:44:25 +02:00
Nithin Dabilpuram
38b177fe7b common/cnxk: change NIX debug API and queue API interface
Change NIX debug API and queue API interface for use by
internal NIX inline device initialization.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:44:21 +02:00
Nithin Dabilpuram
0423387f42 common/cnxk: allow reuse of SSO API for inline dev
Rework interface of SSO internal functions to use for NIX inline dev's
SSO LF's.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:44:18 +02:00
Nithin Dabilpuram
afe44c3122 common/cnxk: support CPT parse header dump
Add helper API to dump CPT parse header.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:44:14 +02:00
Srujana Challa
f3903e7729 common/cnxk: support cn9k fast path security session
Add security support to init cn9k fast path SA data
for AES GCM and AES CBC + HMAC SHA1.

Signed-off-by: Srujana Challa <schalla@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:44:10 +02:00
Ferruh Yigit
a99bf9516c net/cxgbe: remove useless address check
reported by "gcc (GCC) 12.0.0 20211003 (experimental)":

../drivers/net/cxgbe/cxgbe_ethdev.c:
	In function ‘cxgbe_dev_rx_queue_setup’:
../drivers/net/cxgbe/cxgbe_ethdev.c:682:24:
	error: the comparison will always evaluate as ‘true’ for the
	address of ‘fl’ will never be NULL [-Werror=address]
  682 |         if ((&rxq->fl) != NULL)
      |                        ^~

Fixing it by removing useless check.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2021-10-06 13:22:18 +02:00
Andrew Rybchenko
8c9f976f05 ethdev: improve xstats names by IDs get prototype
Adjust parameters order to eth_xstats_get_by_id_t prototype.
Make ids the second parameter similar to eth_xstats_get_by_id_t.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-10-06 13:07:11 +02:00
Ivan Ilchenko
71b5e430a6 ethdev: update xstats by ID driver callbacks documentation
Update xstats by IDs callbacks documentation in accordance with
ethdev usage of these callbacks. Document valid combinations of
input arguments to make driver implementation simpler.

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-10-06 13:07:11 +02:00
Andrew Rybchenko
113778be13 ethdev: do not use get xstats names by IDs to obtain count
Relax requirements on get xstats names by IDs. After the patch
corresponding the driver operation is called with non-NULL ids
and xstats_names parameters only.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-10-06 13:07:11 +02:00
Ivan Ilchenko
bc5112ca59 ethdev: fix xstats by ID API documentation
Document valid combinations of input arguments in accordance with
current implementation in ethdev.

Fixes: 79c913a42f ("ethdev: retrieve xstats by ID")
Cc: stable@dpdk.org

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-10-06 13:07:11 +02:00
Tudor Cornea
d41d39bcf7 net/af_packet: reinsert stripped VLAN tag
The af_packet pmd driver binds to a raw socket and allows sending and
receiving of packets through the kernel.

Since commit [1], the kernel strips the vlan tags early in
__netif_receive_skb_core(), so we receive untagged packets while running
with the af_packet pmd.

Luckily for us, the skb vlan-related fields are still populated from the
stripped vlan tags, so we end up having all the information that we need
in the mbuf.

Having the pmd driver support DEV_RX_OFFLOAD_VLAN_STRIP allows the
application to control the desired vlan stripping behavior, until we
have a way to describe offloads that can't be disabled by pmd drivers.

This patch will cause a change in the default way that the af_packet pmd
treats received vlan-tagged frames. While previously, the application
was required to check the PKT_RX_VLAN_STRIPPED flag, after this patch,
the pmd will re-insert the vlan tag transparently to the user, unless
the DEV_RX_OFFLOAD_VLAN_STRIP is enabled in rxmode.offloads.

I've attempted a preliminary benchmark to understand if the change could
cause a sizable performance hit.

Setup:
Two virtual machines running on top of an ESXi hypervisor

Tx: DPDK app (running on top of vmxnet3 PMD)
Rx: af_packet (running on top of a kernel vmxnet3 interface)
Packet size :68 (packet contains a vlan tag)

Rates:
Tx - 1.419 Mpps
Rx (without vlan insertion) - 1227636 pps
Rx (with vlan insertion)    - 1220081 pps

At a first glance, we don't seem to have a large degradation in terms of
packet rate.

[1]
https://github.com/torvalds/linux/commit/bcc6d47903612c3861201cc3a866fb60

Signed-off-by: Tudor Cornea <tudor.cornea@gmail.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-10-06 11:20:03 +02:00
Nikhil Vasoya
1cd22be207 net/cxgbe: support firmware version query
Implement eth_dev_ops callback to get firmware version.

Signed-off-by: Nikhil Vasoya <nikhil.vasoya@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2021-10-05 19:32:01 +02:00
Nikhil Vasoya
5ec659a76a net/cxgbe: support xstats for VF
Add support to fetch port and queue stats via xstats API. Also remove
queue stats from basic stats because they're now available via xstats
API for the VF.

Signed-off-by: Nikhil Vasoya <nikhil.vasoya@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2021-10-05 19:32:01 +02:00
Junxiao Shi
18627cede7 net/memif: allocate socket hash on any NUMA socket
Previously, memif socket hash is always allocated on NUMA socket 0.
If the application is entirely running on another NUMA socket and EAL
--socket-limit prevents memory allocation on NUMA socket 0, memif
creation fails with "HASH: memory allocation failed" error.

This patch allows allocating memif socket hash on any NUMA socket.

Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
2021-10-04 19:25:12 +02:00
Harman Kalra
b21f07c94c common/cnxk: enable completion queue overflow errata
An issue exists on some HW revisions whereby if a CQ overflows
NIX may have undefined behavior, e.g. free incorrect buffers.
Implementing a workaround for this known HW issue.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-01 07:31:39 +02:00
Harman Kalra
f11873922a common/cnxk: enable RVUM interrupt errata
As per an known HW issue RVUM interrupts may get dropped, If an RVUM
interrupt event occurs when PCCPF_XXX_MSIX_CAP_HDR[MSIXEN]=0 then no
interrupt is triggered, which is expected. But after MSIXEN is set to
1, subsequently if same interrupts event occurs again, still no
interrupt will be triggered.

As a workaround, all RVUM interrupt lines should be cleared between
MSIXEN=0 and MSIXEN=1.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-01 07:31:39 +02:00
Dmitry Kozlyuk
515d20195b doc: remove unneeded min/max fields deprecations
It was announced that `min` and `max` fields and variables in public
headers will be renamed to avoid clash with `min` and `max` macros
defined in Windows headers. However, it is unnecessary, because these
are function-like macros, which are not expanded unless the next token
is an opening brace. It cannot happen for integer fields and variables.
Remove the deprecation notices.

Fixes: c4379ee599 ("doc: announce API changes for Windows compatibility")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
2021-10-08 14:58:21 +02:00
Dmitry Kozlyuk
04d43857ea net: rename Ethernet header fields
Definition of `rte_ether_addr` structure used a workaround allowing DPDK
and Windows SDK headers to be used in the same file, because Windows SDK
defines `s_addr` as a macro. Rename `s_addr` to `src_addr` and `d_addr`
to `dst_addr` to avoid the conflict and remove the workaround.
Deprecation notice:
https://mails.dpdk.org/archives/dev/2021-July/215270.html

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
2021-10-08 14:58:11 +02:00
William Tu
6be6690127 net/ixgbe: build on Windows
This patch enables building the ixgbe driver for Windows.
It also enables its dependencies on security and cryptodev.
I tested on AWS using ixgbe VF device, using dpdk-testpmd.

Signed-off-by: William Tu <u9012063@gmail.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
2021-10-07 14:47:35 +02:00
Tal Shnaiderman
56d2c1aa0b security: build on Windows
Build the security library on Windows.

Remove unneeded export of inline functions from version file.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: William Tu <u9012063@gmail.com>
2021-10-07 14:47:35 +02:00
Tal Shnaiderman
cb7b6898c8 cryptodev: build on Windows
Build the cryptography device library on Windows OS
by removing unneeded include and exports of inline functions
blocking the compilation.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: William Tu <u9012063@gmail.com>
2021-10-07 14:47:35 +02:00
Tal Shnaiderman
f9b2a75ed4 security: use net library to include IP structs
Remove the netinet includes and replaces them
with rte_ip.h to support the in_addr/in6_addr structs
on all operating systems.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: William Tu <u9012063@gmail.com>
2021-10-07 14:47:35 +02:00
Gagandeep Singh
c5e6bc12a3 common/dpaax: fix physical address conversion
If some of the VA entries of table are somehow not populated and are
NULL, it can add offset to NULL and return the invalid VA in PA to
VA conversion.

In this patch, adding a check if the VA entry has valid address only
then add offset and return VA.

Fixes: 2f3d633aa5 ("common/dpaax: add library for PA/VA translation table")
Cc: stable@dpdk.org

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2021-10-07 14:47:35 +02:00
Nipun Gupta
73281ef816 raw/dpaa2_qdma: remove datapath checks for lcore ID
There is no need for preventional check of rte_lcore_id() in
data path. This patch removes the same.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2021-10-07 14:47:35 +02:00