Simon Horman | 1 Feb 01:03 2011
Picon

Re: linux-next: Tree for January 31 (ip_vs)

On Mon, Jan 31, 2011 at 03:00:31PM -0800, David Miller wrote:
> From: Simon Horman <horms <at> verge.net.au>
> Date: Tue, 1 Feb 2011 09:57:28 +1100
> 
> > On Tue, Feb 01, 2011 at 08:18:47AM +1100, Simon Horman wrote:
> >> On Mon, Jan 31, 2011 at 10:18:29AM -0800, Randy Dunlap wrote:
> >> > On Mon, 31 Jan 2011 17:41:13 +1100 Stephen Rothwell wrote:
> >> > 
> >> > > Hi all,
> >> > > 
> >> > > Changes since 20110121:
> >> > > 
> >> > > The net tree lost its build failure.
> >> > 
> >> > 
> >> > When CONFIG_SYSCTL is not enabled:
> >> > 
> >> > 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] undefined!
> >> > ERROR: "register_net_sysctl_table" [net/netfilter/ipvs/ip_vs.ko] undefined!
> >> 
> >> Thanks, I'm looking into it.
> > 
> > On a related note, does IPVS need to handle the case
> > where CONFIG_PROC_FS is not enabled?
> 
> Yes.

Thanks.
(Continue reading)

Simon Horman | 1 Feb 01:14 2011
Picon

[GIT PULL nf-next-2.6] IPVS build fixes and clean-ups

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.

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.

 include/net/ip_vs.h              |    2 --
 net/netfilter/ipvs/ip_vs_core.c  |    2 +-
 net/netfilter/ipvs/ip_vs_ctl.c   |   17 +++++++++--------
 net/netfilter/ipvs/ip_vs_lblc.c  |   20 ++++++++++----------
 net/netfilter/ipvs/ip_vs_lblcr.c |   20 ++++++++++----------
 5 files changed, 30 insertions(+), 31 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Simon Horman | 1 Feb 01:14 2011
Picon

[PATCH 4/4] 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 <at> schillstrom.com>
Reported-by: Randy Dunlap <randy.dunlap <at> oracle.com>
Signed-off-by: Simon Horman <horms <at> verge.net.au>
---
 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
 <at>  <at>  -3552,10 +3552,15  <at>  <at>  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);
(Continue reading)

Simon Horman | 1 Feb 01:14 2011
Picon

[PATCH 2/4] IPVS: remove duplicate initialisation or rs_table

Cc: Hans Schillstrom <hans <at> schillstrom.com>
Signed-off-by: Simon Horman <horms <at> verge.net.au>
---
 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
 <at>  <at>  -3515,9 +3515,6  <at>  <at>  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

Simon Horman | 1 Feb 01:14 2011
Picon

[PATCH 3/4] IPVS: Remove unused variables

These variables are unused as a result of the recent netns work.

Cc: Hans Schillstrom <hans <at> schillstrom.com>
Signed-off-by: Simon Horman <horms <at> verge.net.au>
---
 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
 <at>  <at>  -1109,8 +1109,6  <at>  <at>  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

Simon Horman | 1 Feb 01:14 2011
Picon

[PATCH 1/4] IPVS: use z modifier for sizeof() argument

Cc: Hans Schillstrom <hans <at> schillstrom.com>
Reported-by: Randy Dunlap <randy.dunlap <at> oracle.com>
Signed-off-by: Simon Horman <horms <at> verge.net.au>
---
 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
 <at>  <at>  -1887,7 +1887,7  <at>  <at>  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

Tom Herbert | 1 Feb 01:21 2011
Picon

(unknown)

From b6943d0caff7db23aaed20ec7abb7848281e502a Mon Sep 17 00:00:00 2001
From: Tom Herbert <therbert <at> google.com>
Date: Mon, 31 Jan 2011 16:12:02 -0800
Subject: [PATCH] net: Check rps_flow_table when RPS map length is 1

In get_rps_cpu, add check that the rps_flow_table for the device is
NULL when trying to take fast path when RPS map length is one.
Without this, RFS is effectively disabled if map length is one which
is not correct.

Signed-off-by: Tom Herbert <therbert <at> google.com>
---
 net/core/dev.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index ddd5df2..283ed85 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
 <at>  <at>  -2666,7 +2666,8  <at>  <at>  static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb,

 	map = rcu_dereference(rxqueue->rps_map);
 	if (map) {
-		if (map->len == 1) {
+		if (map->len == 1 &&
+		    !rcu_dereference_raw(rxqueue->rps_flow_table)) {
 			tcpu = map->cpus[0];
 			if (cpu_online(tcpu))
 				cpu = tcpu;
--

-- 
(Continue reading)

David Miller | 1 Feb 01:24 2011
Picon

Re: rps_flow_table bug fix

From: Tom Herbert <therbert <at> google.com>
Date: Mon, 31 Jan 2011 16:21:43 -0800 (PST)

Tom, please set your email subject correctly.

> Subject: [PATCH] net: Check rps_flow_table when RPS map length is 1
> 
> In get_rps_cpu, add check that the rps_flow_table for the device is
> NULL when trying to take fast path when RPS map length is one.
> Without this, RFS is effectively disabled if map length is one which
> is not correct.
> 
> Signed-off-by: Tom Herbert <therbert <at> google.com>

Applied, thanks.
--
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

Steve Dobbelstein | 1 Feb 01:24 2011
Picon

Re: Network performance with small packets

"Michael S. Tsirkin" <mst <at> redhat.com> wrote on 01/28/2011 06:16:16 AM:

> 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 itself it does nothing, but if you set
> all the parameters to a huge value we will
> only interrupt when we see an empty ring.
> Which might be too much: pls try other values
> in the middle: e.g. make bufs half the ring,
> or bytes some small value, or packets some
> small value etc.
>
> Warning: completely untested.
>
> 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
>  <at>  <at>  -32,6 +32,13  <at>  <at> 
>   * Using this limit prevents one virtqueue from starving others. */
>  #define VHOST_NET_WEIGHT 0x80000
>
> +int tx_bytes_coalesce = 0;
> +module_param(tx_bytes_coalesce, int, 0644);
> +int tx_bufs_coalesce = 0;
> +module_param(tx_bufs_coalesce, int, 0644);
> +int tx_packets_coalesce = 0;
(Continue reading)

David Miller | 1 Feb 01:25 2011
Picon

[PATCH 1/2] ipv4: Remember FIB alias list head and table in lookup results.


This will be used later to implement fib_select_default() in a
completely generic manner, instead of the current situation where the
default route is re-looked up in the TRIE/HASH table and then the
available aliases are analyzed.

Signed-off-by: David S. Miller <davem <at> davemloft.net>
---
 include/net/ip_fib.h     |    3 +++
 net/ipv4/fib_hash.c      |    2 +-
 net/ipv4/fib_lookup.h    |    2 +-
 net/ipv4/fib_semantics.c |    7 +++++--
 net/ipv4/fib_trie.c      |    8 ++++----
 5 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index 2c0508a..f5199b0 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
 <at>  <at>  -96,12 +96,15  <at>  <at>  struct fib_info {
 struct fib_rule;
 #endif

+struct fib_table;
 struct fib_result {
 	unsigned char	prefixlen;
 	unsigned char	nh_sel;
 	unsigned char	type;
 	unsigned char	scope;
 	struct fib_info *fi;
(Continue reading)


Gmane