Netdev List
 help / color / mirror / Atom feed
* [RFC][PATCH 1/2] TCP: fix lost retransmit detection
From: TAKANO Ryousei @ 2007-10-04  9:45 UTC (permalink / raw)
  To: netdev; +Cc: y-kodama

This patch allows to detect loss of retransmitted packets more
accurately by using the highest end sequence number among SACK 
blocks.  Before the retransmission queue is scanned, the highest
end sequence number (high_end_seq) is retrieved, and this value
is compared with the ack_seq of each packet.

Signed-off-by: Ryousei Takano <takano-ryousei@aist.go.jp>
Signed-off-by: Yuetsu Kodama <y-kodama@aist.go.jp>
---
 net/ipv4/tcp_input.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index bbad2cd..12db4b3 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -978,6 +978,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
 	int cached_fack_count;
 	int i;
 	int first_sack_index;
+	__u32 high_end_seq;
 
 	if (!tp->sacked_out)
 		tp->fackets_out = 0;
@@ -1012,6 +1013,14 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
 	if (before(TCP_SKB_CB(ack_skb)->ack_seq, prior_snd_una - tp->max_window))
 		return 0;
 
+	/* Retrieve the highest end_seq among SACK blocks. */
+	high_end_seq = ntohl(sp[0].end_seq);
+	for (i = 1; i < num_sacks; i++) {
+		__u32 end_seq = ntohl(sp[i].end_seq);
+		if (after(end_seq, high_end_seq))
+			high_end_seq = end_seq;
+	}
+
 	/* SACK fastpath:
 	 * if the only SACK change is the increase of the end_seq of
 	 * the first block then only apply that SACK block
@@ -1161,9 +1170,8 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
 			}
 
 			if ((sacked&TCPCB_SACKED_RETRANS) &&
-			    after(end_seq, TCP_SKB_CB(skb)->ack_seq) &&
-			    (!lost_retrans || after(end_seq, lost_retrans)))
-				lost_retrans = end_seq;
+			    after(high_end_seq, TCP_SKB_CB(skb)->ack_seq))
+				lost_retrans = high_end_seq;
 
 			if (!in_sack)
 				continue;
-- 
1.5.2.4


^ permalink raw reply related

* [RFC][PATCH 2.6.23-rc9 0/2] detection of loss of retransmitted packets
From: TAKANO Ryousei @ 2007-10-04  9:44 UTC (permalink / raw)
  To: netdev; +Cc: y-kodama

Hi all,

We found a performance problem which occurs in heavy packet loss
conditions. It seems there is a problem in detecting loss of 
retransmitted packets.

In the retransmission queue, status of sent packets are registered.
When a packet is retransmitted, it is so marked, and snd_nxt (sequence
number of the next new (non-retransmission) packet to be sent) at that
moment is registered as ack_seq. A retransmitted packet is lost if it 
is not SACKed, and its ack_seq is smaller than the sequence number of 
any SACKed packet.

An ACK packet can have up to three SACK blocks. A SACK block has a
"start sequence number (start_seq)" and an "end sequence number
(end_seq)" of received packets. In the current implementation of
tcp_sacktag_write_queue(), if an ACK packet has multiple SACK blocks,
the SACK blocks are sorted by the start_seq in an ascending order, and
processed in the order.  For scoreboarding packets in retransmission
queue, the queue is scanned from the the snd_una (the lowest sequence
number of not yet ACKed packets) to the end_seq of the SACK block. To
optimize the scanning process, the next SACK block is processed not
from the snd_una but from the end_seq of the previously processed SACK
block. In the current implementation, for detecting the loss of
retransmitted packets, the ack_seq of a retransmitted packet is
compared with the end_seq of each SACK block during the scoreboarding.
Therefore, a retransmitted packet which ack_seq is smaller than the
end_seq of the last SACK block but larger than that of the currently
being processed SACK block can not be detected as lost.
Such undetected loss may eventually cause an RTO and performance may 
be degraded.

PATCH #1 fixes this problem by comparing the the ack_seq with the
largest end_seq of the SACK blocks.

In addition, some of SACK blocks in an ACK packet may be already
reported in preceding ACK packets. PATCH #2 optimizes processing by
skipping such already reported SACK blocks. Usually, only the first
SACK block of an ACK packet is the new one to be processed. 
Therefore, in most cases, applying PATCH #2 also solves the problem. 
However, to ensure accurate processing in case there are multiple 
new SACK blocks in an ACK packet, PATCH #2 should be applied in 
conjunction with PATCH #1.

The experimental network is as follows:

Node A ----> Router -------> Delay -------> Node B
            (Policing rate:  emulator
   	     500Mbps)        (RTT: 20ms)

You can find the detail of our experimental setting at
http://projects.gtrc.aist.go.jp/gnet/sack-bug.html

We transferred 1 GByte of data from Node A to Node B for ten times. 
Here is the performance comparison of the cases with and without 
these patches.

	Ave. goodput	Ave. RTO
2.6.22	376 Mbps	26
PATCH#1	481 Mbps	0
PATCH#2	483 Mbps	0

In the vanilla kernel, several RTOs (TCPTimeouts + TCPSackRecoveryFail)
occur.  On the other hand, our patches eliminate RTOs and improve the
average goodput by 28%.

Any comments and ideas would be appreciated.

Regards,
Ryousei Takano

^ permalink raw reply

* [RFC][PATCH 2/2] TCP: skip processing cached SACK blocks
From: TAKANO Ryousei @ 2007-10-04  9:44 UTC (permalink / raw)
  To: netdev; +Cc: y-kodama

This patch allows to process only newly reported SACK blocks at the
sender side. An ACK packet contains up to three SACK blocks, and some
of them may be already reported and processed blocks.  This patch 
prevents processing of such already processed SACK blocks.

Signed-off-by: Ryousei Takano <takano-ryousei@aist.go.jp>
Signed-off-by: Yuetsu Kodama <y-kodama@aist.go.jp>
---
 net/ipv4/tcp_input.c |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index bbad2cd..9615fc9 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -978,6 +978,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
 	int cached_fack_count;
 	int i;
 	int first_sack_index;
+	u8 sack_block_skip[4] = {0,0,0,0};
 
 	if (!tp->sacked_out)
 		tp->fackets_out = 0;
@@ -1012,6 +1013,21 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
 	if (before(TCP_SKB_CB(ack_skb)->ack_seq, prior_snd_una - tp->max_window))
 		return 0;
 
+	/* Skip processing cached SACK blocks. */
+	for (i = 0; i < num_sacks; i++) {
+		__be32 start_seq = sp[i].start_seq;
+		__be32 end_seq = sp[i].end_seq;
+		int j;
+
+		for (j = 0; j < ARRAY_SIZE(tp->recv_sack_cache); j++) {
+			if ((tp->recv_sack_cache[j].start_seq == start_seq) &&
+			    (tp->recv_sack_cache[j].end_seq == end_seq)) {
+				sack_block_skip[i] = 1;
+				break;
+			}
+		}
+	}
+
 	/* SACK fastpath:
 	 * if the only SACK change is the increase of the end_seq of
 	 * the first block then only apply that SACK block
@@ -1051,11 +1067,16 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
 				if (after(ntohl(sp[j].start_seq),
 					  ntohl(sp[j+1].start_seq))){
 					struct tcp_sack_block_wire tmp;
+					u8 sbtmp;
 
 					tmp = sp[j];
 					sp[j] = sp[j+1];
 					sp[j+1] = tmp;
 
+					sbtmp = sack_block_skip[j];
+					sack_block_skip[j] = sack_block_skip[j+1];
+					sack_block_skip[j+1] = sbtmp;
+
 					/* Track where the first SACK block goes to */
 					if (j == first_sack_index)
 						first_sack_index = j+1;
@@ -1083,6 +1104,9 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
 		int fack_count;
 		int dup_sack = (found_dup_sack && (i == first_sack_index));
 
+		if (sack_block_skip[i])
+			continue;
+
 		skb = cached_skb;
 		fack_count = cached_fack_count;
 
-- 
1.5.2.4


^ permalink raw reply related

* [PATCH] mac80211: Fix TX after monitor interface is converted to managed
From: Daniel Drake @ 2007-10-04 11:33 UTC (permalink / raw)
  To: linville-2XuSBdqkA4R54TAoqtyWWQ
  Cc: johannes-cdvu00un1VgdHxzADdlk8Q, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

This sequence of events causes loss of connectivity:

