On 6/13/24 11:40, David Marchand wrote:
> On Wed, Jun 12, 2024 at 4:33 PM Kevin Traynor <[email protected]> wrote:
>>
>> When a device reset interrupt event (RTE_ETH_EVENT_INTR_RESET)
>> is detected for a DPDK device added to OVS, a device reset is
>> performed.
>>
>> If a device reset interrupt event is detected for a device before
>> it is added to OVS, device reset is not called.
>>
>> If that device is later attempted to be added to OVS, it may fail
>> while being configured if it is still pending a reset as pending
>> reset is not checked when adding a device.
>>
>> A simple way to force a reset event from the ice driver for an
>> iavf device is to set the mac address after binding iavf dev to
>> vfio but before adding to OVS. (note: should not be set like this
>> in normal case). e.g.
>>
>> $ echo 2 > /sys/class/net/ens3f0/device/sriov_numvfs
>> $ ./devbind.py -b vfio-pci 0000:d8:01.1
>> $ ip link set ens3f0 vf 1 mac 26:ab:e6:6f:79:4d
>> $ ovs-vsctl add-port br0 dpdk0 -- set Interface dpdk0 type=dpdk \
>>       options:dpdk-devargs=0000:d8:01.1
>>
>> |dpdk|ERR|Port1 dev_configure = -1
>> |netdev_dpdk|WARN|Interface dpdk0 eth_dev setup error
>>     Operation not permitted
>> |netdev_dpdk|ERR|Interface dpdk0(rxq:1 txq:5 lsc interrupt mode:false)
>>     configure error: Operation not permitted
>> |dpif_netdev|ERR|Failed to set interface dpdk0 new configuration
>>
>> Add a check if there was any previous device reset interrupt events
>> when a device is added to OVS. If there was, perform the reset
>> before continuing with the rest of the configuration.
>>
>> netdev_dpdk_pending_reset[] already tracks device reset interrupt
>> events for all devices, so it can be reused to check if there is a
>> reset needed during configuration of newly added devices. By extending
>> it's usage, dev->reset_needed is no longer needed.
>>
> 
> Maybe add a Fixes: and I think we should backport this.
> 
>> Signed-off-by: Kevin Traynor <[email protected]>
>> ---
>>  lib/netdev-dpdk.c | 20 ++++++++++++--------
>>  1 file changed, 12 insertions(+), 8 deletions(-)
>
> The patch looks good to me.
> Reviewed-by: David Marchand <[email protected]>

Thanks, Kevin and David!  I fixed the nits and applied the change.
Also backported to branch-3.3.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to