Commit c8a36f1
bpf: xdp: Fix XDP mode when no mode flags specified
7f0a838 ("bpf, xdp: Maintain info on attached XDP BPF programs in net_device")
inadvertently changed which XDP mode is assumed when no mode flags are
specified explicitly. Previously, driver mode was preferred, if driver
supported it. If not, generic SKB mode was chosen. That commit changed default
to SKB mode always. This patch fixes the issue and restores the original
logic.
Fixes: 7f0a838 ("bpf, xdp: Maintain info on attached XDP BPF programs in net_device")
Reported-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Tested-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/bpf/20200820052841.1559757-1-andriin@fb.com1 parent 5597432 commit c8a36f1
1 file changed
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8742 | 8742 | | |
8743 | 8743 | | |
8744 | 8744 | | |
8745 | | - | |
| 8745 | + | |
8746 | 8746 | | |
8747 | 8747 | | |
8748 | 8748 | | |
8749 | 8749 | | |
8750 | 8750 | | |
8751 | | - | |
| 8751 | + | |
| 8752 | + | |
| 8753 | + | |
8752 | 8754 | | |
8753 | 8755 | | |
8754 | 8756 | | |
| |||
8896 | 8898 | | |
8897 | 8899 | | |
8898 | 8900 | | |
8899 | | - | |
| 8901 | + | |
8900 | 8902 | | |
8901 | 8903 | | |
8902 | 8904 | | |
| |||
8984 | 8986 | | |
8985 | 8987 | | |
8986 | 8988 | | |
8987 | | - | |
| 8989 | + | |
8988 | 8990 | | |
8989 | 8991 | | |
8990 | 8992 | | |
| |||
9080 | 9082 | | |
9081 | 9083 | | |
9082 | 9084 | | |
9083 | | - | |
| 9085 | + | |
9084 | 9086 | | |
9085 | 9087 | | |
9086 | 9088 | | |
| |||
9164 | 9166 | | |
9165 | 9167 | | |
9166 | 9168 | | |
9167 | | - | |
| 9169 | + | |
9168 | 9170 | | |
9169 | 9171 | | |
9170 | 9172 | | |
| |||
0 commit comments