diff options
author | Maciej Fijalkowski <maciej.fijalkowski@intel.com> | 2021-03-03 18:29:03 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-03-06 02:04:52 +0300 |
commit | edbea922025169c0e5cdca5ebf7bf5374cc5566c (patch) | |
tree | b5bfa6771bd0fb89028eb68e657b77e9c8552580 /drivers/net/veth.c | |
parent | d8861bab48b6c1fc3cdbcab8ff9d1eaea43afe7f (diff) | |
download | linux-edbea922025169c0e5cdca5ebf7bf5374cc5566c.tar.xz |
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: 638264dc9022 ("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
Diffstat (limited to 'drivers/net/veth.c')
-rw-r--r-- | drivers/net/veth.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/veth.c b/drivers/net/veth.c index aa1a66ad2ce5..34e49c75db42 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c @@ -302,8 +302,7 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) if (rxq < rcv->real_num_rx_queues) { rq = &rcv_priv->rq[rxq]; rcv_xdp = rcu_access_pointer(rq->xdp_prog); - if (rcv_xdp) - skb_record_rx_queue(skb, rxq); + skb_record_rx_queue(skb, rxq); } skb_tx_timestamp(skb); |