Commit Graph

28458 Commits

Author SHA1 Message Date
Nithin Dabilpuram
a86144cd9d net/cnxk: add Rx queue setup and release
Add Rx queue setup and release op for CN9K and CN10K
SoC. Release is completely common while setup is platform
dependent due to fast path Rx queue structure variation.
Fastpath is platform dependent partly due to core cacheline
size difference.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-06-29 21:56:32 +02:00
Nithin Dabilpuram
0f5ee447f5 net/cnxk: support link status update
Add link status update callback to get current
link status.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-06-29 21:49:12 +02:00
Nithin Dabilpuram
b75e0aca84 net/cnxk: add device configuration operation
Add device configuration op for CN9K and CN10K. Most of the
device configuration is common between two platforms except for
some supported offloads.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-06-29 21:41:53 +02:00
Nithin Dabilpuram
dac12650eb net/cnxk: support device infos query
Add support to retrieve dev infos get for CN9K and CN10K.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-06-29 21:34:36 +02:00
Nithin Dabilpuram
d25433c7a8 net/cnxk: add common devargs parsing
Add various devargs parsing command line arguments
parsing functions supported by CN9K and CN10K.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-06-29 21:27:16 +02:00
Nithin Dabilpuram
5a4341c849 net/cnxk: add platform specific probe and remove
Add platform specific probe and remove callbacks for CN9K
and CN10K which use common probe and remove functions.
Register ethdev driver for CN9K and CN10K.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-06-29 21:19:59 +02:00
Nithin Dabilpuram
47db46bb76 net/cnxk: add build infra and common probing
Add build infrastructure and common probe and remove for cnxk driver
which is used by both CN10K and CN9K SoC.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-06-29 21:12:43 +02:00
Satheesh Paul
19f3cc2374 common/cnxk: support VLAN push/pop flow actions
Add roc API to configure VLAN tag addition and removal.

This patch also adds 98xx support for increased MCAM
entries for rte flow.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
2021-06-29 21:05:28 +02:00
Nithin Dabilpuram
7fef6b0992 common/cnxk: remove camel case from model API
Change model check API's to not use Camel case in function
names.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-06-29 20:58:07 +02:00
Satha Rao
95bec117a3 common/cnxk: add provision to enable RED on RQ
Send RED pass/drop levels based on rq configurations to kernel.
Fixed the aura and pool shift value calculation.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
2021-06-29 20:50:50 +02:00
Harman Kalra
9854e5db5d common/cnxk: allocate LMT region in userspace
As per the new LMTST design, userspace shall allocate LMT region,
setup the DMA translation and share the IOVA with kernel via MBOX.
Kernel will convert this IOVA to physical memory and update the
LMT table entry with the same.
With this new design also shared mode (i.e. all pci funcs sharing
the LMT region allocated by primary/base pci func) is intact.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-06-29 20:43:26 +02:00
Satheesh Paul
0c22452d47 common/cnxk: support flow action mark and flag
Add roc API to get mark action.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
2021-06-29 20:36:07 +02:00
Satheesh Paul
9869c39918 common/cnxk: support flow entry dump
Add NPC support API to dump created flow entries.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
2021-06-29 20:28:42 +02:00
Jerin Jacob
50d08d3934 common/cnxk: fix batch alloc completion poll logic
The instruction generation was not correct due to
fact that volatile suppose to use with ccode variable
as well.

Change the logic to use gcc atomic builtin to
simplify and avoid explicit volatile from the code.

Fixes: 81af267893 ("common/cnxk: support NPA batch alloc/free")
Cc: stable@dpdk.org

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
2021-06-29 20:21:22 +02:00
Satha Rao
6b7fcb7a5d common/cnxk: support locking NIX RQ contexts
This patch will consider device argument to lock RSS table
in NIX.

This patch also adds few misc fixes such as disabling NIX Tx
vlan insertion conf in SMQ, enabling SSO in NIX Tx SQ
for Tx completions and TM related stats API.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
2021-06-29 20:12:25 +02:00
Olivier Matz
eb3fea3cde test/mbuf: fix virtual address conversion
Seen with address sanitizer.

