Re: [PATCH net-next v2] r8169: Use napi_schedule_irqoff()

Heiner Kallweit
2026-04-12T20:12:53Z

On 12.04.2026 15:51, Matt Vollrath wrote:
> On 4/12/26 07:30, Heiner Kallweit wrote:
>> On 12.04.2026 03:40, Matt Vollrath wrote:
>>> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
>>> index 791277e750ba..4c0ad0de3410 100644
>>> --- a/drivers/net/ethernet/realtek/r8169_main.c
>>> +++ b/drivers/net/ethernet/realtek/r8169_main.c
>>> @@ -4873,7 +4873,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
>>>           phy_mac_interrupt(tp->phydev);
>>>         rtl_irq_disable(tp);
>>> -    napi_schedule(&tp->napi);
>>> +    napi_schedule_irqoff(&tp->napi);
>>>   out:
>>>       rtl_ack_events(tp, status);
>>>
>>
>> Not using napi_schedule_irqoff() here is intentional,
>> see 2734a24e6e5d18522fbf599135c59b82ec9b2c9e.
>
> It looks like forced threading was fixed after your fix
> to mitigate the issue of forced threading not masking
> interrupts.
>
> see 81e2073c175b887398e5bca6c004efa89983f58d
>
> If I understand correctly, this should make
> napi_schedule_irqoff() safe in any interrupt handler.
>

I think 8380c81d5c4fced6f4397795a5ae65758272bbfd needs to be
mentioned too, because only with this change your patch is safe
under PREEMPT_RT. Best extend the commit message based on our
discussion. With that one:
Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>