[PATCH v28 01/20] net: Introduce direct data placement tcp offload
Eric Dumazet
edumazet at google.com
Sat May 17 00:38:32 PDT 2025
On Fri, May 16, 2025 at 7:47 AM Aurelien Aptel <aaptel at nvidia.com> wrote:
>
> Hi Eric,
>
> We have looked into your suggestions, but both have drawbacks.
>
> The first idea was to make the tailroom small/empty to prevent
> condensing. The issue is that the header is already placed at the skb
> head, and there could be another PDU after the first payload.
What function in the driver puts the headers in skb->head ? Of course
you would need to change it.
Something like this
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
index 5fd70b4d55beb4ed277a5ea896a6859350b72d21..9a87b3bb46c01dc09d729923e705ca6df93f1df1
100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
@@ -553,6 +553,11 @@ mlx5e_copy_skb_header(struct mlx5e_rq *rq, struct
sk_buff *skb,
dma_sync_single_for_cpu(rq->pdev, addr + dma_offset, len,
rq->buff.map_dir);
+
+ if (ddp_mode) {
+ skb_reserve(skb, skb->end - skb->tail);
+ len = headlen;
+ }
skb_copy_to_linear_data(skb, from, len);
}
More information about the Linux-nvme
mailing list