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: <43eebd30-cb23-ed90-200a-118f5726e2d4@nvidia.com>
Date: Mon, 15 May 2023 09:10:31 +0300
From: Tariq Toukan <tariqt@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net
Cc: netdev@...r.kernel.org, edumazet@...gle.com, pabeni@...hat.com,
 saeedm@...dia.com, leon@...nel.org, brouer@...hat.com, tariqt@...lanox.com,
 Tariq Toukan <tariqt@...dia.com>
Subject: Re: [PATCH net] net/mlx5e: do as little as possible in napi poll when
 budget is 0



On 12/05/2023 5:57, Jakub Kicinski wrote:
> NAPI gets called with budget of 0 from netpoll, which has interrupts
> disabled. We should try to free some space on Tx rings and nothing
> else.
> 
> Specifically do not try to handle XDP TX or try to refill Rx buffers -
> we can't use the page pool from IRQ context. Don't check if IRQs moved,
> either, that makes no sense in netpoll. Netpoll calls _all_ the rings
> from whatever CPU it happens to be invoked on.
> 
> In general do as little as possible, the work quickly adds up when
> there's tens of rings to poll.
> 
> The immediate stack trace I was seeing is:
> 
>      __do_softirq+0xd1/0x2c0
>      __local_bh_enable_ip+0xc7/0x120
>      </IRQ>
>      <TASK>
>      page_pool_put_defragged_page+0x267/0x320
>      mlx5e_free_xdpsq_desc+0x99/0xd0
>      mlx5e_poll_xdpsq_cq+0x138/0x3b0
>      mlx5e_napi_poll+0xc3/0x8b0
>      netpoll_poll_dev+0xce/0x150
> 
> AFAIU page pool takes a BH lock, releases it and since BH is now
> enabled tries to run softirqs.
> 
> Fixes: 60bbf7eeef10 ("mlx5: use page_pool for xdp_return_frame call")
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> I'm pointing Fixes at where page_pool was added, although that's
> probably not 100% fair.
> 
> CC: saeedm@...dia.com
> CC: leon@...nel.org
> CC: brouer@...hat.com
> CC: tariqt@...lanox.com
> ---

Thanks for your patch.
Reviewed-by: Tariq Toukan <tariqt@...dia.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