Netdev List
 help / color / mirror / Atom feed
* [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

* Re: [PATCH 1/3] Fix redeclaration of symbol len
From: David Miller @ 2009-10-07 21:43 UTC (permalink / raw)
  To: hagen; +Cc: netdev
In-Reply-To: <1254951282-5056-2-git-send-email-hagen@jauu.net>

From: Hagen Paul Pfeifer <hagen@jauu.net>
Date: Wed,  7 Oct 2009 23:34:40 +0200

> Function argument len was redeclarated within the
> function. This patch fix the redeclaration of symbol 'len'.
> 
> Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>

In the future please indicate the area you are touching
in the subject line so that it shows up in the header
line of the commit message.  I added "econet: " to your
subject to fix this.

Applied, thanks.

^ permalink raw reply

* [PATCH 3/3] Define cipso_v4_delopt static
From: Hagen Paul Pfeifer @ 2009-10-07 21:34 UTC (permalink / raw)
  To: netdev; +Cc: davem
In-Reply-To: <1254951282-5056-1-git-send-email-hagen@jauu.net>

There is no reason that cipso_v4_delopt() is not
defined as a static function.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
 net/ipv4/cipso_ipv4.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c
index 039cc1f..1e029dc 100644
--- a/net/ipv4/cipso_ipv4.c
+++ b/net/ipv4/cipso_ipv4.c
@@ -2017,7 +2017,7 @@ req_setattr_failure:
  * values on failure.
  *
  */
-int cipso_v4_delopt(struct ip_options **opt_ptr)
+static int cipso_v4_delopt(struct ip_options **opt_ptr)
 {
 	int hdr_delta = 0;
 	struct ip_options *opt = *opt_ptr;
-- 
1.6.3.GIT


^ permalink raw reply related

* [PATCH 2/3] Incomplete type for struct in6_addr
From: Hagen Paul Pfeifer @ 2009-10-07 21:34 UTC (permalink / raw)
  To: netdev; +Cc: davem
In-Reply-To: <1254951282-5056-1-git-send-email-hagen@jauu.net>

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>
---
 include/linux/if_tunnel.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h
index c53c8e0..8d76cb4 100644
--- a/include/linux/if_tunnel.h
+++ b/include/linux/if_tunnel.h
@@ -5,6 +5,7 @@
 
 #ifdef __KERNEL__
 #include <linux/ip.h>
+#include <linux/in6.h>
 #endif
 
 #define SIOCGETTUNNEL   (SIOCDEVPRIVATE + 0)
-- 
1.6.3.GIT


^ permalink raw reply related

* Minor net/ fixes
From: Hagen Paul Pfeifer @ 2009-10-07 21:34 UTC (permalink / raw)
  To: netdev; +Cc: davem

Hello netdev, hello davem,

I, ... I mean cgcc stumbled across several dubious code. The
following patches address them. ;)

Hagen

-- 
Hagen Paul Pfeifer <hagen@jauu.net>  ||  http://jauu.net/
Telephone: +49 174 5455209           ||  Key Id: 0x98350C22
Key Fingerprint: 490F 557B 6C48 6D7E 5706 2EA2 4A22 8D45 9835 0C22



^ permalink raw reply

* [PATCH 1/3] Fix redeclaration of symbol len
From: Hagen Paul Pfeifer @ 2009-10-07 21:34 UTC (permalink / raw)
  To: netdev; +Cc: davem
In-Reply-To: <1254951282-5056-1-git-send-email-hagen@jauu.net>

Function argument len was redeclarated within the
function. This patch fix the redeclaration of symbol 'len'.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
 net/econet/af_econet.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 6529be3..5e9426a 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -457,15 +457,15 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
 	iov[0].iov_len = size;
 	for (i = 0; i < msg->msg_iovlen; i++) {
 		void __user *base = msg->msg_iov[i].iov_base;
-		size_t len = msg->msg_iov[i].iov_len;
+		size_t iov_len = msg->msg_iov[i].iov_len;
 		/* Check it now since we switch to KERNEL_DS later. */
-		if (!access_ok(VERIFY_READ, base, len)) {
+		if (!access_ok(VERIFY_READ, base, iov_len)) {
 			mutex_unlock(&econet_mutex);
 			return -EFAULT;
 		}
 		iov[i+1].iov_base = base;
-		iov[i+1].iov_len = len;
-		size += len;
+		iov[i+1].iov_len = iov_len;
+		size += iov_len;
 	}
 
 	/* Get a skbuff (no data, just holds our cb information) */
-- 
1.6.3.GIT


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox