Skip to content

Commit 1a84b74

Browse files
MehdibenhadjkhelifaKernel Patches Daemon
authored andcommitted
bpf/cpumap.c: Remove unnecessary TODO comment
After discussion with bpf maintainers[1], queue_index could be propagated to the remote XDP program by the xdp_md struct[2] which makes this todo a misguide for future effort. [1]:https://lore.kernel.org/all/[email protected]/ [2]:https://docs.ebpf.io/linux/helper-function/bpf_xdp_adjust_meta/ Signed-off-by: Mehdi Ben Hadj Khelifa <[email protected]>
1 parent 9b33bf7 commit 1a84b74

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kernel/bpf/cpumap.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,10 @@ static int cpu_map_bpf_prog_run_xdp(struct bpf_cpu_map_entry *rcpu,
195195

196196
rxq.dev = xdpf->dev_rx;
197197
rxq.mem.type = xdpf->mem_type;
198-
/* TODO: report queue_index to xdp_rxq_info */
198+
/* The NIC RX queue_index is lost after the frame redirection
199+
* but in case of need, it can be passed as a custom XDP
200+
* metadata via xdp_md struct to the remote XDP program
201+
*/
199202

200203
xdp_convert_frame_to_buff(xdpf, &xdp);
201204

0 commit comments

Comments
 (0)