Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-29 Thread Jason Wang
On 2016年06月28日 15:09, Michael S. Tsirkin wrote: On Thu, Jun 23, 2016 at 01:14:07PM +0800, Jason Wang wrote: On 2016年06月23日 02:18, Michael S. Tsirkin wrote: On Fri, Jun 17, 2016 at 03:41:20AM +0300, Michael S. Tsirkin wrote: Would it help to have ptr_ring_resize that gets an array of rings

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-29 Thread Jason Wang
On 2016年06月28日 15:09, Michael S. Tsirkin wrote: On Thu, Jun 23, 2016 at 01:14:07PM +0800, Jason Wang wrote: On 2016年06月23日 02:18, Michael S. Tsirkin wrote: On Fri, Jun 17, 2016 at 03:41:20AM +0300, Michael S. Tsirkin wrote: Would it help to have ptr_ring_resize that gets an array of rings

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-28 Thread Michael S. Tsirkin
On Thu, Jun 23, 2016 at 01:14:07PM +0800, Jason Wang wrote: > > > On 2016年06月23日 02:18, Michael S. Tsirkin wrote: > > On Fri, Jun 17, 2016 at 03:41:20AM +0300, Michael S. Tsirkin wrote: > > > >Would it help to have ptr_ring_resize that gets an array of > > > >rings and resizes them both to same

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-28 Thread Michael S. Tsirkin
On Thu, Jun 23, 2016 at 01:14:07PM +0800, Jason Wang wrote: > > > On 2016年06月23日 02:18, Michael S. Tsirkin wrote: > > On Fri, Jun 17, 2016 at 03:41:20AM +0300, Michael S. Tsirkin wrote: > > > >Would it help to have ptr_ring_resize that gets an array of > > > >rings and resizes them both to same

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-22 Thread Jason Wang
On 2016年06月23日 02:18, Michael S. Tsirkin wrote: On Fri, Jun 17, 2016 at 03:41:20AM +0300, Michael S. Tsirkin wrote: >Would it help to have ptr_ring_resize that gets an array of >rings and resizes them both to same length? OK, here it is. Untested so far, and no skb wrapper. Pls let me know

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-22 Thread Jason Wang
On 2016年06月23日 02:18, Michael S. Tsirkin wrote: On Fri, Jun 17, 2016 at 03:41:20AM +0300, Michael S. Tsirkin wrote: >Would it help to have ptr_ring_resize that gets an array of >rings and resizes them both to same length? OK, here it is. Untested so far, and no skb wrapper. Pls let me know

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-22 Thread Michael S. Tsirkin
On Fri, Jun 17, 2016 at 03:41:20AM +0300, Michael S. Tsirkin wrote: > Would it help to have ptr_ring_resize that gets an array of > rings and resizes them both to same length? OK, here it is. Untested so far, and no skb wrapper. Pls let me know whether this is what you had in mind. -->

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-22 Thread Michael S. Tsirkin
On Fri, Jun 17, 2016 at 03:41:20AM +0300, Michael S. Tsirkin wrote: > Would it help to have ptr_ring_resize that gets an array of > rings and resizes them both to same length? OK, here it is. Untested so far, and no skb wrapper. Pls let me know whether this is what you had in mind. -->

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-17 Thread Jason Wang
On 2016年06月17日 08:41, Michael S. Tsirkin wrote: On Wed, Jun 15, 2016 at 04:38:17PM +0800, Jason Wang wrote: >We used to queue tx packets in sk_receive_queue, this is less >efficient since it requires spinlocks to synchronize between producer >and consumer. > >This patch tries to address this

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-17 Thread Jason Wang
On 2016年06月17日 08:41, Michael S. Tsirkin wrote: On Wed, Jun 15, 2016 at 04:38:17PM +0800, Jason Wang wrote: >We used to queue tx packets in sk_receive_queue, this is less >efficient since it requires spinlocks to synchronize between producer >and consumer. > >This patch tries to address this

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-16 Thread Michael S. Tsirkin
On Wed, Jun 15, 2016 at 04:38:17PM +0800, Jason Wang wrote: > We used to queue tx packets in sk_receive_queue, this is less > efficient since it requires spinlocks to synchronize between producer > and consumer. > > This patch tries to address this by: > > - introduce a new mode which will be

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-16 Thread Michael S. Tsirkin
On Wed, Jun 15, 2016 at 04:38:17PM +0800, Jason Wang wrote: > We used to queue tx packets in sk_receive_queue, this is less > efficient since it requires spinlocks to synchronize between producer > and consumer. > > This patch tries to address this by: > > - introduce a new mode which will be

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-16 Thread David Miller
From: Jason Wang Date: Wed, 15 Jun 2016 16:38:17 +0800 > We used to queue tx packets in sk_receive_queue, this is less > efficient since it requires spinlocks to synchronize between producer > and consumer. > > This patch tries to address this by: > > - introduce a new

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-16 Thread David Miller
From: Jason Wang Date: Wed, 15 Jun 2016 16:38:17 +0800 > We used to queue tx packets in sk_receive_queue, this is less > efficient since it requires spinlocks to synchronize between producer > and consumer. > > This patch tries to address this by: > > - introduce a new mode which will be only

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-16 Thread Jason Wang
On 2016年06月15日 19:55, Jamal Hadi Salim wrote: > On 16-06-15 07:52 AM, Jamal Hadi Salim wrote: >> On 16-06-15 04:38 AM, Jason Wang wrote: >>> We used to queue tx packets in sk_receive_queue, this is less >>> efficient since it requires spinlocks to synchronize between producer >> So this is more

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-16 Thread Jason Wang
On 2016年06月15日 19:55, Jamal Hadi Salim wrote: > On 16-06-15 07:52 AM, Jamal Hadi Salim wrote: >> On 16-06-15 04:38 AM, Jason Wang wrote: >>> We used to queue tx packets in sk_receive_queue, this is less >>> efficient since it requires spinlocks to synchronize between producer >> So this is more

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-15 Thread Jamal Hadi Salim
On 16-06-15 07:52 AM, Jamal Hadi Salim wrote: > On 16-06-15 04:38 AM, Jason Wang wrote: >> We used to queue tx packets in sk_receive_queue, this is less >> efficient since it requires spinlocks to synchronize between producer > > So this is more exercising the skb array improvements. For tun >

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-15 Thread Jamal Hadi Salim
On 16-06-15 07:52 AM, Jamal Hadi Salim wrote: > On 16-06-15 04:38 AM, Jason Wang wrote: >> We used to queue tx packets in sk_receive_queue, this is less >> efficient since it requires spinlocks to synchronize between producer > > So this is more exercising the skb array improvements. For tun >

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-15 Thread Jamal Hadi Salim
On 16-06-15 04:38 AM, Jason Wang wrote: > We used to queue tx packets in sk_receive_queue, this is less > efficient since it requires spinlocks to synchronize between producer > and consumer. > > This patch tries to address this by: > > - introduce a new mode which will be only enabled with

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-15 Thread Jamal Hadi Salim
On 16-06-15 04:38 AM, Jason Wang wrote: > We used to queue tx packets in sk_receive_queue, this is less > efficient since it requires spinlocks to synchronize between producer > and consumer. > > This patch tries to address this by: > > - introduce a new mode which will be only enabled with

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-15 Thread kbuild test robot
Hi, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Jason-Wang/tun-introduce-tx-skb-ring/20160615-164041 config: x86_64-randconfig-s2-06151732 (attached as .config) compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430 reproduce: # save the attached

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-15 Thread kbuild test robot
Hi, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Jason-Wang/tun-introduce-tx-skb-ring/20160615-164041 config: x86_64-randconfig-s2-06151732 (attached as .config) compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430 reproduce: # save the attached

[PATCH net-next V2] tun: introduce tx skb ring

2016-06-15 Thread Jason Wang
We used to queue tx packets in sk_receive_queue, this is less efficient since it requires spinlocks to synchronize between producer and consumer. This patch tries to address this by: - introduce a new mode which will be only enabled with IFF_TX_ARRAY set and switch from sk_receive_queue to a

[PATCH net-next V2] tun: introduce tx skb ring

2016-06-15 Thread Jason Wang
We used to queue tx packets in sk_receive_queue, this is less efficient since it requires spinlocks to synchronize between producer and consumer. This patch tries to address this by: - introduce a new mode which will be only enabled with IFF_TX_ARRAY set and switch from sk_receive_queue to a