Netdev List
 help / color / mirror / Atom feed
* (unknown), 
From: Madalin Bucur @ 2011-12-20 16:06 UTC (permalink / raw)
  To: steffen.klassert; +Cc: davem, eric.dumazet, timo.teras, netdev

Hi Steffen,

I did not have the time to test and send a v2 for my patch to remove the leftover local_bh_disable()/local_bh_enable() Ben has spotted.
I've also tried to use your approach but in my tests, under high load, the defered work was defered forever...

I'll try to test again with your patch and confirm it does not suffer from this issue or send a patch with those local_bh removed.

Madalin

-----Original Message-----
From: Steffen Klassert [mailto:steffen.klassert@secunet.com] 
Sent: Tuesday, December 20, 2011 10:24 AM
To: David Miller
Cc: Bucur Madalin-Cristian-B32716; eric.dumazet@gmail.com; netdev@vger.kernel.org; timo.teras@iki.fi
Subject: Re: [PATCH] net/flow: remove sleeping and deferral mechanism from flow_cache_flush

On Tue, Sep 27, 2011 at 03:31:32PM -0400, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Tue, 27 Sep 2011 15:28:36 -0400 (EDT)
> 
> > afinfo->garbage_collect is the only other place 
> > afinfo->__xfrm_garbage_collect
> > is referenced, and that is completely unused and should thus be 
> > deleted (I'll take care of that in net-next).
> 
> Nevermind I see how these are referenced directly via xfrm4_policy.c 
> and xfrm6_policy.c, sigh...

Is there any progress in fixing this issue? I've seen this occasionally on some of our production systems, so I fixed it for us in the meantime with the patch below. I could submit this for inclusion if noone else wants to fix it in a different manner.

^ permalink raw reply

* RE: [PATCH net-next v2] igb: reset PHY after recovering from PHY power down
From: Wyborny, Carolyn @ 2011-12-20 16:05 UTC (permalink / raw)
  To: Koki Sanagi, netdev@vger.kernel.org
  Cc: davem@davemloft.net, e1000-devel@lists.sourceforge.net,
	Kirsher, Jeffrey T, Brandeburg, Jesse, Allan, Bruce W,
	Skidmore, Donald C, Rose, Gregory V, Waskiewicz Jr, Peter P,
	Duyck, Alexander H, Ronciak, John
In-Reply-To: <4EEE9248.8020009@jp.fujitsu.com>



>-----Original Message-----
>From: Koki Sanagi [mailto:sanagi.koki@jp.fujitsu.com]
>Sent: Sunday, December 18, 2011 5:24 PM
>To: netdev@vger.kernel.org
>Cc: davem@davemloft.net; e1000-devel@lists.sourceforge.net; Wyborny,
>Carolyn; Kirsher, Jeffrey T; Brandeburg, Jesse; Allan, Bruce W;
>Skidmore, Donald C; Rose, Gregory V; Waskiewicz Jr, Peter P; Duyck,
>Alexander H; Ronciak, John
>Subject: [PATCH net-next v2] igb: reset PHY after recovering from PHY
>power down
>
>According to 82576_Datasheet.pdf, PHY setting is lost after PHY power
>down.
>So resetting PHY is needed when recovering from PHY power down to set a
>default
>setting to PHY register.
>Owing to this lack, NIC doesn't link up in some rare situation.
>
>Signed-off-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
>---
>diff --git a/drivers/net/ethernet/intel/igb/igb_main.c
>b/drivers/net/ethernet/intel/igb/igb_main.c
>index 89d576c..9b923b0 100644
>--- a/drivers/net/ethernet/intel/igb/igb_main.c
>+++ b/drivers/net/ethernet/intel/igb/igb_main.c
>@@ -1498,6 +1498,7 @@ void igb_power_up_link(struct igb_adapter
>*adapter)
> 		igb_power_up_phy_copper(&adapter->hw);
> 	else
> 		igb_power_up_serdes_link_82575(&adapter->hw);
>+	igb_reset_phy(&adapter->hw);
> }
>
> /**

ACK


Carolyn Wyborny
Linux Development
LAN Access Division
Intel Corporation

^ permalink raw reply

* Re: [PATCH] net/sched: sch_plug - Queue traffic until an explicit release command
From: Jamal Hadi Salim @ 2011-12-20 14:38 UTC (permalink / raw)
  To: rshriram; +Cc: netdev, Brendan Cully
In-Reply-To: <1324329752-28459-1-git-send-email-rshriram@cs.ubc.ca>


Sorry - I didnt see your earlier CC. Cyberus.ca is probably the
worst service provider in Canada (maybe the world; i am sure there
are better ISPs in the middle of an ocean somewhere, deep underwater
probably).

On Mon, 2011-12-19 at 13:22 -0800, rshriram@cs.ubc.ca wrote:
> This qdisc can be used to implement output buffering, an essential
> functionality required for consistent recovery in checkpoint based
> fault tolerance systems. 

I am trying to figure where this qdisc runs - is it in the hypervisor?

> The qdisc supports two operations - plug and
> unplug. When the qdisc receives a plug command via netlink request,
> packets arriving henceforth are buffered until a corresponding unplug
> command is received.

Ok, so plug indicates "start of checkpoint" and unplug the end.
Seems all you want is at a certain point to throttle the qdisc and
later on unplug/unthrottle, correct?
Sounds to me like a generic problem that applies to all qdiscs?

> Its intention is to support speculative execution by allowing generated
> network traffic to be rolled back. It is used to provide network
> protection for domUs in the Remus high availability project, available as
> part of Xen. This module is generic enough to be used by any other
> system that wishes to add speculative execution and output buffering to
> its applications.

Should get a nice demo effect of showing a simple ping working with
zero drops, but: what is the effect of not even having this qdisc?
If you just switch the qdisc to a sleeping state from user space, all
packets arriving at that qdisc will be dropped during the checkpoint
phase (and the kernel code will be tiny or none). 
If you do nothing some packets will be buffered and a watchdog 
will recover them when conditions become right.
So does this qdisc add anything different?

[Note: In your case when arriving packets find the queue filled up 
you will drop lotsa packets - depending on traffic patterns; so
not much different than above]

> +
> +#define FIFO_BUF    (10*1024*1024)

Aha.
Technically - use tc to do this. Conceptually:
This is probably what makes you look good in a demo if you have one; 
huge freaking buffer. If you are doing a simple ping (or a simple
interactive session like ssh) and you can failover in 5 minutes you
still wont be able to fill that buffer!

Look at the other feedback given to you (Stephen and Dave responded).

If a qdisc is needed, should it not be a classful qdisc?

cheers,
jamal

^ permalink raw reply

* [PATCH net-next] net: unix -- Add missing module.h inclusion
From: Cyrill Gorcunov @ 2011-12-20 14:33 UTC (permalink / raw)
  To: NETDEV; +Cc: David Miller, Pavel Emelyanov

Otherwise getting

 | net/unix/diag.c:312:16: error: expected declaration specifiers or ‘...’ before string constant
 | net/unix/diag.c:313:1: error: expected declaration specifiers or ‘...’ before string constant

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
 net/unix/diag.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/unix/diag.c b/net/unix/diag.c
index a5c4aab..91d5782 100644
--- a/net/unix/diag.c
+++ b/net/unix/diag.c
@@ -3,6 +3,7 @@
 #include <linux/sock_diag.h>
 #include <linux/unix_diag.h>
 #include <linux/skbuff.h>
+#include <linux/module.h>
 #include <net/netlink.h>
 #include <net/af_unix.h>
 #include <net/tcp_states.h>
-- 
1.7.7.4

^ permalink raw reply related

* business proposal.
From: Liu Wang @ 2011-12-17  1:41 UTC (permalink / raw)


I am Mr. Liu Wang, an official with the International bank of Taipei,Taiwan. 
I ask for your partnership in re-profiling funds.

^ permalink raw reply

* Re: macvtap rxhash patch
From: Michael S. Tsirkin @ 2011-12-20 11:23 UTC (permalink / raw)
  To: David Miller; +Cc: krkumar2, netdev
In-Reply-To: <20111219.163732.1743893510814385117.davem@davemloft.net>

On Mon, Dec 19, 2011 at 04:37:32PM -0500, David Miller wrote:
> 
> Reference:
> 
> http://patchwork.ozlabs.org/patch/127456/
> 
> This is just rotting for a long time, I want to just do something
> with this patch, and I don't care if that's "apply it now" or
> "defer indefinitely".
> 
> Thanks.

Ack, sorry about the delay.

^ permalink raw reply

* Re: [PATCH] macvtap: Fix macvtap_get_queue to use rxhash first
From: Michael S. Tsirkin @ 2011-12-20 11:15 UTC (permalink / raw)
  To: David Miller; +Cc: krkumar2, arnd, netdev, virtualization, levinsasha928
In-Reply-To: <20111207.135235.557498530764890254.davem@davemloft.net>

On Wed, Dec 07, 2011 at 01:52:35PM -0500, David Miller wrote:
> From: "Michael S. Tsirkin" <mst@redhat.com>
> Date: Wed, 7 Dec 2011 18:10:02 +0200
> 
> > On Fri, Nov 25, 2011 at 01:35:52AM -0500, David Miller wrote:
> >> From: Krishna Kumar2 <krkumar2@in.ibm.com>
> >> Date: Fri, 25 Nov 2011 09:39:11 +0530
> >> 
> >> > Jason Wang <jasowang@redhat.com> wrote on 11/25/2011 08:51:57 AM:
> >> >>
> >> >> My description is not clear again :(
> >> >> I mean the same vhost thead:
> >> >>
> >> >> vhost thread #0 transmits packets of flow A on processor M
> >> >> ...
> >> >> vhost thread #0 move to another process N and start to transmit packets
> >> >> of flow A
> >> > 
> >> > Thanks for clarifying. Yes, binding vhosts to CPU's
> >> > makes the incoming packet go to the same vhost each
> >> > time. BTW, are you doing any binding and/or irqbalance
> >> > when you run your tests? I am not running either at
> >> > this time, but thought both might be useful.
> >> 
> >> So are we going with this patch or are we saying that vhost binding
> >> is a requirement?
> > 
> > OK we didn't come to a conclusion so I would be inclined
> > to merge this patch as is for 3.2, and revisit later.
> > One question though: do these changes affect userspace
> > in any way? For example, will this commit us to
> > ensure that a single flow gets a unique hash even
> > for strange configurations that transmit the same flow
> > from multiple cpus?
> 
> Once you sort this out, reply with an Acked-by: for me, thanks.

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

^ permalink raw reply

* [PATCH] SUNRPC: search for service transports in network namespace context
From: Stanislav Kinsbursky @ 2011-12-20 11:14 UTC (permalink / raw)
  To: Trond.Myklebust
  Cc: linux-nfs, xemul, neilb, netdev, linux-kernel, jbottomley,
	bfields, davem, devel

Service transports are parametrized by network namespace. And thus lookup of
transport instance have to take network namespace into account.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>

---
 fs/lockd/svc.c                  |    2 +-
 fs/nfsd/nfsctl.c                |    4 ++--
 include/linux/sunrpc/svc_xprt.h |    3 ++-
 net/sunrpc/svc_xprt.c           |    6 +++++-
 4 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index c061b9a..ff379ff 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -193,7 +193,7 @@ static int create_lockd_listener(struct svc_serv *serv, const char *name,
 {
 	struct svc_xprt *xprt;
 
-	xprt = svc_find_xprt(serv, name, family, 0);
+	xprt = svc_find_xprt(serv, name, &init_net, family, 0);
 	if (xprt == NULL)
 		return svc_create_xprt(serv, name, &init_net, family, port,
 						SVC_SOCK_DEFAULTS);
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index f9d0599..1f12f27 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -721,7 +721,7 @@ static ssize_t __write_ports_addxprt(char *buf)
 	nfsd_serv->sv_nrthreads--;
 	return 0;
 out_close:
-	xprt = svc_find_xprt(nfsd_serv, transport, PF_INET, port);
+	xprt = svc_find_xprt(nfsd_serv, transport, &init_net, PF_INET, port);
 	if (xprt != NULL) {
 		svc_close_xprt(xprt);
 		svc_xprt_put(xprt);
@@ -747,7 +747,7 @@ static ssize_t __write_ports_delxprt(char *buf)
 	if (port < 1 || port > USHRT_MAX || nfsd_serv == NULL)
 		return -EINVAL;
 
-	xprt = svc_find_xprt(nfsd_serv, transport, AF_UNSPEC, port);
+	xprt = svc_find_xprt(nfsd_serv, transport, &init_net, AF_UNSPEC, port);
 	if (xprt == NULL)
 		return -ENOTCONN;
 
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h
index 18df516..21e3418 100644
--- a/include/linux/sunrpc/svc_xprt.h
+++ b/include/linux/sunrpc/svc_xprt.h
@@ -122,7 +122,8 @@ void	svc_delete_xprt(struct svc_xprt *xprt);
 int	svc_port_is_privileged(struct sockaddr *sin);
 int	svc_print_xprts(char *buf, int maxlen);
 struct	svc_xprt *svc_find_xprt(struct svc_serv *serv, const char *xcl_name,
-			const sa_family_t af, const unsigned short port);
+			struct net *net, const sa_family_t af,
+			const unsigned short port);
 int	svc_xprt_names(struct svc_serv *serv, char *buf, const int buflen);
 
 static inline void svc_xprt_get(struct svc_xprt *xprt)
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index f8f0627..5fd123f 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -1069,6 +1069,7 @@ static struct svc_deferred_req *svc_deferred_dequeue(struct svc_xprt *xprt)
  * svc_find_xprt - find an RPC transport instance
  * @serv: pointer to svc_serv to search
  * @xcl_name: C string containing transport's class name
+ * @net: owner net pointer
  * @af: Address family of transport's local address
  * @port: transport's IP port number
  *
@@ -1081,7 +1082,8 @@ static struct svc_deferred_req *svc_deferred_dequeue(struct svc_xprt *xprt)
  * service's list that has a matching class name.
  */
 struct svc_xprt *svc_find_xprt(struct svc_serv *serv, const char *xcl_name,
-			       const sa_family_t af, const unsigned short port)
+			       struct net *net, const sa_family_t af,
+			       const unsigned short port)
 {
 	struct svc_xprt *xprt;
 	struct svc_xprt *found = NULL;
@@ -1092,6 +1094,8 @@ struct svc_xprt *svc_find_xprt(struct svc_serv *serv, const char *xcl_name,
 
 	spin_lock_bh(&serv->sv_lock);
 	list_for_each_entry(xprt, &serv->sv_permsocks, xpt_list) {
+		if (xprt->xpt_net != net)
+			continue;
 		if (strcmp(xprt->xpt_class->xcl_name, xcl_name))
 			continue;
 		if (af != AF_UNSPEC && af != xprt->xpt_local.ss_family)

^ permalink raw reply related

* [PATCH V2] IPv6 : add multicast routing verify which net_device is lo
From: Gao feng @ 2011-12-20 11:10 UTC (permalink / raw)
  To: netdev; +Cc: davem, Wang xingtong
In-Reply-To: <4EF059B3.1020705@cn.fujitsu.com>

In currently routing subsystem, when we lookup a multicast routing
to send muticast packets to outside, rt6_device_match will return
the rt6_info which it's match first. If we add a multicast route on
loopback devices beforce the others interface, rt6_device_match will
retrun the rt6_info which rt6i_dev->name is "lo". But, obviously,
we can't send a muticast packet to outside using loopback devices.
It case all multicast packets blocking.

Commit 4af04aba93f47699e disabled kernel add multicast route on lo
automatically. However,  we can't surmise the routing-add order or
interdict add multicast routing on loopback devices in user space.
The bug still exist. So, i think, more stronger routing subsystem is
necessary.

Signed-off-by: Wang xingtong <wangxingtong@cn.fujitsu.com>
---
 net/ipv6/route.c |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index b582a0a..d6663ca 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -334,9 +334,16 @@ static inline struct rt6_info *rt6_device_match(struct net *net,
 	struct rt6_info *local = NULL;
 	struct rt6_info *sprt;
 
-	if (!oif && ipv6_addr_any(saddr))
+	if (!oif && ipv6_addr_any(saddr)){
+		if (unlikely(rt->rt6i_dev->flags & IFF_LOOPBACK &&
+			ipv6_addr_is_multicast(&rt->rt6i_dst.addr))){
+			rt=rt->dst.rt6_next;
+			goto match;
+		}
 		goto out;
+	}
 
+match:
 	for (sprt = rt; sprt; sprt = sprt->dst.rt6_next) {
 		struct net_device *dev = sprt->rt6i_dev;
 
@@ -355,9 +362,15 @@ static inline struct rt6_info *rt6_device_match(struct net *net,
 				local = sprt;
 			}
 		} else {
-			if (ipv6_chk_addr(net, saddr, dev,
-					  flags & RT6_LOOKUP_F_IFACE))
+			if (ipv6_addr_any(saddr)){
+				if (unlikely(rt->rt6i_dev->flags & IFF_LOOPBACK &&
+					ipv6_addr_is_multicast(&rt->rt6i_dst.addr)))
+					continue;
 				return sprt;
+			}
+			else if (ipv6_chk_addr(net, saddr, dev,
+					  flags & RT6_LOOKUP_F_IFACE))
+					return sprt;
 		}
 	}
 
-- 
1.7.1

^ permalink raw reply related

* Re: [PATCH] bridge: push blocking slaves to forwarding when turning stp off
From: Vitalii Demianets @ 2011-12-20 10:59 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, bridge
In-Reply-To: <201112141132.51867.vitas@nppfactor.kiev.ua>

Hello, Stephen!
I can not understand your silence.
There are issues fixed by the patch in question. For example, if the interface 
is left in blocking state after stp was turned off, that state is not 
stable - it can flip to forwarding state in unpredictable times, e.g. when 
_any other_ slave of the bridge goes up or down. Do you think user wants 
exactly that unpredictable state change?
Also, the code in question in function br_stp_stop(), namely 
br_port_state_selection(br) call, does exactly nothing except wasting cpu 
cycles. Isn't it worth fixing?

-- 
Vitalii Demianets

^ permalink raw reply

* Re: LARTC mailing list
From: Andy Furniss @ 2011-12-20 10:45 UTC (permalink / raw)
  To: David Miller
  Cc: andy, darkbasic, postmaster, netfilter, lartc, jsullivan, lloyd,
	netdev
In-Reply-To: <20111219.145940.2030642788874548046.davem@davemloft.net>

David Miller wrote:
> From: Andrew Beverley<andy@andybev.com>
> Date: Mon, 19 Dec 2011 17:11:52 +0000
>
>> VGER postmasters: can we try a new LARTC list at VGER please?
>
> I've created lartc@vger.kernel.org, enjoy.

Great news, thank you.

^ permalink raw reply

* [PATCH] batman-adv: checkpatch cleanup - remove lines longer than 80 chars
From: Marek Lindner @ 2011-12-20 10:38 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r, Marek Lindner

The long line was introduced with b26e478f8f.

Signed-off-by: Marek Lindner <lindner_marek-LWAfsSFWpa4@public.gmane.org>
---
 net/batman-adv/translation-table.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index ab8dea8..58361ed 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -679,7 +679,7 @@ void tt_global_del(struct bat_priv *bat_priv,
 			 * 2) the client roamed to us => we can directly delete
 			 *    the global entry, since it is useless now. */
 			tt_local_entry = tt_local_hash_find(bat_priv,
-							    tt_global_entry->common.addr);
+						tt_global_entry->common.addr);
 			if (!tt_local_entry) {
 				tt_global_entry->common.flags |= TT_CLIENT_ROAM;
 				tt_global_entry->roam_at = jiffies;
-- 
1.7.5.4

^ permalink raw reply related

* Re: [Devel] [PATCH] SUNRPC: search for service transports in network namespace context
From: Stanislav Kinsbursky @ 2011-12-20 10:31 UTC (permalink / raw)
  To: Glauber Costa
  Cc: Trond.Myklebust@netapp.com, linux-nfs@vger.kernel.org,
	Pavel Emelianov, neilb@suse.de, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, bfields@fieldses.org,
	davem@davemloft.net, devel@openvz.org
In-Reply-To: <4EF062B1.3030401@parallels.com>

20.12.2011 14:25, Glauber Costa пишет:
> On 12/20/2011 03:14 PM, Stanislav Kinsbursky wrote:
>> Service transports are parametrized by network namespace. And thus lookup of
>> transport instance have to take network namespace into account.
>>
>> Signed-off-by: Stanislav Kinsbursky<skinsbursky@parallels.com>
>>
>> ---
>>    fs/lockd/svc.c                  |    2 +-
>>    fs/nfsd/nfsctl.c                |    4 ++--
>>    include/linux/sunrpc/svc_xprt.h |    3 ++-
>>    net/sunrpc/svc_xprt.c           |    6 +++++-
>>    4 files changed, 10 insertions(+), 5 deletions(-)
>>
>> diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
>> index c061b9a..ff379ff 100644
>> --- a/fs/lockd/svc.c
>> +++ b/fs/lockd/svc.c
>> @@ -193,7 +193,7 @@ static int create_lockd_listener(struct svc_serv *serv, const char *name,
>>    {
>>    	struct svc_xprt *xprt;
>>
>> -	xprt = svc_find_xprt(serv, name, family, 0);
>> +	xprt = svc_find_xprt(serv, name,&init_net, family, 0);
>>    	if (xprt == NULL)
>>    		return svc_create_xprt(serv, name,&init_net, family, port,
>>    						SVC_SOCK_DEFAULTS);
>
> I might be missing something, but isn't it (at least part of it) already
> merged in commit fc5d00b04a3a58cac8620403dfe9f43f72578ec1 ?
>

Nope, those one was parameterizing transport creation by network namespace.
This one is parameterizing search in poll of existent service transports by 
network namespace.

-- 
Best regards,
Stanislav Kinsbursky

^ permalink raw reply

* RE: [PATCH 1/1] tcp: Replace constants with #define macros
From: David Laight @ 2011-12-20 10:27 UTC (permalink / raw)
  To: Vijay Subramanian, netdev
  Cc: David S. Miller, Eric Dumazet, ilpo.jarvinen, H.K. Jerry Chu
In-Reply-To: <1324351929-2588-1-git-send-email-subramanian.vijay@gmail.com>

 
> diff --git a/include/linux/tcp.h b/include/linux/tcp.h
> index 7f59ee9..874b043 100644
> --- a/include/linux/tcp.h
> +++ b/include/linux/tcp.h
> @@ -238,6 +238,11 @@ struct tcp_sack_block {
>  	u32	end_seq;
>  };
>  
> +/*These are used to set the sack_ok field in struct 
> tcp_options_received */
> +#define SACK_SEEN     (1 << 0)   /*1 = peer is SACK capable, */
> +#define FACK_ENABLED  (1 << 1)   /*1 = FACK is enabled locally*/
> +#define DSACK_SEEN    (1 << 2)   /*1 = DSACK was received from peer*/
> +

Since that is a fairly public header, some namespace protection
might be sensible.

> -	tcp_opt->sack_ok = (options >> 4) & 0x1;
> +	tcp_opt->sack_ok = (options >> 4) & SACK_SEEN;

Looks to me like that 0x1 isn't SAC_SEEK! So this is now misleading.

	David

^ permalink raw reply

* Re: [Devel] [PATCH] SUNRPC: search for service transports in network namespace context
From: Glauber Costa @ 2011-12-20 10:25 UTC (permalink / raw)
  To: Stanislav Kinsbursky
  Cc: Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA,
	linux-nfs-u79uwXL29TY76Z2rM5mHXA, xemul-bzQdu9zFT3WakBO8gow8eQ,
	neilb-l3A5Bk7waGM, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	bfields-uC3wQj2KruNg9hUCZPvPmw, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
	devel-GEFAQzZX7r8dnm+yROfE0A
In-Reply-To: <20111220101419.5673.21926.stgit-bi+AKbBUZKagILUCTcTcHdKyNwTtLsGr@public.gmane.org>

On 12/20/2011 03:14 PM, Stanislav Kinsbursky wrote:
> Service transports are parametrized by network namespace. And thus lookup of
> transport instance have to take network namespace into account.
>
> Signed-off-by: Stanislav Kinsbursky<skinsbursky-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
>
> ---
>   fs/lockd/svc.c                  |    2 +-
>   fs/nfsd/nfsctl.c                |    4 ++--
>   include/linux/sunrpc/svc_xprt.h |    3 ++-
>   net/sunrpc/svc_xprt.c           |    6 +++++-
>   4 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
> index c061b9a..ff379ff 100644
> --- a/fs/lockd/svc.c
> +++ b/fs/lockd/svc.c
> @@ -193,7 +193,7 @@ static int create_lockd_listener(struct svc_serv *serv, const char *name,
>   {
>   	struct svc_xprt *xprt;
>
> -	xprt = svc_find_xprt(serv, name, family, 0);
> +	xprt = svc_find_xprt(serv, name,&init_net, family, 0);
>   	if (xprt == NULL)
>   		return svc_create_xprt(serv, name,&init_net, family, port,
>   						SVC_SOCK_DEFAULTS);

I might be missing something, but isn't it (at least part of it) already 
merged in commit fc5d00b04a3a58cac8620403dfe9f43f72578ec1 ?

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" 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

* [PATCH net-next] mlx4_en: FIX: Setting default_qpn before using it
From: Yevgeny Petrilin @ 2011-12-20  7:53 UTC (permalink / raw)
  To: davem; +Cc: netdev, yevgenyp

From: Yevgeny Petrilin <yevgenyp@mellanox.co.il>

When UDP RSS is enabled, we use same QPN for TCP and UDP ranges
The bug is that the default_qpn was used base UDP qpn before it
was set.
Fixes bug introduced in commit: 1202d460b1df3a77fda66f4ba5f90ae3527dd42f

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
---
 drivers/net/ethernet/mellanox/mlx4/en_rx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index 630a7c1..e8d6ad2 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -898,11 +898,11 @@ int mlx4_en_config_rss_steer(struct mlx4_en_priv *priv)
 	rss_context = ptr;
 	rss_context->base_qpn = cpu_to_be32(ilog2(priv->rx_ring_num) << 24 |
 					    (rss_map->base_qpn));
+	rss_context->default_qpn = cpu_to_be32(rss_map->base_qpn);
 	if (priv->mdev->profile.udp_rss) {
 		rss_mask |=  MLX4_RSS_UDP_IPV4 | MLX4_RSS_UDP_IPV6;
 		rss_context->base_qpn_udp = rss_context->default_qpn;
 	}
-	rss_context->default_qpn = cpu_to_be32(rss_map->base_qpn);
 	rss_context->flags = rss_mask;
 	rss_context->hash_fn = MLX4_RSS_HASH_TOP;
 	for (i = 0; i < 10; i++)
-- 
1.7.7

^ permalink raw reply related

* Re: [PATCH] IPv6 : add multicast routing verify which net_device is lo
From: Wang Xingtong @ 2011-12-20  9:47 UTC (permalink / raw)
  To: netdev; +Cc: davem
In-Reply-To: <4EF0279A.30800@cn.fujitsu.com>

Wang Xingtong 写道:
> In currently routing subsystem, when we lookup a multicast routing
> to send muticast packets to outside, rt6_device_match will return
> the rt6_info which it's match first. if we add a multicast route on
> loopback devices beforce the others interface, rt6_device_match will
> retrun the rt6_info which rt6i_dev->name is "lo". But, obviously,
> we can't send a muticast packet to outside using loopback devices.
> It case all multicast packets blocking.
> 
> Commit 4af04aba93f47699e disabled kernel add multicast route on lo
> automatically. However,  we can't surmise the routing-add order or
> interdict add multicast routing on loopback devices in user space.
> The bug still exist. So, i think more stronger routing subsystem is
> necessary.

sorry, the patch has some problem , i will send V2 later.

> 
> Signed-off-by: Wang xingtong <wangxingtong@cn.fujitsu.com>
> 
> ---
>  net/ipv6/route.c |   19 ++++++++++++++++---
>  1 files changed, 16 insertions(+), 3 deletions(-)
> 
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index b582a0a..3871ef4 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -334,9 +334,16 @@ static inline struct rt6_info 
> *rt6_device_match(struct net *net,
>      struct rt6_info *local = NULL;
>      struct rt6_info *sprt;
> 
> -    if (!oif && ipv6_addr_any(saddr))
> +    if (!oif && ipv6_addr_any(saddr)){
> +        if (unlikely(rt->rt6i_dev->flags & IFF_LOOPBACK &&
> +            ipv6_addr_is_multicast(&rt->rt6i_dst.addr))){
> +            rt=rt->dst.rt6_next;
> +            goto match;
> +        }
>          goto out;
> +    }
> 
> +match:
>      for (sprt = rt; sprt; sprt = sprt->dst.rt6_next) {
>          struct net_device *dev = sprt->rt6i_dev;
> 
> @@ -355,9 +362,15 @@ static inline struct rt6_info 
> *rt6_device_match(struct net *net,
>                  local = sprt;
>              }
>          } else {
> -            if (ipv6_chk_addr(net, saddr, dev,
> -                      flags & RT6_LOOKUP_F_IFACE))
> +            if (ipv6_addr_any(saddr)){
> +                if (unlikely(rt->rt6i_dev->flags & IFF_LOOPBACK &&
> +                    ipv6_addr_is_multicast(&rt->rt6i_dst.addr))){
> +                    continue;
>                  return sprt;
> +            }
> +            else if (ipv6_chk_addr(net, saddr, dev,
> +                      flags & RT6_LOOKUP_F_IFACE))
> +                    return sprt;
>          }
>      }
> 

^ permalink raw reply

* Re: [PATCH] sctp: Do not account for sizeof(struct sk_buff) in estimated rwnd
From: Thomas Graf @ 2011-12-20  9:39 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: vladislav.yasevich, linux-sctp, davem, netdev
In-Reply-To: <CAPgLHd-JL8cjMBSqO5Lc5nEt42zqj8qAn+qHaM35HTmnhOHg7w@mail.gmail.com>

On Tue, Dec 20, 2011 at 01:00:48PM +0800, Wei Yongjun wrote:
> I saw you discussed this with Vlad in old mail:
>     http://www.spinics.net/lists/linux-sctp/msg01365.html
> 
> You said you will update patch to include a per packet overhead,
> but it does not include in this patch, what's wrong with in?

It's not possible because upon retransmission of a chunk we need
to readd the overhead to the rwnd. There is no longer a reference
to a packet so we can't know how much to add. This explanation is
also in the original mail thread.

^ permalink raw reply

* [patch 07/10] [PATCH] qeth: forbid recovery during shutdown
From: frank.blaschka @ 2011-12-20  8:56 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Ursula Braun
In-Reply-To: <20111220085626.924756639@de.ibm.com>

[-- Attachment #1: 607-qeth-recovery-shutdown.diff --]
[-- Type: text/plain, Size: 3459 bytes --]

From: Ursula Braun <ursula.braun@de.ibm.com>

A recovery does not make sense during shutdown and may even cause an
error like this:

qeth 0.0.f503: A recovery process has been started for the device
Badness at drivers/s390/cio/qdio_main.c:1156
Modules linked in: autofs4 sunrpc dm_multipath scsi_dh scsi_mod qeth_l3 ipv6 vmu
r qeth qdio ccwgroup ext3 jbd mbcache dasd_eckd_mod dasd_mod dm_mirror dm_region
_hash dm_log dm_mod [last unloaded: scsi_wait_scan]
CPU: 3 Not tainted 2.6.32-202.el6.s390x #1
Process qeth_recover (pid: 1498, task: 000000003efe2040, ksp: 000000003d5e3b80)
Krnl PSW : 0404200180000000 000003c000be6da8 (qdio_int_handler+0x88/0x43c [qdio]
)
           R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0 EA:3
Krnl GPRS: ffffffffffff3bac 0000000000000005 0000000000000000 fffffffffffffff4
           0000000000000000 000000000000000c 0000000000000000 000000003ca97000
           0000000000000380 fffffffffffffff4 000000003f22d800 000000003f22c478
           000003c000bdf000 000003c000bea270 000000003f447e10 000000003f447db0
Krnl Code: 000003c000be6d9a: c21f00000004       clfi    %r1,4
           000003c000be6da0: a7c40021           brc     12,3c000be6de2
           000003c000be6da4: a7f40001           brc     15,3c000be6da6
          >000003c000be6da8: e320a0080004       lg      %r2,8(%r10)
           000003c000be6dae: a7390003           lghi    %r3,3
           000003c000be6db2: a72b0178           aghi    %r2,376
           000003c000be6db6: a7490001           lghi    %r4,1
           000003c000be6dba: a7590000           lghi    %r5,0
Call Trace:
([<000000000080ee80>] __per_cpu_offset+0x0/0x200)
[<00000000003d90e8>] ccw_device_call_handler+0x70/0xcc
[<00000000003d83a2>] ccw_device_irq+0x82/0x180
[<00000000003cc6a8>] do_IRQ+0x16c/0x1ec
[<0000000000118abe>] io_return+0x0/0x8
[<000003c000d04c74>] qeth_determine_capabilities+0x208/0x5cc [qeth]
([<000003c000d04c4a>] qeth_determine_capabilities+0x1de/0x5cc [qeth])
[<000003c000d0a6e0>] qeth_core_hardsetup_card+0x160/0x1258 [qeth]
[<000003c000f49f56>] __qeth_l3_set_online+0x132/0xb14 [qeth_l3]
[<000003c000f4ac70>] qeth_l3_recover+0x168/0x224 [qeth_l3]
[<000000000016e210>] kthread+0xa4/0xac
[<0000000000109c6e>] kernel_thread_starter+0x6/0xc
[<0000000000109c68>] kernel_thread_starter+0x0/0xc

The patch forbids start of a recovery once qeth shutdown is running.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---

 drivers/s390/net/qeth_l2_main.c |    1 +
 drivers/s390/net/qeth_l3_main.c |    1 +
 2 files changed, 2 insertions(+)

--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -1173,6 +1173,7 @@ static void __exit qeth_l2_exit(void)
 static void qeth_l2_shutdown(struct ccwgroup_device *gdev)
 {
 	struct qeth_card *card = dev_get_drvdata(&gdev->dev);
+	qeth_set_allowed_threads(card, 0, 1);
 	if ((gdev->state == CCWGROUP_ONLINE) && card->info.hwtrap)
 		qeth_hw_trap(card, QETH_DIAGS_TRAP_DISARM);
 	qeth_qdio_clear_card(card, 0);
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -3598,6 +3598,7 @@ static int qeth_l3_recover(void *ptr)
 static void qeth_l3_shutdown(struct ccwgroup_device *gdev)
 {
 	struct qeth_card *card = dev_get_drvdata(&gdev->dev);
+	qeth_set_allowed_threads(card, 0, 1);
 	if ((gdev->state == CCWGROUP_ONLINE) && card->info.hwtrap)
 		qeth_hw_trap(card, QETH_DIAGS_TRAP_DISARM);
 	qeth_qdio_clear_card(card, 0);

^ permalink raw reply

* [PATCH] net: have ipconfig not wait if no dev is available
From: Gerlando Falauto @ 2011-12-20  8:58 UTC (permalink / raw)
  Cc: Gerlando Falauto, Micha Nelissen, Holger Brunck, David S. Miller,
	Alexey Kuznetsov, Pekka Savola (ipv6), James Morris,
	Hideaki YOSHIFUJI, Patrick McHardy,
	open list:NETWORKING [IPv4/..., open list

previous commit 3fb72f1e6e6165c5f495e8dc11c5bbd14c73385c
makes IP-Config wait for carrier on at least one network device.

Before waiting (predefined value 120s), check that at least one device
was successfully brought up. Otherwise (e.g. buggy bootloader
which does not set the MAC address) there is no point in waiting
for carrier.

Cc: Micha Nelissen <micha@neli.hopto.org>
Cc: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
---
 net/ipv4/ipconfig.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index ab7e554..7fbcaba 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -252,6 +252,10 @@ static int __init ic_open_devs(void)
 		}
 	}
 
+	/* no point in waiting if we could not bring up at least one device */
+	if (!ic_first_dev)
+		goto have_carrier;
+
 	/* wait for a carrier on at least one device */
 	start = jiffies;
 	while (jiffies - start < msecs_to_jiffies(CONF_CARRIER_TIMEOUT)) {
-- 
1.7.1

^ permalink raw reply related

* [patch 06/10] [PATCH] qeth: suspicious rcu_dereference_check in recovery
From: frank.blaschka @ 2011-12-20  8:56 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Ursula Braun
In-Reply-To: <20111220085626.924756639@de.ibm.com>

[-- Attachment #1: 606-qeth-rtnl-lock.diff --]
[-- Type: text/plain, Size: 2297 bytes --]

From: Ursula Braun <ursula.braun@de.ibm.com>

qeth layer3 recovery invokes its set_multicast_list function, which
invokes function __vlan_find_dev_deep requiring rcu_read_lock or
rtnl lock. This causes kernel messages:

kernel: [ INFO: suspicious rcu_dereference_check() usage. ]
kernel: ---------------------------------------------------
kernel: net/8021q/vlan_core.c:70 invoked rcu_dereference_check() without protection!

kernel: stack backtrace:
kernel: CPU: 0 Not tainted 3.1.0 #9
kernel: Process qeth_recover (pid: 2078, task: 000000007e584680, ksp: 000000007e3e3930)
kernel: 000000007e3e3d08 000000007e3e3c88 0000000000000002 0000000000000000 
kernel:       000000007e3e3d28 000000007e3e3ca0 000000007e3e3ca0 00000000005e77ce 
kernel:       0000000000000000 0000000000000001 ffffffffffffffff 0000000000000001 
kernel:       000000000000000d 000000000000000c 000000007e3e3cf0 0000000000000000 
kernel:       0000000000000000 0000000000100a18 000000007e3e3c88 000000007e3e3cc8 
kernel: Call Trace:
kernel: ([<0000000000100926>] show_trace+0xee/0x144)
kernel: [<00000000005d395c>] __vlan_find_dev_deep+0xb0/0x108
kernel: [<00000000004acd3a>] qeth_l3_set_multicast_list+0x976/0xe38
kernel: [<00000000004ae0f4>] __qeth_l3_set_online+0x75c/0x1498
kernel: [<00000000004aefec>] qeth_l3_recover+0xc4/0x1d0
kernel: [<0000000000185372>] kthread+0xa6/0xb0
kernel: [<00000000005ed4c6>] kernel_thread_starter+0x6/0xc
kernel: [<00000000005ed4c0>] kernel_thread_starter+0x0/0xc

The patch makes sure the rtnl lock is held once qeth recovery invokes
its set_multicast_list function.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---

 drivers/s390/net/qeth_l3_main.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -3492,14 +3492,13 @@ contin:
 	else
 		netif_carrier_off(card->dev);
 	if (recover_flag == CARD_STATE_RECOVER) {
+		rtnl_lock();
 		if (recovery_mode)
 			__qeth_l3_open(card->dev);
-		else {
-			rtnl_lock();
+		else
 			dev_open(card->dev);
-			rtnl_unlock();
-		}
 		qeth_l3_set_multicast_list(card->dev);
+		rtnl_unlock();
 	}
 	/* let user_space know that device is online */
 	kobject_uevent(&gdev->dev.kobj, KOBJ_CHANGE);

^ permalink raw reply

* [patch 05/10] [PATCH] af_iucv: get rid of state IUCV_SEVERED
From: frank.blaschka @ 2011-12-20  8:56 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Ursula Braun
In-Reply-To: <20111220085626.924756639@de.ibm.com>

[-- Attachment #1: 605-af_iucv-rm-iucv-severed.diff --]
[-- Type: text/plain, Size: 3954 bytes --]

From: Ursula Braun <ursula.braun@de.ibm.com>

af_iucv differs unnecessarily between state IUCV_SEVERED and
IUCV_DISCONN. This patch removes state IUCV_SEVERED.
While simplifying af_iucv, this patch removes the 2nd invocation of
cpcmd as well.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---

 include/net/iucv/af_iucv.h |    1 -
 net/iucv/af_iucv.c         |   35 ++++++++---------------------------
 2 files changed, 8 insertions(+), 28 deletions(-)

--- a/include/net/iucv/af_iucv.h
+++ b/include/net/iucv/af_iucv.h
@@ -27,7 +27,6 @@ enum {
 	IUCV_OPEN,
 	IUCV_BOUND,
 	IUCV_LISTEN,
-	IUCV_SEVERED,
 	IUCV_DISCONN,
 	IUCV_CLOSING,
 	IUCV_CLOSED
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -178,7 +178,6 @@ static int afiucv_pm_freeze(struct devic
 		iucv_skb_queue_purge(&iucv->send_skb_q);
 		skb_queue_purge(&iucv->backlog_skb_q);
 		switch (sk->sk_state) {
-		case IUCV_SEVERED:
 		case IUCV_DISCONN:
 		case IUCV_CLOSING:
 		case IUCV_CONNECTED:
@@ -223,7 +222,6 @@ static int afiucv_pm_restore_thaw(struct
 			sk->sk_state_change(sk);
 			break;
 		case IUCV_DISCONN:
-		case IUCV_SEVERED:
 		case IUCV_CLOSING:
 		case IUCV_LISTEN:
 		case IUCV_BOUND:
@@ -661,16 +659,12 @@ struct sock *iucv_accept_dequeue(struct
 		}
 
 		if (sk->sk_state == IUCV_CONNECTED ||
-		    sk->sk_state == IUCV_SEVERED ||
-		    sk->sk_state == IUCV_DISCONN ||	/* due to PM restore */
+		    sk->sk_state == IUCV_DISCONN ||
 		    !newsock) {
 			iucv_accept_unlink(sk);
 			if (newsock)
 				sock_graft(sk, newsock);
 
-			if (sk->sk_state == IUCV_SEVERED)
-				sk->sk_state = IUCV_DISCONN;
-
 			release_sock(sk);
 			return sk;
 		}
@@ -760,16 +754,13 @@ done:
 static int iucv_sock_autobind(struct sock *sk)
 {
 	struct iucv_sock *iucv = iucv_sk(sk);
-	char query_buffer[80];
 	char name[12];
 	int err = 0;
 
-	/* Set the userid and name */
-	cpcmd("QUERY USERID", query_buffer, sizeof(query_buffer), &err);
-	if (unlikely(err))
+	if (unlikely(!pr_iucv))
 		return -EPROTO;
 
-	memcpy(iucv->src_user_id, query_buffer, 8);
+	memcpy(iucv->src_user_id, iucv_userid, 8);
 
 	write_lock_bh(&iucv_sk_list.lock);
 
@@ -1345,7 +1336,7 @@ static int iucv_sock_recvmsg(struct kioc
 	int blen;
 	int err = 0;
 
-	if ((sk->sk_state == IUCV_DISCONN || sk->sk_state == IUCV_SEVERED) &&
+	if ((sk->sk_state == IUCV_DISCONN) &&
 	    skb_queue_empty(&iucv->backlog_skb_q) &&
 	    skb_queue_empty(&sk->sk_receive_queue) &&
 	    list_empty(&iucv->message_q.list))
@@ -1492,7 +1483,7 @@ unsigned int iucv_sock_poll(struct file
 	if (sk->sk_state == IUCV_CLOSED)
 		mask |= POLLHUP;
 
-	if (sk->sk_state == IUCV_DISCONN || sk->sk_state == IUCV_SEVERED)
+	if (sk->sk_state == IUCV_DISCONN)
 		mask |= POLLIN;
 
 	if (sock_writeable(sk))
@@ -1519,7 +1510,6 @@ static int iucv_sock_shutdown(struct soc
 	switch (sk->sk_state) {
 	case IUCV_DISCONN:
 	case IUCV_CLOSING:
-	case IUCV_SEVERED:
 	case IUCV_CLOSED:
 		err = -ENOTCONN;
 		goto fail;
@@ -1874,10 +1864,7 @@ static void iucv_callback_connrej(struct
 {
 	struct sock *sk = path->private;
 
-	if (!list_empty(&iucv_sk(sk)->accept_q))
-		sk->sk_state = IUCV_SEVERED;
-	else
-		sk->sk_state = IUCV_DISCONN;
+	sk->sk_state = IUCV_DISCONN;
 
 	sk->sk_state_change(sk);
 }
@@ -2037,10 +2024,7 @@ static int afiucv_hs_callback_fin(struct
 	/* other end of connection closed */
 	if (iucv) {
 		bh_lock_sock(sk);
-		if (!list_empty(&iucv->accept_q))
-			sk->sk_state = IUCV_SEVERED;
-		else
-			sk->sk_state = IUCV_DISCONN;
+		sk->sk_state = IUCV_DISCONN;
 		sk->sk_state_change(sk);
 		bh_unlock_sock(sk);
 	}
@@ -2269,10 +2253,7 @@ static void afiucv_hs_callback_txnotify(
 				__skb_unlink(this, list);
 				dev_put(this->dev);
 				kfree_skb(this);
-				if (!list_empty(&iucv->accept_q))
-					sk->sk_state = IUCV_SEVERED;
-				else
-					sk->sk_state = IUCV_DISCONN;
+				sk->sk_state = IUCV_DISCONN;
 				sk->sk_state_change(sk);
 				break;
 			}

^ permalink raw reply

* [patch 10/10] [PATCH] qeth: recovery through asynchronous delivery
From: frank.blaschka @ 2011-12-20  8:56 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Einar Lueck, Ursula Braun
In-Reply-To: <20111220085626.924756639@de.ibm.com>

[-- Attachment #1: 611-qeth-async-recovery.diff --]
[-- Type: text/plain, Size: 4423 bytes --]

From: Einar Lueck <elelueck@de.ibm.com>

If recovery is triggered in presence of pending asynchronous
deliveries of storage blocks we do a forced cleanup after
the corresponding tasklets are completely stopped and trigger
appropriate notifications for the correspondingerror state.

Signed-off-by: Einar Lueck <elelueck@de.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---

 drivers/s390/net/qeth_core_main.c |   34 +++++++++++++++++++++++++++++-----
 drivers/s390/net/qeth_l3_main.c   |    5 +++++
 2 files changed, 34 insertions(+), 5 deletions(-)

--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -66,7 +66,7 @@ static void qeth_release_skbs(struct qet
 static void qeth_clear_output_buffer(struct qeth_qdio_out_q *queue,
 		struct qeth_qdio_out_buffer *buf,
 		enum qeth_qdio_buffer_states newbufstate);
-
+static int qeth_init_qdio_out_buf(struct qeth_qdio_out_q *, int);
 
 static inline const char *qeth_get_cardname(struct qeth_card *card)
 {
@@ -363,6 +363,9 @@ static inline enum iucv_tx_notify qeth_c
 static inline void qeth_cleanup_handled_pending(struct qeth_qdio_out_q *q,
 	int bidx, int forced_cleanup)
 {
+	if (q->card->options.cq != QETH_CQ_ENABLED)
+		return;
+
 	if (q->bufs[bidx]->next_pending != NULL) {
 		struct qeth_qdio_out_buffer *head = q->bufs[bidx];
 		struct qeth_qdio_out_buffer *c = q->bufs[bidx]->next_pending;
@@ -390,6 +393,13 @@ static inline void qeth_cleanup_handled_
 
 		}
 	}
+	if (forced_cleanup && (atomic_read(&(q->bufs[bidx]->state)) ==
+					QETH_QDIO_BUF_HANDLED_DELAYED)) {
+		/* for recovery situations */
+		q->bufs[bidx]->aob = q->bufstates[bidx].aob;
+		qeth_init_qdio_out_buf(q, bidx);
+		QETH_CARD_TEXT(q->card, 2, "clprecov");
+	}
 }
 
 
@@ -412,7 +422,6 @@ static inline void qeth_qdio_handle_aob(
 		notification = TX_NOTIFY_OK;
 	} else {
 		BUG_ON(atomic_read(&buffer->state) != QETH_QDIO_BUF_PENDING);
-
 		atomic_set(&buffer->state, QETH_QDIO_BUF_IN_CQ);
 		notification = TX_NOTIFY_DELAYED_OK;
 	}
@@ -425,7 +434,8 @@ static inline void qeth_qdio_handle_aob(
 
 	buffer->aob = NULL;
 	qeth_clear_output_buffer(buffer->q, buffer,
-				QETH_QDIO_BUF_HANDLED_DELAYED);
+				 QETH_QDIO_BUF_HANDLED_DELAYED);
+
 	/* from here on: do not touch buffer anymore */
 	qdio_release_aob(aob);
 }
@@ -1113,11 +1123,25 @@ out:
 static void qeth_release_skbs(struct qeth_qdio_out_buffer *buf)
 {
 	struct sk_buff *skb;
+	struct iucv_sock *iucv;
+	int notify_general_error = 0;
+
+	if (atomic_read(&buf->state) == QETH_QDIO_BUF_PENDING)
+		notify_general_error = 1;
+
+	/* release may never happen from within CQ tasklet scope */
+	BUG_ON(atomic_read(&buf->state) == QETH_QDIO_BUF_IN_CQ);
 
 	skb = skb_dequeue(&buf->skb_list);
 	while (skb) {
 		QETH_CARD_TEXT(buf->q->card, 5, "skbr");
 		QETH_CARD_TEXT_(buf->q->card, 5, "%lx", (long) skb);
+		if (notify_general_error && skb->protocol == ETH_P_AF_IUCV) {
+			if (skb->sk) {
+				iucv = iucv_sk(skb->sk);
+				iucv->sk_txnotify(skb, TX_NOTIFY_GENERALERROR);
+			}
+		}
 		atomic_dec(&skb->users);
 		dev_kfree_skb_any(skb);
 		skb = skb_dequeue(&buf->skb_list);
@@ -1160,7 +1184,7 @@ static void qeth_clear_outq_buffers(stru
 	for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j) {
 		if (!q->bufs[j])
 			continue;
-		qeth_cleanup_handled_pending(q, j, free);
+		qeth_cleanup_handled_pending(q, j, 1);
 		qeth_clear_output_buffer(q, q->bufs[j], QETH_QDIO_BUF_EMPTY);
 		if (free) {
 			kmem_cache_free(qeth_qdio_outbuf_cache, q->bufs[j]);
@@ -1207,7 +1231,7 @@ static void qeth_free_qdio_buffers(struc
 	qeth_free_cq(card);
 	cancel_delayed_work_sync(&card->buffer_reclaim_work);
 	for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j)
-		kfree_skb(card->qdio.in_q->bufs[j].rx_skb);
+		dev_kfree_skb_any(card->qdio.in_q->bufs[j].rx_skb);
 	kfree(card->qdio.in_q);
 	card->qdio.in_q = NULL;
 	/* inbound buffer pool */
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -3544,6 +3544,11 @@ static int __qeth_l3_set_offline(struct
 		card->info.hwtrap = 1;
 	}
 	qeth_l3_stop_card(card, recovery_mode);
+	if ((card->options.cq == QETH_CQ_ENABLED) && card->dev) {
+		rtnl_lock();
+		call_netdevice_notifiers(NETDEV_REBOOT, card->dev);
+		rtnl_unlock();
+	}
 	rc  = ccw_device_set_offline(CARD_DDEV(card));
 	rc2 = ccw_device_set_offline(CARD_WDEV(card));
 	rc3 = ccw_device_set_offline(CARD_RDEV(card));

^ permalink raw reply

* [patch 04/10] [PATCH] af_iucv: remove unused timer infrastructure
From: frank.blaschka @ 2011-12-20  8:56 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Ursula Braun
In-Reply-To: <20111220085626.924756639@de.ibm.com>

[-- Attachment #1: 604-af_iucv-rm-timer.diff --]
[-- Type: text/plain, Size: 1910 bytes --]

From: Ursula Braun <ursula.braun@de.ibm.com>

af_iucv contains timer infrastructure which is not exploited.
This patch removes the timer related code parts.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---

 include/net/iucv/af_iucv.h |    1 -
 net/iucv/af_iucv.c         |   22 ----------------------
 2 files changed, 23 deletions(-)

--- a/include/net/iucv/af_iucv.h
+++ b/include/net/iucv/af_iucv.h
@@ -146,7 +146,6 @@ unsigned int iucv_sock_poll(struct file
 			    poll_table *wait);
 void iucv_sock_link(struct iucv_sock_list *l, struct sock *s);
 void iucv_sock_unlink(struct iucv_sock_list *l, struct sock *s);
-int  iucv_sock_wait_cnt(struct sock *sk, unsigned long timeo);
 void iucv_accept_enqueue(struct sock *parent, struct sock *sk);
 void iucv_accept_unlink(struct sock *sk);
 struct sock *iucv_accept_dequeue(struct sock *parent, struct socket *newsock);
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -406,25 +406,6 @@ static int afiucv_hs_send(struct iucv_me
 	return err;
 }
 
-/* Timers */
-static void iucv_sock_timeout(unsigned long arg)
-{
-	struct sock *sk = (struct sock *)arg;
-
-	bh_lock_sock(sk);
-	sk->sk_err = ETIMEDOUT;
-	sk->sk_state_change(sk);
-	bh_unlock_sock(sk);
-
-	iucv_sock_kill(sk);
-	sock_put(sk);
-}
-
-static void iucv_sock_clear_timer(struct sock *sk)
-{
-	sk_stop_timer(sk, &sk->sk_timer);
-}
-
 static struct sock *__iucv_get_sock_by_name(char *nm)
 {
 	struct sock *sk;
@@ -477,7 +458,6 @@ static void iucv_sock_close(struct sock
 	int err, blen;
 	struct sk_buff *skb;
 
-	iucv_sock_clear_timer(sk);
 	lock_sock(sk);
 
 	switch (sk->sk_state) {
@@ -589,8 +569,6 @@ static struct sock *iucv_sock_alloc(stru
 	sk->sk_protocol = proto;
 	sk->sk_state	= IUCV_OPEN;
 
-	setup_timer(&sk->sk_timer, iucv_sock_timeout, (unsigned long)sk);
-
 	iucv_sock_link(&iucv_sk_list, sk);
 	return sk;
 }

^ permalink raw reply

* [patch 01/10] [PATCH] af_iucv: support ancillary data with HS transport
From: frank.blaschka @ 2011-12-20  8:56 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, Ursula Braun
In-Reply-To: <20111220085626.924756639@de.ibm.com>

[-- Attachment #1: 600-af_iucv-ancillary-hs.diff --]
[-- Type: text/plain, Size: 670 bytes --]

From: Ursula Braun <ursula.braun@de.ibm.com>

The AF_IUCV address family offers support for ancillary data.
This patch enables usage of ancillary data with the new
HiperSockets transport.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---

 net/iucv/af_iucv.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -2209,6 +2209,8 @@ static int afiucv_hs_rcv(struct sk_buff
 		break;
 	case 0:
 		/* plain data frame */
+		memcpy(CB_TRGCLS(skb), &trans_hdr->iucv_hdr.class,
+		       CB_TRGCLS_LEN);
 		err = afiucv_hs_callback_rx(sk, skb);
 		break;
 	default:

^ 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