RE: [virtio-dev] Re: [PATCH v3] virtio-net: support the virtqueue coalescing moderation

2023-02-17 Thread Parav Pandit
> From: Heng Qi > Sent: Friday, February 17, 2023 12:17 PM > Yes, but there seems to be such a situation: when the device is reactivated, > as > the specification says, all parameters are set to 0 (use parameters as the > default > configuration on the device). > When CTRL_COAL_SET and

Re: [virtio-dev] Re: [PATCH v3] virtio-net: support the virtqueue coalescing moderation

2023-02-17 Thread Heng Qi
On Fri, Feb 17, 2023 at 04:12:34PM +, Parav Pandit wrote: > > > From: Michael S. Tsirkin > > Sent: Friday, February 17, 2023 6:35 AM > > > > We mention the device reset case, but nothing about VQ reset. > > > > > > I feel that no matter how we handle this, we break something. > > > > > >

[virtio-dev] Re: [virtio-comment] Re: [virtio-dev] Re: [virtio-comment] [PATCH v3] virtio-net: support the virtqueue coalescing moderation

2023-02-17 Thread Heng Qi
在 2023/2/17 下午6:07, Michael S. Tsirkin 写道: On Fri, Feb 17, 2023 at 11:40:15AM +0200, Alvaro Karsz wrote: Maybe we can use struct virtio_net_ctrl_coal inside struct virtio_net_ctrl_coal_vq instead of repeating max_usecs and max_packets? I'm not sure if it would be confusing, what do you think?

Re: [virtio-dev] Re: [virtio-comment] Re: [virtio-dev] Re: [PATCH v8] virtio-net: support inner header hash

2023-02-17 Thread Heng Qi
在 2023/2/18 上午12:24, Parav Pandit 写道: From: virtio-dev@lists.oasis-open.org On Behalf Of Heng Qi [..] We assume that hash_report_tunnel_types is still present in the next version, I am little lost. Hi, Parav. You are not lost. I'm just answering some of Michael's questions and making

RE: [virtio-dev] Re: [virtio-comment] Re: [virtio-dev] Re: [PATCH v8] virtio-net: support inner header hash

2023-02-17 Thread Parav Pandit
> From: virtio-dev@lists.oasis-open.org On > Behalf Of Heng Qi [..] > We assume that hash_report_tunnel_types is still present in the next version, I am little lost. I thought we all agreed that reporting just the tunnel type in data path path virtio_net_hdr is not useful to sw. And hence

RE: [virtio-dev] Re: [PATCH v3] virtio-net: support the virtqueue coalescing moderation

2023-02-17 Thread Parav Pandit
> From: Michael S. Tsirkin > Sent: Friday, February 17, 2023 6:35 AM > > We mention the device reset case, but nothing about VQ reset. > > > > I feel that no matter how we handle this, we break something. > > > > Having default coalescing values may collide with "Upon reset, a > > device MUST

RE: [virtio-dev] Re: [PATCH v3] virtio-net: support the virtqueue coalescing moderation

2023-02-17 Thread Parav Pandit
> From: Alvaro Karsz > Sent: Friday, February 17, 2023 7:18 AM > I wonder if some of that should be included in my patch. > Most of that is not relevant before introducing the per vq command. > So maybe I could just mention in the device conformance that: > "Coalescing parameters MUST/SHOULD

[virtio-dev] RE: [PATCH v1 5/6] transport-mmio: Correct spelling errors

2023-02-17 Thread Parav Pandit
> From: Michael S. Tsirkin > Sent: Friday, February 17, 2023 5:27 AM > To: Parav Pandit > Cc: virtio-dev@lists.oasis-open.org; coh...@redhat.com; virtio- > comm...@lists.oasis-open.org; Shahaf Shuler > Subject: Re: [PATCH v1 5/6] transport-mmio: Correct spelling errors > > On Fri, Feb 17,

RE: [virtio-dev] Re: [virtio-comment] [PATCH v3] virtio-net: support the virtqueue coalescing moderation

2023-02-17 Thread Parav Pandit
> From: Michael S. Tsirkin > Sent: Friday, February 17, 2023 5:07 AM > > > #1 > > > struct virtio_net_ctrl_coal { > > > le32 max_packets; > > > le32 max_usecs; > > > }; > > > > > > struct virtio_net_ctrl_coal_vq { > > > le16 vqn; > > > le16 reserved; > > > struct

[virtio-dev] [PATCH v2 4/6] transport-pci: Correct spelling errors

2023-02-17 Thread Parav Pandit
Now that we have individual files, fix reported spelling errors. While at it, remove trailing white spaces. Signed-off-by: Parav Pandit --- changelog: v0->v1: - removed many trailing white spaces --- transport-pci.tex | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

[virtio-dev] [PATCH v2 1/6] transport-pci: Split PCI transport to its own file

2023-02-17 Thread Parav Pandit
Place PCI transport specification in its own file to better maintain it. Fixes: https://github.com/oasis-tcs/virtio-spec/issues/157 Signed-off-by: Parav Pandit --- content.tex | 1161 + transport-pci.tex | 1160

[virtio-dev] [PATCH v2 5/6] transport-mmio: Correct spelling errors

2023-02-17 Thread Parav Pandit
Now that we have individual files, fix reported spelling errors. While at it, remove trailing white spaces. Signed-off-by: Parav Pandit --- changelog: v0->v1: - removed many trailing white spaces --- transport-mmio.tex | 90 +++--- 1 file changed, 45

[virtio-dev] [PATCH v2 3/6] transport-ccw: Split Channel IO transport to its own file

2023-02-17 Thread Parav Pandit
Place Channel IO transport specification in its own file to better maintain it. Fixes: https://github.com/oasis-tcs/virtio-spec/issues/157 Signed-off-by: Parav Pandit --- changelog: v1->v2: - renamed file to transport-ccw.tex --- content.tex | 603

[virtio-dev] [PATCH v2 6/6] transport-ccw: Correct spelling errors

2023-02-17 Thread Parav Pandit
Now that we have individual files, fix reported spelling errors. While at it, remove extra white spaces. Signed-off-by: Parav Pandit --- changelog: v1->v2: - remove trailing white spaces --- transport-ccw.tex | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[virtio-dev] [PATCH v2 0/6] Split transport specific files

2023-02-17 Thread Parav Pandit
Problem statement: Currently several tens of pages worth of transport specification is situated in single file. Many parts of the specification are already maintained in separate files. Such separate files enables better maintenance of the specification overall. Solution: Follow the approach

[virtio-dev] [PATCH v2 2/6] transport-mmio: Split MMIO transport to its own file

2023-02-17 Thread Parav Pandit
Place MMIO transport specification in its own file to better maintain it. Fixes: https://github.com/oasis-tcs/virtio-spec/issues/157 Signed-off-by: Parav Pandit --- content.tex| 554 + transport-mmio.tex | 552

[virtio-dev] [PATCH v3 2/2] virtio-net: Define cfg fields before description

2023-02-17 Thread Parav Pandit
Currently some fields of the virtio_net_config structure are defined before introducing the structure and some are defined after introducing virtio_net_config. Better to define the configuration layout first followed by description of all the fields. Device configuration fields are described in

[virtio-dev] [PATCH v3 1/2] virtio-net: Describe dev cfg fields read only

2023-02-17 Thread Parav Pandit
Device configuration fields are read only. Avoid duplicating this description for multiple fields. Instead describe it one time and do it in the driver requirements section. Fixes: https://github.com/oasis-tcs/virtio-spec/issues/161 Signed-off-by: Parav Pandit --- changelog: v2->v3: - split as

[virtio-dev] [PATCH v3 0/2] virtio-net: Improve dev config layout

2023-02-17 Thread Parav Pandit
This two patches improve dev configuration layout in two ways. 1. Define device configuration layout before describing it fields 2. Avoid duplicate description of its read only fields and whole layout Patch summary: patch-1: consolidate read only field at one place in driver requirements

Re: [virtio-dev] Re: [PATCH v8] virtio-net: support inner header hash

2023-02-17 Thread Michael S. Tsirkin
On Thu, Feb 16, 2023 at 10:11:58PM +0800, Heng Qi wrote: > > > 在 2023/2/16 下午7:59, Michael S. Tsirkin 写道: > > On Thu, Feb 16, 2023 at 03:20:17PM +0800, Heng Qi wrote: > > > > > > 在 2023/2/14 上午6:20, Michael S. Tsirkin 写道: > > > > On Wed, Feb 08, 2023 at 05:08:36PM +0800, Heng Qi wrote: > > > >

[virtio-dev] RE: [PATCH v2] virtio-net: Define configuration field layout before its description

2023-02-17 Thread Parav Pandit
> From: Michael S. Tsirkin > Sent: Friday, February 17, 2023 4:29 AM > > I think it's ok that this combines text movement and rewording. Splitting up > would have made very small patches. Yes. the description modified is linked to the structure change. Hence, it was in one patch. But will

[virtio-dev] RE: [PATCH v1 6/6] transport-channelio: Correct spelling errors

2023-02-17 Thread Parav Pandit
> From: Michael S. Tsirkin > Sent: Friday, February 17, 2023 4:15 AM > On Fri, Feb 17, 2023 at 03:30:08AM +0200, Parav Pandit wrote: > > Now that we have individual files, fix reported spelling errors. > > > > Signed-off-by: Parav Pandit > > Why not transport-ccw? We abbreviated pci and mmio

[virtio-dev] RE: [PATCH v3] virtio-net: support the virtqueue coalescing moderation

2023-02-17 Thread Parav Pandit
> From: Heng Qi > Sent: Friday, February 17, 2023 12:24 AM > I think there are two kinds of sequences: > #Seq1: > 1. vq is disabled (vq params are reset to max_packets = 0, max_usecs = 0) 2. > VQ_SET command arrives with max_packets=10, max_usecs = 8 3. vq is enabled > (vq params are

Re: [virtio-dev] Re: [PATCH v3] virtio-net: support the virtqueue coalescing moderation

2023-02-17 Thread Alvaro Karsz
> Not good. I feel we must come up with spec that is backwards compatible. > Hmm, maybe this is why Parav kept talking about modes. > I did not realize at the time, sorry Parav. > > I still feel modes are not the best way to describe things so I propose this: > - in addition to per vq parameters,

Re: [virtio-dev] Re: [PATCH v3] virtio-net: support the virtqueue coalescing moderation

2023-02-17 Thread Michael S. Tsirkin
On Fri, Feb 17, 2023 at 01:17:50PM +0200, Alvaro Karsz wrote: > > > Yes, max_packets and max_usecs SHOULD be reset to 0. > > > When the virtqueue is re-enabled, it means that notification conditions > > > are met after each packet is sent/received. > > > > > > As described by Alvaro in "[PATCH

Re: [virtio-dev] Re: [PATCH v3] virtio-net: support the virtqueue coalescing moderation

2023-02-17 Thread Alvaro Karsz
> > Yes, max_packets and max_usecs SHOULD be reset to 0. > > When the virtqueue is re-enabled, it means that notification conditions are > > met after each packet is sent/received. > > > > As described by Alvaro in "[PATCH v5] virtio-net: Fix and update > > VIRTIO_NET_F_NOTF_COAL feature": > >

[virtio-dev] Re: [PATCH v5] virtio-net: Fix and update VIRTIO_NET_F_NOTF_COAL feature

2023-02-17 Thread Michael S. Tsirkin
On Fri, Feb 17, 2023 at 12:36:32PM +0200, Alvaro Karsz wrote: > > sounds good. maybe "counting packets and microseconds"? to make clear > > timer resets too. > > > > > I don't really mind, If you think that the device implementation is > > > not essential here and we should add your suggestion,

