Netdev List
 help / color / mirror / Atom feed
* Re: How To Temporarily Suspend Network Traffic
From: Rick Jones @ 2011-02-01 17:32 UTC (permalink / raw)
  To: Volkan YAZICI; +Cc: netdev
In-Reply-To: <87d3nbakwx.fsf@alamut.ozu.edu.tr>

Volkan YAZICI wrote:
> Hi,
> 
> I want to temporarily suspend the network traffic on a particular
> interface -- if possible, in microsecond granularity. For this purpose,
> ifup/ifdown ioctl() calls doesn't work. That is, for wireless
> interfaces, connection isn't get recovered; for wired interfaces, it
> takes at least 2 seconds to recover. I tried using tc, but it doesn't
> accept "rate 0" parameter. Neither "iwconfig wlan0 rate 0" has any
> effect. (Moreover, in iwconfig manual it is told that values below 1000
> are card specific and are usually an index in the bit-rate list.) Do you
> have any suggestions? Can you recommend me to check any code piece in
> the kernel or some other tool?

Out of not quite idle curiousity, what are you trying to accomplish?

Instead of using tc to set a zero rate, you could perhaps try using tc to set a 
delay?  If it doesn't offer microseconds of delay, pehaps setting a delay and 
then eliminating it after your own pause will do what you want - depends of 
course on what it is  you really want.  Your saying you wanted microsecond 
granularity suggests you don't want to suspend traffic for very long?

rick jones

> 
> Regards.
> --
> 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


^ permalink raw reply

* Re: [PATCH 5/5] IPVS: Remove ip_vs_sync_cleanup from section  __exit
From: Patrick McHardy @ 2011-02-01 17:31 UTC (permalink / raw)
  To: Hans Schillstrom
  Cc: Simon Horman, netdev, linux-next, linux-kernel, lvs-devel,
	Randy Dunlap, Stephen Rothwell
In-Reply-To: <7j2t3lt.e4ea73185e9c52a3d68dc337ed04b422@obelix.schillstrom.com>

Am 01.02.2011 18:12, schrieb Hans Schillstrom:
>> [PATCH 5/5] IPVS: Remove ip_vs_sync_cleanup from section __exit
>> >
>> >ip_vs_sync_cleanup() may be called from ip_vs_init() on error
>> >and thus needs to be accesible from section __init
>> >
>> >Reporte-by: Randy Dunlap <randy.dunlap@oracle.com>
>> >Signed-off-by: Simon Horman <horms@verge.net.au>
> Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
> Tested-by: Hans Schillstrom <hans@schillstrom.com>
> 

Applied, thanks.

^ permalink raw reply

* Re: [PATCH 4/5] IPVS: Allow compilation with CONFIG_SYSCTL  disabled
From: Patrick McHardy @ 2011-02-01 17:30 UTC (permalink / raw)
  To: Hans Schillstrom
  Cc: Simon Horman, netdev, linux-next, linux-kernel, lvs-devel,
	Randy Dunlap, Stephen Rothwell
In-Reply-To: <7j2t3lt.112d3171f5f31f2acb18786b51a8e1ac@obelix.schillstrom.com>

Am 01.02.2011 18:11, schrieb Hans Schillstrom:
>> [PATCH 4/5] IPVS: Allow compilation with CONFIG_SYSCTL disabled
>> >
>> >This is a rather naieve approach to allowing PVS to compile with
>> >CONFIG_SYSCTL disabled.  I am working on a more comprehensive patch which
>> >will remove compilation of all sysctl-related IPVS code when CONFIG_SYSCTL
>> >is disabled.
>> >
>> >Cc: Hans Schillstrom <hans@schillstrom.com>
>> >Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
>> >Signed-off-by: Simon Horman <horms@verge.net.au>
> Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
> Tested-by: Hans Schillstrom <hans@schillstrom.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH 3/5] IPVS: Remove unused variables
From: Patrick McHardy @ 2011-02-01 17:28 UTC (permalink / raw)
  To: Hans Schillstrom
  Cc: Simon Horman, netdev, linux-next, linux-kernel, lvs-devel,
	Randy Dunlap, Stephen Rothwell
In-Reply-To: <7j2t3lt.8dc16aed303bfc25a870d65e413a99d5@obelix.schillstrom.com>

Am 01.02.2011 18:07, schrieb Hans Schillstrom:
>> [PATCH 3/5] IPVS: Remove unused variables
>> >
>> >These variables are unused as a result of the recent netns work.
>> >
>> >Cc: Hans Schillstrom <hans@schillstrom.com>
>> >Signed-off-by: Simon Horman <horms@verge.net.au>
> Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
> Tested-by: Hans Schillstrom <hans@schillstrom.com>
> 

Applied, thanks.

^ permalink raw reply

* Re: [PATCH 2/5] IPVS: remove duplicate initialisation or  rs_table
From: Patrick McHardy @ 2011-02-01 17:27 UTC (permalink / raw)
  To: Hans Schillstrom
  Cc: Simon Horman, netdev, linux-next, linux-kernel, lvs-devel,
	Randy Dunlap, Stephen Rothwell
In-Reply-To: <7j2t3lt.4903adc7917a92d71d2d5a0cc8fed87a@obelix.schillstrom.com>

Am 01.02.2011 18:06, schrieb Hans Schillstrom:
>> [PATCH 2/5] IPVS: remove duplicate initialisation or rs_table
>> >
>> >Cc: Hans Schillstrom <hans@schillstrom.com>
>> >Signed-off-by: Simon Horman <horms@verge.net.au>
> Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
> Tested-by: Hans Schillstrom <hans@schillstrom.com>
> 

Applied, thanks.

^ permalink raw reply

* Re: Network performance with small packets
From: Michael S. Tsirkin @ 2011-02-01 17:23 UTC (permalink / raw)
  To: Shirley Ma; +Cc: David Miller, steved, kvm, netdev
In-Reply-To: <1296163838.1640.53.camel@localhost.localdomain>

On Thu, Jan 27, 2011 at 01:30:38PM -0800, Shirley Ma wrote:
> On Thu, 2011-01-27 at 13:02 -0800, David Miller wrote:
> > > Interesting. Could this is be a variant of the now famuous
> > bufferbloat then?
> > 
> > Sigh, bufferbloat is the new global warming... :-/ 
> 
> Yep, some places become colder, some other places become warmer; Same as
> BW results, sometimes faster, sometimes slower. :)
> 
> Shirley