<plug in>
<associate as normal in managed mode>
ifconfig eth7 down
iwconfig eth7 mode monitor
ifconfig eth7 up
ifconfig eth7 down
iwconfig eth7 mode managed
<associate as normal>

At this point you are associated but TX does not work. This is because
the eth7 hard_start_xmit is still ieee80211_monitor_start_xmit.

Fix this by unsetting the hard_start_xmit handler in ieee80211_if_reinit. It
will then be reinitialised to the default (ieee80211_subif_start_xmit) in
ieee80211_if_set_type.

Signed-off-by: Daniel Drake <dsd-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
---
 net/mac80211/ieee80211_iface.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/ieee80211_iface.c b/net/mac80211/ieee80211_iface.c
index 08c1e18..40d4b63 100644
--- a/net/mac80211/ieee80211_iface.c
+++ b/net/mac80211/ieee80211_iface.c
@@ -242,6 +242,9 @@ void ieee80211_if_reinit(struct net_device *dev)
 
 	ieee80211_if_sdata_deinit(sdata);
 
+	BUG_ON(netif_running(dev));
+	dev->hard_start_xmit = NULL;
+
 	switch (sdata->type) {
 	case IEEE80211_IF_TYPE_MGMT:
 		/* nothing to do */
-- 
1.5.3.3

^ permalink raw reply related

* Re: [PATCH 2/7] CAN: Add PF_CAN core module
From: Urs Thuermann @ 2007-10-04 11:51 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: netdev, David Miller, Patrick McHardy, Thomas Gleixner,
	Oliver Hartkopp, Oliver Hartkopp
In-Reply-To: <20071002143855.GG7881@ghostprotocols.net>

Arnaldo Carvalho de Melo <acme@ghostprotocols.net> writes:

> > +struct sockaddr_can {
> > +	sa_family_t can_family;
> > +	int         can_ifindex;
> > +	union {
> > +		struct { canid_t rx_id, tx_id; } tp16;
> > +		struct { canid_t rx_id, tx_id; } tp20;
> > +		struct { canid_t rx_id, tx_id; } mcnet;
> > +		struct { canid_t rx_id, tx_id; } isotp;
> > +	} can_addr;
> 
> Again being curious, what is the value of this union of all its members
> have the same definition? Backward source code compatibility?

As Oliver already wrote, different CAN transport protocols may use
different sockaddr structures.  Therefore, we have made can_addr a
union.  The four we have defined already, all look the same, but
other, future protocols may define a different structure.

> > +struct can_proto {
> > +	int              type;
> > +	int              protocol;
> > +	int              capability;
> > +	struct proto_ops *ops;
> > +	struct proto     *prot;
> > +};
> > +
> > +/* function prototypes for the CAN networklayer core (af_can.c) */
> > +
> > +extern int  can_proto_register(struct can_proto *cp);
> > +extern void can_proto_unregister(struct can_proto *cp);
> 
> We have proto registering infrastructure for bluetooth, inet and now
> CAN, have you looked at:
> 
> struct inet_protosw;
> proto_{register,unregister}, etc?

Yes, I know inet_protosw and inet_{,un}register_protosw().  But we
can't use inet_register_protosw().

And can_proto_register() does use proto_register().  What exactly do
you want to suggest?

urs

^ permalink raw reply

* Re: [PATCH 3/7] CAN: Add raw protocol
From: Urs Thuermann @ 2007-10-04 11:52 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: netdev, David Miller, Patrick McHardy, Thomas Gleixner,
	Oliver Hartkopp, Oliver Hartkopp
In-Reply-To: <20071002143001.GF7881@ghostprotocols.net>

Arnaldo Carvalho de Melo <acme@ghostprotocols.net> writes:

> > +static inline struct raw_sock *raw_sk(const struct sock *sk)
> > +{
> > +	return (struct raw_sock *)sk;
> > +}
> 
> 
> What if I want to do some kernel module that uses INET raw sockets
> (include/net/icmp.h) and CAN raw sockets? Namespace collision, could you
> please use can_raw_ for this namespace?

raw_sk is static so you can't use in another file where you include
include/net/icmp.h.  There is no collision.  Also, since it's inline
you won't even see it in a symbol table.

Hm, it's more than 10 years that I've tested ctags(1) and etags(1)
with several identical static names in different files and I don't
remember my results.  Do these tools have a problem with multiple
defs?  I think they shouldn't since C is explicitly designed for that.

> > +static unsigned int raw_poll(struct file *file, struct socket *sock,
> > +			     poll_table *wait)
> > +{
> > +	unsigned int mask = 0;
> > +
> > +	DBG("socket %p\n", sock);
> > +
> > +	mask = datagram_poll(file, sock, wait);
> > +	return mask;
> 
> What is the value of 'mask' here? Leftover from debugging?

Ah, yes.  We should remove it.

> > +static int raw_setsockopt(struct socket *sock, int level, int optname,
> > +			  char __user *optval, int optlen)
> > +{

> > +		lock_sock(sk);
> > +
> > +		if (ro->bound && ro->ifindex)
> > +			dev = dev_get_by_index(&init_net, ro->ifindex);
> 
> dev_get_by_index can fail, are you sure that raw_enable_filters can cope
> with this possibility?

When ro->ifindex != 0, the call to dev_get_by_index() shouldn't fail.
We also use lock_sock() here and in NETDEV_UNREGISTER, so there should
be no problem.


urs

^ permalink raw reply

* Re: [PATCH 5/7] CAN: Add virtual CAN netdevice driver
From: Urs Thuermann @ 2007-10-04 11:52 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: netdev, David Miller, Patrick McHardy, Thomas Gleixner,
	Oliver Hartkopp, Oliver Hartkopp
In-Reply-To: <20071002142016.GE7881@ghostprotocols.net>

Arnaldo Carvalho de Melo <acme@ghostprotocols.net> writes:

> > +#ifdef CONFIG_CAN_DEBUG_DEVICES
> > +static int debug;
> > +module_param(debug, int, S_IRUGO);
> > +#endif
> 
> Can debug be a boolean? Like its counterpart on DCCP:

debug used to a bit mask, like it still is in core.h.  You can see
this in the test

        debug & 1 ? ... : ...

below.  Only the test for bit 0 is left, so we could change it to bool.

> net/dccp/proto.c:
> 
> module_param(dccp_debug, bool, 0444);
> 
> Where we also use a namespace prefix, for those of us who use ctags or
> cscope.

I think ctags should be able to handle multiple identical static
symbols.  Isn't it?  I find it somewhat clumsy to write

        modprobe vcan vcan_debug=1

I think it would be nice to change the module_param() macro so that
you can name the module argument and the corresponding variable
independently, like

        module_param(can_debug, "debug", bool, 0444);

OK, forget that last paragraph.  I've looked at the definition of
module_param() and have seen that we have module_param_named().  I
think we should use that.

> > +
> > +/* To be moved to linux/can/dev.h */
> 
> Is this comment still valid? If so can this move happen now? If not I
> think it would be better to stick a "FIXME: " just before it, no?

OK.

> > +static int echo; /* echo testing. Default: 0 (Off) */
> > +module_param(echo, int, S_IRUGO);
> > +MODULE_PARM_DESC(echo, "Echo sent frames (for testing). Default: 0 (Off)");
> 
> echo also seems to be a boolean

ACK.

> > +static int vcan_open(struct net_device *dev)
> > +{
> > +	DBG("%s: interface up\n", dev->name);
> > +
> > +	netif_start_queue(dev);
> > +	return 0;
> > +}
> > +
> > +static int vcan_stop(struct net_device *dev)
> > +{
> > +	DBG("%s: interface down\n", dev->name);
> > +
> > +	netif_stop_queue(dev);
> > +	return 0;
> > +}
> 
> Thinking out loud: I guess these days we can try to reduce the clutter
> on the source code for things like "hey, I entered function foo" using
> simple systemtap scripts, that could even be shipped with the kernel
> sources. Not something pressing right now, just a suggestion.

I've never heard of systemtap before.  I've ust looked at its overview
web page which sounds promising.  I think I'll check it out when time
permits...


urs

^ permalink raw reply

* Re: [PATCH 2/7] CAN: Add PF_CAN core module
From: Arnaldo Carvalho de Melo @ 2007-10-04 13:40 UTC (permalink / raw)
  To: Urs Thuermann
  Cc: netdev, David Miller, Patrick McHardy, Thomas Gleixner,
	Oliver Hartkopp, Oliver Hartkopp
In-Reply-To: <ygfbqbf14j0.fsf@janus.isnogud.escape.de>

Em Thu, Oct 04, 2007 at 01:51:47PM +0200, Urs Thuermann escreveu:
> Arnaldo Carvalho de Melo <acme@ghostprotocols.net> writes:
> 
> > > +struct sockaddr_can {
> > > +	sa_family_t can_family;
> > > +	int         can_ifindex;
> > > +	union {
> > > +		struct { canid_t rx_id, tx_id; } tp16;
> > > +		struct { canid_t rx_id, tx_id; } tp20;
> > > +		struct { canid_t rx_id, tx_id; } mcnet;
> > > +		struct { canid_t rx_id, tx_id; } isotp;
> > > +	} can_addr;
> > 
> > Again being curious, what is the value of this union of all its members
> > have the same definition? Backward source code compatibility?
> 
> As Oliver already wrote, different CAN transport protocols may use
> different sockaddr structures.  Therefore, we have made can_addr a
> union.  The four we have defined already, all look the same, but
> other, future protocols may define a different structure.
> 
> > > +struct can_proto {
> > > +	int              type;
> > > +	int              protocol;
> > > +	int              capability;
> > > +	struct proto_ops *ops;
> > > +	struct proto     *prot;
> > > +};
> > > +
> > > +/* function prototypes for the CAN networklayer core (af_can.c) */
> > > +
> > > +extern int  can_proto_register(struct can_proto *cp);
> > > +extern void can_proto_unregister(struct can_proto *cp);
> > 
> > We have proto registering infrastructure for bluetooth, inet and now
> > CAN, have you looked at:
> > 
> > struct inet_protosw;
> > proto_{register,unregister}, etc?
> 
> Yes, I know inet_protosw and inet_{,un}register_protosw().  But we
> can't use inet_register_protosw().
> 
> And can_proto_register() does use proto_register().  What exactly do
> you want to suggest?

Sorry, I was in a hurry and didn't completed my thoughts on how to share
more code and data structures.

My first reaction was: hey, struct can_proto has almost the same
definition as struct inet_protosw, and can_proto_register() looks like
inet_register_protosw().

can_proto_register() calls proto_register, inet_register_protosw
doesn't. But protocols such as DCCP and SCTP, call both
inet_register_protosw and proto_register. Perhaps we can make
inet_register_protosw behave like can_proto_register and do the
proto_register(inet_protosw->prot) for us.

Looking at inet_init in net/ipv4/af_inet.c we see that we do the same
for udp, tcp and raw too. There we also call proto_register +
inet_register_protosw.

See the possibilites for code sharing? Having just one way of
registering protocols would reduce complexity for new protocol writers
and for people that browse the code only when trying to fix some problem
and don't want to get lost in many ways of doing the same thing.

struct can_proto could be removed and struct inet_protosw could be
renamed to reflect the fact that it is, after all, not inet specific at
all.

So this is not something to "fix" on your implementation. It looks OK.
But we could use more hands on reducing complexity on the Linux network
protocol infrastructure and you would get free fixes and improvements
when people improve the inet protocols 8)

DCCP has been collecting dividends for quite a while for working like
that 8)

- Arnaldo

^ permalink raw reply

* [PATCH][NETNS] Move some code into __init section when CONFIG_NET_NS=n
From: Pavel Emelyanov @ 2007-10-04 13:54 UTC (permalink / raw)
  To: David Miller; +Cc: Eric W. Biederman, Linux Netdev List, devel

With the net namespaces many code leaved the __init section,
thus making the kernel occupy more memory than it did before.
Since we have a config option that prohibits the namespace
creation, the functions that initialize/finalize some netns
stuff are simply not needed and can be freed after the boot.

Currently, this is almost not noticeable, since few calls
are no longer in __init, but when the namespaces will be
merged it will be possible to free more code. I propose to 
use the __net_init, __net_exit and __net_initdata "attributes"
for functions/variables that are not used if the CONFIG_NET_NS
is not set to save more space in memory.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

---

diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 934c840..747170f 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -99,6 +99,15 @@ static inline void release_net(struct ne
 #define for_each_net(VAR)				\
 	list_for_each_entry(VAR, &net_namespace_list, list)
 
+#ifdef CONFIG_NET_NS
+#define __net_init
+#define __net_exit
+#define __net_initdata
+#else
+#define __net_init	__init
+#define __net_exit	__exit
+#define __net_initdata	__initdata
+#endif
 
 struct pernet_operations {
 	struct list_head list;
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index d6997ae..be25aa3 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -250,7 +250,7 @@ static void loopback_setup(struct net_de
 }
 
 /* Setup and register the loopback device. */
-static int loopback_net_init(struct net *net)
+static __net_init int loopback_net_init(struct net *net)
 {
 	struct net_device *dev;
 	int err;
@@ -278,14 +278,14 @@ out_free_netdev:
 	goto out;
 }
 
-static void loopback_net_exit(struct net *net)
+static __net_exit void loopback_net_exit(struct net *net)
 {
 	struct net_device *dev = net->loopback_dev;
 
 	unregister_netdev(dev);
 }
 
-static struct pernet_operations loopback_net_ops = {
+static struct pernet_operations __net_initdata loopback_net_ops = {
        .init = loopback_net_init,
        .exit = loopback_net_exit,
 };
diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c
index 85cc8e8..2e91fb7 100644
--- a/fs/proc/proc_net.c
+++ b/fs/proc/proc_net.c
@@ -140,7 +140,7 @@ static struct inode_operations proc_net_
 	.setattr	= proc_net_setattr,
 };
 
-static int proc_net_ns_init(struct net *net)
+static __net_init int proc_net_ns_init(struct net *net)
 {
 	struct proc_dir_entry *root, *netd, *net_statd;
 	int err;
@@ -178,19 +178,19 @@ free_root:
 	goto out;
 }
 
-static void proc_net_ns_exit(struct net *net)
+static __net_exit void proc_net_ns_exit(struct net *net)
 {
 	remove_proc_entry("stat", net->proc_net);
 	remove_proc_entry("net", net->proc_net_root);
 	kfree(net->proc_net_root);
 }
 
-struct pernet_operations proc_net_ns_ops = {
+struct pernet_operations __net_initdata proc_net_ns_ops = {
 	.init = proc_net_ns_init,
 	.exit = proc_net_ns_exit,
 };
 
-int proc_net_init(void)
+int __init proc_net_init(void)
 {
 	proc_net_shadow = proc_mkdir("net", NULL);
 	proc_net_shadow->proc_iops = &proc_net_dir_inode_operations;
diff --git a/net/core/dev.c b/net/core/dev.c
index d998646..37f8858 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2611,7 +2611,7 @@ static const struct file_operations ptyp
 };
 
 
-static int dev_proc_net_init(struct net *net)
+static int __net_init dev_proc_net_init(struct net *net)
 {
 	int rc = -ENOMEM;
 
@@ -2636,7 +2636,7 @@ out_dev:
 	goto out;
 }
 
-static void dev_proc_net_exit(struct net *net)
+static void __net_exit dev_proc_net_exit(struct net *net)
 {
 	wext_proc_exit(net);
 
@@ -2645,7 +2645,7 @@ static void dev_proc_net_exit(struct net
 	proc_net_remove(net, "dev");
 }
 
-static struct pernet_operations dev_proc_ops = {
+static struct pernet_operations __net_initdata dev_proc_ops = {
 	.init = dev_proc_net_init,
 	.exit = dev_proc_net_exit,
 };
@@ -4250,7 +4250,7 @@ static struct hlist_head *netdev_create_
 }
 
 /* Initialize per network namespace state */
-static int netdev_init(struct net *net)
+static int __net_init netdev_init(struct net *net)
 {
 	INIT_LIST_HEAD(&net->dev_base_head);
 	rwlock_init(&dev_base_lock);
@@ -4271,18 +4271,18 @@ err_name:
 	return -ENOMEM;
 }
 
-static void netdev_exit(struct net *net)
+static void __net_exit netdev_exit(struct net *net)
 {
 	kfree(net->dev_name_head);
 	kfree(net->dev_index_head);
 }
 
-static struct pernet_operations netdev_net_ops = {
+static struct pernet_operations __net_initdata netdev_net_ops = {
 	.init = netdev_init,
 	.exit = netdev_exit,
 };
 
-static void default_device_exit(struct net *net)
+static void __net_exit default_device_exit(struct net *net)
 {
 	struct net_device *dev, *next;
 	/*
@@ -4308,7 +4308,7 @@ static void default_device_exit(struct n
 	rtnl_unlock();
 }
 
-static struct pernet_operations default_device_ops = {
+static struct pernet_operations __net_initdata default_device_ops = {
 	.exit = default_device_exit,
 };
 
diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c
index 896b0ca..15241cf 100644
--- a/net/core/dev_mcast.c
+++ b/net/core/dev_mcast.c
@@ -273,19 +273,19 @@ static const struct file_operations dev_
 
 #endif
 
-static int dev_mc_net_init(struct net *net)
+static int __net_init dev_mc_net_init(struct net *net)
 {
 	if (!proc_net_fops_create(net, "dev_mcast", 0, &dev_mc_seq_fops))
 		return -ENOMEM;
 	return 0;
 }
 
-static void dev_mc_net_exit(struct net *net)
+static void __net_exit dev_mc_net_exit(struct net *net)
 {
 	proc_net_remove(net, "dev_mcast");
 }
 
-static struct pernet_operations dev_mc_net_ops = {
+static struct pernet_operations __net_initdata dev_mc_net_ops = {
 	.init = dev_mc_net_init,
 	.exit = dev_mc_net_exit,
 };
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 46eb5ea..3ef3282 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1924,7 +1924,7 @@ static struct net_proto_family netlink_f
 	.owner	= THIS_MODULE,	/* for consistency 8) */
 };
 
-static int netlink_net_init(struct net *net)
+static int __net_init netlink_net_init(struct net *net)
 {
 #ifdef CONFIG_PROC_FS
 	if (!proc_net_fops_create(net, "netlink", 0, &netlink_seq_fops))
@@ -1933,14 +1933,14 @@ static int netlink_net_init(struct net *
 	return 0;
 }
 
-static void netlink_net_exit(struct net *net)
+static void __net_exit netlink_net_exit(struct net *net)
 {
 #ifdef CONFIG_PROC_FS
 	proc_net_remove(net, "netlink");
 #endif
 }
 
-static struct pernet_operations netlink_net_ops = {
+static struct pernet_operations __net_initdata netlink_net_ops = {
 	.init = netlink_net_init,
 	.exit = netlink_net_exit,
 };

^ permalink raw reply related

* Re: [Devel] [PATCH][NETNS] Move some code into __init section when CONFIG_NET_NS=n
From: Alexey Dobriyan @ 2007-10-04 14:02 UTC (permalink / raw)
  To: Pavel Emelyanov; +Cc: David Miller, Linux Netdev List, devel
In-Reply-To: <4704F083.7090203@openvz.org>

On Thu, Oct 04, 2007 at 05:54:11PM +0400, Pavel Emelyanov wrote:
> With the net namespaces many code leaved the __init section,
> thus making the kernel occupy more memory than it did before.
> Since we have a config option that prohibits the namespace
> creation, the functions that initialize/finalize some netns
> stuff are simply not needed and can be freed after the boot.
> 
> Currently, this is almost not noticeable, since few calls
> are no longer in __init, but when the namespaces will be
> merged it will be possible to free more code. I propose to 
> use the __net_init, __net_exit and __net_initdata "attributes"
> for functions/variables that are not used if the CONFIG_NET_NS
> is not set to save more space in memory.

> +#ifdef CONFIG_NET_NS
> +#define __net_init
> +#define __net_exit
> +#define __net_initdata
> +#else
> +#define __net_init	__init
> +#define __net_exit	__exit
> +#define __net_initdata	__initdata
> +#endif

Yet another set of double-underscored section annotations is the last thing
that is needed, methinks. :)


^ permalink raw reply

* Re: Blackfin Ethernet MAC driver compile error
From: Kalle Pokki @ 2007-10-04 14:26 UTC (permalink / raw)
  To: bryan.wu; +Cc: linux-kernel, netdev
In-Reply-To: <1191489141.6139.1.camel@roc-laptop>

On 10/4/07, Bryan Wu <bryan.wu@analog.com> wrote:
> Sorry for missing the pinmux patches.
> After Linus's git-pull, it should be fixed in the latest Linus mainline
> git tree.

Thanks, it is working now. I was also glad to see the binfmt_flat
patch going in.

Do you plan to get the PHY abstraction layer patches for the Blackfin
EMAC included in the upcoming merge window?

^ permalink raw reply

* Re: [PATCH] mac80211: Fix TX after monitor interface is converted to managed
From: Michael Wu @ 2007-10-04 14:34 UTC (permalink / raw)
  To: Daniel Drake; +Cc: linville, johannes, netdev, linux-wireless
In-Reply-To: <20071004113343.552139D502B@zog.reactivated.net>

[-- Attachment #1: Type: text/plain, Size: 431 bytes --]

On Thursday 04 October 2007 07:33, Daniel Drake wrote:
> Fix this by unsetting the hard_start_xmit handler in ieee80211_if_reinit.
> It will then be reinitialised to the default (ieee80211_subif_start_xmit)
> in ieee80211_if_set_type.
>
Well.. this kinda sucks, but we can clean up the logic here later.

> +	BUG_ON(netif_running(dev));
This will never happen, so there's no point.

ACK with that bit removed.

Thanks,
-Michael Wu

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* [patch 0/2] [AF_IUCV] fixes for net-2.6.24
From: Ursula Braun @ 2007-10-04 14:46 UTC (permalink / raw)
  To: davem, netdev, linux-s390; +Cc: heiko.carstens

-- 
Dave,

the following 2 patches are intended for 2.6.24 and contain:
- removal of static declarations in af_iucv header file
- postpone receival of inbound packets in af_iucv

^ permalink raw reply

* [patch 1/2] af_iucv: remove static declarations from header file.
From: Ursula Braun @ 2007-10-04 14:46 UTC (permalink / raw)
  To: davem, netdev, linux-s390; +Cc: heiko.carstens
In-Reply-To: <20071004144608.880229000@linux.vnet.ibm.com>

[-- Attachment #1: 711-afiucv-statics.diff --]
[-- Type: text/plain, Size: 2543 bytes --]

From: Heiko Carstens <heiko.carstens@de.ibm.com>

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
---

 include/net/iucv/af_iucv.h |   21 ---------------------
 net/iucv/af_iucv.c         |    3 +++
 2 files changed, 3 insertions(+), 21 deletions(-)

Index: net-2.6-uschi/include/net/iucv/af_iucv.h
===================================================================
--- net-2.6-uschi.orig/include/net/iucv/af_iucv.h
+++ net-2.6-uschi/include/net/iucv/af_iucv.h
@@ -73,29 +73,8 @@ struct iucv_sock_list {
 	atomic_t	  autobind_name;
 };
 
-static void iucv_sock_destruct(struct sock *sk);
-static void iucv_sock_cleanup_listen(struct sock *parent);
-static void iucv_sock_kill(struct sock *sk);
-static void iucv_sock_close(struct sock *sk);
-static int  iucv_sock_create(struct socket *sock, int proto);
-static int  iucv_sock_bind(struct socket *sock, struct sockaddr *addr,
-			int addr_len);
-static int  iucv_sock_connect(struct socket *sock, struct sockaddr *addr,
-			      int alen, int flags);
-static int  iucv_sock_listen(struct socket *sock, int backlog);
-static int  iucv_sock_accept(struct socket *sock, struct socket *newsock,
-			     int flags);
-static int  iucv_sock_getname(struct socket *sock, struct sockaddr *addr,
-			      int *len, int peer);
-static int  iucv_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
-			      struct msghdr *msg, size_t len);
-static int  iucv_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
-			      struct msghdr *msg, size_t len, int flags);
 unsigned int iucv_sock_poll(struct file *file, struct socket *sock,
 			    poll_table *wait);
-static int iucv_sock_release(struct socket *sock);
-static int iucv_sock_shutdown(struct socket *sock, int how);
-
 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_state(struct sock *sk, int state, int state2,
Index: net-2.6-uschi/net/iucv/af_iucv.c
===================================================================
--- net-2.6-uschi.orig/net/iucv/af_iucv.c
+++ net-2.6-uschi/net/iucv/af_iucv.c
@@ -41,6 +41,9 @@ static struct proto iucv_proto = {
 	.obj_size	= sizeof(struct iucv_sock),
 };
 
+static void iucv_sock_kill(struct sock *sk);
+static void iucv_sock_close(struct sock *sk);
+
 /* Call Back functions */
 static void iucv_callback_rx(struct iucv_path *, struct iucv_message *);
 static void iucv_callback_txdone(struct iucv_path *, struct iucv_message *);

-- 

^ permalink raw reply

* [patch 2/2] af_iucv: postpone receival of iucv-packets
From: Ursula Braun @ 2007-10-04 14:46 UTC (permalink / raw)
  To: davem, netdev, linux-s390; +Cc: heiko.carstens
In-Reply-To: <20071004144608.880229000@linux.vnet.ibm.com>

[-- Attachment #1: 712-afiucv-throttle.diff --]
[-- Type: text/plain, Size: 8576 bytes --]

From: Ursula Braun <braunu@de.ibm.com>

AF_IUCV socket programs may waste Linux storage, because af_iucv
allocates an skb whenever posted by the receive callback routine and
receives the message immediately. 
Message receival is now postponed if data from previous callbacks has 
not yet been transferred to the receiving socket program. Instead a 
message handle is saved in a message queue as a reminder. Once 
messages could be given to the receiving socket program, there is 
an additional checking for entries in the message queue, followed
by skb allocation and message receival if applicable.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
---

 include/net/iucv/af_iucv.h |    7 +
 net/iucv/af_iucv.c         |  215 ++++++++++++++++++++++++++-------------------
 2 files changed, 134 insertions(+), 88 deletions(-)

Index: net-2.6-uschi/include/net/iucv/af_iucv.h
===================================================================
--- net-2.6-uschi.orig/include/net/iucv/af_iucv.h
+++ net-2.6-uschi/include/net/iucv/af_iucv.h
@@ -50,6 +50,12 @@ struct sockaddr_iucv {
 
 
 /* Common socket structures and functions */
+struct sock_msg_q {
+	struct iucv_path	*path;
+	struct iucv_message	msg;
+	struct list_head	list;
+	spinlock_t		lock;
+};
 
 #define iucv_sk(__sk) ((struct iucv_sock *) __sk)
 
@@ -64,6 +70,7 @@ struct iucv_sock {
 	struct iucv_path	*path;
 	struct sk_buff_head	send_skb_q;
 	struct sk_buff_head	backlog_skb_q;
+	struct sock_msg_q	message_q;
 	unsigned int		send_tag;
 };
 
Index: net-2.6-uschi/net/iucv/af_iucv.c
===================================================================
--- net-2.6-uschi.orig/net/iucv/af_iucv.c
+++ net-2.6-uschi/net/iucv/af_iucv.c
@@ -223,6 +223,8 @@ static struct sock *iucv_sock_alloc(stru
 	sock_init_data(sock, sk);
 	INIT_LIST_HEAD(&iucv_sk(sk)->accept_q);
 	skb_queue_head_init(&iucv_sk(sk)->send_skb_q);
+	INIT_LIST_HEAD(&iucv_sk(sk)->message_q.list);
+	spin_lock_init(&iucv_sk(sk)->message_q.lock);
 	skb_queue_head_init(&iucv_sk(sk)->backlog_skb_q);
 	iucv_sk(sk)->send_tag = 0;
 
@@ -662,6 +664,90 @@ out:
 	return err;
 }
 
+static int iucv_fragment_skb(struct sock *sk, struct sk_buff *skb, int len)
+{
+	int dataleft, size, copied = 0;
+	struct sk_buff *nskb;
+
+	dataleft = len;
+	while (dataleft) {
+		if (dataleft >= sk->sk_rcvbuf / 4)
+			size = sk->sk_rcvbuf / 4;
+		else
+			size = dataleft;
+
+		nskb = alloc_skb(size, GFP_ATOMIC | GFP_DMA);
+		if (!nskb)
+			return -ENOMEM;
+
+		memcpy(nskb->data, skb->data + copied, size);
+		copied += size;
+		dataleft -= size;
+
+		skb_reset_transport_header(nskb);
+		skb_reset_network_header(nskb);
+		nskb->len = size;
+
+		skb_queue_tail(&iucv_sk(sk)->backlog_skb_q, nskb);
+	}
+
+	return 0;
+}
+
+static void iucv_process_message(struct sock *sk, struct sk_buff *skb,
+				 struct iucv_path *path,
+				 struct iucv_message *msg)
+{
+	int rc;
+
+	if (msg->flags & IPRMDATA) {
+		skb->data = NULL;
+		skb->len = 0;
+	} else {
+		rc = iucv_message_receive(path, msg, 0, skb->data,
+					  msg->length, NULL);
+		if (rc) {
+			kfree_skb(skb);
+			return;
+		}
+		if (skb->truesize >= sk->sk_rcvbuf / 4) {
+			rc = iucv_fragment_skb(sk, skb, msg->length);
+			kfree_skb(skb);
+			skb = NULL;
+			if (rc) {
+				iucv_path_sever(path, NULL);
+				return;
+			}
+			skb = skb_dequeue(&iucv_sk(sk)->backlog_skb_q);
+		} else {
+			skb_reset_transport_header(skb);
+			skb_reset_network_header(skb);
+			skb->len = msg->length;
+		}
+	}
+
+	if (sock_queue_rcv_skb(sk, skb))
+		skb_queue_head(&iucv_sk(sk)->backlog_skb_q, skb);
+}
+
+static void iucv_process_message_q(struct sock *sk)
+{
+	struct iucv_sock *iucv = iucv_sk(sk);
+	struct sk_buff *skb;
+	struct sock_msg_q *p, *n;
+
+	list_for_each_entry_safe(p, n, &iucv->message_q.list, list) {
+		skb = alloc_skb(p->msg.length, GFP_ATOMIC | GFP_DMA);
+		if (!skb)
+			break;
+		iucv_process_message(sk, skb, p->path, &p->msg);
+		list_del(&p->list);
+		kfree(p);
+		if (!skb_queue_empty(&iucv->backlog_skb_q))
+			break;
+	}
+}
+
 static int iucv_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
 			     struct msghdr *msg, size_t len, int flags)
 {
@@ -673,8 +759,9 @@ static int iucv_sock_recvmsg(struct kioc
 	int err = 0;
 
 	if ((sk->sk_state == IUCV_DISCONN || sk->sk_state == IUCV_SEVERED) &&
-		skb_queue_empty(&iucv->backlog_skb_q) &&
-		skb_queue_empty(&sk->sk_receive_queue))
+	    skb_queue_empty(&iucv->backlog_skb_q) &&
+	    skb_queue_empty(&sk->sk_receive_queue) &&
+	    list_empty(&iucv->message_q.list))
 		return 0;
 
 	if (flags & (MSG_OOB))
@@ -713,16 +800,23 @@ static int iucv_sock_recvmsg(struct kioc
 		kfree_skb(skb);
 
 		/* Queue backlog skbs */
-		rskb = skb_dequeue(&iucv_sk(sk)->backlog_skb_q);
+		rskb = skb_dequeue(&iucv->backlog_skb_q);
 		while (rskb) {
 			if (sock_queue_rcv_skb(sk, rskb)) {
-				skb_queue_head(&iucv_sk(sk)->backlog_skb_q,
+				skb_queue_head(&iucv->backlog_skb_q,
 						rskb);
 				break;
 			} else {
-				rskb = skb_dequeue(&iucv_sk(sk)->backlog_skb_q);
+				rskb = skb_dequeue(&iucv->backlog_skb_q);
 			}
 		}
+		if (skb_queue_empty(&iucv->backlog_skb_q)) {
+			spin_lock_bh(&iucv->message_q.lock);
+			if (!list_empty(&iucv->message_q.list))
+				iucv_process_message_q(sk);
+			spin_unlock_bh(&iucv->message_q.lock);
+		}
+
 	} else
 		skb_queue_head(&sk->sk_receive_queue, skb);
 
@@ -963,99 +1057,44 @@ static void iucv_callback_connack(struct
 	sk->sk_state_change(sk);
 }
 
-static int iucv_fragment_skb(struct sock *sk, struct sk_buff *skb, int len,
-			     struct sk_buff_head *fragmented_skb_q)
-{
-	int dataleft, size, copied = 0;
-	struct sk_buff *nskb;
-
-	dataleft = len;
-	while (dataleft) {
-		if (dataleft >= sk->sk_rcvbuf / 4)
-			size = sk->sk_rcvbuf / 4;
-		else
-			size = dataleft;
-
-		nskb = alloc_skb(size, GFP_ATOMIC | GFP_DMA);
-		if (!nskb)
-			return -ENOMEM;
-
-		memcpy(nskb->data, skb->data + copied, size);
-		copied += size;
-		dataleft -= size;
-
-		skb_reset_transport_header(nskb);
-		skb_reset_network_header(nskb);
-		nskb->len = size;
-
-		skb_queue_tail(fragmented_skb_q, nskb);
-	}
-
-	return 0;
-}
-
 static void iucv_callback_rx(struct iucv_path *path, struct iucv_message *msg)
 {
 	struct sock *sk = path->private;
 	struct iucv_sock *iucv = iucv_sk(sk);
-	struct sk_buff *skb, *fskb;
-	struct sk_buff_head fragmented_skb_q;
-	int rc;
-
-	skb_queue_head_init(&fragmented_skb_q);
+	struct sk_buff *skb;
+	struct sock_msg_q *save_msg;
+	int len;
 
 	if (sk->sk_shutdown & RCV_SHUTDOWN)
 		return;
 
-	skb = alloc_skb(msg->length, GFP_ATOMIC | GFP_DMA);
-	if (!skb) {
-		iucv_path_sever(path, NULL);
-		return;
-	}
+	if (!list_empty(&iucv->message_q.list) ||
+	    !skb_queue_empty(&iucv->backlog_skb_q))
+		goto save_message;
+
+	len = atomic_read(&sk->sk_rmem_alloc);
+	len += msg->length + sizeof(struct sk_buff);
+	if (len > sk->sk_rcvbuf)
+		goto save_message;
 
-	if (msg->flags & IPRMDATA) {
-		skb->data = NULL;
-		skb->len = 0;
-	} else {
-		rc = iucv_message_receive(path, msg, 0, skb->data,
-					  msg->length, NULL);
-		if (rc) {
-			kfree_skb(skb);
-			return;
-		}
-		if (skb->truesize >= sk->sk_rcvbuf / 4) {
-			rc = iucv_fragment_skb(sk, skb, msg->length,
-					       &fragmented_skb_q);
-			kfree_skb(skb);
-			skb = NULL;
-			if (rc) {
-				iucv_path_sever(path, NULL);
-				return;
-			}
-		} else {
-			skb_reset_transport_header(skb);
-			skb_reset_network_header(skb);
-			skb->len = msg->length;
-		}
-	}
-	/* Queue the fragmented skb */
-	fskb = skb_dequeue(&fragmented_skb_q);
-	while (fskb) {
-		if (!skb_queue_empty(&iucv->backlog_skb_q))
-			skb_queue_tail(&iucv->backlog_skb_q, fskb);
-		else if (sock_queue_rcv_skb(sk, fskb))
-			skb_queue_tail(&iucv_sk(sk)->backlog_skb_q, fskb);
-		fskb = skb_dequeue(&fragmented_skb_q);
-	}
-
-	/* Queue the original skb if it exists (was not fragmented) */
-	if (skb) {
-		if (!skb_queue_empty(&iucv->backlog_skb_q))
-			skb_queue_tail(&iucv_sk(sk)->backlog_skb_q, skb);
-		else if (sock_queue_rcv_skb(sk, skb))
-			skb_queue_tail(&iucv_sk(sk)->backlog_skb_q, skb);
-	}
+	skb = alloc_skb(msg->length, GFP_ATOMIC | GFP_DMA);
+	if (!skb)
+		goto save_message;
 
+	spin_lock(&iucv->message_q.lock);
+	iucv_process_message(sk, skb, path, msg);
+	spin_unlock(&iucv->message_q.lock);
+
+	return;
+
+save_message:
+	save_msg = kzalloc(sizeof(struct sock_msg_q), GFP_ATOMIC | GFP_DMA);
+	save_msg->path = path;
+	save_msg->msg = *msg;
+
+	spin_lock(&iucv->message_q.lock);
+	list_add_tail(&save_msg->list, &iucv->message_q.list);
+	spin_unlock(&iucv->message_q.lock);
 }
 
 static void iucv_callback_txdone(struct iucv_path *path,

-- 

^ permalink raw reply

* Re: [PATCH net-2.6.24 0/3]: More TCP fixes
From: Cedric Le Goater @ 2007-10-04 14:53 UTC (permalink / raw)
  To: Ilpo Järvinen; +Cc: David Miller, Netdev
In-Reply-To: <Pine.LNX.4.64.0710031817540.27745@kivilampi-30.cs.helsinki.fi>

Ilpo Järvinen wrote:
> On Wed, 3 Oct 2007, Cedric Le Goater wrote:
> 
>> Cedric Le Goater wrote:
>>> Below are the messages I got on 2) right after running ketchup (which does 
>>> a wget www.kernel.org) 
> 
> Oops, those tcp_fragment WARNINGs in the other mail were due to bug in 
> the debug patch as it called verify too early in there (before queue was 
> adjusted, no wonder it finds state inconsistent at that point, fixed that)...
> 
> ...So please discard all old debug patches, they're all broken in this 
> respect... :-(
> 
>>> not a warning on 1) with your extra verbose patch.
>> bummer, I got this one on 1) :(
>>
>> WARNING: at /home/legoater/linux/net-2.6.24.git/net/ipv4/tcp_input.c:2325 tcp_fastretrans_alert()
>> Call Trace:
>>  <IRQ>  [<ffffffff8022ddb6>] __wake_up+0x1f/0x4c
>>  [<ffffffff803fd9d3>] tcp_ack+0xcee/0x18ac
>>  [<ffffffff80400764>] tcp_rcv_established+0x61f/0x6df
> 
> ...I just wonder why that's the first place where it occurs... Can you try 
> the debug patch below (fixed verify place in tcp_fragment/collapse, added 
> some of them to narrow it down, and handled GSO more user friendly way in 
> the printout). Put it on top of those three patches (mm should be fine :-)).
> ...I wish the verify triggers way before the fastretrans trap (for some 
> reason it didn't do that in the quoted trace, maybe I had some verifys 
> missing in that old patch or something)...

so here are the results on a net-2.6.24 kernel. 

I've put the patchset here to make sure it's correct: 

	http://legoater.free.fr/patches/2.6.23/net-2.6.24.git-tcp_fastretrans/

and plenty of logs :

	http://legoater.free.fr/patches/2.6.23/net-2.6.24.git-tcp_fastretrans.messages

FYI, config is here :

	http://legoater.free.fr/patches/2.6.23/net-2.6.24.git-tcp_fastretrans.config

C.

^ permalink raw reply

* Re: [patch 3/3] git-net: sctp build fix (not for applying)
From: Vlad Yasevich @ 2007-10-04 15:02 UTC (permalink / raw)
  To: David Miller; +Cc: akpm, netdev
In-Reply-To: <20071003.164542.107940171.davem@davemloft.net>

David Miller wrote:
> From: Vlad Yasevich <vladislav.yasevich@hp.com>
> Date: Wed, 03 Oct 2007 09:50:55 -0400
> 
>> akpm@linux-foundation.org wrote:
>>> From: Andrew Morton <akpm@linux-foundation.org>
>>>
>>> net/sctp/sm_statetable.c:551: error: 'sctp_sf_tabort_8_4_8' undeclared here (not in a function)
>>>
>> Andrew, is the a result of the merge of net-2.6.24 with net-2.6?  
> 
> Actually, it is a result of merging with Linus's tree since your SCTP
> bits were there already, that's why Andrew hit this.
> 
>> That's the only way I see this happening.
> 
> Right.
> 
> I'll resolve this cleanly as I rebase net-2.6.24 today.

OK.  Thanks David.

-vlad

^ permalink raw reply

* Re: [PATCH] mac80211: Fix TX after monitor interface is converted to managed
From: Michael Buesch @ 2007-10-04 15:06 UTC (permalink / raw)
  To: Michael Wu; +Cc: Daniel Drake, linville, johannes, netdev, linux-wireless
In-Reply-To: <200710041034.48533.flamingice@sourmilk.net>

On Thursday 04 October 2007 16:34:43 Michael Wu wrote:
> On Thursday 04 October 2007 07:33, Daniel Drake wrote:
> > Fix this by unsetting the hard_start_xmit handler in ieee80211_if_reinit.
> > It will then be reinitialised to the default (ieee80211_subif_start_xmit)
> > in ieee80211_if_set_type.
> >
> Well.. this kinda sucks, but we can clean up the logic here later.
> 
> > +	BUG_ON(netif_running(dev));
> This will never happen, so there's no point.

The reason why BUG_ON exists is to catch bugs that happen, although
they Should Never Happen (tm) ;)

-- 
Greetings Michael.

^ permalink raw reply

* Re: [PATCH] mac80211: Fix TX after monitor interface is converted to managed
From: Michael Wu @ 2007-10-04 15:14 UTC (permalink / raw)
  To: Michael Buesch
  Cc: Daniel Drake, linville-2XuSBdqkA4R54TAoqtyWWQ,
	johannes-cdvu00un1VgdHxzADdlk8Q, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <200710041706.06182.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 548 bytes --]

On Thursday 04 October 2007 11:06, Michael Buesch wrote:
> The reason why BUG_ON exists is to catch bugs that happen, although
> they Should Never Happen (tm) ;)
This is just paranoia. There's plenty of other BUG_ONs which we use to catch 
bugs caused by drivers doing silly things. We can verify that this condition 
will never occur within the mac80211 layer, so there's no need to have it. 
The only thing this can catch is someone deciding to manually invoke 
dev->uninit, which only the unregister code should be doing.

-Michael Wu

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: [PATCH] mac80211: Fix TX after monitor interface is converted to managed
From: John W. Linville @ 2007-10-04 15:19 UTC (permalink / raw)
  To: Michael Buesch; +Cc: Michael Wu, Daniel Drake, johannes, netdev, linux-wireless
In-Reply-To: <200710041706.06182.mb@bu3sch.de>

On Thu, Oct 04, 2007 at 05:06:05PM +0200, Michael Buesch wrote:
> On Thursday 04 October 2007 16:34:43 Michael Wu wrote:
> > On Thursday 04 October 2007 07:33, Daniel Drake wrote:
> > > Fix this by unsetting the hard_start_xmit handler in ieee80211_if_reinit.
> > > It will then be reinitialised to the default (ieee80211_subif_start_xmit)
> > > in ieee80211_if_set_type.
> > >
> > Well.. this kinda sucks, but we can clean up the logic here later.
> > 
> > > +	BUG_ON(netif_running(dev));
> > This will never happen, so there's no point.
> 
> The reason why BUG_ON exists is to catch bugs that happen, although
> they Should Never Happen (tm) ;)

Precisely.

-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply

* Re: [PATCH] mac80211: Fix TX after monitor interface is converted to managed
From: Stephen Hemminger @ 2007-10-04 15:54 UTC (permalink / raw)
  To: Daniel Drake; +Cc: linville, johannes, netdev, linux-wireless
In-Reply-To: <20071004113343.552139D502B@zog.reactivated.net>

On Thu,  4 Oct 2007 12:33:43 +0100 (BST)
Daniel Drake <dsd@gentoo.org> wrote:

> This sequence of events causes loss of connectivity:
> 
> <plug in>
> <associate as normal in managed mode>
> ifconfig eth7 down
> iwconfig eth7 mode monitor
> ifconfig eth7 up
> ifconfig eth7 down
> iwconfig eth7 mode managed
> <associate as normal>
> 
> At this point you are associated but TX does not work. This is because
> the eth7 hard_start_xmit is still ieee80211_monitor_start_xmit.
> 
> Fix this by unsetting the hard_start_xmit handler in ieee80211_if_reinit. It
> will then be reinitialised to the default (ieee80211_subif_start_xmit) in
> ieee80211_if_set_type.
> 
> Signed-off-by: Daniel Drake <dsd@gentoo.org>

Playing with the function pointer is a awkward way to do this.  Shouldn't
the state management flags be used instead (dormant, running, stop/wake)...
I am concerned about races and dereferencing the NULL ptr.

-- 
Stephen Hemminger <shemminger@linux-foundation.org>

^ permalink raw reply

* Re: Blackfin Ethernet MAC driver compile error
From: Bryan Wu @ 2007-10-04 16:31 UTC (permalink / raw)
  To: Kalle Pokki; +Cc: bryan.wu, linux-kernel, netdev
In-Reply-To: <a425f86c0710040726q27aeb354vbbcb68bd2fed2b76@mail.gmail.com>

On Thu, 2007-10-04 at 22:26 +0800, Kalle Pokki wrote:
> On 10/4/07, Bryan Wu <bryan.wu@analog.com> wrote: 
> > Sorry for missing the pinmux patches. 
> > After Linus's git-pull, it should be fixed in the latest Linus
> mainline 
> > git tree.
> 
> Thanks, it is working now. I was also glad to see the binfmt_flat 
> patch going in.

Yeah, thanks Linus to accept the patches 
> 
> Do you plan to get the PHY abstraction layer patches for the Blackfin 
> EMAC included in the upcoming merge window?

Currently, it is in Jeff's netdev-2.6.git tree. IMO, Jeff will send it
to Linus when merge window open.

Regards
-Bryan Wu
> 

^ permalink raw reply

* [BUGZILLA] network wireless bugs
From: Stephen Hemminger @ 2007-10-04 16:46 UTC (permalink / raw)
  To: netdev
In-Reply-To: <20071004094426.5321af0e@freepuppy.rosehill>

13 bugs found.
ID 	Assignee 	Status 	Resolution 	Version 	Summary
4186 	linville@tuxdriver.com 	ASSI 		2.6.9 	(wireless airo) Aironet 340 PCMCIA does not support WPA
6834 	linville@tuxdriver.com 	ASSI 		2.6.17-rc6 	wpa_supplicant does not work if wifi device is part of a ...
7051 	linville@tuxdriver.com 	ASSI 		2.6.18-rc4 	prism54 does not respect carrier
7682 	Larry.Finger@lwfinger.net 	ASSI 		2.6.19.1 	bcm43xx: iwlist scan: "no scan results" with 2.6.19.1
7752 	kune@deine-taler.de 	ASSI 		2.6.20-rc2-g747... 	drivers/net/wireless/zd1211rw/zd_chip.c:1461 ASSERT r >= ...
7946 	yi.zhu@intel.com 	NEW 		2.6.19.2 	ipw2200 driver + wpa_supplicant (wpa-psk) = fail to send ...
8447 	dsd@gentoo.org 	NEW 		2.6.21.1 686 	zd1211rw does not bring ethX up on some hardware setups
8930 	linville@tuxdriver.com 	ASSI 		2.6.23-rc3 	duplicate forward declaration of void hostap_80211_rx in ...
8934 	drivers_network-wireless@ke... 	REOP 		2.6.22.5 	System freeze when restarting network connection with Bro...
8972 	dsd@gentoo.org 	NEW 		2.6.23-rc4 	zd1211 device is no longer configured
9012 	drivers_network-wireless@ke... 	NEW 		2.6.23-rc6 	RTL8187 - Losing essid
9033 	drivers_network-wireless@ke... 	NEW 		2.6.22.6 	bcm43xx: MAC suspend failed and can't find any network
9072 	drivers_network-wireless@ke... 	NEW 		2.16.20.1 	rmmod zd1211rw causes assertion failure in net/sched/sch_...

^ permalink raw reply

* [BUGZILLA] network bugs
From: Stephen Hemminger @ 2007-10-04 16:47 UTC (permalink / raw)
  To: netdev
In-Reply-To: <20071004094426.5321af0e@freepuppy.rosehill>

68 bugs found.
ID 	Assignee 	Status 	Resolution 	Version 	Summary
2803 	ambx1@neo.rr.com 	ASSI 		2.6.6 	isa modem detected but does not initialize
3258 	shemminger@osdl.org 	ASSI 		2.4.27 or 2.6.8.1 	kernel IP autoconfig with PCMCIA
4206 	laforge@gnumonks.org 	ASSI 		2.6.9 	NAT/Masquerade not working
4595 	kaber@trash.net 	ASSI 		2.6.11 	Error inserting ebt_ulog
4809 	kaber@trash.net 	ASSI 		2.6.12 	AF_PACKET sockets ignore the SO_TIMESTAMP sockopt
4885 	yoshfuji@linux-ipv6.org 	ASSI 		2.6.12.2 	IPv6 Route entry being wrongly removed
5088 	acme@ghostprotocols.net 	NEW 		2.6.x 	disable ECN per connection
5091 	laforge@gnumonks.org 	NEW 		2.6.10 	connection tracking can give abnormal throughput result
5131 	moin@blackhole.labs.rootshe... 	ASSI 		2.6.13-rc3-mm1 	Computer hangs when default-gw becomes unreachable
5248 	laforge@gnumonks.org 	ASSI 		2.4.33-pre1 	Rapid loading and unloading of iptables modules gives oop...
5731 	shemminger@osdl.org 	REOP 		2.6.14 	Zero-length write() does not generate a datagram on conne...
5999 	laforge@gnumonks.org 	NEW 		2.6.15.2 	Iptables modules fail to load on Alpha arch
6036 	other_other@kernel-bugs.osd... 	NEW 		2.6.14.3-grsec 	mmap'ed write to socket hangs when connection remote end ...
6161 	acme@ghostprotocols.net 	NEW 		2.6.14 	Modem Slow down speed 50% after kernel upgrade
6171 	acme@ghostprotocols.net 	NEW 		2.6.15 	3c59x: netlink only updates online status each 60s
6187 	acme@ghostprotocols.net 	NEW 		2.6.16-git 	netlink: possible use after free in netlink_recvmsg
6197 	kaber@trash.net 	NEW 		2.6.15 and all ... 	unregister_netdevice: waiting for ppp9 to become free. Us...
6319 	herbert@gondor.apana.org.au 	ASSI 		vanilla 2.6.16 	ipsec tunnel asymmetrical mtu
6322 	laforge@gnumonks.org 	NEW 		2.6.17.4 	Kernel Panic (tc filter delete panic)
6339 	kaber@trash.net 	NEW 		2.6.16 	Wish: /proc or /sys-access to counters
6548 	acme@ghostprotocols.net 	NEW 		2.6.16.16 	MPPE Encrypt Decrypt module bug.
6681 	shemminger@osdl.org 	NEW 		2.6.16-gentoo-r6 	TC crash and rule freeze
6682 	acme@ghostprotocols.net 	NEW 		2.6.15.6 	BUG: soft lockup detected on CPU#0! / ksoftirqd takse 100...
6830 	acme@ghostprotocols.net 	NEW 		2.6.9 	Need a /proc to view IF-MIB counters not in /proc/net/dev
6917 	acme@ghostprotocols.net 	NEW 		2.6.18-rc2-git6 	BUG: warning at net/core/dev.c:1171/skb_checksum_help()
6966 	laforge@gnumonks.org 	NEW 		2.6.17.6 	ftp conntrack doesn't work
6998 	yoshfuji@linux-ipv6.org 	NEW 		2.6.17 	rp_filter missing for ipv6
7058 	laforge@gnumonks.org 	NEW 		2.6.17.8 	CONFIG_IP_ROUTE_FWMARK breaks rp_filter checks
7198 	acme@ghostprotocols.net 	NEW 		2.6.18 	balance-alb bonding oops when disconnecting primary slave...
7202 	acme@ghostprotocols.net 	NEW 		2.6.17 	sun happy meal ethernet driver problem
7512 	samuel@sortiz.org 	ASSI 		2.6.19-rc5 	irda: sock_error in af_irda.c:irda_recvmsg_stream
7554 	marcel@holtmann.org 	NEW 		2.6.18 	oops after insmod rfcomm and rmmod rfcomm
7709 	acme@ghostprotocols.net 	NEW 		2.6.19.1 	Exposing the string field lengths of the ethtool_drvinfo ...
7732 	other_other@kernel-bugs.osd... 	NEW 		2.6.19.* 	System freeze every 10 days
7846 	acme@ghostprotocols.net 	NEW 		2.6.19.2 	Strange trouble with samba and 2.6.19 kernel
7952 	acme@ghostprotocols.net 	NEW 		2.6.18 	slattach only works every other time
7974 	acme@ghostprotocols.net 	NEW 		2.6.20 	(bonding): scheduling while atomic
7983 	yi.zhu@intel.com 	NEW 		2.6.19.2 	kernel BUG at kernel/workqueue.c:150!
8054 	acme@ghostprotocols.net 	NEW 		2.6.21-rc1 	tipc_ref_discard tipc_deleteport locking dependency
8085 	networking_netfilter-iptabl... 	NEW 		2.6.20 	performance drop in 2.6.20 (CONFIG_NF_CONNTRACK_SUPPORT)
8203 	acme@ghostprotocols.net 	NEW 		2.6.20.1 	Race: a lock is expected before calling llc_conn_state_pr...
8215 	shemminger@osdl.org 	REOP 		2.6.20.1 	A lock is expected before calling zero_fw_chain, but it ...
8218 	acme@ghostprotocols.net 	NEW 		2.6.20 	8021q - Vlan - Tag lost/missing on base interface when sn...
8253 	acme@ghostprotocols.net 	NEW 		2.6.20-rc3 	BUG: unable to handle kernel paging request at virtual ad...
8325 	networking_netfilter-iptabl... 	NEW 		2.6.19-1.2911.f... 	-j REDIRECT --to-ports 1000-1009, always first choosen
8338 	networking_netfilter-iptabl... 	NEW 		2.6.20.7 	NAT of TCP connections broken
8382 	yoshfuji@linux-ipv6.org 	NEW 		2.6.20.9 	2.6.20 cannot route packets outside tunnel
8474 	acme@ghostprotocols.net 	NEW 		2.6.20.11 	regression failure, can't even ping modem
8525 	romieu@fr.zoreil.com 	ASSI 		2.6.20 	Realtek RTL8168B does not initialize when rebooting from ...
8536 	acme@ghostprotocols.net 	NEW 		2.6.x 	Kernel drops UDP packets silently when reading from certa...
8561 	acme@ghostprotocols.net 	NEW 		vanilla kernel ... 	list_add corruption. prev->next should be next (f7d28794)...
8654 	acme@ghostprotocols.net 	NEW 		Linux version 2... 	possible connect() bug
8726 	acme@ghostprotocols.net 	NEW 		2.6.22 	MSG_TRUNC not regarded in unix_dgram_recvmsg()
8732 	romieu@fr.zoreil.com 	ASSI 		UBUNTU 7.04, PC... 	Samba - very slow -one way- speed on AMD 690
8736 	acme@ghostprotocols.net 	NEW 		2.6.22 	New TC deadlock scenario
8754 	yoshfuji@linux-ipv6.org 	NEW 		2.6.20, 2.6.22 	Kernel addrconf modifies MTU of non-kernel routes
8755 	yoshfuji@linux-ipv6.org 	NEW 		2.6.20, 2.6.22 	"ip -6 route change " behaves like "ip -6 route add"
8766 	acme@ghostprotocols.net 	NEW 		2.6.20 	802.1q VLAN stacking + REORDER_HDR is broken
8891 	acme@ghostprotocols.net 	NEW 		2.6.22.1 	in-kernel rpc generates broken RPCBPROC_GETVERSADDR v4 re...
8895 	yoshfuji@linux-ipv6.org 	NEW 		2.6.22.3 and al... 	An ioctl to delete an ipv6 tunnel leads to a kernel panic
8914 	shemminger@osdl.org 	NEW 		2.6.22.4 	filter attached to prio qdisc breaks priomap handling of ...
8961 	other_other@kernel-bugs.osd... 	NEW 		2.6.22.3 	BUG triggered by oidentd in netlink code
8962 	shemminger@osdl.org 	REOP 		2.6.23-rc4 	sky2: network intermittently unavailable after ifdown/ifu...
8971 	shemminger@osdl.org 	NEW 		2.6.18.* - 2.6.... 	htb class delete causes kernelpanic and other htb bugs.
8996 	acme@ghostprotocols.net 	NEW 		2.6.22 	atl1 driver cause kernel oops IF ram > 4Gyte and a lot of...
9077 	rjwysocki@sisk.pl 	ASSI 		2.6.23-rc6 	build #301 failed for 2.6.23-rc6-g0d4cbb5 in linux/driver...
9079 	other_other@kernel-bugs.osd... 	NEW 		2.6.23-rc3 	NETDEV WATCHDOG: eth0: transmit timed out
9080 	rjwysocki@sisk.pl 	ASSI 		2.6.23-rc2 	Weird network problems with 2.6.23-rc2

^ permalink raw reply

* Bugzilla: open bug reports
From: Stephen Hemminger @ 2007-10-04 16:44 UTC (permalink / raw)
  To: netdev

Bugzilla report of open bugs. Yes you could run it yourself but
many of these bugs seem to be old and need some attention or work
to get resolved.

Would this be useful to regularly run/automate?
What format?

^ 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