Netdev List
 help / color / mirror / Atom feed
* Re: Re: Kernel panic in fib_rules_lookup (kernel 2.6.32)
From: "Oleg A. Arkhangelsky" @ 2010-03-09 17:21 UTC (permalink / raw)
  To: netdev

Hello, Eric

>  > Mar  9 10:08:55 bras-1 kernel:
>  > Mar  9 10:08:55 bras-1 kernel: Pid: 0, comm: swapper Not tainted (2.6.32 #3)
>  
>  Is it an unpatched kernel ?

Yes. Vanilla 2.6.32. We saw the same issue on at least 2.6.30.1 (as far as I know).

>  
>  Could you send us your .config ?
>  

Here it is: http://www.progtech.ru/~oleg/config.txt

>  gcc -v ?

Reading specs from /usr/lib/gcc/i486-slackware-linux/4.3.3/specs
Target: i486-slackware-linux
Configured with: ../gcc-4.3.3/configure --prefix=/usr --libdir=/usr/lib --enable-shared --enable-bootstrap --enable-languages=ada,c,c++,fortran,java,objc --enable-threads=posix --enable-checking=release --with-system-zlib --disable-libunwind-exceptions --enable-__cxa_atexit --enable-libssp --with-gnu-ld --verbose --with-arch=i486 --target=i486-slackware-linux --build=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 4.3.3 (GCC)

-- 
wbr, Oleg.

^ permalink raw reply

* Re: Kernel panic in fib_rules_lookup (kernel 2.6.32)
From: Eric Dumazet @ 2010-03-09 17:09 UTC (permalink / raw)
  To: "Oleg A. Arkhangelsky"; +Cc: netdev
In-Reply-To: <119601268120674@webmail87.yandex.ru>

Le mardi 09 mars 2010 à 10:44 +0300, "Oleg A. Arkhangelsky" a écrit :
> Hello,
> 
> Got this kernel panic tomorrow. This PC is rather heavy loaded router with BGP full view (> 300K routes).
> We're using FIB_TRIE. Last time we got similar panic about 1 month ago. Please, let me know if you
> need additional information to debug (e.g. objdump). Thanks!
> 
> Mar  9 10:08:55 bras-1 kernel: BUG: unable to handle kernel NULL pointer dereference at (null)
> Mar  9 10:08:55 bras-1 kernel: IP: [<c11fa012>] fib_rules_lookup+0xa2/0xd0
> Mar  9 10:08:55 bras-1 kernel: *pde = 00000000
> Mar  9 10:08:55 bras-1 kernel: Thread overran stack, or stack corrupted

Hmm...

> Mar  9 10:08:55 bras-1 kernel: Oops: 0000 [#1] SMP
> Mar  9 10:08:55 bras-1 kernel: Modules linked in: ipt_NETFLOW iTCO_wdt xt_tcpudp iptable_filter iptable_nat ip_tables ipt_ISG x_tables ipmi_watchdog ipmi_msghandler nf_nat_ftp nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack_ftp nf_conntrack 8021q e1000 e1000e
> Mar  9 10:08:55 bras-1 kernel:
> Mar  9 10:08:55 bras-1 kernel: Pid: 0, comm: swapper Not tainted (2.6.32 #3)

Is it an unpatched kernel ?

Could you send us your .config ?

gcc -v ?



^ permalink raw reply

* [PATCH 4/4] bnx2x: merge common code when stopping queue
From: Stanislaw Gruszka @ 2010-03-09 16:55 UTC (permalink / raw)
  To: netdev
  Cc: Vladislav Zolotarov, Eilon Greenstein, Michael Chan,
	Stanislaw Gruszka
In-Reply-To: <1268153703-4186-3-git-send-email-sgruszka@redhat.com>

Main reason for merge code is willingness to use memory barrier to avoid
races with bnx2x_tx_int(). There is no real situation possible to
trigger the races. But if we assume that bug of not stopped and full
queue can happen, we should also stop queue then in the safe way.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
I have no strong fillings that patch should be applied, if Vladislav
do not want the patch, I'll will not argue.

 drivers/net/bnx2x_main.c |   37 ++++++++++++++++++++-----------------
 1 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 6c042a7..6751ca2 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -11176,10 +11176,9 @@ static netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	struct eth_tx_bd *tx_data_bd, *total_pkt_bd = NULL;
 	struct eth_tx_parse_bd *pbd = NULL;
 	u16 pkt_prod, bd_prod;
-	int nbd, fp_index;
+	int i, ret, nbd, fp_index;
 	dma_addr_t mapping;
 	u32 xmit_type = bnx2x_xmit_type(bp, skb);
-	int i;
 	u8 hlen = 0;
 	__le16 pkt_size = 0;
 
@@ -11194,10 +11193,9 @@ static netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	fp = &bp->fp[fp_index];
 
 	if (unlikely(bnx2x_tx_avail(fp) < (skb_shinfo(skb)->nr_frags + 3))) {
-		fp->eth_q_stats.driver_xoff++;
-		netif_tx_stop_queue(txq);
 		BNX2X_ERR("BUG! Tx ring full when queue awake!\n");
-		return NETDEV_TX_BUSY;
+		ret = NETDEV_TX_BUSY;
+		goto stop_queue;
 	}
 
 	DP(NETIF_MSG_TX_QUEUED, "SKB: summed %x  protocol %x  protocol(%x,%x)"
@@ -11425,22 +11423,27 @@ static netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	mmiowb();
 
 	fp->tx_bd_prod += nbd;
+	fp->tx_pkt++;
 
-	if (unlikely(bnx2x_tx_avail(fp) < MAX_SKB_FRAGS + 3)) {
-		netif_tx_stop_queue(txq);
+	ret = NETDEV_TX_OK;
+	if (unlikely(bnx2x_tx_avail(fp) < MAX_SKB_FRAGS + 3))
+		goto stop_queue;
 
-		/* paired memory barrier is in bnx2x_tx_int(), we have to keep
-		 * ordering of set_bit() in netif_tx_stop_queue() and read of
-		 * fp->bd_tx_cons */
-		smp_mb();
+	return ret;
 
-		fp->eth_q_stats.driver_xoff++;
-		if (bnx2x_tx_avail(fp) >= MAX_SKB_FRAGS + 3)
-			netif_tx_wake_queue(txq);
-	}
-	fp->tx_pkt++;
+stop_queue:
+	netif_tx_stop_queue(txq);
+
+	/* paired memory barrier is in bnx2x_tx_int(), we have to keep
+	 * ordering of set_bit() in netif_tx_stop_queue() and read of
+	 * fp->bd_tx_cons */
+	smp_mb();
 
-	return NETDEV_TX_OK;
+	fp->eth_q_stats.driver_xoff++;
+	if (bnx2x_tx_avail(fp) >= MAX_SKB_FRAGS + 3)
+		netif_tx_wake_queue(txq);
+
+	return ret;
 }
 
 /* called with rtnl_lock */
-- 
1.6.2.5


^ permalink raw reply related

* [PATCH 3/4] bnx2x: change smp_mb() comment to conform the true
From: Stanislaw Gruszka @ 2010-03-09 16:55 UTC (permalink / raw)
  To: netdev
  Cc: Vladislav Zolotarov, Eilon Greenstein, Michael Chan,
	Stanislaw Gruszka
In-Reply-To: <1268153703-4186-2-git-send-email-sgruszka@redhat.com>

Access to fp->tx_bp_prod is protected by __netif_tx_lock,
smp_mb() is not needed for that.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/bnx2x_main.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index ae62b67..6c042a7 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -11428,9 +11428,12 @@ static netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	if (unlikely(bnx2x_tx_avail(fp) < MAX_SKB_FRAGS + 3)) {
 		netif_tx_stop_queue(txq);
-		/* We want bnx2x_tx_int to "see" the updated tx_bd_prod
-		   if we put Tx into XOFF state. */
+
+		/* paired memory barrier is in bnx2x_tx_int(), we have to keep
+		 * ordering of set_bit() in netif_tx_stop_queue() and read of
+		 * fp->bd_tx_cons */
 		smp_mb();
+
 		fp->eth_q_stats.driver_xoff++;
 		if (bnx2x_tx_avail(fp) >= MAX_SKB_FRAGS + 3)
 			netif_tx_wake_queue(txq);
-- 
1.6.2.5


^ permalink raw reply related

* [PATCH 2/4] bnx2x: remove not necessary compiler barrier
From: Stanislaw Gruszka @ 2010-03-09 16:55 UTC (permalink / raw)
  To: netdev
  Cc: Vladislav Zolotarov, Eilon Greenstein, Michael Chan,
	Stanislaw Gruszka
In-Reply-To: <1268153703-4186-1-git-send-email-sgruszka@redhat.com>

Access to fp->tx_bd_prod is protected by __netif_tx_lock, so we do not
need any barrier for that.

Update of fp->tx_bd_cons in bnx2x_tx_int() is not protected by lock, but
barrier() nor smb_mb() in bnx2x_tx_avail() not guarantee we will see
values that is written on other cpu. Ordering issues between
netif_tx_stop_queue(), netif_tx_queue_stopped(), fp->tx_bd_cons = bd_cons
and bnx2x_tx_avail() are already handled by smp_mb() in bnx2x_tx_int()
and bnx2x_start_xmit().

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/bnx2x_main.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 9fc0f6a..ae62b67 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -893,7 +893,6 @@ static inline u16 bnx2x_tx_avail(struct bnx2x_fastpath *fp)
 	u16 prod;
 	u16 cons;
 
-	barrier(); /* Tell compiler that prod and cons can change */
 	prod = fp->tx_bd_prod;
 	cons = fp->tx_bd_cons;
 
-- 
1.6.2.5


^ permalink raw reply related

* [PATCH 1/4] bnx2x: use smp_mb() to keep ordering of read write operations
From: Stanislaw Gruszka @ 2010-03-09 16:55 UTC (permalink / raw)
  To: netdev
  Cc: Vladislav Zolotarov, Eilon Greenstein, Michael Chan,
	Stanislaw Gruszka

Since we want to keep ordering of write to fp->bd_tx_cons and
netif_tx_queue_stopped(txq), what is read of txq->state, we have to use
general memory barrier.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/bnx2x_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index ed785a3..9fc0f6a 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -963,7 +963,7 @@ static int bnx2x_tx_int(struct bnx2x_fastpath *fp)
 	 * start_xmit() will miss it and cause the queue to be stopped
 	 * forever.
 	 */
-	smp_wmb();
+	smp_mb();
 
 	/* TBD need a thresh? */
 	if (unlikely(netif_tx_queue_stopped(txq))) {
-- 
1.6.2.5


^ permalink raw reply related

* Re: [2.6.34-rc1] CPU stalls when closing TCP sockets.
From: Stephen Hemminger @ 2010-03-09 16:22 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: Tetsuo Handa, David Miller, netdev, linux-kernel, paulmck
In-Reply-To: <1268150156.3113.12.camel@edumazet-laptop>

On Tue, 09 Mar 2010 16:55:56 +0100
Eric Dumazet <eric.dumazet@gmail.com> wrote:

> Le mardi 09 mars 2010 à 15:54 +0900, Tetsuo Handa a écrit :
> > Eric Dumazet wrote:
> > > Nothing comes to my mind, I'll try to reproduce this here.
> > 
> > When stopped at (8), Ctrl-C doesn't work.
> > 
> > > Is 2.6.33 OK ?
> > 
> > Yes. 2.6.33 and earlier are OK.
> 
> OK thanks !
> 
> I believe commit d218d11133d888f9745802146a50255a4781d37a
> (tcp: Generalized TTL Security Mechanism) might be the bug origin.
> 
> I am testing following patch, based on latest net-2.6 tree (including
> the LINUX_MIB_TCPMINTTLDROP bit)
> 
> [PATCH] tcp: Fix tcp_v4_rcv()
> 
> Commit d218d111 (tcp: Generalized TTL Security Mechanism) added a bug
> for TIMEWAIT sockets. We should not test min_ttl for TW sockets.
> 
> Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> ---
> diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
> index 8d51d39..70df409 100644
> --- a/net/ipv4/tcp_ipv4.c
> +++ b/net/ipv4/tcp_ipv4.c
> @@ -1651,15 +1651,15 @@ int tcp_v4_rcv(struct sk_buff *skb)
>  	if (!sk)
>  		goto no_tcp_socket;
>  
> +process:
> +	if (sk->sk_state == TCP_TIME_WAIT)
> +		goto do_time_wait;
> +
>  	if (unlikely(iph->ttl < inet_sk(sk)->min_ttl)) {
>  		NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP);
>  		goto discard_and_relse;
>  	}
>  
> -process:
> -	if (sk->sk_state == TCP_TIME_WAIT)
> -		goto do_time_wait;
> -
>  	if (!xfrm4_policy_check(sk, XFRM_POLICY_IN, skb))
>  		goto discard_and_relse;
>  	nf_reset(skb);
> 
> 

Agreed.
Acked-by: Stephen Hemminger <shemminger@vyatta.com>


-- 

^ permalink raw reply

* [PATCH] tg3: Fix tg3_poll_controller() passing wrong pointer to tg3_interrupt()
From: Louis Rilling @ 2010-03-09 16:14 UTC (permalink / raw)
  To: Matt Carlson; +Cc: Louis Rilling, Michael Chan, netdev, stable

[Resending without buggy address for stable. Sorry.]

Commit 09943a1819a240ff4a72f924d0038818fcdd0a90
	Author: Matt Carlson <mcarlson@broadcom.com>
	Date:   Fri Aug 28 14:01:57 2009 +0000

	tg3: Convert ISR parameter to tnapi

forgot to update tg3_poll_controller(), leading to intermittent crashes with
netpoll.

Fix this.

Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com>
Cc: stable@kernel.org
---
 drivers/net/tg3.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 0fa7688..c3b4fe7 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -5279,7 +5279,7 @@ static void tg3_poll_controller(struct net_device *dev)
 	struct tg3 *tp = netdev_priv(dev);
 
 	for (i = 0; i < tp->irq_cnt; i++)
-		tg3_interrupt(tp->napi[i].irq_vec, dev);
+		tg3_interrupt(tp->napi[i].irq_vec, &tp->napi[i]);
 }
 #endif
 
-- 
1.5.6.5


^ permalink raw reply related

* [PATCH] can: bfin_can: switch to common Blackfin can header
From: Mike Frysinger @ 2010-03-09 16:03 UTC (permalink / raw)
  To: socketcan-core, Urs Thuermann, Oliver Hartkopp, netdev,
	David S. Miller
  Cc: uclinux-dist-devel

The MMR bits are being moved to this header, so include it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
note: this can be merged for 2.6.34 or 2.6.35

 drivers/net/can/bfin_can.c |   97 +++----------------------------------------
 1 files changed, 7 insertions(+), 90 deletions(-)

diff --git a/drivers/net/can/bfin_can.c b/drivers/net/can/bfin_can.c
index 0ec1524..680060d 100644
--- a/drivers/net/can/bfin_can.c
+++ b/drivers/net/can/bfin_can.c
@@ -22,96 +22,13 @@
 #include <linux/can/dev.h>
 #include <linux/can/error.h>
 
+#include <asm/bfin_can.h>
 #include <asm/portmux.h>
 
 #define DRV_NAME "bfin_can"
 #define BFIN_CAN_TIMEOUT 100
 
 /*
- * transmit and receive channels
- */
-#define TRANSMIT_CHL            24
-#define RECEIVE_STD_CHL         0
-#define RECEIVE_EXT_CHL         4
-#define RECEIVE_RTR_CHL         8
-#define RECEIVE_EXT_RTR_CHL     12
-#define MAX_CHL_NUMBER          32
-
-/*
- * bfin can registers layout
- */
-struct bfin_can_mask_regs {
-	u16 aml;
-	u16 dummy1;
-	u16 amh;
-	u16 dummy2;
-};
-
-struct bfin_can_channel_regs {
-	u16 data[8];
-	u16 dlc;
-	u16 dummy1;
-	u16 tsv;
-	u16 dummy2;
-	u16 id0;
-	u16 dummy3;
-	u16 id1;
-	u16 dummy4;
-};
-
-struct bfin_can_regs {
-	/*
-	 * global control and status registers
-	 */
-	u16 mc1;           /* offset 0 */
-	u16 dummy1;
-	u16 md1;           /* offset 4 */
-	u16 rsv1[13];
-	u16 mbtif1;        /* offset 0x20 */
-	u16 dummy2;
-	u16 mbrif1;        /* offset 0x24 */
-	u16 dummy3;
-	u16 mbim1;         /* offset 0x28 */
-	u16 rsv2[11];
-	u16 mc2;           /* offset 0x40 */
-	u16 dummy4;
-	u16 md2;           /* offset 0x44 */
-	u16 dummy5;
-	u16 trs2;          /* offset 0x48 */
-	u16 rsv3[11];
-	u16 mbtif2;        /* offset 0x60 */
-	u16 dummy6;
-	u16 mbrif2;        /* offset 0x64 */
-	u16 dummy7;
-	u16 mbim2;         /* offset 0x68 */
-	u16 rsv4[11];
-	u16 clk;           /* offset 0x80 */
-	u16 dummy8;
-	u16 timing;        /* offset 0x84 */
-	u16 rsv5[3];
-	u16 status;        /* offset 0x8c */
-	u16 dummy9;
-	u16 cec;           /* offset 0x90 */
-	u16 dummy10;
-	u16 gis;           /* offset 0x94 */
-	u16 dummy11;
-	u16 gim;           /* offset 0x98 */
-	u16 rsv6[3];
-	u16 ctrl;          /* offset 0xa0 */
-	u16 dummy12;
-	u16 intr;          /* offset 0xa4 */
-	u16 rsv7[7];
-	u16 esr;           /* offset 0xb4 */
-	u16 rsv8[37];
-
-	/*
-	 * channel(mailbox) mask and message registers
-	 */
-	struct bfin_can_mask_regs msk[MAX_CHL_NUMBER];    /* offset 0x100 */
-	struct bfin_can_channel_regs chl[MAX_CHL_NUMBER]; /* offset 0x200 */
-};
-
-/*
  * bfin can private data
  */
 struct bfin_can_priv {
@@ -162,7 +79,7 @@ static int bfin_can_set_bittiming(struct net_device *dev)
 	if (priv->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES)
 		timing |= SAM;
 
-	bfin_write16(&reg->clk, clk);
+	bfin_write16(&reg->clock, clk);
 	bfin_write16(&reg->timing, timing);
 
 	dev_info(dev->dev.parent, "setting CLOCK=0x%04x TIMING=0x%04x\n",
@@ -184,11 +101,11 @@ static void bfin_can_set_reset_mode(struct net_device *dev)
 	bfin_write16(&reg->gim, 0);
 
 	/* reset can and enter configuration mode */
-	bfin_write16(&reg->ctrl, SRS | CCR);
+	bfin_write16(&reg->control, SRS | CCR);
 	SSYNC();
-	bfin_write16(&reg->ctrl, CCR);
+	bfin_write16(&reg->control, CCR);
 	SSYNC();
-	while (!(bfin_read16(&reg->ctrl) & CCA)) {
+	while (!(bfin_read16(&reg->control) & CCA)) {
 		udelay(10);
 		if (--timeout == 0) {
 			dev_err(dev->dev.parent,
@@ -243,7 +160,7 @@ static void bfin_can_set_normal_mode(struct net_device *dev)
 	/*
 	 * leave configuration mode
 	 */
-	bfin_write16(&reg->ctrl, bfin_read16(&reg->ctrl) & ~CCR);
+	bfin_write16(&reg->control, bfin_read16(&reg->control) & ~CCR);
 
 	while (bfin_read16(&reg->status) & CCA) {
 		udelay(10);
@@ -721,7 +638,7 @@ static int bfin_can_suspend(struct platform_device *pdev, pm_message_t mesg)
 
 	if (netif_running(dev)) {
 		/* enter sleep mode */
-		bfin_write16(&reg->ctrl, bfin_read16(&reg->ctrl) | SMR);
+		bfin_write16(&reg->control, bfin_read16(&reg->control) | SMR);
 		SSYNC();
 		while (!(bfin_read16(&reg->intr) & SMACK)) {
 			udelay(10);
-- 
1.7.0.2


^ permalink raw reply related

* Re: [2.6.34-rc1] CPU stalls when closing TCP sockets.
From: Eric Dumazet @ 2010-03-09 15:55 UTC (permalink / raw)
  To: Tetsuo Handa, David Miller
  Cc: netdev, linux-kernel, paulmck, Stephen Hemminger
In-Reply-To: <201003090654.o296sCnh065487@www262.sakura.ne.jp>

Le mardi 09 mars 2010 à 15:54 +0900, Tetsuo Handa a écrit :
> Eric Dumazet wrote:
> > Nothing comes to my mind, I'll try to reproduce this here.
> 
> When stopped at (8), Ctrl-C doesn't work.
> 
> > Is 2.6.33 OK ?
> 
> Yes. 2.6.33 and earlier are OK.

OK thanks !

I believe commit d218d11133d888f9745802146a50255a4781d37a
(tcp: Generalized TTL Security Mechanism) might be the bug origin.

I am testing following patch, based on latest net-2.6 tree (including
the LINUX_MIB_TCPMINTTLDROP bit)

[PATCH] tcp: Fix tcp_v4_rcv()

Commit d218d111 (tcp: Generalized TTL Security Mechanism) added a bug
for TIMEWAIT sockets. We should not test min_ttl for TW sockets.

Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 8d51d39..70df409 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1651,15 +1651,15 @@ int tcp_v4_rcv(struct sk_buff *skb)
 	if (!sk)
 		goto no_tcp_socket;
 
+process:
+	if (sk->sk_state == TCP_TIME_WAIT)
+		goto do_time_wait;
+
 	if (unlikely(iph->ttl < inet_sk(sk)->min_ttl)) {
 		NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP);
 		goto discard_and_relse;
 	}
 
-process:
-	if (sk->sk_state == TCP_TIME_WAIT)
-		goto do_time_wait;
-
 	if (!xfrm4_policy_check(sk, XFRM_POLICY_IN, skb))
 		goto discard_and_relse;
 	nf_reset(skb);



^ permalink raw reply related

* [PATCH] tg3: Fix tg3_poll_controller() passing wrong pointer to tg3_interrupt()
From: Louis Rilling @ 2010-03-09 15:47 UTC (permalink / raw)
  To: mcarlson; +Cc: mchan, netdev, Louis Rilling, stable

Commit 09943a1819a240ff4a72f924d0038818fcdd0a90
	Author: Matt Carlson <mcarlson@broadcom.com>
	Date:   Fri Aug 28 14:01:57 2009 +0000

	tg3: Convert ISR parameter to tnapi

forgot to update tg3_poll_controller(), leading to intermittent crashes with
netpoll.

Fix this.

Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com>
Cc: stable@vger.kernel.org
---
 drivers/net/tg3.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 0fa7688..c3b4fe7 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -5279,7 +5279,7 @@ static void tg3_poll_controller(struct net_device *dev)
 	struct tg3 *tp = netdev_priv(dev);
 
 	for (i = 0; i < tp->irq_cnt; i++)
-		tg3_interrupt(tp->napi[i].irq_vec, dev);
+		tg3_interrupt(tp->napi[i].irq_vec, &tp->napi[i]);
 }
 #endif
 
-- 
1.5.6.5


^ permalink raw reply related

* Re: [PATCH] socket: Merge getsockname and getpeername into a single function
From: Kenan Kalajdzic @ 2010-03-09 15:30 UTC (permalink / raw)
  To: David Miller; +Cc: netdev
In-Reply-To: <20100308.122413.158901144.davem@davemloft.net>

On Mon, Mar 8, 2010 at 9:24 PM, David Miller <davem@davemloft.net> wrote:
>
> Since you still have to conditionalize things like the security
> calls, this doesn't look any cleaner to me than what we have
> there already.

You are absolutely right about this - the condition around security
calls ruins the whole refactoring attempt.  It could easily go away if
we were ready to make minor changes to the security code.  It is
because getting the local socket info and getting the peer socket info
are essentially the same type of operation.  Therefore, both
security_socket_getsockname() and security_socket_getpeername()
eventually evaluate to a call to socket_has_perm() with
SOCKET__GETATTR.  The question remains whether it is worth breaking
the cleanness of the security hooks code to get rid of the condition
in 'our' two functions?

-- 
Kenan

^ permalink raw reply

* [net-next-2.6 PATCH 3/3] bridge: forbid slave devices to change it's type
From: Jiri Pirko @ 2010-03-09 14:19 UTC (permalink / raw)
  To: netdev; +Cc: fubar, bonding-devel, davem, shemminger
In-Reply-To: <20100309141724.GB2783@psychotron.lab.eng.brq.redhat.com>

It's not desired for underlaying devices to change type. At the time, there is
for example possible to have bond with changed type from Ethernet to Infiniband
as a port of a bridge. This patch fixes this.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
 net/bridge/br_notify.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/bridge/br_notify.c b/net/bridge/br_notify.c
index 763a3ec..a68c692 100644
--- a/net/bridge/br_notify.c
+++ b/net/bridge/br_notify.c
@@ -82,6 +82,9 @@ static int br_device_event(struct notifier_block *unused, unsigned long event, v
 	case NETDEV_UNREGISTER:
 		br_del_if(br, dev);
 		break;
+
+	case NETDEV_TYPE_CHNG_START:
+		return NOTIFY_BAD;
 	}
 
 	/* Events that may cause spanning tree to refresh */
-- 
1.6.6.1


^ permalink raw reply related

* [net-next-2.6 PATCH 2/3] bonding: check return value of nofitier when changing type
From: Jiri Pirko @ 2010-03-09 14:19 UTC (permalink / raw)
  To: netdev; +Cc: fubar, bonding-devel, davem, shemminger
In-Reply-To: <20100309141724.GB2783@psychotron.lab.eng.brq.redhat.com>

This patch adds the possibility to refuse the bonding type change for other
subsystems (such as for example bridge, vlan, etc.)

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
 drivers/net/bonding/bond_main.c |   10 +++++++++-
 include/linux/netdevice.h       |    2 +-
 net/core/dev.c                  |    4 ++--
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index c1b39b7..dd34b05 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1480,7 +1480,15 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
 				 bond_dev->name,
 				 bond_dev->type, slave_dev->type);
 
-			netdev_bonding_change(bond_dev, NETDEV_TYPE_CHNG_START);
+			res = netdev_bonding_change(bond_dev,
+						    NETDEV_TYPE_CHNG_START);
+			res = notifier_to_errno(res);
+			if (res) {
+				pr_err("%s: refused to change device type\n",
+				       bond_dev->name);
+				res = -EBUSY;
+				goto err_undo_flags;
+			}
 
 			if (slave_dev->type != ARPHRD_ETHER)
 				bond_setup_by_slave(bond_dev, slave_dev);
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index c79a88b..8cf1d50 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1975,7 +1975,7 @@ extern void		__dev_addr_unsync(struct dev_addr_list **to, int *to_count, struct
 extern int		dev_set_promiscuity(struct net_device *dev, int inc);
 extern int		dev_set_allmulti(struct net_device *dev, int inc);
 extern void		netdev_state_change(struct net_device *dev);
-extern void		netdev_bonding_change(struct net_device *dev,
+extern int		netdev_bonding_change(struct net_device *dev,
 					      unsigned long event);
 extern void		netdev_features_change(struct net_device *dev);
 /* Load a device via the kmod */
diff --git a/net/core/dev.c b/net/core/dev.c
index bcc490c..5de4a15 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1084,9 +1084,9 @@ void netdev_state_change(struct net_device *dev)
 }
 EXPORT_SYMBOL(netdev_state_change);
 
-void netdev_bonding_change(struct net_device *dev, unsigned long event)
+int netdev_bonding_change(struct net_device *dev, unsigned long event)
 {
-	call_netdevice_notifiers(event, dev);
+	return call_netdevice_notifiers(event, dev);
 }
 EXPORT_SYMBOL(netdev_bonding_change);
 
-- 
1.6.6.1


^ permalink raw reply related

* [net-next-2.6 PATCH 1/3] rename notifier defines for netdev type change
From: Jiri Pirko @ 2010-03-09 14:18 UTC (permalink / raw)
  To: netdev; +Cc: fubar, bonding-devel, davem, shemminger
In-Reply-To: <20100309141724.GB2783@psychotron.lab.eng.brq.redhat.com>

Since generally there could be more netdevices changing type other than bonding,
making this event type name "bonding-unrelated"

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
 drivers/net/bonding/bond_main.c |    4 ++--
 include/linux/notifier.h        |    4 ++--
 net/ipv4/devinet.c              |    4 ++--
 net/ipv6/addrconf.c             |   16 ++++++++--------
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 430c022..c1b39b7 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1480,14 +1480,14 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
 				 bond_dev->name,
 				 bond_dev->type, slave_dev->type);
 
-			netdev_bonding_change(bond_dev, NETDEV_BONDING_OLDTYPE);
+			netdev_bonding_change(bond_dev, NETDEV_TYPE_CHNG_START);
 
 			if (slave_dev->type != ARPHRD_ETHER)
 				bond_setup_by_slave(bond_dev, slave_dev);
 			else
 				ether_setup(bond_dev);
 
-			netdev_bonding_change(bond_dev, NETDEV_BONDING_NEWTYPE);
+			netdev_bonding_change(bond_dev, NETDEV_TYPE_CHNG_DONE);
 		}
 	} else if (bond_dev->type != slave_dev->type) {
 		pr_err("%s ether type (%d) is different from other slaves (%d), can not enslave it.\n",
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index fee6c2f..c8145c2 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -199,8 +199,8 @@ static inline int notifier_to_errno(int ret)
 #define NETDEV_FEAT_CHANGE	0x000B
 #define NETDEV_BONDING_FAILOVER 0x000C
 #define NETDEV_PRE_UP		0x000D
-#define NETDEV_BONDING_OLDTYPE  0x000E
-#define NETDEV_BONDING_NEWTYPE  0x000F
+#define NETDEV_TYPE_CHNG_START	0x000E
+#define NETDEV_TYPE_CHNG_DONE	0x000F
 #define NETDEV_POST_INIT	0x0010
 #define NETDEV_UNREGISTER_BATCH 0x0011
 
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 51ca946..16bfc45 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1095,10 +1095,10 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
 	case NETDEV_DOWN:
 		ip_mc_down(in_dev);
 		break;
-	case NETDEV_BONDING_OLDTYPE:
+	case NETDEV_TYPE_CHNG_START:
 		ip_mc_unmap(in_dev);
 		break;
-	case NETDEV_BONDING_NEWTYPE:
+	case NETDEV_TYPE_CHNG_DONE:
 		ip_mc_remap(in_dev);
 		break;
 	case NETDEV_CHANGEMTU:
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 88fd8c5..b2409ac 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -137,8 +137,8 @@ static DEFINE_SPINLOCK(addrconf_verify_lock);
 static void addrconf_join_anycast(struct inet6_ifaddr *ifp);
 static void addrconf_leave_anycast(struct inet6_ifaddr *ifp);
 
-static void addrconf_bonding_change(struct net_device *dev,
-				    unsigned long event);
+static void addrconf_type_change(struct net_device *dev,
+				 unsigned long event);
 static int addrconf_ifdown(struct net_device *dev, int how);
 
 static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags);
@@ -2582,9 +2582,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
 				return notifier_from_errno(err);
 		}
 		break;
-	case NETDEV_BONDING_OLDTYPE:
-	case NETDEV_BONDING_NEWTYPE:
-		addrconf_bonding_change(dev, event);
+	case NETDEV_TYPE_CHNG_START:
+	case NETDEV_TYPE_CHNG_DONE:
+		addrconf_type_change(dev, event);
 		break;
 	}
 
@@ -2599,16 +2599,16 @@ static struct notifier_block ipv6_dev_notf = {
 	.priority = 0
 };
 
-static void addrconf_bonding_change(struct net_device *dev, unsigned long event)
+static void addrconf_type_change(struct net_device *dev, unsigned long event)
 {
 	struct inet6_dev *idev;
 	ASSERT_RTNL();
 
 	idev = __in6_dev_get(dev);
 
-	if (event == NETDEV_BONDING_NEWTYPE)
+	if (event == NETDEV_TYPE_CHNG_DONE)
 		ipv6_mc_remap(idev);
-	else if (event == NETDEV_BONDING_OLDTYPE)
+	else if (event == NETDEV_TYPE_CHNG_START)
 		ipv6_mc_unmap(idev);
 }
 
-- 
1.6.6.1


^ permalink raw reply related

* [net-next-2.6 PATCH 0/3] bonding: refuse to change bond type if it's used V2
From: Jiri Pirko @ 2010-03-09 14:17 UTC (permalink / raw)
  To: netdev; +Cc: fubar, bonding-devel, davem, shemminger

Reworked version of patch/patchset. This time I use netdevice notifier as
Stephen suggested. Changed the name of the original ones (NETDEV_BONDING_*TYPE)
to be more general and reused them. Now the change is refused by brigde only.
I will follow up with vlan soon.

Jirka

^ permalink raw reply

* Re: [PATCH 10/13] bridge: Add multicast_router sysfs entries
From: Herbert Xu @ 2010-03-09 12:26 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David S. Miller, netdev
In-Reply-To: <20100309122526.GA12403@gondor.apana.org.au>

On Tue, Mar 09, 2010 at 08:25:26PM +0800, Herbert Xu wrote:
> 
> commit 0eff6a003b34eec7f7216a8cd93cb545e25196b1
> Author: Herbert Xu <herbert@gondor.apana.org.au>
> Date:   Tue Mar 9 20:21:20 2010 +0800
> 
>     bridge-utils: Add IGMP snooping support

And you need this patch on top to make setting values work:

commit de7d2ed12184b629511f8a5dfceb50cf1f73d52d
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Tue Mar 9 20:23:00 2010 +0800

    bridge-utils: Fix sysfs path in br_set
    
    The sysfs path was missing the "bridge" component.
    
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_devif.c
index 180c2f9..126027f 100644
--- a/libbridge/libbridge_devif.c
+++ b/libbridge/libbridge_devif.c
@@ -311,7 +311,8 @@ int br_set(const char *bridge, const char *name,
 	char path[SYSFS_PATH_MAX];
 	FILE *f;
 
-	snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/%s", bridge, name);
+	snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/bridge/%s", bridge,
+		 name);
 
 	f = fopen(path, "w");
 	if (f) {

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply related

* Re: [PATCH 10/13] bridge: Add multicast_router sysfs entries
From: Herbert Xu @ 2010-03-09 12:25 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David S. Miller, netdev
In-Reply-To: <20100226164211.1a02a31b@nehalam>

On Fri, Feb 26, 2010 at 04:42:11PM -0800, Stephen Hemminger wrote:
> 
> I like the functionality, but don't like users whacking on sysfs
> directly. Could you send patches to integrate a user API into
> bridge-utils; the utils are at: 
>   git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git

Here it is:

commit 0eff6a003b34eec7f7216a8cd93cb545e25196b1
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Tue Mar 9 20:21:20 2010 +0800

    bridge-utils: Add IGMP snooping support
    
    This patch adds support for setting/reading IGMP snooping parameters.
    
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/brctl/brctl_cmd.c b/brctl/brctl_cmd.c
index d37e99c..50dea20 100644
--- a/brctl/brctl_cmd.c
+++ b/brctl/brctl_cmd.c
@@ -247,6 +247,209 @@ static int br_cmd_setmaxage(int argc, char *const* argv)
 	return err != 0;
 }
 
+static int br_cmd_sethashel(int argc, char *const* argv)
+{
+	int elasticity;
+	int err;
+
+	if (sscanf(argv[2], "%i", &elasticity) != 1) {
+		fprintf(stderr,"bad elasticity\n");
+		return 1;
+	}
+	err = br_set(argv[1], "hash_elasticity", elasticity, 0);
+	if (err)
+		fprintf(stderr, "set hash elasticity failed: %s\n",
+			strerror(err));
+
+	return err != 0;
+}
+
+static int br_cmd_sethashmax(int argc, char *const* argv)
+{
+	int max;
+	int err;
+
+	if (sscanf(argv[2], "%i", &max) != 1) {
+		fprintf(stderr,"bad max\n");
+		return 1;
+	}
+	err = br_set(argv[1], "hash_max", max, 0);
+	if (err)
+		fprintf(stderr, "set hash max failed: %s\n", strerror(err));
+
+	return err != 0;
+}
+
+static int br_cmd_setmclmc(int argc, char *const* argv)
+{
+	int lmc;
+	int err;
+
+	if (sscanf(argv[2], "%i", &lmc) != 1) {
+		fprintf(stderr,"bad count\n");
+		return 1;
+	}
+	err = br_set(argv[1], "multicast_last_member_count", lmc, 0);
+	if (err)
+		fprintf(stderr, "set multicast last member count failed: %s\n",
+			strerror(err));
+
+	return err != 0;
+}
+
+static int br_cmd_setmcrouter(int argc, char *const* argv)
+{
+	int router;
+	int err;
+
+	if (sscanf(argv[2], "%i", &router) != 1) {
+		fprintf(stderr,"bad router\n");
+		return 1;
+	}
+	err = br_set(argv[1], "multicast_router", router, 0);
+	if (err)
+		fprintf(stderr, "set multicast router failed: %s\n",
+			strerror(err));
+
+	return err != 0;
+}
+
+static int br_cmd_setmcsnoop(int argc, char *const* argv)
+{
+	int snoop;
+	int err;
+
+	if (sscanf(argv[2], "%i", &snoop) != 1) {
+		fprintf(stderr,"bad snooping\n");
+		return 1;
+	}
+	err = br_set(argv[1], "multicast_snooping", snoop, 0);
+	if (err)
+		fprintf(stderr, "set multicast snooping failed: %s\n",
+			strerror(err));
+
+	return err != 0;
+}
+
+static int br_cmd_setmcsqc(int argc, char *const* argv)
+{
+	int sqc;
+	int err;
+
+	if (sscanf(argv[2], "%i", &sqc) != 1) {
+		fprintf(stderr,"bad count\n");
+		return 1;
+	}
+	err = br_set(argv[1], "multicast_startup_query_count", sqc, 0);
+	if (err)
+		fprintf(stderr, "set multicast startup query count failed: "
+				"%s\n", strerror(err));
+
+	return err != 0;
+}
+
+static int br_cmd_setmclmi(int argc, char *const* argv)
+{
+	struct timeval tv;
+	int err;
+
+	if (strtotimeval(&tv, argv[2])) {
+		fprintf(stderr, "bad interval\n");
+		return 1;
+	}
+	err = br_set_time(argv[1], "multicast_last_member_interval", &tv);
+	if (err)
+		fprintf(stderr, "set multicast last member interval failed: "
+				"%s\n", strerror(err));
+
+	return err != 0;
+}
+
+static int br_cmd_setmcmi(int argc, char *const* argv)
+{
+	struct timeval tv;
+	int err;
+
+	if (strtotimeval(&tv, argv[2])) {
+		fprintf(stderr, "bad interval\n");
+		return 1;
+	}
+	err = br_set_time(argv[1], "multicast_membership_interval", &tv);
+	if (err)
+		fprintf(stderr, "set multicast membership interval failed: "
+				"%s\n", strerror(err));
+
+	return err != 0;
+}
+
+static int br_cmd_setmcqpi(int argc, char *const* argv)
+{
+	struct timeval tv;
+	int err;
+
+	if (strtotimeval(&tv, argv[2])) {
+		fprintf(stderr, "bad interval\n");
+		return 1;
+	}
+	err = br_set_time(argv[1], "multicast_querier_interval", &tv);
+	if (err)
+		fprintf(stderr, "set multicast querier interval failed: %s\n",
+			strerror(err));
+
+	return err != 0;
+}
+
+static int br_cmd_setmcqi(int argc, char *const* argv)
+{
+	struct timeval tv;
+	int err;
+
+	if (strtotimeval(&tv, argv[2])) {
+		fprintf(stderr, "bad interval\n");
+		return 1;
+	}
+	err = br_set_time(argv[1], "multicast_query_interval", &tv);
+	if (err)
+		fprintf(stderr, "set multicast query interval failed: %s\n",
+			strerror(err));
+
+	return err != 0;
+}
+
+static int br_cmd_setmcqri(int argc, char *const* argv)
+{
+	struct timeval tv;
+	int err;
+
+	if (strtotimeval(&tv, argv[2])) {
+		fprintf(stderr, "bad interval\n");
+		return 1;
+	}
+	err = br_set_time(argv[1], "multicast_query_response_interval", &tv);
+	if (err)
+		fprintf(stderr, "set multicast query response interval "
+				"failed: %s\n", strerror(err));
+
+	return err != 0;
+}
+
+static int br_cmd_setmcsqi(int argc, char *const* argv)
+{
+	struct timeval tv;
+	int err;
+
+	if (strtotimeval(&tv, argv[2])) {
+		fprintf(stderr, "bad interval\n");
+		return 1;
+	}
+	err = br_set_time(argv[1], "multicast_startup_query_interval", &tv);
+	if (err)
+		fprintf(stderr, "set multicast startup query interval "
+				"failed: %s\n", strerror(err));
+
+	return err != 0;
+}
+
 static int br_cmd_setpathcost(int argc, char *const* argv)
 {
 	int cost, err;
@@ -280,6 +483,24 @@ static int br_cmd_setportprio(int argc, char *const* argv)
 	return err != 0;
 }
 
+static int br_cmd_setportmcrouter(int argc, char *const* argv)
+{
+	int router;
+	int err;
+
+	if (sscanf(argv[3], "%i", &router) != 1) {
+		fprintf(stderr, "bad router\n");
+		return 1;
+	}
+
+	err = br_set_port_mcrouter(argv[1], argv[2], router);
+	if (err)
+		fprintf(stderr, "set port multicast router failed: %s\n",
+			strerror(errno));
+
+	return err != 0;
+}
+
 static int br_cmd_stp(int argc, char *const* argv)
 {
 	int stp, err;
@@ -450,10 +671,36 @@ static const struct command commands[] = {
 	  "<bridge> <time>\t\tset hello time" },
 	{ 2, "setmaxage", br_cmd_setmaxage,
 	  "<bridge> <time>\t\tset max message age" },
+	{ 2, "sethashel", br_cmd_sethashel,
+	  "<bridge> <int>\t\tset hash elasticity" },
+	{ 2, "sethashmax", br_cmd_sethashmax,
+	  "<bridge> <int>\t\tset hash max" },
+	{ 2, "setmclmc", br_cmd_setmclmc,
+	  "<bridge> <int>\t\tset multicast last member count" },
+	{ 2, "setmcrouter", br_cmd_setmcrouter,
+	  "<bridge> <int>\t\tset multicast router" },
+	{ 2, "setmcsnoop", br_cmd_setmcsnoop,
+	  "<bridge> <int>\t\tset multicast snooping" },
+	{ 2, "setmcsqc", br_cmd_setmcsqc,
+	  "<bridge> <int>\t\tset multicast startup query count" },
+	{ 2, "setmclmi", br_cmd_setmclmi,
+	  "<bridge> <time>\t\tset multicast last member interval" },
+	{ 2, "setmcmi", br_cmd_setmcmi,
+	  "<bridge> <time>\t\tset multicast membership interval" },
+	{ 2, "setmcqpi", br_cmd_setmcqpi,
+	  "<bridge> <time>\t\tset multicast querier interval" },
+	{ 2, "setmcqi", br_cmd_setmcqi,
+	  "<bridge> <time>\t\tset multicast query interval" },
+	{ 2, "setmcqri", br_cmd_setmcqri,
+	  "<bridge> <time>\t\tset multicast query response interval" },
+	{ 2, "setmcqri", br_cmd_setmcsqi,
+	  "<bridge> <time>\t\tset multicast startup query interval" },
 	{ 3, "setpathcost", br_cmd_setpathcost, 
 	  "<bridge> <port> <cost>\tset path cost" },
 	{ 3, "setportprio", br_cmd_setportprio,
 	  "<bridge> <port> <prio>\tset port priority" },
+	{ 3, "setportmcrouter", br_cmd_setportmcrouter,
+	  "<bridge> <port> <int>\tset port multicast router" },
 	{ 0, "show", br_cmd_show, "\t\t\tshow a list of bridges" },
 	{ 1, "showmacs", br_cmd_showmacs, 
 	  "<bridge>\t\tshow a list of mac addrs"},
diff --git a/brctl/brctl_disp.c b/brctl/brctl_disp.c
index 3e81241..0cf64b8 100644
--- a/brctl/brctl_disp.c
+++ b/brctl/brctl_disp.c
@@ -88,6 +88,7 @@ static int dump_port_info(const char *br, const char *p,  void *arg)
 	printf("\n designated cost\t%4i", pinfo.designated_cost);
 	printf("\t\t\thold timer\t\t");
 	br_show_timer(&pinfo.hold_timer_value);
+	printf("\n mc router\t\t%4i", pinfo.multicast_router);
 	printf("\n flags\t\t\t");
 	if (pinfo.config_pending)
 		printf("CONFIG_PENDING ");
@@ -133,6 +134,26 @@ void br_dump_info(const char *br, const struct bridge_info *bri)
 	br_show_timer(&bri->topology_change_timer_value);
 	printf("\t\t\tgc timer\t\t");
 	br_show_timer(&bri->gc_timer_value);
+	printf("\n hash elasticity\t%4i", bri->hash_elasticity);
+	printf("\t\t\thash max\t\t%4i", bri->hash_max);
+	printf("\n mc last member count\t%4i",
+	       bri->multicast_last_member_count);
+	printf("\t\t\tmc init query count\t%4i",
+	       bri->multicast_startup_query_count);
+	printf("\n mc router\t\t%4i", bri->multicast_router);
+	printf("\t\t\tmc snooping\t\t%4i", bri->multicast_snooping);
+	printf("\n mc last member timer\t");
+	br_show_timer(&bri->multicast_last_member_interval);
+	printf("\t\t\tmc membership timer\t");
+	br_show_timer(&bri->multicast_membership_interval);
+	printf("\n mc querier timer\t");
+	br_show_timer(&bri->multicast_querier_interval);
+	printf("\t\t\tmc query interval\t");
+	br_show_timer(&bri->multicast_query_interval);
+	printf("\n mc response interval\t");
+	br_show_timer(&bri->multicast_query_response_interval);
+	printf("\t\t\tmc init query interval\t");
+	br_show_timer(&bri->multicast_startup_query_interval);
 	printf("\n flags\t\t\t");
 	if (bri->topology_change)
 		printf("TOPOLOGY_CHANGE ");
diff --git a/libbridge/libbridge.h b/libbridge/libbridge.h
index 39964f2..ae33ffd 100644
--- a/libbridge/libbridge.h
+++ b/libbridge/libbridge.h
@@ -39,6 +39,10 @@ struct bridge_info
 	struct bridge_id designated_root;
 	struct bridge_id bridge_id;
 	unsigned root_path_cost;
+	unsigned hash_elasticity;
+	unsigned hash_max;
+	unsigned multicast_last_member_count;
+	unsigned multicast_startup_query_count;
 	struct timeval max_age;
 	struct timeval hello_time;
 	struct timeval forward_delay;
@@ -49,11 +53,19 @@ struct bridge_info
 	unsigned char stp_enabled;
 	unsigned char topology_change;
 	unsigned char topology_change_detected;
+	unsigned char multicast_router;
+	unsigned char multicast_snooping;
 	struct timeval ageing_time;
 	struct timeval hello_timer_value;
 	struct timeval tcn_timer_value;
 	struct timeval topology_change_timer_value;
 	struct timeval gc_timer_value;
+	struct timeval multicast_last_member_interval;
+	struct timeval multicast_membership_interval;
+	struct timeval multicast_querier_interval;
+	struct timeval multicast_query_interval;
+	struct timeval multicast_query_response_interval;
+	struct timeval multicast_startup_query_interval;
 };
 
 struct fdb_entry
@@ -75,6 +87,7 @@ struct port_info
 	unsigned char top_change_ack;
 	unsigned char config_pending;
 	unsigned char state;
+	unsigned char multicast_router;
 	unsigned path_cost;
 	unsigned designated_cost;
 	struct timeval message_age_timer_value;
@@ -102,6 +115,9 @@ extern int br_add_bridge(const char *brname);
 extern int br_del_bridge(const char *brname);
 extern int br_add_interface(const char *br, const char *dev);
 extern int br_del_interface(const char *br, const char *dev);
+extern int br_set(const char *bridge, const char *name,
+		  unsigned long value, unsigned long oldcode);
+extern int br_set_time(const char *br, const char *name, struct timeval *tv);
 extern int br_set_bridge_forward_delay(const char *br, struct timeval *tv);
 extern int br_set_bridge_hello_time(const char *br, struct timeval *tv);
 extern int br_set_bridge_max_age(const char *br, struct timeval *tv);
@@ -110,6 +126,8 @@ extern int br_set_stp_state(const char *br, int stp_state);
 extern int br_set_bridge_priority(const char *br, int bridge_priority);
 extern int br_set_port_priority(const char *br, const char *p, 
 				int port_priority);
+extern int br_set_port_mcrouter(const char *bridge, const char *port,
+				int value);
 extern int br_set_path_cost(const char *br, const char *p, 
 			    int path_cost);
 extern int br_read_fdb(const char *br, struct fdb_entry *fdbs, 
diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_devif.c
index aa8bc36..180c2f9 100644
--- a/libbridge/libbridge_devif.c
+++ b/libbridge/libbridge_devif.c
@@ -189,6 +189,28 @@ int br_get_bridge_info(const char *bridge, struct bridge_info *info)
 	info->topology_change = fetch_int(path, "topology_change");
 	info->topology_change_detected = fetch_int(path, "topology_change_detected");
 
+	info->hash_elasticity = fetch_int(path, "hash_elasticity");
+	info->hash_max = fetch_int(path, "hash_max");
+	info->multicast_last_member_count =
+		fetch_int(path, "multicast_last_member_count");
+	info->multicast_router = fetch_int(path, "multicast_router");
+	info->multicast_snooping = fetch_int(path, "multicast_snooping");
+	info->multicast_startup_query_count =
+		fetch_int(path, "multicast_startup_query_count");
+
+	fetch_tv(path, "multicast_last_member_interval",
+		 &info->multicast_last_member_interval);
+	fetch_tv(path, "multicast_membership_interval",
+		 &info->multicast_membership_interval);
+	fetch_tv(path, "multicast_querier_interval",
+		 &info->multicast_querier_interval);
+	fetch_tv(path, "multicast_query_interval",
+		 &info->multicast_query_interval);
+	fetch_tv(path, "multicast_query_response_interval",
+		 &info->multicast_query_response_interval);
+	fetch_tv(path, "multicast_startup_query_interval",
+		 &info->multicast_startup_query_interval);
+
 	closedir(dir);
 	return 0;
 
@@ -272,6 +294,7 @@ int br_get_port_info(const char *brname, const char *port,
 	fetch_tv(path, "forward_delay_timer", &info->forward_delay_timer_value);
 	fetch_tv(path, "hold_timer", &info->hold_timer_value);
 	info->hairpin_mode = fetch_int(path, "hairpin_mode");
+	info->multicast_router = fetch_int(path, "multicast_router");
 
 	closedir(d);
 
@@ -281,8 +304,8 @@ fallback:
 }
 
 
-static int br_set(const char *bridge, const char *name,
-		  unsigned long value, unsigned long oldcode)
+int br_set(const char *bridge, const char *name,
+	   unsigned long value, unsigned long oldcode)
 {
 	int ret;
 	char path[SYSFS_PATH_MAX];
@@ -294,7 +317,7 @@ static int br_set(const char *bridge, const char *name,
 	if (f) {
 		ret = fprintf(f, "%ld\n", value);
 		fclose(f);
-	} else {
+	} else if (oldcode) {
 		/* fallback to old ioctl */
 		struct ifreq ifr;
 		unsigned long args[4] = { oldcode, value, 0, 0 };
@@ -302,11 +325,17 @@ static int br_set(const char *bridge, const char *name,
 		strncpy(ifr.ifr_name, bridge, IFNAMSIZ);
 		ifr.ifr_data = (char *) &args;
 		ret = ioctl(br_socket_fd, SIOCDEVPRIVATE, &ifr);
-	}
+	} else
+		return ENOSYS;
 
 	return ret < 0 ? errno : 0;
 }
 
+int br_set_time(const char *br, const char *name, struct timeval *tv)
+{
+	return br_set(br, name, __tv_to_jiffies(tv), 0);
+}
+
 int br_set_bridge_forward_delay(const char *br, struct timeval *tv)
 {
 	return br_set(br, "forward_delay", __tv_to_jiffies(tv),
@@ -355,7 +384,7 @@ static int port_set(const char *bridge, const char *ifname,
 	if (f) {
 		ret = fprintf(f, "%ld\n", value);
 		fclose(f);
-	} else {
+	} else if (oldcode) {
 		int index = get_portno(bridge, ifname);
 
 		if (index < 0)
@@ -368,7 +397,8 @@ static int port_set(const char *bridge, const char *ifname,
 			ifr.ifr_data = (char *) &args;
 			ret = ioctl(br_socket_fd, SIOCDEVPRIVATE, &ifr);
 		}
-	}
+	} else
+		return ENOSYS;
 
 	return ret < 0 ? errno : 0;
 }
@@ -378,6 +408,11 @@ int br_set_port_priority(const char *bridge, const char *port, int priority)
 	return port_set(bridge, port, "priority", priority, BRCTL_SET_PORT_PRIORITY);
 }
 
+int br_set_port_mcrouter(const char *bridge, const char *port, int value)
+{
+	return port_set(bridge, port, "multicast_router", value, 0);
+}
+
 int br_set_path_cost(const char *bridge, const char *port, int cost)
 {
 	return port_set(bridge, port, "path_cost", cost, BRCTL_SET_PATH_COST);

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply related

* [GIT]: Networking
From: David Miller @ 2010-03-09 12:18 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, netdev, linux-kernel


Eric Dumazet is looking into a TCP stall regression in 2.6.34-rc1,
but other than that we should be mostly fine after these fixes.

1) bfin_can build fix from Barry Song.

2) gianfar TX ring SMP race fix from Anton Vorontsov

3) Add support for smc91x on Qualcomm MSM boards, from David Brown.

4) Hot plug removal crash fix in cxgb3 from Divy Le Ray.

5) It's possible to bombard a socket sufficiently such that
   socket backlog accumulates forever.  Put in a limit point at
   which we'll simply start dropping frames.  From Zhu Yi and
   Eric Dumazet.

6) Barrier fixes in r8169 and typhoon from David Dillow.

7) MAINTAINER tweaks for CAN protocol and bridge.

8) Fix excessive route cache rebuilds, from Eric Dumazet.

9) Fix TCP synack packet sizing, also from Eric.

