Commit Graph

33962 Commits

Author SHA1 Message Date
Andrew Boyer
bbdf955ddc net/ionic: add lookup table for checksum flags
This improves performance by reducing branching.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:26 +02:00
Andrew Boyer
73b1c67e0c net/ionic: add lookup table for packet type
This improves performance by reducing branching.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:26 +02:00
Andrew Boyer
218afd825b net/ionic: do bulk allocations of Rx mbufs
Do bulk allocations to improve performance.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:26 +02:00
Andrew Boyer
9ac234ee8b net/ionic: support mbuf fast free
Use a put() rather than a free() in the optimized case.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:26 +02:00
Andrew Boyer
b4beb84af9 net/ionic: overhaul Tx for performance
Linearize Tx mbuf chains in the info array.
This avoids walking the mbuf chain during flush.
Move a few branches out of the hot path.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:26 +02:00
Andrew Boyer
7b20fc2f3c net/ionic: overhaul Rx for performance
Linearize RX mbuf chains in the expanded info array.
Clean one and fill one per CQE (completions are not coalesced).
Touch the mbufs as little as possible in the fill stage.
When touching the mbuf in the clean stage, use the rearm_data unions.
Ring the doorbell once at the end of the bulk clean/fill.

Signed-off-by: Neel Patel <neel.patel@amd.com>
Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:26 +02:00
Andrew Boyer
7b2eb674e1 net/ionic: do one-time init of Rx descriptors
These fields don't need to be set in the hot path.
This improves performance.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:25 +02:00
Andrew Boyer
c35f08f75e net/ionic: use helper variable in Tx
This improves readability.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:25 +02:00
Andrew Boyer
d5850081d2 net/ionic: precalculate segment lengths on Rx side
The first (header) segment includes the standard headroom.
Subsequent segments do not.

Store the fragment counts in the queue structure.

Precalculating improves performance by reducing
how much work must be done in the hot path.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:25 +02:00
Andrew Boyer
e7222f947e net/ionic: free all buffers during Rx queue stop
Free all of the mbufs in the receive queue when the queue is
stopped. This will allow them to be resized when the MTU is
changed.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:25 +02:00
Andrew Boyer
14f534be40 net/ionic: replace void pointer with actual type
This makes the code safer by helping the compiler catch errors.
Rename the variables, too; they're not callbacks anymore.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:25 +02:00
Andrew Boyer
0a00bdaf0b net/ionic: request notifyq interrupt only if supported
Enable the interrupt if the platform & device support it.
This prevents spurious interrupts on virtual platforms.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:25 +02:00
Andrew Boyer
8eaafff38f net/ionic: move PCI-specific code to separate file
For future support of virtual devices, move the PCI code to its own
file. Create a new device interface, struct ionic_dev_intf, to plug
in to common code.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
Signed-off-by: Neel Patel <neel.patel@amd.com>
Signed-off-by: R Mohamed Shah <mohamedshah.r@amd.com>
2022-10-18 23:38:25 +02:00
Andrew Boyer
e670eedcc0 net/ionic: allocate interrupts only if required
There is no need to allocate the interrupt vector list if
datapath packet interrupts are not enabled.
This conserves resources.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:25 +02:00
Andrew Boyer
2233544b59 net/ionic: remove unused identifiers
These bits are not used. Remove them to simplify the code.
Fix the spacing on the IONIC_ALIGN #define.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:25 +02:00
Andrew Boyer
84cf25bd7a net/ionic: remove doorbell map helper
There is only one doorbell page in DPDK configurations, so
no helper function is needed.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:25 +02:00
Andrew Boyer
b671e69ae4 net/ionic: update MTU calculations
Test min and max MTU against values read from firmware, for correctness.
Update the firmware field name, for clarity.
The device must be stopped before changing MTU, for correctness.
Store the calculated frame size in the queue, for performance.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
Signed-off-by: R Mohamed Shah <mohamedshah.r@amd.com>
2022-10-18 23:38:25 +02:00
Andrew Boyer
766687540c net/ionic: update license terms to remove GPL
Remove GPL2 and leave only BSD-3-Clause. This is more in line with
the norms of the DPDK community.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:25 +02:00
Andrew Boyer
0539834832 net/ionic: update supported devices list
Add listed support for the DSC-200.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:25 +02:00
Andrew Boyer
a5205992d9 net/ionic: update documentation and copyrights
Pensando Systems has been acquired by AMD.
Update all copyright strings and email addresses.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:25 +02:00
Andrew Boyer
26cc5dc29a net/ionic: fix reported error stats
Report descriptor errors in ierrors instead of imissed.
Don't report rx_queue_empty or rx_queue_disabled in imissed,
since those packet errors are already included in the
rx_*_drop_packets counters.
This makes the reported stats correct.

