File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,4 +98,36 @@ int xdp_pass_func(struct xdp_md *ctx)
9898 return xdp_stats_record_action (ctx , XDP_PASS );
9999}
100100
101+ SEC ("xdp_tailgrow" )
102+ int xdp_tailgrow_func (struct xdp_md * ctx )
103+ {
104+ // void *data_end = (void *)(long)ctx->data_end;
105+ // void *data = (void *)(long)ctx->data;
106+ //struct hdr_cursor nh;
107+ int offset ;
108+
109+ offset = 10 ;
110+ bpf_xdp_adjust_tail (ctx , offset );
111+ return xdp_stats_record_action (ctx , XDP_PASS );
112+ }
113+
114+ SEC ("xdp_tailgrow_tx" )
115+ int xdp_tailgrow_func2 (struct xdp_md * ctx )
116+ {
117+ // void *data_end = (void *)(long)ctx->data_end;
118+ // void *data = (void *)(long)ctx->data;
119+ //struct hdr_cursor nh;
120+ int offset ;
121+
122+ offset = 32 ;
123+ bpf_xdp_adjust_tail (ctx , offset );
124+ return xdp_stats_record_action (ctx , XDP_TX );
125+ }
126+
127+ SEC ("xdp_tx" )
128+ int xdp_tx_func (struct xdp_md * ctx )
129+ {
130+ return xdp_stats_record_action (ctx , XDP_TX );
131+ }
132+
101133char _license [] SEC ("license" ) = "GPL" ;
You can’t perform that action at this time.
0 commit comments