From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: virtio-comment-return-1088-cohuck=redhat.com@lists.oasis-open.org 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 039E7985F65 for ; Thu, 20 Feb 2020 20:06:50 +0000 (UTC) Date: Thu, 20 Feb 2020 15:06:40 -0500 (EST) From: Yuri Benditovich Message-ID: <1218680489.7485583.1582229200015.JavaMail.zimbra@redhat.com> In-Reply-To: References: <20200219075337.23191-1-yuri.benditovich@daynix.com> <20200219075337.23191-2-yuri.benditovich@daynix.com> <86420fd1-cbb4-0105-4114-ca2d6cb3b8ff@redhat.com> <20200219092244-mutt-send-email-mst@kernel.org> <623f76be-bf87-c473-350e-87fe53b41261@redhat.com> <893990295.7352578.1582184463424.JavaMail.zimbra@redhat.com> MIME-Version: 1.0 Subject: Re: [virtio-comment] [PATCH v4 1/1] virtio-net: Define per-packet hash reporting feature Content-Type: multipart/alternative; boundary="----=_Part_7485582_875957582.1582229200014" To: Jason Wang Cc: "Michael S. Tsirkin" , Yuri Benditovich , virtio-comment@lists.oasis-open.org List-ID: ------=_Part_7485582_875957582.1582229200014 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable ----- Original Message ----- > From: "Jason Wang" > To: "Yuri Benditovich" > Cc: "Michael S. Tsirkin" , "Yuri Benditovich" > , virtio-comment@lists.oasis-open.org > Sent: Thursday, February 20, 2020 10:11:51 AM > Subject: Re: [virtio-comment] [PATCH v4 1/1] virtio-net: Define per-packe= t > hash reporting feature > On 2020/2/20 =E4=B8=8B=E5=8D=883:41, Yuri Benditovich wrote: > > > > > > -----------------------------------------------------------------------= - > > > > *From: *"Jason Wang" > > *To: *"Michael S. Tsirkin" > > *Cc: *"Yuri Benditovich" , > > virtio-comment@lists.oasis-open.org > > *Sent: *Thursday, February 20, 2020 8:38:50 AM > > *Subject: *Re: [virtio-comment] [PATCH v4 1/1] virtio-net: Define > > per-packet hash reporting feature > > > > > > On 2020/2/19 =E4=B8=8B=E5=8D=8810:23, Michael S. Tsirkin wrote: > > > On Wed, Feb 19, 2020 at 08:27:10PM +0800, Jason Wang wrote: > > >> On 2020/2/19 =E4=B8=8B=E5=8D=883:53, Yuri Benditovich wrote: > > >>> The device MUST set > > \field{rss_max_indirection_table_length} to at least 128, if it offers > > >>> VIRTIO_NET_F_RSS. > > >>> @@ -3195,6 +3180,8 @@ \subsection{Device > > Operation}\label{sec:Device Types / Network Device / Device O > > >>> le16 csum_start; > > >>> le16 csum_offset; > > >>> le16 num_buffers; > > >>> + le32 hash_value; (Only if VIRTIO_NET_F_HASH_REPORT > > negotiated) > > >>> + le16 hash_type; (Only if VIRTIO_NET_F_HASH_REPORT > > negotiated) > > >>> }; > > >>> \end{lstlisting} > > >> A question here: > > >> > > >> Consider we introduce VIRTIO_NET_F_FEATURE_INFORMATION in the > > future: > > >> > > >> le32 hash_type; // VIRTIO_NET_F_HASH_REPORT > > >> le32 feature_information; // VIRTIO_NET_F_FEATURE_INFORMATION > > >> > > >> What happens if HASH_REPORT is not negotiated, I believe we > > expect a stable > > >> ABI(offset) here for feature_information? > > >> > > >> Thanks > > >> > > > We'll have to decide at that point ... any better ideas? > > > > > > Not sure but something that is self descriptive? (which could be an > > overkill for fields that only need few bytes). > > > > The problem is that the driver typically wants to know the header size > > from the beginning to configure SG table. > Yes, so still the above example. Consider a driver only support > VIRTIO_NET_F_FEATURE_INFORMATION, how to determine the size of the vnet > header? > Stable offset is simpler but may waste space. > > So any self-descriptive layout seems good but in practice not so > > usable, IMO. > I think then it can calculate the header length based on the feature > negotiated. > hdr_len =3D sizeof(vnet_hdr) + VIRTIO_NET_F_HASH_REPORT ? 4 : 0 + > VIRTIO_NET_F_FEAUTER_INFORMATION ? 4 : 0 Also possible.=20 We'll need to define it as soon as we define in the spec the second feature= affecting packet size.=20 There is also another point raised by Michael some time ago: different pack= et layouts for TX and RX.=20 > 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: virtio-comment-subscribe@lists.oasis-open.org > Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org > List help: virtio-comment-help@lists.oasis-open.org > 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-l= ists > Committee: https://www.oasis-open.org/committees/virtio/ > Join OASIS: https://www.oasis-open.org/join/ ------=_Part_7485582_875957582.1582229200014 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable



