diff options
author | Jason Wang <jasowang@redhat.com> | 2018-02-07 17:14:46 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-08 14:10:30 -0500 |
commit | 762c330d670e3d4b795cf7a8d761866fdd1eef49 (patch) | |
tree | 249dbef044fc3ecf0b3f2d449e63080e9f802359 /drivers/atm | |
parent | cb9f7a9a5c96a773bbc9c70660dc600cfff82f82 (diff) | |
download | blackbird-op-linux-762c330d670e3d4b795cf7a8d761866fdd1eef49.tar.gz blackbird-op-linux-762c330d670e3d4b795cf7a8d761866fdd1eef49.zip |
tuntap: add missing xdp flush
When using devmap to redirect packets between interfaces,
xdp_do_flush() is usually a must to flush any batched
packets. Unfortunately this is missed in current tuntap
implementation.
Unlike most hardware driver which did XDP inside NAPI loop and call
xdp_do_flush() at then end of each round of poll. TAP did it in the
context of process e.g tun_get_user(). So fix this by count the
pending redirected packets and flush when it exceeds NAPI_POLL_WEIGHT
or MSG_MORE was cleared by sendmsg() caller.
With this fix, xdp_redirect_map works again between two TAPs.
Fixes: 761876c857cb ("tap: XDP support")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm')
0 files changed, 0 insertions, 0 deletions