[virtio-dev] Re: [PATCH v3] virtio-net: support the virtqueue coalescing moderation

2023-02-17 Thread Michael S. Tsirkin
On Fri, Feb 17, 2023 at 01:24:04PM +0800, Heng Qi wrote: > On Thu, Feb 16, 2023 at 11:17:48AM -0500, Michael S. Tsirkin wrote: > > On Thu, Feb 16, 2023 at 10:43:01PM +0800, Heng Qi wrote: > > > Currently coalescing parameters are grouped for all transmit and receive > > > virtqueues. This patch

[virtio-dev] Re: [PATCH v5] virtio-net: Fix and update VIRTIO_NET_F_NOTF_COAL feature

2023-02-17 Thread Alvaro Karsz
> sounds good. maybe "counting packets and microseconds"? to make clear > timer resets too. > > > I don't really mind, If you think that the device implementation is > > not essential here and we should add your suggestion, I'm ok with > > that. > > I don't mind, your proposal seems good too. Ok,

[virtio-dev] Re: [PATCH v5] virtio-net: Fix and update VIRTIO_NET_F_NOTF_COAL feature

2023-02-17 Thread Michael S. Tsirkin
On Fri, Feb 17, 2023 at 12:21:17PM +0200, Alvaro Karsz wrote: > > Looks good, thanks! Yet something to improve, see below: > > > --- > > > v2: > > > - Add the last 2 points to the patch. > > > - Rephrase the "commands are best-effort" note. > > > - Replace "notification" with

[virtio-dev] Re: [PATCH v1 5/6] transport-mmio: Correct spelling errors

2023-02-17 Thread Michael S. Tsirkin
On Fri, Feb 17, 2023 at 03:30:07AM +0200, Parav Pandit wrote: > Now that we have individual files, fix reported spelling errors. > > While at it, remove extra white space at end of line. > > Signed-off-by: Parav Pandit Hmm, pls don't do this "subject says A but commit log says also B and C".

[virtio-dev] Re: [PATCH v5] virtio-net: Fix and update VIRTIO_NET_F_NOTF_COAL feature

2023-02-17 Thread Alvaro Karsz
> Looks good, thanks! Yet something to improve, see below: > > --- > > v2: > > - Add the last 2 points to the patch. > > - Rephrase the "commands are best-effort" note. > > - Replace "notification" with "used buffer notification" to be > > more consistent. > > v3: > >

Re: [virtio-dev] Re: [virtio-comment] [PATCH v3] virtio-net: support the virtqueue coalescing moderation

2023-02-17 Thread Michael S. Tsirkin
On Fri, Feb 17, 2023 at 06:06:03PM +0800, Heng Qi wrote: > On Fri, Feb 17, 2023 at 11:40:15AM +0200, Alvaro Karsz wrote: > > > > Maybe we can use struct virtio_net_ctrl_coal inside struct > > > > virtio_net_ctrl_coal_vq instead of repeating max_usecs and > > > > max_packets? > > > > I'm not sure

Re: [virtio-dev] Re: [virtio-comment] [PATCH v3] virtio-net: support the virtqueue coalescing moderation

2023-02-17 Thread Michael S. Tsirkin
On Fri, Feb 17, 2023 at 11:40:15AM +0200, Alvaro Karsz wrote: > > > Maybe we can use struct virtio_net_ctrl_coal inside struct > > > virtio_net_ctrl_coal_vq instead of repeating max_usecs and > > > max_packets? > > > I'm not sure if it would be confusing, what do you think? > > > > > > > Hi

Re: [virtio-dev] Re: [virtio-comment] [PATCH v3] virtio-net: support the virtqueue coalescing moderation

2023-02-17 Thread Heng Qi
On Fri, Feb 17, 2023 at 11:40:15AM +0200, Alvaro Karsz wrote: > > > Maybe we can use struct virtio_net_ctrl_coal inside struct > > > virtio_net_ctrl_coal_vq instead of repeating max_usecs and > > > max_packets? > > > I'm not sure if it would be confusing, what do you think? > > > > > > > Hi

[virtio-dev] Re: [PATCH v3] virtio-net: support the virtqueue coalescing moderation

2023-02-17 Thread Michael S. Tsirkin
On Thu, Feb 16, 2023 at 10:43:01PM +0800, Heng Qi wrote: > Currently coalescing parameters are grouped for all transmit and receive > virtqueues. This patch supports setting or getting the parameters for a > specified virtqueue, and a typical application of this function is netdim[1]. > > When

[virtio-dev] Re: [PATCH v5] virtio-net: Fix and update VIRTIO_NET_F_NOTF_COAL feature

2023-02-17 Thread Michael S. Tsirkin
On Thu, Feb 16, 2023 at 04:56:11PM +0200, Alvaro Karsz wrote: > This patch makes several improvements to the notification coalescing > feature, including: > > - Consolidating virtio_net_ctrl_coal_tx and virtio_net_ctrl_coal_rx > into a single struct, virtio_net_ctrl_coal, as they are identical.

Re: [virtio-dev] Re: [virtio-comment] [PATCH v3] virtio-net: support the virtqueue coalescing moderation

2023-02-17 Thread Alvaro Karsz
> > Maybe we can use struct virtio_net_ctrl_coal inside struct > > virtio_net_ctrl_coal_vq instead of repeating max_usecs and > > max_packets? > > I'm not sure if it would be confusing, what do you think? > > > > Hi Alvaro. > > I guess you mean one of the following two forms: > > #1 > struct

Re: [virtio-dev] Re: [virtio-comment] [PATCH v3] virtio-net: support the virtqueue coalescing moderation

2023-02-17 Thread Heng Qi
On Fri, Feb 17, 2023 at 10:42:21AM +0200, Alvaro Karsz wrote: > Hi Heng, > > > +\item[VIRTIO_NET_F_VQ_NOTF_COAL(52)] Device supports the virtqueue > > +notifications coalescing. > > + > > \item[VIRTIO_NET_F_NOTF_COAL(53)] Device supports notifications coalescing. > > > >

[virtio-dev] Re: [PATCH v2] virtio-net: Define configuration field layout before its description

2023-02-17 Thread Michael S. Tsirkin
On Fri, Feb 17, 2023 at 01:20:42AM +, Parav Pandit wrote: > > > > From: Parav Pandit > > Sent: Wednesday, February 8, 2023 11:52 PM > > > > Currently some fields of the virtio_net_config structure are defined before > > introducing the structure and some are defined after introducing > >

[virtio-dev] Re: [PATCH v2] virtio-net: Define configuration field layout before its description

2023-02-17 Thread Michael S. Tsirkin
On Thu, Feb 09, 2023 at 06:52:28AM +0200, Parav Pandit wrote: > Currently some fields of the virtio_net_config structure are defined > before introducing the structure and some are defined after > introducing virtio_net_config. > Better to define the configuration layout first followed by >

[virtio-dev] Re: [PATCH v1 6/6] transport-channelio: Correct spelling errors

2023-02-17 Thread Michael S. Tsirkin
On Fri, Feb 17, 2023 at 03:30:08AM +0200, Parav Pandit wrote: > Now that we have individual files, fix reported spelling errors. > > Signed-off-by: Parav Pandit Why not transport-ccw? We abbreviated pci and mmio didn't we? > --- > transport-channelio.tex | 4 ++-- > 1 file changed, 2

[virtio-dev] Re: [virtio-comment] [PATCH v3] virtio-net: support the virtqueue coalescing moderation

2023-02-17 Thread Alvaro Karsz
Hi Heng, > +\item[VIRTIO_NET_F_VQ_NOTF_COAL(52)] Device supports the virtqueue > +notifications coalescing. > + > \item[VIRTIO_NET_F_NOTF_COAL(53)] Device supports notifications coalescing. > > \item[VIRTIO_NET_F_GUEST_USO4 (54)] Driver can receive USOv4 packets. > @@ -3140,6 +3143,7 @@