Skip to content

Commit bb15652

Browse files
Mehdi Ben Hadj KhelifaKernel 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 6efc16b commit bb15652

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

kernel/bpf/cpumap.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +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 */
199-
198+
/* RX queue_index is not preserved after redirection.
199+
* If needed, the sender can embed it in XDP metadata
200+
* (via bpf_xdp_adjust_meta) for the remote program.
201+
*/
200202
xdp_convert_frame_to_buff(xdpf, &xdp);
201203

202204
act = bpf_prog_run_xdp(rcpu->prog, &xdp);

0 commit comments

Comments
 (0)