Re: [BK] TUN/TAP driver update and fixes for 2.6.BK

From: Andrew Morton
Date: Wed Jan 12 2005 - 18:06:48 EST


Max Krasnyansky <maxk@xxxxxxxxxxxx> 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@xxxxxxxxx>

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@xxxxxxxx>
---

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;
_

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