mirror of
https://github.com/torvalds/linux.git
synced 2026-11-29 18:12:48 +00:00
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: 638264dc90 ("veth: Support per queue XDP ring")
Signed-off-by: Maciej Fijalkowski <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Toshiaki Makita <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
This commit is contained in:
committed by
Daniel Borkmann
parent
d8861bab48
commit
edbea92202
+1
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user