[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <40bbdd83-d62d-420b-ae6f-a16695383b41@intel.com>
Date: Thu, 26 Oct 2023 10:55:07 +0200
From: Wojciech Drewek <wojciech.drewek@...el.com>
To: Louis Peens <louis.peens@...igine.com>, David Miller
<davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
<pabeni@...hat.com>
CC: Fei Qin <fei.qin@...igine.com>, <netdev@...r.kernel.org>,
<oss-drivers@...igine.com>
Subject: Re: [PATCH net-next v2] nfp: using napi_build_skb() to replace
build_skb()
On 26.10.2023 10:00, Louis Peens wrote:
> From: Fei Qin <fei.qin@...igine.com>
>
> The napi_build_skb() can reuse the skb in skb cache per CPU or
> can allocate skbs in bulk, which helps improve the performance.
>
> Signed-off-by: Fei Qin <fei.qin@...igine.com>
> Signed-off-by: Louis Peens <louis.peens@...igine.com>
> ---
> v1->v2:
> Dropped the changes for the *_ctrl_* paths, as they were not within
> napi context. Thanks Wojciech for pointing this out.
No problem :)
Reviewed-by: Wojciech Drewek <wojciech.drewek@...el.com>
>
> drivers/net/ethernet/netronome/nfp/nfd3/dp.c | 2 +-
> drivers/net/ethernet/netronome/nfp/nfdk/dp.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/netronome/nfp/nfd3/dp.c b/drivers/net/ethernet/netronome/nfp/nfd3/dp.c
> index 0cc026b0aefd..17381bfc15d7 100644
> --- a/drivers/net/ethernet/netronome/nfp/nfd3/dp.c
> +++ b/drivers/net/ethernet/netronome/nfp/nfd3/dp.c
> @@ -1070,7 +1070,7 @@ static int nfp_nfd3_rx(struct nfp_net_rx_ring *rx_ring, int budget)
> nfp_repr_inc_rx_stats(netdev, pkt_len);
> }
>
> - skb = build_skb(rxbuf->frag, true_bufsz);
> + skb = napi_build_skb(rxbuf->frag, true_bufsz);
> if (unlikely(!skb)) {
> nfp_nfd3_rx_drop(dp, r_vec, rx_ring, rxbuf, NULL);
> continue;
> diff --git a/drivers/net/ethernet/netronome/nfp/nfdk/dp.c b/drivers/net/ethernet/netronome/nfp/nfdk/dp.c
> index 33b6d74adb4b..8d78c6faefa8 100644
> --- a/drivers/net/ethernet/netronome/nfp/nfdk/dp.c
> +++ b/drivers/net/ethernet/netronome/nfp/nfdk/dp.c
> @@ -1189,7 +1189,7 @@ static int nfp_nfdk_rx(struct nfp_net_rx_ring *rx_ring, int budget)
> nfp_repr_inc_rx_stats(netdev, pkt_len);
> }
>
> - skb = build_skb(rxbuf->frag, true_bufsz);
> + skb = napi_build_skb(rxbuf->frag, true_bufsz);
> if (unlikely(!skb)) {
> nfp_nfdk_rx_drop(dp, r_vec, rx_ring, rxbuf, NULL);
> continue;
Powered by blists - more mailing lists