linux-stable/drivers/net/ipvlan
Cambda Zhu ddb1155497 ipvlan: Fix return value of ipvlan_queue_xmit()
[ Upstream commit 8a9922e7be ]

ipvlan_queue_xmit() should return NET_XMIT_XXX, but
ipvlan_xmit_mode_l2/l3() returns rx_handler_result_t or NET_RX_XXX
in some cases. ipvlan_rcv_frame() will only return RX_HANDLER_CONSUMED
in ipvlan_xmit_mode_l2/l3() because 'local' is true. It's equal to
NET_XMIT_SUCCESS. But dev_forward_skb() can return NET_RX_SUCCESS or
NET_RX_DROP, and returning NET_RX_DROP(NET_XMIT_DROP) will increase
both ipvlan and ipvlan->phy_dev drops counter.

The skb to forward can be treated as xmitted successfully. This patch
makes ipvlan_queue_xmit() return NET_XMIT_SUCCESS for forward skb.

Fixes: 2ad7bf3638 ("ipvlan: Initial check-in of the IPVLAN driver.")
Signed-off-by: Cambda Zhu <cambda@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230626093347.7492-1-cambda@linux.alibaba.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:45:07 +02:00
..
ipvlan.h
ipvlan_core.c ipvlan: Fix return value of ipvlan_queue_xmit() 2023-08-11 11:45:07 +02:00
ipvlan_main.c
ipvtap.c net: ipvtap - add __init/__exit annotations to module init/exit funcs 2022-09-05 10:26:29 +02:00
Makefile