]> git.baikalelectronics.ru Git - kernel.git/commit
veth: Store queue_mapping independently of XDP prog presence
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Wed, 3 Mar 2021 15:29:03 +0000 (16:29 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 5 Mar 2021 23:04:52 +0000 (00:04 +0100)
commitce8d22f4bd212e4a840fbf140d7a944d1a3808b6
treeb5bfa6771bd0fb89028eb68e657b77e9c8552580
parentda3a83d91c5f23a57b29df40771c1dea6eaa9bf3
veth: Store queue_mapping independently of XDP prog presence

Currently, veth_xmit() would call the skb_record_rx_queue() only when
there is XDP program loaded on peer interface in native mode.

If peer has XDP prog in generic mode, then netif_receive_generic_xdp()
has a call to netif_get_rxqueue(skb), so for multi-queue veth it will
not be possible to grab a correct rxq.

To fix that, store queue_mapping independently of XDP prog presence on
peer interface.

Fixes: 726112bb1385 ("veth: Support per queue XDP ring")
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Toshiaki Makita <toshiaki.makita1@gmail.com>
Link: https://lore.kernel.org/bpf/20210303152903.11172-1-maciej.fijalkowski@intel.com
drivers/net/veth.c