1
0
Fork 0
alistair23-linux/samples
Jesper Dangaard Brouer d23b27c02f samples/bpf: xdp_redirect_cpu handle parsing of double VLAN tagged packets
People noticed that the code match on IEEE 802.1ad (ETH_P_8021AD) ethertype,
and this implies Q-in-Q or double tagged VLANs.  Thus, we better parse
the next VLAN header too.  It is even marked as a TODO.

This is relevant for real world use-cases, as XDP cpumap redirect can be
used when the NIC RSS hashing is broken.  E.g. the ixgbe driver HW cannot
handle double tagged VLAN packets, and places everything into a single
RX queue.  Using cpumap redirect, users can redistribute traffic across
CPUs to solve this, which is faster than the network stacks RPS solution.

It is left as an exerise how to distribute the packets across CPUs.  It
would be convenient to use the RX hash, but that is not _yet_ exposed
to XDP programs. For now, users can code their own hash, as I've demonstrated
in the Suricata code (where Q-in-Q is handled correctly).

Reported-by: Florian Maury <florian.maury-cv@x-cli.eu>
Reported-by: Marek Majkowski <marek@cloudflare.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-07-14 00:52:54 +02:00
..
auxdisplay auxdisplay: Replace licenses with SPDX identifiers 2018-04-12 19:02:45 +02:00
bpf samples/bpf: xdp_redirect_cpu handle parsing of double VLAN tagged packets 2018-07-14 00:52:54 +02:00
configfs configfs: make config_item_type const 2017-10-19 16:15:15 +02:00
connector A relatively calm cycle for the docs tree again. 2017-11-13 08:25:06 -08:00
hidraw kbuild: remove all dummy assignments to obj- 2017-11-18 11:46:06 +09:00
hw_breakpoint perf: Add context field to perf_event 2011-07-01 11:06:38 +02:00
kdb kdb: Add kdb kernel module sample 2010-10-29 13:14:39 -05:00
kfifo kfifo: clean up example to not use page_link 2017-07-12 16:26:01 -07:00
kobject kobject: Remove redundant license text 2017-12-07 18:36:43 +01:00
kprobes arch: remove tile port 2018-03-16 10:56:03 +01:00
livepatch livepatch: Allow to call a custom callback when freeing shadow variables 2018-04-17 13:42:48 +02:00
mei License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mic/mpssd Merge branch 'linus' into locking/core, to resolve conflicts 2017-11-07 10:32:44 +01:00
pktgen Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-04 09:26:51 +09:00
qmi samples: Introduce Qualcomm QMI sample client 2018-02-12 16:57:22 -08:00
rpmsg rpmsg: Allow callback to return errors 2016-09-08 22:15:25 -07:00
seccomp samples/seccomp: do not compile when cross compiled 2018-02-22 09:31:43 -08:00
statx kbuild: remove all dummy assignments to obj- 2017-11-18 11:46:06 +09:00
timers License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_events Merge branch 'for-linus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-11-15 10:14:11 -08:00
trace_printk tracing: Add trace_printk sample code 2016-06-20 09:54:21 -04:00
uhid kbuild: remove all dummy assignments to obj- 2017-11-18 11:46:06 +09:00
v4l [media] media: v4l2-pci-skeleton: Fix error handling path in 'skeleton_probe()' 2017-10-04 16:55:02 -03:00
vfio-mdev sample: vfio bochs vbe display (host device for bochs-drm) 2018-06-08 10:24:16 -06:00
watchdog License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig samples: mbochs: add DMA_SHARED_BUFFER dependency 2018-06-09 09:23:52 -06:00
Makefile remoteproc updates for v4.17 2018-04-10 12:09:27 -07:00