Sent a tuning patch (v2) that might help.
Could you try it and play with the module parameters please?

-- 
MST

^ permalink raw reply

* Re: [PATCH 1/5] IPVS: use z modifier for sizeof() argument
From: Patrick McHardy @ 2011-02-01 17:23 UTC (permalink / raw)
  To: Hans Schillstrom
  Cc: Simon Horman, netdev, linux-next, linux-kernel, lvs-devel,
	Randy Dunlap, Stephen Rothwell
In-Reply-To: <7j2t3lt.0bb71e5c0a810a6ca8a0973db50566ea@obelix.schillstrom.com>

Am 01.02.2011 18:06, schrieb Hans Schillstrom:
>> >[PATCH 1/5] IPVS: use z modifier for sizeof() argument
>> >
>> >Cc: Hans Schillstrom <hans@schillstrom.com>
>> >Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
>> >Signed-off-by: Simon Horman <horms@verge.net.au>
> Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
> Tested-by: Hans Schillstrom <hans@schillstrom.com>
> 

Applied, thanks everyone.

^ permalink raw reply

* Re: [GIT PULL nf-next-2.6] IPVS build fixes and clean-ups
From: Patrick McHardy @ 2011-02-01 17:19 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Simon Horman, netdev, linux-next, linux-kernel, lvs-devel,
	Stephen Rothwell, Hans Schillstrom
In-Reply-To: <4D483D6E.5070007@oracle.com>

Am 01.02.2011 18:05, schrieb Randy Dunlap:
> On 02/01/11 02:04, Simon Horman wrote:
>> On Tue, Feb 01, 2011 at 03:06:37PM +1100, Simon Horman wrote:
>>> On Mon, Jan 31, 2011 at 04:50:09PM -0800, Randy Dunlap wrote:
>>>> On Tue,  1 Feb 2011 11:14:11 +1100 Simon Horman wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> This short patch series addresses two linux-next build problems
>>>>> raised by Randy Dunlap:
>>>>>
>>>>> * net/netfilter/ipvs/ip_vs_core.c:1891: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'unsigned int'
>>>>> * ERROR: "unregister_net_sysctl_table" [net/netfilter/ipvs/ip_vs.ko]
>>>>>   ERROR: "register_net_sysctl_table" [net/netfilter/ipvs/ip_vs.ko] undefined!
>>>>>
>>>>> The remainder of the changset is cleanups that I noticed along the way.
>>>>
>>>> These 4 patches build successfully for me.
>>>> However, I do see these warnings (sorry I missed them earlier):
>>>>
>>>> WARNING: net/netfilter/ipvs/ip_vs.o(.init.text+0x161): Section mismatch in reference from the function init_module() to the function .exit.text:ip_vs_sync_cleanup()
>>>> WARNING: net/netfilter/ipvs/ip_vs.o(.init.text+0x161): Section mismatch in reference from the function init_module() to the function .exit.text:ip_vs_sync_cleanup()
>>>
>>> Thanks, I'll look into that. I will be travelling for a good portion of the
>>> next day and a bit so I apologise in advance if that delays my next patch.
>>
>> Hi,
>>
>> I the following patch seems to be the right fix for this to me.
>> I will send an amended pull request.
>>
>> IPVS: Remove ip_vs_sync_cleanup from section __exit
>>
>> ip_vs_sync_cleanup() may be called from ip_vs_init() on error
>> and thus needs to be accesible from section __init
>>
>> Reporte-by: Randy Dunlap <randy.dunlap@oracle.com>
>   Reported-by:
> 
>> Signed-off-by: Simon Horman <horms@verge.net.au>
> 
> Acked-by: Randy Dunlap <randy.dunlap@oracle.com>

Thanks, since Simon is travelling, I'll apply the patches now
with your and Hans's Acks and will push them to Dave later.

^ permalink raw reply

* Re: linux-next: Tree for February 1 (ip_vs)
From: Randy Dunlap @ 2011-02-01 17:16 UTC (permalink / raw)
  To: Stephen Rothwell, netdev; +Cc: linux-next, LKML
In-Reply-To: <20110201153403.b3a251a3.sfr@canb.auug.org.au>

On Tue, 1 Feb 2011 15:34:03 +1100 Stephen Rothwell wrote:

> Hi all,
> 
> Changes since 20110131:


When CONFIG_IP_VS_PROTO_TCP is not set:

net/netfilter/ipvs/ip_vs_proto_sctp.c:1104: error: 'struct netns_ipvs' has no member named 'tcp_app_lock'
net/netfilter/ipvs/ip_vs_proto_sctp.c:1104: error: 'struct netns_ipvs' has no member named 'tcp_app_lock'


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply

* Re: [PATCH 5/5] IPVS: Remove ip_vs_sync_cleanup from section __exit
From: Hans Schillstrom @ 2011-02-01 17:12 UTC (permalink / raw)
  To: Simon Horman
  Cc: netdev, linux-next, linux-kernel, lvs-devel, Randy Dunlap,
	Stephen Rothwell, Patrick McHardy

>---- Original Message ----
>From: Simon Horman <horms@verge.net.au>
>To: netdev@vger.kernel.org, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, lvs-devel@vger.kernel.org
>Cc: "Randy Dunlap" <randy.dunlap@oracle.com>, "Stephen Rothwell" <sfr@canb.auug.org.au>, "Hans Schillstrom" <hans@schillstrom.com>, "Patrick McHardy" <kaber@trash.net>, "Simon Horman" <horms@verge.net.au>
>Sent: Tue, Feb 1, 2011, 11:11 AM
>Subject: [PATCH 5/5] IPVS: Remove ip_vs_sync_cleanup from section __exit
>
>ip_vs_sync_cleanup() may be called from ip_vs_init() on error
>and thus needs to be accesible from section __init
>
>Reporte-by: Randy Dunlap <randy.dunlap@oracle.com>
>Signed-off-by: Simon Horman <horms@verge.net.au>

Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
Tested-by: Hans Schillstrom <hans@schillstrom.com>

