Skip to content

Commit 495f04c

Browse files
jsitnickiKernel Patches Daemon
authored andcommitted
xsk: 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 AF_XDP to pull from skb->data before calling skb_metadata_set(). Signed-off-by: Jakub Sitnicki <[email protected]>
1 parent 0df3d70 commit 495f04c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/xdp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,8 +768,8 @@ struct sk_buff *xdp_build_skb_from_zc(struct xdp_buff *xdp)
768768

769769
metalen = xdp->data - xdp->data_meta;
770770
if (metalen > 0) {
771-
skb_metadata_set(skb, metalen);
772771
__skb_pull(skb, metalen);
772+
skb_metadata_set(skb, metalen);
773773
}
774774

775775
skb_record_rx_queue(skb, rxq->queue_index);

0 commit comments

Comments
 (0)