linux/drivers/net/ethernet/intel/igb
Wander Lairson Costa 338c4d3902 igb: Disable threaded IRQ for igb_msix_other
During testing of SR-IOV, Red Hat QE encountered an issue where the
ip link up command intermittently fails for the igbvf interfaces when
using the PREEMPT_RT variant. Investigation revealed that
e1000_write_posted_mbx returns an error due to the lack of an ACK
from e1000_poll_for_ack.

The underlying issue arises from the fact that IRQs are threaded by
default under PREEMPT_RT. While the exact hardware details are not
available, it appears that the IRQ handled by igb_msix_other must
be processed before e1000_poll_for_ack times out. However,
e1000_write_posted_mbx is called with preemption disabled, leading
to a scenario where the IRQ is serviced only after the failure of
e1000_write_posted_mbx.

To resolve this, we set IRQF_NO_THREAD for the affected interrupt,
ensuring that the kernel handles it immediately, thereby preventing
the aforementioned error.

Reproducer:

    #!/bin/bash

    # echo 2 > /sys/class/net/ens14f0/device/sriov_numvfs
    ipaddr_vlan=3
    nic_test=ens14f0
    vf=${nic_test}v0

    while true; do
	    ip link set ${nic_test} mtu 1500
	    ip link set ${vf} mtu 1500
	    ip link set $vf up
	    ip link set ${nic_test} vf 0 vlan ${ipaddr_vlan}
	    ip addr add 172.30.${ipaddr_vlan}.1/24 dev ${vf}
	    ip addr add 2021:db8:${ipaddr_vlan}::1/64 dev ${vf}
	    if ! ip link show $vf | grep 'state UP'; then
		    echo 'Error found'
		    break
	    fi
	    ip link set $vf down
    done

Signed-off-by: Wander Lairson Costa <wander@redhat.com>
Fixes: 9d5c824399 ("igb: PCI-Express 82575 Gigabit Ethernet driver")
Reported-by: Yuying Ma <yuma@redhat.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-10-29 15:24:53 +01:00
..
e1000_82575.c intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
e1000_82575.h
e1000_defines.h
e1000_hw.h
e1000_i210.c intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
e1000_i210.h
e1000_mac.c intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
e1000_mac.h
e1000_mbx.c
e1000_mbx.h
e1000_nvm.c intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
e1000_nvm.h
e1000_phy.c intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
e1000_phy.h
e1000_regs.h
igb.h igb: Fix string truncation warnings in igb_set_fw_version 2024-02-14 09:43:09 -08:00
igb_ethtool.c igb: Remove setting of RX software timestamp 2024-09-06 09:34:18 +01:00
igb_hwmon.c
igb_main.c igb: Disable threaded IRQ for igb_msix_other 2024-10-29 15:24:53 +01:00
igb_ptp.c igb: extend PTP timestamp adjustments to i211 2024-02-28 20:16:48 -08:00
Makefile net: intel: Use *-y instead of *-objs in Makefile 2024-06-10 19:52:44 -07:00