Fixes: 3cdfd90579 ("net/ionic: add stats")
Cc: stable@dpdk.org

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:25 +02:00
Andrew Boyer
5ab2983c80 net/ionic: fix Rx filter save
Check the match variable after copying cmd info, or else there can
be unexpected results.

Fixes: a27e0e96ab ("net/ionic: observe endianness in Rx filter")
Cc: stable@dpdk.org

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:25 +02:00
Andrew Boyer
d8fad46a3f net/ionic: fix adapter name for logging
Otherwise the log messages will be garbled.

Fixes: 4ae96cb88f ("net/ionic: do minor logging fixups")
Cc: stable@dpdk.org

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:25 +02:00
Andrew Boyer
7506961a48 net/ionic: fix endianness for RSS
This field needs to be LE when talking to the FW.

Fixes: 22e7171bc6 ("net/ionic: support RSS")
Cc: stable@dpdk.org

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:25 +02:00
Andrew Boyer
4a73559990 net/ionic: fix endianness for Rx and Tx
These fields all need to be LE when talking to the FW.

Fixes: a27d901331 ("net/ionic: add Rx and Tx handling")
Cc: stable@dpdk.org

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
2022-10-18 23:38:25 +02:00
Ivan Malov
d03c0e83cc net/bonding: fix descriptor limit reporting
Commit 5be3b40fea ("net/bonding: fix values of descriptor limits")
breaks reporting of "nb_min" and "nb_align" values obtained from
back-end devices' descriptor limits. This means that work done
by eth_bond_slave_inherit_desc_lim_first() as well as
eth_bond_slave_inherit_desc_lim_next() gets dismissed.

Revert the offending commit and use proper workaround
for the test case mentioned in the said commit.

Meanwhile, the test case itself might be poorly constructed.
It tries to run a bond with no back-end devices attached,
but, according to [1] ("Requirements / Limitations"),
at least one back-end device must be attached.

[1] doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst

Fixes: 5be3b40fea ("net/bonding: fix values of descriptor limits")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Chas Williams <3chas3@gmail.com>
2022-10-17 16:06:06 +02:00
Chaoyong He
c55abf6141 net/nfp: support RSS on VXLAN inner layer
Add the logics to support the feature of RSS packets based on
the inner layer of VXLAN tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-17 14:11:39 +02:00
Yuan Wang
23f2dfd3ca app/testpmd: remove unused parameter in Rx header split
Protocol header sequence checking is supported in the ethdev library,
the application does not need to do it again.

Coverity issue: 381396
Fixes: 52e2e7edcf ("app/testpmd: add protocol-based buffer split")

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-17 10:34:03 +02:00
Usman Tanveer
f66323717e net/bonding: fix mode 4 with dedicated queues
When dedicated queues are enable with bonding mode 4 (mlx5), the
application sets the flow, which cannot be set if the device is not
started. This fixed the issue by starting the device just before
setting the flow. Because device should be started to set the flow.
Also it does not effect other driver codes (I have tried on ixgbe).

Bugzilla ID: 759

Signed-off-by: Usman Tanveer <usman.tanveer@emumba.com>
Acked-by: Chas Williams <3chas3@gmail.com>
2022-10-17 10:26:17 +02:00
Huisong Li
e5f185512d net/bonding: add link speeds configuration
This patch adds link speeds configuration.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Chas Williams <3chas3@gmail.com>
2022-10-17 10:20:30 +02:00
Suanming Mou
886e7f1328 app/testpmd: fix flow template table argument name
There should be no spaces in flow command arguments name.
This commit removes incorrect arguments name in queue based table
template.

Fixes: ecdc927b99 ("app/testpmd: add async flow create/destroy operations")
Cc: stable@dpdk.org

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
Acked-by: Ori Kam <orika@nvidia.com>
2022-10-17 09:51:16 +02:00
Qiming Yang
e9351eaa4c app/testpmd: skip port reset in secondary process
As stop action has been forbidden in secondary process, so
the reset action should also not be allowed.

