2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-22 01:51:26 +00:00

netdev-dpdk: Use LSC interrupt mode.

Querying link status may get delayed for an undeterministic (long) time
with mlx5 ports. This is a consequence of the mlx5 driver calling ethtool
kernel API and getting stuck on the kernel RTNL lock while some other
operation is in progress under this lock.

One impact for long link status query is that it is called under the bond
lock taken in write mode periodically in bond_run().
In parallel, datapath threads may block requesting to read bonding related
info (like for example in bond_check_admissibility()).

The LSC interrupt mode is available with many DPDK drivers and is used by
default with testpmd.

It seems safe enough to switch on this feature by default in OVS.
We keep the per interface option to disable this feature in case of an
unforeseen bug.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Robin Jarry <rjarry@redhat.com>
Acked-by: Mike Pattrick <mkp@redhat.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
This commit is contained in:
David Marchand 2024-06-19 18:00:55 +02:00 committed by Kevin Traynor
parent 6b09799f03
commit 2f196c80e7
4 changed files with 21 additions and 7 deletions

View File

@ -546,8 +546,8 @@ the firmware every time to fulfil this request.
Note that not all PMD drivers support LSC interrupts.
The default configuration is polling mode. To set interrupt mode, option
``dpdk-lsc-interrupt`` has to be set to ``true``.
The default configuration is interrupt mode. To set polling mode, option
``dpdk-lsc-interrupt`` has to be set to ``false``.
Command to set interrupt mode for a specific interface::
$ ovs-vsctl set interface <iface_name> options:dpdk-lsc-interrupt=true

3
NEWS
View File

@ -9,6 +9,9 @@ Post-v3.3.0
https://github.com/openvswitch/ovs.git
- DPDK:
* OVS validated with DPDK 23.11.1.
* Link status changes are now handled via interrupt mode if the DPDK
driver supports it. It is possible to revert to polling mode by setting
per interface 'options:dpdk-lsc-interrupt' to 'false'.
v3.3.0 - 16 Feb 2024

View File

@ -2397,7 +2397,18 @@ netdev_dpdk_set_config(struct netdev *netdev, const struct smap *args,
}
}
lsc_interrupt_mode = smap_get_bool(args, "dpdk-lsc-interrupt", false);
lsc_interrupt_mode = smap_get_bool(args, "dpdk-lsc-interrupt", true);
if (lsc_interrupt_mode && !(*info.dev_flags & RTE_ETH_DEV_INTR_LSC)) {
if (smap_get(args, "dpdk-lsc-interrupt")) {
VLOG_WARN_BUF(errp, "'%s': link status interrupt is not "
"supported.", netdev_get_name(netdev));
err = EINVAL;
goto out;
}
VLOG_DBG("'%s': not enabling link status interrupt.",
netdev_get_name(netdev));
lsc_interrupt_mode = false;
}
if (dev->requested_lsc_interrupt_mode != lsc_interrupt_mode) {
dev->requested_lsc_interrupt_mode = lsc_interrupt_mode;
netdev_request_reconfigure(netdev);

View File

@ -4647,12 +4647,12 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \
<column name="options" key="dpdk-lsc-interrupt"
type='{"type": "boolean"}'>
<p>
Set this value to <code>true</code> to configure interrupt mode for
Link State Change (LSC) detection instead of poll mode for the DPDK
interface.
Set this value to <code>false</code> to configure poll mode for
Link State Change (LSC) detection instead of interrupt mode for the
DPDK interface.
</p>
<p>
If this value is not set, poll mode is configured.
If this value is not set, interrupt mode is configured.
</p>
<p>
This parameter has an effect only on netdev dpdk interfaces.