Commit Graph

18395 Commits

Author SHA1 Message Date
Nithin Dabilpuram
aaea4c74b7 common/cnxk: update attributes to pools used by NIX
Update attributes to pools used by NIX so that we
can later identify which mempools are packet pools
and which are used for Inline IPsec enabled ethdev.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2022-09-22 10:44:07 +02:00
Nithin Dabilpuram
de00cc3521 common/cnxk: support setting NPA buffer type
Add support to set/get per-aura buf type with refs and
get sum of all aura limits matching given buf type mask
and val.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2022-09-22 10:44:06 +02:00
Nithin Dabilpuram
8e5a4adb4f common/cnxk: reserve AURA zero on CN10KA NPA
Reserve AURA id 0 on cn10k and provide mechanism to specifically
allocate it and free it via roc_npa_* API's.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2022-09-22 10:44:04 +02:00
Nithin Dabilpuram
da1ec39060 common/cnxk: delay inline device RQ enable to dev start
Similar to other RQ's, delay inline device RQ until dev is started
to avoid traffic reception when device is stopped.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2022-09-22 10:44:03 +02:00
Nithin Dabilpuram
93c6b6b271 common/cnxk: limit meta AURA workaround to CN10K A0
Limit meta AURA workaround to CN10K A0.
Also other NIX and Inline related Erratas applicable for CN10K A1.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2022-09-22 10:44:01 +02:00
Nithin Dabilpuram
8c8568bc0b net/cnxk: fix missing FC wait for outbound vector mode
Fix missing FC wait for outbound path in vector mode.
Currently only poll mode has it.

Fixes: 358d02d20a ("net/cnxk: support flow control for outbound inline")
Cc: stable@dpdk.org

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2022-09-22 10:44:00 +02:00
Srujana Challa
37da585095 common/cnxk: update inbound inline IPsec config mailbox
Updates CPT inbound inline IPsec configuration mailbox
to provide opcode and CPT credit from VF.
This patch also adds mailbox for reading inbound IPsec
configuration.

Signed-off-by: Srujana Challa <schalla@marvell.com>
2022-09-22 10:43:59 +02:00
Harman Kalra
80608c805c common/cnxk: add CN10KA A1 platform
Adding support for cn10ka A1 pass.
It is next minor pass of A0.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
2022-09-22 10:43:57 +02:00
Harman Kalra
59ceaa72d5 common/cnxk: fix part number for CN10K
Updating the logic for getting part and pass value for cn10k family,
as device tree compatible logic does not work in VMs.
Scanning all the PCI device and detect first RVU device, subsystem
device file gives part no and revision file provide pass information.

Fixes: 014a9e222b ("common/cnxk: add model init and IO handling API")
Cc: stable@dpdk.org

Signed-off-by: Harman Kalra <hkalra@marvell.com>
2022-09-22 10:43:56 +02:00
David Marchand
9b9c09a791 net/octeon_ep: fix build for non-x86
A recent change removed errno.h from rte_common.h.

x86 EAL headers seem to include it (probably via
rte_spinlock/rte_cpuflags) but other architectures won't.

Add an explicit inclusion.

Fixes: d826133ae8 ("net/octeon_ep: support CN10K SoC")

Signed-off-by: David Marchand <david.marchand@redhat.com>
2022-09-26 09:14:08 +02:00
Pavan Nikhilesh
1134d75881 cnxk/net: add FC check in vector event Tx path
Add FC check in vector event Tx path, the check needs to be
performed after head wait right before LMTST is issued.
Since, SQB pool FC updates are delayed w.r.t the actual
utilization of pool add sufficient slack to avoid overflow.

Added a new device argument to override the default SQB slack
configured, can be used as follows:

    -a 0002:02:00.0,sqb_slack=32

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2022-09-22 10:43:54 +02:00
Pavan Nikhilesh
f1cdb3c5b6 net/cnxk: enable PTP for event Rx adapter
Add support to enable PTP per ethernet device when that
specific ethernet device is connected to event device via
Rx adapter.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2022-09-22 10:43:53 +02:00
Sathesh Edara
d826133ae8 net/octeon_ep: support CN10K SoC
This patch adds the required functionality in the Octeon endpoint
driver to support the CN10K endpoint device. It adds the CN10K SoC
specific routines to configure, enable, and disable input and output
queues to establish basic data transfers.

Signed-off-by: Sathesh Edara <sedara@marvell.com>
2022-09-22 10:43:51 +02:00
Rakesh Kudurumalla
59d0913dae common/cnxk: fix part number for CN103xx
Correct the partnumber value for CN103xx.

Fixes: dd462f68f0 ("common/cnxk: support CN103XX platform")
Cc: stable@dpdk.org

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
2022-09-22 10:43:49 +02:00
Satheesh Paul
0c585f8858 common/cnxk: fix log level during MCAM allocation
Changed log level from info to debug for a log message
printed during MCAM allocation.

Fixes: 1f66919817 ("common/cnxk: improve MCAM entries management")
Cc: stable@dpdk.org

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
2022-09-22 10:43:47 +02:00
Sathesh Edara
b4e1325361 net/octeon_ep: support link status
Added functionality to update link speed, duplex mode and link state.

Signed-off-by: Sathesh Edara <sedara@marvell.com>
Acked-by: Veerasenareddy Burru <vburru@marvell.com>
2022-09-22 10:43:45 +02:00
Sathesh Edara
a57bc0ad37 net/octeon_ep: support basic statistics
Added functionality to fetch and reset ethdev stats.

Signed-off-by: Sathesh Edara <sedara@marvell.com>
Acked-by: Veerasenareddy Burru <vburru@marvell.com>
2022-09-22 10:43:44 +02:00
Sathesh Edara
423c8a2905 net/octeon_ep: rename octeontx_ep
This patch renames octeon end point driver from octeontx_ep to
octeon_ep to enable single unified driver to support current
OcteonTx and future Octeon PCI endpoint NICs to reflect common
driver for all Octeon based PCI endpoint NICs.

Signed-off-by: Sathesh Edara <sedara@marvell.com>
Acked-by: Veerasenareddy Burru <vburru@marvell.com>
2022-09-22 10:43:42 +02:00
Sunil Kumar Kori
ac35d4bf4c net/cnxk: support ingress meter pre-color
Added support for ingress meter pre-coloring for incoming
packet for CN10K platform.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
2022-09-22 10:43:40 +02:00
Jiawen Wu
abea8974c7 net/ngbe: support link down/up
Add support to set device link down/up.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-09-21 13:46:58 +02:00
Jiawen Wu
7fa2495bdd net/ngbe: fix YT PHY mixed mode link
Add to read link status register of UTP mode, to ensure link status of
mixed mode, for YT PHY.

Fixes: 1c44384fce ("net/ngbe: support custom PHY interfaces")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-09-21 13:46:58 +02:00
Jiawen Wu
d5774f0c82 net/ngbe: fix maximum frame size
Remain the same max frame size after the device restarts.

Fixes: 07baabb6a5 ("net/ngbe: support MTU set")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-09-21 13:46:58 +02:00
Jiawen Wu
c18385220f net/ngbe: remove semaphore between SW/FW
Since firmware does not use the semaphore between software and firmware.
Remove useless unilateral semaphore setting.

Fixes: f501a195bd ("net/ngbe: initialize and validate EEPROM")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-09-21 13:46:58 +02:00
Jiawen Wu
fee9350f1d net/ngbe: rename some extended statistics
Rename rx_oversize_errors to rx_oversize_cnt since it depends on giant
packet size limit instead of MTU, by hardware design.
Rename rx_drop_packets and tx_drop_packets to rx_dma_drop and tx_dma_drop
to indicate the drop location.
And add tx_dma_drop to extended statistics.

Fixes: 8b433d04ad ("net/ngbe: support device xstats")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-09-21 13:46:58 +02:00
Jiawen Wu
d7494d6d53 net/txgbe: rename some extended statistics
Rename rx_oversize_errors to rx_oversize_cnt since it depends on giant
packet size limit instead of MTU, by hardware design.
Rename rx_drop_packets to rx_rdb_drop to indicate the drop location.
And add rx_dma_drop to extended statistics.

Fixes: 91fe49c87d ("net/txgbe: support device xstats")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-09-21 13:46:58 +02:00
Jiawen Wu
61b7a046e2 net/txgbe: remove semaphore between SW/FW
Since firmware does not use the semaphore between software and firmware.
Remove useless unilateral semaphore setting.

Fixes: 35c90ecccf ("net/txgbe: add EEPROM functions")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-09-21 13:46:57 +02:00
Jiawen Wu
e3e74c45ec net/txgbe: fix OEM customized LED
Fix to read the correct mailbox register.

Fixes: f45834fd5c ("net/txgbe: support OEM customized LED")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-09-21 13:46:57 +02:00
Jiawen Wu
7147c01a49 net/txgbe: fix IPv6 flow rule
Convert the correct packet type and flow type, to fix IPv6 rule in FDIR.

Fixes: b973ee2674 ("net/txgbe: parse flow director filter")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
2022-09-21 13:46:57 +02:00
James Hershaw
c18806818f net/nfp: improve HW info header log readability
Prepend `0x` to the NFP HWINFO header value that is printed to improve
the readability of the printed statement.

Fixes: c7e9729da6 ("net/nfp: support CPP")
Cc: stable@dpdk.org

Signed-off-by: James Hershaw <james.hershaw@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-09-21 10:34:37 +02:00
James Hershaw
5aedd4c3db net/nfp: support Corigine PCIe ID
Previously the nfp driver has supported NFP chips with the Netronome
PCIe ID. This patch extends the PMD to also support NFP chips with the
Corigine PCIe vendor ID (0x1da8), which at this point are assumed to be
otherwise identical from a software perspective.

Signed-off-by: James Hershaw <james.hershaw@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-09-20 20:19:58 +02:00
Long Wu
3a5b6aaac6 net/nfp: use ethdev debug macro to control Rx/Tx log
Nfp log print was controlled by nfp's own macro before. This
commit changes to use dpdk debug rx/tx macro to control it.

Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-09-20 19:54:35 +02:00
Long Wu
da5c60d7ea net/nfp: add CPP log
Nfp cpp log print is not available before. Add support for cpp
print log and set its initial priority to "NOTICE".

Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-09-20 19:54:35 +02:00
Bhagyada Modali
e867021dad net/axgbe: remove freeing buffer in scattered Rx
Removed freeing of mbuf in scattered Rx as it should not be freed in rx.

Fixes: 965b3127d4 ("net/axgbe: support scattered Rx")
Cc: stable@dpdk.org

Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
2022-09-08 16:53:21 +02:00
Bhagyada Modali
2770163844 net/axgbe: optimise scattered Rx
Updated the logic to remove the extra increments of the variables.

Fixes: 965b3127d4 ("net/axgbe: support scattered Rx")
Cc: stable@dpdk.org

Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
2022-09-07 15:47:20 +02:00
Bhagyada Modali
970d2e22ca net/axgbe: fix checksum and RSS in scattered Rx
Updated the RSS hash and CSUM checks with first_seg instead of mbufs.

Fixes: 965b3127d4 ("net/axgbe: support scattered Rx")
Cc: stable@dpdk.org

Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
2022-09-05 18:45:36 +02:00
Bhagyada Modali
d901cc0596 net/axgbe: fix length of each segment in scattered Rx
Updating mbuf data_len, Pkt_len for each segment before chaining them

Fixes: 965b3127d4 ("net/axgbe: support scattered Rx")
Cc: stable@dpdk.org

Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
2022-09-05 18:45:36 +02:00
Bhagyada Modali
e73845354a net/axgbe: fix mbuf lengths in scattered Rx
Updated pkt_len and data_len in the last segment of the packet.

Fixes: 965b3127d4 ("net/axgbe: support scattered Rx")
Cc: stable@dpdk.org

Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
2022-09-05 18:45:36 +02:00
Bhagyada Modali
0fda97d737 net/axgbe: fix scattered Rx
Error check needs to be done only for last segment of Jumbo packet.
Freed first_seg and reset eop to 0 in error case

Fixes: 965b3127d4 ("net/axgbe: support scattered Rx")
Cc: stable@dpdk.org

Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com>
Acked-by: Chandubabu Namburu <chandu@amd.com>
2022-09-05 18:45:36 +02:00
Andrew Rybchenko
5007ac1318 ethdev: remove deprecated Flow Director configuration
Remove deprecated fdir_conf from device configuration.
Assume that mode is equal to RTE_FDIR_MODE_NONE.

Add internal Flow Director configuration copy in ixgbe and txgbe device
private data since flow API supports requires it. Initialize mode to
the first flow rule mode on the rule validation or creation.

Since Flow Director configuration data types are still used by some
drivers internally, move it from public API to ethdev driver internal
API.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Dongdong Liu <liudongdong3@huawei.com>
2022-08-31 15:24:23 +02:00
Andrew Rybchenko
9e9ca34da7 net/txgbe: add helper to get Flow Director configuration
Flow Director configuration is deprecated in generic ethdev device
configuration and will be removed. However, it is essential for
the driver flow API support and cannot be removed completely without
loss of flow API support. Prepare to move the configuration into
device private data.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-08-31 15:24:22 +02:00
Andrew Rybchenko
01c4b312e1 net/ixgbe: add helper to get Flow Director configuration
Flow Director configuration is deprecated in generic ethdev device
configuration and will be removed. However, it is essential for
the driver flow API support and cannot be removed completely without
loss of flow API support. Prepare to move the configuration into
device private data.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-08-31 15:24:22 +02:00
Peng Zhang
06be30d476 net/nfp: compose firmware file name with new hwinfo
During initialization of the NFP driver, a file name for loading
application firmware is composed using the NIC's AMDA information and
port type (count and speed). E.g.: "nic_AMDA0145-1012_2x10.nffw".

In practice there may be many variants for each NIC type, and many of
the variants relate to assembly components which do not concern the
driver and application firmware implementation. Yet the current scheme
leads to a different application firmware file name for each variant,
because they have different AMDA information.

To reduce proliferation of content-duplicated application firmware
images or symlinks, the NIC's management firmware will only expose
differences between variants that need different application firmware
via a newly introduced hwinfo, "nffw.partno".

Use of the existing hwinfo, "assembly.partno", is maintained in order to
support for NICs with management firmware that does not expose
"nffw.partno".

Fixes: 646ea79ce4 ("net/nfp: move PF functions into its own file")
Cc: stable@dpdk.org

Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-08-31 12:27:02 +02:00
David Marchand
f809040b41 net/failsafe: fix interrupt handle leak
A intr_handle is being allocated as a hack to get a (proxy) eventfd from
the Linux interrupt implementation.
But this handle is never freed.

Remove this convoluted hack and create an eventfd in Linux case.

Fixes: d61138d4f0 ("drivers: remove direct access to interrupt handle")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-30 12:59:54 +02:00
Yunjian Wang
ac95744076 net/bonding: fix double slave link status query
When link status polling mode is used, the slave link status is
queried twice, which may be inconsistent. To fix this, we can keep
the latest queried link state.

Fixes: a45b288ef2 ("bond: support link status polling")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
2022-08-25 19:04:09 +02:00
Yunjian Wang
007c5450df net/bonding: fix array overflow in Rx burst
In bond_ethdev_rx_burst() function, we check the validity of the
'active_slave' as this code:
if (++active_slave == slave_count)
	active_slave = 0;
However, the value of 'active_slave' maybe equal to 'slave_count',
when a slave is down. This is wrong and it can cause buffer overflow.
This patch fixes the issue by using '>=' instead of '=='.

Fixes: e1110e9776 ("net/bonding: fix Rx slave fairness")
Cc: stable@dpdk.org

Signed-off-by: Lei Ji <jilei8@huawei.com>
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
2022-08-25 18:27:13 +02:00
David Marchand
3ab51564e9 net/ixgbe: move bypass init in a testpmd command
Introduce a new command and remove the last part of specific port init
from testpmd.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-25 13:37:56 +02:00
David Marchand
0100a038fa net/ixgbe: move testpmd commands
Move related specific testpmd commands into this driver directory.
The bypass init is left in testpmd at this point and can be moved later.
While at it, fix checkpatch warnings.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-25 13:37:56 +02:00
David Marchand
8f4de2dba9 bus/pci: fill bus specific information
For diagnostic, it may be useful to provide the PCI vendor and device
id.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
1acb7f5474 dev: hide driver object
Make rte_driver opaque for non internal users.
This will make extending this object possible without breaking the ABI.

Introduce a new driver header and move rte_driver definition.
Update drivers and library to use the internal header.

Some applications may have been dereferencing rte_driver objects, mark
this object's accessors as stable.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
a04322f616 bus: hide bus object
Make rte_bus opaque for non internal users.
This will make extending this object possible without breaking the ABI.

Introduce a new driver header and move rte_bus definition and helpers.
Update drivers and library to use the internal header.

Some applications may have been dereferencing rte_bus objects, mark
this object's accessors as stable.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00