rte_mempool_virt2iova() can only be used on mempool elements. In this case,
it is incorrect, and rte_mem_virt2iova() has to be used.

Bugzilla ID: 737
Fixes: 7b295dceea ("test/mbuf: add unit test cases")
Cc: stable@dpdk.org

Reported-by: Zhihong Peng <zhihongx.peng@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2021-07-06 16:41:13 +02:00
David Marchand
09e640e35e test: remove hack for private header inclusion
This hack was needed with the make build system.
With meson, any private header from a library is visible as long as a
dependency to this library is expressed.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
2021-07-06 13:28:35 +02:00
David Marchand
7c83a1e3c8 bus/pci: fix leak for unbound devices
For devices not bound to any Linux kernel module, we leak a pci object
since it is never added to the PCI bus device list.

Fixes: c79a1c6746 ("bus/pci: optimize bus scan")
Cc: stable@dpdk.org

Reported-by: Owen Hilyard <ohilyard@iol.unh.edu>
Signed-off-by: David Marchand <david.marchand@redhat.com>
2021-07-06 11:27:55 +02:00
Thomas Monjalon
aa777f003a bus/pci: update files description
Some files were starting with some outdated introductions.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2021-07-06 11:27:55 +02:00
Tomasz Duszynski
82a153151f raw/cnxk_bphy: support BPHY self test
Add support for performing selftest.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:08:48 +02:00
Tomasz Duszynski
64fa1ebd7c raw/cnxk_bphy: support registering BPHY IRQ handlers
Custom IRQ handlers may be registered/removed on demand.
Since registration and removal are related they are in the
same patch.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:08:46 +02:00
Tomasz Duszynski
e50cb22331 raw/cnxk_bphy: support retrieving BPHY device memory
Allow user to retrieve baseband phy memory resources.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:08:44 +02:00
Tomasz Duszynski
61278bc794 raw/cnxk_bphy: support reading number of BPHY IRQs
Add support for retrieving maximum number of interrupts.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:08:40 +02:00
Tomasz Duszynski
7cf1976845 raw/cnxk_bphy: support interrupt init and cleanup
Add support for interrupt initialization and cleanup. Internally
interrupt initialization performs low level setup that allows
custom interrupt handler registration later on.

