numam-dpdk/drivers/net/tap
Ophir Munk 54aad2f231 net/tap: fix eBPF handling of non-RSS flows
The eBPF classifier (section "cls_q" in tap_bpf_program.c) is tracing
marked packets in which skb->cb[1] contains an RSS queue number, and
redirects those packets to the matched queue.
It is expected that skb->cb[1] has been previously set with a valid RSS
queue number during an eBPF action (section "l3_l4" in tap_bpf_program.c).
However, for non-RSS flows, skb->cb[1] may contain a random unset value,
which could falsely be interpreted as a valid RSS queue.
To avoid this potential error, tap_bpf_program.c has been updated as
follows:
1. After calculating the RSS queue number, it is added a unique offset in
order to uniquely identify it as a valid RSS queue number.
2. After matching an RSS queue to a packet, skb->cb[1] is set to 0.

Fixes: cdc07e83bb ("net/tap: add eBPF program file")
Fixes: aabe70df73 ("net/tap: add eBPF bytes code")

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2018-02-05 19:56:04 +01:00
..
Makefile net/tap: support Rx interrupt 2018-01-29 10:45:20 +01:00
rte_eth_tap.c net/tap: fix multi segments capability 2018-02-05 19:56:04 +01:00
rte_eth_tap.h net/tap: use SPDX tags in 6WIND copyrighted files 2018-02-01 02:33:04 +01:00
rte_pmd_tap_version.map net/tap: add TUN/TAP device PMD 2017-01-17 19:40:50 +01:00
tap_bpf_api.c net/tap: add eBPF API 2018-01-21 15:51:52 +01:00
tap_bpf_insns.h net/tap: fix eBPF handling of non-RSS flows 2018-02-05 19:56:04 +01:00
tap_bpf_program.c net/tap: fix eBPF handling of non-RSS flows 2018-02-05 19:56:04 +01:00
tap_bpf.h net/tap: fix build on ARM32 2018-01-31 19:14:47 +01:00
tap_flow.c net/tap: fix icc build 2018-02-01 10:31:18 +01:00
tap_flow.h net/tap: use SPDX tags in 6WIND copyrighted files 2018-02-01 02:33:04 +01:00
tap_intr.c net/tap: support Rx interrupt 2018-01-29 10:45:20 +01:00
tap_netlink.c net/tap: use SPDX tags in 6WIND copyrighted files 2018-02-01 02:33:04 +01:00
tap_netlink.h net/tap: use SPDX tags in 6WIND copyrighted files 2018-02-01 02:33:04 +01:00
tap_rss.h net/tap: implement RSS using eBPF 2018-01-21 15:51:52 +01:00
tap_tcmsgs.c net/tap: use SPDX tags in 6WIND copyrighted files 2018-02-01 02:33:04 +01:00
tap_tcmsgs.h net/tap: use SPDX tags in 6WIND copyrighted files 2018-02-01 02:33:04 +01:00