]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
net/mlx5e: SHAMPO, Use net_prefetch API
authorTariq Toukan <tariqt@nvidia.com>
Mon, 3 Jun 2024 21:22:06 +0000 (00:22 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 6 Jun 2024 03:12:58 +0000 (20:12 -0700)
Let the SHAMPO functions use the net-specific prefetch API,
similar to all other usages.

Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://lore.kernel.org/r/20240603212219.1037656-2-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c

index b5333da20e8a7c8c36a86e53ab3b36edd6540098..369d101bf03c7f575ae1300d980e7f832df9542b 100644 (file)
@@ -2212,8 +2212,8 @@ mlx5e_skb_from_cqe_shampo(struct mlx5e_rq *rq, struct mlx5e_mpw_info *wi,
        if (likely(frag_size <= BIT(MLX5E_SHAMPO_LOG_MAX_HEADER_ENTRY_SIZE))) {
                /* build SKB around header */
                dma_sync_single_range_for_cpu(rq->pdev, head->addr, 0, frag_size, rq->buff.map_dir);
-               prefetchw(hdr);
-               prefetch(data);
+               net_prefetchw(hdr);
+               net_prefetch(data);
                skb = mlx5e_build_linear_skb(rq, hdr, frag_size, rx_headroom, head_size, 0);
 
                if (unlikely(!skb))
@@ -2230,7 +2230,7 @@ mlx5e_skb_from_cqe_shampo(struct mlx5e_rq *rq, struct mlx5e_mpw_info *wi,
                        return NULL;
                }
 
-               prefetchw(skb->data);
+               net_prefetchw(skb->data);
                mlx5e_copy_skb_header(rq, skb, head->frag_page->page, head->addr,
                                      head_offset + rx_headroom,
                                      rx_headroom, head_size);