Skip to contentSkip to conversation

virtio-net: Clarify virtio_net_hdr size and rx buffer size

PATCH Superseded Parav Pandit 4 participants 20 messages Jan 15, 2024 – Feb 9, 2024

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v2 cover virtio-net: Clarify virtio_net_hdr size and rx buffer size

There are few small issues around size of receive buffer and size of the struct virtio_net_hdr as following.

1. VIRTIO_NET_F_HASH_REPORT is only applicable on the rx side processing. However it changes the size of the struct virtio_net_hdr for the tx side as well. This was not clarified when VIRTIO_NET_F_HASH_REPORT feature was introduced.

2. Receive buffer size calculation description and requirements did not reflect negotiation of VIRTIO_NET_F_HASH_REPORT.

3. Receive buffer size calculation was incorrect for ipv6 guest gso feature.

Above issue 2 was reported in [1].
Since issue 2 and 3 both touches the same set of requirements and description, they are updated under a new issue along with tx side fix as well touching the clarification needed for VIRTIO_NET_F_HASH_REPORT.

Hence above three issues are fixed under issue of [2].

Patch summary:
patch-1 fixes receive side description and requirement patch-2 adds transmit side clarification for VIRTIO_NET_F_HASH_REPORT

changelog:
v1->v2:
- addressed comments from Cornelia
- rephrase buffer size wording without explicit length of virtio_net_hdr at 3 places.
- replaced otherwise to ', otherwise'
- rephrase non normative to write as driver normative v0->v1:
- addressed comments from Xuan to rewrite tx normative

Parav Pandit (2):
virtio-net: Fix receive buffer size calculation text
virtio-net: Clarify the size of the struct virtio_net_hdr for tx

 device-types/net/description.tex | 26 +++++++++++++++++++-------
 1 file changed, 19 insertions(+), 7 deletions(-)
Signature · 18 lines
2.34.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/
#1 lore raw

PATCH v2 1/2 virtio-net: Fix receive buffer size calculation text

Receive buffer size calculation is based on the following negotiated features.

The text has wrong calculation for IPv6 and also it has missed VIRTIO_NET_F_HASH_REPORT.

The problem of igorance of VIRTIO_NET_F_HASH_REPORT is reported in [1], however fix for ipv6 payload length must also be considered.

Since for the both the fixes touching same requirements, a new issue is created as [2].

This patch brings following fixes.

1. Fix annotating struct virtio_net_hdr as field
2. Fix receive buffer calculation for guest GSO cases to consider ipv6 payload length
3. small grammar corrections for article
4. reword the requirement to consider the virtio_ndr_hdr which is depends on the negotiated feature, hence first clarify the struct virtio_net_hdr size

[1] https://github.com/oasis-tcs/virtio-spec/issues/170
[2] https://github.com/oasis-tcs/virtio-spec/issues/183

---
changelog:
v1->v2:
- addressed comments from Cornelia
- rephrase buffer size wording without explicit length of virtio_net_hdr at 3 places.
- replaced otherwise to ', otherwise'
- rephrase non normative to write as driver normative

---
 device-types/net/description.tex | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)
device-types/net/description.tex +16 -7
index aff5e08..53a56ee 100644
@@ -657,10 +657,13 @@ \subsubsection{Setting Up Receive Buffers}\label{sec:Device Types / Network Devi
 If the VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6,
 VIRTIO_NET_F_GUEST_UFO, VIRTIO_NET_F_GUEST_USO4 or VIRTIO_NET_F_GUEST_USO6
 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.
+will be 65589 bytes long (14 bytes of Ethernet header, plus 40 bytes of
+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.
+When VIRTIO_NET_F_HASH_REPORT is negotiated, the required receive buffer
+size is either 65609 or 1534 bytes.
 
 \drivernormative{\paragraph}{Setting Up Receive Buffers}{Device Types / Network Device / Device Operation / Setting Up Receive Buffers}
 
@@ -669,18 +672,24 @@ \subsubsection{Setting Up Receive Buffers}\label{sec:Device Types / Network Devi
   \begin{itemize}
     \item If VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6, VIRTIO_NET_F_GUEST_UFO,
 	VIRTIO_NET_F_GUEST_USO4 or VIRTIO_NET_F_GUEST_USO6 are negotiated, the driver SHOULD populate
-      the receive queue(s) with buffers of at least 65562 bytes.
+      the receive queue(s) with buffers of at least 65609 bytes if
+      VIRTIO_NET_F_HASH_REPORT is negotiated, and of at least 65601 bytes if not.
     \item Otherwise, the driver SHOULD populate the receive queue(s)
-      with buffers of at least 1526 bytes.
+      with buffers of at least 1534 bytes if VIRTIO_NET_F_HASH_REPORT
+      is negotiated, and of at least 1526 bytes if not.
   \end{itemize}
 \item If VIRTIO_NET_F_MRG_RXBUF is negotiated, each buffer MUST be at
-least the size of the struct virtio_net_hdr.
+least size of \field{struct virtio_net_hdr},
+i.e. 20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and 12 bytes if not.
 \end{itemize}
 
 \begin{note}
 Obviously each buffer can be split across multiple descriptor elements.
 \end{note}
 
+The driver MUST consider size of field \field{struct virtio_net_hdr}
+20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and 12 bytes if not.
+
 If VIRTIO_NET_F_MQ is negotiated, each of receiveq1\ldots receiveqN
 that will be used SHOULD be populated with receive buffers.
 
Signature · 18 lines
2.34.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/
#2 lore raw

[virtio-comment] Re: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 47 lines · Parav Pandit

Receive buffer size calculation is based on the following negotiated features.

The text has wrong calculation for IPv6 and also it has missed VIRTIO_NET_F_HASH_REPORT.

The problem of igorance of VIRTIO_NET_F_HASH_REPORT is reported in [1], however fix for ipv6 payload length must also be considered.

Since for the both the fixes touching same requirements, a new issue is created as [2].

This patch brings following fixes.

1. Fix annotating struct virtio_net_hdr as field
2. Fix receive buffer calculation for guest GSO cases to consider ipv6 payload length
3. small grammar corrections for article
4. reword the requirement to consider the virtio_ndr_hdr which is depends on the negotiated feature, hence first clarify the struct virtio_net_hdr size

[1] https://github.com/oasis-tcs/virtio-spec/issues/170
[2] https://github.com/oasis-tcs/virtio-spec/issues/183

---
changelog:
v1->v2:
- addressed comments from Cornelia
- rephrase buffer size wording without explicit length of virtio_net_hdr at 3 places.
- replaced otherwise to ', otherwise'
- rephrase non normative to write as driver normative

---
 device-types/net/description.tex | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)
device-types/net/description.tex +0 -0
index aff5e08..53a56ee 100644

device-types/net/description.tex \subsubsection{Setting Up Receive Buffers}\label{sec:Device Types / Network Devi · line 662

Quoted 10 lines
device-types/net/description.tex +3 -4
@@ -657,10 +657,13 @@ \subsubsection{Setting Up Receive Buffers}\label{sec:Device Types / Network Devi
 If the VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6,
 VIRTIO_NET_F_GUEST_UFO, VIRTIO_NET_F_GUEST_USO4 or VIRTIO_NET_F_GUEST_USO6
 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.
+will be 65589 bytes long (14 bytes of Ethernet header, plus 40 bytes of
+the IPv6 header, plus 65535 bytes of maximum IPv6 payload including any
+extension header), otherwise 1514 bytes.

Hm, I wonder if we should still mention that

"\field{struct virtio_net_header} will be prepended to this, which is either 20 or 12 bytes long, depending on whether VIRTIO_NET_F_HASH_REPORT is negotiated or not."

Quoted 22 lines
device-types/net/description.tex +9 -3
+When VIRTIO_NET_F_HASH_REPORT is not negotiated, the required receive buffer
+size is either 65601 or 1526 bytes.
+When VIRTIO_NET_F_HASH_REPORT is negotiated, the required receive buffer
+size is either 65609 or 1534 bytes.
 
 \drivernormative{\paragraph}{Setting Up Receive Buffers}{Device Types / Network Device / Device Operation / Setting Up Receive Buffers}
 
@@ -669,18 +672,24 @@ \subsubsection{Setting Up Receive Buffers}\label{sec:Device Types / Network Devi
   \begin{itemize}
     \item If VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6, VIRTIO_NET_F_GUEST_UFO,
 	VIRTIO_NET_F_GUEST_USO4 or VIRTIO_NET_F_GUEST_USO6 are negotiated, the driver SHOULD populate
-      the receive queue(s) with buffers of at least 65562 bytes.
+      the receive queue(s) with buffers of at least 65609 bytes if
+      VIRTIO_NET_F_HASH_REPORT is negotiated, and of at least 65601 bytes if not.
     \item Otherwise, the driver SHOULD populate the receive queue(s)
-      with buffers of at least 1526 bytes.
+      with buffers of at least 1534 bytes if VIRTIO_NET_F_HASH_REPORT
+      is negotiated, and of at least 1526 bytes if not.
   \end{itemize}
 \item If VIRTIO_NET_F_MRG_RXBUF is negotiated, each buffer MUST be at
-least the size of the struct virtio_net_hdr.
+least size of \field{struct virtio_net_hdr},

device-types/net/description.tex \subsubsection{Setting Up Receive Buffers}\label{sec:Device Types / Network Devi · line 692

Quoted 10 lines
device-types/net/description.tex +4 -0
+i.e. 20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and 12 bytes if not.
 \end{itemize}
 
 \begin{note}
 Obviously each buffer can be split across multiple descriptor elements.
 \end{note}
 
+The driver MUST consider size of field \field{struct virtio_net_hdr}
+20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and 12 bytes if not.
+

Requiring the driver to consider the size of something to be its actual size seems a bit odd :) I don't think we need this, as the length can be derived from looking at the definitions, and is already spelled out explicitly, if you consider my suggestion above.

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/

#3 lore raw

[virtio-comment] RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 68 lines

From: Cornelia Huck <[email protected]>
Sent: Monday, January 15, 2024 10:14 PM

Quoted 54 lines · Parav Pandit

Receive buffer size calculation is based on the following negotiated features.

The text has wrong calculation for IPv6 and also it has missed VIRTIO_NET_F_HASH_REPORT.

The problem of igorance of VIRTIO_NET_F_HASH_REPORT is reported in [1], however fix for ipv6 payload length must also be considered.

Since for the both the fixes touching same requirements, a new issue is created as [2].

This patch brings following fixes.

1. Fix annotating struct virtio_net_hdr as field 2. Fix receive buffer calculation for guest GSO cases to consider
ipv6 payload length
3. small grammar corrections for article 4. reword the requirement to consider the virtio_ndr_hdr which is
depends on the negotiated feature, hence first clarify the struct virtio_net_hdr size

[1] https://github.com/oasis-tcs/virtio-spec/issues/170
[2] https://github.com/oasis-tcs/virtio-spec/issues/183

---
changelog:
v1->v2:
- addressed comments from Cornelia
- rephrase buffer size wording without explicit length of virtio_net_hdr at 3 places.
- replaced otherwise to ', otherwise'
- rephrase non normative to write as driver normative

---
 device-types/net/description.tex | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)
device-types/net/description.tex +0 -0
index aff5e08..53a56ee 100644
@@ -657,10 +657,13 @@ \subsubsection{Setting Up Receive

Buffers}\label{sec:Device Types / Network Devi If the VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6, VIRTIO_NET_F_GUEST_UFO, VIRTIO_NET_F_GUEST_USO4 or VIRTIO_NET_F_GUEST_USO6 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,

device-types/net/description.tex

Quoted 4 lines
device-types/net/description.tex +3 -1
-making for 65562 or 1526 bytes.
+will be 65589 bytes long (14 bytes of Ethernet header, plus 40 bytes
+of the IPv6 header, plus 65535 bytes of maximum IPv6 payload
+including any extension header), otherwise 1514 bytes.

Hm, I wonder if we should still mention that

Quoted 4 lines

"\field{struct virtio_net_header} will be prepended to this, which is either 20 or 12 bytes long, depending on whether VIRTIO_NET_F_HASH_REPORT is negotiated or not."

Ah I lost that in this change. I will add it. Good point.

Quoted 38 lines
Quoted 1 line

+When VIRTIO_NET_F_HASH_REPORT is not negotiated, the required

receive

device-types/net/description.tex \subsubsection{Setting Up Receive

Quoted 8 lines
device-types/net/description.tex +3 -0
+buffer size is either 65601 or 1526 bytes.
+When VIRTIO_NET_F_HASH_REPORT is negotiated, the required receive
+buffer size is either 65609 or 1534 bytes.
 
 \drivernormative{\paragraph}{Setting Up Receive Buffers}{Device Types

/ Network Device / Device Operation / Setting Up Receive Buffers}

device-types/net/description.tex +0 -0
@@ -669,18 +672,24 @@ \subsubsection{Setting Up Receive

Buffers}\label{sec:Device Types / Network Devi

device-types/net/description.tex \subsubsection{Setting Up Receive · line 673

Quoted 2 lines
device-types/net/description.tex +0 -0
   \begin{itemize}
     \item If VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6,

VIRTIO_NET_F_GUEST_UFO,

device-types/net/description.tex \subsubsection{Setting Up Receive · line 674

Quoted 1 line
device-types/net/description.tex +0 -0
 	VIRTIO_NET_F_GUEST_USO4 or VIRTIO_NET_F_GUEST_USO6 are

negotiated, the driver SHOULD populate

device-types/net/description.tex \subsubsection{Setting Up Receive Buffers}\label{sec:Device Types / Network Devi

Quoted 3 lines
device-types/net/description.tex +2 -1
-      the receive queue(s) with buffers of at least 65562 bytes.
+      the receive queue(s) with buffers of at least 65609 bytes if
+      VIRTIO_NET_F_HASH_REPORT is negotiated, and of at least 65601

bytes if not.

Quoted 7 lines
device-types/net/description.tex +2 -2
     \item Otherwise, the driver SHOULD populate the receive queue(s)
-      with buffers of at least 1526 bytes.
+      with buffers of at least 1534 bytes if VIRTIO_NET_F_HASH_REPORT
+      is negotiated, and of at least 1526 bytes if not.
   \end{itemize}
 \item If VIRTIO_NET_F_MRG_RXBUF is negotiated, each buffer MUST be at
-least the size of the struct virtio_net_hdr.

device-types/net/description.tex \subsubsection{Setting Up Receive Buffers}\label{sec:Device Types / Network Devi

Quoted 10 lines
device-types/net/description.tex +4 -0
+least size of \field{struct virtio_net_hdr}, i.e. 20 bytes if
+VIRTIO_NET_F_HASH_REPORT is negotiated, and 12 bytes if not.
 \end{itemize}
 
 \begin{note}
 Obviously each buffer can be split across multiple descriptor elements.
 \end{note}
 
+The driver MUST consider size of field \field{struct virtio_net_hdr}
+20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and 12 bytes if

not.

Quoted 6 lines

device-types/net/description.tex \subsubsection{Setting Up Receive Buffers}\label{sec:Device Types / Network Devi · line 692

Quoted 1 line
device-types/net/description.tex +1 -0
+

Requiring the driver to consider the size of something to be its actual size seems a bit odd :) I don't think we need this, as the length can be derived from looking at the definitions, and is already spelled out explicitly, if you consider my suggestion above.

We need this because tx side also needs to refer to the virtio_net_hdr in patch 2 to be same as that of the rx side. And hence, this normative sets base line for tx side too. Relying on rest of the receive packet normative is not enough.

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/

#4 lore raw

[virtio-comment] RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 7 lines · Parav Pandit
Quoted 7 lines

From: Cornelia Huck <[email protected]>
Sent: Monday, January 15, 2024 10:14 PM

Quoted 2 lines · Parav Pandit

+The driver MUST consider size of field \field{struct virtio_net_hdr} +20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and 12 bytes if

not.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

+

Requiring the driver to consider the size of something to be its actual size seems a bit odd :) I don't think we need this, as the length can be derived from looking at the definitions, and is already spelled out explicitly, if you consider my suggestion above.

We need this because tx side also needs to refer to the virtio_net_hdr in patch 2 to be same as that of the rx side. And hence, this normative sets base line for tx side too. Relying on rest of the receive packet normative is not enough.

Hm, why? If struct virtio_net_hdr is well-defined, its size is well-defined as well, and we do not need to state it explictly?

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/

#5 lore raw

[virtio-comment] RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 26 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 4:33 PM
To: Parav Pandit <[email protected]>; [email protected]; [email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 15 lines · Parav Pandit
Quoted 15 lines

From: Cornelia Huck <[email protected]>
Sent: Monday, January 15, 2024 10:14 PM

Review

Quoted 4 lines · Parav Pandit
(quoted diff) +4 -0
+The driver MUST consider size of field \field{struct
+virtio_net_hdr}
+20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and 12 bytes
+if

not.

Quoted 1 line

+

Requiring the driver to consider the size of something to be its actual size seems a bit odd :) I don't think we need this, as the length can be derived from looking at the definitions, and is already spelled out explicitly, if you consider my suggestion above.

Quoted 7 lines
Quoted 1 line

We need this because tx side also needs to refer to the virtio_net_hdr in

patch 2 to be same as that of the rx side.

Quoted 1 line

And hence, this normative sets base line for tx side too. Relying on rest of the

receive packet normative is not enough.

Hm, why? If struct virtio_net_hdr is well-defined, its size is well-defined as well, and we do not need to state it explictly?

Because,
the size of virtio_net_hdr is derived from the rx side features.
Today there is no normative line that says that even though you are using A, B, C Rx features, due to which your tx side virtio_net_hdr also changes. The 2nd patch in this series adds this explicit normative as explained in the cover letter.

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/

#6 lore raw

[virtio-comment] RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 28 lines · Parav Pandit
Quoted 28 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 4:33 PM
To: Parav Pandit <[email protected]>; [email protected]; [email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 9 lines · Parav Pandit
Quoted 9 lines

From: Cornelia Huck <[email protected]>
Sent: Monday, January 15, 2024 10:14 PM

Review

Quoted 4 lines · Parav Pandit
(quoted diff) +4 -0
+The driver MUST consider size of field \field{struct
+virtio_net_hdr}
+20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and 12 bytes
+if

not.

Quoted 7 lines
Quoted 6 lines
Quoted 1 line

+

Requiring the driver to consider the size of something to be its actual size seems a bit odd :) I don't think we need this, as the length can be derived from looking at the definitions, and is already spelled out explicitly, if you consider my suggestion above.

We need this because tx side also needs to refer to the virtio_net_hdr in

patch 2 to be same as that of the rx side.

Quoted 1 line

And hence, this normative sets base line for tx side too. Relying on rest of the

Quoted 8 lines
Quoted 4 lines

receive packet normative is not enough.

Hm, why? If struct virtio_net_hdr is well-defined, its size is well-defined as well, and we do not need to state it explictly?

Because,
the size of virtio_net_hdr is derived from the rx side features.
Today there is no normative line that says that even though you are using A, B, C Rx features, due to which your tx side virtio_net_hdr also changes. The 2nd patch in this series adds this explicit normative as explained in the cover letter.

Let's step back a bit.

struct virtio_net_hdr is defined at the beginning of the "Device Operation" section; the definition clearly says that the last three fields depend on VIRTIO_NET_F_HASH_REPORT being negotiated. The device and the driver agree on whether HASH_REPORT is negotiated, and therefore should also agree on the size of virtio_net_hdr?

Or is the problem that we did not state explicitly that the last three fields of virtio_net_hdr do not exist without HASH_REPORT (and are not merely invalid)? If yes, we should spell this out, instead of adding normative statements about what the size of virtio_net_hdr should be considered to be. If virtio_net_hdr has a fixed size, we shouldn't need the second patch, either.

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/

#7 lore raw

[virtio-comment] RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 54 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 6:08 PM
To: Parav Pandit <[email protected]>; [email protected]; [email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 32 lines · Parav Pandit
Quoted 32 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 4:33 PM
To: Parav Pandit <[email protected]>; [email protected];
[email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 9 lines · Parav Pandit
Quoted 9 lines

From: Cornelia Huck <[email protected]>
Sent: Monday, January 15, 2024 10:14 PM

Review

Quoted 4 lines · Parav Pandit
(quoted diff) +4 -0
+The driver MUST consider size of field \field{struct
+virtio_net_hdr}
+20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and 12
+bytes if

not.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

+

Requiring the driver to consider the size of something to be its actual size seems a bit odd :) I don't think we need this, as the length can be derived from looking at the definitions, and is already spelled out explicitly, if you consider my suggestion above.

We need this because tx side also needs to refer to the virtio_net_hdr in

patch 2 to be same as that of the rx side.

Quoted 2 lines

And hence, this normative sets base line for tx side too. Relying on rest of the

Quoted 7 lines
Quoted 4 lines

receive packet normative is not enough.

Hm, why? If struct virtio_net_hdr is well-defined, its size is well-defined as well, and we do not need to state it explictly?

Because,
the size of virtio_net_hdr is derived from the rx side features. Today there is no normative line that says that even though you are using A,

B, C Rx features, due to which your tx side virtio_net_hdr also changes.

Quoted 1 line

The 2nd patch in this series adds this explicit normative as explained in the

cover letter.

Quoted 8 lines

Let's step back a bit.

struct virtio_net_hdr is defined at the beginning of the "Device Operation" section; the definition clearly says that the last three fields depend on VIRTIO_NET_F_HASH_REPORT being negotiated. The device and the driver agree on whether HASH_REPORT is negotiated, and therefore should also agree on the size of virtio_net_hdr?

Do you imply that device operation description is enough to not add normative?
If so, for this case and possibly new things if we write as device operation, would it be enough?

Quoted 4 lines

Or is the problem that we did not state explicitly that the last three fields of virtio_net_hdr do not exist without HASH_REPORT (and are not merely invalid)? If yes, we should spell this out, instead of adding normative statements about what the size of virtio_net_hdr should be considered to be.

This suggested normative is added in this patch.

Quoted 1 line

If virtio_net_hdr has a fixed size, we shouldn't need the second patch, either.

The fact that HASH_REPORT is only for the rx, if we have to go back in time, there is no need for the tx to force also to follow the rx virtio_net_hdr. There is no explicit normative indicating the virtio_net_hdr for the TX is forced by the RX even though it has no relation to hash report.

If you say device operation is enough, than I am sort of lost of when normative is needed, and when device operation is enough.

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/

#8 lore raw

[virtio-comment] Re: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 69 lines · Parav Pandit
Quoted 54 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 6:08 PM
To: Parav Pandit <[email protected]>; [email protected]; [email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 32 lines · Parav Pandit
Quoted 32 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 4:33 PM
To: Parav Pandit <[email protected]>; [email protected];
[email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 9 lines · Parav Pandit
Quoted 9 lines

From: Cornelia Huck <[email protected]>
Sent: Monday, January 15, 2024 10:14 PM

Review

Quoted 4 lines · Parav Pandit
(quoted diff) +4 -0
+The driver MUST consider size of field \field{struct
+virtio_net_hdr}
+20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and 12
+bytes if

not.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

+

Requiring the driver to consider the size of something to be its actual size seems a bit odd :) I don't think we need this, as the length can be derived from looking at the definitions, and is already spelled out explicitly, if you consider my suggestion above.

We need this because tx side also needs to refer to the virtio_net_hdr in

patch 2 to be same as that of the rx side.

Quoted 2 lines

And hence, this normative sets base line for tx side too. Relying on rest of the

Quoted 7 lines
Quoted 4 lines

receive packet normative is not enough.

Hm, why? If struct virtio_net_hdr is well-defined, its size is well-defined as well, and we do not need to state it explictly?

Because,
the size of virtio_net_hdr is derived from the rx side features. Today there is no normative line that says that even though you are using A,

B, C Rx features, due to which your tx side virtio_net_hdr also changes.

Quoted 1 line

The 2nd patch in this series adds this explicit normative as explained in the

cover letter.

Quoted 8 lines

Let's step back a bit.

struct virtio_net_hdr is defined at the beginning of the "Device Operation" section; the definition clearly says that the last three fields depend on VIRTIO_NET_F_HASH_REPORT being negotiated. The device and the driver agree on whether HASH_REPORT is negotiated, and therefore should also agree on the size of virtio_net_hdr?

Do you imply that device operation description is enough to not add normative?
If so, for this case and possibly new things if we write as device operation, would it be enough?

Quoted 4 lines

Or is the problem that we did not state explicitly that the last three fields of virtio_net_hdr do not exist without HASH_REPORT (and are not merely invalid)? If yes, we should spell this out, instead of adding normative statements about what the size of virtio_net_hdr should be considered to be.

Quoted 7 lines

This suggested normative is added in this patch.

Quoted 1 line

If virtio_net_hdr has a fixed size, we shouldn't need the second patch, either.

The fact that HASH_REPORT is only for the rx, if we have to go back in time, there is no need for the tx to force also to follow the rx virtio_net_hdr. There is no explicit normative indicating the virtio_net_hdr for the TX is forced by the RX even though it has no relation to hash report.

If you say device operation is enough, than I am sort of lost of when normative is needed, and when device operation is enough.

Generally we start adding normatives when we see that something is unclear. But I think generally I agree with Parav, if someone has the time to write the normative, it's all good.

Signature · 18 lines
MST


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/
#9 lore raw

[virtio-comment] RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Hi Cornelia,

Quoted 91 lines

From: Michael S. Tsirkin <[email protected]>
Sent: Tuesday, January 16, 2024 6:59 PM

Quoted 34 lines · Parav Pandit
Quoted 34 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 6:08 PM
To: Parav Pandit <[email protected]>; [email protected];
[email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 21 lines · Parav Pandit
Quoted 21 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 4:33 PM
To: Parav Pandit <[email protected]>; [email protected];
[email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 9 lines · Parav Pandit
Quoted 9 lines

From: Cornelia Huck <[email protected]>
Sent: Monday, January 15, 2024 10:14 PM

Review

Quoted 4 lines · Parav Pandit
(quoted diff) +4 -0
+The driver MUST consider size of field \field{struct
+virtio_net_hdr}
+20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and 12
+bytes if

not.

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 1 line

+

Requiring the driver to consider the size of something to be its actual size seems a bit odd :) I don't think we need this, as the length can be derived from looking at the definitions, and is already spelled out explicitly, if you consider my suggestion

above.

Quoted 16 lines
Quoted 16 lines
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

We need this because tx side also needs to refer to the virtio_net_hdr in

patch 2 to be same as that of the rx side.

Quoted 2 lines

And hence, this normative sets base line for tx side too. Relying on rest of the

Quoted 8 lines
Quoted 4 lines

receive packet normative is not enough.

Hm, why? If struct virtio_net_hdr is well-defined, its size is well-defined as well, and we do not need to state it explictly?

Because,
the size of virtio_net_hdr is derived from the rx side features. Today there is no normative line that says that even though you are using A,

B, C Rx features, due to which your tx side virtio_net_hdr also changes.

Quoted 2 lines

The 2nd patch in this series adds this explicit normative as explained in the

Quoted 7 lines
Quoted 7 lines

cover letter.

Let's step back a bit.

struct virtio_net_hdr is defined at the beginning of the "Device Operation" section; the definition clearly says that the last three fields depend on VIRTIO_NET_F_HASH_REPORT being negotiated. The device

and

Quoted 4 lines
Quoted 3 lines

the driver agree on whether HASH_REPORT is negotiated, and therefore should also agree on the size of virtio_net_hdr?

Do you imply that device operation description is enough to not add

normative?

Quoted 1 line

If so, for this case and possibly new things if we write as device operation,

would it be enough?

Quoted 5 lines
Quoted 5 lines

Or is the problem that we did not state explicitly that the last three fields of virtio_net_hdr do not exist without HASH_REPORT (and are not merely invalid)? If yes, we should spell this out, instead of adding normative statements about what the size of virtio_net_hdr

should be considered to be.

Quoted 3 lines

This suggested normative is added in this patch.

Quoted 1 line

If virtio_net_hdr has a fixed size, we shouldn't need the second patch,

either.

Quoted 1 line

The fact that HASH_REPORT is only for the rx, if we have to go back in time,

there is no need for the tx to force also to follow the rx virtio_net_hdr.

Quoted 1 line

There is no explicit normative indicating the virtio_net_hdr for the TX is

forced by the RX even though it has no relation to hash report.

Quoted 1 line
Quoted 7 lines
Quoted 1 line

If you say device operation is enough, than I am sort of lost of when

normative is needed, and when device operation is enough.

Generally we start adding normatives when we see that something is unclear. But I think generally I agree with Parav, if someone has the time to write the normative, it's all good.

Are you ok with the v3?
I kept the clarification for tx and addressed rest of your and Xuan's comments in it.
https://lists.oasis-open.org/archives/virtio-comment/202401/msg00070.html

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/

#10 lore raw

[virtio-comment] RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Hi Cornelia,

Quoted 110 lines

From: [email protected] <[email protected] open.org> On Behalf Of Parav Pandit
Sent: Friday, January 19, 2024 5:56 PM

Hi Cornelia,

Quoted 38 lines

From: Michael S. Tsirkin <[email protected]>
Sent: Tuesday, January 16, 2024 6:59 PM

Quoted 34 lines · Parav Pandit
Quoted 34 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 6:08 PM
To: Parav Pandit <[email protected]>; [email protected];
[email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 21 lines · Parav Pandit
Quoted 21 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 4:33 PM
To: Parav Pandit <[email protected]>; [email protected];
[email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 9 lines · Parav Pandit
Quoted 9 lines

From: Cornelia Huck <[email protected]>
Sent: Monday, January 15, 2024 10:14 PM

Review

Quoted 4 lines · Parav Pandit
(quoted diff) +4 -0
+The driver MUST consider size of field \field{struct
+virtio_net_hdr}
+20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and
+12 bytes if

not.

Quoted 29 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line

+

Requiring the driver to consider the size of something to be its actual size seems a bit odd :) I don't think we need this, as the length can be derived from looking at the definitions, and is already spelled out explicitly, if you consider my suggestion

above.

Quoted 21 lines
Quoted 21 lines
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

We need this because tx side also needs to refer to the virtio_net_hdr in

patch 2 to be same as that of the rx side.

Quoted 2 lines

And hence, this normative sets base line for tx side too. Relying on rest of the

Quoted 8 lines
Quoted 4 lines

receive packet normative is not enough.

Hm, why? If struct virtio_net_hdr is well-defined, its size is well-defined as well, and we do not need to state it explictly?

Because,
the size of virtio_net_hdr is derived from the rx side features. Today there is no normative line that says that even though you are using A,

B, C Rx features, due to which your tx side virtio_net_hdr also changes.

Quoted 2 lines

The 2nd patch in this series adds this explicit normative as explained in the

cover letter.

Let's step back a bit.

struct virtio_net_hdr is defined at the beginning of the "Device

Operation"

Quoted 28 lines
Quoted 2 lines
Quoted 2 lines

section; the definition clearly says that the last three fields depend on VIRTIO_NET_F_HASH_REPORT being negotiated. The device

and

Quoted 4 lines
Quoted 3 lines

the driver agree on whether HASH_REPORT is negotiated, and therefore should also agree on the size of virtio_net_hdr?

Do you imply that device operation description is enough to not add

normative?

Quoted 2 lines

If so, for this case and possibly new things if we write as device operation,

would it be enough?

Quoted 6 lines
Quoted 6 lines

Or is the problem that we did not state explicitly that the last three fields of virtio_net_hdr do not exist without HASH_REPORT (and are not merely invalid)? If yes, we should spell this out, instead of adding normative statements about what the size of virtio_net_hdr

should be considered to be.

Quoted 4 lines

This suggested normative is added in this patch.

Quoted 2 lines

If virtio_net_hdr has a fixed size, we shouldn't need the second patch,

either.

Quoted 2 lines

The fact that HASH_REPORT is only for the rx, if we have to go back in time,

there is no need for the tx to force also to follow the rx virtio_net_hdr.

Quoted 2 lines

There is no explicit normative indicating the virtio_net_hdr for the TX is

Quoted 8 lines

forced by the RX even though it has no relation to hash report.

Quoted 3 lines

If you say device operation is enough, than I am sort of lost of when

normative is needed, and when device operation is enough.

Generally we start adding normatives when we see that something is

Quoted 9 lines

unclear.

Quoted 2 lines

But I think generally I agree with Parav, if someone has the time to write the normative, it's all good.

Are you ok with the v3?
I kept the clarification for tx and addressed rest of your and Xuan's comments in it.
https://lists.oasis-open.org/archives/virtio-comment/202401/msg00070.html

Its been nearly two weeks now.
I assume v3 is ok.
Can you please create the voting ballot?
I updated the github issue to refer to the v3 as well.
https://github.com/oasis-tcs/virtio-spec/issues/183
https://lists.oasis-open.org/archives/virtio-comment/202401/msg00070.html

Quoted 12 lines

This publicly archived list offers a means to provide input to theOASIS Virtual I/O Device (VIRTIO) TC.In order to verify user consent to the Feedback License terms andto minimize spam in the list archive, subscription is requiredbefore posting.Subscribe: [email protected] open.orgUnsubscribe: [email protected]
help: [email protected] archive:
https://lists.oasis-open.org/archives/virtio-comment/Feedback License:
https://www.oasis-open.org/who/ipr/feedback_license.pdfList Guidelines:
https://www.oasis-open.org/policies-guidelines/mailing-listsCommittee:
https://www.oasis-open.org/committees/virtio/Join OASIS:
https://www.oasis-open.org/join/

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/

#11 lore raw

[virtio-comment] RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Hi Cornelia,

Quoted 127 lines

From: Parav Pandit <[email protected]>
Sent: Thursday, February 1, 2024 11:27 AM

Hi Cornelia,

Quoted 112 lines

From: [email protected] <[email protected] open.org> On Behalf Of Parav Pandit
Sent: Friday, January 19, 2024 5:56 PM

Hi Cornelia,

Quoted 38 lines

From: Michael S. Tsirkin <[email protected]>
Sent: Tuesday, January 16, 2024 6:59 PM

Quoted 34 lines · Parav Pandit
Quoted 34 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 6:08 PM
To: Parav Pandit <[email protected]>; [email protected];
[email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 21 lines · Parav Pandit
Quoted 21 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 4:33 PM
To: Parav Pandit <[email protected]>; [email protected]; [email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 9 lines · Parav Pandit
Quoted 9 lines

From: Cornelia Huck <[email protected]>
Sent: Monday, January 15, 2024 10:14 PM

Review

Quoted 4 lines · Parav Pandit
(quoted diff) +4 -0
+The driver MUST consider size of field \field{struct
+virtio_net_hdr}
+20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and
+12 bytes if

not.

Quoted 29 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line

+

Requiring the driver to consider the size of something to be its actual size seems a bit odd :) I don't think we need this, as the length can be derived from looking at the definitions, and is already spelled out explicitly, if you consider my suggestion

above.

Quoted 21 lines
Quoted 21 lines
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

We need this because tx side also needs to refer to the virtio_net_hdr in

patch 2 to be same as that of the rx side.

Quoted 2 lines

And hence, this normative sets base line for tx side too. Relying on rest of the

Quoted 8 lines
Quoted 4 lines

receive packet normative is not enough.

Hm, why? If struct virtio_net_hdr is well-defined, its size is well-defined as well, and we do not need to state it explictly?

Because,
the size of virtio_net_hdr is derived from the rx side features. Today there is no normative line that says that even though you are using A,

B, C Rx features, due to which your tx side virtio_net_hdr also changes.

Quoted 2 lines

The 2nd patch in this series adds this explicit normative as explained in the

cover letter.

Let's step back a bit.

struct virtio_net_hdr is defined at the beginning of the "Device

Operation"

Quoted 29 lines
Quoted 2 lines
Quoted 2 lines

section; the definition clearly says that the last three fields depend on VIRTIO_NET_F_HASH_REPORT being negotiated. The device

and

Quoted 5 lines
Quoted 3 lines

the driver agree on whether HASH_REPORT is negotiated, and therefore should also agree on the size of virtio_net_hdr?

Do you imply that device operation description is enough to not add

normative?

Quoted 2 lines

If so, for this case and possibly new things if we write as device operation,

would it be enough?

Quoted 6 lines
Quoted 6 lines

Or is the problem that we did not state explicitly that the last three fields of virtio_net_hdr do not exist without HASH_REPORT (and are not merely invalid)? If yes, we should spell this out, instead of adding normative statements about what the size of virtio_net_hdr

should be considered to be.

Quoted 4 lines

This suggested normative is added in this patch.

Quoted 2 lines

If virtio_net_hdr has a fixed size, we shouldn't need the second patch,

either.

Quoted 2 lines

The fact that HASH_REPORT is only for the rx, if we have to go back in time,

there is no need for the tx to force also to follow the rx virtio_net_hdr.

Quoted 2 lines

There is no explicit normative indicating the virtio_net_hdr for the TX is

Quoted 8 lines

forced by the RX even though it has no relation to hash report.

Quoted 3 lines

If you say device operation is enough, than I am sort of lost of when

normative is needed, and when device operation is enough.

Generally we start adding normatives when we see that something is

unclear.

Quoted 9 lines
Quoted 2 lines

But I think generally I agree with Parav, if someone has the time to write the normative, it's all good.

Are you ok with the v3?
I kept the clarification for tx and addressed rest of your and Xuan's comments in it.
https://lists.oasis-open.org/archives/virtio-comment/202401/msg00070.h
tml

Quoted 7 lines

Its been nearly two weeks now.
I assume v3 is ok.
Can you please create the voting ballot?
I updated the github issue to refer to the v3 as well.
https://github.com/oasis-tcs/virtio-spec/issues/183
https://lists.oasis-open.org/archives/virtio-
comment/202401/msg00070.html

This thread [2] is waiting your response from 19th January 2023. Can you please either respond or open v3 [1] for vote?

[1] https://lists.oasis-open.org/archives/virtio-comment/202401/msg00070.html
[2] https://lore.kernel.org/virtio-comment/PH0PR12MB5481F74BF29A751E6BC249D4DC702@PH0PR12MB5481.namprd12.prod.outlook.com/

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/

#12 lore raw

Re: [virtio-comment] Re: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

In reply to Michael S. Tsirkin
Quoted 33 lines · Michael S. Tsirkin
Quoted 32 lines · Parav Pandit
Quoted 32 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 6:08 PM
To: Parav Pandit <[email protected]>; [email protected]; [email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 21 lines · Parav Pandit
Quoted 21 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 4:33 PM
To: Parav Pandit <[email protected]>; [email protected];
[email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 9 lines · Parav Pandit
Quoted 9 lines

From: Cornelia Huck <[email protected]>
Sent: Monday, January 15, 2024 10:14 PM

Review

Quoted 4 lines · Parav Pandit
(quoted diff) +4 -0
+The driver MUST consider size of field \field{struct
+virtio_net_hdr}
+20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and 12
+bytes if

not.

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 1 line

+

Requiring the driver to consider the size of something to be its actual size seems a bit odd :) I don't think we need this, as the

My comment here still holds.

Quoted 39 lines
Quoted 39 lines
Quoted 18 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

length can be derived from looking at the definitions, and is already spelled out explicitly, if you consider my suggestion above.

We need this because tx side also needs to refer to the virtio_net_hdr in

patch 2 to be same as that of the rx side.

Quoted 2 lines

And hence, this normative sets base line for tx side too. Relying on rest of the

Quoted 7 lines
Quoted 4 lines

receive packet normative is not enough.

Hm, why? If struct virtio_net_hdr is well-defined, its size is well-defined as well, and we do not need to state it explictly?

Because,
the size of virtio_net_hdr is derived from the rx side features. Today there is no normative line that says that even though you are using A,

B, C Rx features, due to which your tx side virtio_net_hdr also changes.

Quoted 1 line

The 2nd patch in this series adds this explicit normative as explained in the

cover letter.

Quoted 8 lines

Let's step back a bit.

struct virtio_net_hdr is defined at the beginning of the "Device Operation" section; the definition clearly says that the last three fields depend on VIRTIO_NET_F_HASH_REPORT being negotiated. The device and the driver agree on whether HASH_REPORT is negotiated, and therefore should also agree on the size of virtio_net_hdr?

Do you imply that device operation description is enough to not add normative?
If so, for this case and possibly new things if we write as device operation, would it be enough?

Quoted 4 lines

Or is the problem that we did not state explicitly that the last three fields of virtio_net_hdr do not exist without HASH_REPORT (and are not merely invalid)? If yes, we should spell this out, instead of adding normative statements about what the size of virtio_net_hdr should be considered to be.

This suggested normative is added in this patch.

Quoted 1 line

If virtio_net_hdr has a fixed size, we shouldn't need the second patch, either.

The fact that HASH_REPORT is only for the rx, if we have to go back in time, there is no need for the tx to force also to follow the rx virtio_net_hdr. There is no explicit normative indicating the virtio_net_hdr for the TX is forced by the RX even though it has no relation to hash report.

Quoted 6 lines
Quoted 1 line

If you say device operation is enough, than I am sort of lost of when normative is needed, and when device operation is enough.

Generally we start adding normatives when we see that something is unclear. But I think generally I agree with Parav, if someone has the time to write the normative, it's all good.

So if we really want to have normatives, can we come up with something that reads less weirdly? I currently lack the capacity to suggest something.

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/

#13 lore raw

RE: [virtio-comment] Re: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 42 lines

From: Cornelia Huck <[email protected]>
Sent: Monday, February 5, 2024 8:50 PM

Quoted 35 lines · Michael S. Tsirkin
Quoted 34 lines · Parav Pandit
Quoted 34 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 6:08 PM
To: Parav Pandit <[email protected]>; [email protected];
[email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 21 lines · Parav Pandit
Quoted 21 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 4:33 PM
To: Parav Pandit <[email protected]>; [email protected];
[email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 9 lines · Parav Pandit
Quoted 9 lines

From: Cornelia Huck <[email protected]>
Sent: Monday, January 15, 2024 10:14 PM

Review

Quoted 4 lines · Parav Pandit
(quoted diff) +4 -0
+The driver MUST consider size of field \field{struct
+virtio_net_hdr}
+20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and 12
+bytes if

not.

Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line

+

Requiring the driver to consider the size of something to be its actual size seems a bit odd :) I don't think we need this, as the

My comment here still holds.

It is a variable length data structure with few trailing fields as not valid. The "actual size" depends on negotiated feature bit, which is what is written here.

How about below?

When calculating the size of \field{struct virtio_net_hdr}, the driver must consider all the fields inclusive up to \field{padding_reserved}, i.e. 20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and 12 bytes if not.

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/

#14 lore raw

RE: [virtio-comment] Re: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 48 lines · Parav Pandit
Quoted 40 lines

From: Cornelia Huck <[email protected]>
Sent: Monday, February 5, 2024 8:50 PM

Quoted 35 lines · Michael S. Tsirkin
Quoted 34 lines · Parav Pandit
Quoted 34 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 6:08 PM
To: Parav Pandit <[email protected]>; [email protected];
[email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 21 lines · Parav Pandit
Quoted 21 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 4:33 PM
To: Parav Pandit <[email protected]>; [email protected];
[email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 9 lines · Parav Pandit
Quoted 9 lines

From: Cornelia Huck <[email protected]>
Sent: Monday, January 15, 2024 10:14 PM

Review

Quoted 4 lines · Parav Pandit
(quoted diff) +4 -0
+The driver MUST consider size of field \field{struct
+virtio_net_hdr}
+20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and 12
+bytes if

not.

Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line

+

Requiring the driver to consider the size of something to be its actual size seems a bit odd :) I don't think we need this, as the

My comment here still holds.

Quoted 8 lines

It is a variable length data structure with few trailing fields as not valid. The "actual size" depends on negotiated feature bit, which is what is written here.

How about below?

When calculating the size of \field{struct virtio_net_hdr}, the driver must consider all the fields inclusive up to \field{padding_reserved}, i.e. 20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and 12 bytes if not.

It's up to padding_reserved with F_HASH_REPORT and up to num_buffers if not, isn't it?

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/

#15 lore raw

RE: [virtio-comment] Re: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 61 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, February 6, 2024 10:32 PM

Quoted 42 lines · Parav Pandit
Quoted 42 lines

From: Cornelia Huck <[email protected]>
Sent: Monday, February 5, 2024 8:50 PM

Quoted 37 lines · Michael S. Tsirkin
Quoted 36 lines · Parav Pandit
Quoted 36 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 6:08 PM
To: Parav Pandit <[email protected]>; [email protected];
[email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 23 lines · Parav Pandit
Quoted 23 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 4:33 PM
To: Parav Pandit <[email protected]>; [email protected]; [email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 11 lines · Parav Pandit
Quoted 11 lines

From: Cornelia Huck <[email protected]>
Sent: Monday, January 15, 2024 10:14 PM

Review

Quoted 4 lines · Parav Pandit
(quoted diff) +4 -0
+The driver MUST consider size of field \field{struct
+virtio_net_hdr}
+20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and
+12 bytes if

not.

Quoted 1 line

+

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Requiring the driver to consider the size of something to be its actual size seems a bit odd :) I don't think we need this, as the

My comment here still holds.

It is a variable length data structure with few trailing fields as not valid. The "actual size" depends on negotiated feature bit, which is what is written

here.

Quoted 3 lines

How about below?

Quoted 7 lines
Quoted 3 lines

When calculating the size of \field{struct virtio_net_hdr}, the driver must consider all the fields inclusive up to \field{padding_reserved}, i.e. 20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and 12 bytes if

not.

It's up to padding_reserved with F_HASH_REPORT and up to num_buffers if not, isn't it?

Yes, shall I send v4 as?
When calculating the size of \field{struct virtio_net_hdr}, the driver must consider all the fields inclusive up to \field{padding_reserved}, i.e. 20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and upto \field{num_buffers}, i.e. 12 bytes if not.

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/

#16 lore raw

RE: [virtio-comment] Re: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

In reply to Parav Pandit
Quoted 67 lines

From: [email protected] <[email protected] open.org> On Behalf Of Parav Pandit
Sent: Monday, February 5, 2024 9:54 PM
To: Cornelia Huck <[email protected]>; Michael S. Tsirkin <[email protected]>
Cc: [email protected]; Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [virtio-comment] Re: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 40 lines

From: Cornelia Huck <[email protected]>
Sent: Monday, February 5, 2024 8:50 PM

Quoted 35 lines · Michael S. Tsirkin
Quoted 34 lines · Parav Pandit
Quoted 34 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 6:08 PM
To: Parav Pandit <[email protected]>; [email protected];
[email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 21 lines · Parav Pandit
Quoted 21 lines

From: Cornelia Huck <[email protected]>
Sent: Tuesday, January 16, 2024 4:33 PM
To: Parav Pandit <[email protected]>; [email protected]; [email protected]
Cc: Shahaf Shuler <[email protected]>; [email protected]; [email protected]
Subject: RE: [PATCH v2 1/2] virtio-net: Fix receive buffer size calculation text

Quoted 9 lines · Parav Pandit
Quoted 9 lines

From: Cornelia Huck <[email protected]>
Sent: Monday, January 15, 2024 10:14 PM

Review

Quoted 4 lines · Parav Pandit
(quoted diff) +4 -0
+The driver MUST consider size of field \field{struct
+virtio_net_hdr}
+20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and
+12 bytes if

not.

Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line

+

Requiring the driver to consider the size of something to be its actual size seems a bit odd :) I don't think we need this, as the

My comment here still holds.

It is a variable length data structure with few trailing fields as not valid. The "actual size" depends on negotiated feature bit, which is what is written here.

Quoted 5 lines

How about below?

When calculating the size of \field{struct virtio_net_hdr}, the driver must consider all the fields inclusive up to \field{padding_reserved}, i.e. 20 bytes if VIRTIO_NET_F_HASH_REPORT is negotiated, and 12 bytes if not.

I will shortly post v4 with this as there is no objection for this one line change. Thanks.

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/

#17 lore raw

PATCH v2 2/2 virtio-net: Clarify the size of the struct virtio_net_hdr for tx

In reply to Parav Pandit

The feature VIRTIO_NET_F_HASH_REPORT only applies to the receive side. However, when VIRTIO_NET_F_HASH_REPORT feature was introduced, it was not clarified that the size of the struct virtio_net_hdr on the packet transmission also uses higher size when VIRTIO_NET_F_HASH_REPORT is negotiated.

Explicitly clarify this.

---
changelog:
v0->v1:
- addressed comments from Xuan to rewrite tx normative

---
 device-types/net/description.tex | 3 +++
 1 file changed, 3 insertions(+)
device-types/net/description.tex +3 -0
index 53a56ee..e2de016 100644
@@ -528,6 +528,9 @@ \subsubsection{Packet Transmission}\label{sec:Device Types / Network Device / De
 
 \drivernormative{\paragraph}{Packet Transmission}{Device Types / Network Device / Device Operation / Packet Transmission}
 
+The driver MUST use the same size of the field \field{struct virtio_net_hdr}
+for transmit and receive packet buffers.
+
 The driver MUST set \field{num_buffers} to zero.
 
 If VIRTIO_NET_F_CSUM is not negotiated, the driver MUST set
Signature · 18 lines
2.34.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/
#18 lore raw

[virtio-comment] Re: [PATCH v2 2/2] virtio-net: Clarify the size of the struct virtio_net_hdr for tx

Quoted 24 lines · Parav Pandit

The feature VIRTIO_NET_F_HASH_REPORT only applies to the receive side. However, when VIRTIO_NET_F_HASH_REPORT feature was introduced, it was not clarified that the size of the struct virtio_net_hdr on the packet transmission also uses higher size when VIRTIO_NET_F_HASH_REPORT is negotiated.

Explicitly clarify this.

---
changelog:
v0->v1:
- addressed comments from Xuan to rewrite tx normative

---
 device-types/net/description.tex | 3 +++
 1 file changed, 3 insertions(+)
device-types/net/description.tex +0 -0
index 53a56ee..e2de016 100644

device-types/net/description.tex \subsubsection{Packet Transmission}\label{sec:Device Types / Network Device / De · line 532

Quoted 5 lines
device-types/net/description.tex +2 -0
@@ -528,6 +528,9 @@ \subsubsection{Packet Transmission}\label{sec:Device Types / Network Device / De
 
 \drivernormative{\paragraph}{Packet Transmission}{Device Types / Network Device / Device Operation / Packet Transmission}
 
+The driver MUST use the same size of the field \field{struct virtio_net_hdr}
+for transmit and receive packet buffers.

s/field/structure/ ?

Thanks.

Quoted 7 lines
device-types/net/description.tex +1 -1
+
 The driver MUST set \field{num_buffers} to zero.
 
 If VIRTIO_NET_F_CSUM is not negotiated, the driver MUST set
--

2.34.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/

#19 lore raw

[virtio-comment] RE: [PATCH v2 2/2] virtio-net: Clarify the size of the struct virtio_net_hdr for tx

Quoted 35 lines

From: Xuan Zhuo <[email protected]>
Sent: Tuesday, January 16, 2024 9:05 AM

Quoted 2 lines · Parav Pandit

The feature VIRTIO_NET_F_HASH_REPORT only applies to the receive side. However, when VIRTIO_NET_F_HASH_REPORT feature was introduced, it

was

Quoted 25 lines

not clarified that the size of the struct virtio_net_hdr on the packet transmission also uses higher size when VIRTIO_NET_F_HASH_REPORT is negotiated.

Explicitly clarify this.

---
changelog:
v0->v1:
- addressed comments from Xuan to rewrite tx normative

---
 device-types/net/description.tex | 3 +++
 1 file changed, 3 insertions(+)
device-types/net/description.tex +0 -0
index 53a56ee..e2de016 100644
@@ -528,6 +528,9 @@ \subsubsection{Packet

Transmission}\label{sec:Device Types / Network Device / De

Quoted 8 lines

device-types/net/description.tex

Quoted 5 lines

\drivernormative{\paragraph}{Packet Transmission}{Device Types /
Network Device / Device Operation / Packet Transmission}

device-types/net/description.tex +2 -0
+The driver MUST use the same size of the field \field{struct
+virtio_net_hdr} for transmit and receive packet buffers.

s/field/structure/ ?

Ok. will change in v3.

Quoted 10 lines

Thanks.

Quoted 7 lines

+
The driver MUST set \field{num_buffers} to zero.

If VIRTIO_NET_F_CSUM is not negotiated, the driver MUST set
--
2.34.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/