* Re: Nested function in drivers/of/of_mdio.c
From: vb @ 2009-10-07 16:23 UTC (permalink / raw)
To: Grant Likely; +Cc: netdev, linuxppc, Andy Fleming, David S. Miller
In-Reply-To: <fa686aa40910070911x769d7d41u908fbcf6b0980962@mail.gmail.com>
Guys, are there other instances of nested C functions in the codebase
or was this the first attempt?
On Wed, Oct 7, 2009 at 9:11 AM, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Wed, Oct 7, 2009 at 9:15 AM, Jérôme Pouiller <jezz@sysmic.org> wrote:
>> Dear,
>>
>> I have a problem with commit 8bc487d150b939e69830c39322df4ee486efe381
>> in file drivers/of/of_mdio.c in function of_phy_find_device.
>>
>> As you see, this function define match() as a nested function. My
>> compiler (powerpc-e500-linux-gnu-gcc-3.4.1) raise an error during link
>> due to this nested definition:
>> drivers/built-in.o(.text+0x5e2a4): In function `of_phy_find_device': /home/jezz/linux-next/drivers/of/of_mdio.c:107:
>> undefined reference to `__trampoline_setup'
>>
>> I am sure I could solve problem by rebuilding my toolchain.
>> Nevertheless, I think nested function definition is not perfectly
>> supported by all compilers. Also, I suggest to place function match()
>> outside of scope of of_phy_find_device as in following patch.
>
> I'm okay with that, but if you're moving code out of the file scope,
> then please rename the function to of_phy_match() to avoid global
> namespace conflicts.
>
> g.
>
>>
>> diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
>> index bacaa53..c7b2e26 100644
>> --- a/drivers/of/of_mdio.c
>> +++ b/drivers/of/of_mdio.c
>> @@ -97,6 +97,10 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
>> }
>> EXPORT_SYMBOL(of_mdiobus_register);
>>
>> +static int match(struct device *dev, void *phy_np)
>> +{
>> + return dev_archdata_get_node(&dev->archdata) == phy_np;
>> +}
>> /**
>> * of_phy_find_device - Give a PHY node, find the phy_device
>> * @phy_np: Pointer to the phy's device tree node
>> @@ -106,11 +110,6 @@ EXPORT_SYMBOL(of_mdiobus_register);
>> struct phy_device *of_phy_find_device(struct device_node *phy_np)
>> {
>> struct device *d;
>> - int match(struct device *dev, void *phy_np)
>> - {
>> - return dev_archdata_get_node(&dev->archdata) == phy_np;
>> - }
>> -
>> if (!phy_np)
>> return NULL;
>>
>>
>> What do you think about it?
>>
>> Best regards,
>>
>> --
>> Jérôme Pouiller (jezz AT sysmic DOT org)
>>
>
>
>
> --
> Grant Likely, B.Sc., P.Eng.
> Secret Lab Technologies Ltd.
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
^ permalink raw reply
* [PATCH 2/2] [RFC] Add c/r support for connected INET sockets
From: Dan Smith @ 2009-10-07 16:29 UTC (permalink / raw)
To: containers-qjLDD68F18O7TbgM5vRIOg
Cc: John Dykstra, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1254932945-12578-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
This patch adds basic support for C/R of open INET sockets. I think that
all the important bits of the TCP and ICSK socket structures is saved,
but I think there is still some additional IPv6 stuff that needs to be
handled.
With this patch applied, the following script can be used to demonstrate
the functionality:
https://lists.linux-foundation.org/pipermail/containers/2009-October/021239.html
It shows that this enables migration of a sendmail process with open
connections from one machine to another without dropping.
Now that listening socket support is in the c/r tree, I think it is
a good time to start fielding comments and suggestions on the
connected part, as I think lots of folks have input on how to make it
better, safer, etc.
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Oren Laadan <orenl-RdfvBDnrOixBDgjK7y7TUQ@public.gmane.org>
Cc: John Dykstra <jdykstra72-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
checkpoint/sys.c | 4 +
include/linux/checkpoint_hdr.h | 97 +++++++++++++++++++
include/linux/checkpoint_types.h | 2 +
net/checkpoint.c | 25 ++----
net/ipv4/checkpoint.c | 192 ++++++++++++++++++++++++++++++++++++++
5 files changed, 303 insertions(+), 17 deletions(-)
diff --git a/checkpoint/sys.c b/checkpoint/sys.c
index 260a1ee..4ec4dd9 100644
--- a/checkpoint/sys.c
+++ b/checkpoint/sys.c
@@ -221,6 +221,8 @@ static void ckpt_ctx_free(struct ckpt_ctx *ctx)
kfree(ctx->pids_arr);
+ sock_list_free(&ctx->listen_sockets);
+
kfree(ctx);
}
@@ -249,6 +251,8 @@ static struct ckpt_ctx *ckpt_ctx_alloc(int fd, unsigned long uflags,
spin_lock_init(&ctx->lock);
#endif
+ INIT_LIST_HEAD(&ctx->listen_sockets);
+
err = -EBADF;
ctx->file = fget(fd);
if (!ctx->file)
diff --git a/include/linux/checkpoint_hdr.h b/include/linux/checkpoint_hdr.h
index b5f958e..2693a5d 100644
--- a/include/linux/checkpoint_hdr.h
+++ b/include/linux/checkpoint_hdr.h
@@ -16,6 +16,7 @@
#include <linux/socket.h>
#include <linux/un.h>
#include <linux/in.h>
+#include <linux/in6.h>
#else
#include <sys/socket.h>
#include <sys/un.h>
@@ -475,6 +476,102 @@ struct ckpt_hdr_socket_unix {
struct ckpt_hdr_socket_inet {
struct ckpt_hdr h;
+ __u32 daddr;
+ __u32 rcv_saddr;
+ __u32 saddr;
+ __u16 dport;
+ __u16 num;
+ __u16 sport;
+ __s16 uc_ttl;
+ __u16 cmsg_flags;
+
+ struct {
+ __u64 timeout;
+ __u32 ato;
+ __u32 lrcvtime;
+ __u16 last_seg_size;
+ __u16 rcv_mss;
+ __u8 pending;
+ __u8 quick;
+ __u8 pingpong;
+ __u8 blocked;
+ } icsk_ack __attribute__ ((aligned(8)));
+
+ /* FIXME: Skipped opt, tos, multicast, cork settings */
+
+ struct {
+ __u64 last_synq_overflow;
+
+ __u32 rcv_nxt;
+ __u32 copied_seq;
+ __u32 rcv_wup;
+ __u32 snd_nxt;
+ __u32 snd_una;
+ __u32 snd_sml;
+ __u32 rcv_tstamp;
+ __u32 lsndtime;
+
+ __u32 snd_wl1;
+ __u32 snd_wnd;
+ __u32 max_window;
+ __u32 mss_cache;
+ __u32 window_clamp;
+ __u32 rcv_ssthresh;
+ __u32 frto_highmark;
+
+ __u32 srtt;
+ __u32 mdev;
+ __u32 mdev_max;
+ __u32 rttvar;
+ __u32 rtt_seq;
+
+ __u32 packets_out;
+ __u32 retrans_out;
+
+ __u32 snd_up;
+ __u32 rcv_wnd;
+ __u32 write_seq;
+ __u32 pushed_seq;
+ __u32 lost_out;
+ __u32 sacked_out;
+ __u32 fackets_out;
+ __u32 tso_deferred;
+ __u32 bytes_acked;
+
+ __s32 lost_cnt_hint;
+ __u32 retransmit_high;
+
+ __u32 lost_retrans_low;
+
+ __u32 prior_ssthresh;
+ __u32 high_seq;
+
+ __u32 retrans_stamp;
+ __u32 undo_marker;
+ __s32 undo_retrans;
+ __u32 total_retrans;
+
+ __u32 urg_seq;
+ __u32 keepalive_time;
+ __u32 keepalive_intvl;
+
+ __u16 urg_data;
+ __u16 advmss;
+ __u8 frto_counter;
+ __u8 nonagle;
+
+ __u8 ecn_flags;
+ __u8 reordering;
+
+ __u8 keepalive_probes;
+ } tcp __attribute__ ((aligned(8)));
+
+ struct {
+ struct in6_addr saddr;
+ struct in6_addr rcv_saddr;
+ struct in6_addr daddr;
+ } inet6 __attribute__ ((aligned(8)));
+
__u32 laddr_len;
__u32 raddr_len;
struct sockaddr_in laddr;
diff --git a/include/linux/checkpoint_types.h b/include/linux/checkpoint_types.h
index fa57cdc..91c141b 100644
--- a/include/linux/checkpoint_types.h
+++ b/include/linux/checkpoint_types.h
@@ -65,6 +65,8 @@ struct ckpt_ctx {
struct list_head pgarr_list; /* page array to dump VMA contents */
struct list_head pgarr_pool; /* pool of empty page arrays chain */
+ struct list_head listen_sockets;/* listening parent sockets */
+
/* [multi-process checkpoint] */
struct task_struct **tasks_arr; /* array of all tasks [checkpoint] */
int nr_tasks; /* size of tasks array */
diff --git a/net/checkpoint.c b/net/checkpoint.c
index e7e8e75..3d6da68 100644
--- a/net/checkpoint.c
+++ b/net/checkpoint.c
@@ -90,6 +90,7 @@ static int sock_copy_buffers(struct sk_buff_head *from,
static int __sock_write_buffers(struct ckpt_ctx *ctx,
struct sk_buff_head *queue,
+ uint16_t family,
int dst_objref)
{
struct sk_buff *skb;
@@ -98,11 +99,7 @@ static int __sock_write_buffers(struct ckpt_ctx *ctx,
struct ckpt_hdr_socket_buffer *h;
int ret = 0;
- /* FIXME: This could be a false positive for non-unix
- * buffers, so add a type check here in the
- * future
- */
- if (UNIXCB(skb).fp) {
+ if ((family == AF_UNIX) && UNIXCB(skb).fp) {
ckpt_write_err(ctx, "TE", "af_unix: pass fd", -EBUSY);
return -EBUSY;
}
@@ -141,6 +138,7 @@ static int __sock_write_buffers(struct ckpt_ctx *ctx,
static int sock_write_buffers(struct ckpt_ctx *ctx,
struct sk_buff_head *queue,
+ uint16_t family,
int dst_objref)
{
struct ckpt_hdr_socket_queue *h;
@@ -160,7 +158,7 @@ static int sock_write_buffers(struct ckpt_ctx *ctx,
h->skb_count = ret;
ret = ckpt_write_obj(ctx, (struct ckpt_hdr *) h);
if (!ret)
- ret = __sock_write_buffers(ctx, &tmpq, dst_objref);
+ ret = __sock_write_buffers(ctx, &tmpq, family, dst_objref);
out:
ckpt_hdr_put(ctx, h);
@@ -182,12 +180,14 @@ int sock_deferred_write_buffers(void *data)
return dst_objref;
}
- ret = sock_write_buffers(ctx, &dq->sk->sk_receive_queue, dst_objref);
+ ret = sock_write_buffers(ctx, &dq->sk->sk_receive_queue,
+ dq->sk->sk_family, dst_objref);
ckpt_debug("write recv buffers: %i\n", ret);
if (ret < 0)
return ret;
- ret = sock_write_buffers(ctx, &dq->sk->sk_write_queue, dst_objref);
+ ret = sock_write_buffers(ctx, &dq->sk->sk_write_queue,
+ dq->sk->sk_family, dst_objref);
ckpt_debug("write send buffers: %i\n", ret);
return ret;
@@ -710,15 +710,6 @@ struct sock *do_sock_restore(struct ckpt_ctx *ctx)
if (ret < 0)
goto err;
- if ((h->sock_common.family == AF_INET) &&
- (h->sock.state != TCP_LISTEN)) {
- /* Temporary hack to enable restore of TCP_LISTEN sockets
- * while forcing anything else to a closed state
- */
- sock->sk->sk_state = TCP_CLOSE;
- sock->state = SS_UNCONNECTED;
- }
-
ckpt_hdr_put(ctx, h);
return sock->sk;
err:
diff --git a/net/ipv4/checkpoint.c b/net/ipv4/checkpoint.c
index 9cbbf5e..0edfa3e 100644
--- a/net/ipv4/checkpoint.c
+++ b/net/ipv4/checkpoint.c
@@ -17,6 +17,7 @@
#include <linux/deferqueue.h>
#include <net/tcp_states.h>
#include <net/tcp.h>
+#include <net/ipv6.h>
struct dq_sock {
struct ckpt_ctx *ctx;
@@ -28,6 +29,176 @@ struct dq_buffers {
struct sock *sk;
};
+static int sock_is_parent(struct sock *sk, struct sock *parent)
+{
+ return inet_sk(sk)->sport == inet_sk(parent)->sport;
+}
+
+static struct sock *sock_get_parent(struct ckpt_ctx *ctx, struct sock *sk)
+{
+ return sock_list_find(&ctx->listen_sockets, sk, sock_is_parent);
+}
+
+static int sock_hash_parent(void *data)
+{
+ struct dq_sock *dq = (struct dq_sock *)data;
+ struct sock *parent;
+
+ printk("Doing post-restart hash\n");
+
+ dq->sk->sk_prot->hash(dq->sk);
+
+ parent = sock_get_parent(dq->ctx, dq->sk);
+ if (parent) {
+ inet_sk(dq->sk)->num = ntohs(inet_sk(dq->sk)->sport);
+ local_bh_disable();
+ __inet_inherit_port(parent, dq->sk);
+ local_bh_enable();
+ } else {
+ inet_sk(dq->sk)->num = 0;
+ inet_hash_connect(&tcp_death_row, dq->sk);
+ inet_sk(dq->sk)->num = ntohs(inet_sk(dq->sk)->sport);
+ }
+
+ return 0;
+}
+
+static int sock_defer_hash(struct ckpt_ctx *ctx, struct sock *sock)
+{
+ struct dq_sock dq;
+
+ dq.sk = sock;
+ dq.ctx = ctx;
+
+ return deferqueue_add(ctx->deferqueue, &dq, sizeof(dq),
+ sock_hash_parent, NULL);
+}
+
+static int sock_inet_tcp_cptrst(struct ckpt_ctx *ctx,
+ struct tcp_sock *sk,
+ struct ckpt_hdr_socket_inet *hh,
+ int op)
+{
+ CKPT_COPY(op, hh->tcp.rcv_nxt, sk->rcv_nxt);
+ CKPT_COPY(op, hh->tcp.copied_seq, sk->copied_seq);
+ CKPT_COPY(op, hh->tcp.rcv_wup, sk->rcv_wup);
+ CKPT_COPY(op, hh->tcp.snd_nxt, sk->snd_nxt);
+ CKPT_COPY(op, hh->tcp.snd_una, sk->snd_una);
+ CKPT_COPY(op, hh->tcp.snd_sml, sk->snd_sml);
+ CKPT_COPY(op, hh->tcp.rcv_tstamp, sk->rcv_tstamp);
+ CKPT_COPY(op, hh->tcp.lsndtime, sk->lsndtime);
+
+ CKPT_COPY(op, hh->tcp.snd_wl1, sk->snd_wl1);
+ CKPT_COPY(op, hh->tcp.snd_wnd, sk->snd_wnd);
+ CKPT_COPY(op, hh->tcp.max_window, sk->max_window);
+ CKPT_COPY(op, hh->tcp.mss_cache, sk->mss_cache);
+ CKPT_COPY(op, hh->tcp.window_clamp, sk->window_clamp);
+ CKPT_COPY(op, hh->tcp.rcv_ssthresh, sk->rcv_ssthresh);
+ CKPT_COPY(op, hh->tcp.frto_highmark, sk->frto_highmark);
+ CKPT_COPY(op, hh->tcp.advmss, sk->advmss);
+ CKPT_COPY(op, hh->tcp.frto_counter, sk->frto_counter);
+ CKPT_COPY(op, hh->tcp.nonagle, sk->nonagle);
+
+ CKPT_COPY(op, hh->tcp.srtt, sk->srtt);
+ CKPT_COPY(op, hh->tcp.mdev, sk->mdev);
+ CKPT_COPY(op, hh->tcp.mdev_max, sk->mdev_max);
+ CKPT_COPY(op, hh->tcp.rttvar, sk->rttvar);
+ CKPT_COPY(op, hh->tcp.rtt_seq, sk->rtt_seq);
+
+ CKPT_COPY(op, hh->tcp.packets_out, sk->packets_out);
+ CKPT_COPY(op, hh->tcp.retrans_out, sk->retrans_out);
+
+ CKPT_COPY(op, hh->tcp.urg_data, sk->urg_data);
+ CKPT_COPY(op, hh->tcp.ecn_flags, sk->ecn_flags);
+ CKPT_COPY(op, hh->tcp.reordering, sk->reordering);
+ CKPT_COPY(op, hh->tcp.snd_up, sk->snd_up);
+
+ CKPT_COPY(op, hh->tcp.keepalive_probes, sk->keepalive_probes);
+
+ CKPT_COPY(op, hh->tcp.rcv_wnd, sk->rcv_wnd);
+ CKPT_COPY(op, hh->tcp.write_seq, sk->write_seq);
+ CKPT_COPY(op, hh->tcp.pushed_seq, sk->pushed_seq);
+ CKPT_COPY(op, hh->tcp.lost_out, sk->lost_out);
+ CKPT_COPY(op, hh->tcp.sacked_out, sk->sacked_out);
+ CKPT_COPY(op, hh->tcp.fackets_out, sk->fackets_out);
+ CKPT_COPY(op, hh->tcp.tso_deferred, sk->tso_deferred);
+ CKPT_COPY(op, hh->tcp.bytes_acked, sk->bytes_acked);
+
+ CKPT_COPY(op, hh->tcp.lost_cnt_hint, sk->lost_cnt_hint);
+ CKPT_COPY(op, hh->tcp.retransmit_high, sk->retransmit_high);
+
+ CKPT_COPY(op, hh->tcp.lost_retrans_low, sk->lost_retrans_low);
+
+ CKPT_COPY(op, hh->tcp.prior_ssthresh, sk->prior_ssthresh);
+ CKPT_COPY(op, hh->tcp.high_seq, sk->high_seq);
+
+ CKPT_COPY(op, hh->tcp.retrans_stamp, sk->retrans_stamp);
+ CKPT_COPY(op, hh->tcp.undo_marker, sk->undo_marker);
+ CKPT_COPY(op, hh->tcp.undo_retrans, sk->undo_retrans);
+ CKPT_COPY(op, hh->tcp.total_retrans, sk->total_retrans);
+
+ CKPT_COPY(op, hh->tcp.urg_seq, sk->urg_seq);
+ CKPT_COPY(op, hh->tcp.keepalive_time, sk->keepalive_time);
+ CKPT_COPY(op, hh->tcp.keepalive_intvl, sk->keepalive_intvl);
+
+ return 0;
+}
+
+static int sock_inet_cptrst(struct ckpt_ctx *ctx,
+ struct sock *sock,
+ struct ckpt_hdr_socket_inet *hh,
+ int op)
+{
+ struct inet_sock *sk = inet_sk(sock);
+ struct inet_connection_sock *icsk = inet_csk(sock);
+ int ret;
+
+ CKPT_COPY(op, hh->daddr, sk->daddr);
+ CKPT_COPY(op, hh->rcv_saddr, sk->rcv_saddr);
+ CKPT_COPY(op, hh->dport, sk->dport);
+ CKPT_COPY(op, hh->num, sk->num);
+ CKPT_COPY(op, hh->saddr, sk->saddr);
+ CKPT_COPY(op, hh->sport, sk->sport);
+ CKPT_COPY(op, hh->uc_ttl, sk->uc_ttl);
+ CKPT_COPY(op, hh->cmsg_flags, sk->cmsg_flags);
+
+ CKPT_COPY(op, hh->icsk_ack.pending, icsk->icsk_ack.pending);
+ CKPT_COPY(op, hh->icsk_ack.quick, icsk->icsk_ack.quick);
+ CKPT_COPY(op, hh->icsk_ack.pingpong, icsk->icsk_ack.pingpong);
+ CKPT_COPY(op, hh->icsk_ack.blocked, icsk->icsk_ack.blocked);
+ CKPT_COPY(op, hh->icsk_ack.ato, icsk->icsk_ack.ato);
+ CKPT_COPY(op, hh->icsk_ack.timeout, icsk->icsk_ack.timeout);
+ CKPT_COPY(op, hh->icsk_ack.lrcvtime, icsk->icsk_ack.lrcvtime);
+ CKPT_COPY(op,
+ hh->icsk_ack.last_seg_size, icsk->icsk_ack.last_seg_size);
+ CKPT_COPY(op, hh->icsk_ack.rcv_mss, icsk->icsk_ack.rcv_mss);
+
+ if (sock->sk_protocol == IPPROTO_TCP)
+ ret = sock_inet_tcp_cptrst(ctx, tcp_sk(sock), hh, op);
+ else if (sock->sk_protocol == IPPROTO_UDP)
+ ret = 0;
+ else {
+ ckpt_write_err(ctx, "T", "unknown socket protocol %d",
+ sock->sk_protocol);
+ ret = -EINVAL;
+ }
+
+ if (sock->sk_family == AF_INET6) {
+ struct ipv6_pinfo *inet6 = inet6_sk(sock);
+ if (op == CKPT_CPT) {
+ ipv6_addr_copy(&hh->inet6.saddr, &inet6->saddr);
+ ipv6_addr_copy(&hh->inet6.rcv_saddr, &inet6->rcv_saddr);
+ ipv6_addr_copy(&hh->inet6.daddr, &inet6->daddr);
+ } else {
+ ipv6_addr_copy(&inet6->saddr, &hh->inet6.saddr);
+ ipv6_addr_copy(&inet6->rcv_saddr, &hh->inet6.rcv_saddr);
+ ipv6_addr_copy(&inet6->daddr, &hh->inet6.daddr);
+ }
+ }
+
+ return ret;
+}
+
int inet_checkpoint(struct ckpt_ctx *ctx, struct socket *sock)
{
struct ckpt_hdr_socket_inet *in;
@@ -43,6 +214,10 @@ int inet_checkpoint(struct ckpt_ctx *ctx, struct socket *sock)
if (ret)
goto out;
+ ret = sock_inet_cptrst(ctx, sock->sk, in, CKPT_CPT);
+ if (ret < 0)
+ goto out;
+
ret = ckpt_write_obj(ctx, (struct ckpt_hdr *) in);
out:
ckpt_hdr_put(ctx, in);
@@ -209,8 +384,25 @@ int inet_restore(struct ckpt_ctx *ctx,
ckpt_debug("inet listen: %i\n", ret);
if (ret < 0)
goto out;
+
+ ret = sock_list_add(&ctx->listen_sockets, sock->sk);
+ if (ret < 0)
+ goto out;
}
} else {
+ ret = sock_inet_cptrst(ctx, sock->sk, in, CKPT_RST);
+ printk("sock_inet_cptrst: %i\n", ret);
+ if (ret)
+ goto out;
+
+ if ((h->sock.state == TCP_ESTABLISHED) &&
+ (h->sock.protocol == IPPROTO_TCP)) {
+ /* Delay hashing this sock until the end so we can
+ * hook it up with its parent (if appropriate)
+ */
+ ret = sock_defer_hash(ctx, sock->sk);
+ }
+
if (!sock_flag(sock->sk, SOCK_DEAD))
ret = inet_defer_restore_buffers(ctx, sock->sk);
}
--
1.6.2.5
^ permalink raw reply related
* Re: [BUG net-2.6] bluetooth/rfcomm : sleeping function called from invalid context at mm/slub.c:1719
From: Oliver Hartkopp @ 2009-10-07 17:16 UTC (permalink / raw)
To: Dave Young
Cc: Marcel Holtmann, Linux Netdev List,
linux-bluetooth-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <4AC6247E.7050308-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
Oliver Hartkopp wrote:
> Dave Young wrote:
>> On Fri, Oct 2, 2009 at 2:28 PM, Oliver Hartkopp <oliver-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org> wrote:
>>> Hello Marcel,
>>>
>>> with current net-2.6 tree ...
>>>
>>> While starting my PPP Bluetooth dialup networking, i got this:
>> Hi, oliver
>>
>> please try following patch:
>> http://patchwork.kernel.org/patch/51326/
>
> Hi Dave,
>
> that fixed it at ppp startup!
>
> Tested-by: Oliver Hartkopp <oliver-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
Hi Dave,
what's the state of this patch?
Has it gone upstream?
Regards,
Oliver
>
> Btw. when shutting down the ppp connection i still get this:
>
> [ 361.996887] INFO: trying to register non-static key.
> [ 361.996897] the code is fine but needs lockdep annotation.
> [ 361.996902] turning off the locking correctness validator.
> [ 361.996912] Pid: 0, comm: swapper Not tainted 2.6.31-08939-gdb8abec-dirty #22
> [ 361.996919] Call Trace:
> [ 361.996933] [<c12e4fb2>] ? printk+0xf/0x11
> [ 361.996947] [<c1042214>] register_lock_class+0x5a/0x295
> [ 361.996957] [<c1043af2>] __lock_acquire+0x9b/0xc03
> [ 361.996967] [<c104464b>] ? __lock_acquire+0xbf4/0xc03
> [ 361.996985] [<fa59a168>] ? l2cap_get_chan_by_scid+0x35/0x43 [l2cap]
> [ 361.996995] [<c104491f>] ? lock_release_non_nested+0x17b/0x1db
> [ 361.997008] [<fa59a168>] ? l2cap_get_chan_by_scid+0x35/0x43 [l2cap]
> [ 361.997018] [<c10426fd>] ? trace_hardirqs_off+0xb/0xd
> [ 361.997028] [<c10446b6>] lock_acquire+0x5c/0x73
> [ 361.997039] [<c124cd14>] ? skb_dequeue+0x12/0x4c
> [ 361.997049] [<c12e6e23>] _spin_lock_irqsave+0x24/0x34
> [ 361.997058] [<c124cd14>] ? skb_dequeue+0x12/0x4c
> [ 361.997066] [<c124cd14>] skb_dequeue+0x12/0x4c
> [ 361.997075] [<c124d579>] skb_queue_purge+0x14/0x1b
> [ 361.997088] [<fa59ce3f>] l2cap_recv_frame+0xe9e/0x129a [l2cap]
> [ 361.997099] [<c10421d1>] ? register_lock_class+0x17/0x295
> [ 361.997110] [<c104464b>] ? __lock_acquire+0xbf4/0xc03
> [ 361.997128] [<c104464b>] ? __lock_acquire+0xbf4/0xc03
> [ 361.997139] [<c120de74>] ? uhci_giveback_urb+0xf2/0x162
> [ 361.997163] [<f8bb4c45>] ? hci_rx_task+0xfe/0x1f8 [bluetooth]
> [ 361.997177] [<fa59d2e4>] l2cap_recv_acldata+0xa9/0x1be [l2cap]
> [ 361.997190] [<fa59d23b>] ? l2cap_recv_acldata+0x0/0x1be [l2cap]
> [ 361.997208] [<f8bb4c77>] hci_rx_task+0x130/0x1f8 [bluetooth]
> [ 361.997219] [<c102a098>] tasklet_action+0x6b/0xb2
> [ 361.997228] [<c102a46b>] __do_softirq+0x82/0x101
> [ 361.997237] [<c102a515>] do_softirq+0x2b/0x43
> [ 361.997246] [<c102a619>] irq_exit+0x35/0x68
> [ 361.997256] [<c1004513>] do_IRQ+0x80/0x96
> [ 361.997265] [<c10030ae>] common_interrupt+0x2e/0x34
> [ 361.997275] [<c104007b>] ? tick_device_uses_broadcast+0x71/0x7c
> [ 361.997286] [<c11747a8>] ? acpi_idle_enter_simple+0x103/0x12e
> [ 361.997296] [<c1174515>] acpi_idle_enter_bm+0xc3/0x253
> [ 361.997306] [<c1238b6f>] cpuidle_idle_call+0x60/0x91
> [ 361.997315] [<c1001d44>] cpu_idle+0x49/0x65
> [ 361.997324] [<c12e2f0e>] start_secondary+0x190/0x195
>
>
> Thanks,
> Oliver
>
>
^ permalink raw reply
* Re: [PATCH 2/2] [RFC] Add c/r support for connected INET sockets
From: Serge E. Hallyn @ 2009-10-07 17:19 UTC (permalink / raw)
To: Dan Smith
Cc: containers-qjLDD68F18O7TbgM5vRIOg, John Dykstra,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1254932945-12578-3-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Quoting Dan Smith (danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org):
> This patch adds basic support for C/R of open INET sockets. I think that
> all the important bits of the TCP and ICSK socket structures is saved,
> but I think there is still some additional IPv6 stuff that needs to be
> handled.
>
> With this patch applied, the following script can be used to demonstrate
> the functionality:
>
> https://lists.linux-foundation.org/pipermail/containers/2009-October/021239.html
>
> It shows that this enables migration of a sendmail process with open
> connections from one machine to another without dropping.
neato
> Now that listening socket support is in the c/r tree, I think it is
> a good time to start fielding comments and suggestions on the
> connected part, as I think lots of folks have input on how to make it
> better, safer, etc.
One thing:
> +static int sock_inet_cptrst(struct ckpt_ctx *ctx,
> + struct sock *sock,
> + struct ckpt_hdr_socket_inet *hh,
> + int op)
> +{
> + struct inet_sock *sk = inet_sk(sock);
> + struct inet_connection_sock *icsk = inet_csk(sock);
> + int ret;
> +
> + CKPT_COPY(op, hh->daddr, sk->daddr);
> + CKPT_COPY(op, hh->rcv_saddr, sk->rcv_saddr);
> + CKPT_COPY(op, hh->dport, sk->dport);
> + CKPT_COPY(op, hh->num, sk->num);
> + CKPT_COPY(op, hh->saddr, sk->saddr);
> + CKPT_COPY(op, hh->sport, sk->sport);
This becomes an easy way around CAP_NET_BIND_SERVICE right? Or
will that be caught by something already done in your listen
patch after this step?
thanks,
-serge
^ permalink raw reply
* Re: [PATCH 2/2] [RFC] Add c/r support for connected INET sockets
From: Dan Smith @ 2009-10-07 17:22 UTC (permalink / raw)
To: Serge E. Hallyn
Cc: containers-qjLDD68F18O7TbgM5vRIOg, John Dykstra,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20091007171907.GA20572-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
>> + CKPT_COPY(op, hh->daddr, sk->daddr);
>> + CKPT_COPY(op, hh->rcv_saddr, sk->rcv_saddr);
>> + CKPT_COPY(op, hh->dport, sk->dport);
>> + CKPT_COPY(op, hh->num, sk->num);
>> + CKPT_COPY(op, hh->saddr, sk->saddr);
>> + CKPT_COPY(op, hh->sport, sk->sport);
SH> This becomes an easy way around CAP_NET_BIND_SERVICE right? Or
SH> will that be caught by something already done in your listen patch
SH> after this step?
Actually, yeah, you're right. I was going to say that we'd catch it
because we also do a bind(), but there's no guarantee that the
sockaddr_in we use for bind() is the same as this :D
--
Dan Smith
IBM Linux Technology Center
email: danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org
^ permalink raw reply
* [PATCH] Generalize socket rx gap / receive queue overflow cmsg
From: Neil Horman @ 2009-10-07 18:08 UTC (permalink / raw)
To: netdev; +Cc: eric.dumazet, davem, socketcan, nhorman
Create a new socket level option to report number of queue overflows
Recently I augmented the AF_PACKET protocol to report the number of frames lost
on the socket receive queue between any two enqueued frames. This value was
exported via a SOL_PACKET level cmsg. AFter I completed that work it was
requested that this feature be generalized so that any datagram oriented socket
could make use of this option. As such I've created this patch, It creates a
new SOL_SOCKET level option called SO_RXQ_OVFL, which when enabled exports a
SOL_SOCKET level cmsg that reports the nubmer of times the sk_receive_queue
overflowed between any two given frames. It also augments the AF_PACKET
protocol to take advantage of this new feature (as it previously did not touch
sk->sk_drops, which this patch uses to record the overflow count). Tested
successfully by me.
Notes:
1) Unlike my previous patch, this patch simply records the sk_drops value, which
is not a number of drops between packets, but rather a total number of drops.
Deltas must be computed in user space.
2) While this patch currently works with datagram oriented protocols, it will
also be accepted by non-datagram oriented protocols. I'm not sure if thats
agreeable to everyone, but my argument in favor of doing so is that, for those
protocols which aren't applicable to this option, sk_drops will always be zero,
and reporting no drops on a receive queue that isn't used for those
non-participating protocols seems reasonable to me. This also saves us having
to code in a per-protocol opt in mechanism.
3) This applies cleanly to net-next assuming that commit
977750076d98c7ff6cbda51858bb5a5894a9d9ab (my af packet cmsg patch) is reverted.
Neil
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
diff --git a/include/asm-generic/socket.h b/include/asm-generic/socket.h
index 538991c..7cde78e 100644
--- a/include/asm-generic/socket.h
+++ b/include/asm-generic/socket.h
@@ -63,4 +63,5 @@
#define SO_PROTOCOL 38
#define SO_DOMAIN 39
+#define SO_RXQ_OVFL 40
#endif /* __ASM_GENERIC_SOCKET_H */
diff --git a/include/linux/net.h b/include/linux/net.h
index 529a093..b7dafdd 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -69,6 +69,7 @@ struct net;
#define SOCK_NOSPACE 2
#define SOCK_PASSCRED 3
#define SOCK_PASSSEC 4
+#define SOCK_RXQ_OVFL 5
#ifndef ARCH_HAS_SOCKET_TYPES
/**
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index df7b23a..8c866b5 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -389,8 +389,10 @@ struct sk_buff {
#ifdef CONFIG_NETWORK_SECMARK
__u32 secmark;
#endif
-
- __u32 mark;
+ union {
+ __u32 mark;
+ __u32 dropcount;
+ };
__u16 vlan_tci;
diff --git a/net/core/sock.c b/net/core/sock.c
index 7626b6a..8bd366f 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -306,6 +306,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
skb_len = skb->len;
skb_queue_tail(&sk->sk_receive_queue, skb);
+ skb->dropcount = atomic_read(&sk->sk_drops);
if (!sock_flag(sk, SOCK_DEAD))
sk->sk_data_ready(sk, skb_len);
@@ -702,6 +703,12 @@ set_rcvbuf:
/* We implement the SO_SNDLOWAT etc to
not be settable (1003.1g 5.3) */
+ case SO_RXQ_OVFL:
+ if (valbool)
+ set_bit(SOCK_RXQ_OVFL, &sock->flags);
+ else
+ clear_bit(SOCK_RXQ_OVFL, &sock->flags);
+ break;
default:
ret = -ENOPROTOOPT;
break;
@@ -901,6 +908,10 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
v.val = sk->sk_mark;
break;
+ case SO_RXQ_OVFL:
+ v.val = test_bit(SOCK_RXQ_OVFL, &sock->flags);
+ break;
+
default:
return -ENOPROTOOPT;
}
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index d7ecca0..920ae1e 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -617,6 +617,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
if (pskb_trim(skb, snaplen))
goto drop_n_acct;
+ skb->dropcount = atomic_read(&sk->sk_drops);
skb_set_owner_r(skb, sk);
skb->dev = NULL;
skb_dst_drop(skb);
@@ -634,6 +635,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
drop_n_acct:
spin_lock(&sk->sk_receive_queue.lock);
po->stats.tp_drops++;
+ atomic_inc(&sk->sk_drops);
spin_unlock(&sk->sk_receive_queue.lock);
drop_n_restore:
diff --git a/net/socket.c b/net/socket.c
index 7565536..ad157a3 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -673,6 +673,12 @@ static inline int __sock_recvmsg(struct kiocb *iocb, struct socket *sock,
{
int err;
struct sock_iocb *si = kiocb_to_siocb(iocb);
+ struct sk_buff *skb;
+ int rc;
+ struct sock *sk = sock->sk;
+ unsigned long cpu_flags;
+ __u32 gap = 0;
+ int check_drops = test_bit(SOCK_RXQ_OVFL, &sock->flags);
si->sock = sock;
si->scm = NULL;
@@ -684,7 +690,21 @@ static inline int __sock_recvmsg(struct kiocb *iocb, struct socket *sock,
if (err)
return err;
- return sock->ops->recvmsg(iocb, sock, msg, size, flags);
+ if (check_drops) {
+ skb = skb_recv_datagram(sk, flags|MSG_PEEK,
+ flags & MSG_DONTWAIT, &err);
+ if (skb) {
+ gap = skb->dropcount;
+ consume_skb(skb);
+ }
+ }
+
+ rc = sock->ops->recvmsg(iocb, sock, msg, size, flags);
+
+ if (check_drops && (rc > 0))
+ put_cmsg(msg, SOL_SOCKET, SO_RXQ_OVFL, sizeof(__u32), &gap);
+
+ return rc;
}
int sock_recvmsg(struct socket *sock, struct msghdr *msg,
^ permalink raw reply related
* Re: [Bug #14261] e1000e jumbo frames no longer work: 'Unsupported MTU setting'
From: Theodore Tso @ 2009-10-07 18:34 UTC (permalink / raw)
To: Jeff Kirsher
Cc: Nix, e1000-devel, Network Development, Linux Kernel Mailing List,
Alexander Duyck, Jesse Brandeburg, Rafael J. Wysocki,
Kernel Testers List
In-Reply-To: <9929d2390910021513t51827031k16a5bfc538640cbf@mail.gmail.com>
On Fri, Oct 02, 2009 at 03:13:07PM -0700, Jeff Kirsher wrote:
> >> > Patch : http://patchwork.kernel.org/patch/50277/
> >>
> > Most likely because it's not in the Linus' tree yet.
> >
> > [e1000e maintainers, we have a regression fix to merge, please.]
>
> Sorry, I forgot to send this patch out last night. I will send it now.
Do we have a status on this progress of this patch to mainline? Thanks,
- Ted
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
^ permalink raw reply
* Re: [BUG] znet.c sleeping function called from invalid context
From: Mike Frysinger @ 2009-10-07 18:44 UTC (permalink / raw)
To: Michael Hennerich
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Alexander Strakh, David S. Miller,
uclinux-dist-devel, Linux Kernlel Mailing List
In-Reply-To: <200910071847.38163.strakh-ufN2psIa012HXe+LvDLADg@public.gmane.org>
On Wed, Oct 7, 2009 at 14:47, Alexander Strakh wrote:
> KERNEL_VERSION: 2.6.31
> DESCRIBE:
> Driver drivers/net/znet.c might sleep in atomic context, because it calls
> free_dma under claim_dma_lock:
>
> .drivers/net/znet.c:
> 168 static int znet_request_resources (struct net_device *dev)
> ...
> 189 flags = claim_dma_lock();
> 190 free_dma (znet->tx_dma);
> 191 release_dma_lock (flags);
> ...
>
> Path to might_sleep macro from znet_request_resources:
> 1. znet_request_resources calls free_dma at
> arch/blackfin/kernel/bfin_dma_5xx.c:181
> 2. free_dma calls arch/blackfin/kernel/bfin_dma_5xx.c:195
i dont think we need the dmalock mutex. it's only used to protect
read/writes to .chan_status, and that should be atomic already.
-mike
_______________________________________________
Uclinux-dist-devel mailing list
Uclinux-dist-devel@blackfin.uclinux.org
https://blackfin.uclinux.org/mailman/listinfo/uclinux-dist-devel
^ permalink raw reply
* Re: [Bug #14261] e1000e jumbo frames no longer work: 'Unsupported MTU setting'
From: Jeff Kirsher @ 2009-10-07 19:12 UTC (permalink / raw)
To: Theodore Tso, Jeff Kirsher, Rafael J. Wysocki, Nix,
Linux Kernel Mailing List
In-Reply-To: <20091007183453.GD12971@mit.edu>
On Wed, Oct 7, 2009 at 11:34, Theodore Tso <tytso@mit.edu> wrote:
> On Fri, Oct 02, 2009 at 03:13:07PM -0700, Jeff Kirsher wrote:
>> >> > Patch : http://patchwork.kernel.org/patch/50277/
>> >>
>> > Most likely because it's not in the Linus' tree yet.
>> >
>> > [e1000e maintainers, we have a regression fix to merge, please.]
>>
>> Sorry, I forgot to send this patch out last night. I will send it now.
>
> Do we have a status on this progress of this patch to mainline? Thanks,
>
> - Ted
The patch has been submitted and accepted into David Miller's net-2.6
tree. I will submit the patch for 2.6.31 stable tree once it makes it
into Linus's tree later this week.
--
Cheers,
Jeff
^ permalink raw reply
* Re: [r8169.c] support for 8168D/DP was Re: r8169 chips on some Intel D945GSEJT boards fail to work after
From: Xose Vazquez Perez @ 2009-10-07 19:49 UTC (permalink / raw)
To: Francois Romieu; +Cc: netdev, Rainer.Koenig, Simon Farnsworth
In-Reply-To: <20091006060555.GA22811@electric-eye.fr.zoreil.com>
On 10/06/2009 08:05 AM, Francois Romieu wrote:
> Xose Vazquez Perez <xose.vazquez@gmail.com> :
> [...]
>> Francois, is it ready for 2.6.32-rc2 ?
>
> s/rc2/rc3/ otherwise yes.
>
and, how about to send also to stable tree(2.6.31.x) ?
-thanks-
regards,
--
«Allá muevan feroz guerra, ciegos reyes por un palmo más de tierra;
que yo aquí tengo por mío cuanto abarca el mar bravío, a quien nadie
impuso leyes. Y no hay playa, sea cualquiera, ni bandera de esplendor,
que no sienta mi derecho y dé pecho a mi valor.»
^ permalink raw reply
* [PATCH net-next-2.6] bonding: remove useless assignment
From: Nicolas de Pesloüan @ 2009-10-07 20:06 UTC (permalink / raw)
To: netdev; +Cc: David Miller, Jay Vosburgh, bonding-devel
The variable old_active is first set to bond->curr_active_slave.
Then, it is unconditionally set to new_active, without being used in between.
The first assignment, having no side effect, is useless.
Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
---
Resent after fixing tab to space corruption.
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index a7e731f..fce7233 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1084,7 +1084,7 @@ static struct slave *bond_find_best_slave(struct bonding *bond)
int mintime = bond->params.updelay;
int i;
- new_active = old_active = bond->curr_active_slave;
+ new_active = bond->curr_active_slave;
if (!new_active) { /* there were no active slaves left */
if (bond->slave_cnt > 0) /* found one slave */
^ permalink raw reply related
* Re: [Bonding-devel] [PATCH net-next-2.6] bonding: remove useless assignment
From: Nicolas de Pesloüan @ 2009-10-07 20:24 UTC (permalink / raw)
To: netdev; +Cc: Jay Vosburgh, David Miller, bonding-devel
In-Reply-To: <4ACCF4D5.9050502@free.fr>
Nicolas de Pesloüan wrote:
> The variable old_active is first set to bond->curr_active_slave.
> Then, it is unconditionally set to new_active, without being used in between.
>
> The first assignment, having no side effect, is useless.
>
> Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
> Reviewed-by: Jiri Pirko <jpirko@redhat.com>
>
> ---
>
> Resent after fixing tab to space corruption.
>
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index a7e731f..fce7233 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -1084,7 +1084,7 @@ static struct slave *bond_find_best_slave(struct bonding *bond)
> int mintime = bond->params.updelay;
> int i;
>
> - new_active = old_active = bond->curr_active_slave;
> + new_active = bond->curr_active_slave;
>
> if (!new_active) { /* there were no active slaves left */
> if (bond->slave_cnt > 0) /* found one slave */
Apparently still some issues with patch formating. I will investigate this and post later.
Nicolas.
^ permalink raw reply
* Re: [PATCH 0/4][RFC]: coding convention for CCID-struct prefixes
From: David Miller @ 2009-10-07 20:51 UTC (permalink / raw)
To: acme; +Cc: gerrit, dccp, netdev
In-Reply-To: <20091007133159.GI16562@ghostprotocols.net>
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Wed, 7 Oct 2009 10:31:59 -0300
> For the 4 patches:
>
> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
All applied, thanks everyone.
^ permalink raw reply
* Re: [PATCH 3/4] ethoc: align received packet to make IP header at word boundary
From: David Miller @ 2009-10-07 20:52 UTC (permalink / raw)
To: shemminger; +Cc: thomas, netdev
In-Reply-To: <20091007091337.532d9ed1@nehalam>
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 7 Oct 2009 09:13:37 -0700
> On Mon, 5 Oct 2009 17:33:19 +0800
> Thomas Chou <thomas@wytron.com.tw> wrote:
>
>> diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
>> index f92747f..0c6c7f4 100644
>> --- a/drivers/net/ethoc.c
>> +++ b/drivers/net/ethoc.c
>> @@ -399,6 +399,10 @@ static int ethoc_rx(struct net_device *dev, int limit)
>> if (ethoc_update_rx_stats(priv, &bd) == 0) {
>> int size = bd.stat >> 16;
>> struct sk_buff *skb = netdev_alloc_skb(dev, size);
>> +
>> + size -= 4; /* strip the CRC */
>> + skb_reserve(skb, 2); /* align TCP/IP header */
>
> Please use NET_IP_ALIGN rather than hard coding 2 so that the value
> can be changed on a per-cpu architecture basis if desired.
Indeed.
Thomas please send a patch to fix this up, thanks.
^ permalink raw reply
* Re: [PATCH RESEND] include/netdevice.h: fix nanodoc mismatch
From: David Miller @ 2009-10-07 20:53 UTC (permalink / raw)
To: w.sang; +Cc: netdev
In-Reply-To: <1254920758-31875-1-git-send-email-w.sang@pengutronix.de>
From: Wolfram Sang <w.sang@pengutronix.de>
Date: Wed, 7 Oct 2009 15:05:58 +0200
> nanodoc was missing an ndo_-prefix.
>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Applied, FOR REAL this time! :-)
^ permalink raw reply
* Re: [PATCH net-next-2.6] bonding: remove useless assignment
From: David Miller @ 2009-10-07 20:54 UTC (permalink / raw)
To: nicolas.2p.debian; +Cc: netdev, fubar, bonding-devel
In-Reply-To: <4ACCF4D5.9050502@free.fr>
From: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Date: Wed, 07 Oct 2009 22:06:45 +0200
> Resent after fixing tab to space corruption.
It's still breaking up long lines, two examples:
> diff --git a/drivers/net/bonding/bond_main.c
> b/drivers/net/bonding/bond_main.c
...
> @@ -1084,7 +1084,7 @@ static struct slave *bond_find_best_slave(struct
> bonding *bond)
Please fix this and resubmit.
^ permalink raw reply
* Re: [PATCH] Add sk_mark route lookup support for IPv4 listening sockets, and for IPv4 multicast forwarding
From: David Miller @ 2009-10-07 20:56 UTC (permalink / raw)
To: atis; +Cc: netdev, panther, eric.dumazet, brian.haley, zenczykowski
In-Reply-To: <200910071559.56526.atis@mikrotik.com>
From: Atis Elsts <atis@mikrotik.com>
Date: Wed, 7 Oct 2009 15:59:56 +0300
> Here is the sk_mark part.
Applied, thanks.
> As for the ipmr.c code, I agree with your comment. Using mark from
> skb probably is wrong in case of tunnel interface (i.e. in the "if
> (vif->flags&VIFF_TUNNEL)" part of the patch), my mistake. I still
> think that the "else" part is correct, though, because using mark
> from skb there mirrors behaviour for unicast forwarding routing
> lookup in ip_route_input_slow(). The same applies to IPv6 code in
> ip6mr_forward2().
Ok submit just the else part and we'll have a look at it.
Thanks.
^ permalink raw reply
* Re: [PATCH] IPv6: Fix 6RD build error
From: David Miller @ 2009-10-07 20:57 UTC (permalink / raw)
To: brian.haley; +Cc: yoshfuji, netdev
In-Reply-To: <4ACCAD46.2020800@hp.com>
From: Brian Haley <brian.haley@hp.com>
Date: Wed, 07 Oct 2009 11:01:26 -0400
> Fix build error introduced in commit fa857afcf - ipv6 sit: 6rd
> (IPv6 Rapid Deployment) Support. Struct in6_addr is the issue.
> I'm only seeing this on x86_64 systems, not on 32-bit with same
> IPv6 config options, so it could be there's a missing forward
> declaration somewhere, but including the correct header file
> fixes the problem too.
>
> CC [M] net/ipv6/ip6_tunnel.o
> In file included from net/ipv6/ip6_tunnel.c:31:
> include/linux/if_tunnel.h:59: error: field ‘prefix’ has incomplete type
> make[2]: *** [net/ipv6/ip6_tunnel.o] Error 1
> make[1]: *** [net/ipv6] Error 2
>
> Signed-off-by: Brian Haley <brian.haley@hp.com>
Funny, I didn't see this on sparc64.
Applied, thanks Brian!
^ permalink raw reply
* Re: [PATCH] IPv6: use ipv6_addr_copy() in ip6_route_redirect()
From: David Miller @ 2009-10-07 20:58 UTC (permalink / raw)
To: brian.haley; +Cc: netdev
In-Reply-To: <4ACCB7ED.7070901@hp.com>
From: Brian Haley <brian.haley@hp.com>
Date: Wed, 07 Oct 2009 11:46:53 -0400
> Change ip6_route_redirect() to use ipv6_addr_copy().
>
> Signed-off-by: Brian Haley <brian.haley@hp.com>
Applied.
^ permalink raw reply
* Re: [PATCH] IPv6: use ipv6_addr_set_v4mapped()
From: David Miller @ 2009-10-07 20:58 UTC (permalink / raw)
To: brian.haley; +Cc: netdev
In-Reply-To: <4ACCB816.2000902@hp.com>
From: Brian Haley <brian.haley@hp.com>
Date: Wed, 07 Oct 2009 11:47:34 -0400
> Might as well use the ipv6_addr_set_v4mapped() inline we created last
> year.
>
> Signed-off-by: Brian Haley <brian.haley@hp.com>
Also applied, thanks.
^ permalink raw reply
* [PATCH netnext-2.6] bonding: fix a parameter name in error message
From: Nicolas de Pesloüan @ 2009-10-07 20:59 UTC (permalink / raw)
To: fubar, davem; +Cc: netdev, bonding-devel
When parsing module parameters, bond_check_params() erroneously use 'xor_mode'
as the name of a module parameter in an error message.
The right name for this parameter is 'xmit_hash_policy'.
Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
---
drivers/net/bonding/bond_main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 69c5b15..20dc5a2 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4665,7 +4665,8 @@ static int bond_check_params(struct bond_params *params)
if ((bond_mode != BOND_MODE_XOR) &&
(bond_mode != BOND_MODE_8023AD)) {
pr_info(DRV_NAME
- ": xor_mode param is irrelevant in mode %s\n",
+ ": xmit_hash_policy param is irrelevant in"
+ " mode %s\n",
bond_mode_name(bond_mode));
} else {
xmit_hashtype = bond_parse_parm(xmit_hash_policy,
--
1.6.3.3
^ permalink raw reply related
* [PATCH netnext-2.6] bonding: remove useless assignment
From: Nicolas de Pesloüan @ 2009-10-07 20:59 UTC (permalink / raw)
To: fubar, davem; +Cc: netdev, bonding-devel
In-Reply-To: <1254949168-12404-1-git-send-email-nicolas.2p.debian@free.fr>
The variable old_active is first set to bond->curr_active_slave.
Then, it is unconditionally set to new_active, without being used in between.
The first assignment, having no side effect, is useless.
Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
---
drivers/net/bonding/bond_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 20dc5a2..34bdea5 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1084,7 +1084,7 @@ static struct slave *bond_find_best_slave(struct bonding *bond)
int mintime = bond->params.updelay;
int i;
- new_active = old_active = bond->curr_active_slave;
+ new_active = bond->curr_active_slave;
if (!new_active) { /* there were no active slaves left */
if (bond->slave_cnt > 0) /* found one slave */
--
1.6.3.3
^ permalink raw reply related
* Re: [PATCH netnext-2.6] bonding: fix a parameter name in error message
From: David Miller @ 2009-10-07 21:10 UTC (permalink / raw)
To: nicolas.2p.debian; +Cc: fubar, netdev, bonding-devel
In-Reply-To: <1254949168-12404-1-git-send-email-nicolas.2p.debian@free.fr>
From: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Date: Wed, 7 Oct 2009 22:59:27 +0200
> When parsing module parameters, bond_check_params() erroneously use 'xor_mode'
> as the name of a module parameter in an error message.
>
> The right name for this parameter is 'xmit_hash_policy'.
>
> Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Applied.
^ permalink raw reply
* Re: [PATCH netnext-2.6] bonding: remove useless assignment
From: David Miller @ 2009-10-07 21:11 UTC (permalink / raw)
To: nicolas.2p.debian; +Cc: fubar, netdev, bonding-devel
In-Reply-To: <1254949168-12404-2-git-send-email-nicolas.2p.debian@free.fr>
From: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Date: Wed, 7 Oct 2009 22:59:28 +0200
> The variable old_active is first set to bond->curr_active_slave.
> Then, it is unconditionally set to new_active, without being used in between.
>
> The first assignment, having no side effect, is useless.
>
> Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
> Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Also applied.
Conclusion, avoid Thunderbird like the plague....
^ permalink raw reply
* Re: [PATCH 2/3] Incomplete type for struct in6_addr
From: David Miller @ 2009-10-07 21:42 UTC (permalink / raw)
To: hagen; +Cc: netdev
In-Reply-To: <1254951282-5056-3-git-send-email-hagen@jauu.net>
From: Hagen Paul Pfeifer <hagen@jauu.net>
Date: Wed, 7 Oct 2009 23:34:41 +0200
> if_tunnel.h defines a new struct consisting of struct in6_addr,
> but the definition is defined in linux/in6.h - so we must
> include them beforehand.
>
> Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Already fixed in net-next-2.6
^ 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