tun: fix missing dropped counter in tun_xdp_act
authorYunjian Wang <wangyunjian@huawei.com>
Fri, 19 Jan 2024 10:22:35 +0000 (18:22 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Feb 2024 00:19:01 +0000 (16:19 -0800)
commit33a8980008c4eafdccbf2ab481794b550cc84713
tree59cd2a0a42609a147d7f75d57894d5354bbcef09
parente855dded4b70d1975ee7b9fed0c700391e3c8ea6
tun: fix missing dropped counter in tun_xdp_act

[ Upstream commit 5744ba05e7c4bff8fec133dd0f9e51ddffba92f5 ]

The commit 8ae1aff0b331 ("tuntap: split out XDP logic") includes
dropped counter for XDP_DROP, XDP_ABORTED, and invalid XDP actions.
Unfortunately, that commit missed the dropped counter when error
occurs during XDP_TX and XDP_REDIRECT actions. This patch fixes
this issue.

Fixes: 8ae1aff0b331 ("tuntap: split out XDP logic")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/tun.c