linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BK] TUN/TAP driver update and fixes for 2.6.BK
@ 2005-01-12 22:34 Max Krasnyansky
  2005-01-12 23:01 ` Andrew Morton
  2005-01-12 23:19 ` Jeff Garzik
  0 siblings, 2 replies; 9+ messages in thread
From: Max Krasnyansky @ 2005-01-12 22:34 UTC (permalink / raw)
  To: davem, akpm; +Cc: linux-kernel

Dave, Andrew,

Could one of you please pull TUN/TAP driver updates from my tree
         bk://maxk.bkbits.net/tun-2.6

This will update the following files:

  drivers/net/Kconfig    |    1
  drivers/net/tun.c      |  145 ++++++++++++++++++++++++++++++++++++++++++-------
  include/linux/if_tun.h |    2
  3 files changed, 128 insertions(+), 20 deletions(-)

through these ChangeSets:

<maxk@qualcomm.com> (05/01/12 1.2379)
    [TUN] Add a missing dependency on enabling the crc32 libraries

    Patch by Steve French <smfltc@us.ibm.com>

    Signed-off-by: Max Krasnyansky <maxk@qualcomm.com>

<maxk@qualcomm.com> (04/12/23 1.1938.458.6)
    Use random_ether_addr() to generate TAP MAC address.

    Signed-off-by: Mark Smith <markzzzsmith@yahoo.com.au>
    Signed-off-by: Max Krasnyansky <maxk@qualcomm.com>

<maxk@qualcomm.com> (04/12/23 1.1938.458.5)
    TUN/TAP driver packet queuing fixes and improvements

    Patch from Harald Roelle <harald.roelle@nm.ifi.lmu.de>

    Fixes for the following issues
    - "Kicking" packet behavior in case of kernel packet scheduler (! TUN_ONE_QUEUE):
      When the netif queue is stopped because of an overrun of the driver's queue,
      no new packets are delivered to the driver until a new packet arrives, not even
      when in the meantime there's again space in the driver's queue (gained by a
      reading user process). In short, whenever netif queue was stopped, one needs an
      additional packet to "kick" packet delivery to the driver.
      The reason for this is, that the netif queue is started but not woken up, i.e.
      the rest of the kernel is not signaled to resume packet delivery.

    - Adjustment of tx queue length by ifconfig has only effect when TUN_ONE_QUEUE
      is set.  Otherwise always constant TUN_READQ_SIZE queue length is used.

    - TX queue default length setting is not consistent:
      o TAP dev + TUN_ONE_QUEUE: 1000 (by ether_setup())
      o all other cases: 10

    - Default tx queue length is too short in many cases.
      IMHO it should be at least twice as long as the number of fragments needed
      for a maximum sized IP packet at a "typical" MTU size.
      This would ensure that at least one complete IP packet can be delivered
      to the attached user space process, even if the packet's fragments
      are "misaligned" in the buffer and the user process is not scheduled
      in time to read the queue.

    Additional modifications:

    - To signal that stopping of the queue has occurred, the tx fifo overrun
      counter is increased.

    - Implemented ethtool api. Primarily added to have a standard method requesting
      the driver version.

    Signed-off-by: Max Krasnyansky <maxk@qualcomm.com>


Thanks
Max

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [BK] TUN/TAP driver update and fixes for 2.6.BK
  2005-01-12 22:34 [BK] TUN/TAP driver update and fixes for 2.6.BK Max Krasnyansky
@ 2005-01-12 23:01 ` Andrew Morton
  2005-01-12 23:14   ` Jeff Garzik
  2005-01-12 23:16   ` Max Krasnyansky
  2005-01-12 23:19 ` Jeff Garzik
  1 sibling, 2 replies; 9+ messages in thread
From: Andrew Morton @ 2005-01-12 23:01 UTC (permalink / raw)
  To: Max Krasnyansky; +Cc: davem, linux-kernel

Max Krasnyansky <maxk@qualcomm.com> wrote:
>
> Could one of you please pull TUN/TAP driver updates from my tree

That would be Dave.

Did you see this fly past on netdev?


From: Tommy Christensen <tommy.christensen@tpack.net>

But as stated in bonding.txt, the ARP monitor requires the underlying
driver to update dev->trans_start and dev->last_rx.

The patch below adds the required functionality to the TUN/TAP driver.
Please test if this helps in your case.

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/net/tun.c |    2 ++
 1 files changed, 2 insertions(+)

diff -puN drivers/net/tun.c~tun-tan-arp-monitor-support drivers/net/tun.c
--- 25/drivers/net/tun.c~tun-tan-arp-monitor-support	Wed Jan 12 14:56:05 2005
+++ 25-akpm/drivers/net/tun.c	Wed Jan 12 14:56:05 2005
@@ -92,6 +92,7 @@ static int tun_net_xmit(struct sk_buff *
 			goto drop;
 	}
 	skb_queue_tail(&tun->readq, skb);
+	dev->trans_start = jiffies;
 
 	/* Notify and wake up reader process */
 	if (tun->flags & TUN_FASYNC)
@@ -240,6 +241,7 @@ static __inline__ ssize_t tun_get_user(s
 		skb->ip_summed = CHECKSUM_UNNECESSARY;
  
 	netif_rx_ni(skb);
+	tun->dev->last_rx = jiffies;
    
 	tun->stats.rx_packets++;
 	tun->stats.rx_bytes += len;
_


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [BK] TUN/TAP driver update and fixes for 2.6.BK
  2005-01-12 23:01 ` Andrew Morton
@ 2005-01-12 23:14   ` Jeff Garzik
  2005-01-12 23:16   ` Max Krasnyansky
  1 sibling, 0 replies; 9+ messages in thread
From: Jeff Garzik @ 2005-01-12 23:14 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Max Krasnyansky, davem, linux-kernel

Andrew Morton wrote:
> Max Krasnyansky <maxk@qualcomm.com> wrote:
> 
>>Could one of you please pull TUN/TAP driver updates from my tree
> 
> 
> That would be Dave.

or me, being drivers/net :)  I pulled it.

Comments coming in separate email.

	Jeff




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [BK] TUN/TAP driver update and fixes for 2.6.BK
  2005-01-12 23:01 ` Andrew Morton
  2005-01-12 23:14   ` Jeff Garzik
@ 2005-01-12 23:16   ` Max Krasnyansky
  2005-01-12 23:26     ` Andrew Morton
  1 sibling, 1 reply; 9+ messages in thread
From: Max Krasnyansky @ 2005-01-12 23:16 UTC (permalink / raw)
  To: Andrew Morton; +Cc: davem, linux-kernel

Andrew Morton wrote:
> Max Krasnyansky <maxk@qualcomm.com> wrote:
> 
>>Could one of you please pull TUN/TAP driver updates from my tree
> 
> That would be Dave.
> 
> Did you see this fly past on netdev?
Nope. Somehow I'm not getting any mail on netdev. I guess I need to check
my subscription :).

I'll apply it an push to Dave.

Thanks
Max

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [BK] TUN/TAP driver update and fixes for 2.6.BK
  2005-01-12 22:34 [BK] TUN/TAP driver update and fixes for 2.6.BK Max Krasnyansky
  2005-01-12 23:01 ` Andrew Morton
@ 2005-01-12 23:19 ` Jeff Garzik
  2005-01-12 23:50   ` Max Krasnyansky
  1 sibling, 1 reply; 9+ messages in thread
From: Jeff Garzik @ 2005-01-12 23:19 UTC (permalink / raw)
  To: Max Krasnyansky; +Cc: davem, akpm, linux-kernel

Max Krasnyansky wrote:
> Dave, Andrew,
> 
> Could one of you please pull TUN/TAP driver updates from my tree
>         bk://maxk.bkbits.net/tun-2.6
> 
> This will update the following files:
> 
>  drivers/net/Kconfig    |    1
>  drivers/net/tun.c      |  145 
> ++++++++++++++++++++++++++++++++++++++++++-------
>  include/linux/if_tun.h |    2
>  3 files changed, 128 insertions(+), 20 deletions(-)


Non-technical comments:

1) Please send drivers/net patches to me and netdev@oss.sgi.com

2) Consider using the bk-make-sum script (in Documentation/BK-usage/) to 
generate your summary.  This will add a "bk pull " prefix to your BK url 
particularly, making it even easier to cut-n-paste.

3) Please include a patch in your submission so that list readers may 
review your changes, not just the BK users.


Technical comments:

1) Accepted, I pulled it into my netdev-2.6 queue

2) in your implementation of tun_get_drvinfo(), it may be nice to 
include the tun/tap interface number in info->bus_info, to differentiate 
between multiple tun interfaces or multiple tap interfaces.

3) You might consider moving tun_set_msglevel() completely inside 
TUN_DEBUG ifdef.

4) use of MODULE_VERSION() is recommended



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [BK] TUN/TAP driver update and fixes for 2.6.BK
  2005-01-12 23:16   ` Max Krasnyansky
@ 2005-01-12 23:26     ` Andrew Morton
  2005-01-12 23:40       ` Max Krasnyansky
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Morton @ 2005-01-12 23:26 UTC (permalink / raw)
  To: Max Krasnyansky; +Cc: davem, linux-kernel

Max Krasnyansky <maxk@qualcomm.com> wrote:
>
> Andrew Morton wrote:
> > Max Krasnyansky <maxk@qualcomm.com> wrote:
> > 
> >>Could one of you please pull TUN/TAP driver updates from my tree
> > 
> > That would be Dave.
> > 
> > Did you see this fly past on netdev?
> Nope. Somehow I'm not getting any mail on netdev. I guess I need to check
> my subscription :).
> 
> I'll apply it an push to Dave.

Well.  As far as I know we don't know if it works yet.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [BK] TUN/TAP driver update and fixes for 2.6.BK
  2005-01-12 23:26     ` Andrew Morton
@ 2005-01-12 23:40       ` Max Krasnyansky
  0 siblings, 0 replies; 9+ messages in thread
From: Max Krasnyansky @ 2005-01-12 23:40 UTC (permalink / raw)
  To: Andrew Morton; +Cc: davem, linux-kernel

Andrew Morton wrote:
> Well.  As far as I know we don't know if it works yet.
It looks totally correct to me. Even if it does not fix ARP monitor problem :).

Max





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [BK] TUN/TAP driver update and fixes for 2.6.BK
  2005-01-12 23:19 ` Jeff Garzik
@ 2005-01-12 23:50   ` Max Krasnyansky
  2005-01-12 23:54     ` Jeff Garzik
  0 siblings, 1 reply; 9+ messages in thread
From: Max Krasnyansky @ 2005-01-12 23:50 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-kernel

Jeff Garzik wrote:
> Non-technical comments:
> 
> 1) Please send drivers/net patches to me and netdev@oss.sgi.com
Ok

> 2) Consider using the bk-make-sum script (in Documentation/BK-usage/) to 
> generate your summary.  This will add a "bk pull " prefix to your BK url 
> particularly, making it even easier to cut-n-paste.
I do use bk-make-sum. A bit hacked version though which does not add
'bk pull' prefix. I'll put it back in if it's useful for folks.

> 3) Please include a patch in your submission so that list readers may 
> review your changes, not just the BK users.
Anybody can go to bkbits.net and review them. I'd rather not send
patches along with BK stuff, unless that's a new rule or something :).

> Technical comments:
> 
> 2) in your implementation of tun_get_drvinfo(), it may be nice to 
> include the tun/tap interface number in info->bus_info, to differentiate 
> between multiple tun interfaces or multiple tap interfaces.
> 
> 3) You might consider moving tun_set_msglevel() completely inside 
> TUN_DEBUG ifdef.
> 
> 4) use of MODULE_VERSION() is recommended
Good points.

Thanks
Max


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [BK] TUN/TAP driver update and fixes for 2.6.BK
  2005-01-12 23:50   ` Max Krasnyansky
@ 2005-01-12 23:54     ` Jeff Garzik
  0 siblings, 0 replies; 9+ messages in thread
From: Jeff Garzik @ 2005-01-12 23:54 UTC (permalink / raw)
  To: Max Krasnyansky; +Cc: linux-kernel

Max Krasnyansky wrote:
> Jeff Garzik wrote:
> 
>> Non-technical comments:
>>
>> 1) Please send drivers/net patches to me and netdev@oss.sgi.com
> 
> Ok
> 
>> 2) Consider using the bk-make-sum script (in Documentation/BK-usage/) 
>> to generate your summary.  This will add a "bk pull " prefix to your 
>> BK url particularly, making it even easier to cut-n-paste.
> 
> I do use bk-make-sum. A bit hacked version though which does not add
> 'bk pull' prefix. I'll put it back in if it's useful for folks.
> 
>> 3) Please include a patch in your submission so that list readers may 
>> review your changes, not just the BK users.
> 
> Anybody can go to bkbits.net and review them. I'd rather not send
> patches along with BK stuff, unless that's a new rule or something :).

It's not a new rule, it's an old rule :)  Changes need exposure and 
review _before_ they get merged and hit the kernel.  This is part of how 
Linux has always worked.

It's trivial to generate such a patch and include it in your email, 
using the gcapatch script in Documentation/BK-usage/

	Jeff



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-01-13  0:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-12 22:34 [BK] TUN/TAP driver update and fixes for 2.6.BK Max Krasnyansky
2005-01-12 23:01 ` Andrew Morton
2005-01-12 23:14   ` Jeff Garzik
2005-01-12 23:16   ` Max Krasnyansky
2005-01-12 23:26     ` Andrew Morton
2005-01-12 23:40       ` Max Krasnyansky
2005-01-12 23:19 ` Jeff Garzik
2005-01-12 23:50   ` Max Krasnyansky
2005-01-12 23:54     ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).