lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 19 Nov 2012 18:44:21 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	"Michael S. Tsirkin" <mst@...hat.com>
CC:	Rusty Russell <rusty@...tcorp.com.au>,
	Jason Wang <jasowang@...hat.com>, <davem@...emloft.net>,
	<virtualization@...ts.linux-foundation.org>,
	<linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
	<krkumar2@...ibm.com>, <kvm@...r.kernel.org>, <edumazet@...gle.com>
Subject: Re: [rfc net-next v6 2/3] virtio_net: multiqueue support

On Sun, 2012-11-18 at 11:13 +0200, Michael S. Tsirkin wrote:
> On Sat, Nov 17, 2012 at 12:35:29AM +0000, Ben Hutchings wrote:
> > 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.
> 
> Problem is, it could in theory be different between rings. I guess we
> could use the maximum.
> 
> What's the right thing to do for rx_pending - I am guessing
> we want the current outstanding packets right?

The 'max_pending' fields are for the maximum ring sizes supported; the
'pending' fields are for the current ring sizes.  The current number of
descriptors pending is not included (would be a bit pointless).

Ben.

-- 
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.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