Fix virtio_net_hdr struct size when VIRTIO_NET_F_HASH_REPORT is negociated.
PATCH 1/1 Fix virtio_net_hdr struct size when VIRTIO_NET_F_HASH_REPORT is negociated.
Hard-coded references to the size of virtio_net_hdr strut are wrong when VIRTIO_NET_HASH_REPORT feature is negociated.
--- content.tex | 3 +-- split-ring.tex | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
content.tex +1 -2
@@ -3620,8 +3620,7 @@ \subsubsection{Setting Up Receive Buffers}\label{sec:Device Types / Network Devi features are used, the maximum incoming packet will be to 65550 bytes long (the maximum size of a TCP or UDP packet, plus the 14 byte ethernet header), otherwise -1514 bytes. The 12-byte struct virtio_net_hdr is prepended to this, -making for 65562 or 1526 bytes. +1514 bytes. The struct virtio_net_hdr (which length depends on VIRTIO_NET_F_HASH_REPORT feature negotiation) is prepended to this. \drivernormative{\paragraph}{Setting Up Receive Buffers}{Device Types / Network Device / Device Operation / Setting Up Receive Buffers}
split-ring.tex +1 -1
@@ -127,7 +127,7 @@ \subsection{Legacy Interfaces: A Note on Virtqueue Endianness}\label{sec:Basic F \subsection{Message Framing}\label{sec:Basic Facilities of a Virtio Device / Virtqueues / Message Framing} The framing of messages with descriptors is -independent of the contents of the buffers. For example, a network +independent of the contents of the buffers. For example, if VIRTIO_NET_F_HASH_REPORT has not been negotiated, a network transmit buffer consists of a 12 byte header followed by the network packet. This could be most simply placed in the descriptor table as a 12 byte output descriptor followed by a 1514 byte output descriptor,
Signature · 22 lines
2.25.1 This publicly archived list offers a means to provide input to the OASIS Virtual I/O Device (VIRTIO) TC. In order to verify user consent to the Feedback License terms and to minimize spam in the list archive, subscription is required before posting. Subscribe: [email protected] Unsubscribe: [email protected] List help: [email protected] List archive: https://lists.oasis-open.org/archives/virtio-comment/ Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists Committee: https://www.oasis-open.org/committees/virtio/ Join OASIS: https://www.oasis-open.org/join/
Quoted 2 lines · Cyril Germond
Hard-coded references to the size of
virtio_net_hdrstrut are wrong whenVIRTIO_NET_HASH_REPORTfeature is negociated.
s/negociated/negotiated/ (here and in the subject)
Also, please keep an empty line before the s-o-b.
Quoted 11 lines
Signed-off-by Cyril Germond <[email protected]>--- content.tex | 3 +-- split-ring.tex | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)content.tex +0
-0
content.tex \subsubsection{Setting Up Receive Buffers}\label{sec:Device Types / Network Devi · line 3623
Quoted 6 lines
content.tex +1
-2@@ -3620,8 +3620,7 @@ \subsubsection{Setting Up Receive Buffers}\label{sec:Device Types / Network Devi features are used, the maximum incoming packet will be to 65550 bytes long (the maximum size of a TCP or UDP packet, plus the 14 byte ethernet header), otherwise -1514 bytes. The 12-byte struct virtio_net_hdr is prepended to this, -making for 65562 or 1526 bytes. +1514 bytes. The struct virtio_net_hdr (which length depends on VIRTIO_NET_F_HASH_REPORT feature negotiation) is prepended to this.
The normative statement right below also cites the 65562/1526 numbers; I assume that we want to adjust them as well? In that case, I don't think we can get around mentioning concrete numbers for all four cases (with/without offloads x with/without HASH_REPORT).
Any other opinions?
split-ring.tex \subsection{Legacy Interfaces: A Note on Virtqueue Endianness}\label{sec:Basic F · line 130
Quoted 13 lines
content.tex +0
-0\drivernormative{\paragraph}{Setting Up Receive Buffers}{Device Types / Network Device / Device Operation / Setting Up Receive Buffers}split-ring.tex +1
-1@@ -127,7 +127,7 @@ \subsection{Legacy Interfaces: A Note on Virtqueue Endianness}\label{sec:Basic F \subsection{Message Framing}\label{sec:Basic Facilities of a Virtio Device / Virtqueues / Message Framing} The framing of messages with descriptors is -independent of the contents of the buffers. For example, a network +independent of the contents of the buffers. For example, if VIRTIO_NET_F_HASH_REPORT has not been negotiated, a network
This looks good, but personally I'd prefer to keep more-or-less to the existing line length, even though that doesn't affect the generated document.
split-ring.tex \subsection{Legacy Interfaces: A Note on Virtqueue Endianness}\label{sec:Basic F · line 133
Quoted 3 lines
split-ring.tex +0
-0transmit buffer consists of a 12 byte header followed by the network packet. This could be most simply placed in the descriptor table as a 12 byte output descriptor followed by a 1514 byte output descriptor,
This publicly archived list offers a means to provide input to the OASIS Virtual I/O Device (VIRTIO) TC.
In order to verify user consent to the Feedback License terms and to minimize spam in the list archive, subscription is required before posting.
Subscribe: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/
----- Original Message -----
Quoted 6 lines
From: "Cornelia Huck" <[email protected]>
To: "cgermond" <[email protected]>, "virtio-comment" <[email protected]>
Cc: "cgermond" <[email protected]>
Sent: Monday, August 29, 2022 12:33:04 PM
Subject: Re: [virtio-comment] [PATCH] Fixvirtio_net_hdrstruct size whenVIRTIO_NET_F_HASH_REPORTis negociated.
Quoted 7 lines
Quoted 2 lines · Cyril Germond
Hard-coded references to the size of
virtio_net_hdrstrut are wrong whenVIRTIO_NET_HASH_REPORTfeature is negociated.s/negociated/negotiated/ (here and in the subject)
Agree
Quoted 2 lines
Also, please keep an empty line before the s-o-b.
OK
Quoted 25 lines
Quoted 11 lines
Signed-off-by Cyril Germond <[email protected]>--- content.tex | 3 +-- split-ring.tex | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)content.tex +0
-0@@ -3620,8 +3620,7 @@ \subsubsection{Setting Up ReceiveQuoted 8 lines
Buffers}\label{sec:Device Types / Network Devi
features are used, the maximum incoming packet
will be to 65550 bytes long (the maximum size of a
TCP or UDP packet, plus the 14 byte ethernet header), otherwise
-1514 bytes. The 12-byte structvirtio_net_hdris prepended to this, -making for 65562 or 1526 bytes.
+1514 bytes. The structvirtio_net_hdr(which length depends onVIRTIO_NET_F_HASH_REPORTfeature negotiation) is prepended to this.The normative statement right below also cites the 65562/1526 numbers; I assume that we want to adjust them as well? In that case, I don't think we can get around mentioning concrete numbers for all four cases (with/without offloads x with/without
HASH_REPORT).
Quoted 1 line
Any other opinions?
I agree this parts needs update. Amongst the 3 alternate proposals for updating the normative statements of 5.1.6.3.1 (in the case VIRTIO_NET_F_MRG_RXBUF is not negotiated), which one would suit better (or eventually another one) ?
1/
-If VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6 or VIRTIO_NET_F_GUEST_UFO are negotiated, the driver SHOULD populate the receive queue(s) with buffers of at least 65570 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, 65562 bytes otherwise.
– Otherwise, the driver SHOULD populate the receive queue(s) with buffers of at least 1534 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, 1526 bytes otherwise.
2/
-If VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6 or VIRTIO_NET_F_GUEST_UFO are negotiated, the driver SHOULD populate the receive queue(s) with buffers of at least :
- 65570 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated
- 65562 bytes otherwise.
– Otherwise, the driver SHOULD populate the receive queue(s) with buffers of at least
- 1534 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated
- 1526 bytes otherwise.
3/
– If VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6 or VIRTIO_NET_F_GUEST_UFO are negotiated, the driver SHOULD populate the receive queue(s) with buffers of at least 65550 bytes plus the size of the struct virtio_net_hdr.
– Otherwise, the driver SHOULD populate the receive queue(s) with buffers of at least 1514 bytes plus the size of the struct virtio_net_hdr.
Quoted 12 lines
Quoted 12 lines
\drivernormative{\paragraph}{Setting Up Receive Buffers}{Device Types / Network Device / Device Operation / Setting Up Receive Buffers}
split-ring.tex +0
-0@@ -127,7 +127,7 @@ \subsection{Legacy Interfaces: A Note on VirtqueueEndianness}\label{sec:Basic F
Quoted 11 lines
Quoted 6 lines
\subsection{Message Framing}\label{sec:Basic Facilities of a Virtio Device / Virtqueues / Message Framing}
The framing of messages with descriptors issplit-ring.tex +1
-1-independent of the contents of the buffers. For example, a network +independent of the contents of the buffers. For example, if
VIRTIO_NET_F_HASH_REPORThas not been negotiated, a networkThis looks good, but personally I'd prefer to keep more-or-less to the existing line length, even though that doesn't affect the generated document.
OK
Quoted 25 lines
Quoted 3 lines
transmit buffer consists of a 12 byte header followed by the network packet. This could be most simply placed in the descriptor table as a 12 byte output descriptor followed by a 1514 byte output descriptor,
This publicly archived list offers a means to provide input to the OASIS Virtual I/O Device (VIRTIO) TC.
In order to verify user consent to the Feedback License terms and to minimize spam in the list archive, subscription is required before posting.
Subscribe: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/To declare a filtering error, please use the following link :
https://www.security-mail.net/reporter.php?mid=1682.630c95e7.12a14.0&r=cgermond%40kalray.eu&s=virtio-comment-return-3416-cgermond%3Dkalray.eu%40lists.oasis-open.org&o=Re%3A+%5Bvirtio-comment%5D+%5BPATCH%5D+Fix+virtio_net_hdr+struct+size+when+VIRTIO_NET_F_HASH_REPORT+is+negociated.&verdict=C&c=202f75f2c0c528203a5d4ddf74c13752d049a85d
Quoted 34 lines · Cyril Germond
Quoted 19 lines
Quoted 5 lines
content.tex +0
-0@@ -3620,8 +3620,7 @@ \subsubsection{Setting Up ReceiveQuoted 8 lines
Buffers}\label{sec:Device Types / Network Devi
features are used, the maximum incoming packet
will be to 65550 bytes long (the maximum size of a
TCP or UDP packet, plus the 14 byte ethernet header), otherwise
-1514 bytes. The 12-byte structvirtio_net_hdris prepended to this, -making for 65562 or 1526 bytes.
+1514 bytes. The structvirtio_net_hdr(which length depends onVIRTIO_NET_F_HASH_REPORTfeature negotiation) is prepended to this.The normative statement right below also cites the 65562/1526 numbers; I assume that we want to adjust them as well? In that case, I don't think we can get around mentioning concrete numbers for all four cases (with/without offloads x with/without
HASH_REPORT).Quoted 1 line
Any other opinions?
I agree this parts needs update. Amongst the 3 alternate proposals for updating the normative statements of 5.1.6.3.1 (in the case
VIRTIO_NET_F_MRG_RXBUFis not negotiated), which one would suit better (or eventually another one) ?1/
-IfVIRTIO_NET_F_GUEST_TSO4,VIRTIO_NET_F_GUEST_TSO6orVIRTIO_NET_F_GUEST_UFOare negotiated, the driver SHOULD populate the receive queue(s) with buffers of at least 65570 bytes ifVIRTIO_NET_F_HASH_REPORTis negotiated, 65562 bytes otherwise.
– Otherwise, the driver SHOULD populate the receive queue(s) with buffers of at least 1534 bytes ifVIRTIO_NET_F_HASH_REPORTis negotiated, 1526 bytes otherwise.2/
-IfVIRTIO_NET_F_GUEST_TSO4,VIRTIO_NET_F_GUEST_TSO6orVIRTIO_NET_F_GUEST_UFOare negotiated, the driver SHOULD populate the receive queue(s) with buffers of at least :
- 65570 bytes ifVIRTIO_NET_F_HASH_REPORTis negotiated
- 65562 bytes otherwise.
– Otherwise, the driver SHOULD populate the receive queue(s) with buffers of at least
- 1534 bytes ifVIRTIO_NET_F_HASH_REPORTis negotiated
- 1526 bytes otherwise.
Quoted 3 lines
3/
– IfVIRTIO_NET_F_GUEST_TSO4,VIRTIO_NET_F_GUEST_TSO6orVIRTIO_NET_F_GUEST_UFOare negotiated, the driver SHOULD populate the receive queue(s) with buffers of at least 65550 bytes plus the size of the structvirtio_net_hdr.
– Otherwise, the driver SHOULD populate the receive queue(s) with buffers of at least 1514 bytes plus the size of the structvirtio_net_hdr.
I'd probably go with option 1, if we do not expect more header-size-changing features in the foreseeable future, option 2 otherwise (IMHO, 1 is easier to read, while 2 is easier to extend.)
I'll let the virtio-net folks decide on that one.
This publicly archived list offers a means to provide input to the OASIS Virtual I/O Device (VIRTIO) TC.
In order to verify user consent to the Feedback License terms and to minimize spam in the list archive, subscription is required before posting.
Subscribe: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/