[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251124-skb-meta-safeproof-netdevs-rx-only-v1-6-8978f5054417@cloudflare.com>
Date: Mon, 24 Nov 2025 17:28:42 +0100
From: Jakub Sitnicki <jakub@...udflare.com>
To: bpf@...r.kernel.org
Cc: netdev@...r.kernel.org, kernel-team@...udflare.com,
Martin KaFai Lau <martin.lau@...ux.dev>
Subject: [PATCH RFC bpf-next 06/15] net/mlx5e: Call skb_metadata_set when
skb->data points at metadata end
Prepare to track skb metadata location independently of MAC header offset.
Following changes will make skb_metadata_set() record where metadata ends
relative to skb->head. Hence the helper must be called when skb->data
already points past the metadata area.
Adjust the driver to pull from skb->data before calling skb_metadata_set().
Signed-off-by: Jakub Sitnicki <jakub@...udflare.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c
index 2b05536d564a..20c983c3ce62 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c
@@ -237,8 +237,8 @@ static struct sk_buff *mlx5e_xsk_construct_skb(struct mlx5e_rq *rq, struct xdp_b
skb_put_data(skb, xdp->data_meta, totallen);
if (metalen) {
- skb_metadata_set(skb, metalen);
__skb_pull(skb, metalen);
+ skb_metadata_set(skb, metalen);
}
return skb;
--
2.43.0
Powered by blists - more mailing lists