* Re: [PATCH] netfilter: bridge: refcount fix
From: Eric Dumazet @ 2009-08-24 17:32 UTC (permalink / raw)
To: Patrick McHardy; +Cc: David S. Miller, Linux Netdev List, Bart De Schuymer
In-Reply-To: <4A92CC71.2000300@trash.net>
Patrick McHardy a écrit :
> Eric Dumazet wrote:
>> Hi David
>>
>> I found following by code review only, I am not sure it is critical enough for net-2.6
>>
>> This is a stable candidate, bug is more than 2 years old.
>>
>> Thanks
>>
>> commit f216f082b2b37c4943f1e7c393e2786648d48f6f
>> ([NETFILTER]: bridge netfilter: deal with martians correctly)
>> added a refcount leak on in_dev.
>>
>> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>> ---
>> diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
>> index 4fde742..c62eca3 100644
>> --- a/net/bridge/br_netfilter.c
>> +++ b/net/bridge/br_netfilter.c
>> @@ -386,6 +386,7 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb)
>> dst_release((struct dst_entry *)rt);
>> }
>> free_skb:
>> + in_dev_put(in_dev);
>> kfree_skb(skb);
>> return 0;
>
> I guess we could simply use __in_dev_get_rcu() here since all
> netfilter hooks are running under rcu_read_lock() anyways.
Ah very good point, Thanks Patrick.
[PATCH] netfilter: bridge: refcount fix
commit f216f082b2b37c4943f1e7c393e2786648d48f6f
([NETFILTER]: bridge netfilter: deal with martians correctly)
added a refcount leak on in_dev.
Instead of using in_dev_get(), we can use __in_dev_get_rcu(),
as netfilter hooks are running under rcu_read_lock(), as pointed
by Patrick.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 4fde742..907a82e 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -359,7 +359,7 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb)
},
.proto = 0,
};
- struct in_device *in_dev = in_dev_get(dev);
+ struct in_device *in_dev = __in_dev_get_rcu(dev);
/* If err equals -EHOSTUNREACH the error is due to a
* martian destination or due to the fact that
^ permalink raw reply related
* Re: Logic for SNAT persistent handling introduced in 2.6.30 is inverted
From: Patrick McHardy @ 2009-08-24 17:28 UTC (permalink / raw)
To: Maximilian Engelhardt; +Cc: linux-kernel, netdev
In-Reply-To: <200908241516.16544.maxi@daemonizer.de>
Maximilian Engelhardt wrote:
> Kernel 2.6.30 introduced a patch [1] for the persistent option in the
> netfilter SNAT target. This is exactly what we need here so I had a quick look
> at the code and noticed that the patch is wrong. The logic is simply inverted.
> The patch below fixes this.
Good catch, applied. I'm wondering what the people who requested and
tested this change did actually test :)
> Also note that because of this the default behavior of the SNAT target has
> changed since kernel 2.6.30 as it now ignores the destination IP in choosing
> the source IP for nating (which should only be the case if the persistent
> option is set).
It fortunately only affects NAT to a range of IPs, which isn't
used that much.
^ permalink raw reply
* [PATCH 2/3] Expose may_setuid() in user.h and add may_setgid() (v2)
From: Dan Smith @ 2009-08-24 17:28 UTC (permalink / raw)
To: containers; +Cc: orenl, netdev, Serge Hallyn
In-Reply-To: <1251134884-24491-1-git-send-email-danms@us.ibm.com>
Make these helpers available to others.
Changes in v2:
- Avoid checking the groupinfo in ctx->realcred against the current in
may_setgid()
Cc: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Dan Smith <danms@us.ibm.com>
---
include/linux/user.h | 9 +++++++++
kernel/user.c | 13 ++++++++++++-
2 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/include/linux/user.h b/include/linux/user.h
index 68daf84..c231e9c 100644
--- a/include/linux/user.h
+++ b/include/linux/user.h
@@ -1 +1,10 @@
+#ifndef _LINUX_USER_H
+#define _LINUX_USER_H
+
#include <asm/user.h>
+#include <linux/sched.h>
+
+extern int may_setuid(struct user_namespace *ns, uid_t uid);
+extern int may_setgid(gid_t gid);
+
+#endif
diff --git a/kernel/user.c b/kernel/user.c
index a535ed6..a78fde7 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -604,7 +604,7 @@ int checkpoint_user(struct ckpt_ctx *ctx, void *ptr)
return do_checkpoint_user(ctx, (struct user_struct *) ptr);
}
-static int may_setuid(struct user_namespace *ns, uid_t uid)
+int may_setuid(struct user_namespace *ns, uid_t uid)
{
/*
* this next check will one day become
@@ -631,6 +631,17 @@ static int may_setuid(struct user_namespace *ns, uid_t uid)
return 0;
}
+int may_setgid(gid_t gid)
+{
+ if (capable(CAP_SETGID))
+ return 1;
+
+ if (in_egroup_p(gid))
+ return 1;
+
+ return 0;
+}
+
static struct user_struct *do_restore_user(struct ckpt_ctx *ctx)
{
struct user_struct *u;
--
1.6.2.5
^ permalink raw reply related
* [PATCH 3/3] Save and restore UNIX socket peer credentials (v2)
From: Dan Smith @ 2009-08-24 17:28 UTC (permalink / raw)
To: containers; +Cc: orenl, netdev
In-Reply-To: <1251134884-24491-1-git-send-email-danms@us.ibm.com>
This saves the uid/gid of the sk_peercred structure in the checkpoint
stream. On restart, it uses may_setuid() and may_setgid() to determine
if the uid/gid from the checkpoint stream may be used.
Changes in v3:
- Fix error path when may_setuid() or may_setgid() fail
Changes in v2:
- Adjust for may_setgid() change
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Dan Smith <danms@us.ibm.com>
---
include/linux/checkpoint_hdr.h | 2 ++
net/unix/checkpoint.c | 30 +++++++++++++++++-------------
2 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/include/linux/checkpoint_hdr.h b/include/linux/checkpoint_hdr.h
index 4d5c22a..78f1f27 100644
--- a/include/linux/checkpoint_hdr.h
+++ b/include/linux/checkpoint_hdr.h
@@ -414,6 +414,8 @@ struct ckpt_hdr_socket_unix {
struct ckpt_hdr h;
__s32 this;
__s32 peer;
+ __u32 peercred_uid;
+ __u32 peercred_gid;
__u32 flags;
__u32 laddr_len;
__u32 raddr_len;
diff --git a/net/unix/checkpoint.c b/net/unix/checkpoint.c
index 81252e3..4aff931 100644
--- a/net/unix/checkpoint.c
+++ b/net/unix/checkpoint.c
@@ -3,6 +3,7 @@
#include <linux/fs_struct.h>
#include <linux/checkpoint.h>
#include <linux/checkpoint_hdr.h>
+#include <linux/user.h>
#include <net/af_unix.h>
#include <net/tcp_states.h>
@@ -94,6 +95,9 @@ int unix_checkpoint(struct ckpt_ctx *ctx, struct socket *sock)
goto out;
}
+ un->peercred_uid = sock->sk->sk_peercred.uid;
+ un->peercred_gid = sock->sk->sk_peercred.gid;
+
ret = ckpt_write_obj(ctx, (struct ckpt_hdr *) un);
if (ret < 0)
goto out;
@@ -217,19 +221,6 @@ static int unix_join(struct ckpt_ctx *ctx,
unix_sk(a)->peer = b;
unix_sk(b)->peer = a;
- /* TODO:
- * Checkpoint the credentials, restore them here if the values match
- * the restored creds or we may_setuid()
- */
-
- a->sk_peercred.pid = task_tgid_vnr(current);
- a->sk_peercred.uid = ctx->realcred->uid;
- a->sk_peercred.gid = ctx->realcred->gid;
-
- b->sk_peercred.pid = a->sk_peercred.pid;
- b->sk_peercred.uid = a->sk_peercred.uid;
- b->sk_peercred.gid = a->sk_peercred.gid;
-
if (!UNIX_ADDR_EMPTY(un->raddr_len))
addr = unix_makeaddr(&un->raddr, un->raddr_len);
else if (!UNIX_ADDR_EMPTY(un->laddr_len))
@@ -295,6 +286,19 @@ static int unix_restore_connected(struct ckpt_ctx *ctx,
goto out;
}
+ this->sk_peercred.pid = task_tgid_vnr(current);
+
+ if (may_setuid(ctx->realcred->user->user_ns, un->peercred_uid) &&
+ may_setgid(un->peercred_gid)) {
+ this->sk_peercred.uid = un->peercred_uid;
+ this->sk_peercred.gid = un->peercred_gid;
+ } else {
+ ckpt_debug("peercred %i:%i would require setuid",
+ un->peercred_uid, un->peercred_gid);
+ ret = -EPERM;
+ goto out;
+ }
+
/* Prime the socket's buffer limit with the maximum. These will be
* overwritten with the values in the checkpoint stream in a later
* phase.
--
1.6.2.5
^ permalink raw reply related
* [PATCH 1/3] Set socket flags on restore using sock_setsockopt() where possible (v2)
From: Dan Smith @ 2009-08-24 17:28 UTC (permalink / raw)
To: containers; +Cc: orenl, netdev
In-Reply-To: <1251134884-24491-1-git-send-email-danms@us.ibm.com>
Fail on the TIMESTAMPING_* flags for the moment, with a TODO in place to
handle them later.
Also remove other explicit flag checks because they're no longer copied
blindly into the socket object, so existing checks will be sufficient.
Changes in v2:
- Avoid removing the sock->sk_socket check before sync'ing the socket.flags
- Rename sock_rst_flags() to sock_restore_flags()
- Rebase on top of Oren's cleanup patch
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Dan Smith <danms@us.ibm.com>
---
net/checkpoint.c | 113 ++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 102 insertions(+), 11 deletions(-)
diff --git a/net/checkpoint.c b/net/checkpoint.c
index c64483e..fdbf8e7 100644
--- a/net/checkpoint.c
+++ b/net/checkpoint.c
@@ -178,10 +178,6 @@ static int sock_cptrst_verify(struct ckpt_hdr_socket *h)
if (!ckpt_validate_errno(h->sock.err))
return -EINVAL;
- /* None of our supported types use this flag */
- if (h->sock.flags & SOCK_DESTROY)
- return -EINVAL;
-
return 0;
}
@@ -238,11 +234,97 @@ static int sock_cptrst_bufopts(int op, struct sock *sk,
return 0;
}
+static int sock_restore_flags(struct socket *sock,
+ struct ckpt_hdr_socket *h)
+{
+ int ret;
+ int v = 1;
+ unsigned long sk_flags = h->sock.flags;
+ unsigned long sock_flags = h->socket.flags;
+
+ if (test_and_clear_bit(SOCK_URGINLINE, &sk_flags)) {
+ ret = sock_setsockopt(sock, SOL_SOCKET, SO_OOBINLINE,
+ (char *)&v, sizeof(v));
+ if (ret)
+ return ret;
+ }
+
+ if (test_and_clear_bit(SOCK_KEEPOPEN, &sk_flags)) {
+ ret = sock_setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE,
+ (char *)&v, sizeof(v));
+ if (ret)
+ return ret;
+ }
+
+ if (test_and_clear_bit(SOCK_BROADCAST, &sk_flags)) {
+ ret = sock_setsockopt(sock, SOL_SOCKET, SO_BROADCAST,
+ (char *)&v, sizeof(v));
+ if (ret)
+ return ret;
+ }
+
+ if (test_and_clear_bit(SOCK_RCVTSTAMP, &sk_flags)) {
+ ret = sock_setsockopt(sock, SOL_SOCKET, SO_TIMESTAMP,
+ (char *)&v, sizeof(v));
+ if (ret)
+ return ret;
+ }
+
+ if (test_and_clear_bit(SOCK_RCVTSTAMPNS, &sk_flags)) {
+ ret = sock_setsockopt(sock, SOL_SOCKET, SO_TIMESTAMPNS,
+ (char *)&v, sizeof(v));
+ if (ret)
+ return ret;
+ }
+
+ if (test_and_clear_bit(SOCK_DBG, &sk_flags)) {
+ ret = sock_setsockopt(sock, SOL_SOCKET, SO_DEBUG,
+ (char *)&v, sizeof(v));
+ if (ret)
+ return ret;
+ }
+
+ if (test_and_clear_bit(SOCK_LOCALROUTE, &sk_flags)) {
+ ret = sock_setsockopt(sock, SOL_SOCKET, SO_DONTROUTE,
+ (char *)&v, sizeof(v));
+ if (ret)
+ return ret;
+ }
+
+ if (test_and_clear_bit(SOCK_PASSCRED, &sock_flags)) {
+ ret = sock_setsockopt(sock, SOL_SOCKET, SO_PASSCRED,
+ (char *)&v, sizeof(v));
+ if (ret)
+ return ret;
+ }
+
+ /* TODO: Handle SOCK_TIMESTAMPING_* flags */
+ if (test_bit(SOCK_TIMESTAMPING_TX_HARDWARE, &sk_flags) ||
+ test_bit(SOCK_TIMESTAMPING_TX_SOFTWARE, &sk_flags) ||
+ test_bit(SOCK_TIMESTAMPING_RX_HARDWARE, &sk_flags) ||
+ test_bit(SOCK_TIMESTAMPING_RX_SOFTWARE, &sk_flags) ||
+ test_bit(SOCK_TIMESTAMPING_SOFTWARE, &sk_flags) ||
+ test_bit(SOCK_TIMESTAMPING_RAW_HARDWARE, &sk_flags) ||
+ test_bit(SOCK_TIMESTAMPING_SYS_HARDWARE, &sk_flags)) {
+ ckpt_debug("SOF_TIMESTAMPING_* flags are not supported\n");
+ return -ENOSYS;
+ }
+
+ /* Anything that is still set in the flags that isn't part of
+ * our protocol's default set, indicates an error
+ */
+ if (sk_flags & ~sock->sk->sk_flags) {
+ ckpt_debug("Unhandled sock flags: %lx\n", sk_flags);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
static int sock_cptrst(struct ckpt_ctx *ctx, struct sock *sk,
struct ckpt_hdr_socket *h, int op)
{
if (sk->sk_socket) {
- CKPT_COPY(op, h->socket.flags, sk->sk_socket->flags);
CKPT_COPY(op, h->socket.state, sk->sk_socket->state);
}
@@ -259,12 +341,6 @@ static int sock_cptrst(struct ckpt_ctx *ctx, struct sock *sk,
CKPT_COPY(op, h->sock.state, sk->sk_state);
CKPT_COPY(op, h->sock.backlog, sk->sk_max_ack_backlog);
- /* TODO:
- * Break out setting each of the flags to use setsockopt() or
- * perform proper security check
- */
- CKPT_COPY(op, h->sock.flags, sk->sk_flags);
-
if (sock_cptrst_bufopts(op, sk, h))
return -EINVAL;
@@ -298,6 +374,21 @@ static int sock_cptrst(struct ckpt_ctx *ctx, struct sock *sk,
return -EINVAL;
}
+ if (op == CKPT_CPT) {
+ h->sock.flags = sk->sk_flags;
+ h->socket.flags = sk->sk_socket->flags;
+ } else {
+ int ret;
+ mm_segment_t old_fs;
+
+ old_fs = get_fs();
+ set_fs(KERNEL_DS);
+ ret = sock_restore_flags(sk->sk_socket, h);
+ set_fs(old_fs);
+ if (ret)
+ return ret;
+ }
+
if ((h->socket.state == SS_CONNECTED) &&
(h->sock.state != TCP_ESTABLISHED)) {
ckpt_debug("socket/sock in inconsistent state: %i/%i",
--
1.6.2.5
^ permalink raw reply related
* Socket C/R additional features
From: Dan Smith @ 2009-08-24 17:28 UTC (permalink / raw)
To: containers; +Cc: orenl, netdev
This set fixes the missing "goto out" as identified by Serge in the last
patch and attaches acks from Dave and Serge where appropriate.
^ permalink raw reply
* Re: [PATCH] netfilter: bridge: refcount fix
From: Patrick McHardy @ 2009-08-24 17:22 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David S. Miller, Linux Netdev List, Bart De Schuymer
In-Reply-To: <4A92CB67.1080401@gmail.com>
Eric Dumazet wrote:
> Hi David
>
> I found following by code review only, I am not sure it is critical enough for net-2.6
>
> This is a stable candidate, bug is more than 2 years old.
>
> Thanks
>
> commit f216f082b2b37c4943f1e7c393e2786648d48f6f
> ([NETFILTER]: bridge netfilter: deal with martians correctly)
> added a refcount leak on in_dev.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> ---
> diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
> index 4fde742..c62eca3 100644
> --- a/net/bridge/br_netfilter.c
> +++ b/net/bridge/br_netfilter.c
> @@ -386,6 +386,7 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb)
> dst_release((struct dst_entry *)rt);
> }
> free_skb:
> + in_dev_put(in_dev);
> kfree_skb(skb);
> return 0;
I guess we could simply use __in_dev_get_rcu() here since all
netfilter hooks are running under rcu_read_lock() anyways.
^ permalink raw reply
* [PATCH] netfilter: bridge: refcount fix
From: Eric Dumazet @ 2009-08-24 17:18 UTC (permalink / raw)
To: David S. Miller; +Cc: Linux Netdev List, Patrick McHardy, Bart De Schuymer
Hi David
I found following by code review only, I am not sure it is critical enough for net-2.6
This is a stable candidate, bug is more than 2 years old.
Thanks
commit f216f082b2b37c4943f1e7c393e2786648d48f6f
([NETFILTER]: bridge netfilter: deal with martians correctly)
added a refcount leak on in_dev.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 4fde742..c62eca3 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -386,6 +386,7 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb)
dst_release((struct dst_entry *)rt);
}
free_skb:
+ in_dev_put(in_dev);
kfree_skb(skb);
return 0;
} else {
^ permalink raw reply related
* [PATCH net-next-2.6] net: ip_rt_send_redirect() optimization
From: Eric Dumazet @ 2009-08-24 16:47 UTC (permalink / raw)
To: David S. Miller; +Cc: Linux Netdev List
While doing some forwarding benchmarks, I noticed ip_rt_send_redirect() is rather
expensive, even if send_redirects is false for the device.
Fix is to avoid two atomic ops, we dont really need to take a reference on in_dev
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
net/ipv4/route.c | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 278f46f..ffad509 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1514,13 +1514,17 @@ static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst)
void ip_rt_send_redirect(struct sk_buff *skb)
{
struct rtable *rt = skb_rtable(skb);
- struct in_device *in_dev = in_dev_get(rt->u.dst.dev);
+ struct in_device *in_dev;
+ int log_martians;
- if (!in_dev)
+ rcu_read_lock();
+ in_dev = __in_dev_get_rcu(rt->u.dst.dev);
+ if (!in_dev || !IN_DEV_TX_REDIRECTS(in_dev)) {
+ rcu_read_unlock();
return;
-
- if (!IN_DEV_TX_REDIRECTS(in_dev))
- goto out;
+ }
+ log_martians = IN_DEV_LOG_MARTIANS(in_dev);
+ rcu_read_unlock();
/* No redirected packets during ip_rt_redirect_silence;
* reset the algorithm.
@@ -1533,7 +1537,7 @@ void ip_rt_send_redirect(struct sk_buff *skb)
*/
if (rt->u.dst.rate_tokens >= ip_rt_redirect_number) {
rt->u.dst.rate_last = jiffies;
- goto out;
+ return;
}
/* Check for load limit; set rate_last to the latest sent
@@ -1547,7 +1551,7 @@ void ip_rt_send_redirect(struct sk_buff *skb)
rt->u.dst.rate_last = jiffies;
++rt->u.dst.rate_tokens;
#ifdef CONFIG_IP_ROUTE_VERBOSE
- if (IN_DEV_LOG_MARTIANS(in_dev) &&
+ if (log_martians &&
rt->u.dst.rate_tokens == ip_rt_redirect_number &&
net_ratelimit())
printk(KERN_WARNING "host %pI4/if%d ignores redirects for %pI4 to %pI4.\n",
@@ -1555,8 +1559,6 @@ void ip_rt_send_redirect(struct sk_buff *skb)
&rt->rt_dst, &rt->rt_gateway);
#endif
}
-out:
- in_dev_put(in_dev);
}
static int ip_error(struct sk_buff *skb)
^ permalink raw reply related
* [PATCH 1/2] irda/au1k_ir: fix broken netdev_ops conversion
From: Alexander Beregalov @ 2009-08-24 14:54 UTC (permalink / raw)
To: davem, netdev, linux-mips; +Cc: Alexander Beregalov
This patch is based on commit d2f3ad4 (pxaficp-ir: remove incorrect
net_device_ops). Do the same for au1k_ir.
Untested.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
drivers/net/irda/au1k_ir.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c
index c4361d4..ee1cff5 100644
--- a/drivers/net/irda/au1k_ir.c
+++ b/drivers/net/irda/au1k_ir.c
@@ -23,7 +23,6 @@
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
#include <linux/slab.h>
#include <linux/rtnetlink.h>
#include <linux/interrupt.h>
@@ -205,9 +204,6 @@ static const struct net_device_ops au1k_irda_netdev_ops = {
.ndo_start_xmit = au1k_irda_hard_xmit,
.ndo_tx_timeout = au1k_tx_timeout,
.ndo_do_ioctl = au1k_irda_ioctl,
- .ndo_change_mtu = eth_change_mtu,
- .ndo_validate_addr = eth_validate_addr,
- .ndo_set_mac_address = eth_mac_addr,
};
static int au1k_irda_net_init(struct net_device *dev)
--
1.6.4
^ permalink raw reply related
* Re: [PATCHv2] Revert TCP retransmission backoff on ICMP destination unreachable
From: Ilpo Järvinen @ 2009-08-24 15:34 UTC (permalink / raw)
To: Damian Lukowski; +Cc: Netdev
In-Reply-To: <4A928016.8090804@tvk.rwth-aachen.de>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 7184 bytes --]
On Mon, 24 Aug 2009, Damian Lukowski wrote:
> This patch implements the TCP improvement of the Internet Draft
> "Make TCP more Robust to Long Connectivity Disruptions"
> (http://tools.ietf.org/html/draft-zimmermann-tcp-lcd-01).
>
> Exponential backoff is TCP's standard behaviour during long connectivity
> disruptions, which is a countermeasure against network congestion.
> If congestion can be excluded as the reason for RTO retransmission loss,
> backoff is not desirable, as it yields longer TCP recovery times, when
> the communication path is repaired shortly after an unsuccessful
> retransmission probe.
> Here, an ICMP host/network unreachable message, whose payload fits to
> TCP's SND.UNA, is taken as an indication that the RTO retransmission has
> not been lost due to congestion, but because of a route failure
> somewhere along the path. On receipt of such a message, the timeout is
> halved (in order to revert the doubling after the retransmission).
> With true congestion, a router won't trigger such a message and the
> patched TCP will operate as standard TCP.
>
> Changes from v1:
> 1) Calling tcp_retransmit_timer() instead tcp_retransmit_skb().
> This fixes problems with SACK and a inconsistency with the draft.
> 2) If the socket is locked, retransmission is deferred by using the
> formula as in tcp_write_timer().
> 3) Removed the sysctl_tcp_retries modifications, which will be
> sent in a different patch request.
> 4) Recalculating the RTO from rtt, rttvar and icsk_backoff,
> not simply halving. This prevents, that an RTO of RTO_MAX-epsilon
> is "doubled" to RTO_MAX and then "reverted" to RTO_MAX/2 instead of
> RTO_MAX-epsilon. Currently, this is not what the draft specifies,
> but the draft will be changed accordingly.
> 5) Renamed skb to icmp_skb in tcp_v4_err in codebase code.
> 6) Different coding-style and indentation changes, as suggested
> by Ilpo Järvinen.
> 7) Using net-next-2.6 git-branch as codebase.
>
> Thanks for the review, so far.
>
> Signed-off-by: Damian Lukowski <damian@tvk.rwth-aachen.de>
> ---
> include/net/tcp.h | 1 +
> net/ipv4/tcp_ipv4.c | 54 ++++++++++++++++++++++++++++++++++++++++++-------
> net/ipv4/tcp_timer.c | 2 +-
> 3 files changed, 48 insertions(+), 9 deletions(-)
>
> diff --git a/include/net/tcp.h b/include/net/tcp.h
> index 88af843..58c5b39 100644
> --- a/include/net/tcp.h
> +++ b/include/net/tcp.h
> @@ -469,6 +469,7 @@ extern void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss,
> int nonagle);
> extern int tcp_may_send_now(struct sock *sk);
> extern int tcp_retransmit_skb(struct sock *, struct sk_buff *);
> +extern void tcp_retransmit_timer(struct sock *sk);
> extern void tcp_xmit_retransmit_queue(struct sock *);
> extern void tcp_simple_retransmit(struct sock *);
> extern int tcp_trim_head(struct sock *, struct sk_buff *, u32);
> diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
> index 6d88219..d1d73ac 100644
> --- a/net/ipv4/tcp_ipv4.c
> +++ b/net/ipv4/tcp_ipv4.c
> @@ -328,26 +328,29 @@ static void do_pmtu_discovery(struct sock *sk, struct iphdr *iph, u32 mtu)
> *
> */
>
> -void tcp_v4_err(struct sk_buff *skb, u32 info)
> +void tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
> {
> - struct iphdr *iph = (struct iphdr *)skb->data;
> - struct tcphdr *th = (struct tcphdr *)(skb->data + (iph->ihl << 2));
> + struct iphdr *iph = (struct iphdr *)icmp_skb->data;
> + struct tcphdr *th = (struct tcphdr *)(icmp_skb->data + (iph->ihl << 2));
> + struct inet_connection_sock *icsk;
> struct tcp_sock *tp;
> struct inet_sock *inet;
> - const int type = icmp_hdr(skb)->type;
> - const int code = icmp_hdr(skb)->code;
> + const int type = icmp_hdr(icmp_skb)->type;
> + const int code = icmp_hdr(icmp_skb)->code;
> struct sock *sk;
> + struct sk_buff *skb;
> __u32 seq;
> + __u32 remaining;
> int err;
> - struct net *net = dev_net(skb->dev);
> + struct net *net = dev_net(icmp_skb->dev);
>
> - if (skb->len < (iph->ihl << 2) + 8) {
> + if (icmp_skb->len < (iph->ihl << 2) + 8) {
> ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS);
> return;
> }
>
> sk = inet_lookup(net, &tcp_hashinfo, iph->daddr, th->dest,
> - iph->saddr, th->source, inet_iif(skb));
> + iph->saddr, th->source, inet_iif(icmp_skb));
> if (!sk) {
> ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS);
> return;
> @@ -367,6 +370,7 @@ void tcp_v4_err(struct sk_buff *skb, u32 info)
> if (sk->sk_state == TCP_CLOSE)
> goto out;
>
> + icsk = inet_csk(sk);
> tp = tcp_sk(sk);
> seq = ntohl(th->seq);
> if (sk->sk_state != TCP_LISTEN &&
> @@ -393,6 +397,40 @@ void tcp_v4_err(struct sk_buff *skb, u32 info)
> }
>
> err = icmp_err_convert[code].errno;
> + /* check if ICMP unreach message allows revert of backoff */
Putting a reference to the ID here into the comment wouldn't hurt btw.
> + if (code != ICMP_NET_UNREACH && code != ICMP_HOST_UNREACH)
> + break;
> + if (seq != tp->snd_una || !icsk->icsk_retransmits ||
> + !icsk->icsk_backoff)
> + break;
> +
> + icsk->icsk_backoff--;
> + inet_csk(sk)->icsk_rto = ((tp->srtt >> 3) + tp->rttvar) <<
Please create static inline u32 __tcp_set_rto(tp) into include/net/tcp.h
for this RTO formula and call for that in the both places.
> + icsk->icsk_backoff;
> + if (inet_csk(sk)->icsk_rto > TCP_RTO_MAX)
> + inet_csk(sk)->icsk_rto = TCP_RTO_MAX;
Probably useful for this too to add back the tcp_bound_rto() into
include/net/tcp.h and call instead of copy pasting (I recently removed
it).
> + skb = tcp_write_queue_head(sk);
> + BUG_ON(!skb);
> +
> + remaining = icsk->icsk_rto - min(icsk->icsk_rto,
> + tcp_time_stamp - TCP_SKB_CB(skb)->when);
> +
> + if (remaining) {
> + /* RTO revert shortened timer. */
Not that useful comment; the same was said earlier already.
> + inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
> + remaining, TCP_RTO_MAX);
> + } else if (sock_owned_by_user(sk)) {
> + /* RTO revert clocked out retransmission,
> + * but socket is locked. Will defer. */
> + inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
> + HZ/20, TCP_RTO_MAX);
> + } else {
> + /* RTO revert clocked out retransmission.
> + * Will retransmit now */
> + tcp_retransmit_timer(sk);
> + }
> +
> break;
> case ICMP_TIME_EXCEEDED:
> err = EHOSTUNREACH;
> diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
> index b144a26..a3ba494 100644
> --- a/net/ipv4/tcp_timer.c
> +++ b/net/ipv4/tcp_timer.c
> @@ -279,7 +279,7 @@ static void tcp_probe_timer(struct sock *sk)
> * The TCP retransmit timer.
> */
>
> -static void tcp_retransmit_timer(struct sock *sk)
> +void tcp_retransmit_timer(struct sock *sk)
> {
> struct tcp_sock *tp = tcp_sk(sk);
> struct inet_connection_sock *icsk = inet_csk(sk);
Other than that, it looks quite clean solution now. It would be nearly
perfect if you could make that skb -> icmp_skb into a separate preparatory
patch (1/3), the main change to 2/3 and then the most controversial
stuff related to those retrans sysctl as 3/3, each with proper reasoning
why it needs to be done (and not with the same subject but a summary of
the particular change in question). ...And send them as a series.
--
i.
^ permalink raw reply
* Re: [Bonding-devel] [PATCH net-next-2.6] bonding: introduce primary_lazy option
From: Jiri Pirko @ 2009-08-24 15:20 UTC (permalink / raw)
To: Nicolas de Pesloüan; +Cc: davem, netdev, fubar, bonding-devel
In-Reply-To: <4A92ACA6.7070600@free.fr>
Mon, Aug 24, 2009 at 05:07:18PM CEST, nicolas.2p.debian@free.fr wrote:
> Jiri Pirko wrote:
>> Thu, Aug 20, 2009 at 02:40:07PM CEST, nicolas.2p.debian@free.fr wrote:
> [--cut--]
>>> I suggest that instead of having a per bond "primary_lazy" option, we
>>> define a per slave option, describing whether this particular slave is
>>> "sticky when active" or not.
>>>
>>> The above setup would become :
>>>
>>> echo 1 > /sys/class/net/eth0/bonding/sticky_active
>>> echo 1 > /sys/class/net/eth1/bonding/sticky_active
>>> echo 0 > /sys/class/net/eth2/bonding/sticky_active
>>> echo eth0 > /sys/class/net/bond0/bonding/primary
>>>
>>> Or may be better, keeping the "weight" idea in mind, a per slave option
>>> "active_weight" that gives the weight of the slave, *when active*.
>>>
>>> The effective weight of a slave would become :
>>>
>>> effective_slave =
>>> (is_active ? user_supplied_active_weight ? user_supplied_weight) *
>>> natural_weight
>>>
>>> # Prefer eth0, then one of eth1 or eth2, then eth3.
>>> echo 1000 > /sys/class/net/eth0/bonding/weight
>>> echo 999 > /sys/class/net/eth1/bonding/weight
>>> echo 999 > /sys/class/net/eth2/bonding/weight
>>> echo 10 > /sys/class/net/eth3/bonding/weight
>>>
>>> # Do not switch back to primary eth0 if eth1 or eth2 is active.
>>> echo 1000 > /sys/class/net/eth1/bonding/active_weight
>>> echo 1000 > /sys/class/net/eth2/bonding/active_weight
>>>
>>> Every time one changes the user_supplied_weight, then
>>> user_supplied_active_weight must be reset to the same value. This
>>> way, if no special setup is done on active_weight, then the current
>>> normal
>>> behavior is achieved.
>>
>> I must say I like this approach. But it would be not trivial to implement this.
>> Therefore I would stick with your propose of extending primary lazy to 3 values
>> until the weight option is implemented.
>
> It sounds good for me. Later, if I eventually implement the weight
> option, it shouldn't be that hard to convert internally the primary_lazy
> setup to active_weight, the same way we plan to convert internally
> primary setup to weight setup.
>
> primary and primary_lazy are convenient for simple - two slaves only -
> configurations. weight and active_weight are for more advanced
> configurations. Keeping both configuration interface does sound user
> friendly.
Ok, I agree.
>
>> I'm going to implement your propose below.
>
> By the way, even if I'm not a native English speaker, I think that
> primary_lazy option should be named lazy_primary instead.
Well I've intentionally put "primary" as a first word to amplify it's linked
with primary option... But...
Jirka
>
> Nicolas.
>
>>> If none of those options seem acceptable to you, I suggest a third one:
>>>
>>> You keep primary_lazy, but with the following values :
>>>
>>> # Switch back to primary slaves when it comes back.
>>> echo 0 > /sys/class/net/bond0/bonding/primary_lazy
>>>
>>> # Switch back to primary when it comes back, only if the speed of the
>>> # primary slave is higher than the speed of the current active slave.
>>> echo 1 > /sys/class/net/bond0/bonding/primary_lazy
>>>
>>> # Stick to the current active slave when the primary slave comes back,
>>> # even if the primary slave speed is higher than the speed of the
>>> # current active slave.
>>> echo 2 > /sys/class/net/bond0/bonding/primary_lazy
>>>
>>> You can consider the value as being the level of laziness of the primary.
>>>
>>> Nicolas.
>>>
>
>
^ permalink raw reply
* Re: [Bonding-devel] [PATCH net-next-2.6] bonding: introduce primary_lazy option
From: Nicolas de Pesloüan @ 2009-08-24 15:07 UTC (permalink / raw)
To: Jiri Pirko; +Cc: davem, netdev, fubar, bonding-devel
In-Reply-To: <20090824111619.GC4018@psychotron.englab.brq.redhat.com>
Jiri Pirko wrote:
> Thu, Aug 20, 2009 at 02:40:07PM CEST, nicolas.2p.debian@free.fr wrote:
[--cut--]
>> I suggest that instead of having a per bond "primary_lazy" option, we
>> define a per slave option, describing whether this particular slave is
>> "sticky when active" or not.
>>
>> The above setup would become :
>>
>> echo 1 > /sys/class/net/eth0/bonding/sticky_active
>> echo 1 > /sys/class/net/eth1/bonding/sticky_active
>> echo 0 > /sys/class/net/eth2/bonding/sticky_active
>> echo eth0 > /sys/class/net/bond0/bonding/primary
>>
>> Or may be better, keeping the "weight" idea in mind, a per slave option
>> "active_weight" that gives the weight of the slave, *when active*.
>>
>> The effective weight of a slave would become :
>>
>> effective_slave =
>> (is_active ? user_supplied_active_weight ? user_supplied_weight) *
>> natural_weight
>>
>> # Prefer eth0, then one of eth1 or eth2, then eth3.
>> echo 1000 > /sys/class/net/eth0/bonding/weight
>> echo 999 > /sys/class/net/eth1/bonding/weight
>> echo 999 > /sys/class/net/eth2/bonding/weight
>> echo 10 > /sys/class/net/eth3/bonding/weight
>>
>> # Do not switch back to primary eth0 if eth1 or eth2 is active.
>> echo 1000 > /sys/class/net/eth1/bonding/active_weight
>> echo 1000 > /sys/class/net/eth2/bonding/active_weight
>>
>> Every time one changes the user_supplied_weight, then
>> user_supplied_active_weight must be reset to the same value. This way,
>> if no special setup is done on active_weight, then the current normal
>> behavior is achieved.
>
> I must say I like this approach. But it would be not trivial to implement this.
> Therefore I would stick with your propose of extending primary lazy to 3 values
> until the weight option is implemented.
It sounds good for me. Later, if I eventually implement the weight option, it
shouldn't be that hard to convert internally the primary_lazy setup to
active_weight, the same way we plan to convert internally primary setup to
weight setup.
primary and primary_lazy are convenient for simple - two slaves only -
configurations. weight and active_weight are for more advanced configurations.
Keeping both configuration interface does sound user friendly.
> I'm going to implement your propose below.
By the way, even if I'm not a native English speaker, I think that primary_lazy
option should be named lazy_primary instead.
Nicolas.
>> If none of those options seem acceptable to you, I suggest a third one:
>>
>> You keep primary_lazy, but with the following values :
>>
>> # Switch back to primary slaves when it comes back.
>> echo 0 > /sys/class/net/bond0/bonding/primary_lazy
>>
>> # Switch back to primary when it comes back, only if the speed of the
>> # primary slave is higher than the speed of the current active slave.
>> echo 1 > /sys/class/net/bond0/bonding/primary_lazy
>>
>> # Stick to the current active slave when the primary slave comes back,
>> # even if the primary slave speed is higher than the speed of the
>> # current active slave.
>> echo 2 > /sys/class/net/bond0/bonding/primary_lazy
>>
>> You can consider the value as being the level of laziness of the primary.
>>
>> Nicolas.
>>
^ permalink raw reply
* [PATCH 2/2] irda/sa1100_ir: fix broken netdev_ops conversion
From: Alexander Beregalov @ 2009-08-24 14:56 UTC (permalink / raw)
To: davem, netdev, linux-arm-kernel, linux-arm-kernel; +Cc: Alexander Beregalov
This patch is based on commit d2f3ad4 (pxaficp-ir: remove incorrect
net_device_ops). Do the same for sa1100_ir.
Untested.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
drivers/net/irda/sa1100_ir.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c
index 2aeb2e6..b039cb0 100644
--- a/drivers/net/irda/sa1100_ir.c
+++ b/drivers/net/irda/sa1100_ir.c
@@ -24,7 +24,6 @@
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
#include <linux/slab.h>
#include <linux/rtnetlink.h>
#include <linux/interrupt.h>
@@ -881,9 +880,6 @@ static const struct net_device_ops sa1100_irda_netdev_ops = {
.ndo_stop = sa1100_irda_stop,
.ndo_start_xmit = sa1100_irda_hard_xmit,
.ndo_do_ioctl = sa1100_irda_ioctl,
- .ndo_change_mtu = eth_change_mtu,
- .ndo_validate_addr = eth_validate_addr,
- .ndo_set_mac_address = eth_mac_addr,
};
static int sa1100_irda_probe(struct platform_device *pdev)
--
1.6.4
^ permalink raw reply related
* Logic for SNAT persistent handling introduced in 2.6.30 is inverted
From: Maximilian Engelhardt @ 2009-08-24 13:16 UTC (permalink / raw)
To: linux-kernel, netdev
[-- Attachment #1: Type: text/plain, Size: 1374 bytes --]
Kernel 2.6.30 introduced a patch [1] for the persistent option in the
netfilter SNAT target. This is exactly what we need here so I had a quick look
at the code and noticed that the patch is wrong. The logic is simply inverted.
The patch below fixes this.
Also note that because of this the default behavior of the SNAT target has
changed since kernel 2.6.30 as it now ignores the destination IP in choosing
the source IP for nating (which should only be the case if the persistent
option is set).
--- net/ipv4/netfilter/nf_nat_core.c.orig 2009-08-24 14:44:00.000000000
+0200
+++ net/ipv4/netfilter/nf_nat_core.c 2009-08-24 14:44:43.000000000 +0200
@@ -212,7 +212,7 @@ find_best_ips_proto(struct nf_conntrack_
maxip = ntohl(range->max_ip);
j = jhash_2words((__force u32)tuple->src.u3.ip,
range->flags & IP_NAT_RANGE_PERSISTENT ?
- (__force u32)tuple->dst.u3.ip : 0, 0);
+ 0 : (__force u32)tuple->dst.u3.ip, 0);
j = ((u64)j * (maxip - minip + 1)) >> 32;
*var_ipp = htonl(minip + j);
}
Signed-off-by: Maximilian Engelhardt <maxi@daemonizer.de>
Greetings,
Maximilian Engelhardt
[1]
http://git.eu.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=98d500d66cb7940747b424b245fc6a51ecfbf005
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply
* [PATCH 07/13] TProxy: implement IPv6 "local" routing type
From: Balazs Scheidler @ 2009-08-24 12:47 UTC (permalink / raw)
To: netfilter-devel, netdev
IPv4 policy routing (and the ip command) allows to add a routing rule
with 'local' type, however this did not work with IPv6. This
patch implements the 'local' routing type by redirecting all such packets
to the local IP stack.
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
---
net/ipv6/route.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 1473ee0..9491579 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1174,6 +1174,8 @@ int ip6_route_add(struct fib6_config *cfg)
if (addr_type & IPV6_ADDR_MULTICAST)
rt->u.dst.input = ip6_mc_input;
+ else if (cfg->fc_flags & RTF_LOCAL)
+ rt->u.dst.input = ip6_input;
else
rt->u.dst.input = ip6_forward;
@@ -1195,7 +1197,7 @@ int ip6_route_add(struct fib6_config *cfg)
they would result in kernel looping; promote them to reject routes
*/
if ((cfg->fc_flags & RTF_REJECT) ||
- (dev && (dev->flags&IFF_LOOPBACK) && !(addr_type&IPV6_ADDR_LOOPBACK))) {
+ (((cfg->fc_flags & RTF_LOCAL) == 0) && (dev && (dev->flags&IFF_LOOPBACK) && !(addr_type&IPV6_ADDR_LOOPBACK)))) {
/* hold loopback dev/idev if we haven't done so. */
if (dev != net->loopback_dev) {
if (dev) {
@@ -2086,6 +2088,8 @@ static int rtm_to_fib6_config(struct sk_buff *skb, struct nlmsghdr *nlh,
if (rtm->rtm_type == RTN_UNREACHABLE)
cfg->fc_flags |= RTF_REJECT;
+ else if (rtm->rtm_type == RTN_LOCAL)
+ cfg->fc_flags |= RTF_LOCAL;
cfg->fc_nlinfo.pid = NETLINK_CB(skb).pid;
cfg->fc_nlinfo.nlh = nlh;
--
1.6.0.4
^ permalink raw reply related
* Re: [PATCH] pxaficp-ir - remove incorrect net_device_ops
From: Marek Vasut @ 2009-08-24 12:47 UTC (permalink / raw)
To: David Miller
Cc: a.beregalov, eric.y.miao, linux-arm-kernel, linux, samuel, netdev,
linux-arm-kernel
In-Reply-To: <20090823.225743.135339409.davem@davemloft.net>
Dne Po 24. srpna 2009 07:57:43 David Miller napsal(a):
> From: Alexander Beregalov <a.beregalov@gmail.com>
> Date: Mon, 24 Aug 2009 08:38:31 +0400
>
> > Subject: [PATCH] pxaficp-ir - remove incorrect net_device_ops
> >
> > This patch fixes broken pxaficp-ir. The problem was in incorrect
> > net_device_ops being specified which prevented the driver from
> > operating. The symptoms were:
> > - failing ifconfig for IrLAN, resulting in
> > SIOCSIFFLAGS: Cannot assign requested address
> > - irattach working for IrCOMM, but the port stayed disabled
> >
> > Moreover this patch corrects missing sysfs device link.
> >
> > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
>
> Applied, thanks.
Thank you.
^ permalink raw reply
* iproute2 / tbf with large burst seems broken again
From: Denys Fedoryschenko @ 2009-08-24 12:07 UTC (permalink / raw)
To: netdev
Seems something related to the changes with resolution. I remember something
like this happened before, and i report about it, but i am not able to find
in mail archives. It seems packets queueing and not passing shaper, if burst
is set to large value.
Kernel 2.6.30.4 was ok.
uname -a
Linux PPPoE_146 2.6.31-rc7-build-0046-32bit #6 SMP Sun Aug 23 03:51:14 EEST
2009 i686 GNU/Linux
PPPoE_146 ~ # tc -s -d qdisc show dev ppp87;sleep 10;tc -s -d qdisc show dev
ppp87
qdisc prio 1: root bands 3 priomap 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Sent 47980 bytes 367 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 357p requeues 0
qdisc tbf 2: parent 1:1 rate 96000bit burst 2000Kb/8 mpu 0b lat 500.0ms
Sent 47580 bytes 357 pkt (dropped 0, overlimits 376 requeues 0)
rate 384bit 1pps backlog 0b 357p requeues 0
qdisc tbf 3: parent 1:2 rate 1024Kbit burst 2000Kb/8 mpu 0b lat 500.0ms
Sent 400 bytes 10 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
qdisc ingress ffff: parent ffff:fff1 ----------------
Sent 21342 bytes 347 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
qdisc prio 1: root bands 3 priomap 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Sent 48410 bytes 372 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 362p requeues 0
qdisc tbf 2: parent 1:1 rate 96000bit burst 2000Kb/8 mpu 0b lat 500.0ms
Sent 48010 bytes 362 pkt (dropped 0, overlimits 381 requeues 0)
rate 448bit 1pps backlog 0b 362p requeues 0
qdisc tbf 3: parent 1:2 rate 1024Kbit burst 2000Kb/8 mpu 0b lat 500.0ms
Sent 400 bytes 10 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
qdisc ingress ffff: parent ffff:fff1 ----------------
Sent 21692 bytes 352 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
PPPoE_146 ~ # cat /proc/net/psched
000003e8 00000040 000f4240 3b9aca00
^ permalink raw reply
* [PATCHv2] Revert TCP retransmission backoff on ICMP destination unreachable
From: Damian Lukowski @ 2009-08-24 11:57 UTC (permalink / raw)
To: Netdev
This patch implements the TCP improvement of the Internet Draft
"Make TCP more Robust to Long Connectivity Disruptions"
(http://tools.ietf.org/html/draft-zimmermann-tcp-lcd-01).
Exponential backoff is TCP's standard behaviour during long connectivity
disruptions, which is a countermeasure against network congestion.
If congestion can be excluded as the reason for RTO retransmission loss,
backoff is not desirable, as it yields longer TCP recovery times, when
the communication path is repaired shortly after an unsuccessful
retransmission probe.
Here, an ICMP host/network unreachable message, whose payload fits to
TCP's SND.UNA, is taken as an indication that the RTO retransmission has
not been lost due to congestion, but because of a route failure
somewhere along the path. On receipt of such a message, the timeout is
halved (in order to revert the doubling after the retransmission).
With true congestion, a router won't trigger such a message and the
patched TCP will operate as standard TCP.
Changes from v1:
1) Calling tcp_retransmit_timer() instead tcp_retransmit_skb().
This fixes problems with SACK and a inconsistency with the draft.
2) If the socket is locked, retransmission is deferred by using the
formula as in tcp_write_timer().
3) Removed the sysctl_tcp_retries modifications, which will be
sent in a different patch request.
4) Recalculating the RTO from rtt, rttvar and icsk_backoff,
not simply halving. This prevents, that an RTO of RTO_MAX-epsilon
is "doubled" to RTO_MAX and then "reverted" to RTO_MAX/2 instead of
RTO_MAX-epsilon. Currently, this is not what the draft specifies,
but the draft will be changed accordingly.
5) Renamed skb to icmp_skb in tcp_v4_err in codebase code.
6) Different coding-style and indentation changes, as suggested
by Ilpo Järvinen.
7) Using net-next-2.6 git-branch as codebase.
Thanks for the review, so far.
Signed-off-by: Damian Lukowski <damian@tvk.rwth-aachen.de>
---
include/net/tcp.h | 1 +
net/ipv4/tcp_ipv4.c | 54 ++++++++++++++++++++++++++++++++++++++++++-------
net/ipv4/tcp_timer.c | 2 +-
3 files changed, 48 insertions(+), 9 deletions(-)
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 88af843..58c5b39 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -469,6 +469,7 @@ extern void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss,
int nonagle);
extern int tcp_may_send_now(struct sock *sk);
extern int tcp_retransmit_skb(struct sock *, struct sk_buff *);
+extern void tcp_retransmit_timer(struct sock *sk);
extern void tcp_xmit_retransmit_queue(struct sock *);
extern void tcp_simple_retransmit(struct sock *);
extern int tcp_trim_head(struct sock *, struct sk_buff *, u32);
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 6d88219..d1d73ac 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -328,26 +328,29 @@ static void do_pmtu_discovery(struct sock *sk, struct iphdr *iph, u32 mtu)
*
*/
-void tcp_v4_err(struct sk_buff *skb, u32 info)
+void tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
{
- struct iphdr *iph = (struct iphdr *)skb->data;
- struct tcphdr *th = (struct tcphdr *)(skb->data + (iph->ihl << 2));
+ struct iphdr *iph = (struct iphdr *)icmp_skb->data;
+ struct tcphdr *th = (struct tcphdr *)(icmp_skb->data + (iph->ihl << 2));
+ struct inet_connection_sock *icsk;
struct tcp_sock *tp;
struct inet_sock *inet;
- const int type = icmp_hdr(skb)->type;
- const int code = icmp_hdr(skb)->code;
+ const int type = icmp_hdr(icmp_skb)->type;
+ const int code = icmp_hdr(icmp_skb)->code;
struct sock *sk;
+ struct sk_buff *skb;
__u32 seq;
+ __u32 remaining;
int err;
- struct net *net = dev_net(skb->dev);
+ struct net *net = dev_net(icmp_skb->dev);
- if (skb->len < (iph->ihl << 2) + 8) {
+ if (icmp_skb->len < (iph->ihl << 2) + 8) {
ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS);
return;
}
sk = inet_lookup(net, &tcp_hashinfo, iph->daddr, th->dest,
- iph->saddr, th->source, inet_iif(skb));
+ iph->saddr, th->source, inet_iif(icmp_skb));
if (!sk) {
ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS);
return;
@@ -367,6 +370,7 @@ void tcp_v4_err(struct sk_buff *skb, u32 info)
if (sk->sk_state == TCP_CLOSE)
goto out;
+ icsk = inet_csk(sk);
tp = tcp_sk(sk);
seq = ntohl(th->seq);
if (sk->sk_state != TCP_LISTEN &&
@@ -393,6 +397,40 @@ void tcp_v4_err(struct sk_buff *skb, u32 info)
}
err = icmp_err_convert[code].errno;
+ /* check if ICMP unreach message allows revert of backoff */
+ if (code != ICMP_NET_UNREACH && code != ICMP_HOST_UNREACH)
+ break;
+ if (seq != tp->snd_una || !icsk->icsk_retransmits ||
+ !icsk->icsk_backoff)
+ break;
+
+ icsk->icsk_backoff--;
+ inet_csk(sk)->icsk_rto = ((tp->srtt >> 3) + tp->rttvar) <<
+ icsk->icsk_backoff;
+ if (inet_csk(sk)->icsk_rto > TCP_RTO_MAX)
+ inet_csk(sk)->icsk_rto = TCP_RTO_MAX;
+
+ skb = tcp_write_queue_head(sk);
+ BUG_ON(!skb);
+
+ remaining = icsk->icsk_rto - min(icsk->icsk_rto,
+ tcp_time_stamp - TCP_SKB_CB(skb)->when);
+
+ if (remaining) {
+ /* RTO revert shortened timer. */
+ inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
+ remaining, TCP_RTO_MAX);
+ } else if (sock_owned_by_user(sk)) {
+ /* RTO revert clocked out retransmission,
+ * but socket is locked. Will defer. */
+ inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
+ HZ/20, TCP_RTO_MAX);
+ } else {
+ /* RTO revert clocked out retransmission.
+ * Will retransmit now */
+ tcp_retransmit_timer(sk);
+ }
+
break;
case ICMP_TIME_EXCEEDED:
err = EHOSTUNREACH;
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index b144a26..a3ba494 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -279,7 +279,7 @@ static void tcp_probe_timer(struct sock *sk)
* The TCP retransmit timer.
*/
-static void tcp_retransmit_timer(struct sock *sk)
+void tcp_retransmit_timer(struct sock *sk)
{
struct tcp_sock *tp = tcp_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
--
1.6.3.3
^ permalink raw reply related
* Re: [Bonding-devel] [PATCH net-next-2.6] bonding: introduce primary_lazy option
From: Jiri Pirko @ 2009-08-24 11:16 UTC (permalink / raw)
To: Nicolas de Pesloüan; +Cc: davem, netdev, fubar, bonding-devel
In-Reply-To: <4A8D4427.8080004@free.fr>
Thu, Aug 20, 2009 at 02:40:07PM CEST, nicolas.2p.debian@free.fr wrote:
> Jiri Pirko awrote:
>> Mon, Aug 17, 2009 at 10:55:13PM CEST, nicolas.2p.debian@free.fr wrote:
>>> Jiri Pirko wrote:
>>>> Fri, Aug 14, 2009 at 06:27:03PM CEST, nicolas.2p.debian@free.fr wrote:
>>>>> Jiri Pirko wrote:
>>>>>> Thu, Aug 13, 2009 at 09:41:02PM CEST, nicolas.2p.debian@free.fr wrote:
>>>>>>> Jiri Pirko wrote:
>>>>>>>> In some cases there is not desirable to switch back to primary interface when
>>>>>>>> it's link recovers and rather stay wiith currently active one. We need to avoid
>>>>>>>> packetloss as much as we can in some cases. This is solved by introducing
>>>>>>>> primary_lazy option. Note that enslaved primary slave is set as current
>>>>>>>> active no matter what.
>>>>>>> May I suggest that instead of creating a new option to better define how
>>>>>>> the "primary" option is expected to behave for active-backup
>>>>>>> mode, we try the "weight" slave option I proposed in the
>>>>>>> thread "alternative to primary" earlier this year ?
>>>>>>>
>>>>>>> http://sourceforge.net/mailarchive/forum.php?thread_name=49D5357E.4020201%40free.fr&forum_name=bonding-devel
>>>>>> This link does not work for me :(
>>>>> Nor for me... Sourceforge apparently decided to drop the
>>>>> bonding-devel list archive just now. 'hope the list archive will
>>>>> be back soon.
>>>>>
>>>>> Originally, the proposed "weight" option for slaves was designed
>>>>> just to provide a way to better define which slave should become
>>>>> active when the active one just went down. As you know, the
>>>>> current "primary" option does not allow for a predictable
>>>>> selection of the new active slave when the primary loose
>>>>> connectivity. The new active slave is chosen "at random" between
>>>>> the remaining slaves.
>>>>>
>>>>> After a short thread, involving Jay Vosburg and Andy Gospodarek,
>>>>> we end up with a general configuration interface, that provide a
>>>>> way to tune many things in slave management :
>>>>>
>>>>> - Active slave selection in active/backup mode, even in the
>>>>> presence of more than two slaves.
>>>>> - Active aggregator selection in 802.3ad mode.
>>>>> - Load balancing tuning for most load balancing modes.
>>>>>
>>>>> The sysfs interface would be /sys/class/net/eth0/bonding/weight.
>>>>> Writing a number there would give a "user supplied weight" to a
>>>>> slave. The speed and link state of the slave would give a
>>>>> "natural weight" for the slave. And the "effective weight" would
>>>>> be computed every time one of user supplied or natural weight
>>>>> change (upon speed or link state changes) and would be used
>>>>> everywhere we need a slave weight.
>>>>>
>>>>> I suggest that :
>>>>> - slave's natural weight = speed of the slave if link UP, else 0.
>>>>> - slave's effective weight = slave's natural weight * slave's
>>>>> user supplied weight.
>>>>> - aggregator's effective weight = sum of the effective weights of
>>>>> the slaves inside the aggregator.
>>>>>
>>>>> For the active/backup mode, the exact behavior would be :
>>>>>
>>>>> - When the active slave disappear, the new active slave is the
>>>>> one whose effective weight is the highest.
>>>>> - When a slave comes back, it only becomes active if its
>>>>> effective weight is strictly higher than the one of the current
>>>>> active slave. (This stop the flip-flop risk you stated).
>>>>> - To keep the old "primary" option, we simply give a very high
>>>>> user supplied weight to the primary slave. Jay suggested :
>>>>> #define BOND_PRIMARY_PRIO 0x80000000
>>>>> user_supplied_weight &= BOND_PRIMARY_PRIO /* to set the primary */
>>>>> user_supplied_weight &= ~BOND_PRIMAY_PRIO /* to clear the primary */
>>>>>
>>>>> The same apply to aggregator : Every time a slave enter (link UP)
>>>>> or leave (link DOWN) an aggregator, the aggregator effective
>>>>> weight is recomputed. Then, if an aggregator exist with an
>>>>> strictly higher effective weight than the current active one,
>>>>> the new best aggregator becomes active.
>>>>>
>>>>> For others modes, the weight might be used later to tune the load
>>>>> balancing logic in some way.
>>>>>
>>>>> A default value of 1 for slave weight would cause slave speed to
>>>>> be used alone, hence the "natural weight".
>>>>>
>>>> I read your text and also the original list thread and I must say I see no
>>>> solution in this "weight" parameter for this issue. Because it's desired for one
>>>> link to stay active even if second come up, these 2 must have the same weight.
>>>> But imagine 3 links of the same weight. In that case you cannot insure that the
>>>> "primary one" will be chosen as active (see my picture in the reply to Jay's
>>>> post). Correct me if I'm wrong but for that what I want to fix by primary_lazy
>>>> option, your proposed weight option has no effect.
>>>>
>>>> Therefor I still think the primary_lazy is the only solution now.
>>>>
>>>> Jirka
>>> Hi Jirka,
>>>
>>> From your previous posts (first one and reply to Jay), I understand
>>> that your want to achieve the following behavior :
>>>
>>> eth0 is primary and active.
>>> eth1 is allowed to be active is eth0 is down.
>>> Also, eth1 should stay active, even if eth0 comes back up.
>>> Switch active to eth0 if eth1 eventually fall down.
>>> Switch active to eth2 only if both eth0 and eth1 are down.
>>>
>>> eth0 eth1 eth2
>>> UP(curr) UP UP
>>> DOWN UP(curr) UP
>>> UP UP(curr) UP
>>> UP(curr) DOWN UP
>>> DOWN DOWN UP(curr)
>>>
>>> Using weight, the following setup should give this result :
>>>
>>> echo 1000 > /sys/class/net/eth0/bonding/weight
>>> echo 1000 > /sys/class/net/eth1/bonding/weight
>>> echo 1 > /sys/class/net/eth2/bonding/weight
>>> echo eth0 > /sys/class/net/bond0/bonding/active_slave
>>>
>>> I hope this is clear now.
>>
>> Hmm... I ment the eth1 and eth2 to be the equivalent...
>> If eth1 is down (let's say for good) and eth0 comes down, eth2 is
>> selected as current active. But when eth0 comes up then eth0 is selected. That
>> is not desired.
>
> OK, now I think I really understand your exact requirement.
>
> You want the ability to keep the current active slave active, even if a
> better slave comes back up, so the only reason for the active slave to
> change would be that the current active slave falls down:
>
> eth0 eth1 eth2
> UP(curr) UP UP
> DOWN UP(curr) UP
> UP UP(curr) UP
> UP(curr) DOWN UP
> DOWN DOWN UP(curr)
> UP DOWN UP(curr) <-
>
> But at the same time, you still need the ability to properly select the
> best new active slave when the current one falls down, hence your answer
> in reply to Jay's proposal:
>
> > But imagine you have bond with 3 slaves:
> > eth0 eth1 eth2
> > UP(curr) UP UP
> > DOWN UP(curr) UP
> > UP UP(curr) UP
> > UP DOWN UP(curr)
>
> > eth2 ends up being current active but we prefer eth0 (as
> > primary interface).
> > This is not desirable and is solved by primary_lazy option.
>
> I think your proposed "primary_lazy" option suffer some limits and
> should not be a per bond option but a per slave option.
>
> You are right that some slave should be able to be "sticky" when active,
> in order to reduce packets loose when switching. But due to performance
> reason, it might be desirable to say that some other slaves are not
> "sticky" when active, in the same configuration.
>
> Let's imagine the following configuration :
>
> eth0: 1 Gb/s - primary
> eth1: 1 Gb/s
> eth2: 100 Mb/s
>
> With "primary_lazy=1, eth2 has a chance to stay active, after eth0
> and eth1 both failed at the same time. The risk of loosing a few packets
> while switching back from eth2 to eth0 or eth1 might be seen acceptable,
> compared to sticking to a 100 Mb/s interface when a 1 Gb/s interface
> is available.
>
> Due to eth2 speed, one might want to have the following behavior:
>
> If eth1 is active, keep it active, even if eth0 comes back up. But if
> eth2 is active, switch to any better slave right at the time one comes
> back up.
>
> I suggest that instead of having a per bond "primary_lazy" option, we
> define a per slave option, describing whether this particular slave is
> "sticky when active" or not.
>
> The above setup would become :
>
> echo 1 > /sys/class/net/eth0/bonding/sticky_active
> echo 1 > /sys/class/net/eth1/bonding/sticky_active
> echo 0 > /sys/class/net/eth2/bonding/sticky_active
> echo eth0 > /sys/class/net/bond0/bonding/primary
>
> Or may be better, keeping the "weight" idea in mind, a per slave option
> "active_weight" that gives the weight of the slave, *when active*.
>
> The effective weight of a slave would become :
>
> effective_slave =
> (is_active ? user_supplied_active_weight ? user_supplied_weight) *
> natural_weight
>
> # Prefer eth0, then one of eth1 or eth2, then eth3.
> echo 1000 > /sys/class/net/eth0/bonding/weight
> echo 999 > /sys/class/net/eth1/bonding/weight
> echo 999 > /sys/class/net/eth2/bonding/weight
> echo 10 > /sys/class/net/eth3/bonding/weight
>
> # Do not switch back to primary eth0 if eth1 or eth2 is active.
> echo 1000 > /sys/class/net/eth1/bonding/active_weight
> echo 1000 > /sys/class/net/eth2/bonding/active_weight
>
> Every time one changes the user_supplied_weight, then
> user_supplied_active_weight must be reset to the same value. This way,
> if no special setup is done on active_weight, then the current normal
> behavior is achieved.
I must say I like this approach. But it would be not trivial to implement this.
Therefore I would stick with your propose of extending primary lazy to 3 values
until the weight option is implemented.
I'm going to implement your propose below.
>
> If none of those options seem acceptable to you, I suggest a third one:
>
> You keep primary_lazy, but with the following values :
>
> # Switch back to primary slaves when it comes back.
> echo 0 > /sys/class/net/bond0/bonding/primary_lazy
>
> # Switch back to primary when it comes back, only if the speed of the
> # primary slave is higher than the speed of the current active slave.
> echo 1 > /sys/class/net/bond0/bonding/primary_lazy
>
> # Stick to the current active slave when the primary slave comes back,
> # even if the primary slave speed is higher than the speed of the
> # current active slave.
> echo 2 > /sys/class/net/bond0/bonding/primary_lazy
>
> You can consider the value as being the level of laziness of the primary.
>
> Nicolas.
>
>>>>>>> Giving the same "weight" to two different slaves means "chose at random
>>>>>>> on startup and keep the active one until it fails". And if the "at
>>>>>>> random" behavior is not appropriate, one can force the active slave
>>>>>>> using what Jay suggested (/sys/class/net/bond0/bonding/active).
>>>>>>>
>>>>>>> The proposed "weight" slave's option is able to prevent the slaves from
>>>>>>> flip-flopping, by stating the fact that two slaves share the
>>>>>>> same "primary" level, and may provide several other
>>>>>>> enhancements as described in the thread.
>>>>>>>
>>>>>> Although I cannot reach the thread, this looks interesting. But I'm not sure it
>>>>>> has real benefits over primary_lazy option (and it doesn't solve initial curr
>>>>>> active slave setup)
>>>>> You are right, it doesn't solve the initial active slave
>>>>> selection. But why would it be so important to properly select
>>>>> the initial active slave, if you feel comfortable with staying
>>>>> with a new active slave, after a failure and return of the
>>>>> original active slave ? This kind of failures may last for only
>>>>> a few seconds (just unplugging and plugging back the wire), and
>>>>> you configuration may then stay with the new active slave
>>>>> "forever". If "forever" is acceptable, may be "at startup" is
>>>>> acceptable too. :-)
>>>>>
>>>>> From my point of view (and Andy Gospodarek apparently agreed),
>>>>> the real benefits of the weight slave option is that is it more
>>>>> generic and allow for later usage in other modes, that we don't
>>>>> anticipate for now.
>>>>>
>>>>> Quoted from a mail from Andy Gospodarek in the original thread :
>>>>>
>>>>> "I really have no objection to that. Adding this as a base part of
>>>>> bonding for a few modes with known features would be a nice start.
>>>>> I'm sure others will be kind enough to send suggestions or patches for
>>>>> ways this could benefit other modes."
>
>
>
^ permalink raw reply
* Re: [PATCH] sit: 6to4: honour routing table
From: Rémi Denis-Courmont @ 2009-08-24 6:37 UTC (permalink / raw)
To: Sascha Hlusiak; +Cc: netdev
In-Reply-To: <1250938072-5577-1-git-send-email-contact@saschahlusiak.de>
On Sat, 22 Aug 2009 12:47:52 +0200, Sascha Hlusiak
<contact@saschahlusiak.de> wrote:
> Using only the actual destination address to determine the IPv4 target in
> try_6to4(&iph6->daddr) seems wrong to me and breaks, if a 6to4 address is
> the next-hop, like ::192.88.99.1 written as 6to4:
>
> default via 2002:c058:6301:: dev 6to4
>
> A package to 2001:: would fall through the try_6to4 check to the
> IPv4-compat check and die there.
I don't understand what you're trying to fix. For a 6to4 tunnel, this has
always worked fine for me, as far as I remember:
default via ::192.88.99.1 dev 6to4
> This patch makes try_6to4 use the address of the Next-Hop instead,
> respecting
> the routing table. Users are encouraged to have a route 2002::/16 to the
> tunnel device anyway, making all other 6to4 hosts direct neighbours.
And where exactly is that "encouragement" coming from?
--
Rémi Denis-Courmont
^ permalink raw reply
* consider 2.6.31 a done deal...
From: David Miller @ 2009-08-24 6:21 UTC (permalink / raw)
To: netdev
At least that should be your mindset when you submit changes
at this point. With the net-2.6 pull request I just sent to
Linus, I really don't want to see anything submitted for
net-2.6 unless it is EARTH SHATTERING.
And chances are, the "super important" bug fix you might have for your
driver is absolutely not EARTH SHATTERING.
So don't even try to slip it by me. Ok? :-)
net-next-2.6 submissions, on the other hand, are very highly
encouraged :-)
Thanks!
^ permalink raw reply
* [GIT]: Networking
From: David Miller @ 2009-08-24 6:18 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
1) Improper error return in allocation failure case in xt_quota
netfilter module results in NULL deref, from Patrick McHardy.
2) Use the tasklet_hrtimer facility added by Peter Z. in order to
fix hrtimers in networking that can't actually safely run from
HW interrupt context.
3) LLC protocol leaks some bytes to userspace via ->getname().
Fix from Jiri Slaby.
4) Fix an ipv6 commit that broke bind() error reporting to userspace.
From Bruno Prémont.
5) Fix bonding with ibm_newemac, from Petri Gynther.
6) pxaficp-ir netdev_ops conversion was buggy, fix from Marek Vasut.
7) ks8851 build fix from Randy Dunlap
8) Orinoco and RTL8187 wireless fixes from John Linville and
Herton Ronaldo Krzesinski respectively.
9) netpoll transmit locking fixes from Dongdong Deng, and he also
added a check so that we can quickly discover any drivers that
are still buggy in this regard.
Please pull, thanks a lot!
The following changes since commit 3edf2fb9d80a46d6c32ba12547a42419845b4b76:
Linus Torvalds (1):
Merge branch 'for-linus' of git://git.kernel.org/.../jbarnes/pci-2.6
are available in the git repository at:
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git master
Andreas Mohr (1):
net: Fix Micrel KSZ8842 Kconfig description
Bruno Prémont (1):
ipv6: Fix commit 63d9950b08184e6531adceb65f64b429909cc101 (ipv6: Make v4-mapped bindings consistent with IPv4)
David S. Miller (4):
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-2.6
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-2.6
pkt_sched: Convert qdisc_watchdog to tasklet_hrtimer
pkt_sched: Convert CBQ to tasklet_hrtimer.
Dongdong Deng (3):
netpoll: warning for ndo_start_xmit returns with interrupts enabled
drivers/net: fixed drivers that support netpoll use ndo_start_xmit()
smc91x: let smc91x work well under netpoll
Herton Ronaldo Krzesinski (1):
rtl8187: always set MSR_LINK_ENEDCA flag with RTL8187B
Jiri Slaby (1):
NET: llc, zero sockaddr_llc struct
Johannes Berg (1):
mac80211: fix todo lock
John W. Linville (1):
orinoco: correct key bounds check in orinoco_hw_get_tkip_iv
Krzysztof Hałasa (1):
E100: fix interaction with swiotlb on X86.
Marek Vasut (1):
pxaficp-ir: remove incorrect net_device_ops
Patrick McHardy (1):
netfilter: xt_quota: fix wrong return value (error case)
Petri Gynther (1):
ibm_newemac: emac_close() needs to call netif_carrier_off()
Randy Dunlap (1):
net: fix ks8851 build errors
Roel Kluin (1):
yellowfin: Fix buffer underrun after dev_alloc_skb() failure
Wan ZongShun (1):
net: Rename MAC platform driver for w90p910 platform
drivers/net/Kconfig | 4 ++-
drivers/net/arm/w90p910_ether.c | 4 +-
drivers/net/e100.c | 2 +-
drivers/net/fec_mpc52xx.c | 5 ++-
drivers/net/ibm_newemac/core.c | 2 +
drivers/net/irda/pxaficp_ir.c | 4 +--
drivers/net/ixp2000/ixpdev.c | 5 ++-
drivers/net/macb.c | 7 +++--
drivers/net/mlx4/en_tx.c | 5 ++-
drivers/net/smc91x.c | 40 +++++++++++++++------------
drivers/net/wireless/orinoco/hw.c | 2 +-
drivers/net/wireless/rtl818x/rtl8187_dev.c | 14 +++++++---
drivers/net/yellowfin.c | 28 ++++++++++++-------
include/net/pkt_sched.h | 4 +-
net/core/netpoll.c | 5 +++
net/ipv6/af_inet6.c | 4 ++-
net/llc/af_llc.c | 1 +
net/mac80211/key.c | 28 ++++++++++---------
net/netfilter/xt_quota.c | 2 +-
net/sched/sch_api.c | 8 +++---
net/sched/sch_cbq.c | 23 +++++++++-------
21 files changed, 117 insertions(+), 80 deletions(-)
^ permalink raw reply
* Re: netfilter: xt_quota: fix wrong return value (error case)
From: David Miller @ 2009-08-24 6:13 UTC (permalink / raw)
To: kaber; +Cc: netfilter-devel, netdev
Applied, thanks!
^ permalink raw reply
* Re: [PATCH] [net] smc91x: let smc91x work well under netpoll
From: David Miller @ 2009-08-24 5:59 UTC (permalink / raw)
To: Dongdong.deng; +Cc: nico, mpm, linux-kernel, netdev, jason.wessel
In-Reply-To: <1251085351.6588.21.camel@dengdd-desktop>
From: DDD <Dongdong.deng@windriver.com>
Date: Mon, 24 Aug 2009 11:42:31 +0800
> The NETPOLL requires that interrupts remain disabled in its callbacks.
>
> Using *_irq_save()/irq_restore() to replace *_irq_disable()/irq_enable()
> functions in NETPOLL's callbacks of smc91x, so that it doesn't enable
> interrupts when already disabled, and kgdboe/netconsole would work
> properly over smc91x.
>
> Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
> Acked-by: Nicolas Pitre <nico@cam.org>
Applied, thanks.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox