Commit Graph

954 Commits

Author SHA1 Message Date
Sunil Kumar Kori
0fa36bc288 common/cnxk: support profile statistics
CN10K platform provides statistics per bandwidth profile and
per nixlf. Implement RoC API to read stats for given bandwidth
profile.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-19 16:23:53 +02:00
Sunil Kumar Kori
c8881e6ef0 common/cnxk: support bandwidth profile stats to index
CN10K platform supports different stats for HW bandwidth profiles.
Implement RoC API to get index for given stats type.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-19 16:23:32 +02:00
Sunil Kumar Kori
b609507b7c common/cnxk: support bandwidth profiles connection
To maintain chain of bandwidth profiles, they needs to be
connected. Implement RoC API to connect two bandwidth profiles
at different levels.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-19 16:23:18 +02:00
Sunil Kumar Kori
3396110111 common/cnxk: support precolor table setup
For initial coloring of input packet, CN10K platform maintains
precolor table for VLAN, DSCP and Generic. Implement RoC
interface to setup pre color table.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-19 16:23:03 +02:00
Sunil Kumar Kori
ab706fa825 common/cnxk: support bandwidth profile dump
Implement RoC API to dump bandwidth profile on CN10K
platform.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-19 16:22:50 +02:00
Sunil Kumar Kori
52511cd2ba common/cnxk: support profile state toggle
Implement RoC API to enable or disable HW bandwidth profiles
on CN10K platform.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-19 16:22:30 +02:00
Sunil Kumar Kori
4ad8bc2fc7 common/cnxk: support bandwidth profile configure
Implement RoC API to configure HW bandwidth profile for
CN10K platform.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-19 16:22:16 +02:00
Sunil Kumar Kori
bf7290c65f common/cnxk: support bandwidth profiles free
Implement RoC interface to free HW bandwidth profiles on
CN10K platform.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-19 16:22:04 +02:00
Sunil Kumar Kori
7a63d75ecb common/cnxk: support bandwidth profiles allocation
Implement RoC API to allocate HW resources i.e. bandwidth
profiles for policer processing on CN10K platform.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-19 16:21:40 +02:00
Sunil Kumar Kori
05a944fea3 common/cnxk: support to get profile count
Implement interface to get available profile count for given
NIXLF.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-19 16:21:25 +02:00
Sunil Kumar Kori
b7cb2203eb common/cnxk: support to get policer level to index
CN10K platform supports policer up to 3 level of hierarchy.
Implement RoC API to get corresponding index for given level.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-19 16:21:14 +02:00
Sunil Kumar Kori
cf8f6aa12a common/cnxk: update policer mbox API and HW definitions
To support ingress policer on CN10K, MBOX interfaces and HW
definitions updated.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-19 16:20:29 +02:00
Viacheslav Galaktionov
40ccb31158 common/sfc_efx/base: support unprivileged MAE clients
In order to differentiate between privileged and unprivileged MAE clients,
add a separate boolean flag to represent a NIC's MAE privilege level.

Allow initializing unprivileged MAE clients by avoiding calls to functions
that can only be called by the admin NIC.

Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
2021-10-18 20:56:02 +02:00
Pavan Nikhilesh
ac6deebb58 common/octeontx2: enable build only on 64-bit Linux
Since AARCH32 extension is not implemented on octeontx2 family, only
enable build for 64bit.
Due to Linux kernel AF(Admin Function) driver dependency, only enable
build for 64-bit Linux.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-15 19:13:13 +02:00
Pavan Nikhilesh
e1369718f5 common/octeontx: enable build only on 64-bit Linux
Since AARCH32 extension is not implemented on octeontx family, only
enable build for 64bit.
Due to Linux kernel AF(Admin function) driver dependency, only enable
build for 64-bit Linux.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-15 19:13:13 +02:00
Konstantin Ananyev
f9bdee267a ethdev: hide internal structures
Move rte_eth_dev, rte_eth_dev_data, rte_eth_rxtx_callback and related
data into private header (ethdev_driver.h).
Few minor changes to keep DPDK building after that.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Feifei Wang <feifei.wang2@arm.com>
2021-10-13 22:14:59 +02:00
Ivan Malov
3a73dcfdb2 common/sfc_efx/base: match on recirc ID in action rules
Currently, there is an API for setting recirculation ID in
outer rules. Add an API to let action rules match on it.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2021-10-13 21:30:13 +02:00
Ivan Malov
5cf153e79c common/sfc_efx/base: support recirculation ID in outer rules
When an outer rule is hit, it can pass recirculation ID down
to action rule lookup, and action rules can match on this ID
instead of matching on the outer rule allocation handle.
By default, recirculation ID is assumed to be zero.

Add an API to set recirculation ID in outer rules.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
2021-10-13 16:39:11 +02:00
Ivan Malov
cdea571bec common/sfc_efx/base: add flag to use Rx prefix user flag
Add an RxQ flag to request support for user flag field of Rx
prefix. The feature is supported only on EF100 and EF10 ESSB.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
2021-10-13 00:47:49 +02:00
Tal Shnaiderman
58a95badbd common/mlx5: read FCS scattering capability from DevX
mlx5 in Windows needs the hca capability scatter_fcs
to query the NIC support for the CRC keeping offload.

Added the capability as part of the capabilities
queried by the PMD using DevX.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Tested-by: Idan Hackmon <idanhac@nvidia.com>
2021-10-12 15:29:38 +02:00
Tal Shnaiderman
3440836d68 common/mlx5: read VLAN capability from DevX
mlx5 in Windows needs the hca capability vlan_cap
to query the NIC for VLAN stripping support

Added the capability as part of the capabilities
queried by the PMD using DevX.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Tested-by: Idan Hackmon <idanhac@nvidia.com>
2021-10-12 15:29:37 +02:00
Tal Shnaiderman
d338df9969 common/mlx5: read TSO capability from DevX
mlx5 in Windows needs the hca capability max_lso_cap
to query the NIC for TSO offloading support.

Added the capability as part of the capabilities
queried by the PMD using DevX.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Tested-by: Idan Hackmon <idanhac@nvidia.com>
2021-10-12 15:29:36 +02:00
Tal Shnaiderman
cf9b3c1bbc common/mlx5: read tunneling capabilities from DevX
mlx5 in Windows needs the tunneling hca capabilities
to query the NIC for Inner TSO offloading support.

Added the capability as part of the capabilities
queried by the PMD using DevX.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Tested-by: Idan Hackmon <idanhac@nvidia.com>
2021-10-12 15:29:35 +02:00
Tal Shnaiderman
643e4db076 common/mlx5: read software parsing capabilities from DevX
mlx5 in Windows needs the software parsing hca capabilities
to query the NIC for TSO and Checksum offloading support.

Added the capability as part of the capabilities
queried by the PMD using DevX.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Tested-by: Idan Hackmon <idanhac@nvidia.com>
2021-10-12 15:29:33 +02:00
Tomasz Duszynski
b89f023e54 common/cnxk: add helpers for reading runplatform
Add helper functions that allow one to check platform
ROC is running on. Platform type is retrieved from device
tree attribute runplatform which is updated by EBF accordingly.

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-10-08 10:12:49 +02:00
Jakub Palider
3d1cd3a803 raw/cnxk_bphy: use ROC calls for max IRQ get
Maximum interrupt number function used direct access to
structure field while ROC helper exists and serves the
same purpose.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-10-07 13:02:48 +02:00
Viacheslav Galaktionov
1bf9ff57cc common/sfc_efx/base: allow getting VNIC MCDI client handles
Equality checks between VNICs should be done by comparing their client
handles. This means that clients should be able to retrieve client
handles for arbitrary functions and themselves.

Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
2021-10-12 18:44:11 +02:00
Viacheslav Galaktionov
2374806971 common/sfc_efx/base: add API to read MAE mport journal
This is required to provide the driver with the current state of mports.

Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
2021-10-12 18:44:11 +02:00
Viacheslav Galaktionov
7d104a8db6 common/sfc_efx/base: retrieve function interfaces for VNICs
This information is required to be able to fully identify the function.
Add this information to the NIC configuration structure for easy access.

Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
2021-10-12 18:44:11 +02:00
Viacheslav Galaktionov
4917b69db0 common/sfc_efx/base: add multi-host function mport selector
Provide helper function to compose multi-host aware PCIe
function M-port selector.

