[PATCH] virtio-net: Fix receive buffer size typo

Steffen Trumtrar
2025-02-07T07:49:06Z

The commit 00806815385340dd411cc67df3f6837935bb5e26 introduced a slight
typo in the struct virtio_net_hdr size calculation depending on
VIRTIO_NET_F_HASH_REPORT negotiation.

Without VIRTIO_NET_F_HASH_REPORT the struct is smaller than with the
feature. This mix up only occurs in one instance; sizes are correct in
all other occurences.

Fix this typo.

Fixes: 008068153853 ("virtio-net: Fix receive buffer size calculation text")
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Reviewed-by: Parav Pandit <parav@nvidia.com>
---
device-types/net/description.tex | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/device-types/net/description.tex b/device-types/net/description.tex
index 4e4ffdb6e04e346af491edf65886fa096e506abc..08736b6804eafb303a5cfb2f27ec200cec8bd942 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -789,10 +789,10 @@ \subsubsection{Setting Up Receive Buffers}\label{sec:Device Types / Network Devi
the IPv6 header, plus 65535 bytes of maximum IPv6 payload including any
extension header), otherwise 1514 bytes.
When VIRTIO_NET_F_HASH_REPORT is not negotiated, the required receive buffer
-size is either 65601 or 1526 bytes accounting for 20 bytes of
+size is either 65601 or 1526 bytes accounting for 12 bytes of
\field{struct virtio_net_hdr} followed by receive packet.
When VIRTIO_NET_F_HASH_REPORT is negotiated, the required receive buffer
-size is either 65609 or 1534 bytes accounting for 12 bytes of
+size is either 65609 or 1534 bytes accounting for 20 bytes of
\field{struct virtio_net_hdr} followed by receive packet.

\drivernormative{\paragraph}{Setting Up Receive Buffers}{Device Types / Network Device / Device Operation / Setting Up Receive Buffers}

---
base-commit: b2990c8a6642e696d6f269d1db991b2c928d3a9f
change-id: 20250207-v1-4-topic-virtio-net-receive-buffer-fix-b6487b58813c

Best regards,
--
Steffen Trumtrar <s.trumtrar@pengutronix.de>