>---
> net/netfilter/ipvs/ip_vs_sync.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
>index d5a6e64..2a2a836 100644
>--- a/net/netfilter/ipvs/ip_vs_sync.c
>+++ b/net/netfilter/ipvs/ip_vs_sync.c
>@@ -1686,7 +1686,7 @@ int __init ip_vs_sync_init(void)
> 	return register_pernet_subsys(&ipvs_sync_ops);
> }
> 
>-void __exit ip_vs_sync_cleanup(void)
>+void ip_vs_sync_cleanup(void)
> {
> 	unregister_pernet_subsys(&ipvs_sync_ops);
> }
>-- 
>1.7.2.3
>
>--
>To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH 4/5] IPVS: Allow compilation with CONFIG_SYSCTL disabled
From: Hans Schillstrom @ 2011-02-01 17:11 UTC (permalink / raw)
  To: Simon Horman
  Cc: netdev, linux-next, linux-kernel, lvs-devel, Randy Dunlap,
	Stephen Rothwell, Patrick McHardy

>---- Original Message ----
>From: Simon Horman <horms@verge.net.au>
>To: netdev@vger.kernel.org, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, lvs-devel@vger.kernel.org
>Cc: "Randy Dunlap" <randy.dunlap@oracle.com>, "Stephen Rothwell" <sfr@canb.auug.org.au>, "Hans Schillstrom" <hans@schillstrom.com>, "Patrick McHardy" <kaber@trash.net>, "Simon Horman" <horms@verge.net.au>
>Sent: Tue, Feb 1, 2011, 11:11 AM
>Subject: [PATCH 4/5] IPVS: Allow compilation with CONFIG_SYSCTL disabled
>
>This is a rather naieve approach to allowing PVS to compile with
>CONFIG_SYSCTL disabled.  I am working on a more comprehensive patch which
>will remove compilation of all sysctl-related IPVS code when CONFIG_SYSCTL
>is disabled.
>
>Cc: Hans Schillstrom <hans@schillstrom.com>
>Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
>Signed-off-by: Simon Horman <horms@verge.net.au>

Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
Tested-by: Hans Schillstrom <hans@schillstrom.com>

