From: "Michael S. Tsirkin" <mst@redhat.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: krkumar2@in.ibm.com, kvm@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org, edumazet@google.com,
davem@davemloft.net
Subject: Re: [rfc net-next v6 2/3] virtio_net: multiqueue support
Date: Tue, 13 Nov 2012 08:40:26 +0200 [thread overview]
Message-ID: <20121113064026.GA27416@redhat.com> (raw)
In-Reply-To: <87y5igyhyg.fsf@rustcorp.com.au>
On Mon, Nov 05, 2012 at 11:38:39AM +1030, Rusty Russell wrote:
> > @@ -924,11 +1032,10 @@ static void virtnet_get_ringparam(struct net_device *dev,
> > {
> > struct virtnet_info *vi = netdev_priv(dev);
> >
> > - ring->rx_max_pending = virtqueue_get_vring_size(vi->rvq);
> > - ring->tx_max_pending = virtqueue_get_vring_size(vi->svq);
> > + ring->rx_max_pending = virtqueue_get_vring_size(vi->rq[0].vq);
> > + ring->tx_max_pending = virtqueue_get_vring_size(vi->sq[0].vq);
> > ring->rx_pending = ring->rx_max_pending;
> > ring->tx_pending = ring->tx_max_pending;
> > -
> > }
>
> This assumes all vqs are the same size. I think this should probably
> check: for mq mode, use the first vq, otherewise use the 0th.
For rx_pending/tx_pending I think what is required here is the
actual number of outstanding buffers.
Dave, Eric - right?
So this should be the total over all rings and to be useful,
rx_max_pending/tx_max_pending should be the total too.
> For bonus points, check this assertion at probe time.
Looks like we can easily support different queues too.
--
MST
WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jason Wang <jasowang@redhat.com>,
davem@davemloft.net, virtualization@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
krkumar2@in.ibm.com, kvm@vger.kernel.org, edumazet@google.com
Subject: Re: [rfc net-next v6 2/3] virtio_net: multiqueue support
Date: Tue, 13 Nov 2012 08:40:26 +0200 [thread overview]
Message-ID: <20121113064026.GA27416@redhat.com> (raw)
In-Reply-To: <87y5igyhyg.fsf@rustcorp.com.au>
On Mon, Nov 05, 2012 at 11:38:39AM +1030, Rusty Russell wrote:
> > @@ -924,11 +1032,10 @@ static void virtnet_get_ringparam(struct net_device *dev,
> > {
> > struct virtnet_info *vi = netdev_priv(dev);
> >
> > - ring->rx_max_pending = virtqueue_get_vring_size(vi->rvq);
> > - ring->tx_max_pending = virtqueue_get_vring_size(vi->svq);
> > + ring->rx_max_pending = virtqueue_get_vring_size(vi->rq[0].vq);
> > + ring->tx_max_pending = virtqueue_get_vring_size(vi->sq[0].vq);
> > ring->rx_pending = ring->rx_max_pending;
> > ring->tx_pending = ring->tx_max_pending;
> > -
> > }
>
> This assumes all vqs are the same size. I think this should probably
> check: for mq mode, use the first vq, otherewise use the 0th.
For rx_pending/tx_pending I think what is required here is the
actual number of outstanding buffers.
Dave, Eric - right?
So this should be the total over all rings and to be useful,
rx_max_pending/tx_max_pending should be the total too.
> For bonus points, check this assertion at probe time.
Looks like we can easily support different queues too.
--
MST
next prev parent reply other threads:[~2012-11-13 6:40 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-30 10:03 [rfc net-next v6 0/3] Multiqueue virtio-net Jason Wang
2012-10-30 10:03 ` Jason Wang
2012-10-30 10:03 ` [rfc net-next v6 1/3] virtio_net: Introduce VIRTIO_NET_F_MULTIQUEUE Jason Wang
2012-10-30 10:03 ` Jason Wang
2012-10-30 10:03 ` [rfc net-next v6 2/3] virtio_net: multiqueue support Jason Wang
2012-10-30 10:03 ` Jason Wang
2012-11-04 23:16 ` Rusty Russell
2012-11-04 23:16 ` Rusty Russell
2012-11-19 6:18 ` Jason Wang
2012-11-19 6:18 ` Jason Wang
2012-11-05 1:08 ` Rusty Russell
2012-11-05 1:08 ` Rusty Russell
2012-11-13 6:40 ` Michael S. Tsirkin [this message]
2012-11-13 6:40 ` Michael S. Tsirkin
2012-11-17 0:35 ` Ben Hutchings
2012-11-17 0:35 ` Ben Hutchings
2012-11-18 9:13 ` Michael S. Tsirkin
2012-11-18 9:13 ` Michael S. Tsirkin
2012-11-19 18:44 ` Ben Hutchings
2012-11-19 18:44 ` Ben Hutchings
2012-11-19 7:40 ` Jason Wang
2012-11-19 7:40 ` Jason Wang
2012-10-30 10:03 ` [rfc net-next v6 3/3] virtio-net: change the number of queues through ethtool Jason Wang
2012-10-30 10:03 ` Jason Wang
2012-11-04 23:46 ` Rusty Russell
2012-11-04 23:46 ` Rusty Russell
2012-11-19 6:22 ` Jason Wang
2012-11-19 6:22 ` Jason Wang
2012-11-08 21:13 ` Ben Hutchings
2012-11-08 21:13 ` Ben Hutchings
2012-10-30 19:05 ` [rfc net-next v6 0/3] Multiqueue virtio-net Rick Jones
2012-10-30 19:05 ` Rick Jones
2012-10-31 10:33 ` Jason Wang
2012-10-31 10:33 ` 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=20121113064026.GA27416@redhat.com \
--to=mst@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=krkumar2@in.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--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.