Skip to contentSkip to conversation

bpf: Reset data_meta before running programs attached to devmap entry

PATCH Applied David Ahern 2 participants 2 messages Jun 8, 2020 – Jun 9, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bpf: Reset data_meta before running programs attached to devmap entry

This is a new context that does not handle metadata at the moment, so mark data_meta invalid.

Fixes fbee97feed9b ("bpf: Add support to attach bpf program to a devmap entry")
---
 kernel/bpf/devmap.c | 1 +
 1 file changed, 1 insertion(+)
kernel/bpf/devmap.c +1 -0
index 854b09beb16b..bfdff2faf5cb 100644
@@ -479,6 +479,7 @@ static struct xdp_buff *dev_map_run_prog(struct net_device *dev,
 	struct xdp_txq_info txq = { .dev = dev };
 	u32 act;
 
+	xdp_set_data_meta_invalid(xdp);
 	xdp->txq = &txq;
 
 	act = bpf_prog_run_xdp(xdp_prog, xdp);
Signature · 1 line
2.17.1
#1 lore raw
Quoted 6 lines · David Ahern

This is a new context that does not handle metadata at the moment, so mark data_meta invalid.

Fixes fbee97feed9b ("bpf: Add support to attach bpf program to a devmap entry")

Applied. Thanks