The code is very similar, but the simple case can skip a few branches
in the hot path. This improves PPS when 10KB mbufs are used.
S/G is enabled on the Rx side by offload DEV_RX_OFFLOAD_SCATTER.
S/G is enabled on the Tx side by offload DEV_TX_OFFLOAD_MULTI_SEGS.
S/G is automatically enabled on the Rx side if the provided mbufs are
too small to hold the maximum possible frame.
To enable S/G in testpmd, add these args:
--rx-offloads=0x2000 --tx-offloads=0x8000
Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
Signed-off-by: R Mohamed Shah <mohamedshah.r@amd.com>
Some clients have opinions about how often to flush the
transmit ring.
The default value is the number of Tx descriptors minus the
default Tx burst size.
Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
When 'ionic_cmb' is set to '1', queue memory will be allocated from
the device's onboard memory (Controller Memory Buffer). In some
configurations, this will dramatically reduce packet latency and
increase PPS.
Add the WC_ACTIVATE flag to the PCI driver flags.
Write combining must be enabled to achieve the maximum PPS.
When the queue is in the CMB, descriptors cannot be prefetched.
Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
Signed-off-by: Neel Patel <neel.patel@amd.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>