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>
This commit is contained in:
parent
796dc3c79d
commit
1a86a77a23
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user