* [PATCH bpf] bpf: Reset data_meta before running programs attached to devmap entry
@ 2020-06-08 15:17 David Ahern
2020-06-09 18:20 ` Alexei Starovoitov
0 siblings, 1 reply; 2+ messages in thread
From: David Ahern @ 2020-06-08 15:17 UTC (permalink / raw)
To: netdev; +Cc: bpf, daniel, ast, 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")
Signed-off-by: David Ahern <dsahern@kernel.org>
---
kernel/bpf/devmap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c
index 854b09beb16b..bfdff2faf5cb 100644
--- a/kernel/bpf/devmap.c
+++ b/kernel/bpf/devmap.c
@@ -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);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bpf] bpf: Reset data_meta before running programs attached to devmap entry
2020-06-08 15:17 [PATCH bpf] bpf: Reset data_meta before running programs attached to devmap entry David Ahern
@ 2020-06-09 18:20 ` Alexei Starovoitov
0 siblings, 0 replies; 2+ messages in thread
From: Alexei Starovoitov @ 2020-06-09 18:20 UTC (permalink / raw)
To: David Ahern; +Cc: Network Development, bpf, Daniel Borkmann, Alexei Starovoitov
On Mon, Jun 8, 2020 at 8:17 AM David Ahern <dsahern@kernel.org> wrote:
>
> 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")
> Signed-off-by: David Ahern <dsahern@kernel.org>
Applied. Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-09 18:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-08 15:17 [PATCH bpf] bpf: Reset data_meta before running programs attached to devmap entry David Ahern
2020-06-09 18:20 ` Alexei Starovoitov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).