To: "Yuri= Benditovich" <ybendito@redhat.com>
Cc: "Michael S. Tsirkin= " <mst@redhat.com>, "Yuri Benditovich" <yuri.benditovich@daynix.co= m>, virtio-comment@lists.oasis-open.org
Sent: Thursday, Februa= ry 20, 2020 10:11:51 AM
Subject: Re: [virtio-comment] [PATCH v4 1= /1] virtio-net: Define per-packet hash reporting feature

=
On 2020/2/20 =E4=B8=8B=E5=8D=883:41, Yuri Benditovich wrote:
>>
> -------------------------------------------------------------= -----------
>
>     *From: *"Jason Wang" <jasowang= @redhat.com>
>     *To: *"Michael S. Tsirkin" <mst@re= dhat.com>
>     *Cc: *"Yuri Benditovich" <yuri.bendit= ovich@daynix.com>,
>     virtio-comment@lists.oasis-open= .org
>     *Sent: *Thursday, February 20, 2020 8:38:50 AM>     *Subject: *Re: [virtio-comment] [PATCH v4 1/1] virtio-= net: Define
>     per-packet hash reporting feature
>=
>
>     On 2020/2/19 =E4=B8=8B=E5=8D=8810:23, Michae= l S. Tsirkin wrote:
>     > On Wed, Feb 19, 2020 at 08:2= 7:10PM +0800, Jason Wang wrote:
>     >> On 2020/2/19= =E4=B8=8B=E5=8D=883:53, Yuri Benditovich wrote:
>     >= >>    The device MUST set
>     \field{rss_= max_indirection_table_length} to at least 128, if it offers
>   =   >>>    VIRTIO_NET_F_RSS.
>     &g= t;>> @@ -3195,6 +3180,8 @@ \subsection{Device
>     O= peration}\label{sec:Device Types / Network Device / Device O
>  =   >>>            le16 csum_sta= rt;
>     >>>           &= nbsp;le16 csum_offset;
>     >>>     &nb= sp;      le16 num_buffers;
>     >>>= ; +        le32 hash_value; (Only if VIRTIO_NET_F_HASH_= REPORT
>     negotiated)
>     >>>= +        le16 hash_type;  (Only if VIRTIO_NET_F_H= ASH_REPORT
>     negotiated)
>     >>= >    };
>     >>>    \end{l= stlisting}
>     >> A question here:
>   &= nbsp; >>
>     >> Consider we introduce VIRTIO_= NET_F_FEATURE_INFORMATION in the
>     future:
> &nbs= p;   >>
>     >> le32 hash_type; // VIRTIO= _NET_F_HASH_REPORT
>     >> le32 feature_information;= // VIRTIO_NET_F_FEATURE_INFORMATION
>     >>
>=     >> What happens if HASH_REPORT is not negotiated, I be= lieve we
>     expect a stable
>     >&g= t; ABI(offset) here for feature_information?
>     >>=
>     >> Thanks
>     >>
&g= t;     > We'll have to decide at that point ... any better ide= as?
>
>
>     Not sure but something that is se= lf descriptive? (which could be an
>     overkill for field= s that only need few bytes).
>
> The problem is that the driver= typically wants to know the header size
> from the beginning to con= figure SG table.


Yes, so still the above example. Con= sider a driver only support
VIRTIO_NET_F_FEATURE_INFORMATION, how to de= termine the size of the vnet
header?

Stable offset is= simpler but may waste space.


> So any self-descri= ptive layout seems good but in practice not so
> usable, IMO.


I think then it can calculate the header length based on th= e feature
negotiated.

hdr_len =3D sizeof(vnet_hdr) + = VIRTIO_NET_F_HASH_REPORT ? 4 : 0 +
VIRTIO_NET_F_FEAUTER_INFORMATION ? 4= : 0
Also possible.
We'll need to define it= as soon as we define in the spec the second feature affecting packet size.=
There is also another point raised by Michael some time ago:= different packet layouts for TX and RX.

Thanks

<= br>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: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.p= df
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/


------=_Part_7485582_875957582.1582229200014--