>---
> net/netfilter/ipvs/ip_vs_ctl.c   |   14 +++++++++-----
> net/netfilter/ipvs/ip_vs_lblc.c  |   20 ++++++++++----------
> net/netfilter/ipvs/ip_vs_lblcr.c |   20 ++++++++++----------
> 3 files changed, 29 insertions(+), 25 deletions(-)
>
>diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
>index d7c2fa8..c73b0c8 100644
>--- a/net/netfilter/ipvs/ip_vs_ctl.c
>+++ b/net/netfilter/ipvs/ip_vs_ctl.c
>@@ -3552,10 +3552,15 @@ int __net_init __ip_vs_control_init(struct net *net)
> 	tbl[idx++].data = &ipvs->sysctl_nat_icmp_send;
> 
> 
>+#ifdef CONFIG_SYSCTL
> 	ipvs->sysctl_hdr = register_net_sysctl_table(net, net_vs_ctl_path,
> 						     tbl);
>-	if (ipvs->sysctl_hdr == NULL)
>-		goto err_reg;
>+	if (ipvs->sysctl_hdr == NULL) {
>+		if (!net_eq(net, &init_net))
>+			kfree(tbl);
>+		goto err_dup;
>+	}
>+#endif
> 	ip_vs_new_estimator(net, ipvs->tot_stats);
> 	ipvs->sysctl_tbl = tbl;
> 	/* Schedule defense work */
>@@ -3563,9 +3568,6 @@ int __net_init __ip_vs_control_init(struct net *net)
> 	schedule_delayed_work(&ipvs->defense_work, DEFENSE_TIMER_PERIOD);
> 	return 0;
> 
>-err_reg:
>-	if (!net_eq(net, &init_net))
>-		kfree(tbl);
> err_dup:
> 	free_percpu(ipvs->cpustats);
> err_alloc:
>@@ -3581,7 +3583,9 @@ static void __net_exit __ip_vs_control_cleanup(struct net *net)
> 	ip_vs_kill_estimator(net, ipvs->tot_stats);
> 	cancel_delayed_work_sync(&ipvs->defense_work);
> 	cancel_work_sync(&ipvs->defense_work.work);
>+#ifdef CONFIG_SYSCTL
> 	unregister_net_sysctl_table(ipvs->sysctl_hdr);
>+#endif
> 	proc_net_remove(net, "ip_vs_stats_percpu");
> 	proc_net_remove(net, "ip_vs_stats");
> 	proc_net_remove(net, "ip_vs");
>diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c
>index d5bec33..00b5ffa 100644
>--- a/net/netfilter/ipvs/ip_vs_lblc.c
>+++ b/net/netfilter/ipvs/ip_vs_lblc.c
>@@ -554,33 +554,33 @@ static int __net_init __ip_vs_lblc_init(struct net *net)
> 						sizeof(vs_vars_table),
> 						GFP_KERNEL);
> 		if (ipvs->lblc_ctl_table == NULL)
>-			goto err_dup;
>+			return -ENOMEM;
> 	} else
> 		ipvs->lblc_ctl_table = vs_vars_table;
> 	ipvs->sysctl_lblc_expiration = 24*60*60*HZ;
> 	ipvs->lblc_ctl_table[0].data = &ipvs->sysctl_lblc_expiration;
> 
>+#ifdef CONFIG_SYSCTL
> 	ipvs->lblc_ctl_header =
> 		register_net_sysctl_table(net, net_vs_ctl_path,
> 					  ipvs->lblc_ctl_table);
>-	if (!ipvs->lblc_ctl_header)
>-		goto err_reg;
>+	if (!ipvs->lblc_ctl_header) {
>+		if (!net_eq(net, &init_net))
>+			kfree(ipvs->lblc_ctl_table);
>+		return -ENOMEM;
>+	}
>+#endif
> 
> 	return 0;
>-
>-err_reg:
>-	if (!net_eq(net, &init_net))
>-		kfree(ipvs->lblc_ctl_table);
>-
>-err_dup:
>-	return -ENOMEM;
> }
> 
> static void __net_exit __ip_vs_lblc_exit(struct net *net)
> {
> 	struct netns_ipvs *ipvs = net_ipvs(net);
> 
>+#ifdef CONFIG_SYSCTL
> 	unregister_net_sysctl_table(ipvs->lblc_ctl_header);
>+#endif
> 
> 	if (!net_eq(net, &init_net))
> 		kfree(ipvs->lblc_ctl_table);
>diff --git a/net/netfilter/ipvs/ip_vs_lblcr.c b/net/netfilter/ipvs/ip_vs_lblcr.c
>index 61ae8cf..bfa25f1 100644
>--- a/net/netfilter/ipvs/ip_vs_lblcr.c
>+++ b/net/netfilter/ipvs/ip_vs_lblcr.c
>@@ -754,33 +754,33 @@ static int __net_init __ip_vs_lblcr_init(struct net *net)
> 						sizeof(vs_vars_table),
> 						GFP_KERNEL);
> 		if (ipvs->lblcr_ctl_table == NULL)
>-			goto err_dup;
>+			return -ENOMEM;
> 	} else
> 		ipvs->lblcr_ctl_table = vs_vars_table;
> 	ipvs->sysctl_lblcr_expiration = 24*60*60*HZ;
> 	ipvs->lblcr_ctl_table[0].data = &ipvs->sysctl_lblcr_expiration;
> 
>+#ifdef CONFIG_SYSCTL
> 	ipvs->lblcr_ctl_header =
> 		register_net_sysctl_table(net, net_vs_ctl_path,
> 					  ipvs->lblcr_ctl_table);
>-	if (!ipvs->lblcr_ctl_header)
>-		goto err_reg;
>+	if (!ipvs->lblcr_ctl_header) {
>+		if (!net_eq(net, &init_net))
>+			kfree(ipvs->lblcr_ctl_table);
>+		return -ENOMEM;
>+	}
>+#endif
> 
> 	return 0;
>-
>-err_reg:
>-	if (!net_eq(net, &init_net))
>-		kfree(ipvs->lblcr_ctl_table);
>-
>-err_dup:
>-	return -ENOMEM;
> }
> 
> static void __net_exit __ip_vs_lblcr_exit(struct net *net)
> {
> 	struct netns_ipvs *ipvs = net_ipvs(net);
> 
>+#ifdef CONFIG_SYSCTL
> 	unregister_net_sysctl_table(ipvs->lblcr_ctl_header);
>+#endif
> 
> 	if (!net_eq(net, &init_net))
> 		kfree(ipvs->lblcr_ctl_table);
>-- 
>1.7.2.3
>
>--
>To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply

* Re: [PATCH 3/5] IPVS: Remove unused variables
From: Hans Schillstrom @ 2011-02-01 17:07 UTC (permalink / raw)
  To: Simon Horman
  Cc: netdev, linux-next, linux-kernel, lvs-devel, Randy Dunlap,
	Stephen Rothwell, Patrick McHardy

>---- Original Message ----
>From: Simon Horman <horms@verge.net.au>
>To: netdev@vger.kernel.org, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, lvs-devel@vger.kernel.org
>Cc: "Randy Dunlap" <randy.dunlap@oracle.com>, "Stephen Rothwell" <sfr@canb.auug.org.au>, "Hans Schillstrom" <hans@schillstrom.com>, "Patrick McHardy" <kaber@trash.net>, "Simon Horman" <horms@verge.net.au>
>Sent: Tue, Feb 1, 2011, 11:11 AM
>Subject: [PATCH 3/5] IPVS: Remove unused variables
>
>These variables are unused as a result of the recent netns work.
>
>Cc: Hans Schillstrom <hans@schillstrom.com>
>Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
Tested-by: Hans Schillstrom <hans@schillstrom.com>

>---
> include/net/ip_vs.h |    2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
>
>diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
>index b23bea6..5d75fea 100644
>--- a/include/net/ip_vs.h
>+++ b/include/net/ip_vs.h
>@@ -1109,8 +1109,6 @@ extern int ip_vs_icmp_xmit_v6
>  *	we are loaded. Just set ip_vs_drop_rate to 'n' and
>  *	we start to drop 1/rate of the packets
>  */
>-extern int ip_vs_drop_rate;
>-extern int ip_vs_drop_counter;
> 
> static inline int ip_vs_todrop(struct netns_ipvs *ipvs)
> {
>-- 
>1.7.2.3
>
>--
>To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH 2/5] IPVS: remove duplicate initialisation or rs_table
From: Hans Schillstrom @ 2011-02-01 17:06 UTC (permalink / raw)
  To: Simon Horman
  Cc: netdev, linux-next, linux-kernel, lvs-devel, Randy Dunlap,
	Stephen Rothwell, Patrick McHardy

>---- Original Message ----
>From: Simon Horman <horms@verge.net.au>
>To: netdev@vger.kernel.org, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, lvs-devel@vger.kernel.org
>Cc: "Randy Dunlap" <randy.dunlap@oracle.com>, "Stephen Rothwell" <sfr@canb.auug.org.au>, "Hans Schillstrom" <hans@schillstrom.com>, "Patrick McHardy" <kaber@trash.net>, "Simon Horman" <horms@verge.net.au>
>Sent: Tue, Feb 1, 2011, 11:11 AM
>Subject: [PATCH 2/5] IPVS: remove duplicate initialisation or rs_table
>
>Cc: Hans Schillstrom <hans@schillstrom.com>
>Signed-off-by: Simon Horman <horms@verge.net.au>

Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
Tested-by: Hans Schillstrom <hans@schillstrom.com>

>---
> net/netfilter/ipvs/ip_vs_ctl.c |    3 ---
> 1 files changed, 0 insertions(+), 3 deletions(-)
>
>diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
>index 98df59a..d7c2fa8 100644
>--- a/net/netfilter/ipvs/ip_vs_ctl.c
>+++ b/net/netfilter/ipvs/ip_vs_ctl.c
>@@ -3515,9 +3515,6 @@ int __net_init __ip_vs_control_init(struct net *net)
> 	}
> 	spin_lock_init(&ipvs->tot_stats->lock);
> 
>-	for (idx = 0; idx < IP_VS_RTAB_SIZE; idx++)
>-		INIT_LIST_HEAD(&ipvs->rs_table[idx]);
>-
> 	proc_net_fops_create(net, "ip_vs", 0, &ip_vs_info_fops);
> 	proc_net_fops_create(net, "ip_vs_stats", 0, &ip_vs_stats_fops);
> 	proc_net_fops_create(net, "ip_vs_stats_percpu", 0,
>-- 
>1.7.2.3
>
>--
>To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply

* Re: [GIT PULL nf-next-2.6] IPVS build fixes and clean-ups
From: Randy Dunlap @ 2011-02-01 17:05 UTC (permalink / raw)
  To: Simon Horman
  Cc: netdev, linux-next, linux-kernel, lvs-devel, Stephen Rothwell,
	Hans Schillstrom, Patrick McHardy
In-Reply-To: <20110201100421.GA13325@verge.net.au>

On 02/01/11 02:04, Simon Horman wrote:
> On Tue, Feb 01, 2011 at 03:06:37PM +1100, Simon Horman wrote:
>> On Mon, Jan 31, 2011 at 04:50:09PM -0800, Randy Dunlap wrote:
>>> On Tue,  1 Feb 2011 11:14:11 +1100 Simon Horman wrote:
>>>
>>>> Hi,
>>>>
>>>> This short patch series addresses two linux-next build problems
>>>> raised by Randy Dunlap:
>>>>
>>>> * net/netfilter/ipvs/ip_vs_core.c:1891: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'unsigned int'
>>>> * ERROR: "unregister_net_sysctl_table" [net/netfilter/ipvs/ip_vs.ko]
>>>>   ERROR: "register_net_sysctl_table" [net/netfilter/ipvs/ip_vs.ko] undefined!
>>>>
>>>> The remainder of the changset is cleanups that I noticed along the way.
>>>
>>> These 4 patches build successfully for me.
>>> However, I do see these warnings (sorry I missed them earlier):
>>>
>>> WARNING: net/netfilter/ipvs/ip_vs.o(.init.text+0x161): Section mismatch in reference from the function init_module() to the function .exit.text:ip_vs_sync_cleanup()
>>> WARNING: net/netfilter/ipvs/ip_vs.o(.init.text+0x161): Section mismatch in reference from the function init_module() to the function .exit.text:ip_vs_sync_cleanup()
>>
>> Thanks, I'll look into that. I will be travelling for a good portion of the
>> next day and a bit so I apologise in advance if that delays my next patch.
> 
> Hi,
> 
> I the following patch seems to be the right fix for this to me.
> I will send an amended pull request.
> 
> IPVS: Remove ip_vs_sync_cleanup from section __exit
> 
> ip_vs_sync_cleanup() may be called from ip_vs_init() on error
> and thus needs to be accesible from section __init
> 
> Reporte-by: Randy Dunlap <randy.dunlap@oracle.com>
  Reported-by:

> Signed-off-by: Simon Horman <horms@verge.net.au>

Acked-by: Randy Dunlap <randy.dunlap@oracle.com>

Thanks.

> ---
>  net/netfilter/ipvs/ip_vs_sync.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
> index d5a6e64..2a2a836 100644
> --- a/net/netfilter/ipvs/ip_vs_sync.c
> +++ b/net/netfilter/ipvs/ip_vs_sync.c
> @@ -1686,7 +1686,7 @@ int __init ip_vs_sync_init(void)
>  	return register_pernet_subsys(&ipvs_sync_ops);
>  }
>  
> -void __exit ip_vs_sync_cleanup(void)
> +void ip_vs_sync_cleanup(void)
>  {
>  	unregister_pernet_subsys(&ipvs_sync_ops);
>  }


