Commit Graph

27552 Commits

Author SHA1 Message Date
Ashwin Sekhar T K
0ad49b2083 mempool/cnxk: register plt init callback
Register the CNXk mempool plt init callback which will set the
appropriate mempool ops to be used for the platform.

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
2021-04-09 08:32:24 +02:00
Ashwin Sekhar T K
bbf19e89b8 mempool/cnxk: add generic operations
Add generic CNXk mempool ops which will enqueue/dequeue
from pool one element at a time.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
2021-04-09 08:32:24 +02:00
Ashwin Sekhar T K
0a50a5aad2 mempool/cnxk: add device probe/remove
Add the implementation for CNXk mempool device
probe and remove.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
2021-04-09 08:32:24 +02:00
Ashwin Sekhar T K
2da3159197 mempool/cnxk: add build infra and doc
Add the meson based build infrastructure for Marvell
CNXK mempool driver along with stub implementations
for mempool device probe.

Also add Marvell CNXK mempool base documentation.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
2021-04-09 08:32:24 +02:00
Satheesh Paul
51dc6a80f8 common/cnxk: support RSS action in NPC rule
Added support for allocating RSS group and setting
it as action of an NPC rule.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
2021-04-09 08:32:24 +02:00
Pavan Nikhilesh
309b553c26 common/cnxk: support TIM IRQ
Add TIM LF IRQ register and un-register functions.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Pavan Nikhilesh
796e3668b9 common/cnxk: support TIM device
Add TIM device init, fini which are used to attach TIM LF
resources to the RVU PF/VF and TIM LF alloc and free.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Pavan Nikhilesh
f0e638e049 common/cnxk: support SSO debug
Add sso debug dump support. This dumps all SSO LF register values
to a given file handle.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Pavan Nikhilesh
84ed1a5b4b common/cnxk: support SSO IRQ
Add support to registering and un-registering SSO HWS and
HWGRP IRQs.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Pavan Nikhilesh
111a612205 common/cnxk: add SSO HWGRP interface
Add SSO HWGRP interface for configuring XAQ pool, setting priority
and internal HW buffer limits for each HWGRP.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Pavan Nikhilesh
46ee7b2346 common/cnxk: add SSO HWS interface
Add SSO HWS interface for setting/unsetting links, retrieving
base address and nanoseconds to getwork timeout.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Pavan Nikhilesh
9b727f8511 common/cnxk: support SSO device
Add SSO device init and fini which attach SSO LF resources to the
RVU PF/VF and SSO HWS and HWGRP LFs alloc, free.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Kiran Kumar K
a07f7ced43 common/cnxk: add NPC init and fini
Adding support initialize and fini the npc. Further, adding APIs to
create and destroy the npc rules.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
2021-04-09 08:32:24 +02:00
Kiran Kumar K
c34ea71b87 common/cnxk: add NPC parsing API
Adding npc parsing API support to parse different patterns and actions.
Based on the pattern and actions ltype values will be chosen and
mcam data will be configured at perticular offsets.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
2021-04-09 08:32:24 +02:00
Kiran Kumar K
f9af908074 common/cnxk: add mcam utility API
Adding mcam utility functions like reading KEX and reserving and writing
mcam rules.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
2021-04-09 08:32:24 +02:00
Kiran Kumar K
665b6a7400 common/cnxk: add NPC helper API
Adding NPC helper APIs to manage MCAM like pre allocating the mcam,
configuring the rules, shifting mcam rules and preparing the data for
mcam based on KEX.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
2021-04-09 08:32:24 +02:00
Kiran Kumar K
2199f5cdbe common/cnxk: support NPC
Adding initial support for programming NPC. NPC is Network Parser
and CAM unit that provides Rx and Tx packet parsing and packet
manipulation functionality on Marvell CN9K and CN10K SoC's. It is
mapped to RTE Flow in DPDK.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
2021-04-09 08:32:24 +02:00
Nithin Dabilpuram
fcdef46b66 common/cnxk: support NIX TM debug and misc utils
Add support to dump TM HW registers and hierarchy on error.
This patch also adds support for misc utils such as API to
query TM HW resource availability, resource pre-allocation
and static priority support on root node.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Nithin Dabilpuram
464c9f9193 common/cnxk: support NIX TM dynamic update
Add support for dynamic node update of shaper profile,
RR quantum and also support to suspend or resume an active
TM node.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Nithin Dabilpuram
5a960e265d common/cnxk: support NIX TM internal hierarchy
Add support to create internal TM default hierarchy and ratelimit
hierarchy and API to ratelimit SQ to a given rate. This will be
used by cnxk ethdev driver's tx queue ratelimit op.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Nithin Dabilpuram
0885429c30 common/cnxk: add NIX TM hierarchy enable/disable
Add support to enable or disable hierarchy along with
allocating node HW resources such as shapers and schedulers
and configuring them to match the user created or default
hierarchy.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Nithin Dabilpuram
df405df95e common/cnxk: add NIX TM helper to alloc/free resource
Add TM helper API to estimate, alloc, assign, and free resources
for a NIX LF / ethdev.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Satha Rao
c2460d1429 common/cnxk: support NIX TM shaper profile
Add support to add/delete/update shaper profile for
a given NIX. Also add support to walk through existing
shaper profiles.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Satha Rao <skoteshwar@marvell.com>
2021-04-09 08:32:24 +02:00
Nithin Dabilpuram
be3009e75a common/cnxk: support add/delete NIX TM node
Add support to add/delete nodes in a hierarchy.
This patch also adds misc utils to get node name,
walk through nodes etc.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Satha Rao <skoteshwar@marvell.com>
2021-04-09 08:32:24 +02:00
Nithin Dabilpuram
05d727e8b1 common/cnxk: support NIX traffic management
Add nix traffic management base support to init/fini node, shaper profile
and topology, setup SQ for a given user hierarchy or default internal
hierarchy.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Sunil Kumar Kori
dfa267ec54 common/cnxk: support NIX LSO and misc utils
Add support to create LSO formats for TCP segmentation offload
for IPv4/IPv6, tunnel and non-tunnel protocols. Tunnel protocol
support is for GRE and UDP based tunnel protocols.

This patch also adds other helper API to retrieve eeprom info
and configure Rx for different switch headers.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Sunil Kumar Kori
da57d4589a common/cnxk: support NIX flow control
Add support to enable/disable Rx/Tx flow control and pause
frame configuration on NIX.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Sunil Kumar Kori
62240569be common/cnxk: suport VLAN filter
Add helper API to support VLAN filtering and stripping
on Rx and VLAN insertion on Tx.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Jerin Jacob
5aef7fbdbd common/cnxk: support NIX debug dump
Add support to dump NIX RQ, SQ and CQ contexts apart
from NIX LF registers.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Satha Rao
4efa6e82fe common/cnxk: support NIX extended stats
Add support for retrieving NIX extended stats that are
per NIX LF and per LMAC.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Jerin Jacob
218d022e1f common/cnxk: support NIX stats
Add API to provide Rx and Tx stats for a given NIX.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Sunil Kumar Kori
c443e0d326 common/cnxk: support NIX PTP
Add support to enable/disable Rx and Tx PTP timestamping
support. Also provide API's to register ptp info callbacks
to get config change update from Kernel.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Jerin Jacob
1bf6746e65 common/cnxk: support NIX RSS
Add API's for default/non-default reta table setup,
key set/get, and flow algo setup for CN9K and CN10K.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Vidya Sagar Velumuri
bd02fe78c6 common/cnxk: add NIX inline IPsec config API
Add API to configure NIX block for inline IPSec.

Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Sunil Kumar Kori
1c518ee11e common/cnxk: add NIX specific NPC operations
Add NIX specific NPC operations such as NPC mac address get/set,
mcast entry add/delete, promiscuous mode enable/disable etc.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Sunil Kumar Kori
313cc41830 common/cnxk: support NIX MAC operations
Add support to different MAC related operations such as
MAC address set/get, link set/get, link status callback,
etc.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Jerin Jacob
ae06070901 common/cnxk: add NIX Tx queue management API
This patch adds support to init/modify/fini NIX
SQ(send queue) for both CN9K and CN10K platforms.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Jerin Jacob
19a2b54982 common/cnxk: add NIX Rx queue management API
Add nix Rx queue management API to init/modify/fini
RQ context and also setup CQ(completion queue) context.
Current support is both for CN9K and CN10K devices.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Jerin Jacob
f6d567b03d common/cnxk: support NIX IRQ
Add support to register NIX error and completion
queue IRQ's using base device class IRQ helper API's.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
2021-04-09 08:32:24 +02:00
Jerin Jacob
8dcdf319dd common/cnxk: support NIX
Add base nix support as ROC(Rest of Chip) API which will
be used by generic ETHDEV PMD(net/cnxk).

This patch adds support to device init, fini, resource
alloc and free API which sets up a ETHDEV PCI device of either
CN9K or CN10K Marvell SoC.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Satha Rao <skoteshwar@marvell.com>
2021-04-09 08:32:24 +02:00
Ashwin Sekhar T K
81af267893 common/cnxk: support NPA batch alloc/free
Add APIs to do allocations/frees in batch from
NPA pool.

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Ashwin Sekhar T K
1d9f8a4849 common/cnxk: support NPA performance counter
Add APIs to read NPA performance counters.

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Ashwin Sekhar T K
2409f53a27 common/cnxk: support NPA bulk alloc/free
Add APIs to alloc/free in bulk from NPA pool.

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Ashwin Sekhar T K
f765f56112 common/cnxk: add NPA pool HW operations
Add APIs for creating, destroying, modifying
NPA pools.

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Ashwin Sekhar T K
dfb02998e0 common/cnxk: support NPA debug
Add NPA debug APIs.

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Ashwin Sekhar T K
e67f633e48 common/cnxk: support NPA IRQ
Add support for NPA IRQs.

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Ashwin Sekhar T K
124ff1a4cb common/cnxk: support NPA device
Add base NPA device support. NPA i.e Network Pool Allocator is
HW block that provides HW mempool functionality on Marvell CN9K
and CN10K SoC's. NPA by providing HW mempool support, also
facilitates Rx and Tx packet alloc and packet free by HW without
SW intervention.

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Jerin Jacob
585bb3e538 common/cnxk: add VF support to base device class
Add VF specific handling such as BAR4 setup, forwarding
VF mbox messages to AF and vice-versa, VF FLR handling
etc.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Jerin Jacob
665ff1ccc2 common/cnxk: add base device class
Introduce 'dev' class to hold cnxk PCIe device specific
information and operations.

All PCIe drivers(ethdev, mempool, cryptodev and eventdev) of cnxk
inherits this base object to avail the common functionalities such
as mailbox creation, interrupt registration, LMT setup, VF message
mbox forwarding, etc.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00
Jerin Jacob
03cc9bd929 common/cnxk: add mailbox base infrastructure
This patch adds mailbox infra API's to communicate with Kernel AF
driver. These API's will be used by all the other cnxk drivers
for mbox init/fini, send/recv functionality.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-04-09 08:32:24 +02:00