summaryrefslogtreecommitdiff
path: root/drivers/net/netdevsim/netdevsim.h
diff options
context:
space:
mode:
authorDaniel Zahka <daniel.zahka@gmail.com>2026-05-29 16:15:27 +0300
committerJakub Kicinski <kuba@kernel.org>2026-06-02 22:57:30 +0300
commitabaef7e966fdc236ee57ea30c019365110d00f48 (patch)
treea0fb51ea31a6c2ebf522c38926ebf6e6a4933de1 /drivers/net/netdevsim/netdevsim.h
parent5893cc75a19146b1365867dcf7f01ed420f702ed (diff)
downloadlinux-abaef7e966fdc236ee57ea30c019365110d00f48.tar.xz
netdevsim: psp: update rx stats on the peer netdevsim
nsim_do_psp() handles both tx and rx psp processing in the sending device's nsim_start_xmit() path. The existing code has a logical bug, where we erroneously increment rx_bytes and rx_packets on the sending devices stats, instead of the peer device. Additionally, compute psp_len after psp_dev_encapsulate() and before psp_dev_rcv(), which modifies the header region of the skb. The existing calculation was actually correct, because psp_dev_rcv() leaves skb_inner_transport_header pointing at the tcp header, but this is fragile and confusing as there is no actual inner transport header after psp_dev_rcv has removed udp encapsulation. Fixes: 178f0763c5f3 ("netdevsim: implement psp device stats") Cc: <stable+noautosel@kernel.org> # netdevsim is a test harness, it's never loaded on production systems Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com> Link: https://patch.msgid.link/20260529-fix-psp-stats-v2-1-3a194eacf18e@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/netdevsim/netdevsim.h')
0 files changed, 0 insertions, 0 deletions