Re: [PATCH -rt] Fix initialization of spinlock in irttp_dup()

2007-03-21 Thread Ingo Molnar
* Deepak Saxena [EMAIL PROTECTED] wrote: This was found around the 2.6.10 timeframe when testing with the -rt patch and I believe is still is an issue. irttp_dup() does a memcpy() of the tsap_cb structure causing the spinlock protecting various fields in the structure to be duped. This

Re: Oops in filter add

2007-03-21 Thread jamal
On Tue, 2007-20-03 at 11:58 +0100, Patrick McHardy wrote: jamal wrote: So the resolution (as Dave points out) was wrong. In any case, restoring queue_lock for now would slow things but will remove the race. Yes. I think thats what we should do for 2.6.21, since fixing this while

[PATCH 1/1][PKT_CLS] Avoid multiple tree locks

2007-03-21 Thread jamal
Seems to have been around a while. IMO, mterial for 2.6.21 but not stable. I have only compile-tested but it looks right(tm). I could have moved the lock down, but this looked safer. cheers, jamal [PKT_CLS] Avoid multiple tree locks This fixes: When dumping filters the tree is locked first in the

Re: [PATCH 1/1][PKT_CLS] Avoid multiple tree locks

2007-03-21 Thread Patrick McHardy
jamal wrote: Seems to have been around a while. IMO, mterial for 2.6.21 but not stable. I have only compile-tested but it looks right(tm). Its harmless since its a read lock, which can be nested. I actually don't see any need for qdisc_tree_lock at all, all changes and all walking is done

Re: [PATCH 1/1][PKT_CLS] Avoid multiple tree locks

2007-03-21 Thread Patrick McHardy
Patrick McHardy wrote: jamal wrote: Seems to have been around a while. IMO, mterial for 2.6.21 but not stable. I have only compile-tested but it looks right(tm). Its harmless since its a read lock, which can be nested. I actually don't see any need for qdisc_tree_lock at all, all

Re: [PATCH 1/1][PKT_CLS] Avoid multiple tree locks

2007-03-21 Thread jamal
On Wed, 2007-21-03 at 11:10 +0100, Patrick McHardy wrote: Its harmless since its a read lock, which can be nested. I actually don't see any need for qdisc_tree_lock at all, all changes and all walking is done under the RTNL, which is why I've removed it in my (upcoming) patches. I suggest to

[1/1] netlink: no need to crash if table does not exist.

2007-03-21 Thread Evgeniy Polyakov
We would already do that on init. Some things become very confused, when nl_table is not used to store netlink sockets. Signed-off-by: Evgeniy Polyakov [EMAIL PROTECTED] 23ebdcf1f439cde050a63f33897d5b099fe08c95 diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index

Re: [1/1] netlink: no need to crash if table does not exist.

2007-03-21 Thread Patrick McHardy
Evgeniy Polyakov wrote: We would already do that on init. Some things become very confused, when nl_table is not used to store netlink sockets. Its unnecessary, but I don't understand what the problem is. Why would it be NULL and what gets confused? - To unsubscribe from this list: send the

Re: [1/1] netlink: no need to crash if table does not exist.

2007-03-21 Thread Evgeniy Polyakov
On Wed, Mar 21, 2007 at 11:54:45AM +0100, Patrick McHardy ([EMAIL PROTECTED]) wrote: Evgeniy Polyakov wrote: We would already do that on init. Some things become very confused, when nl_table is not used to store netlink sockets. Its unnecessary, but I don't understand what the problem

Re: [irda-users] [2.6.20-rt8] Neighbour table overflow.

2007-03-21 Thread Guennadi Liakhovetski
(Short recap for newly added to cc: netdev: I'm seeing an skb leak in 2.6.20 during an IrDA IrNET+ppp UDP test with periodic connection disruptions) On Wed, 21 Mar 2007, Guennadi Liakhovetski wrote: On Tue, 20 Mar 2007, Guennadi Liakhovetski wrote: Ok, looks like all leaked skbuffs come

Re: [irda-users] [2.6.20-rt8] Neighbour table overflow.

2007-03-21 Thread Samuel Ortiz
On 3/21/2007, Guennadi Liakhovetski [EMAIL PROTECTED] wrote: (Short recap for newly added to cc: netdev: I'm seeing an skb leak in 2.6.20 during an IrDA IrNET+ppp UDP test with periodic connection disruptions) On Wed, 21 Mar 2007, Guennadi Liakhovetski wrote: On Tue, 20 Mar 2007, Guennadi

Re: [PATCH 5/5] [NETLINK]: Ignore control messages directly in netlink_run_queue()

2007-03-21 Thread Thomas Graf
* Thomas Graf [EMAIL PROTECTED] 2007-03-21 12:45 * Patrick McHardy [EMAIL PROTECTED] 2007-03-21 05:44 This looks like it would break nfnetlink, which appears to be using 0 as smallest message type. It shouldn't do that, the first 16 message types are reserved for control messages.

Re: [irda-users] [2.6.20-rt8] Neighbour table overflow.

2007-03-21 Thread Guennadi Liakhovetski
On Wed, 21 Mar 2007, Samuel Ortiz wrote: On 3/21/2007, Guennadi Liakhovetski [EMAIL PROTECTED] wrote: [c0182380] (__kfree_skb+0x0/0x170) from [c0182514] (kfree_skb+0x24/0x50) r5 = C332BC00 r4 = C332BC00 [c01824f0] (kfree_skb+0x0/0x50) from [bf0fac58] (irlap_update_nr_received+0x94/0xc8

Re: [PATCH 5/5] [NETLINK]: Ignore control messages directly in netlink_run_queue()

2007-03-21 Thread Patrick McHardy
Thomas Graf wrote: * Patrick McHardy [EMAIL PROTECTED] 2007-03-21 05:44 This looks like it would break nfnetlink, which appears to be using 0 as smallest message type. It shouldn't do that, the first 16 message types are reserved for control messages. I'm afraid it does: enum

Re: [PATCH 5/5] [NETLINK]: Ignore control messages directly in netlink_run_queue()

2007-03-21 Thread Patrick McHardy
Patrick McHardy wrote: Thomas Graf wrote: * Patrick McHardy [EMAIL PROTECTED] 2007-03-21 05:44 This looks like it would break nfnetlink, which appears to be using 0 as smallest message type. It shouldn't do that, the first 16 message types are reserved for control messages. I'm

Re: [PATCH 5/5] [NETLINK]: Ignore control messages directly in netlink_run_queue()

2007-03-21 Thread Thomas Graf
* Patrick McHardy [EMAIL PROTECTED] 2007-03-21 13:06 Thomas Graf wrote: * Patrick McHardy [EMAIL PROTECTED] 2007-03-21 05:44 This looks like it would break nfnetlink, which appears to be using 0 as smallest message type. It shouldn't do that, the first 16 message types are reserved

Re: [PATCH 5/5] [NETLINK]: Ignore control messages directly in netlink_run_queue()

2007-03-21 Thread Thomas Graf
* Patrick McHardy [EMAIL PROTECTED] 2007-03-21 13:21 Seems like we're lucky, nfnetlink encodes the subsystem ID in the upper 8 bits of the message type and uses 1 as the smallest ID: Alright, you've been quicker :-) - To unsubscribe from this list: send the line unsubscribe netdev in the body

[NETFILTER] nfnetlink: netlink_run_queue() already checks for NLM_F_REQUEST

2007-03-21 Thread Thomas Graf
Patrick has made use of netlink_run_queue() in nfnetlink while my patches have been waiting for net-2.6.22 to open. So this check for NLM_F_REQUEST can go as well. Signed-off-by: Thomas Graf [EMAIL PROTECTED] Index: net-2.6.22/net/netfilter/nfnetlink.c

Re: [PATCH 1/1][PKT_CLS] Avoid multiple tree locks

2007-03-21 Thread Patrick McHardy
Patrick McHardy wrote: Its harmless since its a read lock, which can be nested. I actually don't see any need for qdisc_tree_lock at all, all changes and all walking is done under the RTNL, which is why I've removed it in my (upcoming) patches. I suggest to leave it as is for now so I don't need

Re: [NETFILTER] nfnetlink: netlink_run_queue() already checks for NLM_F_REQUEST

2007-03-21 Thread Patrick McHardy
Thomas Graf wrote: Patrick has made use of netlink_run_queue() in nfnetlink while my patches have been waiting for net-2.6.22 to open. So this check for NLM_F_REQUEST can go as well. Looks good, thanks. I've added it to my queue. - To unsubscribe from this list: send the line unsubscribe

Re: [PATCH 10/12] [IPv6]: Use rtnl registration interface

2007-03-21 Thread Thomas Graf
* YOSHIFUJI Hideaki / ?$B5HF#1QL@ [EMAIL PROTECTED] 2007-03-21 02:01 In article [EMAIL PROTECTED] (at Wed, 21 Mar 2007 01:06:03 +0100), Thomas Graf [EMAIL PROTECTED] says: -static int -inet6_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) +static int nl_addr_del(struct

Re: [PATCH 1/1][PKT_CLS] Avoid multiple tree locks

2007-03-21 Thread Patrick McHardy
Patrick McHardy wrote: Alexey just explained to me why we do need qdisc_tree_lock in private mail. While dumping only the first skb is filled under the RTNL, while filling further skbs we don't hold the RTNL anymore. So I will probably have to drop that patch. What we could do is replace

Re: [PATCH 1/1][PKT_CLS] Avoid multiple tree locks

2007-03-21 Thread Patrick McHardy
Patrick McHardy wrote: Patrick McHardy wrote: Alexey just explained to me why we do need qdisc_tree_lock in private mail. While dumping only the first skb is filled under the RTNL, while filling further skbs we don't hold the RTNL anymore. So I will probably have to drop that patch. What we

[PATCH 2/5] netem: use better types for time values

2007-03-21 Thread Stephen Hemminger
The random number generator always generates 32 bit values. The time values are limited by psched_tdiff_t Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] --- net/sched/sch_netem.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) ---

[PATCH 0/5] netem performance improvements

2007-03-21 Thread Stephen Hemminger
The following patches for the 2.6.22 net tree, increase the performance of netem by about 2x. With 2.6.20 getting about 100K (out of possible 300K) packets per second, after these patches now at over 200K pps. -- - To unsubscribe from this list: send the line unsubscribe netdev in the body of

[PATCH 5/5] qdisc: avoid transmit softirq on watchdog wakeup

2007-03-21 Thread Stephen Hemminger
If possible, avoid having to do a transmit softirq when a qdisc watchdog decides to re-enable. The watchdog routine runs off a timer, so it is already in the same effective context as the softirq. Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] --- net/sched/sch_api.c |8 +++- 1

[PATCH 3/5] netem: optimize tfifo

2007-03-21 Thread Stephen Hemminger
In most cases, the next packet will be sent after the last one. So optimize that case. Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] --- net/sched/sch_netem.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) --- net-2.6.22.orig/net/sched/sch_netem.c +++

[PATCH 1/5] netem: report reorder percent correctly.

2007-03-21 Thread Stephen Hemminger
If you setup netem to just delay packets; tc qdisc ls will report the reordering as 100%. Well it's a lie, reorder isn't used unless gap is set, so just set value to 0 so the output of utility is correct. Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] --- net/sched/sch_netem.c |3 ++-

[PATCH 4/5] netem: avoid excessive requeues

2007-03-21 Thread Stephen Hemminger
The netem code would call getnstimeofday() and dequeue/requeue after every packet, even if it was waiting. Avoid this overhead by using the throttled flag. Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] --- net/sched/sch_api.c |3 +++ net/sched/sch_netem.c | 21 -

iproute2-2.6.20-070313 bug ?

2007-03-21 Thread Denys
Possible i discovered bug, but maybe specific to my setup. In your sources (tc/tc_core.h) i notice #define TIME_UNITS_PER_SEC10 When i change it to #define TIME_UNITS_PER_SEC 100.0 (it was value before in sources) everythign works fine. Otherwise tbf not working at all,

[RESEND 0/4] was: [PATCH 0/3] myri10ge updates for 2.6.21

2007-03-21 Thread Brice Goglin
Brice Goglin wrote: Hi Jeff, Here's 3 minor updates for myri10ge in 2.6.21: 1. use regular firmware on Serverworks HT2100 2. update wcfifo and intr_coal_delay default values 3. update driver version to 1.3.0-1.225 Please apply. Thanks, Brice I just got a last minute fix (management

[PATCH 1/4] myri10ge: Serverworks HT2100 provides aligned PCIe completion

2007-03-21 Thread Brice Goglin
[PATCH 1/4] myri10ge: Serverworks HT2100 provides aligned PCIe completion Use the regular firmware on Serverworks HT2100 PCIe ports since this chipset provides aligned PCIe completion. Signed-off-by: Brice Goglin [EMAIL PROTECTED] --- drivers/net/myri10ge/myri10ge.c |8 1 file

[PATCH 2/4] myri10ge: update wcfifo and intr_coal_delay default values

2007-03-21 Thread Brice Goglin
Update the default value of 2 module parameters: * wcfifo disabled * intr_coal_delay 75us Signed-off-by: Brice Goglin [EMAIL PROTECTED] --- drivers/net/myri10ge/myri10ge.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: linux-rc/drivers/net/myri10ge/myri10ge.c

[PATCH 4/4] myri10ge: update driver version to 1.3.0-1.226

2007-03-21 Thread Brice Goglin
Driver version is now 1.3.0-1.226. Signed-off-by: Brice Goglin [EMAIL PROTECTED] --- drivers/net/myri10ge/myri10ge.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-rc/drivers/net/myri10ge/myri10ge.c === ---

[PATCH] netxen: enum and #define cleanups

2007-03-21 Thread Andy Gospodarek
This patch cleans up some rather generically named items in the netxen driver. It seems bad to use names like USER_START and FLASH_TOTAL_SIZE, so I added a NETXEN_ to the front of them. This has been compile tested. Signed-off-by: Andy Gospodarek [EMAIL PROTECTED] --- netxen_nic.h

Re: many sockets, slow sendto

2007-03-21 Thread Eric Dumazet
Eric Dumazet a écrit : Currently, udp_hash[UDP_HTABLE_SIZE] is using a hash function based on dport number only. In your case, as you use a single port value, all sockets are in a single slot of this hash table : To find the good socket, __udp4_lib_lookup() has to search in a list with

Re: many sockets, slow sendto

2007-03-21 Thread Eric Dumazet
Zacco a écrit : Actually, the source address would be more important in my case, as my clients (each with different IP address) wants to connect to the same server, i.e. to the same address and port. I dont understand why you need many sockets then. A single socket should be enough. I

[PATCH 0/3] [PATCHSET] netlink error management

2007-03-21 Thread Thomas Graf
This series of patches simplifies the error management and signalization of dump starts of netlink_run_queue() message handlers. It touches a fair bit of nfnetlink code as the error pointer has been passed on to subsystems. - To unsubscribe from this list: send the line unsubscribe netdev in the

[PATCH 1/3] [NETLINK]: Remove error pointer from netlink message handler

2007-03-21 Thread Thomas Graf
The error pointer argument in netlink message handlers is used to signal the special case where processing has to be interrupted because a dump was started but no error happened. Instead it is simpler and more clear to return -EINTR and have netlink_run_queue() deal with getting the queue right.

[PATCH 2/3] [IPv4] diag: Use netlink_run_queue() to process the receive queue

2007-03-21 Thread Thomas Graf
Makes use of netlink_run_queue() to process the receive queue and converts inet_diag_rcv_msg() to use the type safe netlink interface. Signed-off-by: Thomas Graf [EMAIL PROTECTED] Index: net-2.6.22/net/ipv4/inet_diag.c === ---

Re: many sockets, slow sendto

2007-03-21 Thread Eric Dumazet
Zacco a écrit : So, my worry is confirmed then. But how could that delay disappear when splitting the sender and receiver on distinct hosts? Even in that case the good socket must be found somehow. When the receiver and sender are on the same machine, the sendto() pass the packet to

fix up misplaced inlines.

2007-03-21 Thread Dave Jones
Turning up the warnings on gcc makes it emit warnings about the placement of 'inline' in function declarations. Here's everything that was under net/ Signed-off-by: Dave Jones [EMAIL PROTECTED] diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 4c914df..ecfe8da 100644 ---

Re: many sockets, slow sendto

2007-03-21 Thread David Miller
From: Zacco [EMAIL PROTECTED] Date: Wed, 21 Mar 2007 22:53:13 +0100 Do you think there is interest in such a modification? If so, how could we go on with it? The best thing you can do is hash on both saddr/sport. In order to handle the saddr==0 case the socket lookup has to try two lookups,

[PATCH -mm 3/4] Blackfin: on-chip ethernet MAC controller update driver

2007-03-21 Thread Wu, Bryan
Hi folks, As we move 4 piece same board specific code get_bf537_ether_addr() into arch/blackfin/mach-bf537/boards/eth_mac.c, the comment of driver should be updated. Signed-off-by: Bryan Wu [EMAIL PROTECTED] --- drivers/net/bfin_mac.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH] tcp_cubic: use 32 bit math

2007-03-21 Thread Stephen Hemminger
On Tue, 13 Mar 2007 21:50:20 +0100 Willy Tarreau [EMAIL PROTECTED] wrote: Hi Stephen, On Mon, Mar 12, 2007 at 02:11:56PM -0700, Stephen Hemminger wrote: Oh BTW, I have a newer version with a first approximation of the cbrt() before the div64_64, which allows us to reduce from 3 div64

Re: [PATCH] tcp_cubic: use 32 bit math

