virtio-net: support distinguishing between partial and full checksum
v4 cover virtio-net: support distinguishing between partial and full checksum
If VIRTIO_NET_F_GUEST_CSUM is negotiated, the driver does not support the loading of XDP because it can receive packets with partial checksum.
This prevents users using XDP from enjoying the benefits of device calculation and validation of checksum.
This patch set is designed to resolve this issue.
Changelog:
=========v3->v4:
- Patch[1/2]: Update the description for VIRTIO_NET_F_GUEST_CSUM.
- Patch[2/2]:
- Streamline some repetitive descriptions.
- Add how features should work, when to be enabled, and overhead.
v2->v3:
- Add a section named "Driver Handles Fully Checksummed Packets" and more descriptions. @Michael
v1->v2:
- Modify full checksum functionality as a configurable offload that is initially turned off. @Jason
Heng Qi (2):
virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
virtio-net: support distinguishing between partial and full checksum
device-types/net/description.tex | 68 ++++++++++++++++++++++--- device-types/net/device-conformance.tex | 1 + device-types/net/driver-conformance.tex | 1 + introduction.tex | 3 ++ 4 files changed, 66 insertions(+), 7 deletions(-)
Signature · 18 lines
2.19.1.6.gb485710b 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/
PATCH v4 2/2 virtio-net: support distinguishing between partial and full checksum
virtio-net works in a virtualized system and is somewhat different from physical nics. One of the differences is that to save virtio device resources, rx may receive packets with partial checksum. However, XDP may cause partially checksummed packets to be dropped. So XDP loading conflicts with the feature VIRTIO_NET_F_GUEST_CSUM.
This patch lets the device to supply fully checksummed packets to the driver. Then XDP can coexist with VIRTIO_NET_F_GUEST_CSUM to enjoy the benefits of device verification checksum.
In addition, implementation of some performant devices do not generate partially checksummed packets, but the standard driver still need to clear VIRTIO_NET_F_GUEST_CSUM when loading XDP. If these devices enable the full checksum offloading, then the driver can load XDP without clearing VIRTIO_NET_F_GUEST_CSUM.
A new feature bit VIRTIO_NET_F_GUEST_FULL_CSUM is added to solve the above situation, which provides the driver with configurable receive full checksum offload. If the offload is enabled, then the device must supply fully checksummed packets to the driver.
Use case example:
If VIRTIO_NET_F_GUEST_FULL_CSUM is negotiated and receive full checksum offload is enabled, after XDP processes a packet with full checksum, the VIRTIO_NET_HDR_F_DATA_VALID bit is still retained, resulting in the stack not needing to validate the checksum again. This is useful for guests:
1. Bring the driver advantages such as cpu savings.
2. For devices that do not generate partially checksummed packets themselves, XDP can be loaded in the driver without modifying the hardware behavior.
Several solutions have been discussed in the previous proposal[1]. After historical discussion, we have tried the method proposed by Jason[2], but some complex scenarios and challenges are difficult to deal with. We now return to the method suggested in [1].
[1] https://lists.oasis-open.org/archives/virtio-dev/202305/msg00291.html
[2] https://lore.kernel.org/all/[email protected]/
---v3->v4:
- Streamline some repetitive descriptions. @Jason
- Add how features should work, when to be enabled, and overhead. @Jason @Michael
v2->v3:
- Add a section named "Driver Handles Fully Checksummed Packets" and more descriptions. @Michael
v1->v2:
- Modify full checksum functionality as a configurable offload that is initially turned off. @Jason
device-types/net/description.tex | 66 ++++++++++++++++++++++--- device-types/net/device-conformance.tex | 1 + device-types/net/driver-conformance.tex | 1 + introduction.tex | 3 ++ 4 files changed, 65 insertions(+), 6 deletions(-)
device-types/net/description.tex +60 -6
@@ -122,6 +122,8 @@ \subsection{Feature bits}\label{sec:Device Types / Network Device / Feature bits device with the same MAC address. \item[VIRTIO_NET_F_SPEED_DUPLEX(63)] Device reports speed and duplex. + +\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with full checksum. \end{description} \subsubsection{Feature bit requirements}\label{sec:Device Types / Network Device / Feature bits / Feature bit requirements}
@@ -136,6 +138,7 @@ \subsubsection{Feature bit requirements}\label{sec:Device Types / Network Device \item[VIRTIO_NET_F_GUEST_UFO] Requires VIRTIO_NET_F_GUEST_CSUM. \item[VIRTIO_NET_F_GUEST_USO4] Requires VIRTIO_NET_F_GUEST_CSUM. \item[VIRTIO_NET_F_GUEST_USO6] Requires VIRTIO_NET_F_GUEST_CSUM. +\item[VIRTIO_NET_F_GUEST_FULL_CSUM] Requires VIRTIO_NET_F_GUEST_CSUM and VIRTIO_NET_F_CTRL_GUEST_OFFLOADS. \item[VIRTIO_NET_F_HOST_TSO4] Requires VIRTIO_NET_F_CSUM. \item[VIRTIO_NET_F_HOST_TSO6] Requires VIRTIO_NET_F_CSUM.
@@ -398,6 +401,51 @@ \subsection{Device Initialization}\label{sec:Device Types / Network Device / Dev A truly minimal driver would only accept VIRTIO_NET_F_MAC and ignore everything else. +\subsubsection{Driver Handles Fully Checksummed Packets}\label{sec:Device Types / Network Device / Device Initialization / Driver Handles Fully Checksummed Packets} + +The VIRTIO_NET_F_GUEST_CSUM feature indicates that the driver can handle +partially or fully checksummed packets from the device. + +When the driver only expects fully checksummed packets, the +VIRTIO_NET_F_GUEST_FULL_CSUM feature can be negotiated if the device offers it. +Then the driver only handles packets with full checksum. + +If the VIRTIO_NET_F_GUEST_FULL_CSUM feature is negotiated, the driver can +benefit from the device's ability to calculate and validate the checksum. + +Delivering fully checksummed packets rather than partially +checksummed packets incurs additional overhead for the device. +The overhead varies from device to device, for example the overhead of +calculating and validating the packet checksum is a few microseconds +for a hardware device. + +The VIRTIO_NET_F_GUEST_FULL_CSUM feature has a corresponding offload \ref{sec:Device Types / +Network Device / Device Operation / Control Virtqueue / Offloads State Configuration}, +which when enabled means that the driver only processes packets with full checksum. +The offload is disabled by default. + +The driver can enable the offload by sending the +VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET command with the +VIRTIO_NET_F_GUEST_FULL_CSUM bit set when, for example, +eXpress Data Path (XDP) \hyperref[intro:xdp]{[XDP]} is functioning. + +\drivernormative{\subsubsection}{Driver Handles Fully Checksummed Packets}{sec:Device Types / Network Device / Device Initialization / Driver Handles Fully Checksummed Packets} + +The driver MUST NOT enable the offload for which VIRTIO_NET_F_GUEST_FULL_CSUM has not been negotiated. + +\devicenormative{\subsubsection}{Driver Handles Fully Checksummed Packets}{sec:Device Types / Network Device / Device Initialization / Driver Handles Fully Checksummed Packets} + +Upon the device reset, the device MUST disable the offload. + +If the offload was enabled, the device behaves as follows: +\begin{itemize} +\item The device MUST supply a fully checksummed packet to the driver. +\item The device MUST NOT set the VIRTIO_NET_HDR_F_NEEDS_CSUM bit in \field{flags}. +\item The device MAY set the VIRTIO_NET_HDR_F_DATA_VALID bit in \field{flags}, if so, +the device MUST validate the packet checksum (in case of multiple encapsulated protocols, +one level of checksums is validated). +\end{itemize} + \subsection{Device Operation}\label{sec:Device Types / Network Device / Device Operation} Packets are transmitted by placing them in the
@@ -723,7 +771,8 @@ \subsubsection{Processing of Incoming Packets}\label{sec:Device Types / Network \field{num_buffers} is one, then the entire packet will be contained within this buffer, immediately following the struct virtio_net_hdr. -\item If the VIRTIO_NET_F_GUEST_CSUM feature was negotiated, the +\item If the VIRTIO_NET_F_GUEST_CSUM feature (regardless of whether + VIRTIO_NET_F_GUEST_FULL_CSUM was negotiated) was negotiated, the VIRTIO_NET_HDR_F_DATA_VALID bit in \field{flags} can be set: if so, device has validated the packet checksum. In case of multiple encapsulated protocols, one level of checksums
@@ -747,7 +796,8 @@ \subsubsection{Processing of Incoming Packets}\label{sec:Device Types / Network number of coalesced TCP segments in \field{csum_start} field and number of duplicated ACK segments in \field{csum_offset} field and sets bit VIRTIO_NET_HDR_F_RSC_INFO in \field{flags}. -\item If the VIRTIO_NET_F_GUEST_CSUM feature was negotiated, the +\item If the VIRTIO_NET_F_GUEST_CSUM feature was negotiated but the + VIRTIO_NET_F_GUEST_FULL_CSUM feature was not negotiated, the VIRTIO_NET_HDR_F_NEEDS_CSUM bit in \field{flags} can be set: if so, the packet checksum at offset \field{csum_offset} from \field{csum_start} and any preceding checksums
@@ -805,8 +855,9 @@ \subsubsection{Processing of Incoming Packets}\label{sec:Device Types / Network device MUST set the VIRTIO_NET_HDR_GSO_ECN bit in \field{gso_type}. -If the VIRTIO_NET_F_GUEST_CSUM feature has been negotiated, the -device MAY set the VIRTIO_NET_HDR_F_NEEDS_CSUM bit in +If the VIRTIO_NET_F_GUEST_CSUM feature has been negotiated but +the VIRTIO_NET_F_GUEST_FULL_CSUM feature has not been negotiated, +the device MAY set the VIRTIO_NET_HDR_F_NEEDS_CSUM bit in \field{flags}, if so: \begin{enumerate} \item the device MUST validate the packet checksum at
@@ -826,7 +877,8 @@ \subsubsection{Processing of Incoming Packets}\label{sec:Device Types / Network been negotiated, the device MUST set \field{gso_type} to VIRTIO_NET_HDR_GSO_NONE. -If \field{gso_type} differs from VIRTIO_NET_HDR_GSO_NONE, then +If the VIRTIO_NET_F_GUEST_FULL_CSUM feature has not been negotiated and +\field{gso_type} differs from VIRTIO_NET_HDR_GSO_NONE, then the device MUST also set the VIRTIO_NET_HDR_F_NEEDS_CSUM bit in \field{flags} MUST set \field{gso_size} to indicate the desired MSS. If VIRTIO_NET_F_RSC_EXT was negotiated, the device MUST also
@@ -842,7 +894,8 @@ \subsubsection{Processing of Incoming Packets}\label{sec:Device Types / Network not less than the length of the headers, including the transport header. -If the VIRTIO_NET_F_GUEST_CSUM feature has been negotiated, the +If the VIRTIO_NET_F_GUEST_CSUM feature (regardless of whether +VIRTIO_NET_F_GUEST_FULL_CSUM has been negotiated) has been negotiated, the device MAY set the VIRTIO_NET_HDR_F_DATA_VALID bit in \field{flags}, if so, the device MUST validate the packet checksum (in case of multiple encapsulated protocols, one level
@@ -1633,6 +1686,7 @@ \subsubsection{Control Virtqueue}\label{sec:Device Types / Network Device / Devi #define VIRTIO_NET_F_GUEST_UFO 10 #define VIRTIO_NET_F_GUEST_USO4 54 #define VIRTIO_NET_F_GUEST_USO6 55 +#define VIRTIO_NET_F_GUEST_FULL_CSUM 64 #define VIRTIO_NET_CTRL_GUEST_OFFLOADS 5 #define VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET 0
device-types/net/device-conformance.tex +1 -0
@@ -16,4 +16,5 @@ \item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Notifications Coalescing} \item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Inner Header Hash} \item \ref{devicenormative:Device Types / Network Device / Device Operation / Control Virtqueue / Device Statistics} +\item \ref{devicenormative:Device Types / Network Device / Device Initialization / Driver Handles Fully Checksummed Packets} \end{itemize}
device-types/net/driver-conformance.tex +1 -0
@@ -16,4 +16,5 @@ \item \ref{drivernormative:Device Types / Network Device / Device Operation / Control Virtqueue / Notifications Coalescing} \item \ref{drivernormative:Device Types / Network Device / Device Operation / Control Virtqueue / Inner Header Hash} \item \ref{drivernormative:Device Types / Network Device / Device Operation / Control Virtqueue / Device Statistics} +\item \ref{drivernormative:Device Types / Network Device / Device Initialization / Driver Handles Fully Checksummed Packets} \end{itemize}
introduction.tex +3 -0
@@ -145,6 +145,9 @@ \section{Normative References}\label{sec:Normative References} Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017 \newline\url{http://www.ietf.org/rfc/rfc8174.txt}\\ + \phantomsection\label{intro:xdp}\textbf{[XDP]} & + eXpress Data Path(XDP) provides a high performance, programmable network data path in the Linux kernel. + \newline\url{https://prototype-kernel.readthedocs.io/en/latest/networking/XDP/}\\ \end{longtable} \section{Non-Normative References}
Signature · 18 lines
2.19.1.6.gb485710b 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/
PATCH v4 1/2 virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
In reply to Heng QiTo prevent readers from misunderstanding that the driver can only handles packets with partial checksum when VIRTIO_NET_F_GUEST_CSUM is negotiated, we update the description.
--- device-types/net/description.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
device-types/net/description.tex +1 -1
@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types / Network Device / Feature bits \begin{description} \item[VIRTIO_NET_F_CSUM (0)] Device handles packets with partial checksum offload. -\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum. +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum. \item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads reconfiguration support.
Signature · 18 lines
2.19.1.6.gb485710b 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/
[virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 15 lines · Heng Qi
To prevent readers from misunderstanding that the driver can only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUMis negotiated, we update the description.Signed-off-by Heng Qi <[email protected]>--- device-types/net/description.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)device-types/net/description.tex +0
-0
device-types/net/description.tex \subsection{Feature bits}\label{sec:Device Types / Network Device / Feature bits · line 41
Quoted 5 lines
device-types/net/description.tex +1
-1@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types / Network Device / Feature bits \begin{description} \item[VIRTIO_NET_F_CSUM (0)] Device handles packets with partial checksum offload. -\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum. +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.
So patch 2 said
"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with full checksum.
\end{description}
"
Is there any difference between the two "full checksum" here?
Thanks
Quoted 6 lines
device-types/net/description.tex +0
-1\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads reconfiguration support. --2.19.1.6.gb485710b
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 22 lines · Jason Wang
Quoted 14 lines · Heng Qi
To prevent readers from misunderstanding that the driver can only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUMis negotiated, we update the description.Signed-off-by Heng Qi <[email protected]>--- device-types/net/description.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)device-types/net/description.tex +0
-0device-types/net/description.tex \subsection{Feature bits}\label{sec:Device Types / Network Device / Feature bits · line 41
Quoted 5 lines
device-types/net/description.tex +1
-1@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types / Network Device / Feature bits \begin{description} \item[VIRTIO_NET_F_CSUM (0)] Device handles packets with partial checksum offload. -\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum. +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.So patch 2 said
Quoted 7 lines
"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with full checksum.
\end{description}
"Is there any difference between the two "full checksum" here?
There's no difference.
The core is that VIRTIO_NET_F_GUEST_FULL_CSUM means that the driver "can only" handle packets with full checksum.
Thanks!
Quoted 8 lines
Thanks
Quoted 5 lines
device-types/net/description.tex +0
-1\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads reconfiguration support. --2.19.1.6.gb485710b
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 32 lines · Heng Qi
Quoted 28 lines · Jason Wang
Quoted 14 lines · Heng Qi
To prevent readers from misunderstanding that the driver can only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUMis negotiated, we update the description.Signed-off-by Heng Qi <[email protected]>--- device-types/net/description.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)device-types/net/description.tex +0
-0device-types/net/description.tex \subsection{Feature bits}\label{sec:Device Types / Network Device / Feature bits · line 41
Quoted 5 lines
device-types/net/description.tex +1
-1@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types / Network Device / Feature bits \begin{description} \item[VIRTIO_NET_F_CSUM (0)] Device handles packets with partial checksum offload. -\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum. +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.So patch 2 said
"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with full checksum.
\end{description}
"
Quoted 6 lines
Quoted 1 line
Is there any difference between the two "full checksum" here?
There's no difference.
The core is that
VIRTIO_NET_F_GUEST_FULL_CSUMmeans that the driver "can only" handle packets with full checksum.
This seems to be odd.
Driver can always handle packet with full checksum, no? I meant it will be then to be functional equivalent to ! VIRTIO_NET_F_GUEST_FULL_CSUM?
Thanks
Quoted 12 lines
Thanks!
Quoted 8 lines
Thanks
Quoted 5 lines
device-types/net/description.tex +0
-1\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads reconfiguration support. --2.19.1.6.gb485710b
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 32 lines · Jason Wang
Quoted 31 lines · Heng Qi
Quoted 28 lines · Jason Wang
Quoted 14 lines · Heng Qi
To prevent readers from misunderstanding that the driver can only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUMis negotiated, we update the description.Signed-off-by Heng Qi <[email protected]>--- device-types/net/description.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)device-types/net/description.tex +0
-0device-types/net/description.tex \subsection{Feature bits}\label{sec:Device Types / Network Device / Feature bits · line 41
Quoted 5 lines
device-types/net/description.tex +1
-1@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types / Network Device / Feature bits \begin{description} \item[VIRTIO_NET_F_CSUM (0)] Device handles packets with partial checksum offload. -\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum. +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.So patch 2 said
"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with full checksum.
\end{description}
"
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Is there any difference between the two "full checksum" here?
There's no difference.
The core is that
VIRTIO_NET_F_GUEST_FULL_CSUMmeans that the driver "can only" handle packets with full checksum.This seems to be odd.
Driver can always handle packet with full checksum, no?
Yes.
Quoted 3 lines
I meant it
will be then to be functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM?
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ? If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle packets with partial checksum.
Thanks!
Quoted 12 lines
Thanks
Quoted 9 lines
Thanks!
Quoted 7 lines
Thanks
Quoted 5 lines
device-types/net/description.tex +0
-1\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads reconfiguration support. --2.19.1.6.gb485710b
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 47 lines · Heng Qi
Quoted 35 lines · Jason Wang
Quoted 34 lines · Heng Qi
Quoted 31 lines · Jason Wang
Quoted 18 lines · Heng Qi
To prevent readers from misunderstanding that the driver can only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUMis negotiated, we update the description.Signed-off-by Heng Qi <[email protected]>---
device-types/net/description.tex | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)device-types/net/description.tex +0
-0@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with partial checksum offload.Quoted 4 lines
-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.So patch 2 said
"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with full checksum.
\end{description}
"Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Is there any difference between the two "full checksum" here?
There's no difference.
The core is that
VIRTIO_NET_F_GUEST_FULL_CSUMmeans that the driver "can only" handle packets with full checksum.This seems to be odd.
Driver can always handle packet with full checksum, no?
Quoted 8 lines
Yes.
Quoted 3 lines
I meant it
will be then to be functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM?Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?
Sorry, this is a typo. I meant
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?
Quoted 30 lines
If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle packets with partial checksum.
Thanks!
Quoted 12 lines
Thanks
Quoted 9 lines
Thanks!
Quoted 7 lines
Thanks
Quoted 5 lines
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads reconfiguration support.
Signature · 1 line
2.19.1.6.gb485710bThis 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.
Quoted 8 lines
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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 62 lines · Heng Qi
Quoted 58 lines · Heng Qi
Quoted 40 lines · Jason Wang
Quoted 38 lines · Heng Qi
Quoted 35 lines · Jason Wang
Quoted 20 lines · Heng Qi
To prevent readers from misunderstanding that the driver can only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUMis negotiated, we update the description.Signed-off-by Heng Qi <[email protected]>--- device-types/net/description.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)device-types/net/description.tex +0
-0@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.Quoted 4 lines
-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.So patch 2 said
"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with full checksum.
\end{description}
"Is there any difference between the two "full checksum" here?
Quoted 8 lines
Quoted 5 lines
There's no difference.
The core is that
VIRTIO_NET_F_GUEST_FULL_CSUMmeans that the driver "can
only" handle packets with full checksum.This seems to be odd.
Driver can always handle packet with full checksum, no?
Yes.
Quoted 3 lines
I meant it
will be then to be functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM?
Quoted 14 lines
Quoted 2 lines
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?Sorry, this is a typo. I meant
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?Quoted 6 lines
If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle packets with partial checksum.
I may miss something here, but what's the difference between
VIRTIO_NET_F_GUEST_FULL_CSUM
and
!VIRTIO_NET_F_GUEST_CSUM?
Thanks
Quoted 24 lines
Quoted 24 lines
Thanks!
Quoted 12 lines
Thanks
Quoted 9 lines
Thanks!
Quoted 7 lines
Thanks
Quoted 5 lines
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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.
Quoted 10 lines
Quoted 9 lines
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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 71 lines · Jason Wang
Quoted 57 lines · Heng Qi
Quoted 54 lines · Heng Qi
Quoted 39 lines · Jason Wang
Quoted 37 lines · Heng Qi
Quoted 35 lines · Jason Wang
Quoted 20 lines · Heng Qi
To prevent readers from misunderstanding that the driver can only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUMis negotiated, we update the description.Signed-off-by Heng Qi <[email protected]>--- device-types/net/description.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)device-types/net/description.tex +0
-0@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.Quoted 4 lines
-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.So patch 2 said
"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with full checksum.\end{description}"
Is there any difference between the two "full checksum" here?
Quoted 8 lines
Quoted 5 lines
There's no difference.
The core is that
VIRTIO_NET_F_GUEST_FULL_CSUMmeans that the driver "can
only" handle packets with full checksum.This seems to be odd.
Driver can always handle packet with full checksum, no?
Yes.
Quoted 3 lines
I meant it
will be then to be functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM?Quoted 13 lines
Quoted 2 lines
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?Sorry, this is a typo. I meant
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?Quoted 6 lines
If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle packets with partial checksum.
Quoted 7 lines
I may miss something here, but what's the difference between
VIRTIO_NET_F_GUEST_FULL_CSUMand
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:
If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full checksum to the driver, but the device can not validate the checksum for these packets. That is, the flags in virtio-net-hdr will not contain _DATA_VALID, and the driver or stack needs to validate these packets.
If VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full checksum to the driver, and the device can validate the checksum for these packets. That is, the flags in virtio-net-hdr will contain _DATA_VALID, and the driver or stack does not need to validate these packets.
Thanks!
Quoted 33 lines
Thanks
Quoted 30 lines
Quoted 30 lines
Thanks!
Quoted 11 lines
Thanks
Quoted 9 lines
Thanks!
Quoted 7 lines
Thanks
Quoted 5 lines
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 92 lines · Heng Qi
Quoted 71 lines · Jason Wang
Quoted 57 lines · Heng Qi
Quoted 54 lines · Heng Qi
Quoted 39 lines · Jason Wang
Quoted 37 lines · Heng Qi
Quoted 35 lines · Jason Wang
Quoted 20 lines · Heng Qi
To prevent readers from misunderstanding that the driver can only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUMis negotiated, we update the description.Signed-off-by Heng Qi <[email protected]>--- device-types/net/description.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)device-types/net/description.tex +0
-0@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.Quoted 4 lines
-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.So patch 2 said
"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with full checksum.\end{description}"
Is there any difference between the two "full checksum" here?
Quoted 8 lines
Quoted 5 lines
There's no difference.
The core is that
VIRTIO_NET_F_GUEST_FULL_CSUMmeans that the driver "can
only" handle packets with full checksum.This seems to be odd.
Driver can always handle packet with full checksum, no?
Yes.
Quoted 3 lines
I meant it
will be then to be functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM?Quoted 13 lines
Quoted 2 lines
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?Sorry, this is a typo. I meant
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?Quoted 6 lines
If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle packets with partial checksum.
Quoted 7 lines
I may miss something here, but what's the difference between
VIRTIO_NET_F_GUEST_FULL_CSUMand
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:
If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full checksum to the driver,
but the device can not validate the checksum for these packets. That is, the flags in virtio-net-hdr
will not contain_DATA_VALID, and the driver or stack needs to validate these packets.
Quoted 5 lines
If
VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full checksum to the driver,
and the device can validate the checksum for these packets. That is, the flags in virtio-net-hdr
will contain_DATA_VALID,
I think DATA_VALID is optional here as device can't recognize all type of protocols.
Quoted 2 lines
and the driver or stack does not need to
validate these packets.
Ok, so I think there're something that is subtle here, and that's why I'm asking here:
1) "Driver does not handle packets with partial checksum" is not accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as it doesn't say whether or not the packet has been validated or not.
Thanks
Quoted 45 lines
Thanks!
Quoted 33 lines
Thanks
Quoted 30 lines
Quoted 30 lines
Thanks!
Quoted 11 lines
Thanks
Quoted 9 lines
Thanks!
Quoted 7 lines
Thanks
Quoted 5 lines
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/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.
Quoted 9 lines
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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 88 lines · Jason Wang
Quoted 87 lines · Heng Qi
Quoted 68 lines · Jason Wang
Quoted 54 lines · Heng Qi
Quoted 52 lines · Heng Qi
Quoted 38 lines · Jason Wang
Quoted 36 lines · Heng Qi
Quoted 35 lines · Jason Wang
Quoted 20 lines · Heng Qi
To prevent readers from misunderstanding that the driver can only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUMis negotiated, we update the description.Signed-off-by Heng Qi <[email protected]>--- device-types/net/description.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)device-types/net/description.tex +0
-0@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.Quoted 4 lines
-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.So patch 2 said
"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with full checksum.\end{description}"
Is there any difference between the two "full checksum" here?
Quoted 8 lines
Quoted 5 lines
There's no difference.
The core is that
VIRTIO_NET_F_GUEST_FULL_CSUMmeans that the driver "can
only" handle packets with full checksum.This seems to be odd.
Driver can always handle packet with full checksum, no?
Yes.
Quoted 3 lines
I meant it
will be then to be functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM?Quoted 13 lines
Quoted 2 lines
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?Sorry, this is a typo. I meant
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?Quoted 6 lines
If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle packets with partial checksum.
Quoted 7 lines
I may miss something here, but what's the difference between
VIRTIO_NET_F_GUEST_FULL_CSUMand
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:
If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full checksum to the driver,
but the device can not validate the checksum for these packets. That is, the flags in virtio-net-hdr
will not contain_DATA_VALID, and the driver or stack needs to validate these packets.
Quoted 7 lines
Quoted 5 lines
If
VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full checksum to the driver,
and the device can validate the checksum for these packets. That is, the flags in virtio-net-hdr
will contain_DATA_VALID,I think
DATA_VALIDis optional here as device can't recognize all type of protocols.
Yes, you are right, so I used "device *can*" here. Which packet types the device recognizes or validates depends on the device's implementation. This is also the current practice of GUEST_CSUM.
Quoted 4 lines
Quoted 3 lines
and the driver or stack does not need to
validate these packets.Ok, so I think there're something that is subtle here,
Ok, I see.
Quoted 7 lines
and that's why
I'm asking here:1) "Driver does not handle packets with partial checksum" is not accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as it doesn't say whether or not the packet has been validated or not.
Maybe the description below would be less subtle?
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum. +\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets with full checksum, and the device optionally validates the packet's checksum.
Thanks!
Quoted 53 lines
Thanks
Quoted 50 lines
Thanks!
Quoted 31 lines
Thanks
Quoted 29 lines
Quoted 29 lines
Thanks!
Quoted 11 lines
Thanks
Quoted 9 lines
Thanks!
Quoted 7 lines
Thanks
Quoted 5 lines
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 115 lines · Heng Qi
Quoted 88 lines · Jason Wang
Quoted 87 lines · Heng Qi
Quoted 68 lines · Jason Wang
Quoted 54 lines · Heng Qi
Quoted 52 lines · Heng Qi
Quoted 38 lines · Jason Wang
Quoted 36 lines · Heng Qi
Quoted 35 lines · Jason Wang
Quoted 20 lines · Heng Qi
To prevent readers from misunderstanding that the driver can only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUMis negotiated, we update the description.Signed-off-by Heng Qi <[email protected]>--- device-types/net/description.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)device-types/net/description.tex +0
-0@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.Quoted 4 lines
-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.So patch 2 said
"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with full checksum.\end{description}"
Is there any difference between the two "full checksum" here?
Quoted 8 lines
Quoted 5 lines
There's no difference.
The core is that
VIRTIO_NET_F_GUEST_FULL_CSUMmeans that the driver "can
only" handle packets with full checksum.This seems to be odd.
Driver can always handle packet with full checksum, no?
Yes.
Quoted 3 lines
I meant it
will be then to be functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM?Quoted 13 lines
Quoted 2 lines
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?Sorry, this is a typo. I meant
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?Quoted 6 lines
If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle packets with partial checksum.
Quoted 7 lines
I may miss something here, but what's the difference between
VIRTIO_NET_F_GUEST_FULL_CSUMand
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:
If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full checksum to the driver,
but the device can not validate the checksum for these packets. That is, the flags in virtio-net-hdr
will not contain_DATA_VALID, and the driver or stack needs to validate these packets.Quoted 7 lines
Quoted 5 lines
If
VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full checksum to the driver,
and the device can validate the checksum for these packets. That is, the flags in virtio-net-hdr
will contain_DATA_VALID,I think
DATA_VALIDis optional here as device can't recognize all type of protocols.Yes, you are right, so I used "device *can*" here. Which packet types the device recognizes or validates
depends on the device's implementation. This is also the current practice ofGUEST_CSUM.Quoted 4 lines
Quoted 3 lines
and the driver or stack does not need to
validate these packets.Ok, so I think there're something that is subtle here,
Ok, I see.
Quoted 3 lines
and that's why
I'm asking here:
Quoted 8 lines
Quoted 4 lines
1) "Driver does not handle packets with partial checksum" is not accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as it doesn't say whether or not the packet has been validated or not.Maybe the description below would be less subtle? +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue since even with DATA_VALID. Did you?
Quoted 3 lines
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets with full checksum,
and the device optionally validates the packet's checksum.
Or maybe something like (not a native speaker)
The driver handles packets with full checksum which the device has already validated.
Thanks
Quoted 65 lines
Thanks!
Quoted 53 lines
Thanks
Quoted 50 lines
Thanks!
Quoted 31 lines
Thanks
Quoted 29 lines
Quoted 29 lines
Thanks!
Quoted 11 lines
Thanks
Quoted 9 lines
Thanks!
Quoted 7 lines
Thanks
Quoted 5 lines
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/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/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.
Quoted 9 lines
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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 132 lines · Jason Wang
Quoted 115 lines · Heng Qi
Quoted 88 lines · Jason Wang
Quoted 87 lines · Heng Qi
Quoted 68 lines · Jason Wang
Quoted 54 lines · Heng Qi
Quoted 52 lines · Heng Qi
Quoted 38 lines · Jason Wang
Quoted 36 lines · Heng Qi
Quoted 35 lines · Jason Wang
Quoted 20 lines · Heng Qi
To prevent readers from misunderstanding that the driver can only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUMis negotiated, we update the description.Signed-off-by Heng Qi <[email protected]>--- device-types/net/description.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)device-types/net/description.tex +0
-0@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.Quoted 4 lines
-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.So patch 2 said
"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with full checksum.\end{description}"
Is there any difference between the two "full checksum" here?
Quoted 8 lines
Quoted 5 lines
There's no difference.
The core is that
VIRTIO_NET_F_GUEST_FULL_CSUMmeans that the driver "can
only" handle packets with full checksum.This seems to be odd.
Driver can always handle packet with full checksum, no?
Yes.
Quoted 3 lines
I meant it
will be then to be functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM?Quoted 13 lines
Quoted 2 lines
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?Sorry, this is a typo. I meant
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?Quoted 6 lines
If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle packets with partial checksum.
Quoted 7 lines
I may miss something here, but what's the difference between
VIRTIO_NET_F_GUEST_FULL_CSUMand
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:
If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full checksum to the driver,
but the device can not validate the checksum for these packets. That is, the flags in virtio-net-hdr
will not contain_DATA_VALID, and the driver or stack needs to validate these packets.Quoted 7 lines
Quoted 5 lines
If
VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full checksum to the driver,
and the device can validate the checksum for these packets. That is, the flags in virtio-net-hdr
will contain_DATA_VALID,I think
DATA_VALIDis optional here as device can't recognize all type of protocols.Yes, you are right, so I used "device *can*" here. Which packet types the device recognizes or validates
depends on the device's implementation. This is also the current practice ofGUEST_CSUM.Quoted 4 lines
Quoted 3 lines
and the driver or stack does not need to
validate these packets.Ok, so I think there're something that is subtle here,
Ok, I see.
Quoted 3 lines
and that's why
I'm asking here:Quoted 8 lines
Quoted 4 lines
1) "Driver does not handle packets with partial checksum" is not accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as it doesn't say whether or not the packet has been validated or not.Maybe the description below would be less subtle? +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue since even with
DATA_VALID. Did you?Quoted 3 lines
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets with full checksum,
and the device optionally validates the packet's checksum.
Quoted 6 lines
Or maybe something like (not a native speaker)
The driver handles packets with full checksum which the device has already validated.
Thanks
I feel we just need a proper definition of what does "full checksum" mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just like VIRTIO_NET_F_GUEST_CSUM but certain values in the header are then disallowed? Which? This should be in the spec.
After this is written up we will come up with a good short description for the feature bit.
Quoted 66 lines
Quoted 66 lines
Thanks!
Quoted 53 lines
Thanks
Quoted 50 lines
Thanks!
Quoted 31 lines
Thanks
Quoted 29 lines
Quoted 29 lines
Thanks!
Quoted 11 lines
Thanks
Quoted 9 lines
Thanks!
Quoted 7 lines
Thanks
Quoted 5 lines
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/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/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.
Quoted 9 lines
Quoted 9 lines
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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 139 lines · Michael S. Tsirkin
Quoted 137 lines · Jason Wang
Quoted 115 lines · Heng Qi
Quoted 88 lines · Jason Wang
Quoted 87 lines · Heng Qi
Quoted 68 lines · Jason Wang
Quoted 54 lines · Heng Qi
Quoted 52 lines · Heng Qi
Quoted 38 lines · Jason Wang
Quoted 36 lines · Heng Qi
Quoted 35 lines · Jason Wang
Quoted 20 lines · Heng Qi
To prevent readers from misunderstanding that the driver can only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUMis negotiated, we update the description.Signed-off-by Heng Qi <[email protected]>--- device-types/net/description.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)device-types/net/description.tex +0
-0@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.Quoted 4 lines
-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.So patch 2 said
"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with full checksum.\end{description}"
Is there any difference between the two "full checksum" here?
Quoted 8 lines
Quoted 5 lines
There's no difference.
The core is that
VIRTIO_NET_F_GUEST_FULL_CSUMmeans that the driver "can
only" handle packets with full checksum.This seems to be odd.
Driver can always handle packet with full checksum, no?
Yes.
Quoted 3 lines
I meant it
will be then to be functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM?Quoted 13 lines
Quoted 2 lines
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?Sorry, this is a typo. I meant
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?Quoted 6 lines
If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle packets with partial checksum.
Quoted 7 lines
I may miss something here, but what's the difference between
VIRTIO_NET_F_GUEST_FULL_CSUMand
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:
If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full checksum to the driver,
but the device can not validate the checksum for these packets. That is, the flags in virtio-net-hdr
will not contain_DATA_VALID, and the driver or stack needs to validate these packets.Quoted 7 lines
Quoted 5 lines
If
VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full checksum to the driver,
and the device can validate the checksum for these packets. That is, the flags in virtio-net-hdr
will contain_DATA_VALID,I think
DATA_VALIDis optional here as device can't recognize all type of protocols.Yes, you are right, so I used "device *can*" here. Which packet types the device recognizes or validates
depends on the device's implementation. This is also the current practice ofGUEST_CSUM.Quoted 4 lines
Quoted 3 lines
and the driver or stack does not need to
validate these packets.Ok, so I think there're something that is subtle here,
Ok, I see.
Quoted 3 lines
and that's why
I'm asking here:Quoted 8 lines
Quoted 4 lines
1) "Driver does not handle packets with partial checksum" is not accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as it doesn't say whether or not the packet has been validated or not.Maybe the description below would be less subtle? +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue since even with
DATA_VALID. Did you?Quoted 3 lines
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets with full checksum,
and the device optionally validates the packet's checksum.Or maybe something like (not a native speaker)
The driver handles packets with full checksum which the device has already validated.
Quoted 8 lines
Quoted 1 line
Thanks
I feel we just need a proper definition of what does "full checksum" mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just likeVIRTIO_NET_F_GUEST_CSUMbut certain values in the header are then disallowed? Which? This should be in the spec.
Yes, I think it is probably the headers that DATA_VALID can work. We never define it in the past.
E.g in the Linux we map DATA_VALID to CHECKSUM_UNNECESSARY, but it can only work for some specific protocols:
"""
* %CHECKSUM_UNNECESSARY is applicable to following protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may apply CHECKSUM_UNNECESSARY to a
* zero UDP checksum for either IPv4 or IPv6, the networking stack
* may perform further validation in this case.
* - GRE: only if the checksum is present in the header. * - SCTP: indicates the CRC in SCTP header has been validated. * - FCOE: indicates the CRC in FC frame has been validated.
"""
I'm not sure whether it's just fine to duplicate the definition or it's too late to define any now.
Quoted 4 lines
After this is written up we will come up with a good short description for the feature bit.
Thanks
Quoted 67 lines
Quoted 67 lines
Quoted 67 lines
Thanks!
Quoted 53 lines
Thanks
Quoted 50 lines
Thanks!
Quoted 31 lines
Thanks
Quoted 29 lines
Quoted 29 lines
Thanks!
Quoted 11 lines
Thanks
Quoted 9 lines
Thanks!
Quoted 7 lines
Thanks
Quoted 5 lines
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/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/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.
Quoted 10 lines
Quoted 9 lines
Quoted 9 lines
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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 162 lines · Jason Wang
Quoted 139 lines · Michael S. Tsirkin
Quoted 137 lines · Jason Wang
Quoted 115 lines · Heng Qi
Quoted 88 lines · Jason Wang
Quoted 87 lines · Heng Qi
Quoted 68 lines · Jason Wang
Quoted 54 lines · Heng Qi
Quoted 52 lines · Heng Qi
Quoted 38 lines · Jason Wang
Quoted 36 lines · Heng Qi
Quoted 35 lines · Jason Wang
Quoted 24 lines · Heng Qi
To prevent readers from misunderstanding that the driver can
only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUM is negotiated, we update the description.Signed-off-by: Heng Qi <[email protected]>
---
device-types/net/description.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/device-types/net/description.tex
b/device-types/net/description.tex
index aff5e08..529f470 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types
/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum or full checksum.So patch 2 said
"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with full checksum.\end{description}"
Is there any difference between the two "full checksum" here?
Quoted 8 lines
Quoted 5 lines
There's no difference.
The core is that
VIRTIO_NET_F_GUEST_FULL_CSUMmeans that the driver "can
only" handle packets with full checksum.This seems to be odd.
Driver can always handle packet with full checksum, no?
Yes.
Quoted 3 lines
I meant it
will be then to be functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM?Quoted 13 lines
Quoted 2 lines
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?Sorry, this is a typo. I meant
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?Quoted 6 lines
If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle packets with partial checksum.
Quoted 7 lines
I may miss something here, but what's the difference between
VIRTIO_NET_F_GUEST_FULL_CSUMand
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:
If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full checksum to the driver,
but the device can not validate the checksum for these packets. That is, the flags in virtio-net-hdr
will not contain_DATA_VALID, and the driver or stack needs to validate these packets.Quoted 7 lines
Quoted 5 lines
If
VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full checksum to the driver,
and the device can validate the checksum for these packets. That is, the flags in virtio-net-hdr
will contain_DATA_VALID,I think
DATA_VALIDis optional here as device can't recognize all type of protocols.Yes, you are right, so I used "device *can*" here. Which packet types the device recognizes or validates
depends on the device's implementation. This is also the current practice ofGUEST_CSUM.Quoted 4 lines
Quoted 3 lines
and the driver or stack does not need to
validate these packets.Ok, so I think there're something that is subtle here,
Ok, I see.
Quoted 3 lines
and that's why
I'm asking here:Quoted 8 lines
Quoted 4 lines
1) "Driver does not handle packets with partial checksum" is not accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as it doesn't say whether or not the packet has been validated or not.Maybe the description below would be less subtle? +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue since even with
DATA_VALID. Did you?Quoted 3 lines
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets with full checksum,
and the device optionally validates the packet's checksum.Or maybe something like (not a native speaker)
The driver handles packets with full checksum which the device has already validated.
Quoted 8 lines
Quoted 1 line
Thanks
I feel we just need a proper definition of what does "full checksum" mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just likeVIRTIO_NET_F_GUEST_CSUMbut certain values in the header are then disallowed? Which? This should be in the spec.Yes, I think it is probably the headers that
DATA_VALIDcan work. We never define it in the past.E.g in the Linux we map
DATA_VALIDtoCHECKSUM_UNNECESSARY, but it can only work for some specific protocols:"""
* %CHECKSUM_UNNECESSARY is applicable to following protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may applyCHECKSUM_UNNECESSARYto a
* zero UDP checksum for either IPv4 or IPv6, the networking stack
* may perform further validation in this case.
Quoted 7 lines
* - GRE: only if the checksum is present in the header. * - SCTP: indicates the CRC in SCTP header has been validated. * - FCOE: indicates the CRC in FC frame has been validated."""
I'm not sure whether it's just fine to duplicate the definition or it's too late to define any now.
I think it's mostly harmless for other protocols.
Quoted 84 lines
Quoted 4 lines
After this is written up we will come up with a good short description for the feature bit.
Thanks
Quoted 77 lines
Quoted 76 lines
Quoted 76 lines
Thanks!
Quoted 53 lines
Thanks
Quoted 50 lines
Thanks!
Quoted 31 lines
Thanks
Quoted 29 lines
Quoted 29 lines
Thanks!
Quoted 11 lines
Thanks
Quoted 9 lines
Thanks!
Quoted 7 lines
Thanks
Quoted 5 lines
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/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/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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
In reply to Jason WangQuoted 114 lines · Jason Wang
Quoted 113 lines · Heng Qi
Quoted 86 lines · Jason Wang
Quoted 85 lines · Heng Qi
Quoted 67 lines · Jason Wang
Quoted 53 lines · Heng Qi
Quoted 52 lines · Heng Qi
Quoted 38 lines · Jason Wang
Quoted 36 lines · Heng Qi
Quoted 35 lines · Jason Wang
Quoted 20 lines · Heng Qi
To prevent readers from misunderstanding that the driver can only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUMis negotiated, we update the description.Signed-off-by Heng Qi <[email protected]>--- device-types/net/description.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)device-types/net/description.tex +0
-0@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.Quoted 4 lines
-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.So patch 2 said
"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with full checksum.\end{description}"
Is there any difference between the two "full checksum" here?
Quoted 8 lines
Quoted 5 lines
There's no difference.
The core is that
VIRTIO_NET_F_GUEST_FULL_CSUMmeans that the driver "can
only" handle packets with full checksum.This seems to be odd.
Driver can always handle packet with full checksum, no?
Yes.
Quoted 3 lines
I meant it
will be then to be functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM?Quoted 13 lines
Quoted 2 lines
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?Sorry, this is a typo. I meant
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?Quoted 6 lines
If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle packets with partial checksum.
Quoted 7 lines
I may miss something here, but what's the difference between
VIRTIO_NET_F_GUEST_FULL_CSUMand
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:
If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full checksum to the driver,
but the device can not validate the checksum for these packets. That is, the flags in virtio-net-hdr
will not contain_DATA_VALID, and the driver or stack needs to validate these packets.Quoted 7 lines
Quoted 5 lines
If
VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full checksum to the driver,
and the device can validate the checksum for these packets. That is, the flags in virtio-net-hdr
will contain_DATA_VALID,I think
DATA_VALIDis optional here as device can't recognize all type of protocols.Yes, you are right, so I used "device *can*" here. Which packet types the device recognizes or validates
depends on the device's implementation. This is also the current practice ofGUEST_CSUM.Quoted 3 lines
Quoted 2 lines
and the driver or stack does not need to
validate these packets.Ok, so I think there're something that is subtle here,
Ok, I see.
Quoted 7 lines
and that's why
I'm asking here:1) "Driver does not handle packets with partial checksum" is not accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as it doesn't say whether or not the packet has been validated or not.
Quoted 5 lines
Quoted 3 lines
Maybe the description below would be less subtle? +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue since even with
DATA_VALID.
OK, I'm not inclined to update the description for classic features either, if that's okay with others.
Quoted 9 lines
Did you?
Quoted 3 lines
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets with full checksum,
and the device optionally validates the packet's checksum.Or maybe something like (not a native speaker)
The driver handles packets with full checksum which the device has already validated.
Packets which are not validated by the device can still be received by the driver. This is basic and this feature does not break this.
Thanks!
Quoted 74 lines
Thanks
Quoted 70 lines
Thanks!
Quoted 51 lines
Thanks
Quoted 49 lines
Thanks!
Quoted 31 lines
Thanks
Quoted 29 lines
Quoted 29 lines
Thanks!
Quoted 11 lines
Thanks
Quoted 9 lines
Thanks!
Quoted 7 lines
Thanks
Quoted 5 lines
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/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/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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 132 lines · Heng Qi
Quoted 114 lines · Jason Wang
Quoted 113 lines · Heng Qi
Quoted 86 lines · Jason Wang
Quoted 85 lines · Heng Qi
Quoted 67 lines · Jason Wang
Quoted 53 lines · Heng Qi
Quoted 52 lines · Heng Qi
Quoted 38 lines · Jason Wang
Quoted 36 lines · Heng Qi
Quoted 35 lines · Jason Wang
Quoted 20 lines · Heng Qi
To prevent readers from misunderstanding that the driver can only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUMis negotiated, we update the description.Signed-off-by Heng Qi <[email protected]>--- device-types/net/description.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)device-types/net/description.tex +0
-0@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.Quoted 4 lines
-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.So patch 2 said
"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with full checksum.\end{description}"
Is there any difference between the two "full checksum" here?
Quoted 8 lines
Quoted 5 lines
There's no difference.
The core is that
VIRTIO_NET_F_GUEST_FULL_CSUMmeans that the driver "can
only" handle packets with full checksum.This seems to be odd.
Driver can always handle packet with full checksum, no?
Yes.
Quoted 3 lines
I meant it
will be then to be functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM?Quoted 13 lines
Quoted 2 lines
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?Sorry, this is a typo. I meant
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?Quoted 6 lines
If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle packets with partial checksum.
Quoted 7 lines
I may miss something here, but what's the difference between
VIRTIO_NET_F_GUEST_FULL_CSUMand
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:
If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full checksum to the driver,
but the device can not validate the checksum for these packets. That is, the flags in virtio-net-hdr
will not contain_DATA_VALID, and the driver or stack needs to validate these packets.Quoted 7 lines
Quoted 5 lines
If
VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full checksum to the driver,
and the device can validate the checksum for these packets. That is, the flags in virtio-net-hdr
will contain_DATA_VALID,I think
DATA_VALIDis optional here as device can't recognize all type of protocols.Yes, you are right, so I used "device *can*" here. Which packet types the device recognizes or validates
depends on the device's implementation. This is also the current practice ofGUEST_CSUM.Quoted 3 lines
Quoted 2 lines
and the driver or stack does not need to
validate these packets.Ok, so I think there're something that is subtle here,
Ok, I see.
Quoted 7 lines
and that's why
I'm asking here:1) "Driver does not handle packets with partial checksum" is not accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as it doesn't say whether or not the packet has been validated or not.Quoted 5 lines
Quoted 3 lines
Maybe the description below would be less subtle? +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue since even with
DATA_VALID.OK, I'm not inclined to update the description for classic features either, if that's okay with others.
Quoted 5 lines
Did you?
Quoted 3 lines
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets with full checksum,
and the device optionally validates the packet's checksum.
Quoted 8 lines
Quoted 4 lines
Or maybe something like (not a native speaker)
The driver handles packets with full checksum which the device has already validated.
Packets which are not validated by the device can still be received by the driver. This is basic
and this feature does not break this.
It doesn't break. It doesn't exclude that.
See how GUEST_CSUM defined:
Driver handles packets with partial checksum.
Thanks
Quoted 78 lines
Thanks!
Quoted 74 lines
Thanks
Quoted 70 lines
Thanks!
Quoted 51 lines
Thanks
Quoted 49 lines
Thanks!
Quoted 31 lines
Thanks
Quoted 29 lines
Quoted 29 lines
Thanks!
Quoted 11 lines
Thanks
Quoted 9 lines
Thanks!
Quoted 7 lines
Thanks
Quoted 5 lines
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/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/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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
In reply to Michael S. TsirkinQuoted 156 lines · Michael S. Tsirkin
Quoted 155 lines · Jason Wang
Quoted 129 lines · Michael S. Tsirkin
Quoted 128 lines · Jason Wang
Quoted 109 lines · Heng Qi
Quoted 86 lines · Jason Wang
Quoted 85 lines · Heng Qi
Quoted 67 lines · Jason Wang
Quoted 53 lines · Heng Qi
Quoted 52 lines · Heng Qi
Quoted 38 lines · Jason Wang
Quoted 36 lines · Heng Qi
Quoted 35 lines · Jason Wang
On Tue, Nov 28, 2023 at 4:08 PM Heng Qi <[email protected]>
wrote:
To prevent readers from misunderstanding that the driver can
only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUM is negotiated, we update the description.Signed-off-by: Heng Qi <[email protected]>
---
device-types/net/description.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/device-types/net/description.tex
b/device-types/net/description.tex
index aff5e08..529f470 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types
/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum or full checksum.
So patch 2 said"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with
full checksum.
\end{description}
"Is there any difference between the two "full checksum" here?
Quoted 8 lines
Quoted 5 lines
There's no difference.
The core is that
VIRTIO_NET_F_GUEST_FULL_CSUMmeans that the driver "can
only" handle packets with full checksum.This seems to be odd.
Driver can always handle packet with full checksum, no?
Yes.
Quoted 3 lines
I meant it
will be then to be functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM?Quoted 13 lines
Quoted 2 lines
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?Sorry, this is a typo. I meant
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?Quoted 6 lines
If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle packets with partial checksum.
Quoted 7 lines
I may miss something here, but what's the difference between
VIRTIO_NET_F_GUEST_FULL_CSUMand
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:
If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full checksum to the driver,
but the device can not validate the checksum for these packets. That is, the flags in virtio-net-hdr
will not contain_DATA_VALID, and the driver or stack needs to validate these packets.Quoted 7 lines
Quoted 5 lines
If
VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full checksum to the driver,
and the device can validate the checksum for these packets. That is, the flags in virtio-net-hdr
will contain_DATA_VALID,I think
DATA_VALIDis optional here as device can't recognize all type of protocols.Yes, you are right, so I used "device *can*" here. Which packet types the device recognizes or validates
depends on the device's implementation. This is also the current practice ofGUEST_CSUM.Quoted 3 lines
Quoted 2 lines
and the driver or stack does not need to
validate these packets.Ok, so I think there're something that is subtle here,
Ok, I see.
Quoted 3 lines
and that's why
I'm asking here:Quoted 7 lines
Quoted 4 lines
1) "Driver does not handle packets with partial checksum" is not accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as it doesn't say whether or not the packet has been validated or not.Maybe the description below would be less subtle? +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue since even with
DATA_VALID. Did you?Quoted 3 lines
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets with full checksum,
and the device optionally validates the packet's checksum.Or maybe something like (not a native speaker)
The driver handles packets with full checksum which the device has already validated.
Quoted 7 lines
Quoted 1 line
Thanks
I feel we just need a proper definition of what does "full checksum" mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just likeVIRTIO_NET_F_GUEST_CSUMbut certain values in the header are then disallowed? Which? This should be in the spec.Yes, I think it is probably the headers that
DATA_VALIDcan work. We never define it in the past.E.g in the Linux we map
DATA_VALIDtoCHECKSUM_UNNECESSARY, but it can only work for some specific protocols:"""
* %CHECKSUM_UNNECESSARY is applicable to following protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may applyCHECKSUM_UNNECESSARYto a
* zero UDP checksum for either IPv4 or IPv6, the networking stack
* may perform further validation in this case.* - GRE: only if the checksum is present in the header. * - SCTP: indicates the CRC in SCTP header has been validated. * - FCOE: indicates the CRC in FC frame has been validated."""
Quoted 3 lines
Quoted 2 lines
I'm not sure whether it's just fine to duplicate the definition or it's too late to define any now.
I think it's mostly harmless for other protocols.
I'm not sure if this should be defined by a new FULL_CSUM feature. This seems to be an issue with GUEST_CSUM.
I think we should supplement these with a new patch for GUEST_CSUM?
Thanks!
Quoted 67 lines
Quoted 67 lines
Quoted 4 lines
After this is written up we will come up with a good short description for the feature bit.
Thanks
Quoted 61 lines
Quoted 61 lines
Quoted 61 lines
Thanks!
Quoted 51 lines
Thanks
Quoted 49 lines
Thanks!
Quoted 31 lines
Thanks
Quoted 29 lines
Quoted 29 lines
Thanks!
Quoted 11 lines
Thanks
Quoted 9 lines
Thanks!
Quoted 7 lines
Thanks
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/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/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.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 160 lines · Heng Qi
Quoted 156 lines · Michael S. Tsirkin
Quoted 155 lines · Jason Wang
Quoted 129 lines · Michael S. Tsirkin
Quoted 128 lines · Jason Wang
Quoted 109 lines · Heng Qi
Quoted 86 lines · Jason Wang
Quoted 85 lines · Heng Qi
Quoted 67 lines · Jason Wang
Quoted 53 lines · Heng Qi
Quoted 52 lines · Heng Qi
Quoted 38 lines · Jason Wang
Quoted 36 lines · Heng Qi
在 2023/11/29 下午4:00, Jason Wang 写道:
On Tue, Nov 28, 2023 at 4:08 PM Heng Qi <[email protected]>
wrote:
To prevent readers from misunderstanding that the driver can
only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUM is negotiated, we update the description.Signed-off-by: Heng Qi <[email protected]>
---
device-types/net/description.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/device-types/net/description.tex
b/device-types/net/description.tex
index aff5e08..529f470 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types
/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum or full checksum.
So patch 2 said"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with
full checksum.
\end{description}
"Is there any difference between the two "full checksum" here?
Quoted 8 lines
Quoted 5 lines
There's no difference.
The core is that VIRTIO_NET_F_GUEST_FULL_CSUM means that the driver
"can
only" handle packets with full checksum.This seems to be odd.
Driver can always handle packet with full checksum, no?
Yes.
Quoted 3 lines
I meant it
will be then to be functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM?Quoted 13 lines
Quoted 2 lines
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?Sorry, this is a typo. I meant
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?Quoted 6 lines
If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle packets with partial checksum.
Quoted 7 lines
I may miss something here, but what's the difference between
VIRTIO_NET_F_GUEST_FULL_CSUMand
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:
If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full checksum to the driver,
but the device can not validate the checksum for these packets. That is, the flags in virtio-net-hdr
will not contain_DATA_VALID, and the driver or stack needs to validate these packets.Quoted 7 lines
Quoted 5 lines
If
VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full checksum to the driver,
and the device can validate the checksum for these packets. That is, the flags in virtio-net-hdr
will contain_DATA_VALID,I think
DATA_VALIDis optional here as device can't recognize all type of protocols.Yes, you are right, so I used "device *can*" here. Which packet types the device recognizes or validates
depends on the device's implementation. This is also the current practice ofGUEST_CSUM.Quoted 3 lines
Quoted 2 lines
and the driver or stack does not need to
validate these packets.Ok, so I think there're something that is subtle here,
Ok, I see.
Quoted 3 lines
and that's why
I'm asking here:Quoted 7 lines
Quoted 4 lines
1) "Driver does not handle packets with partial checksum" is not accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as it doesn't say whether or not the packet has been validated or not.Maybe the description below would be less subtle? +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue since even with
DATA_VALID. Did you?Quoted 3 lines
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets with full checksum,
and the device optionally validates the packet's checksum.Or maybe something like (not a native speaker)
The driver handles packets with full checksum which the device has already validated.
Quoted 7 lines
Quoted 1 line
Thanks
I feel we just need a proper definition of what does "full checksum" mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just likeVIRTIO_NET_F_GUEST_CSUMbut certain values in the header are then disallowed? Which? This should be in the spec.Yes, I think it is probably the headers that
DATA_VALIDcan work. We never define it in the past.E.g in the Linux we map
DATA_VALIDtoCHECKSUM_UNNECESSARY, but it can only work for some specific protocols:"""
* %CHECKSUM_UNNECESSARY is applicable to following protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may applyCHECKSUM_UNNECESSARYto a
* zero UDP checksum for either IPv4 or IPv6, the networking stack
* may perform further validation in this case.* - GRE: only if the checksum is present in the header. * - SCTP: indicates the CRC in SCTP header has been validated. * - FCOE: indicates the CRC in FC frame has been validated."""
Quoted 8 lines
Quoted 3 lines
Quoted 2 lines
I'm not sure whether it's just fine to duplicate the definition or it's too late to define any now.
I think it's mostly harmless for other protocols.
I'm not sure if this should be defined by a new
FULL_CSUMfeature. This seems to be an issue withGUEST_CSUM.I think we should supplement these with a new patch for
GUEST_CSUM?
Probably. My understanding is:
You want to reuse DATA_VALID here, so we need to stick to a consistent semantic for GUEST_CUSM and FULL_CSUM. So we need a definition of "full csum" or what kind of packet could DATA_VALID work here.
Thanks
Quoted 80 lines
Thanks!
Quoted 76 lines
Quoted 76 lines
Quoted 4 lines
After this is written up we will come up with a good short description for the feature bit.
Thanks
Quoted 70 lines
Quoted 70 lines
Quoted 70 lines
Thanks!
Quoted 51 lines
Thanks
Quoted 49 lines
Thanks!
Quoted 31 lines
Thanks
Quoted 29 lines
Quoted 29 lines
Thanks!
Quoted 11 lines
Thanks
Quoted 9 lines
Thanks!
Thanks
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/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/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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 164 lines · Jason Wang
Quoted 163 lines · Heng Qi
Quoted 154 lines · Michael S. Tsirkin
Quoted 153 lines · Jason Wang
Quoted 127 lines · Michael S. Tsirkin
Quoted 126 lines · Jason Wang
Quoted 107 lines · Heng Qi
Quoted 85 lines · Jason Wang
Quoted 84 lines · Heng Qi
Quoted 67 lines · Jason Wang
Quoted 53 lines · Heng Qi
Quoted 52 lines · Heng Qi
Quoted 46 lines · Jason Wang
On Wed, Nov 29, 2023 at 4:23 PM Heng Qi <[email protected]>
wrote:
在 2023/11/29 下午4:00, Jason Wang 写道:
On Tue, Nov 28, 2023 at 4:08 PM Heng Qi <[email protected]>
wrote:
To prevent readers from misunderstanding that the driver can
only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUM is negotiated, we update the description.Signed-off-by: Heng Qi <[email protected]>
---
device-types/net/description.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/device-types/net/description.tex
b/device-types/net/description.tex
index aff5e08..529f470 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types
/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum or full checksum.
So patch 2 said"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with
full checksum.
\end{description}
"Is there any difference between the two "full checksum" here?
There's no difference.The core is that VIRTIO_NET_F_GUEST_FULL_CSUM means that the driver
"can
only" handle packets with full checksum.
This seems to be odd.Driver can always handle packet with full checksum, no?
Yes.
Quoted 3 lines
I meant it
will be then to be functional equivalent to !
VIRTIO_NET_F_GUEST_FULL_CSUM?Quoted 13 lines
Quoted 2 lines
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?Sorry, this is a typo. I meant
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?Quoted 6 lines
If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle packets with partial checksum.
Quoted 7 lines
I may miss something here, but what's the difference between
VIRTIO_NET_F_GUEST_FULL_CSUMand
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:
If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full checksum to the driver,
but the device can not validate the checksum for these packets. That is, the flags in virtio-net-hdr
will not contain_DATA_VALID, and the driver or stack needs to validate these packets.Quoted 7 lines
Quoted 5 lines
If
VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full checksum to the driver,
and the device can validate the checksum for these packets. That is, the flags in virtio-net-hdr
will contain_DATA_VALID,I think
DATA_VALIDis optional here as device can't recognize all type of protocols.Yes, you are right, so I used "device *can*" here. Which packet types the device recognizes or validates
depends on the device's implementation. This is also the current practice ofGUEST_CSUM.Quoted 3 lines
Quoted 2 lines
and the driver or stack does not need to
validate these packets.Ok, so I think there're something that is subtle here,
Ok, I see.
Quoted 3 lines
and that's why
I'm asking here:Quoted 7 lines
Quoted 4 lines
1) "Driver does not handle packets with partial checksum" is not accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as it doesn't say whether or not the packet has been validated or not.Maybe the description below would be less subtle? +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue since even with
DATA_VALID. Did you?Quoted 3 lines
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets with full checksum,
and the device optionally validates the packet's checksum.Or maybe something like (not a native speaker)
The driver handles packets with full checksum which the device has already validated.
Quoted 7 lines
Quoted 1 line
Thanks
I feel we just need a proper definition of what does "full checksum" mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just likeVIRTIO_NET_F_GUEST_CSUMbut certain values in the header are then disallowed? Which? This should be in the spec.Yes, I think it is probably the headers that
DATA_VALIDcan work. We never define it in the past.E.g in the Linux we map
DATA_VALIDtoCHECKSUM_UNNECESSARY, but it can only work for some specific protocols:"""
* %CHECKSUM_UNNECESSARY is applicable to following protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may applyCHECKSUM_UNNECESSARYto a
* zero UDP checksum for either IPv4 or IPv6, the networking stack
* may perform further validation in this case.* - GRE: only if the checksum is present in the header. * - SCTP: indicates the CRC in SCTP header has been validated. * - FCOE: indicates the CRC in FC frame has been validated."""
Quoted 3 lines
Quoted 2 lines
I'm not sure whether it's just fine to duplicate the definition or it's too late to define any now.
I think it's mostly harmless for other protocols.
I'm not sure if this should be defined by a new
FULL_CSUMfeature. This seems to be an issue withGUEST_CSUM.
Quoted 6 lines
Quoted 1 line
I think we should supplement these with a new patch for
GUEST_CSUM?Probably. My understanding is:
You want to reuse
DATA_VALIDhere, so we need to stick to a consistent semantic forGUEST_CUSMandFULL_CSUM. So we need a definition of "full csum" or what kind of packet couldDATA_VALIDwork here.
I agree, we can be clear about what types of packets DATA_VALID might cover, e.g. TCP/UDP/GRE/SCTP/FoCE.
But I think we also need something like \field{supported_validate_types} to indicate which packet types the device supports validating and setting DATA_VALID, otherwise the device driver that negotiates this feature may fail to live migration. Am I right?
I'm not sure how GUEST_CSUM works now as it should also suffer from the above mentioned issues with live migration, but no devices are reporting this right now.
Maybe, each device only supports checksum verification for TCP/UDP by default? I don't know. But I hope we can focus on this and get consensus, because our hw release date is coming soon.
Thanks a lot!
Quoted 79 lines
Thanks
Quoted 76 lines
Thanks!
Quoted 74 lines
Quoted 74 lines
Quoted 3 lines
After this is written up we will come up with a good short description for the feature bit.
Thanks
Quoted 69 lines
Quoted 69 lines
Quoted 69 lines
Thanks!
Quoted 51 lines
Thanks
Quoted 49 lines
Thanks!
Quoted 31 lines
Thanks
Quoted 29 lines
Quoted 29 lines
Thanks!
Quoted 11 lines
Thanks
Thanks!
Thanks
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/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/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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 189 lines · Heng Qi
Quoted 164 lines · Jason Wang
Quoted 163 lines · Heng Qi
Quoted 154 lines · Michael S. Tsirkin
Quoted 153 lines · Jason Wang
Quoted 127 lines · Michael S. Tsirkin
Quoted 126 lines · Jason Wang
Quoted 107 lines · Heng Qi
Quoted 85 lines · Jason Wang
Quoted 84 lines · Heng Qi
Quoted 67 lines · Jason Wang
Quoted 53 lines · Heng Qi
Quoted 52 lines · Heng Qi
在 2023/12/1 下午1:18, Jason Wang 写道:
On Wed, Nov 29, 2023 at 4:23 PM Heng Qi <[email protected]>
wrote:
在 2023/11/29 下午4:00, Jason Wang 写道:
On Tue, Nov 28, 2023 at 4:08 PM Heng Qi <[email protected]>
wrote:
To prevent readers from misunderstanding that the driver can
only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUM is negotiated, we update the description.Signed-off-by: Heng Qi <[email protected]>
---
device-types/net/description.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/device-types/net/description.tex
b/device-types/net/description.tex
index aff5e08..529f470 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types
/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum or full checksum.
So patch 2 said"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with
full checksum.
\end{description}
"Is there any difference between the two "full checksum" here?
There's no difference.The core is that VIRTIO_NET_F_GUEST_FULL_CSUM means that the driver
"can
only" handle packets with full checksum.
This seems to be odd.Driver can always handle packet with full checksum, no?
Yes.I meant it
will be then to be functional equivalent to !
VIRTIO_NET_F_GUEST_FULL_CSUM?Quoted 13 lines
Quoted 2 lines
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?Sorry, this is a typo. I meant
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?Quoted 6 lines
If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle
packets with partial checksum.Quoted 7 lines
I may miss something here, but what's the difference between
VIRTIO_NET_F_GUEST_FULL_CSUMand
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:
If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full checksum to the driver,
but the device can not validate the checksum for these packets. That is, the flags in virtio-net-hdr
will not contain_DATA_VALID, and the driver or stack needs to validate these packets.Quoted 7 lines
Quoted 5 lines
If
VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full checksum to the driver,
and the device can validate the checksum for these packets. That is, the flags in virtio-net-hdr
will contain_DATA_VALID,I think
DATA_VALIDis optional here as device can't recognize all type of protocols.Yes, you are right, so I used "device *can*" here. Which packet types the device recognizes or validates
depends on the device's implementation. This is also the current practice ofGUEST_CSUM.Quoted 3 lines
Quoted 2 lines
and the driver or stack does not need to
validate these packets.Ok, so I think there're something that is subtle here,
Ok, I see.
Quoted 3 lines
and that's why
I'm asking here:Quoted 7 lines
Quoted 4 lines
1) "Driver does not handle packets with partial checksum" is not accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as it doesn't say whether or not the packet has been validated or not.Maybe the description below would be less subtle? +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue since even with
DATA_VALID. Did you?Quoted 3 lines
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets with full checksum,
and the device optionally validates the packet's checksum.Or maybe something like (not a native speaker)
The driver handles packets with full checksum which the device has already validated.
Quoted 7 lines
Quoted 1 line
Thanks
I feel we just need a proper definition of what does "full checksum" mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just likeVIRTIO_NET_F_GUEST_CSUMbut certain values in the header are then disallowed? Which? This should be in the spec.Yes, I think it is probably the headers that
DATA_VALIDcan work. We never define it in the past.E.g in the Linux we map
DATA_VALIDtoCHECKSUM_UNNECESSARY, but it can only work for some specific protocols:"""
* %CHECKSUM_UNNECESSARY is applicable to following protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may applyCHECKSUM_UNNECESSARYto a
* zero UDP checksum for either IPv4 or IPv6, the networking stack
* may perform further validation in this case.* - GRE: only if the checksum is present in the header. * - SCTP: indicates the CRC in SCTP header has been validated. * - FCOE: indicates the CRC in FC frame has been validated."""
Quoted 3 lines
Quoted 2 lines
I'm not sure whether it's just fine to duplicate the definition or it's too late to define any now.
I think it's mostly harmless for other protocols.
I'm not sure if this should be defined by a new
FULL_CSUMfeature. This seems to be an issue withGUEST_CSUM.Quoted 6 lines
Quoted 1 line
I think we should supplement these with a new patch for
GUEST_CSUM?Probably. My understanding is:
You want to reuse
DATA_VALIDhere, so we need to stick to a consistent semantic forGUEST_CUSMandFULL_CSUM. So we need a definition of "full csum" or what kind of packet couldDATA_VALIDwork here.I agree, we can be clear about what types of packets
DATA_VALIDmight cover, e.g. TCP/UDP/GRE/SCTP/FoCE.But I think we also need something like \field{supported_validate_types} to indicate which packet types the device supports validating and setting
DATA_VALID,
otherwise the device driver that negotiates this feature may fail to live migration.
Am I right?I'm not sure how
GUEST_CSUMworks now as it should also suffer from the above
mentioned issues with live migration, but no devices are reporting this right now.
Quoted 6 lines
Maybe, each device only supports checksum verification for TCP/UDP by default? I don't know.
But I hope we can focus on this and get consensus, because our hw release date is coming soon.Thanks a lot!
First, DATA_VALID is not a thing that hardware should ever use. It's a hack when packets are passed within host. Second I don't understand what it has to do with this discussion.
Your patch should be more specific and define which header fields are compatible with the new offload option.
Quoted 70 lines
Quoted 70 lines
Thanks
Quoted 67 lines
Thanks!
Quoted 65 lines
Quoted 65 lines
Quoted 3 lines
After this is written up we will come up with a good short description for the feature bit.
Thanks
Quoted 60 lines
Quoted 60 lines
Quoted 60 lines
Thanks!
Quoted 51 lines
Thanks
Quoted 49 lines
Thanks!
Quoted 31 lines
Thanks
Quoted 29 lines
Quoted 29 lines
Thanks!
Thanks
Thanks!
Thanks
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/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/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.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 191 lines · Michael S. Tsirkin
Quoted 190 lines · Heng Qi
Quoted 162 lines · Jason Wang
Quoted 161 lines · Heng Qi
Quoted 153 lines · Michael S. Tsirkin
Quoted 152 lines · Jason Wang
Quoted 126 lines · Michael S. Tsirkin
Quoted 125 lines · Jason Wang
Quoted 106 lines · Heng Qi
Quoted 85 lines · Jason Wang
Quoted 84 lines · Heng Qi
Quoted 67 lines · Jason Wang
Quoted 66 lines · Heng Qi
在 2023/12/1 下午2:24, Heng Qi 写道:
在 2023/12/1 下午1:18, Jason Wang 写道:
On Wed, Nov 29, 2023 at 4:23 PM Heng Qi <[email protected]>
wrote:
在 2023/11/29 下午4:00, Jason Wang 写道:
On Tue, Nov 28, 2023 at 4:08 PM Heng Qi <[email protected]>
wrote:
To prevent readers from misunderstanding that the driver can
only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUM is negotiated, we update the description.Signed-off-by: Heng Qi <[email protected]>
---
device-types/net/description.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/device-types/net/description.tex
b/device-types/net/description.tex
index aff5e08..529f470 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types
/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum or full checksum.
So patch 2 said"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with
full checksum.
\end{description}
"Is there any difference between the two "full checksum" here?
There's no difference.The core is that VIRTIO_NET_F_GUEST_FULL_CSUM means that the driver
"can
only" handle packets with full checksum.
This seems to be odd.Driver can always handle packet with full checksum, no?
Yes.I meant it
will be then to be functional equivalent to !
VIRTIO_NET_F_GUEST_FULL_CSUM?
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?
Sorry, this is a typo. I meantAre you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle
packets with partial checksum.Quoted 7 lines
I may miss something here, but what's the difference between
VIRTIO_NET_F_GUEST_FULL_CSUMand
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:
If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full checksum to the driver,
but the device can not validate the checksum for these packets. That is, the flags in virtio-net-hdr
will not contain_DATA_VALID, and the driver or stack needs to validate these packets.Quoted 7 lines
Quoted 5 lines
If
VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full checksum to the driver,
and the device can validate the checksum for these packets. That is, the flags in virtio-net-hdr
will contain_DATA_VALID,I think
DATA_VALIDis optional here as device can't recognize all type of protocols.Yes, you are right, so I used "device *can*" here. Which packet types the device recognizes or validates
depends on the device's implementation. This is also the current practice ofGUEST_CSUM.Quoted 3 lines
Quoted 2 lines
and the driver or stack does not need to
validate these packets.Ok, so I think there're something that is subtle here,
Ok, I see.
Quoted 3 lines
and that's why
I'm asking here:Quoted 7 lines
Quoted 4 lines
1) "Driver does not handle packets with partial checksum" is not accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as it doesn't say whether or not the packet has been validated or not.Maybe the description below would be less subtle? +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue since even with
DATA_VALID. Did you?Quoted 3 lines
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets with full checksum,
and the device optionally validates the packet's checksum.Or maybe something like (not a native speaker)
The driver handles packets with full checksum which the device has already validated.
Quoted 7 lines
Quoted 1 line
Thanks
I feel we just need a proper definition of what does "full checksum" mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just likeVIRTIO_NET_F_GUEST_CSUMbut certain values in the header are then disallowed? Which? This should be in the spec.Yes, I think it is probably the headers that
DATA_VALIDcan work. We never define it in the past.E.g in the Linux we map
DATA_VALIDtoCHECKSUM_UNNECESSARY, but it can only work for some specific protocols:"""
* %CHECKSUM_UNNECESSARY is applicable to following protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may applyCHECKSUM_UNNECESSARYto a
* zero UDP checksum for either IPv4 or IPv6, the networking stack
* may perform further validation in this case.
* - GRE: only if the checksum is present in the header.
* - SCTP: indicates the CRC in SCTP header has been validated.
* - FCOE: indicates the CRC in FC frame has been validated.
"""Quoted 3 lines
Quoted 2 lines
I'm not sure whether it's just fine to duplicate the definition or it's too late to define any now.
I think it's mostly harmless for other protocols.
I'm not sure if this should be defined by a new
FULL_CSUMfeature. This seems to be an issue withGUEST_CSUM.Quoted 6 lines
Quoted 1 line
I think we should supplement these with a new patch for
GUEST_CSUM?Probably. My understanding is:
You want to reuse
DATA_VALIDhere, so we need to stick to a consistent semantic forGUEST_CUSMandFULL_CSUM. So we need a definition of "full csum" or what kind of packet couldDATA_VALIDwork here.I agree, we can be clear about what types of packets
DATA_VALIDmight cover, e.g. TCP/UDP/GRE/SCTP/FoCE.But I think we also need something like \field{supported_validate_types} to indicate which packet types the device supports validating and setting
DATA_VALID,
otherwise the device driver that negotiates this feature may fail to live migration.
Am I right?I'm not sure how
GUEST_CSUMworks now as it should also suffer from the above
mentioned issues with live migration, but no devices are reporting this right now.Maybe, each device only supports checksum verification for TCP/UDP by default? I don't know.
But I hope we can focus on this and get consensus, because our hw release date is coming soon.
Quoted 4 lines
Quoted 1 line
Thanks a lot!
First,
DATA_VALIDis not a thing that hardware should ever use. It's a hack when packets are passed within host.
Get here. Thanks!
Quoted 93 lines
Second I don't understand what it has to do with this discussion.
Your patch should be more specific and define which header fields are compatible with the new offload option.Quoted 69 lines
Quoted 69 lines
Thanks
Quoted 67 lines
Thanks!
Quoted 65 lines
Quoted 65 lines
Quoted 3 lines
After this is written up we will come up with a good short description for the feature bit.
Thanks
Quoted 60 lines
Quoted 60 lines
Quoted 60 lines
Thanks!
Quoted 51 lines
Thanks
Quoted 49 lines
Thanks!
Quoted 31 lines
Thanks
Quoted 29 lines
Thanks!
Thanks
Thanks!
Thanks
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/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/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.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
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/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.
Quoted 8 lines
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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
In reply to Heng QiQuoted 178 lines · Heng Qi
Quoted 164 lines · Jason Wang
Quoted 163 lines · Heng Qi
Quoted 154 lines · Michael S. Tsirkin
Quoted 153 lines · Jason Wang
Quoted 127 lines · Michael S. Tsirkin
Quoted 126 lines · Jason Wang
Quoted 107 lines · Heng Qi
Quoted 85 lines · Jason Wang
Quoted 84 lines · Heng Qi
Quoted 67 lines · Jason Wang
Quoted 53 lines · Heng Qi
Quoted 52 lines · Heng Qi
在 2023/12/1 下午1:18, Jason Wang 写道:
On Wed, Nov 29, 2023 at 4:23 PM Heng Qi <[email protected]>
wrote:
在 2023/11/29 下午4:00, Jason Wang 写道:
On Tue, Nov 28, 2023 at 4:08 PM Heng Qi <[email protected]>
wrote:
To prevent readers from misunderstanding that the driver can
only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUM is negotiated, we update the description.Signed-off-by: Heng Qi <[email protected]>
---
device-types/net/description.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/device-types/net/description.tex
b/device-types/net/description.tex
index aff5e08..529f470 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types
/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum or full checksum.
So patch 2 said"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with
full checksum.
\end{description}
"Is there any difference between the two "full checksum" here?
There's no difference.The core is that VIRTIO_NET_F_GUEST_FULL_CSUM means that the driver
"can
only" handle packets with full checksum.
This seems to be odd.Driver can always handle packet with full checksum, no?
Yes.I meant it
will be then to be functional equivalent to !
VIRTIO_NET_F_GUEST_FULL_CSUM?Quoted 13 lines
Quoted 2 lines
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?Sorry, this is a typo. I meant
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?Quoted 6 lines
If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle
packets with partial checksum.Quoted 7 lines
I may miss something here, but what's the difference between
VIRTIO_NET_F_GUEST_FULL_CSUMand
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:
If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full checksum to the driver,
but the device can not validate the checksum for these packets. That is, the flags in virtio-net-hdr
will not contain_DATA_VALID, and the driver or stack needs to validate these packets.Quoted 7 lines
Quoted 5 lines
If
VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full checksum to the driver,
and the device can validate the checksum for these packets. That is, the flags in virtio-net-hdr
will contain_DATA_VALID,I think
DATA_VALIDis optional here as device can't recognize all type of protocols.Yes, you are right, so I used "device *can*" here. Which packet types the device recognizes or validates
depends on the device's implementation. This is also the current practice ofGUEST_CSUM.Quoted 3 lines
Quoted 2 lines
and the driver or stack does not need to
validate these packets.Ok, so I think there're something that is subtle here,
Ok, I see.
Quoted 3 lines
and that's why
I'm asking here:Quoted 7 lines
Quoted 4 lines
1) "Driver does not handle packets with partial checksum" is not accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as it doesn't say whether or not the packet has been validated or not.Maybe the description below would be less subtle? +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue since even with
DATA_VALID. Did you?Quoted 3 lines
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets with full checksum,
and the device optionally validates the packet's checksum.Or maybe something like (not a native speaker)
The driver handles packets with full checksum which the device has already validated.
Quoted 7 lines
Quoted 1 line
Thanks
I feel we just need a proper definition of what does "full checksum" mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just likeVIRTIO_NET_F_GUEST_CSUMbut certain values in the header are then disallowed? Which? This should be in the spec.Yes, I think it is probably the headers that
DATA_VALIDcan work. We never define it in the past.E.g in the Linux we map
DATA_VALIDtoCHECKSUM_UNNECESSARY, but it can only work for some specific protocols:"""
* %CHECKSUM_UNNECESSARY is applicable to following protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may applyCHECKSUM_UNNECESSARYto a
* zero UDP checksum for either IPv4 or IPv6, the networking stack
* may perform further validation in this case.* - GRE: only if the checksum is present in the header. * - SCTP: indicates the CRC in SCTP header has been validated. * - FCOE: indicates the CRC in FC frame has been validated."""
Quoted 3 lines
Quoted 2 lines
I'm not sure whether it's just fine to duplicate the definition or it's too late to define any now.
I think it's mostly harmless for other protocols.
I'm not sure if this should be defined by a new
FULL_CSUMfeature. This seems to be an issue withGUEST_CSUM.Quoted 6 lines
Quoted 1 line
I think we should supplement these with a new patch for
GUEST_CSUM?Probably. My understanding is:
You want to reuse
DATA_VALIDhere, so we need to stick to a consistent semantic forGUEST_CUSMandFULL_CSUM. So we need a definition of "full csum" or what kind of packet couldDATA_VALIDwork here.I agree, we can be clear about what types of packets
DATA_VALIDmight cover, e.g. TCP/UDP/GRE/SCTP/FoCE.
Quoted 6 lines
But I think we also need something like \field{supported_validate_types} to indicate which packet types the device supports validating and setting
DATA_VALID,
otherwise the device driver that negotiates this feature may fail to live migration.
Am I right?
Probably, but I think most devices only do this for TCP/UDP packets now, so we are fine.
Quoted 8 lines
I'm not sure how
GUEST_CSUMworks now as it should also suffer from the above
mentioned issues with live migration, but no devices are reporting this right now.Maybe, each device only supports checksum verification for TCP/UDP by default?
Maybe.
Thanks
Quoted 94 lines
I don't know.
But I hope we can focus on this and get consensus, because our hw release date is coming soon.Thanks a lot!
Quoted 79 lines
Thanks
Quoted 76 lines
Thanks!
Quoted 74 lines
Quoted 74 lines
Quoted 3 lines
After this is written up we will come up with a good short description for the feature bit.
Thanks
Quoted 69 lines
Quoted 69 lines
Quoted 69 lines
Thanks!
Quoted 51 lines
Thanks
Quoted 49 lines
Thanks!
Quoted 31 lines
Thanks
Quoted 29 lines
Quoted 29 lines
Thanks!
Thanks
Thanks!
Thanks
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/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/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/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.
Quoted 9 lines
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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
In reply to Heng QiQuoted 195 lines · Heng Qi
Quoted 191 lines · Michael S. Tsirkin
Quoted 190 lines · Heng Qi
Quoted 162 lines · Jason Wang
Quoted 161 lines · Heng Qi
Quoted 153 lines · Michael S. Tsirkin
Quoted 152 lines · Jason Wang
Quoted 126 lines · Michael S. Tsirkin
Quoted 125 lines · Jason Wang
Quoted 106 lines · Heng Qi
Quoted 85 lines · Jason Wang
Quoted 84 lines · Heng Qi
Quoted 74 lines · Jason Wang
On Fri, Dec 1, 2023 at 2:30 PM Heng Qi <[email protected]> wrote:
在 2023/12/1 下午2:24, Heng Qi 写道:
在 2023/12/1 下午1:18, Jason Wang 写道:
On Wed, Nov 29, 2023 at 4:23 PM Heng Qi <[email protected]>
wrote:
在 2023/11/29 下午4:00, Jason Wang 写道:
On Tue, Nov 28, 2023 at 4:08 PM Heng Qi <[email protected]>
wrote:
To prevent readers from misunderstanding that the driver can
only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUM is negotiated, we update the description.Signed-off-by: Heng Qi <[email protected]>
---
device-types/net/description.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/device-types/net/description.tex
b/device-types/net/description.tex
index aff5e08..529f470 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types
/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum or full checksum.
So patch 2 said"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with
full checksum.
\end{description}
"Is there any difference between the two "full checksum" here?
There's no difference.The core is that VIRTIO_NET_F_GUEST_FULL_CSUM means that the driver
"can
only" handle packets with full checksum.
This seems to be odd.Driver can always handle packet with full checksum, no?
Yes.I meant it
will be then to be functional equivalent to !
VIRTIO_NET_F_GUEST_FULL_CSUM?
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?
Sorry, this is a typo. I meantAre you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle
packets with partial checksum.
I may miss something here, but what's the difference betweenVIRTIO_NET_F_GUEST_FULL_CSUM
and
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:
If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full checksum to the driver,
but the device can not validate the checksum for these packets. That is, the flags in virtio-net-hdr
will not contain_DATA_VALID, and the driver or stack needs to validate these packets.Quoted 7 lines
Quoted 5 lines
If
VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full checksum to the driver,
and the device can validate the checksum for these packets. That is, the flags in virtio-net-hdr
will contain_DATA_VALID,I think
DATA_VALIDis optional here as device can't recognize all type of protocols.Yes, you are right, so I used "device *can*" here. Which packet types the device recognizes or validates
depends on the device's implementation. This is also the current practice ofGUEST_CSUM.Quoted 3 lines
Quoted 2 lines
and the driver or stack does not need to
validate these packets.Ok, so I think there're something that is subtle here,
Ok, I see.
Quoted 3 lines
and that's why
I'm asking here:Quoted 7 lines
Quoted 4 lines
1) "Driver does not handle packets with partial checksum" is not accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as it doesn't say whether or not the packet has been validated or not.Maybe the description below would be less subtle? +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue since even with
DATA_VALID. Did you?Quoted 3 lines
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets with full checksum,
and the device optionally validates the packet's checksum.Or maybe something like (not a native speaker)
The driver handles packets with full checksum which the device has already validated.
Quoted 7 lines
Quoted 1 line
Thanks
I feel we just need a proper definition of what does "full checksum" mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just likeVIRTIO_NET_F_GUEST_CSUMbut certain values in the header are then disallowed? Which? This should be in the spec.Yes, I think it is probably the headers that
DATA_VALIDcan work. We never define it in the past.E.g in the Linux we map
DATA_VALIDtoCHECKSUM_UNNECESSARY, but it can only work for some specific protocols:"""
* %CHECKSUM_UNNECESSARY is applicable to following protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may applyCHECKSUM_UNNECESSARYto a
* zero UDP checksum for either IPv4 or IPv6, the networking stack
* may perform further validation in this case.
* - GRE: only if the checksum is present in the header.
* - SCTP: indicates the CRC in SCTP header has been validated.
* - FCOE: indicates the CRC in FC frame has been validated.
"""Quoted 3 lines
Quoted 2 lines
I'm not sure whether it's just fine to duplicate the definition or it's too late to define any now.
I think it's mostly harmless for other protocols.
I'm not sure if this should be defined by a new
FULL_CSUMfeature. This seems to be an issue withGUEST_CSUM.Quoted 6 lines
Quoted 1 line
I think we should supplement these with a new patch for
GUEST_CSUM?Probably. My understanding is:
You want to reuse
DATA_VALIDhere, so we need to stick to a consistent semantic forGUEST_CUSMandFULL_CSUM. So we need a definition of "full csum" or what kind of packet couldDATA_VALIDwork here.I agree, we can be clear about what types of packets
DATA_VALIDmight cover, e.g. TCP/UDP/GRE/SCTP/FoCE.But I think we also need something like \field{supported_validate_types} to indicate which packet types the device supports validating and setting
DATA_VALID,
otherwise the device driver that negotiates this feature may fail to live migration.
Am I right?I'm not sure how
GUEST_CSUMworks now as it should also suffer from the above
mentioned issues with live migration, but no devices are reporting this right now.Maybe, each device only supports checksum verification for TCP/UDP by default? I don't know.
But I hope we can focus on this and get consensus, because our hw release date is coming soon.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Thanks a lot!
First,
DATA_VALIDis not a thing that hardware should ever use. It's a hack when packets are passed within host.Get here. Thanks!
So if I understand correctly, we need a new flag here and define the supported protocols.
Thanks
Quoted 94 lines
Quoted 94 lines
Second I don't understand what it has to do with this discussion.
Your patch should be more specific and define which header fields are compatible with the new offload option.Quoted 69 lines
Quoted 69 lines
Thanks
Quoted 67 lines
Thanks!
Quoted 65 lines
Quoted 65 lines
Quoted 3 lines
After this is written up we will come up with a good short description for the feature bit.
Thanks
Quoted 60 lines
Quoted 60 lines
Quoted 60 lines
Thanks!
Quoted 51 lines
Thanks
Quoted 49 lines
Thanks!
Quoted 31 lines
Thanks
Thanks!
Thanks
Thanks!
Thanks
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/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/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.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
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/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.
Quoted 9 lines
Quoted 8 lines
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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 193 lines · Jason Wang
Quoted 192 lines · Heng Qi
Quoted 189 lines · Michael S. Tsirkin
Quoted 188 lines · Heng Qi
Quoted 161 lines · Jason Wang
Quoted 160 lines · Heng Qi
Quoted 153 lines · Michael S. Tsirkin
Quoted 152 lines · Jason Wang
Quoted 126 lines · Michael S. Tsirkin
Quoted 125 lines · Jason Wang
Quoted 106 lines · Heng Qi
Quoted 85 lines · Jason Wang
Quoted 84 lines · Heng Qi
在 2023/12/1 下午3:05, Jason Wang 写道:
On Fri, Dec 1, 2023 at 2:30 PM Heng Qi <[email protected]> wrote:
在 2023/12/1 下午2:24, Heng Qi 写道:
在 2023/12/1 下午1:18, Jason Wang 写道:
On Wed, Nov 29, 2023 at 4:23 PM Heng Qi <[email protected]>
wrote:
在 2023/11/29 下午4:00, Jason Wang 写道:
On Tue, Nov 28, 2023 at 4:08 PM Heng Qi <[email protected]>
wrote:
To prevent readers from misunderstanding that the driver can
only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUM is negotiated, we update the description.Signed-off-by: Heng Qi <[email protected]>
---
device-types/net/description.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/device-types/net/description.tex
b/device-types/net/description.tex
index aff5e08..529f470 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types
/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum or full checksum.
So patch 2 said"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with
full checksum.
\end{description}
"Is there any difference between the two "full checksum" here?
There's no difference.The core is that VIRTIO_NET_F_GUEST_FULL_CSUM means that the driver
"can
only" handle packets with full checksum.
This seems to be odd.Driver can always handle packet with full checksum, no?
Yes.I meant it
will be then to be functional equivalent to !
VIRTIO_NET_F_GUEST_FULL_CSUM?
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?
Sorry, this is a typo. I meantAre you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle
packets with partial checksum.
I may miss something here, but what's the difference betweenVIRTIO_NET_F_GUEST_FULL_CSUM
and
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full
checksum to the driver,
but the device can not validate the checksum for these packets. That is,
the flags in virtio-net-hdr
will not contain _DATA_VALID, and the driver or stack needs to validate
these packets.Quoted 7 lines
Quoted 5 lines
If VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full
checksum to the driver,
and the device can validate the checksum for these packets. That is, the
flags in virtio-net-hdr
will contain _DATA_VALID,I think
DATA_VALIDis optional here as device can't recognize all type of protocols.Yes, you are right, so I used "device *can*" here. Which packet types the device recognizes or validates
depends on the device's implementation. This is also the current practice ofGUEST_CSUM.Quoted 3 lines
Quoted 2 lines
and the driver or stack does not need to
validate these packets.Ok, so I think there're something that is subtle here,
Ok, I see.
Quoted 3 lines
and that's why
I'm asking here:Quoted 7 lines
Quoted 4 lines
1) "Driver does not handle packets with partial checksum" is not accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as it doesn't say whether or not the packet has been validated or not.Maybe the description below would be less subtle? +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue since even with
DATA_VALID. Did you?Quoted 3 lines
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets with full checksum,
and the device optionally validates the packet's checksum.Or maybe something like (not a native speaker)
The driver handles packets with full checksum which the device has already validated.
Quoted 7 lines
Quoted 1 line
Thanks
I feel we just need a proper definition of what does "full checksum" mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just likeVIRTIO_NET_F_GUEST_CSUMbut certain values in the header are then disallowed? Which? This should be in the spec.Yes, I think it is probably the headers that
DATA_VALIDcan work. We never define it in the past.E.g in the Linux we map
DATA_VALIDtoCHECKSUM_UNNECESSARY, but it can only work for some specific protocols:"""
* %CHECKSUM_UNNECESSARY is applicable to following protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may applyCHECKSUM_UNNECESSARYto a
* zero UDP checksum for either IPv4 or IPv6, the networking stack
* may perform further validation in this case.
* - GRE: only if the checksum is present in the header.
* - SCTP: indicates the CRC in SCTP header has been validated.
* - FCOE: indicates the CRC in FC frame has been validated.
"""Quoted 3 lines
Quoted 2 lines
I'm not sure whether it's just fine to duplicate the definition or it's too late to define any now.
I think it's mostly harmless for other protocols.
I'm not sure if this should be defined by a new
FULL_CSUMfeature. This seems to be an issue withGUEST_CSUM.Quoted 6 lines
Quoted 1 line
I think we should supplement these with a new patch for
GUEST_CSUM?Probably. My understanding is:
You want to reuse
DATA_VALIDhere, so we need to stick to a consistent semantic forGUEST_CUSMandFULL_CSUM. So we need a definition of "full csum" or what kind of packet couldDATA_VALIDwork here.I agree, we can be clear about what types of packets
DATA_VALIDmight cover, e.g. TCP/UDP/GRE/SCTP/FoCE.But I think we also need something like \field{supported_validate_types} to indicate which packet types the device supports validating and setting
DATA_VALID,
otherwise the device driver that negotiates this feature may fail to live migration.
Am I right?I'm not sure how
GUEST_CSUMworks now as it should also suffer from the above
mentioned issues with live migration, but no devices are reporting this right now.Maybe, each device only supports checksum verification for TCP/UDP by default? I don't know.
But I hope we can focus on this and get consensus, because our hw release date is coming soon.
Quoted 6 lines
Quoted 4 lines
Quoted 3 lines
Quoted 1 line
Thanks a lot!
First,
DATA_VALIDis not a thing that hardware should ever use. It's a hack when packets are passed within host.Get here. Thanks!
So if I understand correctly, we need a new flag here and define the supported protocols.
Seems not, I understand what Michael means is that we don't need supported_validate_types. Because DATA_VALID is set per packet, similar to streaming. From the perspective of the driver and the device, there is no need to know which packet types the device supports setting DATA_VALID for. We just need to know what packet types DATA_VALID might cover. Is this aligning, Michael?
Hi Xuan! WDYT?
Thanks!
Quoted 111 lines
Thanks
Quoted 92 lines
Quoted 92 lines
Second I don't understand what it has to do with this discussion.
Your patch should be more specific and define which header fields are compatible with the new offload option.Quoted 69 lines
Quoted 69 lines
Thanks
Quoted 67 lines
Thanks!
Quoted 65 lines
Quoted 65 lines
Quoted 3 lines
After this is written up we will come up with a good short description for the feature bit.
Thanks
Quoted 60 lines
Quoted 60 lines
Quoted 60 lines
Thanks!
Quoted 51 lines
Thanks
Quoted 49 lines
Thanks!
Thanks
Thanks!
Thanks
Thanks!
Thanks
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/
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/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.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
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/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.
Quoted 8 lines
Quoted 8 lines
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/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.
Quoted 8 lines
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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 203 lines · Heng Qi
Quoted 193 lines · Jason Wang
Quoted 192 lines · Heng Qi
Quoted 189 lines · Michael S. Tsirkin
Quoted 188 lines · Heng Qi
Quoted 161 lines · Jason Wang
Quoted 160 lines · Heng Qi
Quoted 153 lines · Michael S. Tsirkin
Quoted 152 lines · Jason Wang
Quoted 126 lines · Michael S. Tsirkin
Quoted 125 lines · Jason Wang
Quoted 106 lines · Heng Qi
Quoted 92 lines · Jason Wang
On Fri, Dec 1, 2023 at 3:16 PM Heng Qi <[email protected]> wrote:
在 2023/12/1 下午3:05, Jason Wang 写道:
On Fri, Dec 1, 2023 at 2:30 PM Heng Qi <[email protected]> wrote:
在 2023/12/1 下午2:24, Heng Qi 写道:
在 2023/12/1 下午1:18, Jason Wang 写道:
On Wed, Nov 29, 2023 at 4:23 PM Heng Qi <[email protected]>
wrote:
在 2023/11/29 下午4:00, Jason Wang 写道:
On Tue, Nov 28, 2023 at 4:08 PM Heng Qi <[email protected]>
wrote:
To prevent readers from misunderstanding that the driver can
only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUM is negotiated, we update the description.Signed-off-by: Heng Qi <[email protected]>
---
device-types/net/description.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/device-types/net/description.tex
b/device-types/net/description.tex
index aff5e08..529f470 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types
/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum or full checksum.
So patch 2 said"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with
full checksum.
\end{description}
"Is there any difference between the two "full checksum" here?
There's no difference.The core is that VIRTIO_NET_F_GUEST_FULL_CSUM means that the driver
"can
only" handle packets with full checksum.
This seems to be odd.Driver can always handle packet with full checksum, no?
Yes.I meant it
will be then to be functional equivalent to !
VIRTIO_NET_F_GUEST_FULL_CSUM?
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?
Sorry, this is a typo. I meantAre you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle
packets with partial checksum.
I may miss something here, but what's the difference betweenVIRTIO_NET_F_GUEST_FULL_CSUM
and
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full
checksum to the driver,
but the device can not validate the checksum for these packets. That is,
the flags in virtio-net-hdr
will not contain _DATA_VALID, and the driver or stack needs to validate
these packets.If VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full
checksum to the driver,
and the device can validate the checksum for these packets. That is, the
flags in virtio-net-hdr
will contain _DATA_VALID,
I think DATA_VALID is optional here as device can't recognize all type
of protocols.Yes, you are right, so I used "device *can*" here. Which packet types the device recognizes or validates
depends on the device's implementation. This is also the current practice ofGUEST_CSUM.Quoted 3 lines
and the driver or stack does not need to
validate these packets.
Ok, so I think there're something that is subtle here,Ok, I see.
Quoted 3 lines
and that's why
I'm asking here:Quoted 7 lines
Quoted 4 lines
1) "Driver does not handle packets with partial checksum" is not
accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as
it doesn't say whether or not the packet has been validated or not.Maybe the description below would be less subtle? +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue since even with
DATA_VALID. Did you?Quoted 3 lines
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets with full checksum,
and the device optionally validates the packet's checksum.Or maybe something like (not a native speaker)
The driver handles packets with full checksum which the device has already validated.
Quoted 7 lines
Quoted 1 line
Thanks
I feel we just need a proper definition of what does "full checksum" mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just likeVIRTIO_NET_F_GUEST_CSUMbut certain values in the header are then disallowed? Which? This should be in the spec.Yes, I think it is probably the headers that
DATA_VALIDcan work. We never define it in the past.E.g in the Linux we map
DATA_VALIDtoCHECKSUM_UNNECESSARY, but it can only work for some specific protocols:"""
* %CHECKSUM_UNNECESSARY is applicable to following protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may applyCHECKSUM_UNNECESSARYto a
* zero UDP checksum for either IPv4 or IPv6, the networking stack
* may perform further validation in this case.
* - GRE: only if the checksum is present in the header.
* - SCTP: indicates the CRC in SCTP header has been validated.
* - FCOE: indicates the CRC in FC frame has been validated.
"""Quoted 3 lines
Quoted 2 lines
I'm not sure whether it's just fine to duplicate the definition or it's too late to define any now.
I think it's mostly harmless for other protocols.
I'm not sure if this should be defined by a new
FULL_CSUMfeature. This seems to be an issue withGUEST_CSUM.Quoted 6 lines
Quoted 1 line
I think we should supplement these with a new patch for
GUEST_CSUM?Probably. My understanding is:
You want to reuse
DATA_VALIDhere, so we need to stick to a consistent semantic forGUEST_CUSMandFULL_CSUM. So we need a definition of "full csum" or what kind of packet couldDATA_VALIDwork here.I agree, we can be clear about what types of packets
DATA_VALIDmight cover, e.g. TCP/UDP/GRE/SCTP/FoCE.But I think we also need something like \field{supported_validate_types} to indicate which packet types the device supports validating and setting
DATA_VALID,
otherwise the device driver that negotiates this feature may fail to live migration.
Am I right?I'm not sure how
GUEST_CSUMworks now as it should also suffer from the above
mentioned issues with live migration, but no devices are reporting this right now.Maybe, each device only supports checksum verification for TCP/UDP by default? I don't know.
But I hope we can focus on this and get consensus, because our hw release date is coming soon.Quoted 6 lines
Quoted 4 lines
Quoted 3 lines
Quoted 1 line
Thanks a lot!
First,
DATA_VALIDis not a thing that hardware should ever use. It's a hack when packets are passed within host.Get here. Thanks!
So if I understand correctly, we need a new flag here and define the supported protocols.
Quoted 8 lines
Seems not, I understand what Michael means is that we don't need
supported_validate_types.
BecauseDATA_VALIDis set per packet, similar to streaming. From the perspective of the driver
and the device, there is no need to know which packet types the device supports settingDATA_VALIDfor.
We just need to know what packet typesDATA_VALIDmight cover. Is this aligning, Michael?
I don't know if it's even that. IIRC DATA_VALID mostly just means "this packet is local, don't worry about checksums".
That being said I don't see how improving the description here is related to the discussion around XDP.
Quoted 123 lines
Hi Xuan! WDYT?
Thanks!
Quoted 119 lines
Thanks
Quoted 92 lines
Quoted 92 lines
Second I don't understand what it has to do with this discussion.
Your patch should be more specific and define which header fields are compatible with the new offload option.Quoted 69 lines
Quoted 69 lines
Thanks
Quoted 67 lines
Thanks!
Quoted 65 lines
Quoted 65 lines
Quoted 3 lines
After this is written up we will come up with a good short description for the feature bit.
Thanks
Quoted 60 lines
Quoted 60 lines
Quoted 60 lines
Thanks!
Quoted 51 lines
Thanks
Thanks!
Thanks
Thanks!
Thanks
Thanks!
Thanks
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/
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/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.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
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/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.
Quoted 8 lines
Quoted 8 lines
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/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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 213 lines · Michael S. Tsirkin
Quoted 203 lines · Heng Qi
Quoted 193 lines · Jason Wang
Quoted 192 lines · Heng Qi
Quoted 189 lines · Michael S. Tsirkin
Quoted 188 lines · Heng Qi
Quoted 161 lines · Jason Wang
Quoted 160 lines · Heng Qi
Quoted 153 lines · Michael S. Tsirkin
Quoted 152 lines · Jason Wang
Quoted 126 lines · Michael S. Tsirkin
Quoted 125 lines · Jason Wang
Quoted 113 lines · Heng Qi
在 2023/12/4 下午3:18, Jason Wang 写道:
On Fri, Dec 1, 2023 at 3:16 PM Heng Qi <[email protected]> wrote:
在 2023/12/1 下午3:05, Jason Wang 写道:
On Fri, Dec 1, 2023 at 2:30 PM Heng Qi <[email protected]> wrote:
在 2023/12/1 下午2:24, Heng Qi 写道:
在 2023/12/1 下午1:18, Jason Wang 写道:
On Wed, Nov 29, 2023 at 4:23 PM Heng Qi <[email protected]>
wrote:
在 2023/11/29 下午4:00, Jason Wang 写道:
On Tue, Nov 28, 2023 at 4:08 PM Heng Qi <[email protected]>
wrote:
To prevent readers from misunderstanding that the driver can
only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUM is negotiated, we update the description.Signed-off-by: Heng Qi <[email protected]>
---
device-types/net/description.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/device-types/net/description.tex
b/device-types/net/description.tex
index aff5e08..529f470 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types
/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum or full checksum.
So patch 2 said"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with
full checksum.
\end{description}
"Is there any difference between the two "full checksum" here?
There's no difference.The core is that VIRTIO_NET_F_GUEST_FULL_CSUM means that the driver
"can
only" handle packets with full checksum.
This seems to be odd.Driver can always handle packet with full checksum, no?
Yes.I meant it
will be then to be functional equivalent to !
VIRTIO_NET_F_GUEST_FULL_CSUM?
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?
Sorry, this is a typo. I meantAre you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle
packets with partial checksum.
I may miss something here, but what's the difference betweenVIRTIO_NET_F_GUEST_FULL_CSUM
and
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full
checksum to the driver,
but the device can not validate the checksum for these packets. That is,
the flags in virtio-net-hdr
will not contain _DATA_VALID, and the driver or stack needs to validate
these packets.If VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full
checksum to the driver,
and the device can validate the checksum for these packets. That is, the
flags in virtio-net-hdr
will contain _DATA_VALID,
I think DATA_VALID is optional here as device can't recognize all type
of protocols.
Yes, you are right, so I used "device *can*" here. Which packet types
the device recognizes or validates
depends on the device's implementation. This is also the current
practice of GUEST_CSUM.and the driver or stack does not need to
validate these packets.
Ok, so I think there're something that is subtle here,
Ok, I see.and that's why
I'm asking here:1) "Driver does not handle packets with partial checksum" is not
accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as
it doesn't say whether or not the packet has been validated or not.
Maybe the description below would be less subtle?
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial
checksum or full checksum.I'd suggest to leave it as is. As I didn't find any issue since even with
DATA_VALID. Did you?Quoted 3 lines
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets
with full checksum,
and the device optionally validates the packet's checksum.Or maybe something like (not a native speaker)
The driver handles packets with full checksum which the device has already validated.
Quoted 7 lines
Quoted 1 line
Thanks
I feel we just need a proper definition of what does "full checksum" mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just likeVIRTIO_NET_F_GUEST_CSUMbut certain values in the header are then disallowed? Which? This should be in the spec.Yes, I think it is probably the headers that
DATA_VALIDcan work. We never define it in the past.E.g in the Linux we map
DATA_VALIDtoCHECKSUM_UNNECESSARY, but it can only work for some specific protocols:"""
* %CHECKSUM_UNNECESSARY is applicable to following protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may applyCHECKSUM_UNNECESSARYto a
* zero UDP checksum for either IPv4 or IPv6, the networking stack
* may perform further validation in this case.
* - GRE: only if the checksum is present in the header.
* - SCTP: indicates the CRC in SCTP header has been validated.
* - FCOE: indicates the CRC in FC frame has been validated.
"""Quoted 3 lines
Quoted 2 lines
I'm not sure whether it's just fine to duplicate the definition or it's too late to define any now.
I think it's mostly harmless for other protocols.
I'm not sure if this should be defined by a new
FULL_CSUMfeature. This seems to be an issue withGUEST_CSUM.Quoted 6 lines
Quoted 1 line
I think we should supplement these with a new patch for
GUEST_CSUM?Probably. My understanding is:
You want to reuse
DATA_VALIDhere, so we need to stick to a consistent semantic forGUEST_CUSMandFULL_CSUM. So we need a definition of "full csum" or what kind of packet couldDATA_VALIDwork here.I agree, we can be clear about what types of packets
DATA_VALIDmight cover, e.g. TCP/UDP/GRE/SCTP/FoCE.But I think we also need something like \field{supported_validate_types} to indicate which packet types the device supports validating and setting
DATA_VALID,
otherwise the device driver that negotiates this feature may fail to live migration.
Am I right?I'm not sure how
GUEST_CSUMworks now as it should also suffer from the above
mentioned issues with live migration, but no devices are reporting this right now.Maybe, each device only supports checksum verification for TCP/UDP by default? I don't know.
But I hope we can focus on this and get consensus, because our hw release date is coming soon.Quoted 6 lines
Quoted 4 lines
Quoted 3 lines
Quoted 1 line
Thanks a lot!
First,
DATA_VALIDis not a thing that hardware should ever use. It's a hack when packets are passed within host.Get here. Thanks!
So if I understand correctly, we need a new flag here and define the supported protocols.
Quoted 8 lines
Seems not, I understand what Michael means is that we don't need
supported_validate_types.
BecauseDATA_VALIDis set per packet, similar to streaming. From the perspective of the driver
and the device, there is no need to know which packet types the device supports settingDATA_VALIDfor.
We just need to know what packet typesDATA_VALIDmight cover. Is this aligning, Michael?
Quoted 2 lines
I don't know if it's even that. IIRC
DATA_VALIDmostly just means "this packet is local, don't worry about checksums".
If the VIRTIO_NET_F_GUEST_CSUM feature was negotiated, the VIRTIO_NET_HDR_F_DATA_VALID bit in flags can be set: if so, device has validated the packet checksum.
So it means "this packet csum is checked, don't worry about checksums".
Quoted 128 lines
That being said I don't see how improving the description here is related to the discussion around XDP.
Quoted 123 lines
Hi Xuan! WDYT?
Thanks!
Quoted 119 lines
Thanks
Quoted 92 lines
Quoted 92 lines
Second I don't understand what it has to do with this discussion.
Your patch should be more specific and define which header fields are compatible with the new offload option.Quoted 69 lines
Quoted 69 lines
Thanks
Quoted 67 lines
Thanks!
Quoted 65 lines
Quoted 65 lines
Quoted 3 lines
After this is written up we will come up with a good short description for the feature bit.
Thanks
Quoted 60 lines
Quoted 60 lines
Quoted 60 lines
Thanks!
Thanks
Thanks!
Thanks
Thanks!
Thanks
Thanks!
Thanks
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/
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/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.Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
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/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.
Quoted 8 lines
Quoted 8 lines
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/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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
In reply to Jason WangQuoted 198 lines · Jason Wang
Quoted 197 lines · Heng Qi
Quoted 193 lines · Michael S. Tsirkin
Quoted 191 lines · Heng Qi
Quoted 162 lines · Jason Wang
Quoted 161 lines · Heng Qi
Quoted 153 lines · Michael S. Tsirkin
Quoted 152 lines · Jason Wang
Quoted 126 lines · Michael S. Tsirkin
Quoted 125 lines · Jason Wang
Quoted 106 lines · Heng Qi
Quoted 85 lines · Jason Wang
Quoted 84 lines · Heng Qi
在 2023/12/1 下午3:05, Jason Wang 写道:
On Fri, Dec 1, 2023 at 2:30 PM Heng Qi <[email protected]> wrote:
在 2023/12/1 下午2:24, Heng Qi 写道:
在 2023/12/1 下午1:18, Jason Wang 写道:
On Wed, Nov 29, 2023 at 4:23 PM Heng Qi <[email protected]>
wrote:
在 2023/11/29 下午4:00, Jason Wang 写道:
On Tue, Nov 28, 2023 at 4:08 PM Heng Qi <[email protected]>
wrote:
To prevent readers from misunderstanding that the driver can
only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUM is negotiated, we update the description.Signed-off-by: Heng Qi <[email protected]>
---
device-types/net/description.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/device-types/net/description.tex
b/device-types/net/description.tex
index aff5e08..529f470 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types
/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum or full checksum.
So patch 2 said"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with
full checksum.
\end{description}
"Is there any difference between the two "full checksum" here?
There's no difference.The core is that VIRTIO_NET_F_GUEST_FULL_CSUM means that the driver
"can
only" handle packets with full checksum.
This seems to be odd.Driver can always handle packet with full checksum, no?
Yes.I meant it
will be then to be functional equivalent to !
VIRTIO_NET_F_GUEST_FULL_CSUM?
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?
Sorry, this is a typo. I meantAre you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle
packets with partial checksum.
I may miss something here, but what's the difference betweenVIRTIO_NET_F_GUEST_FULL_CSUM
and
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full
checksum to the driver,
but the device can not validate the checksum for these packets. That is,
the flags in virtio-net-hdr
will not contain _DATA_VALID, and the driver or stack needs to validate
these packets.Quoted 7 lines
Quoted 5 lines
If VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full
checksum to the driver,
and the device can validate the checksum for these packets. That is, the
flags in virtio-net-hdr
will contain _DATA_VALID,I think
DATA_VALIDis optional here as device can't recognize all type of protocols.Yes, you are right, so I used "device *can*" here. Which packet types the device recognizes or validates
depends on the device's implementation. This is also the current practice ofGUEST_CSUM.Quoted 3 lines
Quoted 2 lines
and the driver or stack does not need to
validate these packets.Ok, so I think there're something that is subtle here,
Ok, I see.
Quoted 3 lines
and that's why
I'm asking here:Quoted 7 lines
Quoted 4 lines
1) "Driver does not handle packets with partial checksum" is not accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as it doesn't say whether or not the packet has been validated or not.Maybe the description below would be less subtle? +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue since even with
DATA_VALID. Did you?Quoted 3 lines
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets with full checksum,
and the device optionally validates the packet's checksum.Or maybe something like (not a native speaker)
The driver handles packets with full checksum which the device has already validated.
Quoted 7 lines
Quoted 1 line
Thanks
I feel we just need a proper definition of what does "full checksum" mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just likeVIRTIO_NET_F_GUEST_CSUMbut certain values in the header are then disallowed? Which? This should be in the spec.Yes, I think it is probably the headers that
DATA_VALIDcan work. We never define it in the past.E.g in the Linux we map
DATA_VALIDtoCHECKSUM_UNNECESSARY, but it can only work for some specific protocols:"""
* %CHECKSUM_UNNECESSARY is applicable to following protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may applyCHECKSUM_UNNECESSARYto a
* zero UDP checksum for either IPv4 or IPv6, the networking stack
* may perform further validation in this case.
* - GRE: only if the checksum is present in the header.
* - SCTP: indicates the CRC in SCTP header has been validated.
* - FCOE: indicates the CRC in FC frame has been validated.
"""Quoted 3 lines
Quoted 2 lines
I'm not sure whether it's just fine to duplicate the definition or it's too late to define any now.
I think it's mostly harmless for other protocols.
I'm not sure if this should be defined by a new
FULL_CSUMfeature. This seems to be an issue withGUEST_CSUM.Quoted 6 lines
Quoted 1 line
I think we should supplement these with a new patch for
GUEST_CSUM?Probably. My understanding is:
You want to reuse
DATA_VALIDhere, so we need to stick to a consistent semantic forGUEST_CUSMandFULL_CSUM. So we need a definition of "full csum" or what kind of packet couldDATA_VALIDwork here.I agree, we can be clear about what types of packets
DATA_VALIDmight cover, e.g. TCP/UDP/GRE/SCTP/FoCE.But I think we also need something like \field{supported_validate_types} to indicate which packet types the device supports validating and setting
DATA_VALID,
otherwise the device driver that negotiates this feature may fail to live migration.
Am I right?I'm not sure how
GUEST_CSUMworks now as it should also suffer from the above
mentioned issues with live migration, but no devices are reporting this right now.Maybe, each device only supports checksum verification for TCP/UDP by default? I don't know.
But I hope we can focus on this and get consensus, because our hw release date is coming soon.Thanks a lot!
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
First,
DATA_VALIDis not a thing that hardware should ever use. It's a hack when packets are passed within host.Get here. Thanks!
So if I understand correctly, we need a new flag here and define the supported protocols.
For what, migration?
I don't think so.
Every packet has the flag(valid or none). The guest will check this flag. If we support this flag in config, the driver need to check this?
For migration, if we want to migrate one from src to dst. If the src device supports tcp and udp checksum and
the dst device just supports tcp checksum.
I think we should not migrate to this dst device. But this process does not need the involvement of the driver.
But for describing the supported protocols, I think that is ok. We lost that for GUEST_CSUM, we should not lost again for the new one.
Thanks.
Quoted 107 lines
Thanks
Quoted 103 lines
Quoted 102 lines
Second I don't understand what it has to do with this discussion.
Your patch should be more specific and define which header fields are compatible with the new offload option.Quoted 69 lines
Quoted 69 lines
Thanks
Quoted 67 lines
Thanks!
Quoted 65 lines
Quoted 65 lines
Quoted 3 lines
After this is written up we will come up with a good short description for the feature bit.
Thanks
Quoted 60 lines
Quoted 60 lines
Quoted 60 lines
Thanks!
Quoted 51 lines
Thanks
Quoted 49 lines
Thanks!
Thanks
Thanks!
Thanks
Thanks!
Thanks
\item[VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (2)] Control channel offloads
reconfiguration support.
--
2.19.1.6.gb485710bThis 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/
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/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.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
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/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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 203 lines · Xuan Zhuo
Quoted 201 lines · Jason Wang
Quoted 200 lines · Heng Qi
Quoted 195 lines · Michael S. Tsirkin
Quoted 185 lines · Heng Qi
Quoted 162 lines · Jason Wang
Quoted 161 lines · Heng Qi
Quoted 153 lines · Michael S. Tsirkin
Quoted 152 lines · Jason Wang
Quoted 126 lines · Michael S. Tsirkin
Quoted 125 lines · Jason Wang
Quoted 106 lines · Heng Qi
Quoted 92 lines · Jason Wang
On Fri, Dec 1, 2023 at 3:16 PM Heng Qi <[email protected]> wrote:
在 2023/12/1 下午3:05, Jason Wang 写道:
On Fri, Dec 1, 2023 at 2:30 PM Heng Qi <[email protected]> wrote:
在 2023/12/1 下午2:24, Heng Qi 写道:
在 2023/12/1 下午1:18, Jason Wang 写道:
On Wed, Nov 29, 2023 at 4:23 PM Heng Qi <[email protected]>
wrote:
在 2023/11/29 下午4:00, Jason Wang 写道:
On Tue, Nov 28, 2023 at 4:08 PM Heng Qi <[email protected]>
wrote:
To prevent readers from misunderstanding that the driver can
only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUM is negotiated, we update the description.Signed-off-by: Heng Qi <[email protected]>
---
device-types/net/description.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/device-types/net/description.tex
b/device-types/net/description.tex
index aff5e08..529f470 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types
/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum or full checksum.
So patch 2 said"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with
full checksum.
\end{description}
"Is there any difference between the two "full checksum" here?
There's no difference.The core is that VIRTIO_NET_F_GUEST_FULL_CSUM means that the driver
"can
only" handle packets with full checksum.
This seems to be odd.Driver can always handle packet with full checksum, no?
Yes.I meant it
will be then to be functional equivalent to !
VIRTIO_NET_F_GUEST_FULL_CSUM?
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?
Sorry, this is a typo. I meantAre you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle
packets with partial checksum.
I may miss something here, but what's the difference betweenVIRTIO_NET_F_GUEST_FULL_CSUM
and
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full
checksum to the driver,
but the device can not validate the checksum for these packets. That is,
the flags in virtio-net-hdr
will not contain _DATA_VALID, and the driver or stack needs to validate
these packets.If VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full
checksum to the driver,
and the device can validate the checksum for these packets. That is, the
flags in virtio-net-hdr
will contain _DATA_VALID,
I think DATA_VALID is optional here as device can't recognize all type
of protocols.Yes, you are right, so I used "device *can*" here. Which packet types the device recognizes or validates
depends on the device's implementation. This is also the current practice ofGUEST_CSUM.Quoted 3 lines
and the driver or stack does not need to
validate these packets.
Ok, so I think there're something that is subtle here,Ok, I see.
Quoted 3 lines
and that's why
I'm asking here:Quoted 7 lines
Quoted 4 lines
1) "Driver does not handle packets with partial checksum" is not
accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as
it doesn't say whether or not the packet has been validated or not.Maybe the description below would be less subtle? +\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue since even with
DATA_VALID. Did you?Quoted 3 lines
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets with full checksum,
and the device optionally validates the packet's checksum.Or maybe something like (not a native speaker)
The driver handles packets with full checksum which the device has already validated.
Quoted 7 lines
Quoted 1 line
Thanks
I feel we just need a proper definition of what does "full checksum" mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just likeVIRTIO_NET_F_GUEST_CSUMbut certain values in the header are then disallowed? Which? This should be in the spec.Yes, I think it is probably the headers that
DATA_VALIDcan work. We never define it in the past.E.g in the Linux we map
DATA_VALIDtoCHECKSUM_UNNECESSARY, but it can only work for some specific protocols:"""
* %CHECKSUM_UNNECESSARY is applicable to following protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may applyCHECKSUM_UNNECESSARYto a
* zero UDP checksum for either IPv4 or IPv6, the networking stack
* may perform further validation in this case.
* - GRE: only if the checksum is present in the header.
* - SCTP: indicates the CRC in SCTP header has been validated.
* - FCOE: indicates the CRC in FC frame has been validated.
"""Quoted 3 lines
Quoted 2 lines
I'm not sure whether it's just fine to duplicate the definition or it's too late to define any now.
I think it's mostly harmless for other protocols.
I'm not sure if this should be defined by a new
FULL_CSUMfeature. This seems to be an issue withGUEST_CSUM.Quoted 6 lines
Quoted 1 line
I think we should supplement these with a new patch for
GUEST_CSUM?Probably. My understanding is:
You want to reuse
DATA_VALIDhere, so we need to stick to a consistent semantic forGUEST_CUSMandFULL_CSUM. So we need a definition of "full csum" or what kind of packet couldDATA_VALIDwork here.I agree, we can be clear about what types of packets
DATA_VALIDmight cover, e.g. TCP/UDP/GRE/SCTP/FoCE.But I think we also need something like \field{supported_validate_types} to indicate which packet types the device supports validating and setting
DATA_VALID,
otherwise the device driver that negotiates this feature may fail to live migration.
Am I right?I'm not sure how
GUEST_CSUMworks now as it should also suffer from the above
mentioned issues with live migration, but no devices are reporting this right now.Quoted 6 lines
Maybe, each device only supports checksum verification for TCP/UDP by default? I don't know.
But I hope we can focus on this and get consensus, because our hw release date is coming soon.Thanks a lot!
First,
DATA_VALIDis not a thing that hardware should ever use. It's a hack when packets are passed within host.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Get here. Thanks!
So if I understand correctly, we need a new flag here and define the supported protocols.
For what, migration?
No.
It's basically a question of whether or not we want to reuse DATA_VALID. It has limitations that it only works for some specific protocols.
If we don't, we need a new flag.
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 202 lines · Jason Wang
Quoted 201 lines · Xuan Zhuo
Quoted 199 lines · Jason Wang
Quoted 192 lines · Heng Qi
Quoted 189 lines · Michael S. Tsirkin
Quoted 188 lines · Heng Qi
Quoted 161 lines · Jason Wang
Quoted 160 lines · Heng Qi
Quoted 153 lines · Michael S. Tsirkin
Quoted 152 lines · Jason Wang
Quoted 126 lines · Michael S. Tsirkin
Quoted 125 lines · Jason Wang
Quoted 113 lines · Heng Qi
在 2023/12/4 下午3:18, Jason Wang 写道:
On Fri, Dec 1, 2023 at 3:16 PM Heng Qi <[email protected]> wrote:
在 2023/12/1 下午3:05, Jason Wang 写道:
On Fri, Dec 1, 2023 at 2:30 PM Heng Qi <[email protected]> wrote:
在 2023/12/1 下午2:24, Heng Qi 写道:
在 2023/12/1 下午1:18, Jason Wang 写道:
On Wed, Nov 29, 2023 at 4:23 PM Heng Qi <[email protected]>
wrote:
在 2023/11/29 下午4:00, Jason Wang 写道:
On Tue, Nov 28, 2023 at 4:08 PM Heng Qi <[email protected]>
wrote:
To prevent readers from misunderstanding that the driver can
only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUM is negotiated, we update the description.Signed-off-by: Heng Qi <[email protected]>
---
device-types/net/description.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/device-types/net/description.tex
b/device-types/net/description.tex
index aff5e08..529f470 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -38,7 +38,7 @@ \subsection{Feature bits}\label{sec:Device Types
/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with
partial checksum or full checksum.
So patch 2 said"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver handles packets with
full checksum.
\end{description}
"Is there any difference between the two "full checksum" here?
There's no difference.The core is that VIRTIO_NET_F_GUEST_FULL_CSUM means that the driver
"can
only" handle packets with full checksum.
This seems to be odd.Driver can always handle packet with full checksum, no?
Yes.I meant it
will be then to be functional equivalent to !
VIRTIO_NET_F_GUEST_FULL_CSUM?
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?
Sorry, this is a typo. I meantAre you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver does not handle
packets with partial checksum.
I may miss something here, but what's the difference betweenVIRTIO_NET_F_GUEST_FULL_CSUM
and
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full
checksum to the driver,
but the device can not validate the checksum for these packets. That is,
the flags in virtio-net-hdr
will not contain _DATA_VALID, and the driver or stack needs to validate
these packets.If VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full
checksum to the driver,
and the device can validate the checksum for these packets. That is, the
flags in virtio-net-hdr
will contain _DATA_VALID,
I think DATA_VALID is optional here as device can't recognize all type
of protocols.
Yes, you are right, so I used "device *can*" here. Which packet types
the device recognizes or validates
depends on the device's implementation. This is also the current
practice of GUEST_CSUM.and the driver or stack does not need to
validate these packets.
Ok, so I think there're something that is subtle here,
Ok, I see.and that's why
I'm asking here:1) "Driver does not handle packets with partial checksum" is not
accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as
it doesn't say whether or not the packet has been validated or not.
Maybe the description below would be less subtle?
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles packets with partial
checksum or full checksum.I'd suggest to leave it as is. As I didn't find any issue since even with
DATA_VALID. Did you?Quoted 3 lines
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver handles packets
with full checksum,
and the device optionally validates the packet's checksum.Or maybe something like (not a native speaker)
The driver handles packets with full checksum which the device has already validated.
Quoted 7 lines
Quoted 1 line
Thanks
I feel we just need a proper definition of what does "full checksum" mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just likeVIRTIO_NET_F_GUEST_CSUMbut certain values in the header are then disallowed? Which? This should be in the spec.Yes, I think it is probably the headers that
DATA_VALIDcan work. We never define it in the past.E.g in the Linux we map
DATA_VALIDtoCHECKSUM_UNNECESSARY, but it can only work for some specific protocols:"""
* %CHECKSUM_UNNECESSARY is applicable to following protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may applyCHECKSUM_UNNECESSARYto a
* zero UDP checksum for either IPv4 or IPv6, the networking stack
* may perform further validation in this case.
* - GRE: only if the checksum is present in the header.
* - SCTP: indicates the CRC in SCTP header has been validated.
* - FCOE: indicates the CRC in FC frame has been validated.
"""Quoted 3 lines
Quoted 2 lines
I'm not sure whether it's just fine to duplicate the definition or it's too late to define any now.
I think it's mostly harmless for other protocols.
I'm not sure if this should be defined by a new
FULL_CSUMfeature. This seems to be an issue withGUEST_CSUM.Quoted 6 lines
Quoted 1 line
I think we should supplement these with a new patch for
GUEST_CSUM?Probably. My understanding is:
You want to reuse
DATA_VALIDhere, so we need to stick to a consistent semantic forGUEST_CUSMandFULL_CSUM. So we need a definition of "full csum" or what kind of packet couldDATA_VALIDwork here.I agree, we can be clear about what types of packets
DATA_VALIDmight cover, e.g. TCP/UDP/GRE/SCTP/FoCE.But I think we also need something like \field{supported_validate_types} to indicate which packet types the device supports validating and setting
DATA_VALID,
otherwise the device driver that negotiates this feature may fail to live migration.
Am I right?I'm not sure how
GUEST_CSUMworks now as it should also suffer from the above
mentioned issues with live migration, but no devices are reporting this right now.Maybe, each device only supports checksum verification for TCP/UDP by default? I don't know.
But I hope we can focus on this and get consensus, because our hw release date is coming soon.Quoted 4 lines
Quoted 3 lines
Quoted 1 line
Thanks a lot!
First,
DATA_VALIDis not a thing that hardware should ever use. It's a hack when packets are passed within host.Get here. Thanks!
So if I understand correctly, we need a new flag here and define the supported protocols.
Quoted 6 lines
Quoted 1 line
For what, migration?
No.
It's basically a question of whether or not we want to reuse
DATA_VALID. It has limitations that it only works for some specific protocols.
Yes, I understand what Xuan means is that we reuse DATA_VALID and advertise what specific protocols DATA_VALID covers.
Back to supported_validate_types, now I think we really don't need to let the device provide this field. Why? Because asssuming the device provides it, it seems useless because the driver does not parse the protocol type for each packet and does not use this field. The driver and stack just want to know whether the packet is valid or checksum unneccessary.
Thanks!
Quoted 4 lines
If we don't, we need a new flag.
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 219 lines · Heng Qi
Quoted 209 lines · Jason Wang
Quoted 208 lines · Xuan Zhuo
Quoted 206 lines · Jason Wang
Quoted 199 lines · Heng Qi
Quoted 196 lines · Michael S. Tsirkin
Quoted 195 lines · Heng Qi
Quoted 168 lines · Jason Wang
Quoted 167 lines · Heng Qi
Quoted 160 lines · Michael S. Tsirkin
Quoted 159 lines · Jason Wang
Quoted 133 lines · Michael S. Tsirkin
Quoted 132 lines · Jason Wang
On Mon, Dec 4, 2023 at 3:37 PM Heng Qi <[email protected]> wrote:
在 2023/12/4 下午3:18, Jason Wang 写道:
On Fri, Dec 1, 2023 at 3:16 PM Heng Qi <[email protected]> wrote:
在 2023/12/1 下午3:05, Jason Wang 写道:
On Fri, Dec 1, 2023 at 2:30 PM Heng Qi <[email protected]> wrote:
在 2023/12/1 下午2:24, Heng Qi 写道:
在 2023/12/1 下午1:18, Jason Wang 写道:
On Wed, Nov 29, 2023 at 4:23 PM Heng Qi <[email protected]>
wrote:
在 2023/11/29 下午4:00, Jason Wang 写道:
On Tue, Nov 28, 2023 at 4:08 PM Heng Qi <[email protected]>
wrote:
To prevent readers from misunderstanding that the driver can
only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUM is negotiated, we update the description.Signed-off-by: Heng Qi <[email protected]>
---
device-types/net/description.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/device-types/net/description.tex
b/device-types/net/description.tex
index aff5e08..529f470 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -38,7 +38,7 @@ \subsection{Feature
bits}\label{sec:Device Types
/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles packets with
partial checksum offload.-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver
handles packets with
partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver
handles packets with
partial checksum or full checksum.
So patch 2 said"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver
handles packets with
full checksum.
\end{description}
"Is there any difference between the two "full checksum" here?
There's no difference.The core is that VIRTIO_NET_F_GUEST_FULL_CSUM means that the driver
"can
only" handle packets with full checksum.
This seems to be odd.Driver can always handle packet with full checksum, no?
Yes.I meant it
will be then to be functional equivalent to !
VIRTIO_NET_F_GUEST_FULL_CSUM?
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?
Sorry, this is a typo. I meantAre you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_FULL_CSUM" ?If so, I think it's no.
Maybe a description similar to the following would be more clearer:
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver
does not handle
packets with partial checksum.
I may miss something here, but what's the difference betweenVIRTIO_NET_F_GUEST_FULL_CSUM
and
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:If !VIRTIO_NET_F_GUEST_CSUM, the device delivers packets with full
checksum to the driver,
but the device can not validate the checksum for these packets. That is,
the flags in virtio-net-hdr
will not contain _DATA_VALID, and the driver or stack needs to validate
these packets.If VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers packets with full
checksum to the driver,
and the device can validate the checksum for these packets. That is, the
flags in virtio-net-hdr
will contain _DATA_VALID,
I think DATA_VALID is optional here as device can't recognize all type
of protocols.
Yes, you are right, so I used "device *can*" here. Which packet types
the device recognizes or validates
depends on the device's implementation. This is also the current
practice of GUEST_CSUM.and the driver or stack does not need to
validate these packets.
Ok, so I think there're something that is subtle here,
Ok, I see.and that's why
I'm asking here:1) "Driver does not handle packets with partial checksum" is not
accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind of ambiguous as
it doesn't say whether or not the packet has been validated or not.
Maybe the description below would be less subtle?
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles
packets with partial
checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue since even
with DATA_VALID. Did you?+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver
handles packets
with full checksum,
and the device optionally validates the packet's checksum.
Or maybe something like (not a native speaker)The driver handles packets with full checksum which the device has
already validated.Quoted 7 lines
Quoted 1 line
Thanks
I feel we just need a proper definition of what does "full checksum" mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just likeVIRTIO_NET_F_GUEST_CSUMbut certain values in the header are then disallowed? Which? This should be in the spec.Yes, I think it is probably the headers that
DATA_VALIDcan work. We never define it in the past.E.g in the Linux we map
DATA_VALIDtoCHECKSUM_UNNECESSARY, but it can only work for some specific protocols:"""
* %CHECKSUM_UNNECESSARY is applicable to following protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may applyCHECKSUM_UNNECESSARYto a * zero UDP checksum for either IPv4 or IPv6, the networking stack * may perform further validation in this case.
* - GRE: only if the checksum is present in the header. * - SCTP: indicates the CRC in SCTP header has been validated. * - FCOE: indicates the CRC in FC frame has been validated. """Quoted 3 lines
Quoted 2 lines
I'm not sure whether it's just fine to duplicate the definition or it's too late to define any now.
I think it's mostly harmless for other protocols.
I'm not sure if this should be defined by a new
FULL_CSUMfeature. This seems to be an issue withGUEST_CSUM.Quoted 6 lines
Quoted 1 line
I think we should supplement these with a new patch for
GUEST_CSUM?Probably. My understanding is:
You want to reuse
DATA_VALIDhere, so we need to stick to a consistent semantic forGUEST_CUSMandFULL_CSUM. So we need a definition of "full csum" or what kind of packet couldDATA_VALIDwork here.I agree, we can be clear about what types of packets
DATA_VALIDmight cover, e.g. TCP/UDP/GRE/SCTP/FoCE.But I think we also need something like \field{supported_validate_types} to indicate which packet types the device supports validating and setting
DATA_VALID,
otherwise the device driver that negotiates this feature may fail to live migration.
Am I right?I'm not sure how
GUEST_CSUMworks now as it should also suffer from the above
mentioned issues with live migration, but no devices are reporting this right now.Maybe, each device only supports checksum verification for TCP/UDP by default? I don't know.
But I hope we can focus on this and get consensus, because our hw release date is coming soon.Quoted 4 lines
Quoted 3 lines
Quoted 1 line
Thanks a lot!
First,
DATA_VALIDis not a thing that hardware should ever use. It's a hack when packets are passed within host.Get here. Thanks!
So if I understand correctly, we need a new flag here and define the supported protocols.
Quoted 6 lines
Quoted 1 line
For what, migration?
No.
It's basically a question of whether or not we want to reuse
DATA_VALID. It has limitations that it only works for some specific protocols.
Quoted 7 lines
Yes, I understand what Xuan means is that we reuse
DATA_VALIDand advertise what specific protocolsDATA_VALIDcovers.Back to
supported_validate_types, now I think we really don't need to let the device provide this field. Why? Because asssuming the device provides it, it seems useless because the driver does not parse the protocol type for each packet and does not use this field. The driver and stack just want to know whether the packet is valid or checksum unneccessary.
Hi Jason and Michael.
Are we aligned on this?
If yes, I'll write a new version to refresh the thread and try to avoid future rollbacks.
Thanks a lot!
Quoted 16 lines
Thanks!
Quoted 4 lines
If we don't, we need a new flag.
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.
Quoted 8 lines
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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 291 lines · Heng Qi
Quoted 278 lines · Heng Qi
Quoted 264 lines · Jason Wang
Quoted 262 lines · Xuan Zhuo
Quoted 259 lines · Jason Wang
Quoted 251 lines · Heng Qi
Quoted 248 lines · Michael S. Tsirkin
Quoted 247 lines · Heng Qi
Quoted 210 lines · Jason Wang
Quoted 208 lines · Heng Qi
Quoted 199 lines · Michael S. Tsirkin
Quoted 198 lines · Jason Wang
Quoted 170 lines · Michael S. Tsirkin
On Mon, Dec 04, 2023 at 04:49:46PM +0800, Jason Wang wrote:
On Mon, Dec 4, 2023 at 3:37 PM Heng Qi
<[email protected]> wrote:
在 2023/12/4 下午3:18, Jason Wang 写道:
On Fri, Dec 1, 2023 at 3:16 PM Heng Qi
<[email protected]> wrote:
在 2023/12/1 下午3:05, Jason Wang 写道:
On Fri, Dec 1, 2023 at 2:30 PM Heng Qi
<[email protected]> wrote:
在 2023/12/1 下午2:24, Heng Qi 写道:
在 2023/12/1 下午1:18, Jason Wang 写道:
On Wed, Nov 29, 2023 at 4:23 PM Heng Qi
<[email protected]>
wrote:
在 2023/11/29 下午4:00, Jason Wang 写道:
On Tue, Nov 28, 2023 at 4:08 PM Heng Qi
<[email protected]>
wrote:
To prevent readers from misunderstanding that
the driver can
only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUM is negotiated, we update
the description.Signed-off-by: Heng Qi <[email protected]>
---
device-types/net/description.tex | 2 +-
1 file changed, 1 insertion(+), 1
deletion(-)diff --git a/device-types/net/description.tex
b/device-types/net/description.tex
index aff5e08..529f470 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -38,7 +38,7 @@ \subsection{Feature
bits}\label{sec:Device Types
/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles
packets with
partial checksum offload.-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver
handles packets with
partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver
handles packets with
partial checksum or full checksum.
So patch 2 said"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver
handles packets with
full checksum.
\end{description}
"Is there any difference between the two "full
checksum" here?
There's no difference.The core is that VIRTIO_NET_F_GUEST_FULL_CSUM
means that the driver
"can
only" handle packets with full checksum.
This seems to be odd.Driver can always handle packet with full checksum,
no?
Yes.I meant it
will be then to be functional equivalent to !
VIRTIO_NET_F_GUEST_FULL_CSUM?
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?
Sorry, this is a typo. I meantAre you referring to
"functional equivalent to
!VIRTIO_NET_F_GUEST_FULL_CSUM" ?If so, I think it's no.
Maybe a description similar to the following would
be more clearer:+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver
does not handle
packets with partial checksum.
I may miss something here, but what's the difference
betweenVIRTIO_NET_F_GUEST_FULL_CSUM
and
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:If !VIRTIO_NET_F_GUEST_CSUM, the device delivers
packets with full
checksum to the driver,
but the device can not validate the checksum for these
packets. That is,
the flags in virtio-net-hdr
will not contain _DATA_VALID, and the driver or stack
needs to validate
these packets.If VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers
packets with full
checksum to the driver,
and the device can validate the checksum for these
packets. That is, the
flags in virtio-net-hdr
will contain _DATA_VALID,
I think DATA_VALID is optional here as device can't
recognize all type
of protocols.
Yes, you are right, so I used "device *can*" here. Which
packet types
the device recognizes or validates
depends on the device's implementation. This is also the
current
practice of GUEST_CSUM.and the driver or stack does not need to
validate these packets.
Ok, so I think there're something that is subtle here,
Ok, I see.and that's why
I'm asking here:1) "Driver does not handle packets with partial
checksum" is not
accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind
of ambiguous as
it doesn't say whether or not the packet has been
validated or not.
Maybe the description below would be less subtle?
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles
packets with partial
checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue
since even
with DATA_VALID. Did you?+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver
handles packets
with full checksum,
and the device optionally validates the packet's checksum.
Or maybe something like (not a native speaker)The driver handles packets with full checksum which the
device has
already validated.Thanks
I feel we just need a proper definition of what does "full
checksum"
mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just like
VIRTIO_NET_F_GUEST_CSUM
but certain values in the header are then disallowed? Which?
This should be in the spec.Yes, I think it is probably the headers that
DATA_VALIDcan work. We
never define it in the past.E.g in the Linux we map
DATA_VALIDtoCHECKSUM_UNNECESSARY, but it can
only work for some specific protocols:"""
* %CHECKSUM_UNNECESSARY is applicable to following
protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may applyCHECKSUM_UNNECESSARYto a
* zero UDP checksum for either IPv4 or IPv6, the
networking stack
* may perform further validation in this case.
* - GRE: only if the checksum is present in the
header.
* - SCTP: indicates the CRC in SCTP header has been
validated.
* - FCOE: indicates the CRC in FC frame has been
validated.
"""Quoted 4 lines
Quoted 3 lines
I'm not sure whether it's just fine to duplicate the definition or
it's too late to define any now.I think it's mostly harmless for other protocols.
I'm not sure if this should be defined by a new
FULL_CSUMfeature.
This seems to be an issue withGUEST_CSUM.Quoted 8 lines
Quoted 2 lines
I think we should supplement these with a new patch for
GUEST_CSUM?Probably. My understanding is:
You want to reuse
DATA_VALIDhere, so we need to stick to a consistent
semantic forGUEST_CUSMandFULL_CSUM. So we need a definition of "full csum" or what kind of packet couldDATA_VALIDwork here.I agree, we can be clear about what types of packets
DATA_VALIDmight
cover, e.g. TCP/UDP/GRE/SCTP/FoCE.But I think we also need something like \field{supported_validate_types} to
indicate which packet types the device supports validating and settingDATA_VALID,
otherwise the device driver that negotiates this feature may fail to live
migration.
Am I right?I'm not sure how
GUEST_CSUMworks now as it should also suffer from the
above
mentioned issues with live migration, but no devices are reporting this
right now.Maybe, each device only supports checksum verification for TCP/UDP by
default? I don't know.
But I hope we can focus on this and get consensus, because our hw release
date is coming soon.Quoted 4 lines
Quoted 3 lines
Quoted 1 line
Thanks a lot!
First,
DATA_VALIDis not a thing that hardware should ever use. It's a hack when packets are passed within host.Get here. Thanks!
So if I understand correctly, we need a new flag here and define the supported protocols.
Quoted 6 lines
Quoted 1 line
For what, migration?
No.
It's basically a question of whether or not we want to reuse
DATA_VALID. It has limitations that it only works for some specific protocols.Yes, I understand what Xuan means is that we reuse
DATA_VALIDand advertise
what specific protocolsDATA_VALIDcovers.Quoted 8 lines
Back to
supported_validate_types, now I think we really don't need to let the device
provide this field. Why? Because asssuming the device provides it, it seems useless
because the driver does not parse the protocol type for each packet and does not use this field.
The driver and stack just want to know whether the packet is valid or checksum unneccessary.
Quoted 3 lines
Hi Jason and Michael.
Are we aligned on this?
For supported_validate_types, I don't think we need it.
But I'm not sure if we are aligned.
Quoted 3 lines
If yes, I'll write a new version to refresh the thread and try to avoid future rollbacks.
Maybe you can post a new version.
Thanks
Quoted 29 lines
Thanks a lot!
Quoted 25 lines
Thanks!
Quoted 4 lines
If we don't, we need a new flag.
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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
If somebody explains the problem that this patch addresses it will be very, _very_ helpful.
We _were_ sure that if the host suggests VIRTIO_NET_F_GUEST_CSUM and the driver acks it - they both can do _more_ than without this feature. Specifically the driver claims that it is able to deal with additional types of incoming packets and such a way the device is able to provide _more_ types of incoming packets than if this feature is not acked.. Shall we change our mind somehow?
I believe that if due to the presence of this feature the driver is _not_ able to do something this is a bug somewhere around the driver, isn't it? Thank you in advance for the clarification.
Quoted 360 lines · Jason Wang
Quoted 229 lines · Heng Qi
Quoted 225 lines · Heng Qi
Quoted 222 lines · Jason Wang
Quoted 220 lines · Xuan Zhuo
Quoted 218 lines · Jason Wang
Quoted 216 lines · Heng Qi
Quoted 213 lines · Michael S. Tsirkin
Quoted 212 lines · Heng Qi
Quoted 211 lines · Jason Wang
Quoted 209 lines · Heng Qi
Quoted 200 lines · Michael S. Tsirkin
Quoted 199 lines · Jason Wang
On Mon, Dec 4, 2023 at 4:53 PM Michael S. Tsirkin
<[email protected]> wrote:
On Mon, Dec 04, 2023 at 04:49:46PM +0800, Jason Wang wrote:
On Mon, Dec 4, 2023 at 3:37 PM Heng Qi
<[email protected]> wrote:
在 2023/12/4 下午3:18, Jason Wang 写道:
On Fri, Dec 1, 2023 at 3:16 PM Heng Qi
<[email protected]> wrote:
在 2023/12/1 下午3:05, Jason Wang 写道:
On Fri, Dec 1, 2023 at 2:30 PM Heng Qi
<[email protected]> wrote:
在 2023/12/1 下午2:24, Heng Qi 写道:
在 2023/12/1 下午1:18, Jason Wang 写道:
On Wed, Nov 29, 2023 at 4:23 PM Heng Qi
<[email protected]>
wrote:
在 2023/11/29 下午4:00, Jason Wang 写道:
On Tue, Nov 28, 2023 at 4:08 PM Heng Qi
<[email protected]>
wrote:
To prevent readers from misunderstanding that
the driver can
only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUM is negotiated, we update
the description.Signed-off-by: Heng Qi <[email protected]
---
device-types/net/description.tex | 2 +-
1 file changed, 1 insertion(+), 1
deletion(-)diff --git a/device-types/net/description.tex
b/device-types/net/description.tex
index aff5e08..529f470 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -38,7 +38,7 @@ \subsection{Feature
bits}\label{sec:Device Types
/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles
packets with
partial checksum offload.-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver
handles packets with
partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver
handles packets with
partial checksum or full checksum.
So patch 2 said"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver
handles packets with
full checksum.
\end{description}
"Is there any difference between the two "full
checksum" here?
There's no difference.The core is that VIRTIO_NET_F_GUEST_FULL_CSUM
means that the driver
"can
only" handle packets with full checksum.
This seems to be odd.Driver can always handle packet with full checksum,
no?
Yes.I meant it
will be then to be functional equivalent to !
VIRTIO_NET_F_GUEST_FULL_CSUM?
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?
Sorry, this is a typo. I meantAre you referring to
"functional equivalent to
!VIRTIO_NET_F_GUEST_FULL_CSUM" ?If so, I think it's no.
Maybe a description similar to the following would
be more clearer:+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver
does not handle
packets with partial checksum.
I may miss something here, but what's the difference
betweenVIRTIO_NET_F_GUEST_FULL_CSUM
and
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:If !VIRTIO_NET_F_GUEST_CSUM, the device delivers
packets with full
checksum to the driver,
but the device can not validate the checksum for these
packets. That is,
the flags in virtio-net-hdr
will not contain _DATA_VALID, and the driver or stack
needs to validate
these packets.If VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers
packets with full
checksum to the driver,
and the device can validate the checksum for these
packets. That is, the
flags in virtio-net-hdr
will contain _DATA_VALID,
I think DATA_VALID is optional here as device can't
recognize all type
of protocols.
Yes, you are right, so I used "device *can*" here. Which
packet types
the device recognizes or validates
depends on the device's implementation. This is also the
current
practice of GUEST_CSUM.and the driver or stack does not need to
validate these packets.
Ok, so I think there're something that is subtle here,
Ok, I see.and that's why
I'm asking here:1) "Driver does not handle packets with partial
checksum" is not
accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind
of ambiguous as
it doesn't say whether or not the packet has been
validated or not.
Maybe the description below would be less subtle?
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles
packets with partial
checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue
since even
with DATA_VALID. Did you?+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver
handles packets
with full checksum,
and the device optionally validates the packet's checksum.
Or maybe something like (not a native speaker)The driver handles packets with full checksum which the
device has
already validated.Thanks
I feel we just need a proper definition of what does "full
checksum"
mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just like
VIRTIO_NET_F_GUEST_CSUM
but certain values in the header are then disallowed? Which?
This should be in the spec.
Yes, I think it is probably the headers that DATA_VALID can
work. We
never define it in the past.E.g in the Linux we map DATA_VALID to CHECKSUM_UNNECESSARY,
but it can
only work for some specific protocols:"""
* %CHECKSUM_UNNECESSARY is applicable to following
protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may apply
CHECKSUM_UNNECESSARY to a
* zero UDP checksum for either IPv4 or IPv6, the
networking stack
* may perform further validation in this case.
* - GRE: only if the checksum is present in the
header.
* - SCTP: indicates the CRC in SCTP header has been
validated.
* - FCOE: indicates the CRC in FC frame has been
validated.
"""Quoted 4 lines
Quoted 3 lines
I'm not sure whether it's just fine to duplicate the
definition or
it's too late to define any now.I think it's mostly harmless for other protocols.
I'm not sure if this should be defined by a new
FULL_CSUMfeature.
This seems to be an issue withGUEST_CSUM.Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
I think we should supplement these with a new patch for
GUEST_CSUM?Probably. My understanding is:
You want to reuse
DATA_VALIDhere, so we need to stick to a consistent
semantic forGUEST_CUSMandFULL_CSUM. So we need a definitionof
Quoted 56 lines
Quoted 47 lines
Quoted 36 lines
Quoted 36 lines
Quoted 35 lines
Quoted 29 lines
Quoted 29 lines
Quoted 29 lines
Quoted 1 line
"full csum" or what kind of packet could
DATA_VALIDwork here.I agree, we can be clear about what types of packets
DATA_VALIDmight
cover, e.g. TCP/UDP/GRE/SCTP/FoCE.But I think we also need something like \field{supported_validate_types} to
indicate which packet types the device supports validating and settingDATA_VALID,
otherwise the device driver that negotiates this feature may fail to live
migration.
Am I right?I'm not sure how
GUEST_CSUMworks now as it should also suffer from the
above
mentioned issues with live migration, but no devices are reporting this
right now.Maybe, each device only supports checksum verification for TCP/UDP by
default? I don't know.
But I hope we can focus on this and get consensus, because our hw release
date is coming soon.Quoted 4 lines
Quoted 3 lines
Quoted 1 line
Thanks a lot!
First,
DATA_VALIDis not a thing that hardware should ever use. It's a hack when packets are passed within host.Get here. Thanks!
So if I understand correctly, we need a new flag here and define the supported protocols.
Quoted 6 lines
Quoted 1 line
For what, migration?
No.
It's basically a question of whether or not we want to reuse
DATA_VALID. It has limitations that it only works for some specific protocols.Yes, I understand what Xuan means is that we reuse
DATA_VALIDand advertise
what specific protocolsDATA_VALIDcovers.Quoted 8 lines
Back to
supported_validate_types, now I think we really don't need to let the device
provide this field. Why? Because asssuming the device provides it, it seems useless
because the driver does not parse the protocol type for each packet and does not use this field.
The driver and stack just want to know whether the packet is valid or checksum unneccessary.Quoted 3 lines
Hi Jason and Michael.
Are we aligned on this?
For
supported_validate_types, I don't think we need it.But I'm not sure if we are aligned.
Quoted 3 lines
If yes, I'll write a new version to refresh the thread and try to avoid future rollbacks.
Maybe you can post a new version.
Thanks
Quoted 24 lines
Thanks a lot!
Quoted 21 lines
Thanks!
Quoted 4 lines
If we don't, we need a new flag.
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
Quoted 5 lines
Quoted 4 lines
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/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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 7 lines · Yuri Benditovich
If somebody explains the problem that this patch addresses it will be very, _very_ helpful.
We _were_ sure that if the host suggestsVIRTIO_NET_F_GUEST_CSUMand the driver acks it - they both can do _more_ than without this feature. Specifically the driver claims that it is able to deal with additional types of incoming packets and such a way the device is able to provide _more_ types of incoming packets than if this feature is not acked..
Hi Yuir.
Why do you think this patch will change that..?
What types of packets a driver or device can handle will *not change* with this patch.
We only tell the device that when GUEST_FULL_CSUM is negotiated, the device *must not* submit *TCP/UDP*[1] partially checksummed packets to the driver.
It would be better if the device can also help the driver verify the checksum (just like GUEST_CSUM). The matter of identifying or verifying packets has never changed with this patch.
[1]
If the VIRTIO_NET_F_GUEST_CSUM feature has been negotiated, the device MAY set the VIRTIO_NET_HDR_F_NEEDS_CSUM bit inflags, if so:
1. the device MUST validate the packet checksum at offsetcsum_offsetfromcsum_startas well as all preceding offsets;
2. the device MUST set the packet checksum stored in the receive buffer to the *TCP/UDP* pseudo header;
3. the device MUST setcsum_startandcsum_offsetsuch that calculating a ones’ complement checksum fromcsum_startup until the end of the packet and storing the result at offsetcsum_offsetfromcsum_startwill result in a fully checksummed packet;
Thanks.
Quoted 5 lines
Shall we change our mind somehow?
I believe that if due to the presence of this feature the driver is _not_ able to do something this is a bug somewhere around the driver, isn't it? Thank you in advance for the clarification.
Quoted 346 lines
Quoted 344 lines · Jason Wang
Quoted 225 lines · Heng Qi
Quoted 222 lines · Heng Qi
Quoted 220 lines · Jason Wang
Quoted 218 lines · Xuan Zhuo
Quoted 216 lines · Jason Wang
Quoted 214 lines · Heng Qi
Quoted 212 lines · Michael S. Tsirkin
Quoted 211 lines · Heng Qi
Quoted 210 lines · Jason Wang
Quoted 208 lines · Heng Qi
Quoted 203 lines · Michael S. Tsirkin
On Mon, Dec 04, 2023 at 04:59:49PM +0800, Jason Wang wrote:
On Mon, Dec 4, 2023 at 4:53 PM Michael S. Tsirkin
<[email protected]> wrote:
On Mon, Dec 04, 2023 at 04:49:46PM +0800, Jason Wang wrote:
On Mon, Dec 4, 2023 at 3:37 PM Heng Qi
<[email protected]> wrote:
在 2023/12/4 下午3:18, Jason Wang 写道:
On Fri, Dec 1, 2023 at 3:16 PM Heng Qi
<[email protected]> wrote:
在 2023/12/1 下午3:05, Jason Wang 写道:
On Fri, Dec 1, 2023 at 2:30 PM Heng Qi
<[email protected]> wrote:
在 2023/12/1 下午2:24, Heng Qi 写道:
在 2023/12/1 下午1:18, Jason Wang 写道:
On Wed, Nov 29, 2023 at 4:23 PM Heng Qi
<[email protected]>
wrote:
在 2023/11/29 下午4:00, Jason Wang 写道:
On Tue, Nov 28, 2023 at 4:08 PM Heng Qi
<[email protected]>
wrote:
To prevent readers from misunderstanding that
the driver can
only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUM is negotiated, we update
the description.Signed-off-by: Heng Qi <[email protected]
---
device-types/net/description.tex | 2 +-
1 file changed, 1 insertion(+), 1
deletion(-)diff --git a/device-types/net/description.tex
b/device-types/net/description.tex
index aff5e08..529f470 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -38,7 +38,7 @@ \subsection{Feature
bits}\label{sec:Device Types
/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles
packets with
partial checksum offload.-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver
handles packets with
partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver
handles packets with
partial checksum or full checksum.
So patch 2 said"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver
handles packets with
full checksum.
\end{description}
"Is there any difference between the two "full
checksum" here?
There's no difference.The core is that VIRTIO_NET_F_GUEST_FULL_CSUM
means that the driver
"can
only" handle packets with full checksum.
This seems to be odd.Driver can always handle packet with full checksum,
no?
Yes.I meant it
will be then to be functional equivalent to !
VIRTIO_NET_F_GUEST_FULL_CSUM?
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?
Sorry, this is a typo. I meantAre you referring to
"functional equivalent to
!VIRTIO_NET_F_GUEST_FULL_CSUM" ?If so, I think it's no.
Maybe a description similar to the following would
be more clearer:+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver
does not handle
packets with partial checksum.
I may miss something here, but what's the difference
betweenVIRTIO_NET_F_GUEST_FULL_CSUM
and
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:If !VIRTIO_NET_F_GUEST_CSUM, the device delivers
packets with full
checksum to the driver,
but the device can not validate the checksum for these
packets. That is,
the flags in virtio-net-hdr
will not contain _DATA_VALID, and the driver or stack
needs to validate
these packets.If VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers
packets with full
checksum to the driver,
and the device can validate the checksum for these
packets. That is, the
flags in virtio-net-hdr
will contain _DATA_VALID,
I think DATA_VALID is optional here as device can't
recognize all type
of protocols.
Yes, you are right, so I used "device *can*" here. Which
packet types
the device recognizes or validates
depends on the device's implementation. This is also the
current
practice of GUEST_CSUM.and the driver or stack does not need to
validate these packets.
Ok, so I think there're something that is subtle here,
Ok, I see.and that's why
I'm asking here:1) "Driver does not handle packets with partial
checksum" is not
accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind
of ambiguous as
it doesn't say whether or not the packet has been
validated or not.
Maybe the description below would be less subtle?
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles
packets with partial
checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue
since even
with DATA_VALID. Did you?+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver
handles packets
with full checksum,
and the device optionally validates the packet's checksum.
Or maybe something like (not a native speaker)The driver handles packets with full checksum which the
device has
already validated.Thanks
I feel we just need a proper definition of what does "full
checksum"
mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just like
VIRTIO_NET_F_GUEST_CSUM
but certain values in the header are then disallowed? Which?
This should be in the spec.
Yes, I think it is probably the headers that DATA_VALID can
work. We
never define it in the past.E.g in the Linux we map DATA_VALID to CHECKSUM_UNNECESSARY,
but it can
only work for some specific protocols:"""
* %CHECKSUM_UNNECESSARY is applicable to following
protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may apply
CHECKSUM_UNNECESSARY to a
* zero UDP checksum for either IPv4 or IPv6, the
networking stack
* may perform further validation in this case.
* - GRE: only if the checksum is present in the
header.
* - SCTP: indicates the CRC in SCTP header has been
validated.
* - FCOE: indicates the CRC in FC frame has been
validated.
"""I'm not sure whether it's just fine to duplicate the
definition or
it's too late to define any now.
I think it's mostly harmless for other protocols.I'm not sure if this should be defined by a new
FULL_CSUMfeature.
This seems to be an issue withGUEST_CSUM.Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
I think we should supplement these with a new patch for
GUEST_CSUM?Probably. My understanding is:
You want to reuse
DATA_VALIDhere, so we need to stick to a consistent
semantic forGUEST_CUSMandFULL_CSUM. So we need a definitionof
Quoted 53 lines
Quoted 45 lines
Quoted 33 lines
Quoted 33 lines
Quoted 33 lines
Quoted 33 lines
Quoted 29 lines
Quoted 29 lines
Quoted 1 line
"full csum" or what kind of packet could
DATA_VALIDwork here.I agree, we can be clear about what types of packets
DATA_VALIDmight
cover, e.g. TCP/UDP/GRE/SCTP/FoCE.But I think we also need something like \field{supported_validate_types} to
indicate which packet types the device supports validating and settingDATA_VALID,
otherwise the device driver that negotiates this feature may fail to live
migration.
Am I right?I'm not sure how
GUEST_CSUMworks now as it should also suffer from the
above
mentioned issues with live migration, but no devices are reporting this
right now.Maybe, each device only supports checksum verification for TCP/UDP by
default? I don't know.
But I hope we can focus on this and get consensus, because our hw release
date is coming soon.Quoted 3 lines
Quoted 1 line
Thanks a lot!
First,
DATA_VALIDis not a thing that hardware should ever use. It's a hack when packets are passed within host.Get here. Thanks!
Quoted 8 lines
Quoted 3 lines
Quoted 2 lines
So if I understand correctly, we need a new flag here and define the supported protocols.
For what, migration?
No.
It's basically a question of whether or not we want to reuse
DATA_VALID. It has limitations that it only works for some specific protocols.Yes, I understand what Xuan means is that we reuse
DATA_VALIDand advertise
what specific protocolsDATA_VALIDcovers.Quoted 8 lines
Back to
supported_validate_types, now I think we really don't need to let the device
provide this field. Why? Because asssuming the device provides it, it seems useless
because the driver does not parse the protocol type for each packet and does not use this field.
The driver and stack just want to know whether the packet is valid or checksum unneccessary.Quoted 3 lines
Hi Jason and Michael.
Are we aligned on this?
For
supported_validate_types, I don't think we need it.But I'm not sure if we are aligned.
Quoted 2 lines
If yes, I'll write a new version to refresh the thread and try to avoid future rollbacks.
Maybe you can post a new version.
Thanks
Quoted 20 lines
Thanks a lot!
Quoted 18 lines
Thanks!
Quoted 3 lines
If we don't, we need a new flag.
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
Quoted 4 lines
Quoted 4 lines
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/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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 11 lines · Heng Qi
Quoted 7 lines · Yuri Benditovich
If somebody explains the problem that this patch addresses it will be very, _very_ helpful.
We _were_ sure that if the host suggestsVIRTIO_NET_F_GUEST_CSUMand the driver acks it - they both can do _more_ than without this feature. Specifically the driver claims that it is able to deal with additional types of incoming packets and such a way the device is able to provide _more_ types of incoming packets than if this feature is not acked..
Quoted 1 line
Hi Yuir.
Hi Yuri.
Sorry! It's a typo.
Quoted 385 lines
Why do you think this patch will change that..?
What types of packets a driver or device can handle will *not change* with this patch.We only tell the device that when
GUEST_FULL_CSUMis negotiated, the device *must not* submit *TCP/UDP*[1] partially checksummed packets to the driver.
It would be better if the device can also help the driver verify the checksum (just likeGUEST_CSUM). The matter of identifying or verifying packets has never changed with this patch.[1]
If the
VIRTIO_NET_F_GUEST_CSUMfeature has been negotiated, the device MAY set theVIRTIO_NET_HDR_F_NEEDS_CSUMbit inflags, if so:1. the device MUST validate the packet checksum at
offsetcsum_offsetfromcsum_startaswell as all preceding offsets;
2. the device MUST set the packet checksum stored in the receive buffer to the *TCP/UDP* pseudo header;
3. the device MUSTsetcsum_startandcsum_offsetsuchthat calculating a ones’ complement checksumfromcsum_startupuntil the end of the packet and storing the result atoffsetcsum_offsetfromcsum_startwillresult in a fully checksummed packet;Thanks.
Quoted 5 lines
Shall we change our mind somehow?
I believe that if due to the presence of this feature the driver is _not_ able to do something this is a bug somewhere around the driver, isn't it? Thank you in advance for the clarification.Quoted 346 lines
Quoted 344 lines · Jason Wang
Quoted 225 lines · Heng Qi
Quoted 222 lines · Heng Qi
Quoted 220 lines · Jason Wang
Quoted 218 lines · Xuan Zhuo
Quoted 216 lines · Jason Wang
Quoted 214 lines · Heng Qi
Quoted 212 lines · Michael S. Tsirkin
Quoted 211 lines · Heng Qi
Quoted 210 lines · Jason Wang
Quoted 208 lines · Heng Qi
在 2023/12/4 下午5:05, Michael S. Tsirkin 写道:
On Mon, Dec 04, 2023 at 04:59:49PM +0800, Jason Wang wrote:
On Mon, Dec 4, 2023 at 4:53 PM Michael S. Tsirkin
<[email protected]> wrote:
On Mon, Dec 04, 2023 at 04:49:46PM +0800, Jason Wang wrote:
On Mon, Dec 4, 2023 at 3:37 PM Heng Qi
<[email protected]> wrote:
在 2023/12/4 下午3:18, Jason Wang 写道:
On Fri, Dec 1, 2023 at 3:16 PM Heng Qi
<[email protected]> wrote:
在 2023/12/1 下午3:05, Jason Wang 写道:
On Fri, Dec 1, 2023 at 2:30 PM Heng Qi
<[email protected]> wrote:
在 2023/12/1 下午2:24, Heng Qi 写道:
在 2023/12/1 下午1:18, Jason Wang 写道:
On Wed, Nov 29, 2023 at 4:23 PM Heng Qi
<[email protected]>
wrote:
在 2023/11/29 下午4:00, Jason Wang 写道:
On Tue, Nov 28, 2023 at 4:08 PM Heng Qi
<[email protected]>
wrote:
To prevent readers from misunderstanding that
the driver can
only handles packets with partial checksum when
VIRTIO_NET_F_GUEST_CSUM is negotiated, we update
the description.Signed-off-by: Heng Qi <[email protected]
---
device-types/net/description.tex | 2 +-
1 file changed, 1 insertion(+), 1
deletion(-)diff --git a/device-types/net/description.tex
b/device-types/net/description.tex
index aff5e08..529f470 100644
--- a/device-types/net/description.tex
+++ b/device-types/net/description.tex
@@ -38,7 +38,7 @@ \subsection{Feature
bits}\label{sec:Device Types
/ Network Device / Feature bits
\begin{description}
\item[VIRTIO_NET_F_CSUM (0)] Device handles
packets with
partial checksum offload.-\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver
handles packets with
partial checksum.
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver
handles packets with
partial checksum or full checksum.
So patch 2 said"
+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver
handles packets with
full checksum.
\end{description}
"Is there any difference between the two "full
checksum" here?
There's no difference.The core is that VIRTIO_NET_F_GUEST_FULL_CSUM
means that the driver
"can
only" handle packets with full checksum.
This seems to be odd.Driver can always handle packet with full checksum,
no?
Yes.I meant it
will be then to be functional equivalent to !
VIRTIO_NET_F_GUEST_FULL_CSUM?
Are you referring to
"functional equivalent to !VIRTIO_NET_F_GUEST_CSUM" ?
Sorry, this is a typo. I meantAre you referring to
"functional equivalent to
!VIRTIO_NET_F_GUEST_FULL_CSUM" ?If so, I think it's no.
Maybe a description similar to the following would
be more clearer:+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] Driver
does not handle
packets with partial checksum.
I may miss something here, but what's the difference
betweenVIRTIO_NET_F_GUEST_FULL_CSUM
and
!VIRTIO_NET_F_GUEST_CSUM?
From the device perspective:If !VIRTIO_NET_F_GUEST_CSUM, the device delivers
packets with full
checksum to the driver,
but the device can not validate the checksum for these
packets. That is,
the flags in virtio-net-hdr
will not contain _DATA_VALID, and the driver or stack
needs to validate
these packets.If VIRTIO_NET_F_GUEST_FULL_CSUM, the device delivers
packets with full
checksum to the driver,
and the device can validate the checksum for these
packets. That is, the
flags in virtio-net-hdr
will contain _DATA_VALID,
I think DATA_VALID is optional here as device can't
recognize all type
of protocols.
Yes, you are right, so I used "device *can*" here. Which
packet types
the device recognizes or validates
depends on the device's implementation. This is also the
current
practice of GUEST_CSUM.and the driver or stack does not need to
validate these packets.
Ok, so I think there're something that is subtle here,
Ok, I see.and that's why
I'm asking here:1) "Driver does not handle packets with partial
checksum" is not
accurate, !GUEST_CUSM also fit for this definition.
2) "Driver handles packets with full checksum" is kind
of ambiguous as
it doesn't say whether or not the packet has been
validated or not.
Maybe the description below would be less subtle?
+\item[VIRTIO_NET_F_GUEST_CSUM (1)] Driver handles
packets with partial
checksum or full checksum.
I'd suggest to leave it as is. As I didn't find any issue
since even
with DATA_VALID. Did you?+\item[VIRTIO_NET_F_GUEST_FULL_CSUM (64)] The driver
handles packets
with full checksum,
and the device optionally validates the packet's checksum.
Or maybe something like (not a native speaker)The driver handles packets with full checksum which the
device has
already validated.Thanks
I feel we just need a proper definition of what does "full
checksum"
mean in this context. It is used but not defined.
Assume this feature was negotiated.
My understanding is that this is just like
VIRTIO_NET_F_GUEST_CSUM
but certain values in the header are then disallowed? Which?
This should be in the spec.
Yes, I think it is probably the headers that DATA_VALID can
work. We
never define it in the past.E.g in the Linux we map DATA_VALID to CHECKSUM_UNNECESSARY,
but it can
only work for some specific protocols:"""
* %CHECKSUM_UNNECESSARY is applicable to following
protocols:
*
* - TCP: IPv6 and IPv4.
* - UDP: IPv4 and IPv6. A device may apply
CHECKSUM_UNNECESSARY to a
* zero UDP checksum for either IPv4 or IPv6, the
networking stack
* may perform further validation in this case.
* - GRE: only if the checksum is present in the
header.
* - SCTP: indicates the CRC in SCTP header has been
validated.
* - FCOE: indicates the CRC in FC frame has been
validated.
"""I'm not sure whether it's just fine to duplicate the
definition or
it's too late to define any now.
I think it's mostly harmless for other protocols.
I'm not sure if this should be defined by a new FULL_CSUM
feature.
This seems to be an issue with GUEST_CSUM.Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
I think we should supplement these with a new patch for
GUEST_CSUM?Probably. My understanding is:
You want to reuse
DATA_VALIDhere, so we need to stick to a consistent
semantic forGUEST_CUSMandFULL_CSUM. So we need a definitionof
Quoted 53 lines
Quoted 45 lines
Quoted 33 lines
Quoted 33 lines
Quoted 33 lines
Quoted 33 lines
Quoted 29 lines
Quoted 29 lines
Quoted 1 line
"full csum" or what kind of packet could
DATA_VALIDwork here.I agree, we can be clear about what types of packets
DATA_VALIDmight
cover, e.g. TCP/UDP/GRE/SCTP/FoCE.But I think we also need something like \field{supported_validate_types} to
indicate which packet types the device supports validating and settingDATA_VALID,
otherwise the device driver that negotiates this feature may fail to live
migration.
Am I right?I'm not sure how
GUEST_CSUMworks now as it should also suffer from the
above
mentioned issues with live migration, but no devices are reporting this
right now.Maybe, each device only supports checksum verification for TCP/UDP by
default? I don't know.
But I hope we can focus on this and get consensus, because our hw release
date is coming soon.Quoted 3 lines
Quoted 1 line
Thanks a lot!
First,
DATA_VALIDis not a thing that hardware should ever use. It's a hack when packets are passed within host.Get here. Thanks!
Quoted 8 lines
Quoted 3 lines
Quoted 2 lines
So if I understand correctly, we need a new flag here and define the supported protocols.
For what, migration?
No.
It's basically a question of whether or not we want to reuse
DATA_VALID. It has limitations that it only works for some specific protocols.Yes, I understand what Xuan means is that we reuse
DATA_VALIDand advertise
what specific protocolsDATA_VALIDcovers.Quoted 8 lines
Back to
supported_validate_types, now I think we really don't need to let the device
provide this field. Why? Because asssuming the device provides it, it seems useless
because the driver does not parse the protocol type for each packet and does not use this field.
The driver and stack just want to know whether the packet is valid or checksum unneccessary.Quoted 3 lines
Hi Jason and Michael.
Are we aligned on this?
For
supported_validate_types, I don't think we need it.But I'm not sure if we are aligned.
Quoted 2 lines
If yes, I'll write a new version to refresh the thread and try to avoid future rollbacks.
Maybe you can post a new version.
Thanks
Quoted 20 lines
Thanks a lot!
Quoted 18 lines
Thanks!
Quoted 3 lines
If we don't, we need a new flag.
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
Quoted 4 lines
Quoted 4 lines
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/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/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.
Quoted 8 lines
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/
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
In reply to Heng QiQuoted 12 lines · Heng Qi
Quoted 7 lines · Yuri Benditovich
If somebody explains the problem that this patch addresses it will be very, _very_ helpful.
We _were_ sure that if the host suggestsVIRTIO_NET_F_GUEST_CSUMand the driver acks it - they both can do _more_ than without this feature. Specifically the driver claims that it is able to deal with additional types of incoming packets and such a way the device is able to provide _more_ types of incoming packets than if this feature is not acked..
Quoted 5 lines
Hi Yuir.
Why do you think this patch will change that..?
What types of packets a driver or device can handle will *not change* with this patch.
Well, I think the confusion came from you wanting to modify the definition of VIRTIO_NET_F_GUEST_CSUM.
As discussed, there's no issue with the current definition:
When VIRTIO_NET_F_GUEST_CSUM is negotiated and DATA_VALID is set, the checksum is still partial.
Or did you see any?
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Quoted 11 lines · Jason Wang
Quoted 10 lines · Heng Qi
Quoted 7 lines · Yuri Benditovich
If somebody explains the problem that this patch addresses it will be very, _very_ helpful.
We _were_ sure that if the host suggestsVIRTIO_NET_F_GUEST_CSUMand the driver acks it - they both can do _more_ than without this feature. Specifically the driver claims that it is able to deal with additional types of incoming packets and such a way the device is able to provide _more_ types of incoming packets than if this feature is not acked..
Quoted 7 lines
Quoted 5 lines
Hi Yuir.
Why do you think this patch will change that..?
What types of packets a driver or device can handle will *not change* with this patch.Well, I think the confusion came from you wanting to modify the definition of
VIRTIO_NET_F_GUEST_CSUM.
As we discussed, modifications to the GUEST_CSUM definition will be removed in the next version.
Quoted 4 lines
As discussed, there's no issue with the current definition:
When
VIRTIO_NET_F_GUEST_CSUMis negotiated andDATA_VALIDis set, the checksum is still partial.
I'm confused about this sentence.
DATA_VALID will not appear in a packet together with a partial checksum.
I think what you are saying is that partial checksum means CHECKSUM_UNNECESSARY.
Thanks!
Quoted 4 lines
Or did you see any?
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/
Re: [virtio-comment] Re: [PATCH v4 1/2] virtio-net: update description for VIRTIO_NET_F_GUEST_CSUM.
Hi all.
Because there are already many V4 threads and valid opinions collected! For the review experience of maintainers, v5 is refreshed[1], please review.
[1] https://lists.oasis-open.org/archives/virtio-comment/202312/msg00069.html
Thanks!
Quoted 50 lines · Heng Qi
Quoted 11 lines · Jason Wang
Quoted 10 lines · Heng Qi
Quoted 7 lines · Yuri Benditovich
If somebody explains the problem that this patch addresses it will be very, _very_ helpful.
We _were_ sure that if the host suggestsVIRTIO_NET_F_GUEST_CSUMand the driver acks it - they both can do _more_ than without this feature. Specifically the driver claims that it is able to deal with additional types of incoming packets and such a way the device is able to provide _more_ types of incoming packets than if this feature is not acked..Quoted 7 lines
Quoted 5 lines
Hi Yuir.
Why do you think this patch will change that..?
What types of packets a driver or device can handle will *not change* with this patch.Well, I think the confusion came from you wanting to modify the definition of
VIRTIO_NET_F_GUEST_CSUM.As we discussed, modifications to the
GUEST_CSUMdefinition will be removed in the next version.Quoted 4 lines
As discussed, there's no issue with the current definition:
When
VIRTIO_NET_F_GUEST_CSUMis negotiated andDATA_VALIDis set, the checksum is still partial.I'm confused about this sentence.
DATA_VALIDwill not appear in a packet together with a partial checksum.I think what you are saying is that partial checksum means
CHECKSUM_UNNECESSARY.Thanks!
Quoted 4 lines
Or did you see any?
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.
Quoted 8 lines
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/
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/