linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tiwei Bie <tiwei.bie@intel.com>
To: David Laight <David.Laight@ACULAB.COM>
Cc: "mst@redhat.com" <mst@redhat.com>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	"wexu@redhat.com" <wexu@redhat.com>,
	"jfreimann@redhat.com" <jfreimann@redhat.com>
Subject: Re: [PATCH RFC 1/2] virtio: introduce packed ring defines
Date: Tue, 27 Feb 2018 19:31:39 +0800	[thread overview]
Message-ID: <20180227113138.4untitgk6ufnatvb@debian> (raw)
In-Reply-To: <e7a7f045b87a420a8863030b9378cb38@AcuMS.aculab.com>

On Tue, Feb 27, 2018 at 09:26:27AM +0000, David Laight wrote:
> From: Tiwei Bie
> > Sent: 23 February 2018 11:18
> ...
> > +struct vring_packed_desc_event {
> > +	/* Descriptor Event Offset */
> > +	__virtio16 desc_event_off   : 15,
> > +	/* Descriptor Event Wrap Counter */
> > +		   desc_event_wrap  : 1;
> > +	/* Descriptor Event Flags */
> > +	__virtio16 desc_event_flags : 2;
> > +};
> 
> This looks like you are assuming that a bit-field has a defined
> layout and can be used to map a 'hardware' structure.
> The don't, don't use them like that.
> 
> 	David
> 

Thanks for the comments! Above definition isn't used in
this RFC, and the corresponding parts (event suppression)
haven't been implemented yet. It's more like some pseudo
code (I should add some comments about this in the code).

I planned to change it to something like this in the next
version:

struct vring_packed_desc_event {
	__virtio16 off_wrap;
	__virtio16 flags;  // XXX maybe not a good name for future
};                         // extension. Only 2bits are used now.

But it seems that I had a misunderstanding about the spec
on this previously:

https://lists.oasis-open.org/archives/virtio-dev/201802/msg00173.html

Anyway, it will be addressed. Thank you very much! ;-)

Best regards,
Tiwei Bie

  reply	other threads:[~2018-02-27 11:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-23 11:17 [PATCH RFC 0/2] Packed ring for virtio Tiwei Bie
2018-02-23 11:18 ` [PATCH RFC 1/2] virtio: introduce packed ring defines Tiwei Bie
2018-02-27  8:54   ` Jens Freimann
2018-02-27  9:18     ` Jens Freimann
2018-02-27 12:01     ` Tiwei Bie
2018-02-27 20:28     ` Michael S. Tsirkin
2018-02-27  9:26   ` David Laight
2018-02-27 11:31     ` Tiwei Bie [this message]
2018-02-23 11:18 ` [PATCH RFC 2/2] virtio_ring: support packed ring Tiwei Bie
2018-03-16  4:03   ` Jason Wang
2018-03-16  6:10     ` Tiwei Bie
2018-03-16  6:44       ` Jason Wang
2018-03-16  7:40         ` Tiwei Bie
2018-03-16  8:34           ` Jason Wang
2018-03-16 10:04             ` Tiwei Bie
2018-03-16 11:36               ` Jason Wang
2018-03-16 14:30                 ` Michael S. Tsirkin
2018-03-21  7:35                   ` Tiwei Bie
2018-03-21  7:30                 ` Tiwei Bie
  -- strict thread matches above, loose matches on Subject: below --
2018-02-14  2:37 [PATCH RFC 0/2] Packed ring for vhost Jason Wang
2018-02-14  2:37 ` [PATCH RFC 1/2] virtio: introduce packed ring defines Jason Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180227113138.4untitgk6ufnatvb@debian \
    --to=tiwei.bie@intel.com \
    --cc=David.Laight@ACULAB.COM \
    --cc=jasowang@redhat.com \
    --cc=jfreimann@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wexu@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).