Interrupt initialization and cleanup are related hence they
are in the same patch.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:08:35 +02:00
Tomasz Duszynski
8ff3f5bd60 raw/cnxk_bphy: support BPHY dequeue operation
Add support for dequeueing responses to previously
enqueued messages.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:08:33 +02:00
Tomasz Duszynski
ca25655e49 raw/cnxk_bphy: support BPHY enqueue operation
Add preliminary support for enqueue operation.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:08:29 +02:00
Tomasz Duszynski
7e31ae5804 raw/cnxk_bphy: support reading BPHY queue count
Add support for reading number of available queues from baseband
phy. Currently only single queue is supported.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:08:25 +02:00
Tomasz Duszynski
4c33c6f5cd raw/cnxk_bphy: support reading BPHY queue configuration
Add support for reading baseband phy queue configuration.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:08:15 +02:00
Tomasz Duszynski
24d9c5d59d raw/cnxk_bphy: add baseband PHY skeleton driver
Add baseband phy skeleton driver. Baseband phy is a hardware subsystem
accelerating 5G/LTE related tasks. Note this driver isn't involved into
any sort baseband protocol processing. Instead it just provides means
for configuring hardware.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:08:11 +02:00
Tomasz Duszynski
603c65bfc9 common/cnxk: register BPHY IRQ
Add support for registering user supplied baseband PHY IRQ handler.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:08:08 +02:00
Tomasz Duszynski
b10c81ec7c common/cnxk: clear BPHY IRQ handler
Add support for clearing previously register baseband PHY IRQ handler.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:08:05 +02:00
Tomasz Duszynski
804c108b03 common/cnxk: set BPHY IRQ handler
Add support for setting custom baseband PHY IRQ handler.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:08:02 +02:00
Tomasz Duszynski
3a0abb7102 common/cnxk: remove BPHY IRQ stack
Add support for removing existing IRQ stack.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:07:59 +02:00
Tomasz Duszynski
1da18cb444 common/cnxk: retrieve BPHY IRQ stack
Add support for retrieving IRQ stack.
If stack does not exist then it gets created.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:07:56 +02:00
Tomasz Duszynski
c968c6188c common/cnxk: check BPHY IRQ availability
Add support for checking whether given IRQ is available.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:07:52 +02:00
Tomasz Duszynski
81c7f0e422 common/cnxk: add BPHY IRQ setup
Add support for initializing baseband PHY IRQs. While at it
also add support for reverting back to the default state.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:07:37 +02:00
Tomasz Duszynski
4ced2b04df common/cnxk: add BPHY device init and fini
Add support for device init and fini. It merely saves
baseband phy state container in a globally accessible
resource chest.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:07:33 +02:00
Tomasz Duszynski
4d2b226726 raw/cnxk_bphy: support CGX self test
Add support for performing selftest operation.

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Signed-off-by: Jakub Palider <jpalider@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:07:32 +02:00
Tomasz Duszynski
ee9978857f raw/cnxk_bphy: support CGX dequeue operation
Add support for dequeueing responses to previously
enqueued messages.

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Signed-off-by: Jakub Palider <jpalider@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:07:31 +02:00
Tomasz Duszynski
df39890f0c raw/cnxk_bphy: support CGX enqueue operation
Add support for enqueueing messages.

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Signed-off-by: Jakub Palider <jpalider@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:07:29 +02:00
Tomasz Duszynski
8614a69195 raw/cnxk_bphy: support reading CGX queue count
Add support for reading number of available queues i.e number
of available logical macs (LMACs).

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Signed-off-by: Jakub Palider <jpalider@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:07:24 +02:00
Tomasz Duszynski
40458a1ec9 raw/cnxk_bphy: support reading CGX queue configuration
Add support for reading queue configuration. Single queue represents
a logical MAC available on RPM/CGX.

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Signed-off-by: Jakub Palider <jpalider@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:07:20 +02:00
Tomasz Duszynski
3d27e49e07 raw/cnxk_bphy: add BPHY CGX/RPM skeleton driver
Add baseband PHY CGX/RPM skeleton driver which merely probes a matching
device. CGX/RPM are Ethernet MACs hardwired to baseband subsystem.

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Signed-off-by: Jakub Palider <jpalider@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:07:16 +02:00
Tomasz Duszynski
2c19694c8e common/cnxk: start and stop BPHY LMAC
Add support for starting or stopping specific lmac.
Start enables Rx/Tx traffic while stop does the opposite.

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Signed-off-by: Jakub Palider <jpalider@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:07:03 +02:00
Tomasz Duszynski
7fb5075a53 common/cnxk: set BPHY link state
Add support for setting link up or down.

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Signed-off-by: Jakub Palider <jpalider@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:07:01 +02:00
Tomasz Duszynski
ba901d33e6 common/cnxk: set BPHY link mode
Add support for setting link mode.

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Signed-off-by: Jakub Palider <jpalider@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:06:59 +02:00
Tomasz Duszynski
72096a4793 common/cnxk: enable and disable BPHY PTP mode
Add support for enabling or disablig PTP mode.

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Signed-off-by: Jakub Palider <jpalider@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:06:57 +02:00
Tomasz Duszynski
6c870ee8f1 common/cnxk: enable and disable BPHY internal loopback
Add support for enabling or disabling internal loopback.

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Signed-off-by: Jakub Palider <jpalider@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:06:50 +02:00
Tomasz Duszynski
1fa0045149 common/cnxk: get BPHY link information
Add support for retrieving link information.

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Signed-off-by: Jakub Palider <jpalider@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:06:47 +02:00
Tomasz Duszynski
857721d62d common/cnxk: add BPHY communication with atf
Messages can be exchanged between userspace software and firmware
via set of two dedicated registers, namely scratch1 and scratch0.

scratch1 acts as a command register i.e message is sent to firmware,
while scratch0 holds response to previously sent message.

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Signed-off-by: Jakub Palider <jpalider@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-07-05 23:06:45 +02:00