10) CPMAC bug fixes for VLAN receive, and PHY chip fallbacks,
    from Florian Fainelli.

11) Fix RCU handling in bridging code, from Herbert Xu.

12) Fix ipsec flow ID handling, also from Herbert.

13) Fix address length check regression in AF_PACKET, from Jiri Pirko.

14) %pI4 conversion in sunrpc from Joe Perches.  Joe sent this two
    months ago and the NFS folks didn't integrate, Trond told me
    I could take this in via net-2.6 if I like so that's what I've
    done.

15) TIPC oops and RX filtering fixes from Neil Horman.

16) QLCNIC bug fixes from Sucheta Chakraborty.  ETHTOOL get
    TX csum status was horked, add some missing driver stats,
    multicast addr handling fix, and better firmware image
    validation.

17) GRE tunnel header destination address checking fix from Timo Teräs.

18) Missing change to remove obsoleted bnx2x firmware, from
    Vladislav Zolotarov.

19) IPV6 addrconf timer bug fixes from Stephen Hemminger.

20) Fix for packet corruption and TX hang over NFSv2 in
    e1000e, from Jesse Brandeburg.

21) Pegasus USB ID addition, from Petko Manolov.

22) Various use-after-free, leak, et al. fixes from Dan Carpenter.

23) 4K buffer on kernel stack regression fix in Bluetooth from Marcel
    Holtmann.

24) When Ingo added the sync wakeup hints to the networking
    socket handling, he missed tcp_prequeue().  From Mike Galbraith.

25) And the usual assortment of wireless fixes and cures from
    John Linville and the crew.

Please pull, thanks a lot!

The following changes since commit 57d54889cd00db2752994b389ba714138652e60c:
  Linus Torvalds (1):
        Linux 2.6.34-rc1

are available in the git repository at:

  master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git master

Ajit Khaparde (2):
      be2net: remove usage of be_pci_func
      be2net: remove unused code in be_load_fw

Amit Kumar Salecha (2):
      qlcnic: fix bios version check
      qlcnic: remove extra space from board names

Anton Vorontsov (1):
      gianfar: Fix TX ring processing on SMP machines

Barry Song (1):
      can: fix bfin_can build error after alloc_candev() change

Breno Leitao (1):
      s2io: Fixing debug message

Bryan Polk (1):
      rt2x00: Add USB ID for CEIVA adapter to rt73usb

Dan Carpenter (8):
      zd1211rw: fix potential array underflow
      cpmac: use after free
      cassini: fix off by one
      davinci_emac: off by one
      bridge: cleanup: remove unneed check
      ems_usb: cleanup: remove uneeded check
      sock.c: potential null dereference
      irda-usb: add error handling and fix leak

David Brown (1):
      net: smc91x: Support Qualcomm MSM development boards.

David Dillow (2):
      r8169: use correct barrier between cacheable and non-cacheable memory
      typhoon: fix incorrect use of smp_wmb()

David S. Miller (2):
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next-2.6
      MAINTAINERS: Add netdev to bridge entry.

Divy Le Ray (1):
      cxgb3: fix hot plug removal crash

Eric Dumazet (4):
      tcp: Add SNMP counters for backlog and min_ttl drops
      net: fix route cache rebuilds
      tcp: Fix tcp_make_synack()
      ethtool: Use noinline_for_stack

Figo.zhang (1):
      fix a race in ks8695_poll

Florian Fainelli (3):
      cpmac: fix the receiving of 802.1q frames
      cpmac: fallback to switch mode if no PHY chip found
      cpmac: bump version to 0.5.2

Helmut Schaa (2):
      rt2x00: fix rt2800pci compilation with SoC
      rt2x00: Export rt2x00soc_probe from rt2x00soc

Herbert Xu (3):
      ipsec: Fix bogus bundle flowi
      bridge: Use RCU list primitive in __br_mdb_ip_get
      bridge: Fix RCU race in br_multicast_stop

Jeff Garzik (2):
      ethtool: Add direct access to ops->get_sset_count
      ethtool: Add direct access to ops->get_sset_count

Jesse Brandeburg (1):
      e1000e: fix packet corruption and tx hang during NFSv2

Jiri Pirko (2):
      af_packet: move strict addr_len check right before dev_[mc/unicast]_[add/del]
      rndis_wlan: correct multicast_list handling V3

Joe Perches (2):
      net/sunrpc: Remove uses of NIPQUAD, use %pI4
      net/sunrpc: Convert (void)snprintf to snprintf

Johannes Berg (2):
      ar9170: load firmware asynchronously
      iwlwifi: load firmware asynchronously before mac80211 registration

Jouni Malinen (1):
      mac80211: Fix reassociation processing (within ESS roaming)

Marcel Holtmann (1):
      Bluetooth: Use single_open() for inquiry cache within debugfs

Matthew Garrett (1):
      rfkill: Add support for KEY_RFKILL

Mike Galbraith (1):
      net: add scheduler sync hint to tcp_prequeue().

Ming Lei (1):
      ath9k: fix lockdep warning when unloading module

Neil Horman (3):
      tipc: Fix oops on send prior to entering networked mode (v3)
      tipc: fix endianness on tipc subscriber messages
      tipc: filter out messages not intended for this host

Oliver Hartkopp (1):
      MAINTAINER: Correct CAN Maintainer responsibilities and paths

Petko Manolov (1):
      another pegasus usb net device

Randy Dunlap (1):
      bridge: depends on INET

Sarveshwar Bandi (1):
      be2net: download NCSI section during firmware update

Stanislaw Gruszka (1):
      airo: return from set_wep_key() when key length is zero

Sucheta Chakraborty (4):
      qlcnic: fix tx csum status
      qlcnic: additional driver statistics.
      qlcnic: fix multicast handling
      qlcnic: validate unified fw image

Sujith (1):
      mac80211: Fix HT rate control configuration

Timo Teräs (1):
      gre: fix hard header destination address checking

Vladislav Zolotarov (1):
      bnx2x: Removed FW 5.2.7

Wolfgang Grandegger (1):
      MAINTAINERS: add netdev to CAN network layer and drivers entries

YOSHIFUJI Hideaki / 吉藤英明 (1):
      ipv6: Optmize translation between IPV6_PREFER_SRC_xxx and RT6_LOOKUP_F_xxx.

Zhu Yi (9):
      net: add limit for socket backlog
      tcp: use limited socket backlog
      udp: use limited socket backlog
      llc: use limited socket backlog
      sctp: use limited socket backlog
      tipc: use limited socket backlog
      x25: use limited socket backlog
      net: backlog functions rename
      net: add __must_check to sk_add_backlog

stephen hemminger (4):
      IPv6: addrconf dad timer unnecessary bh_disable
      IPv6: addrconf timer race
      IPv6: addrconf notify when address is unavailable
      IPv6: fix race between cleanup and add/delete address

 MAINTAINERS                              |   21 +-
 drivers/net/arm/ks8695net.c              |    2 +-
 drivers/net/benet/be.h                   |    5 -
 drivers/net/benet/be_cmds.c              |    6 -
 drivers/net/benet/be_hw.h                |    5 +-
 drivers/net/benet/be_main.c              |   25 +-
 drivers/net/can/bfin_can.c               |    3 +-
 drivers/net/can/usb/ems_usb.c            |    4 +-
 drivers/net/cassini.c                    |    2 +-
 drivers/net/cpmac.c                      |   14 +-
 drivers/net/cxgb3/cxgb3_main.c           |    1 +
 drivers/net/davinci_emac.c               |    2 +-
 drivers/net/e1000e/defines.h             |    2 +
 drivers/net/e1000e/ich8lan.c             |   10 +
 drivers/net/gianfar.c                    |    5 +-
 drivers/net/irda/irda-usb.c              |    4 +
 drivers/net/qlcnic/qlcnic.h              |   13 +-
 drivers/net/qlcnic/qlcnic_ethtool.c      |   17 +
 drivers/net/qlcnic/qlcnic_hw.c           |   32 +-
 drivers/net/qlcnic/qlcnic_init.c         |  156 +-
 drivers/net/qlcnic/qlcnic_main.c         |    5 +
 drivers/net/r8169.c                      |    4 +-
 drivers/net/s2io.c                       |    6 +-
 drivers/net/smc91x.h                     |   14 +
 drivers/net/typhoon.c                    |    6 +-
 drivers/net/usb/pegasus.h                |    6 +-
 drivers/net/wireless/airo.c              |    3 +-
 drivers/net/wireless/ath/ar9170/ar9170.h |    1 +
 drivers/net/wireless/ath/ar9170/main.c   |   10 +-
 drivers/net/wireless/ath/ar9170/usb.c    |  170 +-
 drivers/net/wireless/ath/ath9k/rc.c      |    6 +-
 drivers/net/wireless/ath/ath9k/xmit.c    |    4 +-
 drivers/net/wireless/iwlwifi/iwl-agn.c   |  157 +-
 drivers/net/wireless/iwlwifi/iwl-dev.h   |    2 +
 drivers/net/wireless/rndis_wlan.c        |   66 +-
 drivers/net/wireless/rt2x00/rt2800pci.c  |    2 +-
 drivers/net/wireless/rt2x00/rt2x00soc.c  |    1 +
 drivers/net/wireless/rt2x00/rt73usb.c    |    2 +
 drivers/net/wireless/zd1211rw/zd_mac.c   |   10 +-
 firmware/bnx2x-e1-5.2.7.0.fw.ihex        |10178 -----------------------
 firmware/bnx2x-e1h-5.2.7.0.fw.ihex       |12847 ------------------------------
 include/linux/ethtool.h                  |   24 +-
 include/linux/rfkill.h                   |    2 +-
 include/linux/snmp.h                     |    2 +
 include/net/ip6_route.h                  |   18 +
 include/net/mac80211.h                   |    3 +-
 include/net/sock.h                       |   17 +-
 include/net/tcp.h                        |    2 +-
 include/net/xfrm.h                       |    3 +-
 net/bluetooth/hci_sysfs.c                |   41 +-
 net/bridge/Kconfig                       |    1 +
 net/bridge/br_multicast.c                |    8 +-
 net/core/ethtool.c                       |  103 +-
 net/core/sock.c                          |   19 +-
 net/dccp/minisocks.c                     |    2 +-
 net/ipv4/ip_gre.c                        |    7 +-
 net/ipv4/proc.c                          |    2 +
 net/ipv4/route.c                         |   50 +-
 net/ipv4/tcp_ipv4.c                      |   11 +-
 net/ipv4/tcp_minisocks.c                 |    2 +-
 net/ipv4/tcp_output.c                    |   18 +-
 net/ipv4/udp.c                           |    6 +-
 net/ipv4/xfrm4_policy.c                  |    5 +-
 net/ipv6/addrconf.c                      |  102 +-
 net/ipv6/fib6_rules.c                    |   11 +-
 net/ipv6/route.c                         |   11 +-
 net/ipv6/tcp_ipv6.c                      |    7 +-
 net/ipv6/udp.c                           |   28 +-
 net/ipv6/xfrm6_policy.c                  |    3 +-
 net/llc/llc_c_ac.c                       |    2 +-
 net/llc/llc_conn.c                       |    3 +-
 net/mac80211/mlme.c                      |   19 +-
 net/mac80211/rate.h                      |    5 +-
 net/packet/af_packet.c                   |    6 +-
 net/rfkill/input.c                       |    8 +
 net/sctp/input.c                         |   42 +-
 net/sctp/socket.c                        |    3 +
 net/sunrpc/xprtrdma/transport.c          |    7 +-
 net/sunrpc/xprtsock.c                    |    9 +-
 net/tipc/bearer.c                        |   37 +-
 net/tipc/bearer.h                        |    2 +-
 net/tipc/link.c                          |    9 +
 net/tipc/net.c                           |   25 +-
 net/tipc/socket.c                        |    6 +-
 net/tipc/subscr.c                        |   57 +-
 net/tipc/subscr.h                        |    2 -
 net/x25/x25_dev.c                        |    2 +-
 net/xfrm/xfrm_policy.c                   |    7 +-
 88 files changed, 985 insertions(+), 23603 deletions(-)
 delete mode 100644 firmware/bnx2x-e1-5.2.7.0.fw.ihex
 delete mode 100644 firmware/bnx2x-e1h-5.2.7.0.fw.ihex

^ permalink raw reply

* [PATCH] net: davinci emac: use dma_{map, unmap}_single API for cache coherency
From: Sekhar Nori @ 2010-03-09 11:20 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA
  Cc: srk-l0cyMroinI0,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/

The davinci emac driver uses some ARM specific DMA APIs
for cache coherency which have been removed from kernel
with the 2.6.34 merge.

Modify the driver to use the dma_{map, unmap}_single() APIs
defined in dma-mapping.h

Without this fix, the driver fails to compile on Linus's
tree.

Tested on DM365 and OMAP-L138 EVMs.

Signed-off-by: Sekhar Nori <nsekhar-l0cyMroinI0@public.gmane.org>
---
Applies to latest of Linus's tree.

 drivers/net/davinci_emac.c |   45 +++++++++++++++++++++++++------------------
 1 files changed, 26 insertions(+), 19 deletions(-)

diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 1ac9440..ef0dacf 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -29,10 +29,6 @@
  *     PHY layer usage
  */
 
-/** Pending Items in this driver:
- * 1. Use Linux cache infrastcture for DMA'ed memory (dma_xxx functions)
- */
-
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
@@ -504,12 +500,6 @@ static unsigned long mdio_max_freq;
 
 /* Cache macros - Packet buffers would be from skb pool which is cached */
 #define EMAC_VIRT_NOCACHE(addr) (addr)
-#define EMAC_CACHE_INVALIDATE(addr, size) \
-	dma_cache_maint((void *)addr, size, DMA_FROM_DEVICE)
-#define EMAC_CACHE_WRITEBACK(addr, size) \
-	dma_cache_maint((void *)addr, size, DMA_TO_DEVICE)
-#define EMAC_CACHE_WRITEBACK_INVALIDATE(addr, size) \
-	dma_cache_maint((void *)addr, size, DMA_BIDIRECTIONAL)
 
 /* DM644x does not have BD's in cached memory - so no cache functions */
 #define BD_CACHE_INVALIDATE(addr, size)
@@ -1235,6 +1225,10 @@ static void emac_txch_teardown(struct emac_priv *priv, u32 ch)
 	if (1 == txch->queue_active) {
 		curr_bd = txch->active_queue_head;
 		while (curr_bd != NULL) {
+			dma_unmap_single(emac_dev, curr_bd->buff_ptr,
+				curr_bd->off_b_len & EMAC_RX_BD_BUF_SIZE,
+				DMA_TO_DEVICE);
+
 			emac_net_tx_complete(priv, (void __force *)
 					&curr_bd->buf_token, 1, ch);
 			if (curr_bd != txch->active_queue_tail)
@@ -1327,6 +1321,11 @@ static int emac_tx_bdproc(struct emac_priv *priv, u32 ch, u32 budget)
 				txch->queue_active = 0; /* end of queue */
 			}
 		}
+
+		dma_unmap_single(emac_dev, curr_bd->buff_ptr,
+				curr_bd->off_b_len & EMAC_RX_BD_BUF_SIZE,
+				DMA_TO_DEVICE);
+
 		*tx_complete_ptr = (u32) curr_bd->buf_token;
 		++tx_complete_ptr;
 		++tx_complete_cnt;
@@ -1387,8 +1386,8 @@ static int emac_send(struct emac_priv *priv, struct emac_netpktobj *pkt, u32 ch)
 
 	txch->bd_pool_head = curr_bd->next;
 	curr_bd->buf_token = buf_list->buf_token;
-	/* FIXME buff_ptr = dma_map_single(... data_ptr ...) */
-	curr_bd->buff_ptr = virt_to_phys(buf_list->data_ptr);
+	curr_bd->buff_ptr = dma_map_single(&priv->ndev->dev, buf_list->data_ptr,
+			buf_list->length, DMA_TO_DEVICE);
 	curr_bd->off_b_len = buf_list->length;
 	curr_bd->h_next = 0;
 	curr_bd->next = NULL;
@@ -1468,7 +1467,6 @@ static int emac_dev_xmit(struct sk_buff *skb, struct net_device *ndev)
 	tx_buf.length = skb->len;
 	tx_buf.buf_token = (void *)skb;
 	tx_buf.data_ptr = skb->data;
-	EMAC_CACHE_WRITEBACK((unsigned long)skb->data, skb->len);
 	ndev->trans_start = jiffies;
 	ret_code = emac_send(priv, &tx_packet, EMAC_DEF_TX_CH);
 	if (unlikely(ret_code != 0)) {
@@ -1543,7 +1541,6 @@ static void *emac_net_alloc_rx_buf(struct emac_priv *priv, int buf_size,
 	p_skb->dev = ndev;
 	skb_reserve(p_skb, NET_IP_ALIGN);
 	*data_token = (void *) p_skb;
-	EMAC_CACHE_WRITEBACK_INVALIDATE((unsigned long)p_skb->data, buf_size);
 	return p_skb->data;
 }
 
@@ -1612,8 +1609,8 @@ static int emac_init_rxch(struct emac_priv *priv, u32 ch, char *param)
 		/* populate the hardware descriptor */
 		curr_bd->h_next = emac_virt_to_phys(rxch->active_queue_head,
 				priv);
-		/* FIXME buff_ptr = dma_map_single(... data_ptr ...) */
-		curr_bd->buff_ptr = virt_to_phys(curr_bd->data_ptr);
+		curr_bd->buff_ptr = dma_map_single(emac_dev, curr_bd->data_ptr,
+				rxch->buf_size, DMA_FROM_DEVICE);
 		curr_bd->off_b_len = rxch->buf_size;
 		curr_bd->mode = EMAC_CPPI_OWNERSHIP_BIT;
 
@@ -1697,6 +1694,12 @@ static void emac_cleanup_rxch(struct emac_priv *priv, u32 ch)
 		curr_bd = rxch->active_queue_head;
 		while (curr_bd) {
 			if (curr_bd->buf_token) {
+				dma_unmap_single(&priv->ndev->dev,
+					curr_bd->buff_ptr,
+					curr_bd->off_b_len
+						& EMAC_RX_BD_BUF_SIZE,
+					DMA_FROM_DEVICE);
+
 				dev_kfree_skb_any((struct sk_buff *)\
 						  curr_bd->buf_token);
 			}
@@ -1871,8 +1874,8 @@ static void emac_addbd_to_rx_queue(struct emac_priv *priv, u32 ch,
 
 	/* populate the hardware descriptor */
 	curr_bd->h_next = 0;
-	/* FIXME buff_ptr = dma_map_single(... buffer ...) */
-	curr_bd->buff_ptr = virt_to_phys(buffer);
+	curr_bd->buff_ptr = dma_map_single(&priv->ndev->dev, buffer,
+				rxch->buf_size, DMA_FROM_DEVICE);
 	curr_bd->off_b_len = rxch->buf_size;
 	curr_bd->mode = EMAC_CPPI_OWNERSHIP_BIT;
 	curr_bd->next = NULL;
@@ -1927,7 +1930,6 @@ static int emac_net_rx_cb(struct emac_priv *priv,
 	p_skb = (struct sk_buff *)net_pkt_list->pkt_token;
 	/* set length of packet */
 	skb_put(p_skb, net_pkt_list->pkt_length);
-	EMAC_CACHE_INVALIDATE((unsigned long)p_skb->data, p_skb->len);
 	p_skb->protocol = eth_type_trans(p_skb, priv->ndev);
 	netif_receive_skb(p_skb);
 	priv->net_dev_stats.rx_bytes += net_pkt_list->pkt_length;
@@ -1990,6 +1992,11 @@ static int emac_rx_bdproc(struct emac_priv *priv, u32 ch, u32 budget)
 		rx_buf_obj->data_ptr = (char *)curr_bd->data_ptr;
 		rx_buf_obj->length = curr_bd->off_b_len & EMAC_RX_BD_BUF_SIZE;
 		rx_buf_obj->buf_token = curr_bd->buf_token;
+
+		dma_unmap_single(&priv->ndev->dev, curr_bd->buff_ptr,
+				curr_bd->off_b_len & EMAC_RX_BD_BUF_SIZE,
+				DMA_FROM_DEVICE);
+
 		curr_pkt->pkt_token = curr_pkt->buf_list->buf_token;
 		curr_pkt->num_bufs = 1;
 		curr_pkt->pkt_length =
-- 
1.6.2.4

^ permalink raw reply related

* Re: [RFC][PATCH] ns: Syscalls for better namespace sharing control.
From: Daniel Lezcano @ 2010-03-09 10:26 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: Pavel Emelyanov, Sukadev Bhattiprolu, Serge Hallyn,
	Linux Netdev List, containers, Netfilter Development Mailinglist,
	Ben Greear
In-Reply-To: <m1ocixn6q3.fsf@fess.ebiederm.org>

Eric W. Biederman wrote:
> Daniel Lezcano <daniel.lezcano@free.fr> writes:
>
>   
>> Eric W. Biederman wrote:
>>
>> [ ... ]
>>     
>>> I guess my meaning is I was expecting.
>>> child = fork();
>>> if (child == 0) {
>>> 	execve(...);
>>> }
>>> waitpid(child);
>>>
>>> This puts /bin/sh in the container as well.
>>>   
>>>       
>> #include <unistd.h>
>> #include <stdlib.h>
>> #include <stdio.h>
>> #include <syscall.h>
>> #include <sys/types.h>
>> #include <sys/stat.h>
>> #include <fcntl.h>
>> #include <sys/param.h>
>>
>> #define __NR_setns 300
>>
>> int setns(int nstype, int fd)
>> {
>>    return syscall (__NR_setns, nstype, fd);
>> }
>>
>> int main(int argc, char *argv[])
>> {
>>    char path[MAXPATHLEN];
>>    char *ns[] = { "pid", "mnt", "net", "pid", "uts" };
>>    const int size = sizeof(ns) / sizeof(char *);
>>    int fd[size];
>>    int i;
>>    pid_t pid;
>>    if (argc != 3) {
>>        fprintf(stderr, "mynsenter <pid> <command>\n");
>>        exit(1);
>>    }
>>
>>    for (i = 0; i < size; i++) {
>>            sprintf(path, "/proc/%s/ns/%s", argv[1], ns[i]);
>>
>>        fd[i] = open(path, O_RDONLY| FD_CLOEXEC);
>>        if (fd[i] < 0) {
>>            perror("open");
>>            return -1;
>>        }
>>
>>    }
>>    for (i = 0; i < size; i++)
>>        if (setns(0, fd[i])) {
>>            perror("setns");
>>            return -1;
>>        }
>>
>>    pid = fork();
>>    if (!pid) {
>>
>>        fprintf(stderr, "mypid is %d\n", syscall(__NR_getpid));
>>
>>        execve(argv[2], &argv[2], NULL);
>>        perror("execve");
>>
>>    }
>>
>>    if (pid < 0) {
>>        perror("fork");
>>        return -1;
>>    }
>>
>>    if (waitpid(&pid, NULL, 0) < 0) {
>>        perror("waitpid");
>>    }
>>
>>    return 0;
>> }
>>     
>
> &pid ???  Isn't that a type error?
>   
argh ! right :)

Sorry for the noise. Works well now.


^ permalink raw reply

* Re: [RFC][PATCH] ns: Syscalls for better namespace sharing control.
From: Eric W. Biederman @ 2010-03-09 10:13 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Pavel Emelyanov, Sukadev Bhattiprolu, Serge Hallyn,
	Linux Netdev List, containers, Netfilter Development Mailinglist,
	Ben Greear
In-Reply-To: <4B961D09.4010802@free.fr>

Daniel Lezcano <daniel.lezcano@free.fr> writes:

> Eric W. Biederman wrote:
>
> [ ... ]
>> I guess my meaning is I was expecting.
>> child = fork();
>> if (child == 0) {
>> 	execve(...);
>> }
>> waitpid(child);
>>
>> This puts /bin/sh in the container as well.
>>   
> #include <unistd.h>
> #include <stdlib.h>
> #include <stdio.h>
> #include <syscall.h>
> #include <sys/types.h>
> #include <sys/stat.h>
> #include <fcntl.h>
> #include <sys/param.h>
>
> #define __NR_setns 300
>
> int setns(int nstype, int fd)
> {
>    return syscall (__NR_setns, nstype, fd);
> }
>
> int main(int argc, char *argv[])
> {
>    char path[MAXPATHLEN];
>    char *ns[] = { "pid", "mnt", "net", "pid", "uts" };
>    const int size = sizeof(ns) / sizeof(char *);
>    int fd[size];
>    int i;
>    pid_t pid;
>    if (argc != 3) {
>        fprintf(stderr, "mynsenter <pid> <command>\n");
>        exit(1);
>    }
>
>    for (i = 0; i < size; i++) {
>            sprintf(path, "/proc/%s/ns/%s", argv[1], ns[i]);
>
>        fd[i] = open(path, O_RDONLY| FD_CLOEXEC);
>        if (fd[i] < 0) {
>            perror("open");
>            return -1;
>        }
>
>    }
>    for (i = 0; i < size; i++)
>        if (setns(0, fd[i])) {
>            perror("setns");
>            return -1;
>        }
>
>    pid = fork();
>    if (!pid) {
>
>        fprintf(stderr, "mypid is %d\n", syscall(__NR_getpid));
>
>        execve(argv[2], &argv[2], NULL);
>        perror("execve");
>
>    }
>
>    if (pid < 0) {
>        perror("fork");
>        return -1;
>    }
>
>    if (waitpid(&pid, NULL, 0) < 0) {
>        perror("waitpid");
>    }
>
>    return 0;
> }

&pid ???  Isn't that a type error?

> Waitpid returns an error:
>
> waitpid: No child processes
>
> The pid number returned by fork is the pid from the init pid namespace but it
> seems waitpid is waiting for a pid belonging to the child pid namespace.
>
> waitpid
> -> wait4
>   -> find_get_pid
>     -> find_vpid
>       -> find_pid_ns(nr, current->nsproxy->pid_ns);

But it isn't.  It is.
           find_pid_ns(nr, task_active_pid_ns(current));
Which is:
           find_pid_ns(nr, ns_of_pid(task_pid(current)));
           
Which is a value that doesn't change.  When we attach to a pid namespace.

> The current->nsproxy->pid_ns is the one of the namespace we attached to. So the
> real pid returned by the fork does not exist in this pid namespace.
> Maybe fork should return a pid number belonging to the current pid namespace we
> are attached no ?

Do you not have my patch that changed that?

Eric


^ permalink raw reply

* Re: [RFC][PATCH] ns: Syscalls for better namespace sharing control.
From: Daniel Lezcano @ 2010-03-09 10:03 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: Pavel Emelyanov, Sukadev Bhattiprolu, Serge Hallyn,
	Linux Netdev List, containers, Netfilter Development Mailinglist,
	Ben Greear
In-Reply-To: <m1lje2qzf4.fsf@fess.ebiederm.org>

Eric W. Biederman wrote:

[ ... ]
> I guess my meaning is I was expecting.
> child = fork();
> if (child == 0) {
> 	execve(...);
> }
> waitpid(child);
>
> This puts /bin/sh in the container as well.
>   
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <syscall.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/param.h>

#define __NR_setns 300

int setns(int nstype, int fd)
{
    return syscall (__NR_setns, nstype, fd);
}

int main(int argc, char *argv[])
{
    char path[MAXPATHLEN];
    char *ns[] = { "pid", "mnt", "net", "pid", "uts" };
    const int size = sizeof(ns) / sizeof(char *);
    int fd[size];
    int i;
    pid_t pid;
   
    if (argc != 3) {
        fprintf(stderr, "mynsenter <pid> <command>\n");
        exit(1);
    }

    for (i = 0; i < size; i++) {
       
        sprintf(path, "/proc/%s/ns/%s", argv[1], ns[i]);

        fd[i] = open(path, O_RDONLY| FD_CLOEXEC);
        if (fd[i] < 0) {
            perror("open");
            return -1;
        }

    }
   
    for (i = 0; i < size; i++)
        if (setns(0, fd[i])) {
            perror("setns");
            return -1;
        }

    pid = fork();
    if (!pid) {

        fprintf(stderr, "mypid is %d\n", syscall(__NR_getpid));

        execve(argv[2], &argv[2], NULL);
        perror("execve");

    }

    if (pid < 0) {
        perror("fork");
        return -1;
    }

    if (waitpid(&pid, NULL, 0) < 0) {
        perror("waitpid");
    }

    return 0;
}

Waitpid returns an error:

waitpid: No child processes

The pid number returned by fork is the pid from the init pid namespace 
but it seems waitpid is waiting for a pid belonging to the child pid 
namespace.

waitpid
 -> wait4
   -> find_get_pid
     -> find_vpid
       -> find_pid_ns(nr, current->nsproxy->pid_ns);

The current->nsproxy->pid_ns is the one of the namespace we attached to. 
So the real pid returned by the fork does not exist in this pid namespace.
Maybe fork should return a pid number belonging to the current pid 
namespace we are attached no ?





^ permalink raw reply

* RE: [PATCH v1 0/3] Provide a zero-copy method on KVM virtio-net.
From: Xin, Xiaohui @ 2010-03-09  7:47 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: netdev@vger.kernel.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, mingo@elte.hu,
	jdike@c2.user-mode-linux.org
In-Reply-To: <20100307105031.GA20004@redhat.com>

>On Sat, Mar 06, 2010 at 05:38:35PM +0800, xiaohui.xin@intel.com wrote:
>> The idea is simple, just to pin the guest VM user space and then
> >let host NIC driver has the chance to directly DMA to it. 
> >The patches are based on vhost-net backend driver. We add a device
> >which provides proto_ops as sendmsg/recvmsg to vhost-net to
> >send/recv directly to/from the NIC driver. KVM guest who use the
> >vhost-net backend may bind any ethX interface in the host side to
> >get copyless data transfer thru guest virtio-net frontend.
> >
> >We provide multiple submits and asynchronous notifiicaton to 
> >vhost-net too.
> > 
> >Our goal is to improve the bandwidth and reduce the CPU usage.
> >Exact performance data will be provided later. But for simple
> >test with netperf, we found bindwidth up and CPU % up too,
> >but the bindwidth up ratio is much more than CPU % up ratio.
> >
> >What we have not done yet:
> >	packet split support
> >	To support GRO
> >	Performance tuning
> >
>Am I right to say that nic driver needs changes for these patches
>to work? If so, please publish nic driver patches as well.

For drivers not support packet split mode, the NIC drivers don't need to change.
For packet split support drivers, we plan to add the drivers API in updated versions.
Now for PS support drivers, just disable the PS mode, it also works.

> > what we have done in v1:
> > 	polish the RCU usage
> >	deal with write logging in asynchroush mode in vhost
> >	add notifier block for mp device
> >	rename page_ctor to mp_port in netdevice.h to make it looks generic
> >	add mp_dev_change_flags() for mp device to change NIC state
> >	add CONIFG_VHOST_MPASSTHRU to limit the usage when module is not load
> >	a small fix for missing dev_put when fail
> >	using dynamic minor instead of static minor number
> >	a __KERNEL__ protect to mp_get_sock()
> >
> >performance:
> >	using netperf with GSO/TSO disabled, 10G NIC, 
> >	disabled packet split mode, with raw socket case compared to vhost.
> >
> >	bindwidth will be from 1.1Gbps to 1.7Gbps
> >	CPU % from 120%-140% to 140%-160%

> That's pretty low for a 10Gb nic. Are you hitting some other bottleneck,
> like high interrupt rate? Also, GSO support and performance tuning
> for raw are incomplete. Try comparing with e.g. tap with GSO.

I'm curious too. 
I have tested vhost-net without zero-copy patch at first in RAW socket case with ixgbe driver, with that driver GRO feature is enabled default, but netperf data is extremely low, after disabled GRO, then I can get more than 1Gbps. So I thought I have missed something there, but I had send 2 emails to you about this before and got no reply from you.
Have you got some perf data in raw socket case with vhost-net? 
The data I have got from your web page is always tap with GSO case.

If GSO is not supported, I think the data cannot compare with tap with GSO case in 1500 MTU. 
Maybe mergable buffers may help the performance in raw socket case?

Thanks Xiaohui

^ permalink raw reply

* Kernel panic in fib_rules_lookup (kernel 2.6.32)
From: "Oleg A. Arkhangelsky" @ 2010-03-09  7:44 UTC (permalink / raw)
  To: netdev

Hello,

Got this kernel panic tomorrow. This PC is rather heavy loaded router with BGP full view (> 300K routes).
We're using FIB_TRIE. Last time we got similar panic about 1 month ago. Please, let me know if you
need additional information to debug (e.g. objdump). Thanks!

Mar  9 10:08:55 bras-1 kernel: BUG: unable to handle kernel NULL pointer dereference at (null)
Mar  9 10:08:55 bras-1 kernel: IP: [<c11fa012>] fib_rules_lookup+0xa2/0xd0
Mar  9 10:08:55 bras-1 kernel: *pde = 00000000
Mar  9 10:08:55 bras-1 kernel: Thread overran stack, or stack corrupted
Mar  9 10:08:55 bras-1 kernel: Oops: 0000 [#1] SMP
Mar  9 10:08:55 bras-1 kernel: Modules linked in: ipt_NETFLOW iTCO_wdt xt_tcpudp iptable_filter iptable_nat ip_tables ipt_ISG x_tables ipmi_watchdog ipmi_msghandler nf_nat_ftp nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack_ftp nf_conntrack 8021q e1000 e1000e
Mar  9 10:08:55 bras-1 kernel:
Mar  9 10:08:55 bras-1 kernel: Pid: 0, comm: swapper Not tainted (2.6.32 #3)
Mar  9 10:08:55 bras-1 kernel: EIP: 0060:[<c11fa012>] EFLAGS: 00010246 CPU: 0
Mar  9 10:08:55 bras-1 kernel: EIP is at fib_rules_lookup+0xa2/0xd0
Mar  9 10:08:55 bras-1 kernel: EAX: 00000000 EBX: 00000000 ECX: f897a000 EDX: fffffff5
Mar  9 10:08:55 bras-1 kernel: ESI: c1305ce4 EDI: f729d420 EBP: c1305cb8 ESP: c1305ca0
Mar  9 10:08:55 bras-1 kernel:  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
Mar  9 10:08:55 bras-1 kernel: Process swapper (pid: 0, ti=c1304000 task=c1319ba0 task.ti=c1304000)
Mar  9 10:08:55 bras-1 kernel: Stack:
Mar  9 10:08:55 bras-1 kernel:  c1305cc4 00000000 f729d464 c1305d20 c1305d20 f5719740 c1305cd4 c1242cfd
Mar  9 10:08:55 bras-1 kernel: <0> c1305cc4 00000000 c1305d20 00000000 00000000 c1305d3c c123b985 f5719740
Mar  9 10:08:55 bras-1 kernel: <0> c1305ce4 00000008 00000003 00000000 f090195e 1816640a 00000000 00000000
Mar  9 10:08:55 bras-1 kernel: Call Trace:
Mar  9 10:08:55 bras-1 kernel:  [<c1242cfd>] ? fib_lookup+0x2d/0x40
Mar  9 10:08:55 bras-1 kernel:  [<c123b985>] ? fib_validate_source+0x295/0x2f0
Mar  9 10:08:55 bras-1 kernel:  [<c120b981>] ? ip_route_input+0x8b1/0xf30
Mar  9 10:08:55 bras-1 kernel:  [<c120d0b0>] ? ip_rcv_finish+0x0/0x350
Mar  9 10:08:55 bras-1 kernel:  [<c120d2f3>] ? ip_rcv_finish+0x243/0x350
Mar  9 10:08:55 bras-1 kernel:  [<c120d0b0>] ? ip_rcv_finish+0x0/0x350
Mar  9 10:08:55 bras-1 kernel:  [<c120d66e>] ? ip_rcv+0x26e/0x2b0
Mar  9 10:08:55 bras-1 kernel:  [<c120d0b0>] ? ip_rcv_finish+0x0/0x350
Mar  9 10:08:55 bras-1 kernel:  [<c11ec354>] ? netif_receive_skb+0x314/0x4d0
Mar  9 10:08:55 bras-1 kernel:  [<c1085182>] ? __slab_free+0x112/0x2d0
Mar  9 10:08:55 bras-1 kernel:  [<c11ec572>] ? process_backlog+0x62/0xa0
Mar  9 10:08:55 bras-1 kernel:  [<c11ecbbd>] ? net_rx_action+0x7d/0x100
Mar  9 10:08:55 bras-1 kernel:  [<c1031b35>] ? __do_softirq+0x85/0x110
Mar  9 10:08:55 bras-1 kernel:  [<c1055c56>] ? handle_IRQ_event+0x36/0xd0
Mar  9 10:08:55 bras-1 kernel:  [<c1058564>] ? move_native_irq+0x14/0x50
Mar  9 10:08:55 bras-1 kernel:  [<c1031bed>] ? do_softirq+0x2d/0x40
Mar  9 10:08:55 bras-1 kernel:  [<c1031d1d>] ? irq_exit+0x2d/0x40
Mar  9 10:08:55 bras-1 kernel:  [<c1004c6f>] ? do_IRQ+0x4f/0xc0
Mar  9 10:08:55 bras-1 kernel:  [<c1031d1d>] ? irq_exit+0x2d/0x40
Mar  9 10:08:55 bras-1 kernel:  [<c10162c7>] ? smp_apic_timer_interrupt+0x57/0x90
Mar  9 10:08:55 bras-1 kernel:  [<c1003429>] ? common_interrupt+0x29/0x30
Mar  9 10:08:55 bras-1 kernel:  [<c10090e6>] ? mwait_idle+0x56/0x60
Mar  9 10:08:55 bras-1 kernel:  [<c1001e44>] ? cpu_idle+0x54/0x70
Mar  9 10:08:55 bras-1 kernel:  [<c124d2d3>] ? rest_init+0x53/0x60
Mar  9 10:08:55 bras-1 kernel:  [<c1337895>] ? start_kernel+0x2b2/0x315
Mar  9 10:08:55 bras-1 kernel:  [<c13373ae>] ? unknown_bootoption+0x0/0x1e4
Mar  9 10:08:55 bras-1 kernel:  [<c133707e>] ? i386_start_kernel+0x7e/0xa8
Mar  9 10:08:55 bras-1 kernel: Code: bf 3c 03 8d b6 00 00 00 00 74 1e 8b 45 08 89 f2 8b 4d ec 89 04 24 89 d8 ff 57 1c 83 f8 f5 89 c2 75 27 8d b4 26 00 00 00 00 8b 1b <8b> 03 0f 18 00 90 3b 5d f0 0f 85 77 ff ff ff ba fd ff ff ff 83
Mar  9 10:08:55 bras-1 kernel: EIP: [<c11fa012>] fib_rules_lookup+0xa2/0xd0 SS:ESP 0068:c1305ca0
Mar  9 10:08:55 bras-1 kernel: CR2: 0000000000000000
Mar  9 10:08:55 bras-1 kernel: ---[ end trace 51f5fed99e546606 ]---
Mar  9 10:08:55 bras-1 kernel: Kernel panic - not syncing: Fatal exception in interrupt
Mar  9 10:08:55 bras-1 kernel: Pid: 0, comm: swapper Tainted: G      D    2.6.32 #3
Mar  9 10:08:55 bras-1 kernel: Call Trace:
Mar  9 10:08:55 bras-1 kernel:  [<c1252fb3>] ? printk+0x18/0x1d
Mar  9 10:08:55 bras-1 kernel:  [<c1252ee9>] panic+0x43/0xf5
Mar  9 10:08:55 bras-1 kernel:  [<c1006739>] oops_end+0xb9/0xc0
Mar  9 10:08:55 bras-1 kernel:  [<c101bcf6>] no_context+0xb6/0x150
Mar  9 10:08:55 bras-1 kernel:  [<f8058576>] ? e1000_set_itr+0xb6/0x170 [e1000e]
Mar  9 10:08:55 bras-1 kernel:  [<c101bddf>] __bad_area_nosemaphore+0x4f/0x180
Mar  9 10:08:55 bras-1 kernel:  [<c1055c56>] ? handle_IRQ_event+0x36/0xd0
Mar  9 10:08:55 bras-1 kernel:  [<c1058564>] ? move_native_irq+0x14/0x50
Mar  9 10:08:55 bras-1 kernel:  [<c105758d>] ? handle_edge_irq+0x6d/0x140
Mar  9 10:08:55 bras-1 kernel:  [<c100569a>] ? handle_irq+0x1a/0x30
Mar  9 10:08:55 bras-1 kernel:  [<c1086195>] ? __slab_alloc+0x315/0x560
Mar  9 10:08:55 bras-1 kernel:  [<c1035fc5>] ? lock_timer_base+0x25/0x50
Mar  9 10:08:55 bras-1 kernel:  [<c101bf22>] bad_area_nosemaphore+0x12/0x20
Mar  9 10:08:55 bras-1 kernel:  [<c101c30c>] do_page_fault+0x25c/0x300
Mar  9 10:08:55 bras-1 kernel:  [<c1241cf9>] ? check_leaf+0x59/0x80
Mar  9 10:08:55 bras-1 kernel:  [<c101c0b0>] ? do_page_fault+0x0/0x300
Mar  9 10:08:55 bras-1 kernel:  [<c125570e>] error_code+0x66/0x6c
Mar  9 10:08:55 bras-1 kernel:  [<c101c0b0>] ? do_page_fault+0x0/0x300
Mar  9 10:08:55 bras-1 kernel:  [<c11fa012>] ? fib_rules_lookup+0xa2/0xd0
Mar  9 10:08:55 bras-1 kernel:  [<c1242cfd>] fib_lookup+0x2d/0x40
Mar  9 10:08:55 bras-1 kernel:  [<c123b985>] fib_validate_source+0x295/0x2f0
Mar  9 10:08:55 bras-1 kernel:  [<c120b981>] ip_route_input+0x8b1/0xf30
Mar  9 10:08:55 bras-1 kernel:  [<c120d0b0>] ? ip_rcv_finish+0x0/0x350
Mar  9 10:08:55 bras-1 kernel:  [<c120d2f3>] ip_rcv_finish+0x243/0x350
Mar  9 10:08:55 bras-1 kernel:  [<c120d0b0>] ? ip_rcv_finish+0x0/0x350
Mar  9 10:08:55 bras-1 kernel:  [<c120d66e>] ip_rcv+0x26e/0x2b0
Mar  9 10:08:55 bras-1 kernel:  [<c120d0b0>] ? ip_rcv_finish+0x0/0x350
Mar  9 10:08:55 bras-1 kernel:  [<c11ec354>] netif_receive_skb+0x314/0x4d0
Mar  9 10:08:55 bras-1 kernel:  [<c1085182>] ? __slab_free+0x112/0x2d0
Mar  9 10:08:55 bras-1 kernel:  [<c11ec572>] process_backlog+0x62/0xa0
Mar  9 10:08:55 bras-1 kernel:  [<c11ecbbd>] net_rx_action+0x7d/0x100
Mar  9 10:08:55 bras-1 kernel:  [<c1031b35>] __do_softirq+0x85/0x110
Mar  9 10:08:55 bras-1 kernel:  [<c1055c56>] ? handle_IRQ_event+0x36/0xd0
Mar  9 10:08:55 bras-1 kernel:  [<c1058564>] ? move_native_irq+0x14/0x50
Mar  9 10:08:55 bras-1 kernel:  [<c1031bed>] do_softirq+0x2d/0x40
Mar  9 10:08:55 bras-1 kernel:  [<c1031d1d>] irq_exit+0x2d/0x40
Mar  9 10:08:55 bras-1 kernel:  [<c1004c6f>] do_IRQ+0x4f/0xc0
Mar  9 10:08:55 bras-1 kernel:  [<c1031d1d>] ? irq_exit+0x2d/0x40
Mar  9 10:08:55 bras-1 kernel:  [<c10162c7>] ? smp_apic_timer_interrupt+0x57/0x90
Mar  9 10:08:55 bras-1 kernel:  [<c1003429>] common_interrupt+0x29/0x30
Mar  9 10:08:55 bras-1 kernel:  [<c10090e6>] ? mwait_idle+0x56/0x60
Mar  9 10:08:55 bras-1 kernel:  [<c1001e44>] cpu_idle+0x54/0x70
Mar  9 10:08:55 bras-1 kernel:  [<c124d2d3>] rest_init+0x53/0x60
Mar  9 10:08:55 bras-1 kernel:  [<c1337895>] start_kernel+0x2b2/0x315
Mar  9 10:08:55 bras-1 kernel:  [<c13373ae>] ? unknown_bootoption+0x0/0x1e4
Mar  9 10:08:55 bras-1 kernel:  [<c133707e>] i386_start_kernel+0x7e/0xa8


-- 
wbr, Oleg.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox