Commit e1b2a964 authored by Liang Chen's avatar Liang Chen Committed by sanglipeng
Browse files

veth: Fixing transmit return status for dropped packets

stable inclusion
from stable-v5.10.195
commit d47bc5023e545aa33729524da250672451120735
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I95JOC

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d47bc5023e545aa33729524da250672451120735



--------------------------------

[ Upstream commit 151e887d ]

The veth_xmit function returns NETDEV_TX_OK even when packets are dropped.
This behavior leads to incorrect calculations of statistics counts, as
well as things like txq->trans_start updates.

Fixes: e314dbdc ("[NET]: Virtual ethernet device driver.")
Signed-off-by: default avatarLiang Chen <liangchen.linux@gmail.com>
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 33b3602d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment