]> git.baikalelectronics.ru Git - kernel.git/commit
veth: Support per queue XDP ring
authorToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Fri, 3 Aug 2018 07:58:18 +0000 (16:58 +0900)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 10 Aug 2018 14:12:21 +0000 (16:12 +0200)
commit726112bb13852259d4760ae356e1042dbe0d42e8
treee3ab1b8331d9f20766f6747eac42928f6b13d911
parentf0f43fc94fa2453fe61de01203187b91d9429f47
veth: Support per queue XDP ring

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: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
drivers/net/veth.c