lkml.org 
[lkml]   [2012]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [rfc net-next v6 2/3] virtio_net: multiqueue support
From
Date
On Tue, 2012-11-13 at 08:40 +0200, Michael S. Tsirkin wrote:
> 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.

So far as I know, all current implementations use the number of
descriptors per ring here. virtio_net should be consistent with this.

Ben.

> > For bonus points, check this assertion at probe time.
>
> Looks like we can easily support different queues too.
>

--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.



\
 
 \ /
  Last update: 2012-11-17 02:21    [W:0.366 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site