← Prev in month ← Prev in thread

Re: [virtio-comment] content: RSC extension support for virtio-net

From
Yuri Benditovich <>
Date
2018-11-02T07:57:56+00:00
ID
Thread
Re: [virtio-comment] content: RSC extension support for virtio-net
As no objections received, is it possible to initiate the ballot?

Thanks,

Yuri Benditovich

On Mon, Oct 15, 2018 at 12:41 PM Yuri Benditovich <> wrote:

Allocates feature bit for extended RSC (receive

side coalescing) support. If the device supports

this feature, it is able to process duplicated

ACKs and report number of coalesced TCP segments

amd number of received duplicated ACKs.

Fixes: https://github.com/oasis-tcs/virtio-spec/issues/20

Signed-off-by: Yuri Benditovich <>

---

Âcontent.tex | 39 ++++++++++++++++++++++++++++++---------

Â1 file changed, 30 insertions(+), 9 deletions(-)

diff --git a/content.tex b/content.tex

index be18234..17d83af 100644

--- a/content.tex

+++ b/content.tex

@@ -2525,6 +2525,10 @@ features.

Â\item[VIRTIO_NET_F_CTRL_MAC_ADDR(23)] Set MAC address through control

  Âchannel.

+

+\item[VIRTIO_NET_F_RSC_EXT(38)] Device can process duplicated ACKs

+Â Â and report number of coalesced segments and duplicated ACKs

+

Â\end{description}

Â\subsubsection{Feature bit requirements}\label{sec:Device Types / Network Device / Feature bits / Feature bit requirements}

@@ -2548,6 +2552,7 @@ Some networking feature bits require other networking feature bits

Â\item[VIRTIO_NET_F_GUEST_ANNOUNCE] Requires VIRTIO_NET_F_CTRL_VQ.

Â\item[VIRTIO_NET_F_MQ] Requires VIRTIO_NET_F_CTRL_VQ.

Â\item[VIRTIO_NET_F_CTRL_MAC_ADDR] Requires VIRTIO_NET_F_CTRL_VQ.

+\item[VIRTIO_NET_F_RSC_EXT] Requires VIRTIO_NET_F_HOST_TSO4 or VIRTIO_NET_F_HOST_TSO6.

Â\end{description}

Â\subsubsection{Legacy Interface: Feature bits}\label{sec:Device Types / Network Device / Feature bits / Legacy Interface: Feature bits}

@@ -2716,6 +2721,7 @@ itself is preceded by a header:

Âstruct virtio_net_hdr {

Â#define VIRTIO_NET_HDR_F_NEEDS_CSUMÂ Â 1

Â#define VIRTIO_NET_HDR_F_DATA_VALIDÂ Â 2

+#define VIRTIO_NET_HDR_F_RSC_INFOÂ Â Â 4

    Âu8 flags;

Â#define VIRTIO_NET_HDR_GSO_NONEÂ Â Â Â 0

Â#define VIRTIO_NET_HDR_GSO_TCPV4Â Â Â Â1

@@ -2879,8 +2885,8 @@ been negotiated, the driver SHOULD set \field{hdr_len} to a value

Ânot less than the length of the headers, including the transport

Âheader.

-The driver MUST NOT set the VIRTIO_NET_HDR_F_DATA_VALID bit in

-\field{flags}.

+The driver MUST NOT set the VIRTIO_NET_HDR_F_DATA_VALID and

+VIRTIO_NET_HDR_F_RSC_INFO bits in \field{flags}.

Â\devicenormative{\paragraph}{Packet Transmission}{Device Types / Network Device / Device Operation / Packet Transmission}

ÂThe device MUST ignore \field{flag} bits that it does not recognize.

@@ -2996,18 +3002,25 @@ transmit segmentation offloading and ECN features, as described

Âin \ref{sec:Device Types / Network Device / Device Operation /

ÂPacket Transmission}:

Â\begin{enumerate}

+\item If the VIRTIO_NET_F_GUEST_TSO4, TSO6 or UFO options were

+Â negotiated, then \field{gso_type} MAY be something other than

+Â VIRTIO_NET_HDR_GSO_NONE, and \field{gso_size} field indicates the

+Â desired MSS (see Packet Transmission point 2).

+\item If the VIRTIO_NET_F_RSC_EXT option was negotiated (this

+Â implies one of VIRTIO_NET_F_GUEST_TSO4, TSO6), the

+Â device processes also duplicated ACK segments, reports

+Â 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

 Â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

 Âhave been validated. The checksum on the packet is incomplete and

-Â \field{csum_start} and \field{csum_offset} indicate how to calculate

-Â it (see Packet Transmission point 1).

+Â if bit VIRTIO_NET_HDR_F_RSC_INFO is not set in \field{flags},

+Â then \field{csum_start} and \field{csum_offset} indicate how to calculate it

+Â (see Packet Transmission point 1).

-\item If the VIRTIO_NET_F_GUEST_TSO4, TSO6 or UFO options were

-Â negotiated, then \field{gso_type} MAY be something other than

-Â VIRTIO_NET_HDR_GSO_NONE, and \field{gso_size} field indicates the

-Â desired MSS (see Packet Transmission point 2).

Â\end{enumerate}

Â\devicenormative{\paragraph}{Processing of Incoming Packets}{Device Types / Network Device / Device Operation / Processing of Incoming Packets}

@@ -3072,6 +3085,13 @@ VIRTIO_NET_HDR_GSO_NONE.

ÂIf \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

+set VIRTIO_NET_HDR_F_RSC_INFO bit in \field{flags},

+set \field{csum_start} to number of coalesced TCP segments and

+set \field{csum_offset} to number of received duplicated ACK segments.

+

+If VIRTIO_NET_F_RSC_EXT was not negotiated, the device MUST

+not set VIRTIO_NET_HDR_F_RSC_INFO bit in \field{flags}.

ÂIf one of the VIRTIO_NET_F_GUEST_TSO4, TSO6 or UFO options have

Âbeen negotiated, the device SHOULD set \field{hdr_len} to a value

@@ -3090,7 +3110,8 @@ Processing of Incoming Packets}

ÂThe driver MUST ignore \field{flag} bits that it does not recognize.

-If VIRTIO_NET_HDR_F_NEEDS_CSUM bit in \field{flags} is not set, the

+If VIRTIO_NET_HDR_F_NEEDS_CSUM bit in \field{flags} is not set or

+if VIRTIO_NET_HDR_F_RSC_INFO bit \field{flags} is set, the

Âdriver MUST NOT use the \field{csum_start} and \field{csum_offset}.

ÂIf one of the VIRTIO_NET_F_GUEST_TSO4, TSO6 or UFO options have

-- 

2.17.0
← Prev in month ← Prev in thread