[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACKFLinqyGCwmgV=04jB=Mb_Vxqtzf98VccjwcpHJreOLEBqYQ@mail.gmail.com>
Date: Tue, 22 Aug 2023 18:45:04 -0700
From: Michael Chan <michael.chan@...adcom.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com
Subject: Re: [PATCH net-next] bnxt: use the NAPI skb allocation cache
On Tue, Aug 22, 2023 at 2:51 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> All callers of build_skb() (*) in bnxt are in NAPI context.
> The budget checking is somewhat convoluted because in the shared
> completion queue cases Rx packets are discarded by netpoll
> by forcing an error (E). But that happens before skb allocation.
> Only a call chain starting at __bnxt_poll_work() can lead to
> an skb allocation and it checks budget (b).
>
> * bnxt_rx_multi_page_skb
> * bnxt_rx_skb
> ` bp->rx_skb_func
> * bnxt_tpa_end
> ` bnxt_rx_pkt
> E bnxt_force_rx_discard
> E bnxt_poll_nitroa0
> b __bnxt_poll_work
>
> Use napi_build_skb() to take advantage of the skb cache.
> In iperf tests with HW-GRO enabled it barely makes a difference
> but in cases where HW-GRO is not as effective (or disabled) it
> can give even a >10% boost (20.7Gbps -> 23.1Gbps).
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
Confirming that build_skb() is always called in NAPI context and
budget is checked. Thanks.
Reviewed-by: Michael Chan <michael.chan@...adcom.com>
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4209 bytes)
Powered by blists - more mailing lists