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 <[email protected]> Signed-off-by: Louis Peens <[email protected]> Reviewed-by: Wojciech Drewek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 796dc3c commit 1a86a77

File tree

2 files changed

+2
-2
lines changed
  • drivers/net/ethernet/netronome/nfp

2 files changed

+2
-2
lines changed

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)