The firmware expects mport selectors to use different sets of values to
represent a PCIe interface in mport selectors and elsewhere. In order to
avoid having the user perform the conversion themselves, it is now done
automatically when a selector is constructed.

In addition, a type has been added to libefx for possible PCIe
interfaces.
This is done to abstract different representations away from the users.

Allow to support matching traffic coming from an arbitrary PCIe
end-point of the NIC and redirect traffic to it.

Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
2021-10-12 18:44:11 +02:00
Igor Romanov
92030a61df common/sfc_efx/base: add mport alias MCDI wrappers
The APIs allow creation of mports for port representor
traffic filtering.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
2021-10-12 18:44:11 +02:00
Igor Romanov
3d6e8e459c common/sfc_efx/base: add API to get mport selector by ID
The conversion is required when mport ID is received via
mport allocation and mport selector is required for filter
creation.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
2021-10-12 18:44:11 +02:00
Igor Romanov
ba459fad12 common/sfc_efx/base: add filter ingress mport matching field
The field changes the mport for which the filter is created.
It is required to filter traffic from VF on an alias mport.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
2021-10-12 18:44:11 +02:00
Viacheslav Galaktionov
94ddd50165 common/sfc_efx/base: allow creating invalid mport selectors
There isn't always a valid mport that can be used. For these cases,
special invalid selectors can be generated. Requests that use such
selectors in any way will be rejected.

Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
2021-10-12 18:44:11 +02:00
Igor Romanov
4ea8bb7809 common/sfc_efx/base: add API to get mport ID by selector
The mport ID is required to set appropriate egress mport ID
in Tx prefix for port representor TxQ.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
2021-10-12 18:44:10 +02:00
Andrew Rybchenko
c4f4a0e60d common/sfc_efx/base: update EF100 registers definitions
Pick up all changes and extra definitions.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2021-10-12 18:44:10 +02:00
Andrew Rybchenko
b25c65e5c8 common/sfc_efx/base: update MCDI headers
Pickup new FW interface definitions.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2021-10-12 18:44:10 +02:00
Andrew Rybchenko
c47d7b90a1 mempool: add namespace to flags
Fix the mempool flags namespace by adding an RTE_ prefix to the name.
The old flags remain usable, to be deprecated in the future.

Flag MEMPOOL_F_NON_IO added in the release is just renamed to have RTE_
prefix.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2021-10-20 10:00:16 +02:00
Dmitry Kozlyuk
690b2a88c2 common/mlx5: add mempool registration facilities
Add internal API to register mempools, that is, to create memory
regions (MR) for their memory and store them in a separate database.
Implementation deals with multi-process, so that class drivers don't
need to. Each protection domain has its own database. Memory regions
can be shared within a database if they represent a single hugepage
covering one or more mempools entirely.

Add internal API to lookup an MR key for an address that belongs
to a known mempool. It is a responsibility of a class driver
to extract the mempool from an mbuf.

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-10-19 16:35:16 +02:00
Tejasree Kondoj
7658d035ac common/cnxk: support 98XX CPT dual block
CN98xx SoC comes up with two CPT blocks wrt
CN96xx, CN93xx, to achieve higher performance.

Adding support to allocate all LFs of VF with even BDF from CPT0
and all LFs of VF with odd BDF from CPT1.
If LFs are not available in one block then they will be allocated
from alternate block.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-10-08 21:31:07 +02:00
Vidya Sagar Velumuri
a90db80d7d common/cnxk: set key length for PDCP algos
Set proper bits in the context based on key length for PDCP
algorithms. This is required to support ZUC 256bit key cases.

Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-10-08 21:31:07 +02:00
Tejasree Kondoj
2d5ca27281 common/cnxk: support UDP port verification
Adding support to verify UDP encapsulation ports
in IPsec inbound.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-10-08 21:31:07 +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
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
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