File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,10 +12,14 @@ The BPF helper =bpf_xdp_adjust_tail= is being extended with
1212capabilites to grow the packet size at tail. To use this for
1313anything, we need to demo how to access packet data at XDP =data_end=.
1414
15- One use-case, which is showing in main example [[file:xdp_prog_kern.c]],
16- is is to **add timestamps in extended tailroom** at XDP processing
17- time, which will survive when packet is processed by network-stack
18- (via XDP_PASS). One way to capture this timestamp is to use
19- =tcpdump=, which could use this to determine the time spend in
15+ One use-case is to *add timestamps in extended tailroom* at XDP
16+ processing time, which will survive when packet is processed by
17+ network-stack (via XDP_PASS). One way to capture this timestamp is to
18+ use =tcpdump=, which could use this to determine the time spend in
2019network-stack (on NIC without hardware timestamps).
2120
21+ In main example [[file:xdp_prog_kern.c]], the =xdp_tailgrow_parse= code
22+ implements this by parsing up-to the IP-layer, and using the
23+ IP-headers total-length field ([[https://elixir.bootlin.com/linux/v5.6.10/source/include/uapi/linux/ip.h#L97][iphdr->tot_len]]). See the code for the
24+ strange bounding checks needed to convince the verifier. Notice, this
25+ is limited to IPv4 ICMP packets for testing purposes.
You can’t perform that action at this time.
0 commit comments