2007-03-21 Thread Willy Tarreau
Hi Stephen, On Wed, Mar 21, 2007 at 11:54:19AM -0700, Stephen Hemminger wrote: On Tue, 13 Mar 2007 21:50:20 +0100 Willy Tarreau [EMAIL PROTECTED] wrote: [...] ( cut my boring part ) Here are the results classed by speed : /* Sample output on a Pentium-M 600 MHz : Function

[PATCH 2/2] tcp: cubic optimization

2007-03-21 Thread Stephen Hemminger
Use willy's work in optimizing cube root by having table for small values. Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] --- net-2.6.22.orig/net/ipv4/tcp_cubic.c2007-03-21 12:57:11.0 -0700 +++ net-2.6.22/net/ipv4/tcp_cubic.c 2007-03-21 13:04:59.0 -0700 @@ -91,23

[PATCH 1/2] div64_64 optimization

2007-03-21 Thread Stephen Hemminger
Minor optimization of div64_64. do_div() already does optimization for the case of 32 by 32 divide, so no need to do it here. Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] --- net-2.6.22.orig/lib/div64.c 2007-03-21 12:03:59.0 -0700 +++ net-2.6.22/lib/div64.c 2007-03-21

Re: [PATCH 0/5] [RFC] AF_RXRPC socket family implementation [try #3]

2007-03-21 Thread David Howells
David Howells [EMAIL PROTECTED] wrote: - recvmsg not supporting MSG_TRUNC is rather weird and really ought to be fixed one day as its useful to find out the sizeof message pending when combined with MSG_PEEK Hmmm... I hadn't considered that. I assumed MSG_TRUNC not to be useful

Re: [PATCH 2.6.21 2/4] cxgb3 - Auto-load FW if mismatch detected

2007-03-21 Thread Andrew Morton
On Sun, 18 Mar 2007 13:10:06 -0700 [EMAIL PROTECTED] wrote: config CHELSIO_T3 tristate Chelsio Communications T3 10Gb Ethernet support depends on PCI + select FW_LOADER Something has gone wrong with the indenting there. - To unsubscribe from this list: send the line

Re: [PATCH 0/5] [RFC] AF_RXRPC socket family implementation [try #3]

2007-03-21 Thread David Howells
David Howells [EMAIL PROTECTED] wrote: - recvmsg not supporting MSG_TRUNC is rather weird and really ought to be fixed one day as its useful to find out the sizeof message pending when combined with MSG_PEEK Hmmm... I hadn't considered that. I assumed MSG_TRUNC not to be useful as

Re: [PATCH 2.6.21 2/4] cxgb3 - Auto-load FW if mismatch detected

2007-03-21 Thread Divy Le Ray
Andrew Morton wrote: On Sun, 18 Mar 2007 13:10:06 -0700 [EMAIL PROTECTED] wrote: config CHELSIO_T3 tristate Chelsio Communications T3 10Gb Ethernet support depends on PCI + select FW_LOADER Something has gone wrong with the indenting there. The added

Re: [PATCH 2.6.21 3/4] cxgb3 - Fix potential MAC hang

2007-03-21 Thread Divy Le Ray
Andrew Morton wrote: On Sun, 18 Mar 2007 13:10:12 -0700 [EMAIL PROTECTED] wrote: From: Divy Le Ray [EMAIL PROTECTED] Under rare conditions, the MAC might hang while generating a pause frame. This patch fine tunes the MAC settings to avoid the issue, allows for periodic MAC state check,

[PATCH 2.6.21 5/4] cxgb3 - fix white spaces in drivers/net/Kconfig

2007-03-21 Thread divy
From: Divy Le Ray [EMAIL PROTECTED] Use tabs instead of white spaces for CHELSIO_T3 entry. Signed-off-by: Divy Le Ray [EMAIL PROTECTED] --- drivers/net/Kconfig | 24 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/net/Kconfig

Re: [PATCH 1/1][PKT_CLS] Avoid multiple tree locks

2007-03-21 Thread jamal
On Wed, 2007-21-03 at 15:04 +0100, Patrick McHardy wrote: Patrick McHardy wrote: What we could do is replace the netlink cb_lock spinlock by a user-supplied mutex (supplied to netlink_kernel_create, rtnl_mutex in this case). That would put the entire dump under the rtnl and allow us to

Re: many sockets, slow sendto

2007-03-21 Thread Eric Dumazet
On Wed, 21 Mar 2007 18:15:10 -0700 (PDT) David Miller [EMAIL PROTECTED] wrote: From: Eric Dumazet [EMAIL PROTECTED] Date: Wed, 21 Mar 2007 23:12:40 +0100 I chose in this patch to hash UDP sockets with a hash function that take into account both their port number and address : This has