xdp-tutorial icon indicating copy to clipboard operation
xdp-tutorial copied to clipboard

extend packet

Open Nian0124 opened this issue 2 years ago • 5 comments

hi,everone ! I would like to ask if there is a way to use XDP to extend the packet, such as adding a new field, and ensure that the end data is not lost.

Nian0124 avatar Oct 19 '23 06:10 Nian0124

oh, I got it !

Nian0124 avatar Oct 19 '23 12:10 Nian0124

oh, I got it !

How you did that? I have a similar problem in https://github.com/xdp-project/xdp-tutorial/issues/376

ahihi8z8z avatar Nov 23 '23 10:11 ahihi8z8z

You can use helper calls like bpf_xdp_adjust_head

sachintiptur avatar Dec 06 '23 13:12 sachintiptur

oh, I got it !

How you did that? I have a similar problem in #376

sorry that I don't check my email timely ; I just use the helpers "bpf_xdp_adjust_tail" This function adjusts the position of the packet tail; also "bpf_xdp_adjust_head" adjust the position of the packet header; This is used by a blogger when adding a timestamp to the tail, but I can't find that post.

Nian0124 avatar Dec 19 '23 13:12 Nian0124

oh, I got it !

How you did that? I have a similar problem in #376

sorry that I don't check my email timely ; I just use the helpers "bpf_xdp_adjust_tail" This function adjusts the position of the packet tail; also "bpf_xdp_adjust_head" adjust the position of the packet header; This is used by a blogger when adding a timestamp to the tail, but I can't find that post.

ooohhh , just the xdp-tutorial/experiment01-traigrow ; hhhhh

Nian0124 avatar Dec 19 '23 14:12 Nian0124