Commit Graph

31 Commits

Author SHA1 Message Date
Vamsi Attunuru
241a650061 net/octeontx: support flow control
Patch adds ethdev flow control set/get callback ops,
pmd enables modifying flow control attributes like
rx_pause, tx_pause, high & low water mark.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
2020-04-21 13:57:06 +02:00
Harman Kalra
8b42b07eef net/octeontx: support set link up/down
Adding support for setting link up/down eth operation.
It is used to enable disable lmac.  Also implemented a
poll function for getting the link status at regular
intervals.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
2020-04-21 13:57:06 +02:00
Vamsi Attunuru
56139e85ab net/octeontx: support VLAN filter offload
Patch adds support for vlan filter offload support.
MBOX messages for vlan filter on/off and vlan filter
entry add/rm are added to configure PCAM entries to
filter out the vlan traffic on a given port.

Patch also defines rx_offload_flag for vlan filtering.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
2020-04-21 13:57:06 +02:00
Harman Kalra
3151e6a687 net/octeontx: support MTU
Adding support for mtu eth operation which configures mtu based
on max pkt len.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
2020-04-21 13:57:06 +02:00
Harman Kalra
85221a0c7c net/octeontx: support multi segment
Adding multi segment support to the octeontx PMD. Also
adding the logic to share rx/tx ofloads with the eventdev
code.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
2020-04-21 13:57:06 +02:00
Amit Gupta
be284df082 net/octeontx: fix meson build for disabled drivers
Add a condition to check if octeontx drivers are disabled.
octeontx drivers are built only if dependent drivers i.e.
ethdev, mempool and common/octeontx are enabled.

Bugzilla ID: 387
Fixes: 7f615033d6 ("drivers/net: build Cavium NIC PMDs with meson")
Cc: stable@dpdk.org

Signed-off-by: Amit Gupta <agupta3@marvell.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
2020-04-21 13:57:06 +02:00
Pavan Nikhilesh
acec04c4b2 build: disable experimental API check internally
Remove setting ALLOW_EXPERIMENTAL_API individually for each Makefile and
meson.build. Instead, enable ALLOW_EXPERIMENTAL_API flag across app, lib
and drivers.
This changes reduces the clutter across the project while still
maintaining the functionality of ALLOW_EXPERIMENTAL_API i.e. warning
external applications about experimental API usage.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
2020-04-14 16:22:34 +02:00
Sunil Kumar Kori
9614459b1e net/octeontx: fix user supplied MAC address index
Earlier after a successful mac_addr_add operation, index was returned
by underlying layer which was unused but same as provided by DPDK API.

So API is enhanced to use application provided index location to add
MAC address entry.

Fixes: e4373bf1b3 ("net/octeontx: add unicast MAC filter")

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
2020-02-05 09:51:21 +01:00
Sunil Kumar Kori
e4373bf1b3 net/octeontx: add unicast MAC filter
At BGX, DMAC filter table can be enabled to allow defined hosts.
Patch implements 'mac_addr_add' and 'mac_addr_remove' ops to
add/remove MAC filters which uses BGX DMAC filter table.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
2020-01-17 19:46:26 +01:00
Pavan Nikhilesh
91c0c9789c net/octeontx: cleanup redundant mbox structs
Cleanup redudant mail box structures.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-11-26 07:49:30 +01:00
Pavan Nikhilesh
a6d6f0afd0 net/octeontx: add application domain validation
Add domain validation for PKI and PKO vfs

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-11-26 07:49:30 +01:00
Pavan Nikhilesh
b4134b2d31 common/octeontx: update mbox to version 1.1.3
Sync mail box data structures to version 1.1.3.
Add mail box version verification and defer initializing octeontx
devices if mail box version mismatches.
Update OCTEON TX limitaion with max mempool size used.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2019-11-26 07:49:30 +01:00
Nitin Saxena
679dfdc96e net/octeontx: fix mbuf corruption with large private sizes
When the priv_size of the mbuf is > 128 bytes, the mbuf would not be
properly constructed. This would lead to a corrupt mbuf.

This patch fixes the issue by accounting for
rte_pktmbuf_priv_size(pool) and RTE_PKTMBUF_HEADROOM
while configuring first skip register calculation.

Fixes: 197438ee9f ("net/octeontx: add Rx queue setup and release ops")
Cc: stable@dpdk.org

Suggested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Signed-off-by: Nitin Saxena <nitin.saxena@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-11-14 00:35:53 +01:00
Anoob Joseph
95a6b04f7d use registered name for OCTEON TX references
'OCTEON TX' is the registered name. All other usages need to be fixed.

Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-26 14:16:05 +02:00
Bruce Richardson
589dd86aaf net/*/base: allow use of experimental APIs in base code
The driver setting of "allow_experimental_apis" was not being used when
building the base code. To allow this we can manually put in a check
in the base code files for the setting and set the appropriate cflag
if it's needed.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Tested-by: Ilya Maximets <i.maximets@samsung.com>
2018-09-28 01:41:01 +02:00
Pavan Nikhilesh
d8dd31652c common/octeontx: move mbox to common folder
Move commonly used functions across mempool, event and net devices to a
common folder in drivers.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2018-04-04 23:14:52 +02:00
Pavan Nikhilesh
7f615033d6 drivers/net: build Cavium NIC PMDs with meson
Add Cavium octeontx and thunder nicvf to meson build infrastructure.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-01-30 21:58:59 +01:00
Jerin Jacob
aaf4363e1e drivers: use SPDX tag for Cavium copyright files
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-09 16:19:01 +01:00
Santosh Shukla
df6e0a06a3 drivers/net: rename physical address type to IOVA
Renamed data type from phys_addr_t to rte_iova_t.

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2017-11-06 22:44:26 +01:00
Thomas Monjalon
87cf4c6cca malloc: rename address mapping function to IOVA
The function rte_malloc_virt2phy() is renamed to rte_malloc_virt2iova().
The deprecated name is kept as an alias to avoid breaking the API.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-11-06 22:24:25 +01:00
Gaetan Rivet
c752998b5e pci: introduce library and driver
The PCI lib defines the types and methods allowing to use PCI elements.

The PCI bus implements a bus driver for PCI devices by constructing
rte_bus elements using the PCI lib.

Move the relevant code out of the EAL to its expected place.

Libraries, drivers, unit tests and applications are updated to use the
new rte_bus_pci.h header when necessary.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-10-26 23:17:31 +02:00
Pavan Nikhilesh
d0d6549860 net/octeontx: support event Rx adapter
Add functions to modify and delete qos responsible for mapping eth queues
to event queues used for configuring event Rx adapter.
The mbox functions have been moved from octeontx_pkivf.c to
octeontx_pkivf.h to allow event_octeontx to access them.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2017-10-25 14:03:43 +02:00
Santosh Shukla
89ee1e94bc mempool/octeontx: move mbox from event to mempool
Octeontx mempool pmd need mailbox for pool setup.
That mailbox was defined at drivers/event/octeontx.
So mempool has dependency on event/octeontx driver and
commit:8700239f7767 has added make rule which makes sure event/*
get build before mempool, but this rule introduces
cyclic dependency and may create problem to future
feature addition in drivers/Makefile.

Same problem noticed and reported in below thread:
http://dpdk.org/ml/archives/dev/2017-October/079187.html

The patch solves problem by moving mbox definition from
drivers/event/octeontx to drivers/mempool/octeontx.
Moving mbox files involves below changes:

* Renamed ssovf_mbox.[ch] --> octeontx_mbox.[ch]
* Renamed ssovf_probe.c  --> octeontx_ssovf.c
* Introduced pool logger file.
* Moved API from rte_pmd_octeontx_ssovf_version.map to
  rte_mempool_octeontx_version.map.
* Respective Makefile changes done in
  drivers/event/octeontx/Makefile and drivers/mempool/octeontx/Makefile.

Fixes: 8700239f77 ("mempool/octeontx: add build and log infrastructure")

Reported-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Tested-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2017-10-23 16:51:00 +02:00
Jerin Jacob
3813a10af5 net/octeontx/base: add remaining PKO operations
Adding remaining PKO operations like flow control, Tx channel query,
etc.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
Jerin Jacob
cad78ca238 net/octeontx/base: add base PKO operations
PKO is the packet output processing unit, which receives the packet
from the core and sends to the BGX interface. This patch adds the
basic PKO operation like open, close, start and stop. These operations
are implemented through mailbox messages and kernel PF driver being the
server to process the message with the logical port identifier.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
Jerin Jacob
6d28968ed1 net/octeontx/base: add remaining PKI operations
Adding remaining PKI operations and sync up the mailbox
definitions with PF driver.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
Jerin Jacob
b95c3413fa net/octeontx/base: add base PKI operations
PKI is packet input unit, which receives the packet from the
BGX interface. This patch adds the basic PKI operation like
open, close, start and stop. These operations are implemented through
mailbox messages and kernel PF driver being the server to process the
message with the logical port identifier.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
Jerin Jacob
445371e8ba net/octeontx/base: probe PKI and PKO PCIe VF devices
An octeontx ethdev device consists of multiple PKO VF devices and an PKI
VF device. On Octeontx HW, each Rx queues are enumerated as SSOVF device
which is exposed as event_octeontx device, Tx queues are enumerated as
PKOVF device, and ingress packet configuration is accomplished through
PKIVF device.

In order to expose as an single ethdev instance, On PCIe VF probe,
the driver stores the information associated with the PCIe VF device and
later with vdev infrastructure creates ethdev device with earlier
probed PCIe VF device.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
Jerin Jacob
e242dd1c0a net/octeontx/base: add remaining BGX operations
Adding remaining BGX operations like, link status, statistics,
promiscuous configuration etc.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
Jerin Jacob
4d02788045 net/octeontx/base: add base BGX operations
BGX is an HW MAC interface. This patch adds the basic BGX operation like
open, close, start and stop. These operations are implemented through
mailbox messages and kernel PF driver being the server to process the
message with the physical port identifier.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00
Jerin Jacob
f0c7bb1bf7 net/octeontx/base: add octeontx IO operations
Adding octeontx specific io operations. Added a stub for building
against non octeontx targets.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-10-12 01:36:57 +01:00