Toke Høiland-Jørgensen
43e74c0267
bpf_xdp_redirect_map: Perform map lookup in eBPF helper
...
The bpf_redirect_map() helper used by XDP programs doesn't return any
indication of whether it can successfully redirect to the map index it was
given. Instead, BPF programs have to track this themselves, leading to
programs using duplicate maps to track which entries are populated in the
devmap.
This patch fixes this by moving the map lookup into the bpf_redirect_map()
helper, which makes it possible to return failure to the eBPF program. The
lower bits of the flags argument is used as the return code, which means
that existing users who pass a '0' flag argument will get XDP_ABORTED.
With this, a BPF program can check the return code from the helper call and
react by, for instance, substituting a different redirect. This works for
any type of map used for redirect.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com >
Acked-by: Jonathan Lemon <jonathan.lemon@gmail.com >
Acked-by: Andrii Nakryiko <andriin@fb.com >
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net >
2019-06-29 01:31:09 +02:00
..
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:04 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-08 15:20:40 -07:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:18 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:07 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-31 11:13:10 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-13 13:23:19 -07:00
2019-06-21 09:58:42 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:29:22 -07:00
2019-06-22 08:59:24 -04:00
2019-06-19 17:09:55 +02:00
2019-06-17 20:20:36 -07:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-06-13 17:34:56 -10:00
2019-05-30 11:29:53 -07:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:09 +02:00
2019-06-05 17:37:09 +02:00
2019-05-30 11:26:37 -07:00
2019-06-19 17:09:07 +02:00
2019-06-05 17:30:29 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:05 +02:00
2019-05-30 11:26:37 -07:00
2019-06-05 17:37:06 +02:00
2019-05-30 11:29:55 -07:00
2019-06-19 17:09:07 +02:00
2019-05-30 11:26:35 -07:00
2019-06-05 17:36:37 +02:00
2019-06-05 17:37:06 +02:00
2019-06-05 17:37:17 +02:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:17 +02:00
2019-05-30 11:26:35 -07:00
2019-06-05 17:37:07 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-17 09:33:02 -06:00
2019-05-30 11:26:41 -07:00
2019-06-27 15:25:16 -07:00
2019-06-20 00:06:27 -04:00
2019-06-27 15:25:16 -07:00
2019-06-27 15:25:16 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:08 +02:00
2019-06-14 17:46:14 -10:00
2019-06-17 20:20:36 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:36:37 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:35 -07:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:06 +02:00
2019-05-30 11:26:39 -07:00
2019-06-05 17:36:37 +02:00
2019-06-19 17:09:55 +02:00
2019-06-03 12:02:03 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-15 10:00:29 +02:00
2019-06-19 17:09:06 +02:00
2019-06-19 17:09:06 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:29:53 -07:00
2019-05-30 11:26:37 -07:00
2019-06-05 17:37:05 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-13 17:34:56 -10:00
2019-06-05 17:37:17 +02:00
2019-05-30 11:29:21 -07:00
2019-05-30 11:29:21 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:07 +02:00
2019-06-05 17:37:06 +02:00
2019-05-30 11:26:41 -07:00
2019-05-30 11:26:41 -07:00
2019-05-30 11:26:41 -07:00
2019-06-19 17:09:07 +02:00
2019-06-05 17:37:05 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:29:19 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:36:37 +02:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-06-29 01:31:09 +02:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:11 +02:00
2019-05-30 11:26:41 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:32 -07:00
2019-06-19 15:53:58 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:06 +02:00
2019-06-01 15:51:32 -07:00
2019-05-30 11:29:53 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:06 +02:00
2019-06-05 17:37:06 +02:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2019-06-05 17:36:38 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:37 -07:00
2019-06-05 17:37:17 +02:00
2019-06-05 17:37:05 +02:00
2019-05-30 11:27:46 -07:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:29:55 -07:00
2019-06-22 08:59:24 -04:00
2019-05-30 11:26:41 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:32 -07:00
2019-06-07 11:00:14 -07:00
2019-06-05 17:37:17 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-02 18:08:36 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:17 +02:00
2019-06-05 17:37:05 +02:00
2019-05-30 11:26:41 -07:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:35 -07:00
2019-06-19 17:09:56 +02:00
2019-06-19 17:09:56 +02:00
2019-06-05 17:37:06 +02:00
2019-06-05 17:36:37 +02:00
2019-06-05 17:37:16 +02:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:17 +02:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:36:37 +02:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:35 -07:00
2019-06-14 19:31:47 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:16 +02:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:08 +02:00
2019-06-05 17:37:06 +02:00
2019-05-30 11:26:35 -07:00
2019-06-05 17:37:16 +02:00
2019-05-30 11:29:19 -07:00
2019-05-30 11:29:19 -07:00
2019-06-19 17:09:53 +02:00
2019-06-19 17:09:07 +02:00
2019-06-19 17:09:56 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:29:22 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:17 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:07 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:36:38 +02:00
2019-06-19 17:09:55 +02:00
2019-06-01 15:51:31 -07:00
2019-06-29 01:31:08 +02:00
2019-06-05 17:37:06 +02:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:17 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-06-13 17:34:56 -10:00
2019-06-13 17:34:56 -10:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:36:38 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:41 -07:00
2019-06-19 17:09:55 +02:00
2019-06-07 13:09:06 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:35 -07:00
2019-06-05 17:36:38 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-31 09:45:26 -07:00
2019-05-31 18:02:48 +02:00
2019-05-30 11:26:41 -07:00
2019-06-05 17:37:16 +02:00
2019-06-05 17:37:16 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:35 -07:00
2019-06-05 17:30:29 +02:00
2019-06-05 17:37:06 +02:00
2019-05-30 11:26:39 -07:00
2019-05-30 11:29:19 -07:00
2019-06-21 22:05:42 -04:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:07 +02:00
2019-06-05 17:37:07 +02:00
2019-05-30 11:26:37 -07:00
2019-06-07 11:00:14 -07:00
2019-06-17 20:20:36 -07:00
2019-05-30 11:29:52 -07:00
2019-06-05 17:37:16 +02:00
2019-06-05 17:37:07 +02:00
2019-06-05 17:37:16 +02:00
2019-06-05 17:37:16 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:16 +02:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:29:54 -07:00
2019-06-05 17:37:04 +02:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:41 -07:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:36:37 +02:00
2019-06-05 17:37:06 +02:00
2019-06-13 22:34:55 -07:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:17 +02:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2019-06-03 13:26:20 -07:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:29:21 -07:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:17 +02:00
2019-06-19 17:09:07 +02:00
2019-06-05 17:37:06 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:29:52 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:17 +02:00
2019-05-30 11:26:41 -07:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:35 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-31 12:37:46 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:06 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-06-19 10:09:21 -04:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:29:19 -07:00
2019-05-30 11:26:35 -07:00
2019-06-05 17:36:37 +02:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:37 -07:00
2019-06-17 20:20:36 -07:00
2019-06-05 17:37:16 +02:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:04 +02:00
2019-06-03 10:44:21 +02:00
2019-06-05 17:36:37 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:29:22 -07:00
2019-06-05 17:37:09 +02:00
2019-06-05 17:37:16 +02:00
2019-06-14 20:18:27 -07:00
2019-06-05 17:37:06 +02:00
2019-06-19 17:09:55 +02:00
2019-06-22 16:30:37 -07:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:06 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:29:19 -07:00
2019-05-30 11:29:19 -07:00
2019-05-30 11:26:37 -07:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:17 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:29:21 -07:00
2019-06-05 17:37:09 +02:00
2019-06-05 17:37:17 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:04 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:41 -07:00
2019-06-05 17:30:29 +02:00
2019-05-30 11:26:41 -07:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:30:27 +02:00
2019-06-05 17:37:05 +02:00
2019-06-05 17:37:05 +02:00
2019-06-05 17:37:05 +02:00
2019-05-30 11:26:35 -07:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:37 -07:00
2019-06-05 17:37:07 +02:00
2019-05-30 11:26:41 -07:00