Skip to content

Commit 53ee914

Browse files
Tariq ToukanSaeed Mahameed
authored andcommitted
net/mlx5e: Switch to using napi_build_skb()
Use napi_build_skb() which uses NAPI percpu caches to obtain skbuff_head instead of inplace allocation. napi_build_skb() calls napi_skb_cache_get(), which returns a cached skb, or allocates a bulk of NAPI_SKB_CACHE_BULK (16) if cache is empty. Performance test: TCP single stream, single ring, single core, default MTU (1500B). Before: 26.5 Gbits/sec After: 30.1 Gbits/sec (+13.6%) Signed-off-by: Tariq Toukan <[email protected]> Reviewed-by: Gal Pressman <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Reviewed-by: Maciej Fijalkowski <[email protected]> Reviewed-by: Alexander Lobakin <[email protected]>
1 parent 675f176 commit 53ee914

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_rx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,7 @@ struct sk_buff *mlx5e_build_linear_skb(struct mlx5e_rq *rq, void *va,
15561556
u32 frag_size, u16 headroom,
15571557
u32 cqe_bcnt, u32 metasize)
15581558
{
1559-
struct sk_buff *skb = build_skb(va, frag_size);
1559+
struct sk_buff *skb = napi_build_skb(va, frag_size);
15601560

15611561
if (unlikely(!skb)) {
15621562
rq->stats->buff_alloc_err++;

0 commit comments

Comments
 (0)