-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply

* Re: [PATCH 1/5] IPVS: use z modifier for sizeof() argument
From: Hans Schillstrom @ 2011-02-01 17:06 UTC (permalink / raw)
  To: Simon Horman
  Cc: netdev, linux-next, linux-kernel, lvs-devel, Randy Dunlap,
	Stephen Rothwell, Patrick McHardy

>---- Original Message ----
>From: Simon Horman <horms@verge.net.au>
>To: netdev@vger.kernel.org, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, lvs-devel@vger.kernel.org
>Cc: "Randy Dunlap" <randy.dunlap@oracle.com>, "Stephen Rothwell" <sfr@canb.auug.org.au>, "Hans Schillstrom" <hans@schillstrom.com>, "Patrick McHardy" <kaber@trash.net>, "Simon Horman" <horms@verge.net.au>
>Sent: Tue, Feb 1, 2011, 11:08 AM
>Subject: [PATCH 1/5] IPVS: use z modifier for sizeof() argument
>
>Cc: Hans Schillstrom <hans@schillstrom.com>
>Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
>Signed-off-by: Simon Horman <horms@verge.net.au>

Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
Tested-by: Hans Schillstrom <hans@schillstrom.com>

>---
> net/netfilter/ipvs/ip_vs_core.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
>index d889f4f..4d06617 100644
>--- a/net/netfilter/ipvs/ip_vs_core.c
>+++ b/net/netfilter/ipvs/ip_vs_core.c
>@@ -1887,7 +1887,7 @@ static int __net_init __ip_vs_init(struct net *net)
> 	ipvs->gen = atomic_read(&ipvs_netns_cnt);
> 	atomic_inc(&ipvs_netns_cnt);
> 	net->ipvs = ipvs;
>-	printk(KERN_INFO "IPVS: Creating netns size=%lu id=%d\n",
>+	printk(KERN_INFO "IPVS: Creating netns size=%zu id=%d\n",
> 			 sizeof(struct netns_ipvs), ipvs->gen);
> 	return 0;
> }
>-- 
>1.7.2.3
>
>--
>To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply

* Re: [PATCH] bonding: added 802.3ad round-robin hashing policy for single TCP session balancing
From: Oleg V. Ukhno @ 2011-02-01 16:25 UTC (permalink / raw)
  To: Jay Vosburgh
  Cc: Nicolas de Pesloüan, John Fastabend, netdev@vger.kernel.org
In-Reply-To: <19551.1296268113@death>

