* Re: [patch 0/5] qeth bug fixes for 2.6.34 next rc
From: David Miller @ 2010-03-10 15:32 UTC (permalink / raw)
To: frank.blaschka; +Cc: netdev, linux-s390
In-Reply-To: <20100309063652.706791000@de.ibm.com>
From: frank.blaschka@de.ibm.com
Date: Tue, 09 Mar 2010 07:36:52 +0100
> here are some qeth bug fixes for 2.6.34 next rc
All applied, thanks.
^ permalink raw reply
* Re: [PATCH] net: add ColdFire support to the smc91x driver
From: David Miller @ 2010-03-10 15:33 UTC (permalink / raw)
To: gerg; +Cc: nico, gerg, netdev
In-Reply-To: <201003090703.o2973pbP013668@goober.internal.moreton.com.au>
From: Greg Ungerer <gerg@snapgear.com>
Date: Tue, 9 Mar 2010 17:03:51 +1000
> net: add ColdFire support to the smc91x driver
>
> Some embedded ColdFire based boards use the SMC 91x family of ethernet
> devices. (For example the Freescale M5249C3 and MoretonBay NETtel).
>
> Add IO access support to the SMC91x driver, and allow this driver to
> be configured for ColdFire platforms.
>
> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Applied.
^ permalink raw reply
* Re: [PATCH] tg3: Fix tg3_poll_controller() passing wrong pointer to tg3_interrupt()
From: David Miller @ 2010-03-10 15:33 UTC (permalink / raw)
To: louis.rilling; +Cc: mcarlson, mchan, netdev, stable
In-Reply-To: <1268151281-15012-1-git-send-email-louis.rilling@kerlabs.com>
From: Louis Rilling <louis.rilling@kerlabs.com>
Date: Tue, 9 Mar 2010 17:14:41 +0100
> [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
Applied, thanks.
^ permalink raw reply
* Re: [2.6.34-rc1] CPU stalls when closing TCP sockets.
From: David Miller @ 2010-03-10 15:33 UTC (permalink / raw)
To: eric.dumazet; +Cc: penguin-kernel, netdev, linux-kernel, paulmck, shemminger
In-Reply-To: <1268150156.3113.12.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 09 Mar 2010 16:55:56 +0100
> 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>
Applied, thanks everyone.
^ permalink raw reply
* [BUG 2.6.34-rc1] bogus "(null)" in tulip init messages
From: Mikael Pettersson @ 2010-03-10 15:33 UTC (permalink / raw)
To: netdev; +Cc: Grant Grundler, Kyle McMartin, linux-kernel
Booting 2.6.34-rc1 on a machine with a tulip nic I see
a number of kernel messages that include "(null)" where
previous kernels included the string "tulip0":
--- dmesg-2.6.33 2010-02-26 12:58:32.000000000 +0100
+++ dmesg-2.6.34-rc1 2010-03-10 16:17:06.000000000 +0100
...
Linux Tulip driver version 1.1.15 (Feb 27, 2007)
tulip 0000:00:0f.0: enabling device (0014 -> 0017)
-tulip0: EEPROM default media type Autosense.
-tulip0: Index #0 - Media 10baseT (#0) described by a 21142 Serial PHY (2) block.
-tulip0: Index #1 - Media 10baseT-FDX (#4) described by a 21142 Serial PHY (2) block.
-tulip0: Index #2 - Media 100baseTx (#3) described by a 21143 SYM PHY (4) block.
-tulip0: Index #3 - Media 100baseTx-FDX (#5) described by a 21143 SYM PHY (4) block.
-tulip0: Index #4 - Media 100baseTx (#3) described by a 21143 reset method (5) block.
-eth0: Digital DS21142/43 Tulip rev 48 at Port 0x800, 00:00:c5:50:f9:51, IRQ 25.
+ (null): EEPROM default media type Autosense
+ (null): Index #0 - Media 10baseT (#0) described by a 21142 Serial PHY (2) block
+ (null): Index #1 - Media 10baseT-FDX (#4) described by a 21142 Serial PHY (2) block
+ (null): Index #2 - Media 100baseTx (#3) described by a 21143 SYM PHY (4) block
+ (null): Index #3 - Media 100baseTx-FDX (#5) described by a 21143 SYM PHY (4) block
+ (null): Index #4 - Media 100baseTx (#3) described by a 21143 reset method (5) block
+net eth0: Digital DS21142/43 Tulip rev 48 at Port 0x800, 00:00:c5:50:f9:51, IRQ 25
Apart from this the tulip driver seems to work in 2.6.34-rc1.
/Mikael
^ permalink raw reply
* Re: [PATCH] asix: fix setting mac address for AX88772
From: David Miller @ 2010-03-10 15:34 UTC (permalink / raw)
To: jussi.kivilinna; +Cc: netdev, dhollis
In-Reply-To: <20100309222438.10684.46211.stgit@fate.lan>
From: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Date: Wed, 10 Mar 2010 00:24:38 +0200
> Setting new MAC address only worked when device was set to promiscuous mode.
> Fix MAC address by writing new address to device using undocumented command
> AX_CMD_READ_NODE_ID+1. Patch is tested with AX88772 device.
>
> Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Applied.
^ permalink raw reply
* Re: [PATCH net-2.6] ipv6 ip6_tunnel: eliminate unused recursion field from ip6_tnl{}.
From: David Miller @ 2010-03-10 15:34 UTC (permalink / raw)
To: yoshfuji; +Cc: netdev
In-Reply-To: <201003100247.o2A2lqaX001898@94.43.138.210.xn.2iij.net>
From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Date: Wed, 10 Mar 2010 11:47:52 +0900
> Commit a43912ab19... ("tunnel: eliminate recursion field") eliminated
> use of recursion field from tunnel structures, but its definition
> still exists in ip6_tnl{}.
>
> Let's remove that unused field.
>
> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Applied.
^ permalink raw reply
* Re: When best to submit patches with small changes in multiple files?
From: David Miller @ 2010-03-10 15:34 UTC (permalink / raw)
To: elendil; +Cc: netdev
In-Reply-To: <201003100449.12952.elendil@planet.nl>
From: Frans Pop <elendil@planet.nl>
Date: Wed, 10 Mar 2010 04:49:12 +0100
> I have patches prepared to remove trailing spaces from kernel messages
> for ./net and ./drivers/net (including wireless).
>
> In total 15 patches with
> 81 files changed, 351 insertions(+), 351 deletions(-)
>
> When would be the best time to submit:
> - now, to be included in .34
> - now, for -next
> - any time
> - near beginning of merge window (rebased against netdev-next)
> - not at all ;-)
Later, for -next. Submit them say in a week or two.
^ permalink raw reply
* Re: [PATCH] net: Fix dev_mc_add()
From: David Miller @ 2010-03-10 15:34 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, jpirko
In-Reply-To: <1268197748.2872.129.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 10 Mar 2010 06:09:08 +0100
> Commit 6e17d45a (net: add addr len check to dev_mc_add)
> added a bug in dev_mc_add(), since it can now exit with a lock
> imbalance.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> CC: Jiri Pirko <jpirko@redhat.com>
Applied.
^ permalink raw reply
* Re: [PATCH] net: Annotates neigh_invalidate()
From: David Miller @ 2010-03-10 15:35 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
In-Reply-To: <1268199654.2872.134.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 10 Mar 2010 06:40:54 +0100
> Annotates neigh_invalidate() with __releases() and __acquires() for
> sparse sake.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH] net: remove rcu locking from fib_rules_event()
From: David Miller @ 2010-03-10 15:35 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, paulmck
In-Reply-To: <1268201018.2872.139.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 10 Mar 2010 07:03:38 +0100
> We hold RTNL at this point and dont use RCU variants of list traversals,
> we dont need rcu_read_lock()/rcu_read_unlock()
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
I'll apply this, but to my net-next-2.6 tree once I open that
up.
^ permalink raw reply
* Re: [PATCH] can: bfin_can: switch to common Blackfin can header
From: David Miller @ 2010-03-10 15:35 UTC (permalink / raw)
To: vapier.adi-Re5JQEeQqe8AvxtiuMwx3w
Cc: urs.thuermann-l29pVbxQd1IUtdQbppsyvg,
netdev-u79uwXL29TY76Z2rM5mHXA,
socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
oliver.hartkopp-l29pVbxQd1IUtdQbppsyvg,
uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b,
wg-5Yr1BZd7O62+XT7JhA+gdA
In-Reply-To: <8bd0f97a1003100417x6e9830dav949fd6b0511d99d0-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
From: Mike Frysinger <vapier.adi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Wed, 10 Mar 2010 07:17:09 -0500
> On Wed, Mar 10, 2010 at 02:41, Wolfgang Grandegger wrote:
>> Mike Frysinger wrote:
>>> The MMR bits are being moved to this header, so include it.
>>>
>>> Signed-off-by: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
>>
>> Acked-by: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
>>
>>> ---
>>> note: this can be merged for 2.6.34 or 2.6.35
>>
>> Is it required to make the driver working under 2.6.34?
>
> not for 2.6.34, but it will be for 2.6.35
I'll apply this to net-next-2.6 once I open it up, therefore.
^ permalink raw reply
* bug: route metric signing
From: Curtis Doty @ 2010-03-10 15:41 UTC (permalink / raw)
To: Linux Network Development
The metric set is not the metric displayed. I'm presuming it's a cosmetic
error in iproute2?
# ip route add 192.0.2.42 via 127.0.0.1 metric 4294967295
# ip route ls 192.0.2.42
192.0.2.42 via 127.0.0.1 dev lo metric -1
And...
# ip route add 192.0.2.42 via 127.0.0.1 metric 2147483648
# ip route ls 192.0.2.42
192.0.2.42 via 127.0.0.1 dev lo metric -2147483648
But this one appears OK...
# ip route add 192.0.2.42 via 127.0.0.1 metric 2147483647
# ip route ls 192.0.2.42
192.0.2.42 via 127.0.0.1 dev lo metric 2147483647
Test platform is Fedora 12.
# rpm -q iproute
iproute-2.6.29-4.fc12.x86_64
# rpm -q kernel
kernel-2.6.32.9-70.fc12.x86_64
../C
^ permalink raw reply
* Re: [PATCH 1/4] bnx2x: use smp_mb() to keep ordering of read write operations
From: Eilon Greenstein @ 2010-03-10 15:59 UTC (permalink / raw)
To: Stanislaw Gruszka
Cc: netdev@vger.kernel.org, Vladislav Zolotarov, Michael Chan
In-Reply-To: <1268153703-4186-1-git-send-email-sgruszka@redhat.com>
On Tue, 2010-03-09 at 08:55 -0800, Stanislaw Gruszka wrote:
> 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>
Singed-of-by: Eilon Greenstein <eilong@broadcom.com>
^ permalink raw reply
* Re: [PATCH 2/4] bnx2x: remove not necessary compiler barrier
From: Eilon Greenstein @ 2010-03-10 16:00 UTC (permalink / raw)
To: Stanislaw Gruszka
Cc: netdev@vger.kernel.org, Vladislav Zolotarov, Michael Chan
In-Reply-To: <1268153703-4186-2-git-send-email-sgruszka@redhat.com>
On Tue, 2010-03-09 at 08:55 -0800, Stanislaw Gruszka wrote:
> 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>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
^ permalink raw reply
* Re: [PATCH 3/4] bnx2x: change smp_mb() comment to conform the true
From: Eilon Greenstein @ 2010-03-10 16:01 UTC (permalink / raw)
To: Stanislaw Gruszka
Cc: netdev@vger.kernel.org, Vladislav Zolotarov, Michael Chan
In-Reply-To: <1268153703-4186-3-git-send-email-sgruszka@redhat.com>
On Tue, 2010-03-09 at 08:55 -0800, Stanislaw Gruszka wrote:
> 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>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
^ permalink raw reply
* Re: [PATCH 4/4] bnx2x: merge common code when stopping queue
From: Eilon Greenstein @ 2010-03-10 16:02 UTC (permalink / raw)
To: Stanislaw Gruszka
Cc: netdev@vger.kernel.org, Vladislav Zolotarov, Michael Chan
In-Reply-To: <1268153703-4186-4-git-send-email-sgruszka@redhat.com>
On Tue, 2010-03-09 at 08:55 -0800, Stanislaw Gruszka wrote:
> 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.
>
Stanislaw,
As you wrote, there is no real situation possible to trigger this race.
So basically, you are changing the code from “return” on error to “go
to” and in the “go to” branch you add some harmless but useless code in
the form of smp_mb and testing for a possible wake again. I find the
code to be less readable after this change and harder to maintain so I
prefer not to include this code change.
Thanks for all the changes and you participant in improving the bnx2x!
Eilon
> 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 */
^ permalink raw reply
* [PATCH] mac80211: Fix memory leak in ieee80211_if_write()
From: Eric Dumazet @ 2010-03-10 16:13 UTC (permalink / raw)
To: David Miller, Johannes Berg; +Cc: netdev, linux-wireless
Fix memory leak and use kmalloc() instead of kzalloc() as we are going
to overwrite the allocated buffer.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
net/mac80211/debugfs_netdev.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index 9affe2c..a55e864 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -48,20 +48,24 @@ static ssize_t ieee80211_if_write(
ssize_t (*write)(struct ieee80211_sub_if_data *, const char *, int))
{
u8 *buf;
- ssize_t ret = -ENODEV;
+ ssize_t ret;
- buf = kzalloc(count, GFP_KERNEL);
+ buf = kmalloc(count, GFP_KERNEL);
if (!buf)
return -ENOMEM;
+ ret = -EFAULT;
if (copy_from_user(buf, userbuf, count))
- return -EFAULT;
+ goto freebuf;
+ ret = -ENODEV;
rtnl_lock();
if (sdata->dev->reg_state == NETREG_REGISTERED)
ret = (*write)(sdata, buf, count);
rtnl_unlock();
+freebuf:
+ kfree(buf);
return ret;
}
^ permalink raw reply related
* Re: [PATCH 6/13] bridge: Add core IGMP snooping support
From: Paul E. McKenney @ 2010-03-10 16:26 UTC (permalink / raw)
To: Herbert Xu
Cc: Eric Dumazet, Arnd Bergmann, David S. Miller, netdev,
Stephen Hemminger
In-Reply-To: <20100310140729.GA25704@gondor.apana.org.au>
On Wed, Mar 10, 2010 at 10:07:29PM +0800, Herbert Xu wrote:
> On Wed, Mar 10, 2010 at 05:13:18AM -0800, Paul E. McKenney wrote:
> >
> > If CONFIG_PROVE_RCU is set, rcu_dereference() checks for rcu_read_lock()
> > and rcu_dereference_bh() checks for either rcu_read_lock_bh() or BH
> > being disabled. Yes, this is a bit restrictive, but there are a few too
> > many to check by hand these days.
>
> Fair enough. We should get those fixed then. In fact I reckon
> most of them should be using the BH variant so we might be able
> to kill a few rcu_read_lock's which would be a real gain.
I have -tip commit a898def29e4119bc01ebe7ca97423181f4c0ea2d that
converts some of the rcu_dereference()s in net/core/filter.c,
net/core/dev.c, net/decnet/dn_route.c, net/packet/af_packet.c, and
net/ipv4/route.c to rcu_dereference_bh().
How should we coordinate the removal of the rcu_read_lock() calls?
Thanx, Paul
^ permalink raw reply
* Re: [PATCH 6/13] bridge: Add core IGMP snooping support
From: David Miller @ 2010-03-10 16:35 UTC (permalink / raw)
To: paulmck; +Cc: herbert, eric.dumazet, arnd, netdev, shemminger
In-Reply-To: <20100310162658.GI6267@linux.vnet.ibm.com>
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Date: Wed, 10 Mar 2010 08:26:58 -0800
> On Wed, Mar 10, 2010 at 10:07:29PM +0800, Herbert Xu wrote:
>> On Wed, Mar 10, 2010 at 05:13:18AM -0800, Paul E. McKenney wrote:
>> >
>> > If CONFIG_PROVE_RCU is set, rcu_dereference() checks for rcu_read_lock()
>> > and rcu_dereference_bh() checks for either rcu_read_lock_bh() or BH
>> > being disabled. Yes, this is a bit restrictive, but there are a few too
>> > many to check by hand these days.
>>
>> Fair enough. We should get those fixed then. In fact I reckon
>> most of them should be using the BH variant so we might be able
>> to kill a few rcu_read_lock's which would be a real gain.
>
> I have -tip commit a898def29e4119bc01ebe7ca97423181f4c0ea2d that
> converts some of the rcu_dereference()s in net/core/filter.c,
> net/core/dev.c, net/decnet/dn_route.c, net/packet/af_packet.c, and
> net/ipv4/route.c to rcu_dereference_bh().
>
> How should we coordinate the removal of the rcu_read_lock() calls?
Paul if you want to do this via your tree, feel free.
^ permalink raw reply
* Re: [BUG 2.6.34-rc1] bogus "(null)" in tulip init messages
From: David Miller @ 2010-03-10 16:41 UTC (permalink / raw)
To: mikpe; +Cc: netdev, grundler, kyle, linux-kernel, joe
In-Reply-To: <19351.48072.777754.465084@pilspetsen.it.uu.se>
From: Mikael Pettersson <mikpe@it.uu.se>
Date: Wed, 10 Mar 2010 16:33:28 +0100
> Booting 2.6.34-rc1 on a machine with a tulip nic I see
> a number of kernel messages that include "(null)" where
> previous kernels included the string "tulip0":
CC:'ing the guilty party :-) It's one of the following
commits:
commit 44298ec0f20c45b9be96e181976aef1152d373b2
Author: Joe Perches <joe@perches.com>
Date: Thu Jan 28 20:59:29 2010 +0000
tulip/xircom_cb.c: Use dev_<level> and pr_<level>
Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove DRV_NAME and xircom_cb from pr_<level>
Convert embedded function names in logging messages to %s, __func__
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
commit a1e37bc5e2d0ff8d025221e27c2bfff762072311
Author: Joe Perches <joe@perches.com>
Date: Thu Jan 28 20:59:28 2010 +0000
tulip/winbond-840.c: Use dev_<level> and pr_<level>
Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx
Convert %d.%d.%d.%d to %pI4
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
commit e02fb7aa0714ca9357571bb15ef0fe278a150cc7
Author: Joe Perches <joe@perches.com>
Date: Thu Jan 28 20:59:27 2010 +0000
tulip/uli526x.c: Use dev_<level> and pr_<level>
Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove DRV_NAME from logging messages
Add do {} while(0) to ULI526X_DBUG macro
Make SHOW_MEDIA_TYPE macro more readable
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
commit 27146c43c4dbb727c4a211541af46577de2984af
Author: Joe Perches <joe@perches.com>
Date: Thu Jan 28 20:59:26 2010 +0000
tulip/timer.c: Use dev_<level> and pr_<level>
Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
commit 22086a1172b69b9f6200e169dc99a252a204affb
Author: Joe Perches <joe@perches.com>
Date: Thu Jan 28 20:59:25 2010 +0000
tulip/pnic2.c: Use dev_<level> and pr_<level>
Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
commit 1df8bbd1420705277cd382b1386cda724d61a678
Author: Joe Perches <joe@perches.com>
Date: Thu Jan 28 20:59:24 2010 +0000
tulip/pnic.c: Use dev_<level> and pr_<level>
Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
commit fa0b9a4c41490d550ebd3bd418f4551c989fec5d
Author: Joe Perches <joe@perches.com>
Date: Thu Jan 28 20:59:23 2010 +0000
tulip/media.c: Use dev_<level> and pr_<level>
Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
commit abe02af8263ae17e201994a1be7fc5eac6642acf
Author: Joe Perches <joe@perches.com>
Date: Thu Jan 28 20:59:22 2010 +0000
tulip/interrupt.c: Use dev_<level> and pr_<level>
Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
commit e9cd1cbcda5e21706b03b543b1b73600b07f323f
Author: Joe Perches <joe@perches.com>
Date: Thu Jan 28 20:59:21 2010 +0000
tulip/eeprom.c: Use dev_<level> and pr_<level>
Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
commit dde7c8ef167996689bc464eb65d2b09ef05263c2
Author: Joe Perches <joe@perches.com>
Date: Thu Jan 28 20:59:20 2010 +0000
tulip/dmfe.c: Use dev_<level> and pr_<level>
Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove 'DRV_NAME ": ' from logging messages
Convert commented out printks to pr_debug
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
commit f639dc7dadcbd97f1d666d5ffe00eab1ea3c0f6d
Author: Joe Perches <joe@perches.com>
Date: Thu Jan 28 20:59:19 2010 +0000
tulip/de2104x.c: Use dev_<level> and pr_<level>
Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
commit 985a63ed3faf0faaba840d806f5ca4d360d13ad3
Author: Joe Perches <joe@perches.com>
Date: Thu Jan 28 20:59:18 2010 +0000
tulip/21142.c: Use dev_<level> and pr_<level>
Convert printks to dev_<level> where a dev is available
Convert printks to pr_<level> where not
Coalesce format strings
Change print formats with %d.dx to %0dx
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
commit d60bec4eb7076acfc940cca3f9f219e7653a1466
Author: Joe Perches <joe@perches.com>
Date: Thu Jan 28 20:59:17 2010 +0000
tulip_core: Use dev_<level> and pr_<level>
Convert printks to dev_<level> where appropriate
Convert printks to pr_<level>
Change print formats with %d.dx to %0dx
Coalesce long formats
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
> --- dmesg-2.6.33 2010-02-26 12:58:32.000000000 +0100
> +++ dmesg-2.6.34-rc1 2010-03-10 16:17:06.000000000 +0100
> ...
> Linux Tulip driver version 1.1.15 (Feb 27, 2007)
> tulip 0000:00:0f.0: enabling device (0014 -> 0017)
> -tulip0: EEPROM default media type Autosense.
> -tulip0: Index #0 - Media 10baseT (#0) described by a 21142 Serial PHY (2) block.
> -tulip0: Index #1 - Media 10baseT-FDX (#4) described by a 21142 Serial PHY (2) block.
> -tulip0: Index #2 - Media 100baseTx (#3) described by a 21143 SYM PHY (4) block.
> -tulip0: Index #3 - Media 100baseTx-FDX (#5) described by a 21143 SYM PHY (4) block.
> -tulip0: Index #4 - Media 100baseTx (#3) described by a 21143 reset method (5) block.
> -eth0: Digital DS21142/43 Tulip rev 48 at Port 0x800, 00:00:c5:50:f9:51, IRQ 25.
> + (null): EEPROM default media type Autosense
> + (null): Index #0 - Media 10baseT (#0) described by a 21142 Serial PHY (2) block
> + (null): Index #1 - Media 10baseT-FDX (#4) described by a 21142 Serial PHY (2) block
> + (null): Index #2 - Media 100baseTx (#3) described by a 21143 SYM PHY (4) block
> + (null): Index #3 - Media 100baseTx-FDX (#5) described by a 21143 SYM PHY (4) block
> + (null): Index #4 - Media 100baseTx (#3) described by a 21143 reset method (5) block
> +net eth0: Digital DS21142/43 Tulip rev 48 at Port 0x800, 00:00:c5:50:f9:51, IRQ 25
>
> Apart from this the tulip driver seems to work in 2.6.34-rc1.
>
> /Mikael
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply
* Re: When best to submit patches with small changes in multiple files?
From: Frans Pop @ 2010-03-10 16:52 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20100310.073448.27419654.davem@davemloft.net>
On Wednesday 10 March 2010, David Miller wrote:
> Later, for -next. Submit them say in a week or two.
Will do. Thanks David.
^ permalink raw reply
* Re: [RFC PATCH] bnx2x: fix tx queue locking and memory barriers
From: David Howells @ 2010-03-10 17:09 UTC (permalink / raw)
To: Stanislaw Gruszka, Vladislav Zolotarov, David Miller, paulmck
Cc: dhowells, netdev, Eilon Greenstein
In-Reply-To: <20100225140834.0169e9f2@dhcp-lab-109.englab.brq.redhat.com>
Stanislaw Gruszka <sgruszka@redhat.com> wrote:
> - barrier(); /* Tell compiler that prod and cons can change */
> + /* prod and cons can change on other cpu, want to see
> + consistend available space and queue (stop/running) state */
> + smp_mb();
> +
> prod = fp->tx_bd_prod;
> cons = fp->tx_bd_cons;
I suspect that this isn't what you want.
The barrier() didn't tell the compiler that fp->tx_bd_prod and fp->tx_bd_cons
could change. What it did was to say that the accesses to those two variables
must be performed after all the other accesses issued by that CPU prior to the
barrier - at least as far as the compiler is concerned.
You don't need to separate the reads of tx_bd_prod and tx_bd_cons above with a
memory barrier. They aren't ever altered in the same place.
What you want is something more like the following pseudocode.
To insert into a circular buffer:
bd_prod = fp->tx_bd_prod;
bd_cons = fp->tx_bd_cons;
if (CIRC_SPACE(bd_cons, bd_prod, NUM_TX_BD) <= 0)
goto no_space;
/* get a tx_buf and first BD */
tx_start_bd = &fp->tx_desc_ring[bd_prod].start_bd;
tx_start_bd->bd_flags.as_bitfield = ETH_TX_BD_FLAGS_START_BD;
tx_start_bd->general_data = (UNICAST_ADDRESS <<
ETH_TX_START_BD_ETH_ADDR_TYPE_SHIFT);
tx_start_bd->general_data |= (1 << ETH_TX_START_BD_HDR_NBDS_SHIFT);
smp_wmb(); /* commit buffer contents before incrementing index */
fp->tx_bd_prod = TX_BD(bd_prod + 1);
To read from a circular buffer:
bd_prod = fp->tx_bd_prod;
bd_cons = fp->tx_bd_cons;
smp_read_barrier_depends(); /* read index before reading contents */
if (CIRC_CNT(bd_cons, bd_prod, NUM_TX_BD) <= 0)
goto no_data;
tx_start_bd = &fp->tx_desc_ring[bd_cons].start_bd;
munge_descriptor(tx_start_bd);
smp_mb(); /* finish reading descriptor before incrementing index */
fp->tx_bd_cons = TX_BD(bd_cons + 1);
At least, I'm fairly certain that's correct.
David
^ permalink raw reply
* Re: [RFC PATCH net-next 0/7 v2]IPv6:netfilter: defragment
From: YOSHIFUJI Hideaki @ 2010-03-10 17:13 UTC (permalink / raw)
To: Shan Wei
Cc: Patrick McHardy, David Miller, Alexey Dobriyan, Yasuyuki KOZAKAI,
netdev@vger.kernel.org, netfilter-devel,
yoshfuji@linux-ipv6.org >> YOSHIFUJI Hideaki
In-Reply-To: <4B88BE30.80206@cn.fujitsu.com>
Hi,
Shan Wei wrote:
> This patch-set solves the problem that an end host with IPv6 connection track enable
> can't send an ICMP "Fragment Reassembly Timeout" message when defaging timeout.
> And supports MIB counter about fragments reassembly e.g. Ip6ReasmTimeout, Ip6ReasmReqds,
> Ip6ReasmOKs, Ip6ReasmFails.
Well, because the context of defragment are different
from standard ones (e.g., In netfilter, defragment can
happen even on forwarding path, and the result is always
thrown away anyway), I think it is not a good idea to
touch standard MIB here. However I'm okay to increment
other stats like InDiscards, OurDiscards and netfilter
specific stats.
On the other hand, I'd even say we should NOT send
icmp here (at least by default) because standard routers
never send such packet.
Regards,
--yoshfuji
> patch-1,2,3: Introduce net namespace to conntrack and share netns_frags with IPv6 stack.
> But, IPv6 conntrack and IPv6 stack still keep separate fragment queue.
> Like IPv4, proc parameters of ip6frag_low_thresh, ip6frag_time and ip6frag_high_thresh
> manage numbers and memory thresh size of both IPv6 conntrack fragment queue and
> IPv6 stack fragment queue.
>
> patch-4: Send an ICMP "Fragment Reassembly Timeout" message and record MIB counter
> when defraging timeout.
>
> patch-5,6,7: According to RFC4293, record MIB counter about fragments reassembly.
>
>
> This patch-set has been tested using IPv6 Ready Logo Phase-2 tool under host and router type.
>
> ---
> Shan Wei <shanwei@cn.fujitsu.com> (7):
> IPv6:netfilter: defrag: Handle sysctls about IPv6 conntrack defragment per-netns
> IPv6:netfilter: defrag: Introduce per-netns to conntrack and kill nf_init_frags
> IPv6:netfilter: defrag: Disable button half when reassembling a fragment
> IPv6:netfilter: Send an ICMPv6 "Fragment Reassembly Timeout" message when enabling connection track
> IPv6:netfilter: Record MIB counter when reassembling all fragments
> IPv6:netfilter: Record MIB counter after a fragment reached
> IPv6:netfilter: Add IPSTATS_MIB_REASMFAILS MIB counter value when evicting fragment queue
>
> Documentation/feature-removal-schedule.txt | 19 ++
> include/linux/skbuff.h | 5 +
> include/net/netns/ipv6.h | 1 +
> net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 7 +-
> net/ipv6/netfilter/nf_conntrack_reasm.c | 221 +++++++++++++++++++-----
> net/ipv6/route.c | 1 +
> 6 files changed, 208 insertions(+), 46 deletions(-)
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [RFC PATCH] bnx2x: fix tx queue locking and memory barriers
From: David Howells @ 2010-03-10 17:19 UTC (permalink / raw)
To: Stanislaw Gruszka, Vladislav Zolotarov, David Miller
Cc: dhowells, paulmck, netdev, Eilon Greenstein
In-Reply-To: <31355.1268240990@redhat.com>
David Howells <dhowells@redhat.com> wrote:
> > - barrier(); /* Tell compiler that prod and cons can change */
> > + /* prod and cons can change on other cpu, want to see
> > + consistend available space and queue (stop/running) state */
> > + smp_mb();
> > +
> > prod = fp->tx_bd_prod;
> > cons = fp->tx_bd_cons;
>
> I suspect that this isn't what you want.
>
> The barrier() didn't tell the compiler that fp->tx_bd_prod and fp->tx_bd_cons
> could change. What it did was to say that the accesses to those two variables
> must be performed after all the other accesses issued by that CPU prior to the
> barrier - at least as far as the compiler is concerned.
>
> You don't need to separate the reads of tx_bd_prod and tx_bd_cons above with a
> memory barrier. They aren't ever altered in the same place.
Having said that, you might need a memory barrier before reading tx_bd_prod in
the consumer if the producer waggles a flag in memory to indicate to the
consumer that it should consume, and a memory barrier in the producer before
waggling that flag:
[producer]
...
smp_wmb(); /* commit buffer contents before incrementing index */
fp->tx_bd_prod = TX_BD(bd_prod + 1);
smp_wmb(); /* commit increment index before prodding consumer */
prod_consumer();
[consumer]
check_prod_flag();
smp_rmb(); /* read producer index after checking prod flag */
bd_prod = fp->tx_bd_prod;
bd_cons = fp->tx_bd_cons;
smp_read_barrier_depends(); /* read index before reading contents */
David
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox