All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Paolo Bonzini <pbonzini@redhat.com>, linux-kernel@vger.kernel.org
Cc: Amit Shah <amit.shah@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	virtualization@lists.linux-foundation.org
Subject: Re: [RFC PATCH] virtio_console: link vq to port with a private pointer in struct virtqueue
Date: Tue, 08 May 2012 11:41:55 +0930	[thread overview]
Message-ID: <87397be80k.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1334756013-11752-1-git-send-email-pbonzini@redhat.com>

On Wed, 18 Apr 2012 15:33:33 +0200, Paolo Bonzini <pbonzini@redhat.com> wrote:
> For virtio-scsi multiqueue support I would like to have an easy and
> fast way to go from a virtqueue to the internal struct for that
> queue.
> 
> It turns out that virtio-serial has the same need, but it gets
> by with a simple list walk.
> 
> This patch adds a pointer to struct virtqueue that is reserved for
> the virtio device, and uses it in virtio-serial.

I ike the concept, but share Michael's concern with naming confusion.

How bad would be it to get rid of the current ->priv and use
container_of() instead?  ie. have virtio_pci, virtio_mmio, lguest_bus
and s390's kvm_virtio embed the struct virtqueue?

Thanks,
Rusty.

WARNING: multiple messages have this Message-ID (diff)
From: Rusty Russell <rusty@rustcorp.com.au>
To: Paolo Bonzini <pbonzini@redhat.com>, linux-kernel@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org,
	Amit Shah <amit.shah@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [RFC PATCH] virtio_console: link vq to port with a private pointer in struct virtqueue
Date: Tue, 08 May 2012 11:41:55 +0930	[thread overview]
Message-ID: <87397be80k.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1334756013-11752-1-git-send-email-pbonzini@redhat.com>

On Wed, 18 Apr 2012 15:33:33 +0200, Paolo Bonzini <pbonzini@redhat.com> wrote:
> For virtio-scsi multiqueue support I would like to have an easy and
> fast way to go from a virtqueue to the internal struct for that
> queue.
> 
> It turns out that virtio-serial has the same need, but it gets
> by with a simple list walk.
> 
> This patch adds a pointer to struct virtqueue that is reserved for
> the virtio device, and uses it in virtio-serial.

I ike the concept, but share Michael's concern with naming confusion.

How bad would be it to get rid of the current ->priv and use
container_of() instead?  ie. have virtio_pci, virtio_mmio, lguest_bus
and s390's kvm_virtio embed the struct virtqueue?

Thanks,
Rusty.

  parent reply	other threads:[~2012-05-08  2:11 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-18 13:33 [RFC PATCH] virtio_console: link vq to port with a private pointer in struct virtqueue Paolo Bonzini
2012-04-18 13:33 ` Paolo Bonzini
2012-04-18 14:21 ` Michael S. Tsirkin
2012-04-18 14:21   ` Michael S. Tsirkin
2012-04-18 14:34   ` Paolo Bonzini
2012-04-18 14:34     ` Paolo Bonzini
2012-04-18 16:10     ` Michael S. Tsirkin
2012-04-18 16:10       ` Michael S. Tsirkin
2012-04-18 18:38       ` Paolo Bonzini
2012-04-18 18:38         ` Paolo Bonzini
2012-04-18 18:48         ` Michael S. Tsirkin
2012-04-18 18:48           ` Michael S. Tsirkin
2012-04-19  6:21 ` Amit Shah
2012-04-19  6:21   ` Amit Shah
2012-05-08  2:11 ` Rusty Russell [this message]
2012-05-08  2:11   ` Rusty Russell
2012-05-08  6:43   ` Paolo Bonzini
2012-05-08  6:43     ` Paolo Bonzini
2012-05-08  9:45   ` Paolo Bonzini
2012-05-08  9:45     ` Paolo Bonzini
2012-05-08 10:18     ` Michael S. Tsirkin
2012-05-08 10:18       ` Michael S. Tsirkin
2012-05-10  1:26       ` Rusty Russell
2012-05-10  1:26         ` Rusty Russell
2012-05-10  6:02         ` Michael S. Tsirkin
2012-05-10  6:02           ` Michael S. Tsirkin
2012-05-08 10:56     ` [PATCH untested] virtio: allocate extra memory before the ring ( was Re: [RFC PATCH] virtio_console: link vq to port with a private) " Michael S. Tsirkin
2012-05-08 10:56       ` Michael S. Tsirkin
2012-05-08 11:06       ` Paolo Bonzini
2012-05-08 11:06         ` Paolo Bonzini
2012-05-08 11:53         ` Michael S. Tsirkin
2012-05-08 11:53           ` Michael S. Tsirkin
2012-05-08 11:34       ` Michael S. Tsirkin
2012-05-08 11:34         ` Michael S. Tsirkin

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=87397be80k.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=amit.shah@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.