On 01/29/2011 05:28 AM, Jay Vosburgh wrote:
> Oleg V. Ukhno<olegu@yandex-team.ru>  wrote:
>
> 	I've thought about this whole thing, and here's what I view as
> the proper way to do this.
>
> 	In my mind, this proposal is two separate pieces:
>
> 	First, a piece to make round-robin a selectable hash for
> xmit_hash_policy.  The documentation for this should follow the pattern
> of the "layer3+4" hash policy, in particular noting that the new
> algorithm violates the 802.3ad standard in exciting ways, will result in
> out of order delivery, and that other 802.3ad implementations may or may
> not tolerate this.
>
> 	Second, a piece to make certain transmitted packets use the
> source MAC of the sending slave instead of the bond's MAC.  This should
> be a separate option from the round-robin hash policy.  I'd call it
> something like "mac_select" with two values: "default" (what we do now)
> and "slave_src_mac" to use the slave's real MAC for certain types of
> traffic (I'm open to better names; that's just what I came up with while
> writing this).  I believe that "certain types" means "everything but
> ARP," but might be "only IP and IPv6."  Structuring the option in this
> manner leaves the option open for additional selections in the future,
> which a simple "on/off" option wouldn't.  This option should probably
> only affect a subset of modes; I'm thinking anything except balance-tlb
> or -alb (because they do funky MAC things already) and active-backup (it
> doesn't balance traffic, and already uses fail_over_mac to control
> this).  I think this option also needs a whole new section down in the
> bottom explaining how to exploit it (the "pick special MACs on slaves to
> trick switch hash" business).
>
> 	Comments?
>
> 	-J
>
Jay,
As for me splitting my initial proposal into two logically diffent 
pieces is ok, this will provide more flexible configuration.
Do I understand correctly, that after I rewrite  patch in splitted form, 
as you described above, and enhance documentation it will be /can be 
applied to kernel?
Then what should I do: rewrite patch and resubmit it as a new one?

Oleg.

> ---
> 	-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
>


-- 
Best regards,
Oleg Ukhno.


^ permalink raw reply

* [PATCHv2 dontapply] vhost-net tx tuning
From: Michael S. Tsirkin @ 2011-02-01 15:52 UTC (permalink / raw)
  To: Steve Dobbelstein; +Cc: mashirle, kvm, netdev
In-Reply-To: <OF381CCA86.B82857CC-ON86257826.00629F88-86257826.006596F5@us.ibm.com>

OK, so thinking about it more, maybe the issue is this:
tx becomes full. We process one request and interrupt the guest,
then it adds one request and the queue is full again.

Maybe the following will help it stabilize?  By default with it we will
only interrupt when we see an empty ring.
Which is liklely too much: pls try other values
in the middle: e.g. make bufs half the ring,
or bytes some small value like half ring * 200, or packets some
small value etc.

Set any one parameter to 0 to get current
behaviour (interrupt immediately when enabled).

Warning: completely untested.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

---

diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index aac05bc..6769cdc 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -32,6 +32,13 @@
  * Using this limit prevents one virtqueue from starving others. */
 #define VHOST_NET_WEIGHT 0x80000
 
+int tx_bytes_coalesce = 1000000000;
+module_param(tx_bytes_coalesce, int, 0644);
+int tx_bufs_coalesce = 1000000000;
+module_param(tx_bufs_coalesce, int, 0644);
+int tx_packets_coalesce = 1000000000;
+module_param(tx_packets_coalesce, int, 0644);
+
 enum {
 	VHOST_NET_VQ_RX = 0,
 	VHOST_NET_VQ_TX = 1,
@@ -127,6 +134,9 @@ static void handle_tx(struct vhost_net *net)
 	int err, wmem;
 	size_t hdr_size;
 	struct socket *sock;
+	int bytes_coalesced = 0;
+	int bufs_coalesced = 0;
+	int packets_coalesced = 0;
 
 	/* TODO: check that we are running from vhost_worker? */
 	sock = rcu_dereference_check(vq->private_data, 1);
@@ -196,14 +206,26 @@ static void handle_tx(struct vhost_net *net)
 		if (err != len)
 			pr_debug("Truncated TX packet: "
 				 " len %d != %zd\n", err, len);
-		vhost_add_used_and_signal(&net->dev, vq, head, 0);
 		total_len += len;
+		packets_coalesced += 1;
+		bytes_coalesced += len;
+		bufs_coalesced += out;
+		if (unlikely(packets_coalesced > tx_packets_coalesce ||
+			     bytes_coalesced > tx_bytes_coalesce ||
+			     bufs_coalesced > tx_bufs_coalesce))
+			vhost_add_used_and_signal(&net->dev, vq, head, 0);
+		else
+			vhost_add_used(vq, head, 0);
 		if (unlikely(total_len >= VHOST_NET_WEIGHT)) {
 			vhost_poll_queue(&vq->poll);
 			break;
 		}
 	}
 
+	if (likely(packets_coalesced &&
+		   bytes_coalesced &&
+		   bufs_coalesced))
+		vhost_signal(&net->dev, vq);
 	mutex_unlock(&vq->mutex);
 }
 

^ permalink raw reply related

* [PULL] vhost-net: 2.6.38 - warning fix
From: Michael S. Tsirkin @ 2011-02-01 15:44 UTC (permalink / raw)
  To: David Miller; +Cc: kvm, virtualization, netdev, linux-kernel

Please merge for 2.6.38. Not the most elegant fix,
but it does fix the noise in dmesg that interferes with
kvm debugging, and probably the best we can do for 2.6.38.

The following changes since commit fca540ab5f4718c6133f71f7be1793066008bf89:

  enc28j60: Fix reading of transmit status vector (2011-01-31 20:56:54 -0800)

are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost-net

Michael S. Tsirkin (1):
      vhost: rcu annotation fixup

 drivers/vhost/net.c   |    9 +++++----
 drivers/vhost/vhost.h |    6 +++---
 2 files changed, 8 insertions(+), 7 deletions(-)

^ permalink raw reply

* Re: AR-M0898A and tg3 driver Kernel Corruption/Panic
From: Stephen Clark @ 2011-02-01 15:30 UTC (permalink / raw)
  To: Matt Carlson; +Cc: Scott Sullivan, Linux Kernel Network Developers
In-Reply-To: <20110131220425.GA3540@mcarlson.broadcom.com>

