OSDN Git Service

veth: Avoid NAPI scheduling on failed SKB forwarding
authorLiang Chen <liangchen.linux@gmail.com>
Thu, 24 Aug 2023 12:31:31 +0000 (20:31 +0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 26 Aug 2023 01:52:11 +0000 (18:52 -0700)
commit215eb9f962091ebaab96be2c18cf5d0f5174a4d6
treedc415f7b9179259e12e6e044d215fb826d7d81b5
parentbebfbf07c7db7321e26b6aae0d7078d3d1294464
veth: Avoid NAPI scheduling on failed SKB forwarding

When an skb fails to be forwarded to the peer(e.g., skb data buffer
length exceeds MTU), it will not be added to the peer's receive queue.
Therefore, we should schedule the peer's NAPI poll function only when
skb forwarding is successful to avoid unnecessary overhead.

Signed-off-by: Liang Chen <liangchen.linux@gmail.com>
Link: https://lore.kernel.org/r/20230824123131.7673-1-liangchen.linux@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/veth.c