Skip to content

Commit 1a86a77

Browse files
feiqin-coriginekuba-moo
authored andcommitted
nfp: using napi_build_skb() to replace build_skb()
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@corigine.com> Signed-off-by: Louis Peens <louis.peens@corigine.com> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> Link: https://lore.kernel.org/r/20231026080058.22810-1-louis.peens@corigine.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 796dc3c commit 1a86a77

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

  • drivers/net/ethernet/netronome/nfp

drivers/net/ethernet/netronome/nfp/nfd3/dp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ static int nfp_nfd3_rx(struct nfp_net_rx_ring *rx_ring, int budget)
10701070
nfp_repr_inc_rx_stats(netdev, pkt_len);
10711071
}
10721072

1073-
skb = build_skb(rxbuf->frag, true_bufsz);
1073+
skb = napi_build_skb(rxbuf->frag, true_bufsz);
10741074
if (unlikely(!skb)) {
10751075
nfp_nfd3_rx_drop(dp, r_vec, rx_ring, rxbuf, NULL);
10761076
continue;

drivers/net/ethernet/netronome/nfp/nfdk/dp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@ static int nfp_nfdk_rx(struct nfp_net_rx_ring *rx_ring, int budget)
11891189
nfp_repr_inc_rx_stats(netdev, pkt_len);
11901190
}
11911191

1192-
skb = build_skb(rxbuf->frag, true_bufsz);
1192+
skb = napi_build_skb(rxbuf->frag, true_bufsz);
11931193
if (unlikely(!skb)) {
11941194
nfp_nfdk_rx_drop(dp, r_vec, rx_ring, rxbuf, NULL);
11951195
continue;

0 commit comments

Comments
 (0)