On 01/31/2011 05:04 PM, Matt Carlson wrote:
> On Mon, Jan 31, 2011 at 01:40:58PM -0800, Scott Sullivan wrote:
>    
>> Stephen Clark,
>>
>> I've been fighting with Installing CentOS 5.5 on the Acrosser AR-M0898B. After finally Narrowing down the issue to the tg3 driver I stumbled upon your thread with Matt Carlson (CC'd).
>>
>> First up, what is the canonical location to follow the thread from? (It's mirrored to all ends of the Internet making it hard to find the most update copy of it.)
>>
>> As for my experiences with the device:
>> Getting the appliance to run right for me required the kernel arguments:
>> "apci=off nolapic"
>>
>> CentOS installs with tg3 Version 3.106
>> - w/o args system outright reboot when trying to start networking
>> - w/ args system would try to get DHCP and corrupt the kernel resulting in "cannot execute binary file" errors
>>
>> After installing tg3 Version 3.110g from src rpm:
>> - w/ args, gives a proper kernel panic and dump when trying to get a DHCP address.
>>
>> An old vague email from Acrosser suggest something stopped working between Fedora 8 and Fedora 10. I've yet to dig deeper into that lead.
>>
>> I have 2 of these devices on my desk. Please let me know if there is any information or tests I can preform to assist in resolving this bug.
>>      
> Thanks Scott.  Both you and Stephen seem to be running newer kernels and
> running into problems.  It doesn't look like the hardware is all that
> new though.  To see if there is a lower bound, have you tried running
> older distros to see if any one of them clears up the problem?
>
> Another approach is to do a kernel git bisection.  Is anyone comfortable
> with that?
>
>    
Hi Matt & Scott,

Actually I started out with the current kernel from Centos 5.5 and
tried later kernels to see if the problem was fixed, which it wasn't.

I haven't gotten around to testing a boot with the nomsi option yet.

Also I couldn't get freebsd 6.3 to run either.

Regards,
Steve


^ permalink raw reply

* How To Temporarily Suspend Network Traffic
From: Volkan YAZICI @ 2011-02-01 14:28 UTC (permalink / raw)
  To: netdev

Hi,

I want to temporarily suspend the network traffic on a particular
interface -- if possible, in microsecond granularity. For this purpose,
ifup/ifdown ioctl() calls doesn't work. That is, for wireless
interfaces, connection isn't get recovered; for wired interfaces, it
takes at least 2 seconds to recover. I tried using tc, but it doesn't
accept "rate 0" parameter. Neither "iwconfig wlan0 rate 0" has any
effect. (Moreover, in iwconfig manual it is told that values below 1000
are card specific and are usually an index in the bit-rate list.) Do you
have any suggestions? Can you recommend me to check any code piece in
the kernel or some other tool?


Regards.

^ permalink raw reply

* Re: Re: [GIT PULL nf-next-2.6 v2] IPVS build fixes and clean-ups
From: Hans Schillstrom @ 2011-02-01 13:58 UTC (permalink / raw)
  To: Patrick McHardy
  Cc: Simon Horman, netdev, linux-next, linux-kernel, lvs-devel,
	Randy Dunlap, Stephen Rothwell

>---- Original Message ----
>From: Patrick McHardy <kaber@trash.net>
>To: "Simon Horman" <horms@verge.net.au>
>Cc: netdev@vger.kernel.org, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, lvs-devel@vger.kernel.org, "Randy Dunlap" <randy.dunlap@oracle.com>, "Stephen Rothwell" <sfr@canb.auug.org.au>, "Hans Schillstrom" <hans@schillstrom.com>
>Sent: Tue, Feb 1, 2011, 14:25 PM
>Subject: Re: [GIT PULL nf-next-2.6 v2] IPVS build fixes and clean-ups
>
>On 01.02.2011 11:07, Simon Horman wrote:
>> This short patch series addresses two linux-next build problems
>> raised by Randy Dunlap:
>> 
>> * net/netfilter/ipvs/ip_vs_core.c:1891: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'unsigned int'
>> * ERROR: "unregister_net_sysctl_table" [net/netfilter/ipvs/ip_vs.ko]
>>   ERROR: "register_net_sysctl_table" [net/netfilter/ipvs/ip_vs.ko] undefined!
>> * WARNING: net/netfilter/ipvs/ip_vs.o(.init.text+0x161): Section mismatch in reference from the function init_module() to the function .exit.text:ip_vs_sync_cleanup()
>> 
>> The remainder of the changsets are cleanups that I noticed along the way.
>> 
>> The changes are available at
>> git://git.kernel.org/pub/scm/linux/kernel/git/horms/lvs-test-2.6.git master
>> 
>> They are currently compile-tested only.
>
>Just to avoid any confusion, do you want me to pull these patches
>already?

Let me do a sanity check of this,
It takes a couple of hours

/Hans Schillstrom


^ permalink raw reply

* Re: [GIT PULL nf-next-2.6 v2] IPVS build fixes and clean-ups
From: Hans Schillstrom @ 2011-02-01 13:36 UTC (permalink / raw)
  To: Simon Horman
  Cc: netdev, linux-next, linux-kernel, lvs-devel, Randy Dunlap,
	Stephen Rothwell, Patrick McHardy

>---- Original Message ----
>From: Simon Horman <horms@verge.net.au>
>To: netdev@vger.kernel.org, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, lvs-devel@vger.kernel.org
>Cc: "Randy Dunlap" <randy.dunlap@oracle.com>, "Stephen Rothwell" <sfr@canb.auug.org.au>, "Hans Schillstrom" <hans@schillstrom.com>, "Patrick McHardy" <kaber@trash.net>
>Sent: Tue, Feb 1, 2011, 11:11 AM
>Subject: [GIT PULL nf-next-2.6 v2] IPVS build fixes and clean-ups
>
>This short patch series addresses two linux-next build problems
>raised by Randy Dunlap:
>
>* net/netfilter/ipvs/ip_vs_core.c:1891: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'unsigned int'
>* ERROR: "unregister_net_sysctl_table" [net/netfilter/ipvs/ip_vs.ko]
>  ERROR: "register_net_sysctl_table" [net/netfilter/ipvs/ip_vs.ko] undefined!
>* WARNING: net/netfilter/ipvs/ip_vs.o(.init.text+0x161): Section mismatch in reference from the function init_module() to the function .exit.text:ip_vs_sync_cleanup()
>
>The remainder of the changsets are cleanups that I noticed along the way.
>
>The changes are available at
>git://git.kernel.org/pub/scm/linux/kernel/git/horms/lvs-test-2.6.git master
>
>They are currently compile-tested only.
>

I will try to test this today

Regards
Hans Schillstrom <hans@schillstrom.com>

^ permalink raw reply

* Re: [PATCH] IPv6 configurable default value for the privacy extension flag
From: Julien Aube @ 2011-02-01 12:57 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki; +Cc: netdev
In-Reply-To: <4D478655.6040706@linux-ipv6.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le Tue, 01 Feb 2011 13:04:37 +0900,
YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> a écrit :

> Hello.
> 
> (2011/02/01 0:49), Julien Aube wrote:
> 
> >+	} else {
> >+		printk(KERN_WARNING "IPv6 Privacy Extension "
> >+	"is disabled by default (invalid value %d)\n", ipv6_default_privacy);
> >+	}
> 
> I think WARNING is too high.

