Stephen Hemminger | 1 May 2011 06:47
Favicon

Re: [patch net-next-2.6] net: call dev_alloc_name from register_netdevice

On Sat, 30 Apr 2011 22:57:52 +0200
Jiri Pirko <jpirko <at> redhat.com> wrote:

> Sat, Apr 30, 2011 at 07:34:44PM CEST, shemminger <at> vyatta.com wrote:
> >On Sat, 30 Apr 2011 13:21:32 +0200
> >Jiri Pirko <jpirko <at> redhat.com> wrote:
> >
> >> Force dev_alloc_name() to be called from register_netdevice() by
> >> dev_get_valid_name(). That allows to remove multiple explicit
> >> dev_alloc_name() calls.
> >> 
> >> The possibility to call dev_alloc_name in advance remains.
> >> 
> >> This also fixes veth creation regresion caused by
> >> 84c49d8c3e4abefb0a41a77b25aa37ebe8d6b743
> >> 
> >> Signed-off-by: Jiri Pirko <jpirko <at> redhat.com>
> >
> >The problem with this then you have to audit all the calls
> >to register_netdevice to make sure that user can't provide a bad
> >value which then is passed a format string. Why not just fix
> >just veth which would be safer.
> 
> Well it looks convenient to do name allocations inside
> register_netdevice generically. For special cases dev_get_valid_name()
> can be still used as before (this I think should be also prohibited in
> future).
> 
> Also I think that drivers should be responsible for what they are
> passing from user to core. Btw could you please give me an example of
(Continue reading)

Jiri Pirko | 1 May 2011 08:41
Picon
Favicon

Re: [patch net-next-2.6] net: call dev_alloc_name from register_netdevice

Sun, May 01, 2011 at 06:47:35AM CEST, shemminger <at> vyatta.com wrote:
>On Sat, 30 Apr 2011 22:57:52 +0200
>Jiri Pirko <jpirko <at> redhat.com> wrote:
>
>> Sat, Apr 30, 2011 at 07:34:44PM CEST, shemminger <at> vyatta.com wrote:
>> >On Sat, 30 Apr 2011 13:21:32 +0200
>> >Jiri Pirko <jpirko <at> redhat.com> wrote:
>> >
>> >> Force dev_alloc_name() to be called from register_netdevice() by
>> >> dev_get_valid_name(). That allows to remove multiple explicit
>> >> dev_alloc_name() calls.
>> >> 
>> >> The possibility to call dev_alloc_name in advance remains.
>> >> 
>> >> This also fixes veth creation regresion caused by
>> >> 84c49d8c3e4abefb0a41a77b25aa37ebe8d6b743
>> >> 
>> >> Signed-off-by: Jiri Pirko <jpirko <at> redhat.com>
>> >
>> >The problem with this then you have to audit all the calls
>> >to register_netdevice to make sure that user can't provide a bad
>> >value which then is passed a format string. Why not just fix
>> >just veth which would be safer.
>> 
>> Well it looks convenient to do name allocations inside
>> register_netdevice generically. For special cases dev_get_valid_name()
>> can be still used as before (this I think should be also prohibited in
>> future).
>> 
>> Also I think that drivers should be responsible for what they are
(Continue reading)

Lucian Adrian Grijincu | 1 May 2011 13:44
Picon

[PATCH] sysctl: net: call unregister_net_sysctl_table where needed

ctl_table_headers registered with register_net_sysctl_table should
have been unregistered with the equivalent unregister_net_sysctl_table

Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu <at> gmail.com>
---
 net/ipv4/devinet.c  |    2 +-
 net/ipv6/addrconf.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 5345b0b..cd9ca08 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
 <at>  <at>  -1680,7 +1680,7  <at>  <at>  static void __devinet_sysctl_unregister(struct ipv4_devconf *cnf)
 		return;

 	cnf->sysctl = NULL;
-	unregister_sysctl_table(t->sysctl_header);
+	unregister_net_sysctl_table(t->sysctl_header);
 	kfree(t->dev_name);
 	kfree(t);
 }
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 1493534..a7bda07 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
 <at>  <at>  -4537,7 +4537,7  <at>  <at>  static void __addrconf_sysctl_unregister(struct ipv6_devconf *p)

 	t = p->sysctl;
 	p->sysctl = NULL;
(Continue reading)

Lucian Adrian Grijincu | 1 May 2011 13:48
Picon

Re: [PATCH] sysctl: net: call unregister_net_sysctl_table where needed

On Sun, May 1, 2011 at 1:44 PM, Lucian Adrian Grijincu
<lucian.grijincu <at> gmail.com> wrote:
> ctl_table_headers registered with register_net_sysctl_table should
> have been unregistered with the equivalent unregister_net_sysctl_table
>
> Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu <at> gmail.com>

David: I sent you this patch a while back but it was mixed with other
unrelated patches that were mostly ignored.

Again, to clarify: it does not matter at the moment if
register_net_sysctl_table or unregister_sysctl_table is called because
both to the same thing:

void unregister_net_sysctl_table(struct ctl_table_header *header)
{
        unregister_sysctl_table(header);
}
EXPORT_SYMBOL_GPL(unregister_net_sysctl_table);

We should either get rid of unregister_net_sysctl_table or use it consistently.

--

-- 
 .
..: Lucian
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

Alexey Dobriyan | 1 May 2011 14:04
Picon

[PATCH] ipv4: don't spam dmesg with "Using LC-trie" messages

fib_trie_table() is called during netns creation and
Chromium uses clone(CLONE_NEWNET) to sandbox renderer process.

Don't print anything.

Signed-off-by: Alexey Dobriyan <adobriyan <at> gmail.com>
---

 net/ipv4/fib_trie.c |    3 ---
 1 file changed, 3 deletions(-)

--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
 <at>  <at>  -1978,9 +1978,6  <at>  <at>  struct fib_table *fib_trie_table(u32 id)
 	t = (struct trie *) tb->tb_data;
 	memset(t, 0, sizeof(*t));

-	if (id == RT_TABLE_LOCAL)
-		pr_info("IPv4 FIB: Using LC-trie version %s\n", VERSION);
-
 	return tb;
 }

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

zhou rui | 1 May 2011 16:08
Picon

ask help for analysising oprofile result (higher mwait_idle_with_hints)

hi

A network application (with its kernel network driver),
it uses 5-8% cpu(I have tested it on kernel 2.6.34, seen from 'top'),
but I got 40% cpu usage on kernel 2.6.36
so that I tried oprofile to see what happen:

opcontrol --vmlinux=/home/kho56208/linux-2.6.36.4/vmlinux
...

compared with profile result on kernel 2.6.34, the
"mwait_idle_with_hints" got a higher "CPU_CLK_UNHALTED " event sample,

what does it mean? any clue?

CPU: Intel Architectural Perfmon, speed 2666.01 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a
unit mask of 0x00 (No unit mask) count 100000
samples  %        symbol name
115595   17.5906  mwait_idle_with_hints
27098     4.1236  __alloc_skb
25992     3.9553  __slab_free
25707     3.9120  __netif_receive_skb
18784     2.8584  __kmalloc_node_track_caller
18223     2.7731  get_partial_node
17860     2.7178  add_partial
17662     2.6877  kfree
17655     2.6866  kmem_cache_alloc_node
...

(Continue reading)

@@@ | 1 May 2011 18:28
Picon

Hello My Dear, My name is Grace Adam,i read through your profile today and i became interested in you,i will also like to know you the more,and i want you to send an e-mail to my e-mail address so i can give you my picture for you to know whom i am and for the both of us to know each other very well and better in life,and we can achieve it in future because ture love and feeling means alot in future.Here is my private e-mail address you can contact me with it.(graceadam11 <at> gmail.com)I am waiting for your mail to my e-mail address above and aslo, Remember the distance or colour does not matter but love,feeling,e-motions and sympathetic love matters alot in life. Thanks,and i promise to be honest and to keep a very good relationship with you. Grace. graceadam11 <at> gmail.com


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Hans Schillstrom | 1 May 2011 18:50
Favicon

[v4 PATCH 2/6] IPVS: labels at pos 0

Put goto labels at the beginig of row
acording to coding style example.

Signed-off-by: Hans Schillstrom <hans.schillstrom <at> ericsson.com>
Signed-off-by: Hans Schillstrom <hans <at> schillstrom.com>
---
 net/netfilter/ipvs/ip_vs_core.c |   10 +++++-----
 net/netfilter/ipvs/ip_vs_ctl.c  |    8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index a0791dc..d536b51 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
 <at>  <at>  -1388,7 +1388,7  <at>  <at>  ip_vs_in_icmp(struct sk_buff *skb, int *related, unsigned int hooknum)
 		verdict = NF_DROP;
 	}

-  out:
+out:
 	__ip_vs_conn_put(cp);

 	return verdict;
 <at>  <at>  -1955,14 +1955,14  <at>  <at>  static int __init ip_vs_init(void)

 cleanup_sync:
 	ip_vs_sync_cleanup();
-  cleanup_conn:
+cleanup_conn:
 	ip_vs_conn_cleanup();
(Continue reading)

Hans Schillstrom | 1 May 2011 18:50
Favicon

[v4 PATCH 4/6] IPVS: rename of netns init and cleanup functions.

Make it more clear what the functions does,
on request by Julian.

Signed-off-by: Hans Schillstrom <hans.schillstrom <at> ericsson.com>
Signed-off-by: Hans Schillstrom <hans <at> schillstrom.com>
---
 include/net/ip_vs.h              |   26 +++++++++++++-------------
 net/netfilter/ipvs/ip_vs_app.c   |    4 ++--
 net/netfilter/ipvs/ip_vs_conn.c  |    4 ++--
 net/netfilter/ipvs/ip_vs_core.c  |   36 ++++++++++++++++++------------------
 net/netfilter/ipvs/ip_vs_ctl.c   |   20 ++++++++++----------
 net/netfilter/ipvs/ip_vs_est.c   |    4 ++--
 net/netfilter/ipvs/ip_vs_proto.c |    4 ++--
 net/netfilter/ipvs/ip_vs_sync.c  |    4 ++--
 8 files changed, 51 insertions(+), 51 deletions(-)

diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 86aefed..da2aea9 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
 <at>  <at>  -1093,19 +1093,19  <at>  <at>  ip_vs_control_add(struct ip_vs_conn *cp, struct ip_vs_conn *ctl_cp)
 /*
  * IPVS netns init & cleanup functions
  */
-extern int __ip_vs_estimator_init(struct net *net);
-extern int __ip_vs_control_init(struct net *net);
-extern int __ip_vs_protocol_init(struct net *net);
-extern int __ip_vs_app_init(struct net *net);
-extern int __ip_vs_conn_init(struct net *net);
-extern int __ip_vs_sync_init(struct net *net);
(Continue reading)

Hans Schillstrom | 1 May 2011 18:50
Favicon

[v4 PATCH 5/6] IPVS: remove unused init and cleanup functions.

After restructuring, there is some unused or empty functions
left to be removed.

Signed-off-by: Hans Schillstrom <hans.schillstrom <at> ericsson.com>
Signed-off-by: Hans Schillstrom <hans <at> schillstrom.com>
---
 include/net/ip_vs.h             |    6 ------
 net/netfilter/ipvs/ip_vs_app.c  |   10 ----------
 net/netfilter/ipvs/ip_vs_core.c |   29 ++++-------------------------
 net/netfilter/ipvs/ip_vs_est.c  |    9 ---------
 net/netfilter/ipvs/ip_vs_sync.c |    9 ---------
 5 files changed, 4 insertions(+), 59 deletions(-)

diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index da2aea9..10417ab 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
 <at>  <at>  -1123,8 +1123,6  <at>  <at>  extern void ip_vs_app_inc_put(struct ip_vs_app *inc);

 extern int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff *skb);
 extern int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff *skb);
-extern int ip_vs_app_init(void);
-extern void ip_vs_app_cleanup(void);

 void ip_vs_bind_pe(struct ip_vs_service *svc, struct ip_vs_pe *pe);
 void ip_vs_unbind_pe(struct ip_vs_service *svc);
 <at>  <at>  -1227,15 +1225,11  <at>  <at>  extern int start_sync_thread(struct net *net, int state, char *mcast_ifn,
 			     __u8 syncid);
 extern int stop_sync_thread(struct net *net, int state);
 extern void ip_vs_sync_conn(struct net *net, struct ip_vs_conn *cp);
(Continue reading)


Gmane