Re: [Qemu-devel] [net-next RFC PATCH 4/7] tuntap: multiqueue support

2011-08-13 Thread Jason Wang
- Original Message - > On Fri, Aug 12, 2011 at 09:55:20AM +0800, Jason Wang wrote: > > With the abstraction that each socket were a backend of a > > queue for userspace, this patch adds multiqueue support for > > tap device by allowing multiple sockets to be attached to a > > tap device.

Re: [Qemu-devel] [net-next RFC PATCH 4/7] tuntap: multiqueue support

2011-08-13 Thread Jason Wang
- Original Message - > Le vendredi 12 août 2011 à 09:55 +0800, Jason Wang a écrit : > > >+ rxq = skb_get_rxhash(skb); > >+ if (rxq) { > >+ tfile = rcu_dereference(tun->tfiles[rxq % numqueues]); > >+ if (tfile) > >+ goto out; > >+ } > > You can avoid an expensive divide with following tr

Re: [Qemu-devel] [net-next RFC PATCH 4/7] tuntap: multiqueue support

2011-08-12 Thread Paul E. McKenney
On Fri, Aug 12, 2011 at 09:55:20AM +0800, Jason Wang wrote: > With the abstraction that each socket were a backend of a > queue for userspace, this patch adds multiqueue support for > tap device by allowing multiple sockets to be attached to a > tap device. Then we could parallize the transmission

Re: [Qemu-devel] [net-next RFC PATCH 4/7] tuntap: multiqueue support

2011-08-12 Thread Eric Dumazet
Le vendredi 12 août 2011 à 09:55 +0800, Jason Wang a écrit : >+ rxq = skb_get_rxhash(skb); >+ if (rxq) { >+ tfile = rcu_dereference(tun->tfiles[rxq % numqueues]); >+ if (tfile) >+ goto out; >+ } You can avoid an expensive divide

[Qemu-devel] [net-next RFC PATCH 4/7] tuntap: multiqueue support

2011-08-11 Thread Jason Wang
With the abstraction that each socket were a backend of a queue for userspace, this patch adds multiqueue support for tap device by allowing multiple sockets to be attached to a tap device. Then we could parallize the transmission by put them into different socket. As queue related information wer