* [patch 1/9][NETNS][IPV6] make ipv6_sysctl_register to return a value
From: Daniel Lezcano @ 2008-01-02 12:25 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <20080102122548.629622062@localhost.localdomain>
[-- Attachment #1: ipv6-sysctl-register-return-value.patch --]
[-- Type: text/plain, Size: 1998 bytes --]
This patch makes the function ipv6_sysctl_register to return a
value. The af_inet6 init function is now able to catch and handle
an error from the initialization of the sysctl.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
---
include/net/ipv6.h | 2 +-
net/ipv6/af_inet6.c | 5 ++++-
net/ipv6/sysctl_net_ipv6.c | 6 +++++-
3 files changed, 10 insertions(+), 3 deletions(-)
Index: net-2.6.25/include/net/ipv6.h
===================================================================
--- net-2.6.25.orig/include/net/ipv6.h
+++ net-2.6.25/include/net/ipv6.h
@@ -620,7 +620,7 @@ static inline int snmp6_unregister_dev(s
extern ctl_table ipv6_route_table[];
extern ctl_table ipv6_icmp_table[];
-extern void ipv6_sysctl_register(void);
+extern int ipv6_sysctl_register(void);
extern void ipv6_sysctl_unregister(void);
#endif
Index: net-2.6.25/net/ipv6/af_inet6.c
===================================================================
--- net-2.6.25.orig/net/ipv6/af_inet6.c
+++ net-2.6.25/net/ipv6/af_inet6.c
@@ -783,7 +783,9 @@ static int __init inet6_init(void)
*/
#ifdef CONFIG_SYSCTL
- ipv6_sysctl_register();
+ err = ipv6_sysctl_register();
+ if (err)
+ goto sysctl_fail;
#endif
err = icmpv6_init(&inet6_family_ops);
if (err)
@@ -897,6 +899,7 @@ ndisc_fail:
icmp_fail:
#ifdef CONFIG_SYSCTL
ipv6_sysctl_unregister();
+sysctl_fail:
#endif
cleanup_ipv6_mibs();
out_unregister_sock:
Index: net-2.6.25/net/ipv6/sysctl_net_ipv6.c
===================================================================
--- net-2.6.25.orig/net/ipv6/sysctl_net_ipv6.c
+++ net-2.6.25/net/ipv6/sysctl_net_ipv6.c
@@ -90,9 +90,13 @@ static struct ctl_path ipv6_ctl_path[] =
static struct ctl_table_header *ipv6_sysctl_header;
-void ipv6_sysctl_register(void)
+int ipv6_sysctl_register(void)
{
ipv6_sysctl_header = register_sysctl_paths(ipv6_ctl_path, ipv6_table);
+ if (!ipv6_sysctl_header)
+ return -ENOMEM;
+
+ return 0;
}
void ipv6_sysctl_unregister(void)
--
^ permalink raw reply
* [patch 6/9][NETNS][IPV6] make ip6_frags per namespace
From: Daniel Lezcano @ 2008-01-02 12:25 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <20080102122548.629622062@localhost.localdomain>
[-- Attachment #1: move-ip6-frags-to-netns.patch --]
[-- Type: text/plain, Size: 5417 bytes --]
The ip6_frags is moved to the network namespace structure.
Because there can be multiple instances of the network namespaces,
and the ip6_frags is no longer a global static variable, a helper
function has been added to facilitate the initialization of the
variables.
Until the ipv6 protocol is not per namespace, the variables are
accessed relatively from the initial network namespace.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
---
include/net/ipv6.h | 3 ---
include/net/netns/ipv6.h | 3 +++
net/ipv6/reassembly.c | 21 ++++++++++++---------
net/ipv6/sysctl_net_ipv6.c | 15 +++++++++++----
4 files changed, 26 insertions(+), 16 deletions(-)
Index: net-2.6.25/include/net/ipv6.h
===================================================================
--- net-2.6.25.orig/include/net/ipv6.h
+++ net-2.6.25/include/net/ipv6.h
@@ -570,9 +570,6 @@ extern int inet6_hash_connect(struct ine
/*
* reassembly.c
*/
-struct inet_frags_ctl;
-extern struct inet_frags_ctl ip6_frags_ctl;
-
extern const struct proto_ops inet6_stream_ops;
extern const struct proto_ops inet6_dgram_ops;
Index: net-2.6.25/include/net/netns/ipv6.h
===================================================================
--- net-2.6.25.orig/include/net/netns/ipv6.h
+++ net-2.6.25/include/net/netns/ipv6.h
@@ -2,6 +2,8 @@
* ipv6 in net namespaces
*/
+#include <net/inet_frag.h>
+
#ifndef __NETNS_IPV6_H__
#define __NETNS_IPV6_H__
@@ -9,6 +11,7 @@ struct ctl_table_header;
struct netns_sysctl_ipv6 {
struct ctl_table_header *table;
+ struct inet_frags_ctl frags;
int bindv6only;
};
Index: net-2.6.25/net/ipv6/reassembly.c
===================================================================
--- net-2.6.25.orig/net/ipv6/reassembly.c
+++ net-2.6.25/net/ipv6/reassembly.c
@@ -82,13 +82,6 @@ struct frag_queue
__u16 nhoffset;
};
-struct inet_frags_ctl ip6_frags_ctl __read_mostly = {
- .high_thresh = 256 * 1024,
- .low_thresh = 192 * 1024,
- .timeout = IPV6_FRAG_TIMEOUT,
- .secret_interval = 10 * 60 * HZ,
-};
-
static struct inet_frags ip6_frags;
int ip6_frag_nqueues(void)
@@ -605,7 +598,7 @@ static int ipv6_frag_rcv(struct sk_buff
return 1;
}
- if (atomic_read(&ip6_frags.mem) > ip6_frags_ctl.high_thresh)
+ if (atomic_read(&ip6_frags.mem) > init_net.ipv6.sysctl.frags.high_thresh)
ip6_evictor(ip6_dst_idev(skb->dst));
if ((fq = fq_find(fhdr->identification, &hdr->saddr, &hdr->daddr,
@@ -632,6 +625,16 @@ static struct inet6_protocol frag_protoc
.flags = INET6_PROTO_NOPOLICY,
};
+void ipv6_frag_sysctl_init(struct net *net)
+{
+ net->ipv6.sysctl.frags.high_thresh = 256 * 1024,
+ net->ipv6.sysctl.frags.low_thresh = 192 * 1024,
+ net->ipv6.sysctl.frags.timeout = IPV6_FRAG_TIMEOUT,
+ net->ipv6.sysctl.frags.secret_interval = 10 * 60 * HZ,
+
+ ip6_frags.ctl = &net->ipv6.sysctl.frags;
+}
+
int __init ipv6_frag_init(void)
{
int ret;
@@ -639,7 +642,7 @@ int __init ipv6_frag_init(void)
ret = inet6_add_protocol(&frag_protocol, IPPROTO_FRAGMENT);
if (ret)
goto out;
- ip6_frags.ctl = &ip6_frags_ctl;
+
ip6_frags.hashfn = ip6_hashfn;
ip6_frags.constructor = ip6_frag_init;
ip6_frags.destructor = NULL;
Index: net-2.6.25/net/ipv6/sysctl_net_ipv6.c
===================================================================
--- net-2.6.25.orig/net/ipv6/sysctl_net_ipv6.c
+++ net-2.6.25/net/ipv6/sysctl_net_ipv6.c
@@ -16,6 +16,7 @@
extern struct ctl_table *ipv6_route_sysctl_init(struct net *net);
extern struct ctl_table *ipv6_icmp_sysctl_init(struct net *net);
+extern void ipv6_frag_sysctl_init(struct net *net);
static ctl_table ipv6_table_template[] = {
{
@@ -43,7 +44,7 @@ static ctl_table ipv6_table_template[] =
{
.ctl_name = NET_IPV6_IP6FRAG_HIGH_THRESH,
.procname = "ip6frag_high_thresh",
- .data = &ip6_frags_ctl.high_thresh,
+ .data = &init_net.ipv6.sysctl.frags.high_thresh,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec
@@ -51,7 +52,7 @@ static ctl_table ipv6_table_template[] =
{
.ctl_name = NET_IPV6_IP6FRAG_LOW_THRESH,
.procname = "ip6frag_low_thresh",
- .data = &ip6_frags_ctl.low_thresh,
+ .data = &init_net.ipv6.sysctl.frags.low_thresh,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec
@@ -59,7 +60,7 @@ static ctl_table ipv6_table_template[] =
{
.ctl_name = NET_IPV6_IP6FRAG_TIME,
.procname = "ip6frag_time",
- .data = &ip6_frags_ctl.timeout,
+ .data = &init_net.ipv6.sysctl.frags.timeout,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_jiffies,
@@ -68,7 +69,7 @@ static ctl_table ipv6_table_template[] =
{
.ctl_name = NET_IPV6_IP6FRAG_SECRET_INTERVAL,
.procname = "ip6frag_secret_interval",
- .data = &ip6_frags_ctl.secret_interval,
+ .data = &init_net.ipv6.sysctl.frags.secret_interval,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_jiffies,
@@ -116,6 +117,12 @@ static int ipv6_sysctl_net_init(struct n
ipv6_table[1].child = ipv6_icmp_table;
ipv6_table[2].data = &net->ipv6.sysctl.bindv6only;
+ ipv6_table[3].data = &net->ipv6.sysctl.frags.high_thresh;
+ ipv6_table[4].data = &net->ipv6.sysctl.frags.low_thresh;
+ ipv6_table[5].data = &net->ipv6.sysctl.frags.timeout;
+ ipv6_table[6].data = &net->ipv6.sysctl.frags.secret_interval;
+
+ ipv6_frag_sysctl_init(net);
net->ipv6.sysctl.bindv6only = 0;
--
^ permalink raw reply
* [patch 4/9][NETNS][IPV6] make multiple instance of sysctl tables
From: Daniel Lezcano @ 2008-01-02 12:25 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <20080102122548.629622062@localhost.localdomain>
[-- Attachment #1: make-ipv6-sysctl-per-namespace.patch --]
[-- Type: text/plain, Size: 5934 bytes --]
Each network namespace wants its own set of sysctl value, eg. we should
not be able from a namespace to set a sysctl value for another namespace
, especially for the initial network namespace.
This patch duplicates the sysctl table when we register a new network
namespace for ipv6. The duplicated table are postfixed with the "template"
word to notify the developper the table is cloned.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
---
include/net/ipv6.h | 4 +-
include/net/netns/ipv6.h | 9 ++++++
net/ipv6/icmp.c | 12 +++++++-
net/ipv6/route.c | 11 ++++++-
net/ipv6/sysctl_net_ipv6.c | 67 +++++++++++++++++++++++++++++++++++++--------
5 files changed, 88 insertions(+), 15 deletions(-)
Index: net-2.6.25/net/ipv6/sysctl_net_ipv6.c
===================================================================
--- net-2.6.25.orig/net/ipv6/sysctl_net_ipv6.c
+++ net-2.6.25/net/ipv6/sysctl_net_ipv6.c
@@ -14,20 +14,23 @@
#include <net/addrconf.h>
#include <net/inet_frag.h>
-static ctl_table ipv6_table[] = {
+extern struct ctl_table *ipv6_route_sysctl_init(struct net *net);
+extern struct ctl_table *ipv6_icmp_sysctl_init(struct net *net);
+
+static ctl_table ipv6_table_template[] = {
{
.ctl_name = NET_IPV6_ROUTE,
.procname = "route",
.maxlen = 0,
.mode = 0555,
- .child = ipv6_route_table
+ .child = ipv6_route_table_template
},
{
.ctl_name = NET_IPV6_ICMP,
.procname = "icmp",
.maxlen = 0,
.mode = 0555,
- .child = ipv6_icmp_table
+ .child = ipv6_icmp_table_template
},
{
.ctl_name = NET_IPV6_BINDV6ONLY,
@@ -88,20 +91,62 @@ static struct ctl_path ipv6_ctl_path[] =
{ },
};
-static struct ctl_table_header *ipv6_sysctl_header;
-
static int ipv6_sysctl_net_init(struct net *net)
{
- ipv6_sysctl_header = register_net_sysctl_table(net, ipv6_ctl_path, ipv6_table);
- if (!ipv6_sysctl_header)
- return -ENOMEM;
-
- return 0;
+ struct ctl_table *ipv6_table;
+ struct ctl_table *ipv6_route_table;
+ struct ctl_table *ipv6_icmp_table;
+ int err;
+
+ err = -ENOMEM;
+ ipv6_table = kmemdup(ipv6_table_template, sizeof(ipv6_table_template),
+ GFP_KERNEL);
+ if (!ipv6_table)
+ goto out;
+
+ ipv6_route_table = ipv6_route_sysctl_init(net);
+ if (!ipv6_route_table)
+ goto out_ipv6_table;
+
+ ipv6_icmp_table = ipv6_icmp_sysctl_init(net);
+ if (!ipv6_icmp_table)
+ goto out_ipv6_route_table;
+
+ ipv6_table[0].child = ipv6_route_table;
+ ipv6_table[1].child = ipv6_icmp_table;
+
+ net->ipv6.sysctl.table = register_net_sysctl_table(net, ipv6_ctl_path, ipv6_table);
+ if (!net->ipv6.sysctl.table)
+ goto out_ipv6_icmp_table;
+
+ err = 0;
+out:
+ return err;
+
+out_ipv6_icmp_table:
+ kfree(ipv6_icmp_table);
+out_ipv6_route_table:
+ kfree(ipv6_route_table);
+out_ipv6_table:
+ kfree(ipv6_table);
+ goto out;
}
static void ipv6_sysctl_net_exit(struct net *net)
{
- unregister_net_sysctl_table(ipv6_sysctl_header);
+ struct ctl_table *ipv6_table;
+ struct ctl_table *ipv6_route_table;
+ struct ctl_table *ipv6_icmp_table;
+
+ ipv6_table = net->ipv6.sysctl.table->ctl_table_arg;
+ ipv6_route_table = ipv6_table[0].child;
+ ipv6_icmp_table = ipv6_table[1].child;
+
+ unregister_net_sysctl_table(net->ipv6.sysctl.table);
+
+ kfree(ipv6_table);
+ kfree(ipv6_route_table);
+ kfree(ipv6_icmp_table);
}
static struct pernet_operations ipv6_sysctl_net_ops = {
Index: net-2.6.25/include/net/netns/ipv6.h
===================================================================
--- net-2.6.25.orig/include/net/netns/ipv6.h
+++ net-2.6.25/include/net/netns/ipv6.h
@@ -5,6 +5,15 @@
#ifndef __NETNS_IPV6_H__
#define __NETNS_IPV6_H__
+struct ctl_table_header;
+
+struct netns_sysctl_ipv6 {
+ struct ctl_table_header *table;
+};
+
struct netns_ipv6 {
+#ifdef CONFIG_SYSCTL
+ struct netns_sysctl_ipv6 sysctl;
+#endif
};
#endif
Index: net-2.6.25/include/net/ipv6.h
===================================================================
--- net-2.6.25.orig/include/net/ipv6.h
+++ net-2.6.25/include/net/ipv6.h
@@ -617,8 +617,8 @@ static inline int snmp6_unregister_dev(s
#endif
#ifdef CONFIG_SYSCTL
-extern ctl_table ipv6_route_table[];
-extern ctl_table ipv6_icmp_table[];
+extern ctl_table ipv6_route_table_template[];
+extern ctl_table ipv6_icmp_table_template[];
extern int ipv6_sysctl_register(void);
extern void ipv6_sysctl_unregister(void);
Index: net-2.6.25/net/ipv6/icmp.c
===================================================================
--- net-2.6.25.orig/net/ipv6/icmp.c
+++ net-2.6.25/net/ipv6/icmp.c
@@ -909,7 +909,7 @@ int icmpv6_err_convert(int type, int cod
EXPORT_SYMBOL(icmpv6_err_convert);
#ifdef CONFIG_SYSCTL
-ctl_table ipv6_icmp_table[] = {
+ctl_table ipv6_icmp_table_template[] = {
{
.ctl_name = NET_IPV6_ICMP_RATELIMIT,
.procname = "ratelimit",
@@ -920,5 +920,15 @@ ctl_table ipv6_icmp_table[] = {
},
{ .ctl_name = 0 },
};
+
+struct ctl_table *ipv6_icmp_sysctl_init(struct net *net)
+{
+ struct ctl_table *table;
+
+ table = kmemdup(ipv6_icmp_table_template,
+ sizeof(ipv6_icmp_table_template),
+ GFP_KERNEL);
+ return table;
+}
#endif
Index: net-2.6.25/net/ipv6/route.c
===================================================================
--- net-2.6.25.orig/net/ipv6/route.c
+++ net-2.6.25/net/ipv6/route.c
@@ -2404,7 +2404,7 @@ int ipv6_sysctl_rtcache_flush(ctl_table
return -EINVAL;
}
-ctl_table ipv6_route_table[] = {
+ctl_table ipv6_route_table_template[] = {
{
.procname = "flush",
.data = &flush_delay,
@@ -2494,6 +2494,15 @@ ctl_table ipv6_route_table[] = {
{ .ctl_name = 0 }
};
+struct ctl_table *ipv6_route_sysctl_init(struct net *net)
+{
+ struct ctl_table *table;
+
+ table = kmemdup(ipv6_route_table_template,
+ sizeof(ipv6_route_table_template),
+ GFP_KERNEL);
+ return table;
+}
#endif
int __init ip6_route_init(void)
--
^ permalink raw reply
* [patch 2/9][NETNS][IPV6] make the ipv6 sysctl to be a netns subsystem
From: Daniel Lezcano @ 2008-01-02 12:25 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <20080102122548.629622062@localhost.localdomain>
[-- Attachment #1: make-ipv6-sysctl-to-be-a-subsystem.patch --]
[-- Type: text/plain, Size: 1581 bytes --]
The initialization of the sysctl for the ipv6 protocol is changed to
a network namespace subsystem. That means when a new network namespace
is created the initialization function for the sysctl will be called.
That do not change the behavior of the sysctl in case of the kernel
with the network namespace disabled.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
---
net/ipv6/sysctl_net_ipv6.c | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
Index: net-2.6.25/net/ipv6/sysctl_net_ipv6.c
===================================================================
--- net-2.6.25.orig/net/ipv6/sysctl_net_ipv6.c
+++ net-2.6.25/net/ipv6/sysctl_net_ipv6.c
@@ -90,16 +90,31 @@ static struct ctl_path ipv6_ctl_path[] =
static struct ctl_table_header *ipv6_sysctl_header;
-int ipv6_sysctl_register(void)
+static int ipv6_sysctl_net_init(struct net *net)
{
- ipv6_sysctl_header = register_sysctl_paths(ipv6_ctl_path, ipv6_table);
+ ipv6_sysctl_header = register_net_sysctl_table(net, ipv6_ctl_path, ipv6_table);
if (!ipv6_sysctl_header)
return -ENOMEM;
return 0;
}
+static void ipv6_sysctl_net_exit(struct net *net)
+{
+ unregister_net_sysctl_table(ipv6_sysctl_header);
+}
+
+static struct pernet_operations ipv6_sysctl_net_ops = {
+ .init = ipv6_sysctl_net_init,
+ .exit = ipv6_sysctl_net_exit,
+};
+
+int ipv6_sysctl_register(void)
+{
+ return register_pernet_subsys(&ipv6_sysctl_net_ops);
+}
+
void ipv6_sysctl_unregister(void)
{
- unregister_sysctl_table(ipv6_sysctl_header);
+ unregister_pernet_subsys(&ipv6_sysctl_net_ops);
}
--
^ permalink raw reply
* Re: [PATCH] Force UNIX domain sockets to be built in
From: Bodo Eggert @ 2008-01-02 12:26 UTC (permalink / raw)
To: Herbert Xu
Cc: Theodore Tso, 7eggert, viro, davem, jengelh, devzero,
linux-kernel, bunk, netdev
In-Reply-To: <E1JA0mT-0008U2-00@gondolin.me.apana.org.au>
On Wed, 2 Jan 2008, Herbert Xu wrote:
> Theodore Tso <tytso@mit.edu> wrote:
> > The question is whether the size of the Unix domain sockets support is
> > worth the complexity of yet another config option that we expose to
> > the user. For the embedded world, OK, maybe they want to save 14k of
> > non-swappable memory. But for the non-embedded world, given the 117k
> > mandatory memory usage of sysfs, or the 124k memory usage of the core
> > networking stack, never mind the 3 megabytes of memory used by objects
> > in the kernel subdirectory, it's not clear that it's worth worrying
> > over 14k of memory, especially when many Unix programs assume
> > that Unix Domain Sockets are present.
>
> That would make sense if we were proposing to get rid of the CONFIG_UNIX
> question altogether for !CONFIG_EMBEDDED.
Exactly this is what my patch does: The question is not to be displayed
unless EMBEDDED, and the default is changed to y.
> However, the proposal here is
> merely to eliminate the modular option but the CONFIG_UNIX prompt itself
> will remain even without CONFIG_EMBEDDED.
>
> This I think is quite pointless.
That's what another patch would do. I decided that s/tristate/bool/ is
something completely different from adding the default and hiding the
option, and that I'd avoid this discussion by not eliminating UNIX=m.
--
Top 100 things you don't want the sysadmin to say:
96. That's SOOOOO bizarre.
^ permalink raw reply
* Re: iproute2 syntax change in tc police?
From: Denys Fedoryshchenko @ 2008-01-02 0:43 UTC (permalink / raw)
To: Andreas Henriksson, Patrick McHardy; +Cc: netdev
In-Reply-To: <1199230752.16358.22.camel@localhost.localdomain>
Maybe something like
-tc filter add dev ppp0 parent ffff: protocol ip prio 50 u32 match ip src
0.0.0.0/0 police rate 4mbit burst 10k drop flowid :1
+tc filter add dev ppp0 parent ffff: protocol ip prio 50 u32 match ip src
0.0.0.0/0 flowid :1 police rate 4mbit burst 10k drop
I can't test it now, but in my case moving flowid BEFORE police (or somewhere
else "before", i dont remeber well) - helped.
On Wed, 02 Jan 2008 00:39:11 +0100, Andreas Henriksson wrote
> Hello Patrick McHardy!
>
> We have recently updated iproute in debian and have reports about the
> new version breaking shorewall generated scripts.
>
> The original bug-report can be found at:
> http://bugs.debian.org/458539
>
> Commands like "tc filter add dev ppp0 parent ffff: protocol ip prio
> 50 u32 match ip src 0.0.0.0/0 police rate 4mbit burst 10k drop
> flowid :1" apparently no longer works. The flowid is not accepted anymore.
> Reverting commit 720a2e8d99... which you authored seems to "fix" this.
>
> http://git.kernel.org/?p=linux/kernel/git/shemminger/
iproute2.git;a=commitdiff;h=720a2e8d990707749b2cafa77ab3cd2b8241ec47
>
> I guess the flowid is invalid syntax, but that it just got ignored
> instead of caught before...
> Could you please have a look and tell me what you think about this?
>
> --
> Regards,
> Andreas Henriksson
>
> --
> 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
--
Denys Fedoryshchenko
Technical Manager
Virtual ISP S.A.L.
^ permalink raw reply
* Re: TCP event tracking via netlink...
From: Ilpo Järvinen @ 2008-01-02 11:05 UTC (permalink / raw)
To: David Miller; +Cc: Stephen Hemminger, Netdev
In-Reply-To: <20080102.002227.67777942.davem@davemloft.net>
On Wed, 2 Jan 2008, David Miller wrote:
> From: Stephen Hemminger <shemminger@linux-foundation.org>
> Date: Thu, 6 Dec 2007 09:23:12 -0800
>
> > Tools and scripts for testing that generate graphs are at:
> > git://git.kernel.org/pub/scm/tcptest/tcptest
>
> Did you move it somewhere else?
>
> davem@sunset:~/src/GIT$ git clone git://git.kernel.org/pub/scm/tcptest/tcptest
> Initialized empty Git repository in /home/davem/src/GIT/tcptest/.git/
> fatal: The remote end hung up unexpectedly
> fetch-pack from 'git://git.kernel.org/pub/scm/tcptest/tcptest' failed.
.../network/ was missing from the path :-).
$ git-remote show origin
* remote origin
URL: git://git.kernel.org/pub/scm/network/tcptest/tcptest.git
Remote branch(es) merged with 'git pull' while on branch master
master
Tracked remote branches
master
--
i.
^ permalink raw reply
* Re: [PATCH] Force UNIX domain sockets to be built in
From: Herbert Xu @ 2008-01-02 10:25 UTC (permalink / raw)
To: Theodore Tso
Cc: 7eggert, viro, davem, jengelh, devzero, linux-kernel, bunk,
netdev
In-Reply-To: <20080101050154.GG11776@mit.edu>
Theodore Tso <tytso@mit.edu> wrote:
>
> The question is whether the size of the Unix domain sockets support is
> worth the complexity of yet another config option that we expose to
> the user. For the embedded world, OK, maybe they want to save 14k of
> non-swappable memory. But for the non-embedded world, given the 117k
> mandatory memory usage of sysfs, or the 124k memory usage of the core
> networking stack, never mind the 3 megabytes of memory used by objects
> in the kernel subdirectory, it's not clear that it's worth worrying
> over 14k of memory, especially when many Unix programs assume
> that Unix Domain Sockets are present.
That would make sense if we were proposing to get rid of the CONFIG_UNIX
question altogether for !CONFIG_EMBEDDED. However, the proposal here is
merely to eliminate the modular option but the CONFIG_UNIX prompt itself
will remain even without CONFIG_EMBEDDED.
This I think is quite pointless.
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
* Re: iproute2 syntax change in tc police?
From: Andreas Henriksson @ 2008-01-02 10:14 UTC (permalink / raw)
To: shemminger; +Cc: netdev, Patrick McHardy
In-Reply-To: <1199230752.16358.22.camel@localhost.localdomain>
On ons, 2008-01-02 at 00:39 +0100, Andreas Henriksson wrote:
[...]
> Commands like "tc filter add dev ppp0 parent ffff: protocol ip prio 50
> u32 match ip src 0.0.0.0/0 police rate 4mbit burst 10k drop flowid :1"
> apparently no longer works. The flowid is not accepted anymore.
> Reverting commit 720a2e8d99... which you authored seems to "fix" this.
[...]
After further investigation it seems clear to me that reverting the
commit 720a2e8d990707749b2... is the correct thing to do, since the real
fix for the problem this commit was supposed to fix was instead fixed in
commit c29391c7c68f031e246c...
Whatever you specify after a u32 police you will now get a syntax error,
and according to "tc filter add u32 help" there are several things that
you are supposed to be able to specify after a police.
So, Steven, please revert 720a2e8d990707749b2...
--
Regards,
Andreas Henriksson
^ permalink raw reply
* Re: [patch] add tcp congestion control relevant parts
From: Michael Kerrisk @ 2008-01-02 9:55 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Michael Kerrisk, netdev, linux-net, Thomas Egerer, linux-man
In-Reply-To: <20071214081540.4596bf21@deepthought>
Stephen Hemminger wrote:
> On Fri, 14 Dec 2007 09:48:32 +0100
> Michael Kerrisk <mtk.manpages@googlemail.com> wrote:
>
>> Hello Linux networking folk,
>>
>> I received the patch below for the tcp.7 man page. Would anybody here be
>> prepared to review the new material / double check the details?
>>
>> Cheers,
>>
>> Michael
>>
>> -------- Original Message --------
>> Subject: [patch] add tcp congestion control relevant parts
>> Date: Wed, 12 Dec 2007 16:40:23 +0100
>> From: Thomas Egerer <thomas.Egerer@secunet.com>
>> To: mtk.manpages@gmail.com
>> CC: linux-man@vger.kernel.org
>>
>> Hello *,
>>
>> man-pages version : 2.70 from http://www.kernel.org/pub/linux/docs/man-pages/
>> All required information were obtained by reading the kernel
>> code/documentation.
>> I'm not sure, whether it is completely bullet proof on when the sysctl
>> variables/socket option first appeared in the kernel, so you might as well
>> drop this information, but I'm pretty sure about how it works.
>> Here we go with my patch:
>>
>> diff -ru man-pages-2.70/man7/tcp.7 man-pages-2.70.new/man7/tcp.7
>> --- man-pages-2.70/man7/tcp.7 2007-11-24 14:33:34.000000000 +0100
>> +++ man-pages-2.70.new/man7/tcp.7 2007-12-12 16:34:52.000000000 +0100
>> @@ -177,8 +177,6 @@
>> .\" FIXME As at Sept 2006, kernel 2.6.18-rc5, the following are
>> .\" not yet documented (shown with default values):
>> .\"
>> -.\" /proc/sys/net/ipv4/tcp_congestion_control (since 2.6.13)
>> -.\" bic
>> .\" /proc/sys/net/ipv4/tcp_moderate_rcvbuf
>> .\" 1
>> .\" /proc/sys/net/ipv4/tcp_no_metrics_save
>> @@ -224,6 +222,20 @@
>> are reserved for the application buffer.
>> A value of 0
>> implies that no amount is reserved.
>> +.TP
>> +.BR tcp_allowed_congestion_control \
>> +" (String; default: cubic reno) (since 2.6.13) "
>> +Show/set the congestion control choices available to non-privileged
>> +processes. The list is a subset of those listed in
>> +.IR tcp_available_congestion_control "."
>> +Default is "cubic reno" and the default setting
>> +.RI ( tcp_congestion_control ).
>> +.TP
>> +.BR tcp_available_congestion_control \
>> +" (String; default: cubic reno) (since 2.6.13) "
>> +Lists the TCP congestion control algorithms available on the system. This
>> value
>> +can only be changed by loading/unloading modules responsible for congestion
>> +control.
>> .\"
>> .\" The following is from 2.6.12: Documentation/networking/ip-sysctl.txt
>> .TP
>> @@ -257,6 +269,17 @@
>> Allows two flows sharing the same connection to converge
>> more rapidly.
>> .TP
>> +.BR tcp_congestion_control " (String; default: cubic reno) (since 2.6.13) "
>> +Determines the congestion control algorithm used for newly created TCP
>> +sockets. By default Linux uses cubic with reno as fallback. If you want
>> +to have more control over the algorithm used, you must enable the symbol
>> +CONFIG_TCP_CONG_ADVANCED in your kernel config.
>
> You can choose the default congestion control as well as part of the kernel
> configuration.
Hi Stephen,
Other than this, did the doc patch look okay? (I'm not sure whether there
was an implied ACK in your message for the rest of the patch.)
Cheers,
Michael
--
Michael Kerrisk
Maintainer of the Linux man-pages project
http://www.kernel.org/doc/man-pages/
Want to report a man-pages bug? Look here:
http://www.kernel.org/doc/man-pages/reporting_bugs.html
^ permalink raw reply
* Re: [IPSEC]: Return EOVERFLOW when output sequence number overflows
From: Herbert Xu @ 2008-01-02 8:25 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20080101.235342.183794044.davem@davemloft.net>
On Tue, Jan 01, 2008 at 11:53:42PM -0800, David Miller wrote:
>
> It seems this was a regression added by Paul's patch in net-2.6.25 and
> not something that needs fixing in 2.6.24 and stable?
Yes this is brand new so we don't need it for 2.6.24.
Thanks,
--
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
* Re: TCP event tracking via netlink...
From: David Miller @ 2008-01-02 8:22 UTC (permalink / raw)
To: shemminger; +Cc: ilpo.jarvinen, netdev
In-Reply-To: <20071206092312.79a83208@freepuppy.rosehill>
From: Stephen Hemminger <shemminger@linux-foundation.org>
Date: Thu, 6 Dec 2007 09:23:12 -0800
> Tools and scripts for testing that generate graphs are at:
> git://git.kernel.org/pub/scm/tcptest/tcptest
Did you move it somewhere else?
davem@sunset:~/src/GIT$ git clone git://git.kernel.org/pub/scm/tcptest/tcptest
Initialized empty Git repository in /home/davem/src/GIT/tcptest/.git/
fatal: The remote end hung up unexpectedly
fetch-pack from 'git://git.kernel.org/pub/scm/tcptest/tcptest' failed.
^ permalink raw reply
* Re: [IPSEC]: Return EOVERFLOW when output sequence number overflows
From: David Miller @ 2008-01-02 7:53 UTC (permalink / raw)
To: herbert; +Cc: netdev
In-Reply-To: <20080102071619.GA23687@gondor.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Wed, 2 Jan 2008 18:16:20 +1100
> [IPSEC]: Return EOVERFLOW when output sequence number overflows
>
> Previously we made it an error on the output path if the sequence number
> overflowed. However we did not set the err variable accordingly. This
> patch sets err to -EOVERFLOW in that case.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Applied.
It seems this was a regression added by Paul's patch in net-2.6.25 and
not something that needs fixing in 2.6.24 and stable?
^ permalink raw reply
* [IPSEC]: Return EOVERFLOW when output sequence number overflows
From: Herbert Xu @ 2008-01-02 7:16 UTC (permalink / raw)
To: David S. Miller, netdev
Hi Dave:
[IPSEC]: Return EOVERFLOW when output sequence number overflows
Previously we made it an error on the output path if the sequence number
overflowed. However we did not set the err variable accordingly. This
patch sets err to -EOVERFLOW in that case.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
index 81ad8eb..f4a1047 100644
--- a/net/xfrm/xfrm_output.c
+++ b/net/xfrm/xfrm_output.c
@@ -66,6 +66,7 @@ static int xfrm_output_one(struct sk_buff *skb, int err)
if (unlikely(x->replay.oseq == 0)) {
x->replay.oseq--;
xfrm_audit_state_replay_overflow(x, skb);
+ err = -EOVERFLOW;
goto error;
}
if (xfrm_aevent_is_on())
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: [usb regression] Re: [PATCH 2.6.24-rc3] Fix /proc/net breakage
From: Greg KH @ 2008-01-02 7:14 UTC (permalink / raw)
To: Andreas Mohr
Cc: Alan Stern, Ingo Molnar, Alexey Dobriyan, Andrew Morton,
David Woodhouse, Eric W. Biederman, Linus Torvalds,
Rafael J. Wysocki, Pavel Machek, kernel list, netdev,
Pavel Emelyanov, Denis V. Lunev, USB list
In-Reply-To: <20080102061308.GB30929-p/qQFhXj4MHA4IYVXhSI5GHfThorsUsI@public.gmane.org>
On Wed, Jan 02, 2008 at 07:13:08AM +0100, Andreas Mohr wrote:
> Hi,
>
> On Tue, Jan 01, 2008 at 10:00:06PM -0800, Greg KH wrote:
> > Ok, no, I didn't write that patch, I'm getting very confused here.
> >
> > In 2.6.24-rc6 there is no usage of debugfs in the ohci driver.
> >
> > In the -mm tree there is a patch, from Tony Jones, that moves some debug
> > code out of sysfs and into debugfs where it belongs. It does it for
> > both the ehci and ohci USB host controller drivers, and this is the code
> > that is incorrect if CONFIG_DEBUGFS is not enabled.
> >
> > So, for the 2.6.24 release, nothing needs to be changed, all is good,
> > and there is no regression.
> >
> > Right? Or am I still confused about this whole thing?
>
> Probably, since I also wasn't sure about this getting added to the
> post-2.6.23 regressions. I'd expect this problem to be -mm only myself,
> but then I didn't actively verify it in code (and I haven't tried -rc6
> proper on that machine yet either, build takes ages ;).
> OK, since I cannot really offer anything other than positive feelings about
> this being non-rc6 breakage, should I try -rc6 proper, too?
Please do, that would be very helpful.
As the code being discussed isn't even in Linus's tree, it's hard to see
how this could be a proposed fix for the regression :)
thanks,
greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH net-2.6.25] [BRIDGE] Remove useless code in net/bridge/br_netfilter.c
From: Rami Rosen @ 2008-01-02 6:16 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20080101.212026.187527188.davem@davemloft.net>
Hi,
> It's a pointer dereference assignment,
Sorry, I was wrong here !
> What automated tool showed this as useless to you?
> Please correct it's logic so it doesn't mark real side effects like
> this as superfluous.
I am not using any automated tool, only my eyes. And I
missed the intention here. It could be implemnted differently
but since it not marked as superfluous anywhere I suggest
to leave it as it is.
Sorry,
Regards,
Rami Rosen
On Jan 2, 2008 7:20 AM, David Miller <davem@davemloft.net> wrote:
> From: "Rami Rosen" <ramirose@gmail.com>
> Date: Tue, 1 Jan 2008 12:48:14 +0200
>
> > These following two commands in br_nf_forward_arp() achieve nothing and
> > should be removed; the d variable is not used later in this method:
> >
> > ...
> > struct net_device **d = (struct net_device **)(skb->cb);
> > ...
> > *d = (struct net_device *)in;
> > ...
> >
> > Signed-off-by: Rami Rosen <ramirose@gmail.com>
>
> It's a pointer dereference assignment, this last line has a
> side effect, therefore you can't remove it.
>
> The code is equivalent to:
>
> struct skb_bridge_info {
> struct net_device *dev;
> };
>
> struct skb_bridge_info *d;
>
> d = (struct skb_bridge_info *) skb->cb;
>
> d->dev = in;
>
> What automated tool showed this as useless to you?
>
> Please correct it's logic so it doesn't mark real side effects like
> this as superfluous.
>
> Thanks.
>
^ permalink raw reply
* Re: [usb regression] Re: [PATCH 2.6.24-rc3] Fix /proc/net breakage
From: Andreas Mohr @ 2008-01-02 6:13 UTC (permalink / raw)
To: Greg KH
Cc: Alan Stern, Andreas Mohr, Ingo Molnar, Alexey Dobriyan,
Andrew Morton, David Woodhouse, Eric W. Biederman, Linus Torvalds,
Rafael J. Wysocki, Pavel Machek, kernel list, netdev,
Pavel Emelyanov, Denis V. Lunev, USB list
In-Reply-To: <20080102060006.GA27693@kroah.com>
Hi,
On Tue, Jan 01, 2008 at 10:00:06PM -0800, Greg KH wrote:
> Ok, no, I didn't write that patch, I'm getting very confused here.
>
> In 2.6.24-rc6 there is no usage of debugfs in the ohci driver.
>
> In the -mm tree there is a patch, from Tony Jones, that moves some debug
> code out of sysfs and into debugfs where it belongs. It does it for
> both the ehci and ohci USB host controller drivers, and this is the code
> that is incorrect if CONFIG_DEBUGFS is not enabled.
>
> So, for the 2.6.24 release, nothing needs to be changed, all is good,
> and there is no regression.
>
> Right? Or am I still confused about this whole thing?
Probably, since I also wasn't sure about this getting added to the
post-2.6.23 regressions. I'd expect this problem to be -mm only myself,
but then I didn't actively verify it in code (and I haven't tried -rc6
proper on that machine yet either, build takes ages ;).
OK, since I cannot really offer anything other than positive feelings about
this being non-rc6 breakage, should I try -rc6 proper, too?
> Hm, I wonder if this means I can go back to drinking more holiday
> wine... :)
.....even more confusion? :)
Thanks for your help,
Andreas Mohr
^ permalink raw reply
* Re: [usb regression] Re: [PATCH 2.6.24-rc3] Fix /proc/net breakage
From: Andreas Mohr @ 2008-01-02 6:04 UTC (permalink / raw)
To: Alan Stern
Cc: Andreas Mohr, Ingo Molnar, Alexey Dobriyan, Andrew Morton,
David Woodhouse, Eric W. Biederman, Linus Torvalds,
Rafael J. Wysocki, Pavel Machek, kernel list, netdev,
Pavel Emelyanov, Denis V. Lunev, Greg KH
In-Reply-To: <Pine.LNX.4.44L0.0712301526090.1963-100000@netrider.rowland.org>
Hi,
On Sun, Dec 30, 2007 at 03:34:45PM -0500, Alan Stern wrote:
> It looks like Greg misused the debugfs API -- which is ironic, because
> he wrote debugfs in the first place! :-)
>
> Let me know if this patch fixes the problem. If it does, I'll submit
> it to Greg with all the proper accoutrements.
Finally a 2.6.24-rc6-mm1 with working USB WLAN. :)
IOW I can confirm that this was the cause of the USB problem I was having.
Thanks!
Andreas Mohr
^ permalink raw reply
* Re: [usb regression] Re: [PATCH 2.6.24-rc3] Fix /proc/net breakage
From: Greg KH @ 2008-01-02 6:00 UTC (permalink / raw)
To: Alan Stern
Cc: Andreas Mohr, Ingo Molnar, Alexey Dobriyan, Andrew Morton,
David Woodhouse, Eric W. Biederman, Linus Torvalds,
Rafael J. Wysocki, Pavel Machek, kernel list, netdev,
Pavel Emelyanov, Denis V. Lunev, USB list
In-Reply-To: <20071231192643.GA25341@kroah.com>
On Mon, Dec 31, 2007 at 11:26:43AM -0800, Greg KH wrote:
> On Mon, Dec 31, 2007 at 12:49:52PM -0500, Alan Stern wrote:
> > On Sun, 30 Dec 2007, Greg KH wrote:
> >
> > > > It looks like Greg misused the debugfs API -- which is ironic, because
> > > > he wrote debugfs in the first place! :-)
> > >
> > > Oh crap, sorry, I did mess that up :(
Ok, no, I didn't write that patch, I'm getting very confused here.
In 2.6.24-rc6 there is no usage of debugfs in the ohci driver.
In the -mm tree there is a patch, from Tony Jones, that moves some debug
code out of sysfs and into debugfs where it belongs. It does it for
both the ehci and ohci USB host controller drivers, and this is the code
that is incorrect if CONFIG_DEBUGFS is not enabled.
So, for the 2.6.24 release, nothing needs to be changed, all is good,
and there is no regression.
Right? Or am I still confused about this whole thing?
I will go fix up Tony's patches in the -mm tree that do not handle the
error return values from debugfs properly, but that is not such a rush,
as Tony is on vacation for a few weeks, and those patches are going to
be going in only after 2.6.24 is out.
Hm, I wonder if this means I can go back to drinking more holiday
wine... :)
thanks,
greg k-h
^ permalink raw reply
* Re: [NET] Sparse annotations
From: David Miller @ 2008-01-02 5:58 UTC (permalink / raw)
To: dada1; +Cc: netdev
In-Reply-To: <477B2616.4090409@cosmosbay.com>
From: Eric Dumazet <dada1@cosmosbay.com>
Date: Wed, 02 Jan 2008 06:50:14 +0100
> Add __acquires() and __releases() annotations to suppress some sparse warnings.
>
> example of warnings :
>
> net/ipv4/udp.c:1555:14: warning: context imbalance in 'udp_seq_start' - wrong
> count at exit
> net/ipv4/udp.c:1571:13: warning: context imbalance in 'udp_seq_stop' -
> unexpected unlock
>
>
> Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Applied, thanks Eric.
^ permalink raw reply
* [NET] Sparse annotations
From: Eric Dumazet @ 2008-01-02 5:50 UTC (permalink / raw)
To: David S. Miller; +Cc: Linux Netdev List
[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]
Add __acquires() and __releases() annotations to suppress some sparse warnings.
example of warnings :
net/ipv4/udp.c:1555:14: warning: context imbalance in 'udp_seq_start' - wrong
count at exit
net/ipv4/udp.c:1571:13: warning: context imbalance in 'udp_seq_stop' -
unexpected unlock
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
net/core/dev.c | 2 ++
net/core/dev_mcast.c | 2 ++
net/core/gen_stats.c | 1 +
net/core/neighbour.c | 2 ++
net/core/sock.c | 2 ++
net/ipv4/fib_hash.c | 2 ++
net/ipv4/inet_hashtables.c | 1 +
net/ipv4/udp.c | 2 ++
net/ipv6/anycast.c | 2 ++
net/ipv6/ip6_flowlabel.c | 2 ++
net/ipv6/mcast.c | 4 ++++
net/netlink/af_netlink.c | 4 ++++
net/sched/sch_generic.c | 4 ++++
net/sunrpc/cache.c | 2 ++
net/unix/af_unix.c | 2 ++
net/xfrm/xfrm_state.c | 2 ++
16 files changed, 36 insertions(+)
[-- Attachment #2: net_sparse.patch --]
[-- Type: text/plain, Size: 10495 bytes --]
diff --git a/net/core/dev.c b/net/core/dev.c
index aca6dad..ea43c02 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2364,6 +2364,7 @@ static int dev_ifconf(struct net *net, char __user *arg)
* in detail.
*/
void *dev_seq_start(struct seq_file *seq, loff_t *pos)
+ __acquires(dev_base_lock)
{
struct net *net = seq_file_net(seq);
loff_t off;
@@ -2390,6 +2391,7 @@ void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos)
}
void dev_seq_stop(struct seq_file *seq, void *v)
+ __releases(dev_base_lock)
{
read_unlock(&dev_base_lock);
}
diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c
index 63f0b33..cadbfbf 100644
--- a/net/core/dev_mcast.c
+++ b/net/core/dev_mcast.c
@@ -186,6 +186,7 @@ EXPORT_SYMBOL(dev_mc_unsync);
#ifdef CONFIG_PROC_FS
static void *dev_mc_seq_start(struct seq_file *seq, loff_t *pos)
+ __acquires(dev_base_lock)
{
struct net *net = seq_file_net(seq);
struct net_device *dev;
@@ -206,6 +207,7 @@ static void *dev_mc_seq_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void dev_mc_seq_stop(struct seq_file *seq, void *v)
+ __releases(dev_base_lock)
{
read_unlock(&dev_base_lock);
}
diff --git a/net/core/gen_stats.c b/net/core/gen_stats.c
index bcc2559..8073561 100644
--- a/net/core/gen_stats.c
+++ b/net/core/gen_stats.c
@@ -55,6 +55,7 @@ rtattr_failure:
int
gnet_stats_start_copy_compat(struct sk_buff *skb, int type, int tc_stats_type,
int xstats_type, spinlock_t *lock, struct gnet_dump *d)
+ __acquires(lock)
{
memset(d, 0, sizeof(*d));
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index bd899d5..8024933 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2313,6 +2313,7 @@ static void *neigh_get_idx_any(struct seq_file *seq, loff_t *pos)
}
void *neigh_seq_start(struct seq_file *seq, loff_t *pos, struct neigh_table *tbl, unsigned int neigh_seq_flags)
+ __acquires(tbl->lock)
{
struct neigh_seq_state *state = seq->private;
loff_t pos_minus_one;
@@ -2356,6 +2357,7 @@ out:
EXPORT_SYMBOL(neigh_seq_next);
void neigh_seq_stop(struct seq_file *seq, void *v)
+ __releases(tbl->lock)
{
struct neigh_seq_state *state = seq->private;
struct neigh_table *tbl = state->tbl;
diff --git a/net/core/sock.c b/net/core/sock.c
index 3804e7d..3d7757e 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2025,6 +2025,7 @@ EXPORT_SYMBOL(proto_unregister);
#ifdef CONFIG_PROC_FS
static void *proto_seq_start(struct seq_file *seq, loff_t *pos)
+ __acquires(proto_list_lock)
{
read_lock(&proto_list_lock);
return seq_list_start_head(&proto_list, *pos);
@@ -2036,6 +2037,7 @@ static void *proto_seq_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void proto_seq_stop(struct seq_file *seq, void *v)
+ __releases(proto_list_lock)
{
read_unlock(&proto_list_lock);
}
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
index 481de47..d32385c 100644
--- a/net/ipv4/fib_hash.c
+++ b/net/ipv4/fib_hash.c
@@ -935,6 +935,7 @@ static struct fib_alias *fib_get_idx(struct seq_file *seq, loff_t pos)
}
static void *fib_seq_start(struct seq_file *seq, loff_t *pos)
+ __acquires(fib_hash_lock)
{
void *v = NULL;
@@ -951,6 +952,7 @@ static void *fib_seq_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void fib_seq_stop(struct seq_file *seq, void *v)
+ __releases(fib_hash_lock)
{
read_unlock(&fib_hash_lock);
}
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
index 2e5814a..88a059e 100644
--- a/net/ipv4/inet_hashtables.c
+++ b/net/ipv4/inet_hashtables.c
@@ -96,6 +96,7 @@ EXPORT_SYMBOL(inet_put_port);
* exclusive lock release). It should be ifdefed really.
*/
void inet_listen_wlock(struct inet_hashinfo *hashinfo)
+ __acquires(hashinfo->lhash_lock)
{
write_lock(&hashinfo->lhash_lock);
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 3532843..02fcccd 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1550,6 +1550,7 @@ static struct sock *udp_get_idx(struct seq_file *seq, loff_t pos)
}
static void *udp_seq_start(struct seq_file *seq, loff_t *pos)
+ __acquires(udp_hash_lock)
{
read_lock(&udp_hash_lock);
return *pos ? udp_get_idx(seq, *pos-1) : (void *)1;
@@ -1569,6 +1570,7 @@ static void *udp_seq_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void udp_seq_stop(struct seq_file *seq, void *v)
+ __releases(udp_hash_lock)
{
read_unlock(&udp_hash_lock);
}
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
index f915c4d..5c41900 100644
--- a/net/ipv6/anycast.c
+++ b/net/ipv6/anycast.c
@@ -504,6 +504,7 @@ static struct ifacaddr6 *ac6_get_idx(struct seq_file *seq, loff_t pos)
}
static void *ac6_seq_start(struct seq_file *seq, loff_t *pos)
+ __acquires(dev_base_lock)
{
read_lock(&dev_base_lock);
return ac6_get_idx(seq, *pos);
@@ -518,6 +519,7 @@ static void *ac6_seq_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void ac6_seq_stop(struct seq_file *seq, void *v)
+ __releases(dev_base_lock)
{
struct ac6_iter_state *state = ac6_seq_private(seq);
if (likely(state->idev != NULL)) {
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c
index d0babea..2b7d9ee 100644
--- a/net/ipv6/ip6_flowlabel.c
+++ b/net/ipv6/ip6_flowlabel.c
@@ -629,6 +629,7 @@ static struct ip6_flowlabel *ip6fl_get_idx(struct seq_file *seq, loff_t pos)
}
static void *ip6fl_seq_start(struct seq_file *seq, loff_t *pos)
+ __acquires(ip6_fl_lock)
{
read_lock_bh(&ip6_fl_lock);
return *pos ? ip6fl_get_idx(seq, *pos - 1) : SEQ_START_TOKEN;
@@ -647,6 +648,7 @@ static void *ip6fl_seq_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void ip6fl_seq_stop(struct seq_file *seq, void *v)
+ __releases(ip6_fl_lock)
{
read_unlock_bh(&ip6_fl_lock);
}
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 82b1294..ab228d1 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -2373,6 +2373,7 @@ static struct ifmcaddr6 *igmp6_mc_get_idx(struct seq_file *seq, loff_t pos)
}
static void *igmp6_mc_seq_start(struct seq_file *seq, loff_t *pos)
+ __acquires(dev_base_lock)
{
read_lock(&dev_base_lock);
return igmp6_mc_get_idx(seq, *pos);
@@ -2387,6 +2388,7 @@ static void *igmp6_mc_seq_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void igmp6_mc_seq_stop(struct seq_file *seq, void *v)
+ __releases(dev_base_lock)
{
struct igmp6_mc_iter_state *state = igmp6_mc_seq_private(seq);
if (likely(state->idev != NULL)) {
@@ -2516,6 +2518,7 @@ static struct ip6_sf_list *igmp6_mcf_get_idx(struct seq_file *seq, loff_t pos)
}
static void *igmp6_mcf_seq_start(struct seq_file *seq, loff_t *pos)
+ __acquires(dev_base_lock)
{
read_lock(&dev_base_lock);
return *pos ? igmp6_mcf_get_idx(seq, *pos - 1) : SEQ_START_TOKEN;
@@ -2533,6 +2536,7 @@ static void *igmp6_mcf_seq_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void igmp6_mcf_seq_stop(struct seq_file *seq, void *v)
+ __releases(dev_base_lock)
{
struct igmp6_mcf_iter_state *state = igmp6_mcf_seq_private(seq);
if (likely(state->im != NULL)) {
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index dbd7cad..be07f1b 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -171,6 +171,7 @@ static void netlink_sock_destruct(struct sock *sk)
*/
static void netlink_table_grab(void)
+ __acquires(nl_table_lock)
{
write_lock_irq(&nl_table_lock);
@@ -193,6 +194,7 @@ static void netlink_table_grab(void)
}
static inline void netlink_table_ungrab(void)
+ __releases(nl_table_lock)
{
write_unlock_irq(&nl_table_lock);
wake_up(&nl_table_wait);
@@ -1728,6 +1730,7 @@ static struct sock *netlink_seq_socket_idx(struct seq_file *seq, loff_t pos)
}
static void *netlink_seq_start(struct seq_file *seq, loff_t *pos)
+ __acquires(nl_table_lock)
{
read_lock(&nl_table_lock);
return *pos ? netlink_seq_socket_idx(seq, *pos - 1) : SEQ_START_TOKEN;
@@ -1776,6 +1779,7 @@ static void *netlink_seq_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void netlink_seq_stop(struct seq_file *seq, void *v)
+ __releases(nl_table_lock)
{
read_unlock(&nl_table_lock);
}
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 9be2f15..ea5a05b 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -40,12 +40,16 @@
*/
void qdisc_lock_tree(struct net_device *dev)
+ __acquires(dev->queue_lock)
+ __acquires(dev->ingress_lock)
{
spin_lock_bh(&dev->queue_lock);
spin_lock(&dev->ingress_lock);
}
void qdisc_unlock_tree(struct net_device *dev)
+ __releases(dev->ingress_lock)
+ __releases(dev->queue_lock)
{
spin_unlock(&dev->ingress_lock);
spin_unlock_bh(&dev->queue_lock);
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index 8e05557..73f053d 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -1127,6 +1127,7 @@ struct handle {
};
static void *c_start(struct seq_file *m, loff_t *pos)
+ __acquires(cd->hash_lock)
{
loff_t n = *pos;
unsigned hash, entry;
@@ -1183,6 +1184,7 @@ static void *c_next(struct seq_file *m, void *p, loff_t *pos)
}
static void c_stop(struct seq_file *m, void *p)
+ __releases(cd->hash_lock)
{
struct cache_detail *cd = ((struct handle*)m->private)->cd;
read_unlock(&cd->hash_lock);
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 63a9239..eea7588 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -2033,6 +2033,7 @@ static struct sock *unix_seq_idx(struct unix_iter_state *iter, loff_t pos)
static void *unix_seq_start(struct seq_file *seq, loff_t *pos)
+ __acquires(unix_table_lock)
{
struct unix_iter_state *iter = seq->private;
spin_lock(&unix_table_lock);
@@ -2055,6 +2056,7 @@ static void *unix_seq_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void unix_seq_stop(struct seq_file *seq, void *v)
+ __releases(unix_table_lock)
{
spin_unlock(&unix_table_lock);
}
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 8a9166c..4dec655 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -211,6 +211,7 @@ static struct xfrm_state_afinfo *xfrm_state_lock_afinfo(unsigned int family)
}
static void xfrm_state_unlock_afinfo(struct xfrm_state_afinfo *afinfo)
+ __releases(xfrm_state_afinfo_lock)
{
write_unlock_bh(&xfrm_state_afinfo_lock);
}
@@ -1907,6 +1908,7 @@ static struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned int family)
}
static void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo)
+ __releases(xfrm_state_afinfo_lock)
{
read_unlock(&xfrm_state_afinfo_lock);
}
^ permalink raw reply related
* Re: [RFC: 2.6 patch] remove IrPORT and the old dongle drivers
From: David Miller @ 2008-01-02 5:20 UTC (permalink / raw)
To: bunk; +Cc: samuel, netdev
In-Reply-To: <20080101134851.GO2360@does.not.exist>
From: Adrian Bunk <bunk@kernel.org>
Date: Tue, 1 Jan 2008 15:48:51 +0200
> This patch removes IrPORT and the old dongle drivers (all off them
> have replacement drivers).
>
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
I'll let Sam make the call on this one.
^ permalink raw reply
* Re: [PATCH net-2.6.25] [BRIDGE] Remove useless code in net/bridge/br_netfilter.c
From: David Miller @ 2008-01-02 5:20 UTC (permalink / raw)
To: ramirose; +Cc: netdev
In-Reply-To: <eb3ff54b0801010248t65d296ccm481202d50fad7c4f@mail.gmail.com>
From: "Rami Rosen" <ramirose@gmail.com>
Date: Tue, 1 Jan 2008 12:48:14 +0200
> These following two commands in br_nf_forward_arp() achieve nothing and
> should be removed; the d variable is not used later in this method:
>
> ...
> struct net_device **d = (struct net_device **)(skb->cb);
> ...
> *d = (struct net_device *)in;
> ...
>
> Signed-off-by: Rami Rosen <ramirose@gmail.com>
It's a pointer dereference assignment, this last line has a
side effect, therefore you can't remove it.
The code is equivalent to:
struct skb_bridge_info {
struct net_device *dev;
};
struct skb_bridge_info *d;
d = (struct skb_bridge_info *) skb->cb;
d->dev = in;
What automated tool showed this as useless to you?
Please correct it's logic so it doesn't mark real side effects like
this as superfluous.
Thanks.
^ permalink raw reply
* Re: [PATCH net-2.6.25] [IPV4] Remove declaration of unimplemented method and remove unused definition from include/net/ip_vs.h
From: David Miller @ 2008-01-02 5:17 UTC (permalink / raw)
To: ramirose; +Cc: netdev
In-Reply-To: <eb3ff54b0801010119u49e2831eyfdaa001637fb8af0@mail.gmail.com>
From: "Rami Rosen" <ramirose@gmail.com>
Date: Tue, 1 Jan 2008 11:19:49 +0200
> In include/net/ip_vs.h:
> - The ip_vs_secure_tcp_set() method is not implemented anywhere.
> - IP_VS_APP_TYPE_FTP is an unused definition.
>
> Signed-off-by: Rami Rosen <ramirose@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-2.6.25] [IPV4] Remove three declarations of unimplemented methods and correct a typo in include/net/ip.h
From: David Miller @ 2008-01-02 5:13 UTC (permalink / raw)
To: ramirose; +Cc: netdev
In-Reply-To: <eb3ff54b0801010030g36bef670n6150af5b683c4345@mail.gmail.com>
From: "Rami Rosen" <ramirose@gmail.com>
Date: Tue, 1 Jan 2008 10:30:53 +0200
> These three declarations in include/net/ip.h are not implemented
> anywhere:
> ip_mc_dropsocket(), ip_mc_dropdevice() and ip_net_unreachable().
>
> Also, correct a comment to be "Functions provided by ip_fragment.c"
> (instead of by ip_fragment.o) in consistency with the other comments in this
> header.
>
> Signed-off-by: Rami Rosen <ramirose@gmail.com>
Applied, thanks.
^ 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