Re: [ICMP]: Avoid sparse warnings in net/ipv4/icmp.c

2008-01-03 Thread Eric Dumazet
David Miller a écrit : From: Eric Dumazet <[EMAIL PROTECTED]> Date: Fri, 04 Jan 2008 06:24:20 +0100 CHECK net/ipv4/icmp.c net/ipv4/icmp.c:249:13: warning: context imbalance in 'icmp_xmit_unlock' - unexpected unlock net/ipv4/icmp.c:376:13: warning: context imbalance in 'icmp_reply' - diffe

Re: [ICMP]: Avoid sparse warnings in net/ipv4/icmp.c

2008-01-03 Thread David Miller
From: Eric Dumazet <[EMAIL PROTECTED]> Date: Fri, 04 Jan 2008 06:24:20 +0100 >CHECK net/ipv4/icmp.c > net/ipv4/icmp.c:249:13: warning: context imbalance in 'icmp_xmit_unlock' - > unexpected unlock > net/ipv4/icmp.c:376:13: warning: context imbalance in 'icmp_reply' - > different > lock co

[ICMP]: Avoid sparse warnings in net/ipv4/icmp.c

2008-01-03 Thread Eric Dumazet
CHECK net/ipv4/icmp.c net/ipv4/icmp.c:249:13: warning: context imbalance in 'icmp_xmit_unlock' - unexpected unlock net/ipv4/icmp.c:376:13: warning: context imbalance in 'icmp_reply' - different lock contexts for basic block net/ipv4/icmp.c:430:6: warning: context imbalance in 'icmp_send' - d

Re: [NET]: prot_inuse cleanups and optimizations

2008-01-03 Thread David Miller
From: Eric Dumazet <[EMAIL PROTECTED]> Date: Thu, 3 Jan 2008 18:41:54 +0100 > 1) Cleanups (all functions are prefixed by sock_prot_inuse) > > sock_prot_inc_use(prot) -> sock_prot_inuse_add(prot,-1) > sock_prot_dec_use(prot) -> sock_prot_inuse_add(prot,-1) > sock_prot_inuse() -> sock_prot_in

Re: [PATCH 1/2] LSM: Add inet_sys_snd_skb() LSM hook

2008-01-03 Thread David Miller
From: Paul Moore <[EMAIL PROTECTED]> Date: Thu, 03 Jan 2008 12:25:39 -0500 > Add an inet_sys_snd_skb() LSM hook to allow the LSM to provide packet level > access control for all outbound packets. Using the existing postroute_last > netfilter hook turns out to be problematic as it is can be invoke

Re: [XFRM]: Do not define km_migrate() if !CONFIG_XFRM_MIGRATE

2008-01-03 Thread David Miller
From: Eric Dumazet <[EMAIL PROTECTED]> Date: Thu, 3 Jan 2008 18:24:49 +0100 > In include/net/xfrm.h we find : > > #ifdef CONFIG_XFRM_MIGRATE > extern int km_migrate(struct xfrm_selector *sel, u8 dir, u8 type, > struct xfrm_migrate *m, int num_bundles); > ... > #endif > > We

Re: [LIB] pcounter : unline too big functions

2008-01-03 Thread David Miller
From: Eric Dumazet <[EMAIL PROTECTED]> Date: Thu, 3 Jan 2008 16:52:27 +0100 > Before pushing pcounter to Linus tree, I would like to make some adjustments. > > Goal is to reduce kernel text size, by unlining too big functions. ... > Signed-off-by: Eric Dumazet <[EMAIL PROTECTED]> Applied, thanks

Re: [NET]: Avoid divides in net/core/gen_estimator.c

2008-01-03 Thread David Miller
From: Eric Dumazet <[EMAIL PROTECTED]> Date: Thu, 3 Jan 2008 14:12:35 +0100 > We can void divides (as seen with CONFIG_CC_OPTIMIZE_FOR_SIZE=y on x86) > changing ((HZ< > Signed-off-by: Eric Dumazet <[EMAIL PROTECTED]> Applied, thanks Eric. -- To unsubscribe from this list: send the line "unsubscr

Re: [PATCH net-2.6.25 3/3] [TCP]: Perform setting of common control fields in one place

2008-01-03 Thread David Miller
From: "Ilpo_Järvinen" <[EMAIL PROTECTED]> Date: Thu, 3 Jan 2008 13:00:07 +0200 > In case of segments which are purely for control without any > data (SYN/ACK/FIN/RST), many fields are set to common values > in multiple places. ... > Signed-off-by: Ilpo Järvinen <[EMAIL PROTECTED]> It's nice to

Re: [PATCH net-2.6.25 2/3] [TCP]: Urgent parameter effect can be simplified.

2008-01-03 Thread David Miller
From: "Ilpo_Järvinen" <[EMAIL PROTECTED]> Date: Thu, 3 Jan 2008 13:00:06 +0200 > Signed-off-by: Ilpo Järvinen <[EMAIL PROTECTED]> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel

Re: [PATCH net-2.6.25 1/3] [TCP]: cleanup tcp_parse_options deep indented switch

2008-01-03 Thread David Miller
From: "Ilpo_Järvinen" <[EMAIL PROTECTED]> Date: Thu, 3 Jan 2008 13:00:05 +0200 > Removed case indentation level & combined some nested ifs, mostly > within 80 lines now. This is a leftover from indent patch, it > just had to be done manually to avoid messing it up completely. > > Signed-off-by:

Re: forcedeth: MAC-address reversed on resume from suspend

2008-01-03 Thread Björn Steinbrink
On 2008.01.03 01:42:09 +0200, Adrian Bunk wrote: > [ original bug report: http://lkml.org/lkml/2008/1/2/253 ] > > On Wed, Jan 02, 2008 at 10:48:43PM +0100, Andreas Mohr wrote: > > Hi, > > > > On Wed, Jan 02, 2008 at 10:04:49PM +0100, Richard Jonsson wrote: > > > Bugreport regarding forcedeth driv

Re: [RFC PATCH] NET: Clone the sk_buff->iif field properly

2008-01-03 Thread David Miller
From: Paul Moore <[EMAIL PROTECTED]> Date: Thu, 3 Jan 2008 22:19:03 -0500 > > Perhaps move the skb->cloned = 1 to just after n->cloned = 1 > > or > > skb->cloned = n->cloned = 1; > > or maybe > > skb->cloned = 1; > > C(cloned); > > I thought about that, but I kinda like how the parent

lockless pagecache Cassini regression

2008-01-03 Thread David Miller
Nick, I think the following changeset: commit fa4f0774d7c6cccb4d1fda76b91dd8eddcb2dd6a [CASSINI]: dont touch page_count Remove page refcount manipulations from cassini driver by using another field in struct page. Needed for lockless pagecache. Signed-off-by: Nick P

Re: [RFC PATCH] NET: Clone the sk_buff->iif field properly

2008-01-03 Thread Paul Moore
On Thursday 03 January 2008 6:40:07 pm Joe Perches wrote: > On Thu, 2008-01-03 at 18:13 -0500, Paul Moore wrote: > > static struct sk_buff *__skb_clone(struct sk_buff *n, struct sk_buff > > *skb) > > { > > #define C(x) n->x = skb->x > > > > n->next = n->prev = NULL; > > n->sk = NULL; > >

[PATCH] PHYLIB: Locking fixes for PHY I/O potentially sleeping

2008-01-03 Thread Nate Case
PHY read/write functions can potentially sleep (e.g., a PHY accessed via I2C). The following changes were made to account for this: * Change spin locks to mutex locks * Add a BUG_ON() to phy_read() phy_write() to warn against calling them from an interrupt context. * Use work qu

Re: [RFC PATCH] NET: Clone the sk_buff->iif field properly

2008-01-03 Thread Joe Perches
On Thu, 2008-01-03 at 18:13 -0500, Paul Moore wrote: > static struct sk_buff *__skb_clone(struct sk_buff *n, struct sk_buff > *skb) > { > #define C(x) n->x = skb->x > > n->next = n->prev = NULL; > n->sk = NULL; > __copy_skb_header(n, skb); > > C(len); > C(data_len);

Re: [RFC PATCH] NET: Clone the sk_buff->iif field properly

2008-01-03 Thread David Miller
From: Paul Moore <[EMAIL PROTECTED]> Date: Thu, 3 Jan 2008 18:13:57 -0500 > On Thursday 03 January 2008 6:05:18 pm David Miller wrote: > > From: Paul Moore <[EMAIL PROTECTED]> > > Date: Thu, 3 Jan 2008 16:20:06 -0500 > > > > > On Thursday 03 January 2008 4:13:12 pm Jarek Poplawski wrote: > > > > O

Re: [RFC PATCH] NET: Clone the sk_buff->iif field properly

2008-01-03 Thread Paul Moore
On Thursday 03 January 2008 6:05:18 pm David Miller wrote: > From: Paul Moore <[EMAIL PROTECTED]> > Date: Thu, 3 Jan 2008 16:20:06 -0500 > > > On Thursday 03 January 2008 4:13:12 pm Jarek Poplawski wrote: > > > On Thu, Jan 03, 2008 at 11:15:34AM -0500, Paul Moore wrote: > > > ... > > > > > > > Whil

Re: [RFC PATCH] NET: Clone the sk_buff->iif field properly

2008-01-03 Thread David Miller
From: Paul Moore <[EMAIL PROTECTED]> Date: Thu, 3 Jan 2008 16:20:06 -0500 > On Thursday 03 January 2008 4:13:12 pm Jarek Poplawski wrote: > > On Thu, Jan 03, 2008 at 11:15:34AM -0500, Paul Moore wrote: > > ... > > > > > While I'm at it, is there some reason for this #define in > > > __skb_clone()?

[PATCH 1/1] r8169: fix missing loop variable increment

2008-01-03 Thread Francois Romieu
Spotted-by: Citizen Lee <[EMAIL PROTECTED]> Signed-off-by: Francois Romieu <[EMAIL PROTECTED]> --- drivers/net/r8169.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 5863190..6ee9db1 100644 --- a/drivers/net/r8169.c +++ b/d

Re: [RFC PATCH] NET: Clone the sk_buff->iif field properly

2008-01-03 Thread Jarek Poplawski
On Thu, Jan 03, 2008 at 11:06:08PM +0100, Jarek Poplawski wrote: ... > I'm not macros fan in general: just yesterday I've cursed a bit at some > guy (I forgot the name...), who gave all these "meaningful" names to > macros in linux/pkt_cls.h. But, maybe after some time I'll start to > defend them a

Re: [RFC PATCH] NET: Clone the sk_buff->iif field properly

2008-01-03 Thread Jarek Poplawski
On Thu, Jan 03, 2008 at 04:20:06PM -0500, Paul Moore wrote: ... > For me personally, I would argue the readability bit. Whenever I see a > function/macro call I have to go find the function/macro definition > before I can understand what it is doing. Granted, the macro is > defined "local" to

Re: [RFC PATCH] NET: Clone the sk_buff->iif field properly

2008-01-03 Thread Paul Moore
On Thursday 03 January 2008 4:13:12 pm Jarek Poplawski wrote: > On Thu, Jan 03, 2008 at 11:15:34AM -0500, Paul Moore wrote: > ... > > > While I'm at it, is there some reason for this #define in > > __skb_clone()? > > > > #define C(x) n->x = skb->x > > > > ... it seems kinda silly to me and I tend

Re: [RFC PATCH] NET: Clone the sk_buff->iif field properly

2008-01-03 Thread Jarek Poplawski
On Thu, Jan 03, 2008 at 11:15:34AM -0500, Paul Moore wrote: ... > While I'm at it, is there some reason for this #define in __skb_clone()? > > #define C(x) n->x = skb->x > > ... it seems kinda silly to me and I tend to think the code would be > better without it. IMHO, if there are a lot of th

RE: [PATCH 2.6.23.12] net/bonding: option to specify initial bond interface number

2008-01-03 Thread Jari Takkala
On Thursday, January 03, 2008 12:04, Jay Vosburgh wrote: >> In our startup scripts we need to be able to ensure that the >> interface name is consistent across reboots. Sometimes bond1 may be >> brought up before bond0 and it may have different options (requiring >> a different instance of the bond

Re: 2.6.24-rc6-mm1

2008-01-03 Thread J. Bruce Fields
On Thu, Jan 03, 2008 at 04:37:46PM +0100, Torsten Kaiser wrote: > On Jan 2, 2008 10:57 PM, J. Bruce Fields <[EMAIL PROTECTED]> wrote: > > On Thu, Jan 03, 2008 at 08:51:54AM +1100, Herbert Xu wrote: > > > The two specific trees of interest would be git-nfsd and git-net. > > > > Also, if it's git-nfs

Re: [PATCH 2/2] NET: Clone the sk_buff 'iif' field in __skb_clone()

2008-01-03 Thread Paul Moore
On Thursday 03 January 2008 1:33:05 pm Joe Perches wrote: > On Thu, 2008-01-03 at 12:25 -0500, Paul Moore wrote: > > diff --git a/net/core/skbuff.c b/net/core/skbuff.c > > index 5b4ce9b..c726cd4 100644 > > --- a/net/core/skbuff.c > > +++ b/net/core/skbuff.c > > @@ -407,31 +407,29 @@ static void __c

Re: [PATCH 2/2] NET: Clone the sk_buff 'iif' field in __skb_clone()

2008-01-03 Thread Joe Perches
On Thu, 2008-01-03 at 12:25 -0500, Paul Moore wrote: > diff --git a/net/core/skbuff.c b/net/core/skbuff.c > index 5b4ce9b..c726cd4 100644 > --- a/net/core/skbuff.c > +++ b/net/core/skbuff.c > @@ -407,31 +407,29 @@ static void __copy_skb_header(struct sk_buff *new, > const struct sk_buff *old) >

[NET]: prot_inuse cleanups and optimizations

2008-01-03 Thread Eric Dumazet
1) Cleanups (all functions are prefixed by sock_prot_inuse) sock_prot_inc_use(prot) -> sock_prot_inuse_add(prot,-1) sock_prot_dec_use(prot) -> sock_prot_inuse_add(prot,-1) sock_prot_inuse() -> sock_prot_inuse_get() New functions : sock_prot_inuse_init() and sock_prot_inuse_free() to abstra

[PATCH 2/2] NET: Clone the sk_buff 'iif' field in __skb_clone()

2008-01-03 Thread Paul Moore
Both NetLabel and SELinux (other LSMs may grow to use it as well) rely on the 'iif' field to determine the receiving network interface of inbound packets. Unfortunately, at present this field is not preserved across a skb clone operation which can lead to garbage values if the cloned skb is sent ba

[PATCH 0/2] Labeled networking core stack changes for 2.6.25

2008-01-03 Thread Paul Moore
Two small patches for 2.6.25 which enable some new labeled networking features and fixes. One patch introduces a new outbound packet LSM hook and one adds the skb 'iif' field to the list of fields copied during a clone operation. Both of these patches are part of a much larger patchset that has b

[PATCH 1/2] LSM: Add inet_sys_snd_skb() LSM hook

2008-01-03 Thread Paul Moore
Add an inet_sys_snd_skb() LSM hook to allow the LSM to provide packet level access control for all outbound packets. Using the existing postroute_last netfilter hook turns out to be problematic as it is can be invoked multiple times for a single packet, e.g. individual IPsec transforms, adding unw

[XFRM]: Do not define km_migrate() if !CONFIG_XFRM_MIGRATE

2008-01-03 Thread Eric Dumazet
In include/net/xfrm.h we find : #ifdef CONFIG_XFRM_MIGRATE extern int km_migrate(struct xfrm_selector *sel, u8 dir, u8 type, struct xfrm_migrate *m, int num_bundles); ... #endif We can also guard the function body itself in net/xfrm/xfrm_state.c with same condition. (Proble

Re: [patch 7/9][NETNS][IPV6] make mld_max_msf per namespace

2008-01-03 Thread David Stevens
Daniel Lezcano <[EMAIL PROTECTED]> wrote on 01/03/2008 03:00:48 AM: ... > With this solution, we can handle different values for the namespaces > but these values are driven by the initial network namespace because > their values are lesser or equal to the one from the initial network > namespac

Re: [PATCH 2.6.23.12] net/bonding: option to specify initial bond interface number

2008-01-03 Thread Jay Vosburgh
Jari Takkala <[EMAIL PROTECTED]> wrote: >On Wednesday, January 02, 2008 17:24, Jay Vosburgh wrote: >> What advantage does this have over: >> >> # echo +bond5 > /sys/class/net/bonding_masters >> >> which will create a new bonding master for the already-loaded driver? >> > >The advantage

Re: [RFC PATCH] NET: Clone the sk_buff->iif field properly

2008-01-03 Thread Paul Moore
On Thursday 03 January 2008 6:23:22 am jamal wrote: > On Thu, 2008-03-01 at 10:58 +0100, Jarek Poplawski wrote: > > On 02-01-2008 17:01, Paul Moore wrote: > > > This patch is needed by some of the labeled networking changes > > > proposed for 2.6.25, does anyone have any objections? > > > > Probabl

[PATCH] [INET] Fix netdev renaming and inet address labels

2008-01-03 Thread Mark McLoughlin
When re-naming an interface, the previous secondary address labels get lost e.g. $> brctl addbr foo $> ip addr add 192.168.0.1 dev foo $> ip addr add 192.168.0.2 dev foo label foo:00 $> ip addr show dev foo | grep inet inet 192.168.0.1/32 scope global foo inet 192.168.0.2/32 scope

[LIB] pcounter : unline too big functions

2008-01-03 Thread Eric Dumazet
Before pushing pcounter to Linus tree, I would like to make some adjustments. Goal is to reduce kernel text size, by unlining too big functions. When a pcounter is bound to a statically defined per_cpu variable, we define two small helpers functions. (No more folding function using the fat for_ea

Re: 2.6.24-rc6-mm1

2008-01-03 Thread Torsten Kaiser
On Jan 2, 2008 10:57 PM, J. Bruce Fields <[EMAIL PROTECTED]> wrote: > On Thu, Jan 03, 2008 at 08:51:54AM +1100, Herbert Xu wrote: > > The two specific trees of interest would be git-nfsd and git-net. > > Also, if it's git-nfsd, it'd be useful to test with the current git-nfsd > from the for-mm bran

RE: [PATCH 2.6.23.12] net/bonding: option to specify initial bond interface number

2008-01-03 Thread Jari Takkala
On Wednesday, January 02, 2008 16:56, Randy Dunlap wrote: > You could (should) make be unsigned int and then use > module_param(ifnum, uint, 0); and then ... > > then this block is mostly useless since ifnum cannot be < 0. > And how could it ever be > INT_MAX (when ifnum was an int)? > > If is

RE: [PATCH 2.6.23.12] net/bonding: option to specify initial bond interface number

2008-01-03 Thread Jari Takkala
On Wednesday, January 02, 2008 17:24, Jay Vosburgh wrote: > What advantage does this have over: > > # echo +bond5 > /sys/class/net/bonding_masters > > which will create a new bonding master for the already-loaded driver? > The advantage is that you can load multiple instances of the

Re: [RFC PATCH] NET: Clone the sk_buff->iif field properly

2008-01-03 Thread Paul Moore
On Thursday 03 January 2008 6:23:22 am jamal wrote: > On Thu, 2008-03-01 at 10:58 +0100, Jarek Poplawski wrote: > > On 02-01-2008 17:01, Paul Moore wrote: > > > This patch is needed by some of the labeled networking changes proposed > > > for 2.6.25, does anyone have any objections? > > > > Probabl

[NET]: Avoid divides in net/core/gen_estimator.c

2008-01-03 Thread Eric Dumazet
We can void divides (as seen with CONFIG_CC_OPTIMIZE_FOR_SIZE=y on x86) changing ((HZ< diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c index daadbcc..86037d1 100644 --- a/net/core/gen_estimator.c +++ b/net/core/gen_estimator.c @@ -135,7 +135,7 @@ skip: } if (!lis

[Patch] xfrm_policy_destroy: rename and relative fixes

2008-01-03 Thread WANG Cong
Since __xfrm_policy_destroy is used to destory the resources allocated by xfrm_policy_alloc. So using the name __xfrm_policy_destroy is not correspond with xfrm_policy_alloc. Rename it to xfrm_policy_destroy. And along with some instances that call xfrm_policy_alloc but not using xfrm_policy_dest

Re: [RFC PATCH] NET: Clone the sk_buff->iif field properly

2008-01-03 Thread jamal
On Thu, 2008-03-01 at 10:58 +0100, Jarek Poplawski wrote: > On 02-01-2008 17:01, Paul Moore wrote: > > This patch is needed by some of the labeled networking changes proposed for > > 2.6.25, does anyone have any objections? > > Probably Jamal could be the most interested (added to CC): > Gracia

Re: [patch 7/9][NETNS][IPV6] make mld_max_msf per namespace

2008-01-03 Thread Daniel Lezcano
David Stevens wrote: Daniel, I'm not sure what benefit you get from making this per-namespace. The point of it is really to prevent one (non-root, even) application from killing machine performance with source filters (because maintaining them is an n^2 algorithm). It's a weak constraint,

[PATCH net-2.6.25 1/3] [TCP]: cleanup tcp_parse_options deep indented switch

2008-01-03 Thread Ilpo Järvinen
Removed case indentation level & combined some nested ifs, mostly within 80 lines now. This is a leftover from indent patch, it just had to be done manually to avoid messing it up completely. Signed-off-by: Ilpo Järvinen <[EMAIL PROTECTED]> --- net/ipv4/tcp_input.c | 135

[PATCH net-2.6.25 2/3] [TCP]: Urgent parameter effect can be simplified.

2008-01-03 Thread Ilpo Järvinen
Signed-off-by: Ilpo Järvinen <[EMAIL PROTECTED]> --- net/ipv4/tcp_output.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index f6d279a..6c7cd0a 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -2488,7 +2488,

[PATCH net-2.6.25 3/3] [TCP]: Perform setting of common control fields in one place

2008-01-03 Thread Ilpo Järvinen
In case of segments which are purely for control without any data (SYN/ACK/FIN/RST), many fields are set to common values in multiple places. i386 results: $ gcc --version gcc (GCC) 4.1.2 20070626 (Red Hat 4.1.2-13) $ codiff tcp_output.o.old tcp_output.o.new net/ipv4/tcp_output.c: tcp_xmit_pro

Re: [RFC PATCH] NET: Clone the sk_buff->iif field properly

2008-01-03 Thread Jarek Poplawski
On 02-01-2008 17:01, Paul Moore wrote: > When sk_buffs are cloned the iif field of the new, cloned packet is neither > zeroed out or copied from the existing sk_buff. The result is that the newly > cloned sk_buff has garbage in the iif field which is a Bad Thing. This patch > fixes this problem b

Re: TCP event tracking via netlink...

2008-01-03 Thread David Miller
From: "Ilpo_Järvinen" <[EMAIL PROTECTED]> Date: Wed, 2 Jan 2008 13:05:17 +0200 (EET) > git://git.kernel.org/pub/scm/network/tcptest/tcptest.git Thanks a lot Ilpo. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info

Re: neigh: timer & !nud_in_timer

2008-01-03 Thread John Sigler
John Sigler wrote: I noticed the following message in my kernel log. kernel: neigh: timer & !nud_in_timer (Might be due to a race condition.) I'm running a UP Linux version 2.6.22.1-rt9 ( http://rt.wiki.kernel.org/index.php ) The following /proc entries might be relevant. /proc/sys/net/ipv4/c