lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f288dbe8-d897-4c12-a866-fd70f259ebe4@amd.com>
Date: Fri, 28 Nov 2025 11:20:09 +0530
From: "Rangoju, Raju" <raju.rangoju@....com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, pabeni@...hat.com, edumazet@...gle.com,
 davem@...emloft.net, andrew+netdev@...n.ch, Shyam-sundar.S-k@....com
Subject: Re: [PATCH net-next] amd-xgbe: schedule NAPI on Rx Buffer Unavailable
 to prevent RX stalls



On 11/27/2025 8:43 AM, Jakub Kicinski wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
> 
> 
> On Mon, 24 Nov 2025 15:41:11 +0530 Raju Rangoju wrote:
>> When Rx Buffer Unavailable (RBU) interrupt is asserted, the device can
>> stall under load and suffer prolonged receive starvation if polling is
>> not initiated. Treat RBU as a wakeup source and schedule the appropriate
>> NAPI instance (per-channel or global) to promptly recover from buffer
>> shortages and refill descriptors.
> 
> You need to say more.. Under heavy load network devices will routinely
> run out of Rx buffers, it's expected if Rx processing is slower than
> the network. What hw condition and scenario exactly are you describing
> here?

During the bi-directional traffic device is running out of RX buffers, 
it could be because of slower rx processing. HW notifies this via Rx 
Buffer Unavailable (RBU) interrupt. What is being described above is 
that, driver should treat RBU interrupt as source to trigger the NAPI 
poll immediately, rather than waiting for regular rx interrupts to 
process the rx buffers.

> 
>>                dma_ch_isr = XGMAC_DMA_IOREAD(channel, DMA_CH_SR);
>> +             /* Precompute flags once */
>> +             ti  = !!XGMAC_GET_BITS(dma_ch_isr, DMA_CH_SR, TI);
>> +             ri  = !!XGMAC_GET_BITS(dma_ch_isr, DMA_CH_SR, RI);
>> +             rbu = !!XGMAC_GET_BITS(dma_ch_isr, DMA_CH_SR, RBU);
>> +             fbe = !!XGMAC_GET_BITS(dma_ch_isr, DMA_CH_SR, FBE);
> 
> Please split this into two patches, one pure refactoring with no
> functional changes and second one changing RBU handling.

Sure, that makes sense.

> 
>> +             if (rbu) {
>> +                     schedule_napi = true;
>> +                     pdata->ext_stats.rx_buffer_unavailable++;
>> +                     netif_dbg(pdata, intr, pdata->netdev,
>> +                               "RBU on DMA_CH %u, scheduling %s NAPI\n",
>> +                               i, per_ch_irq ? "per-channel" : "global");
> 
> I guess it's just _dbg() but as a general rule when the system is under
> overload printing stuff (potentially over UART) is the last thing you
> should be doing. How is this print useful to you?

Wanted to let the user know about RBU. But this can be dropped to avoid 
additional load on the UART.

> --
> pw-bot: cr


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