• Toshiaki Makita's avatar
    veth: Support per queue XDP ring · 638264dc
    Toshiaki Makita authored
    Move XDP and napi related fields from veth_priv to newly created veth_rq
    structure.
    
    When xdp_frames are enqueued from ndo_xdp_xmit and XDP_TX, rxq is
    selected by current cpu.
    
    When skbs are enqueued from the peer device, rxq is one to one mapping
    of its peer txq. This way we have a restriction that the number of rxqs
    must not less than the number of peer txqs, but leave the possibility to
    achieve bulk skb xmit in the future because txq lock would make it
    possible to remove rxq ptr_ring lock.
    
    v3:
    - Add extack messages.
    - Fix array overrun in veth_xmit.
    Signed-off-by: default avatarToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    638264dc
veth.c 27.9 KB