Fixes: a550baf24a ("app/testpmd: support multi-process")
Cc: stable@dpdk.org

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
2022-10-17 09:47:08 +02:00
Kalesh AP
e11052f3a4 net/bnxt: support proactive error handling mode
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
2022-10-17 08:34:05 +02:00
Chengwen Feng
53688fc909 net/hns3: support proactive error handling mode
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Dongdong Liu <liudongdong3@huawei.com>
2022-10-17 08:34:05 +02:00
Kalesh AP
eb0d471a89 ethdev: add proactive error handling mode
Some PMDs (e.g. hns3) could detect hardware or firmware errors, one
error recovery mode is to report RTE_ETH_EVENT_INTR_RESET event, and
wait for application invoke rte_eth_dev_reset() to recover the port,
however, this mode has the following weaknesses:

1) Due to different hardware and software design, some NIC port recovery
process requires multiple handshakes with the firmware and PF (when the
port is VF). It takes a long time to complete the entire operation for
one port, If multiple ports (for example, multiple VFs of a PF) are
reset at the same time, other VFs may fail to be reset. (Because the
reset processing is serial, the previous VFs must be processed before
the subsequent VFs).

2) The impact on the application layer is great, and it should stop
working queues, stop calling Rx and Tx functions, and then call
rte_eth_dev_reset(), and re-setup all again.

This patch introduces proactive error handling mode, the PMD will try
to recover from the errors itself. In this process, the PMD sets the
data path pointers to dummy functions (which will prevent the crash),
and also make sure the control path operations failed with retcode
-EBUSY.

Because the PMD recovers automatically, the application can only sense
that the data flow is disconnected for a while and the control API
returns an error in this period.

In order to sense the error happening/recovering, three events were
introduced:

1) RTE_ETH_EVENT_ERR_RECOVERING: used to notify the application that it
detected an error and the recovery is being started. Upon receiving the
event, the application should not invoke any control path APIs until
receiving RTE_ETH_EVENT_RECOVERY_SUCCESS or
RTE_ETH_EVENT_RECOVERY_FAILED event.

2) RTE_ETH_EVENT_RECOVERY_SUCCESS: used to notify the application that
it recovers successful from the error, the PMD already re-configures the
port, and the effect is the same as that of the restart operation.

3) RTE_ETH_EVENT_RECOVERY_FAILED: used to notify the application that it
recovers failed from the error, the port should not usable anymore. The
application should close the port.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2022-10-17 08:27:18 +02:00
Chengwen Feng
0d5c38bac7 ethdev: add error handling mode to device info
Currently, the defined error handling modes include:

1) NONE: it means no error handling modes are supported by this port.

2) PASSIVE: passive error handling, after the PMD detect that a reset
   is required, the PMD reports RTE_ETH_EVENT_INTR_RESET event, and
   application invoke rte_eth_dev_reset() to recover the port.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-17 08:26:36 +02:00
David Marchand
1785806098 ci: combine static and shared linking build tests
Save some cpu time and disk by testing linking against static and shared
library in single environments.

The .ci/linux-build.sh is modified so it reconfigures an existing build
directory: an empty DEF_LIB= means that static and shared builds are
to be tested.

ABI checks, documentation generation and unit tests are disabled for
static builds as they would be redundant with the check against
dynamically linked binaries, if any.

Note:
- --cross-file is an option that can be passed to meson only when
  creating a build environment,
- for some other reason, --buildtype and other non -D options are only
  accepted when setting up a build directory with meson. When
  reconfiguring, only their -D$option forms are accepted,

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
2022-10-27 13:20:12 +02:00
Stephen Hemminger
04d59ab2cf rwlock: promote trylock operations as stable
These have been in for since 19.02, time to take off the
experimental tag.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2022-10-27 13:00:11 +02:00
Stephen Hemminger
44830cc082 log: promote rte_log_list_types as stable
This call was added in 21.05 so time to make it stable.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2022-10-27 12:59:19 +02:00
Stephen Hemminger
23ce0afd37 eal: promote interruptible epoll wait as stable
This call was added in 20.11, so time to make it not experimental.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2022-10-27 12:58:02 +02:00
Stephen Hemminger
554befb02e license: add MIT license exception for GVE driver
Tech Board and Governing Board approved license a exception
for new Google driver. More general approval for MIT
usage will be handled as needed.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2022-10-27 12:36:22 +02:00
Stephen Hemminger
dc348f2e81 license: fix paths
The pathnames in the license directory README are incorrect.
The current repository puts license text in license/ not licenses/.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
2022-10-27 12:36:22 +02:00
Stephen Hemminger
d2e3c4b8a2 pcapng: record received RSS hash in pcap file
There is an option for recording RSS hash with packets in the
pcapng standard. This implements this for all received packets.