I did put KERN_WARNING because this code is used when someone explicitly set 
an invalid value, e.g.
 ipv6.privacy_default=-1

But you're right, I'll set KERN_NOTICE instead.

What do you think of the idea by itself anyhow ?

Thanks for the feedback.

Julien
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk1IAyYACgkQHiz1mD2sU8g39QCg6FY8LFCBwyX310cAZYdyVHJA
a4wAoOSDXBZGgayReuZ5wvzE7iZRiHZr
=7i5B
-----END PGP SIGNATURE-----

^ permalink raw reply

* Re: [PATCH 1/1] compat-wireless: Fix ath9k debug log issue.
From: Senthil Balasubramanian @ 2011-02-01 13:33 UTC (permalink / raw)
  To: Joe Perches
  Cc: Senthilkumar Balasubramanian, Luis Rodriguez,
	mcgrof-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <1296500296.4131.175.camel@Joe-Laptop>

On Tue, Feb 01, 2011 at 12:28:16AM +0530, Joe Perches wrote:
> On Mon, 2011-01-31 at 17:07 +0530, Senthil Balasubramanian wrote:
> > ath9k debug logs are not shown as we are using recursive vsnprintf
> > which are supported in kernel 2.6.36 and above. use vprintk for older
> > kernels.
> 
> #ifdefs spread around the tree for this sort of
> change are not very nice.
#if LINUX_VERSION is unavoidable in compat wireless and compat is actually
meant for that.
> 
> Perhaps wireless-compat should not be an impediment to
> mainline progress and these sorts of changes should be
> minimized.
>  
> If this is really necessary for backward compatibility,
> I think the %pV could just be removed.
May be this can be done if we are really worried about the no.of patches
in compat folder.
> 
> If not, because this style would be used in several
> places, perhaps another macro could be used to hide the
> use of %pV.
> 
> Maybe something like:
you mean use this in wireless-testing ??. We should not
add if kernel version checks in wireless-testing code and
I don't prefer that either.

> 
> #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
> #define PRINTK_VA_LIST(level, prefix, fmt, __va_list)	\
> ({							\
>  	struct va_format vaf;				\
>  							\
>  	vaf.fmt = fmt;					\
>  	vaf.va = &__va_list;				\
> 							\
> 	printk("%s" prefix "%pV", level, &vaf);		\
> })
> #else
> #define PRINTK_VA_LIST(level, prefix, fmt, __va_list)	\
> ({							\
> 	printk("%s" prefix, level);			\
> 	vprintk(fmt, __va_list);			\
> })
> #endif
> 
> > +diff --git a/drivers/net/wireless/ath/main.c b/drivers/net/wireless/ath/main.c
> > +index c325202..e3e60d4 100644
> > +--- a/drivers/net/wireless/ath/main.c
> > ++++ b/drivers/net/wireless/ath/main.c
> > +@@ -60,16 +60,23 @@ EXPORT_SYMBOL(ath_rxbuf_alloc);
> > + int ath_printk(const char *level, struct ath_common *common,
> > + 	       const char *fmt, ...)
> > + {
> > ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
> > + 	struct va_format vaf;
> > ++#endif
> > + 	va_list args;
> > + 	int rtn;
> > + 
> > + 	va_start(args, fmt);
> > + 
> > ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
> > + 	vaf.fmt = fmt;
> > + 	vaf.va = &args;
> > + 
> > + 	rtn = printk("%sath: %pV", level, &vaf);
> > ++#else
> > ++	printk("%sath: ", level);
> > ++	rtn = vprintk(fmt, args);
> > ++#endif
> > + 
> > + 	va_end(args);
> > + 
> 
> So this would become something like:
> 
> int ath_printk(const char *level, struct ath_common *common,
> 	       const char *fmt, ...)
> {
> 	va_list args;
> 	int rtn;
> 
> 	va_start(args, fmt);
> 
> 	rtn = PRINTK_VA_LIST(level, "ath: ", fmt, args);
> 
> 	va_end(args);
> 
> 	return rtn;
> }
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" 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: [GIT PULL nf-next-2.6 v2] IPVS build fixes and clean-ups
From: Patrick McHardy @ 2011-02-01 13:24 UTC (permalink / raw)
  To: Simon Horman
  Cc: netdev, linux-next, linux-kernel, lvs-devel, Randy Dunlap,
	Stephen Rothwell, Hans Schillstrom
In-Reply-To: <1296554868-17002-1-git-send-email-horms@verge.net.au>

On 01.02.2011 11:07, Simon Horman wrote:
> This short patch series addresses two linux-next build problems
> raised by Randy Dunlap:
> 
> * net/netfilter/ipvs/ip_vs_core.c:1891: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'unsigned int'
> * ERROR: "unregister_net_sysctl_table" [net/netfilter/ipvs/ip_vs.ko]
>   ERROR: "register_net_sysctl_table" [net/netfilter/ipvs/ip_vs.ko] undefined!
> * WARNING: net/netfilter/ipvs/ip_vs.o(.init.text+0x161): Section mismatch in reference from the function init_module() to the function .exit.text:ip_vs_sync_cleanup()
> 
> The remainder of the changsets are cleanups that I noticed along the way.
> 
> The changes are available at
> git://git.kernel.org/pub/scm/linux/kernel/git/horms/lvs-test-2.6.git master
> 
> They are currently compile-tested only.

Just to avoid any confusion, do you want me to pull these patches
already?

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox