Return-Path: Sender: List-Post: List-Help: List-Unsubscribe: List-Subscribe: Received: from lists.oasis-open.org (oasis-open.org [10.110.1.242]) by lists.oasis-open.org (Postfix) with ESMTP id 2D072986590 for ; Thu, 4 Aug 2022 17:37:34 +0000 (UTC) From: Cyril Germond Date: Thu, 4 Aug 2022 19:37:30 +0200 (CEST) Message-ID: <001a01d8a828$df564200$9e02c600$@kalray.eu> MIME-Version: 1.0 Subject: [virtio-comment] [PATCH] virtio-net : Fix virtio_net_hdr struct size when VIRTIO_NET_F_HASH_REPORT feature is negociated. Content-Type: multipart/alternative; boundary=secu_2cdf897643e8f20c1a7f2f19dbe8fc1f_part1 Content-Language: en-us To: virtio-comment@lists.oasis-open.org List-ID: --secu_2cdf897643e8f20c1a7f2f19dbe8fc1f_part1 Content-Type: text/plain; charset=utf-8 content.tex | 4 ++-- split-ring.tex | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/content.tex b/content.tex index e863709..263cb05 100644 --- a/content.tex +++ b/content.tex @@ -3620,8 +3620,8 @@ \subsubsection{Setting Up Receive Buffers}\label{sec:Device Types / Network Devi features are used, the maximum incoming packet will be to 65550 bytes long (the maximum size of a TCP or UDP packet, plus the 14 byte ethernet header), otherwise -1514 bytes. The 12-byte struct virtio_net_hdr is prepended to this, -making for 65562 or 1526 bytes. +1514 bytes. The 12-byte (or 16-byte if VIRTIO_NET_F_HASH_REPORT feature has been negotiated) struct virtio_net_hdr is prepended to this, +making for 65562 or 1526 bytes (respectively 65566 and 1530 bytes if VIRTIO_NET_F_HASH_REPORT has been negotiated). \drivernormative{\paragraph}{Setting Up Receive Buffers}{Device Types / Network Device / Device Operation / Setting Up Receive Buffers} diff --git a/split-ring.tex b/split-ring.tex index de94038..e6953d7 100644 --- a/split-ring.tex +++ b/split-ring.tex @@ -128,10 +128,10 @@ \subsection{Legacy Interfaces: A Note on Virtqueue Endianness}\label{sec:Basic F \subsection{Message Framing}\label{sec:Basic Facilities of a Virtio Device / Virtqueues / Message Framing} The framing of messages with descriptors is independent of the contents of the buffers. For example, a network -transmit buffer consists of a 12 byte header followed by the network +transmit buffer consists of a 12 (or 16 if VIRTIO_NET_F_HASH_REPORT feature has been negociated) byte header followed by the network packet. This could be most simply placed in the descriptor table as a -12 byte output descriptor followed by a 1514 byte output descriptor, -but it could also consist of a single 1526 byte output descriptor in +12 (or 16) byte output descriptor followed by a 1514 byte output descriptor, +but it could also consist of a single 1526 (or 1530) byte output descriptor in the case where the header and packet are adjacent, or even three or more descriptors (possibly with loss of efficiency in that case). --secu_2cdf897643e8f20c1a7f2f19dbe8fc1f_part1 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

content.tex    | 4 ++--

split-ring.tex | 6 +++---

2 files ch= anged, 5 insertions(+), 5 deletions(-)

 <= /o:p>

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

index e863709..263cb05 100644

--- a/content.tex

+++ b/content.tex

@@ -3620,8 +3620,8 @@ \= subsubsection{Setting Up Receive Buffers}\label{sec:Device Types / Network = Devi

features are used, the maximum incoming packe= t

will be to 65550 bytes long (the maximum size of= a

TCP or UDP packet, plus the 14 byte ethernet he= ader), otherwise

-1514 bytes.  The 12-byte str= uct virtio_net_hdr is prepended to this,

-making fo= r 65562 or 1526 bytes.

+1514 bytes.  The 12-by= te (or 16-byte if VIRTIO_NET_F_HASH_REPORT feature has been negotiated) str= uct virtio_net_hdr is prepended to this,

+making fo= r 65562 or 1526 bytes (respectively 65566 and 1530 bytes if VIRTIO_NET_F_HA= SH_REPORT has been negotiated).

 

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

 

diff --git a/split-ring.tex b/split-ring.tex

index= de94038..e6953d7 100644

--- a/split-ring.tex

+++ b/split-ring.tex

@@ -128,10 = +128,10 @@ \subsection{Legacy Interfaces: A Note on Virtqueue Endianness}\l= abel{sec:Basic F

\subsection{Message Framing}\labe= l{sec:Basic Facilities of a Virtio Device / Virtqueues / Message Framing}

The framing of messages with descriptors is

independent of the contents of the buffers. For example, = a network

-transmit buffer consists of a 12 byte he= ader followed by the network

+transmit buffer consi= sts of a 12 (or 16 if VIRTIO_NET_F_HASH_REPORT feature has been negociated)= byte header followed by the network

packet. This = could be most simply placed in the descriptor table as a

-12 byte output descriptor followed by a 1514 byte output descriptor,=

-but it could also consist of a single 1526 byte o= utput descriptor in

+12 (or 16) byte output descrip= tor followed by a 1514 byte output descriptor,

+but= it could also consist of a single 1526 (or 1530) byte output descriptor in=

the case where the header and packet are adjacent= , or even three or

more descriptors (possibly with= loss of efficiency in that case).

 

--secu_2cdf897643e8f20c1a7f2f19dbe8fc1f_part1--