There is a corner case that can not be addressed with current
DPDK API's. If using rte_flow() and some hardware it is possible
to write a flow rule that uses another hash function like XOR.
But there is no API that records this, or provides the algorithm
info on a per-packet basis.

Wireshark recently merged support for displaying the recorded hash
option (for, yet to be released, version 4.1).

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Ben Magistro <koncept1@gmail.com>
2022-10-27 10:29:59 +02:00
Markus Theil
e6b42038e8 power: fix P-state number parsing
When converting atoi to strtol in a revision
of introducing sysfs support for turbo percentage,
a necessary check against '\n' returned by sysfs
was not introduced.

Fixes: de254dac60 ("power: read P-state turbo percentage from sysfs")

Signed-off-by: Markus Theil <markus.theil@secunet.com>
Reviewed-by: Reshma Pattan <reshma.pattan@intel.com>
2022-10-26 23:36:56 +02:00
Tadhg Kearney
b127e74cce power: fix open file descriptors leak
Close file pointers to Intel uncore sysfiles.

Coverity issue: 381400 381397
Fixes: 60b8a661a9 ("power: add Intel uncore frequency control")

Signed-off-by: Tadhg Kearney <tadhg.kearney@intel.com>
Reviewed-by: Reshma Pattan <reshma.pattan@intel.com>
2022-10-26 23:31:17 +02:00
Jakub Palider
c22752e678 raw/cnxk_bphy: extend PF function address access
Allows retrieval of SSO and NPA pffunc addresses without
device ownership and initialization.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Acked-by: Tomasz Duszynski <tduszynski@marvell.com>
2022-10-26 23:19:19 +02:00
Ali Alnubani
16de054160 lib: remove empty return types from doxygen comments
Recent versions of doxygen (1.9.4 and newer) complain about
documented return types for functions that don't return anything.

This patch removes these return types to fix build errors similar
to this one:
[..]
Generating doc/api/doxygen with a custom command
FAILED: doc/api/html
/usr/bin/python3 /path/to/doc/api/generate_doxygen.py doc/api/html
  /usr/bin/doxygen doc/api/doxy-api.conf
/root/dpdk/lib/eal/include/rte_bitmap.h:324: error: found documented
  return type for rte_bitmap_prefetch0 that does not return anything
  (warning treated as error, aborting now)
[..]

Tested with doxygen versions: 1.8.13, 1.8.17, 1.9.1, and 1.9.4.

Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2022-10-26 17:51:51 +02:00
Zhipeng Lu
b9b7dbcfc5 config/arm: add Phytium TengYun S2500
Here adds configs for Phytium server.

Signed-off-by: Zhipeng Lu <luzhipeng@cestc.cn>
2022-10-26 17:39:24 +02:00
Ilya Maximets
c983587d1e doc: fix support table for Ethernet/VLAN flow items
'has_vlan' attribute is only supported by sfc, mlx5 and cnxk.
Other drivers doesn't support it.  Most of them (like i40e) just
ignore it silently.  Some drivers (like mlx4) never had a full
support of the eth item even before introduction of 'has_vlan'
(mlx4 allows to match on the destination MAC only).

Same for the 'has_more_vlan' flag of the vlan item.

'has_vlan' is part of 'rte_flow_item_eth', so changing 'eth'
field to 'partial support' in documentation for all such drivers.
'has_more_vlan' is part of 'rte_flow_item_vlan', so changing
'vlan' to 'partial support' as well.

This doesn't solve the issue, but at least marks the problematic
drivers.

Some details are available in:
  https://bugs.dpdk.org/show_bug.cgi?id=958

Fixes: 09315fc838 ("ethdev: add VLAN attributes to ethernet and VLAN items")
Cc: stable@dpdk.org

Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2022-10-26 17:30:08 +02:00
Kumara Parameshwaran
72f51b097a gro: check payload length after trim
When packet is padded with extra bytes the
the validation of the payload length should be done
after the trim operation

Fixes: b8a55871d5 ("gro: trim tail padding bytes")
Cc: stable@dpdk.org

Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
Acked-by: Jiayu Hu <jiayu.hu@intel.com>
2022-10-26 17:18:11 +02:00