Netdev List
 help / color / mirror / Atom feed
* Re: net-next-2.6 status...
From: David Miller @ 2011-03-16 18:00 UTC (permalink / raw)
  To: jpirko
  Cc: netdev, linux-wireless, netfilter-devel, eric.dumazet, linville,
	kaber
In-Reply-To: <20110316175642.GB2867@psychotron.redhat.com>

From: Jiri Pirko <jpirko@redhat.com>
Date: Wed, 16 Mar 2011 18:56:44 +0100

> So would you leave out if.h hunk out or should I repost?

What makes you think it's a good idea for me to have to do more work?

I have the entire merge window and thousands of other patches to worry
about...

^ permalink raw reply

* Re: [PATCH 00/01] netfilter: netfilter fix for net-next
From: David Miller @ 2011-03-16 18:12 UTC (permalink / raw)
  To: kaber; +Cc: netfilter-devel, netdev
In-Reply-To: <1300297111-28116-1-git-send-email-kaber@trash.net>

From: kaber@trash.net
Date: Wed, 16 Mar 2011 18:38:30 +0100

> following is a single netfilter fix from Thomas for net-next. The new
> AUDIT target is supposed to work with ebtables, however it returns
> a xtables verdict, which are unfortunately incompatible with ebtables
> verdicts.
> 
> Please apply or pull from:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6.git master

I'll pull this, thanks Patrick.


^ permalink raw reply

* Re: net-next-2.6 status...
From: Ben Hutchings @ 2011-03-16 18:13 UTC (permalink / raw)
  To: David Miller
  Cc: jpirko, netdev, linux-wireless, netfilter-devel, eric.dumazet,
	linville, kaber
In-Reply-To: <20110316.104236.104065822.davem@davemloft.net>

On Wed, 2011-03-16 at 10:42 -0700, David Miller wrote:
> From: Jiri Pirko <jpirko@redhat.com>
> Date: Wed, 16 Mar 2011 09:40:23 +0100
> 
> > Wed, Mar 16, 2011 at 08:38:03AM CET, jpirko@redhat.com wrote:
> >>Wed, Mar 16, 2011 at 08:02:51AM CET, davem@davemloft.net wrote:
> >>>From: Jiri Pirko <jpirko@redhat.com>
> >>>Date: Wed, 16 Mar 2011 07:50:09 +0100
> >>>
> >>>>>Jiri, I know there is your patch set there, but I think you and Changli
> >>>>>still need to go back and forth one more time wrt. orig_dev semantics.
> >>>>>Since you have been posting this patch set for some time I'm still
> >>>>>willing to apply it for this merge window, but please make haste and
> >>>>>work out the remaining discussion.  Thank you.
> >>>> 
> >>>> Dave, you can apply the rest of the series and leave only the first
> >>>> patch (af_packet) out. There's no dependency. We will figure out things
> >>>> around origdev later.
> >>>
> >>>I was about to do that but I've found other problems.
> >>>
> >>>You cannot make the modifications you make to linux/if.h, those
> >>>interface flags are visible to userspace.
> >>
> >>What do you suggest? To remove unused flags and leave gaps there or to
> >>not to remove the flags at all?
> > 
> > Well, the following comment:
> > <quote>
> > /* Private (from user) interface flags (netdevice->priv_flags). */
> > </quote>
> > leads me to think that these flags should not be used by userspace.
> > So maybe it may not be problem to change those values.
> 
> Comments don't block user applications from using defines we expose
> to them.  The person who was wise enough to write that comment should
> have also been wise enough to add appropriate __KERNEL__ protection
> to the definitions.

Though, in this case, the priv_flags are not in any way visible to
user-space, so it would be quite hard to find a use for them!

> They were not, therefore we are stuck with them forever.

So should we also expose struct net_device_stats again?  During the
introduction to 64-bit stats I changed and un-exported the definition,
then later had to revert the definition but left it un-exported.  This
broke compilation of iproute2, though in the process it revealed an
existing bug: <http://thread.gmane.org/gmane.linux.network/169764>.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


^ permalink raw reply

* Re: 2.6.38 Compile Failure e1000e Module
From: David Miller @ 2011-03-16 18:15 UTC (permalink / raw)
  To: eric.dumazet
  Cc: frank.peters, linux-kernel, bruce.w.allan, jeffrey.t.kirsher,
	netdev
In-Reply-To: <1300288617.3202.10.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 16 Mar 2011 16:16:57 +0100

> [PATCH] e1000e: fix kconfig for crc32 dependency
> 
> ERROR: "crc32_le" [drivers/net/e1000e/e1000e.ko] undefined!
> 
> Reported-by: Frank Peters <frank.peters@comcast.net>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Cc: Bruce Allan <bruce.w.allan@intel.com>
> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied, thanks Eric.

^ permalink raw reply

* Re: [PATCH] net: 2.6.38 Compile Failure e1000e Module
From: David Miller @ 2011-03-16 18:15 UTC (permalink / raw)
  To: randy.dunlap; +Cc: frank.peters, linux-kernel, netdev
In-Reply-To: <20110316082105.c911bb1c.randy.dunlap@oracle.com>

From: Randy Dunlap <randy.dunlap@oracle.com>
Date: Wed, 16 Mar 2011 08:21:05 -0700

> Hi,
> Please test this patch:
> 
> 
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> e1000e needs to select CRC32 for CRC support.
> This patch fixes the build error:
> ERROR: "crc32_le" [drivers/net/e1000e/e1000e.ko] undefined!
> 
> Reported-by: Frank Peters <frank.peters@comcast.net>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>

Randy, I applied Eric Dumazet's copy of this fix only because
his submission preceded your's in terms of time of submission :-)

Thanks!

^ permalink raw reply

* Re: net-next-2.6 status...
From: David Miller @ 2011-03-16 18:17 UTC (permalink / raw)
  To: bhutchings
  Cc: jpirko, netdev, linux-wireless, netfilter-devel, eric.dumazet,
	linville, kaber
In-Reply-To: <1300299219.2811.7.camel@bwh-desktop>

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Wed, 16 Mar 2011 18:13:39 +0000

> Though, in this case, the priv_flags are not in any way visible to
> user-space, so it would be quite hard to find a use for them!

There are pieces of infrastructure, such as scripts that turn header
file visible macro values into values usable in other languages such
as perl, that do that wholesale for entire header files and therefore
expect these individual values to be there.

I'm not going to be the person who breaks such things.

^ permalink raw reply

* [PATCH net-next 2/2] be2net: Bump up the version number
From: Ajit Khaparde @ 2011-03-16 18:21 UTC (permalink / raw)
  To: netdev


Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
---
 drivers/net/benet/be.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index 7721699..f803c58 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -33,7 +33,7 @@
 
 #include "be_hw.h"
 
-#define DRV_VER			"2.103.175u"
+#define DRV_VER			"4.0.100u"
 #define DRV_NAME		"be2net"
 #define BE_NAME			"ServerEngines BladeEngine2 10Gbps NIC"
 #define BE3_NAME		"ServerEngines BladeEngine3 10Gbps NIC"
-- 
1.7.1


^ permalink raw reply related

* [PATCH net-next 1/2] be2net: Copyright notice change. Update to Emulex instead of ServerEngines
From: Ajit Khaparde @ 2011-03-16 18:20 UTC (permalink / raw)
  To: netdev


Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
---
 drivers/net/benet/be.h         |   10 +++++-----
 drivers/net/benet/be_cmds.c    |   10 +++++-----
 drivers/net/benet/be_cmds.h    |   10 +++++-----
 drivers/net/benet/be_ethtool.c |   10 +++++-----
 drivers/net/benet/be_hw.h      |   10 +++++-----
 drivers/net/benet/be_main.c    |   10 +++++-----
 6 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index 62af707..7721699 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005 - 2010 ServerEngines
+ * Copyright (C) 2005 - 2011 Emulex
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
@@ -8,11 +8,11 @@
  * Public License is included in this distribution in the file called COPYING.
  *
  * Contact Information:
- * linux-drivers@serverengines.com
+ * linux-drivers@emulex.com
  *
- * ServerEngines
- * 209 N. Fair Oaks Ave
- * Sunnyvale, CA 94085
+ * Emulex
+ * 3333 Susan Street
+ * Costa Mesa, CA 92626
  */
 
 #ifndef BE_H
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index e1124c8..5a4a87e 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005 - 2010 ServerEngines
+ * Copyright (C) 2005 - 2011 Emulex
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
@@ -8,11 +8,11 @@
  * Public License is included in this distribution in the file called COPYING.
  *
  * Contact Information:
- * linux-drivers@serverengines.com
+ * linux-drivers@emulex.com
  *
- * ServerEngines
- * 209 N. Fair Oaks Ave
- * Sunnyvale, CA 94085
+ * Emulex
+ * 3333 Susan Street
+ * Costa Mesa, CA 92626
  */
 
 #include "be.h"
diff --git a/drivers/net/benet/be_cmds.h b/drivers/net/benet/be_cmds.h
index e41fcba..4f254cf 100644
--- a/drivers/net/benet/be_cmds.h
+++ b/drivers/net/benet/be_cmds.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005 - 2010 ServerEngines
+ * Copyright (C) 2005 - 2011 Emulex
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
@@ -8,11 +8,11 @@
  * Public License is included in this distribution in the file called COPYING.
  *
  * Contact Information:
- * linux-drivers@serverengines.com
+ * linux-drivers@emulex.com
  *
- * ServerEngines
- * 209 N. Fair Oaks Ave
- * Sunnyvale, CA 94085
+ * Emulex
+ * 3333 Susan Street
+ * Costa Mesa, CA 92626
  */
 
 /*
diff --git a/drivers/net/benet/be_ethtool.c b/drivers/net/benet/be_ethtool.c
index 6e5e433..aac248f 100644
--- a/drivers/net/benet/be_ethtool.c
+++ b/drivers/net/benet/be_ethtool.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005 - 2010 ServerEngines
+ * Copyright (C) 2005 - 2011 Emulex
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
@@ -8,11 +8,11 @@
  * Public License is included in this distribution in the file called COPYING.
  *
  * Contact Information:
- * linux-drivers@serverengines.com
+ * linux-drivers@emulex.com
  *
- * ServerEngines
- * 209 N. Fair Oaks Ave
- * Sunnyvale, CA 94085
+ * Emulex
+ * 3333 Susan Street
+ * Costa Mesa, CA 92626
  */
 
 #include "be.h"
diff --git a/drivers/net/benet/be_hw.h b/drivers/net/benet/be_hw.h
index e06aa15..d4344a0 100644
--- a/drivers/net/benet/be_hw.h
+++ b/drivers/net/benet/be_hw.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005 - 2010 ServerEngines
+ * Copyright (C) 2005 - 2011 Emulex
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
@@ -8,11 +8,11 @@
  * Public License is included in this distribution in the file called COPYING.
  *
  * Contact Information:
- * linux-drivers@serverengines.com
+ * linux-drivers@emulex.com
  *
- * ServerEngines
- * 209 N. Fair Oaks Ave
- * Sunnyvale, CA 94085
+ * Emulex
+ * 3333 Susan Street
+ * Costa Mesa, CA 92626
  */
 
 /********* Mailbox door bell *************/
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 5e15006..a71163f 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005 - 2010 ServerEngines
+ * Copyright (C) 2005 - 2011 Emulex
  * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or
@@ -8,11 +8,11 @@
  * Public License is included in this distribution in the file called COPYING.
  *
  * Contact Information:
- * linux-drivers@serverengines.com
+ * linux-drivers@emulex.com
  *
- * ServerEngines
- * 209 N. Fair Oaks Ave
- * Sunnyvale, CA 94085
+ * Emulex
+ * 3333 Susan Street
+ * Costa Mesa, CA 92626
  */
 
 #include "be.h"
-- 
1.7.1


^ permalink raw reply related

* Re: [PATCH net-next 1/2] be2net: Copyright notice change. Update to Emulex instead of ServerEngines
From: David Miller @ 2011-03-16 18:29 UTC (permalink / raw)
  To: ajit.khaparde; +Cc: netdev
In-Reply-To: <20110316182046.GA6254@akhaparde-VBox>

From: Ajit Khaparde <ajit.khaparde@emulex.com>
Date: Wed, 16 Mar 2011 13:20:46 -0500

> 
> Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next 2/2] be2net: Bump up the version number
From: David Miller @ 2011-03-16 18:30 UTC (permalink / raw)
  To: ajit.khaparde; +Cc: netdev
In-Reply-To: <20110316182100.GA6274@akhaparde-VBox>

From: Ajit Khaparde <ajit.khaparde@emulex.com>
Date: Wed, 16 Mar 2011 13:21:00 -0500

> 
> Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>

Applied.

^ permalink raw reply

* Re: [PATCH] net: 2.6.38 Compile Failure e1000e Module
From: Randy Dunlap @ 2011-03-16 18:31 UTC (permalink / raw)
  To: David Miller; +Cc: frank.peters, linux-kernel, netdev
In-Reply-To: <20110316.111544.115931576.davem@davemloft.net>

On 03/16/11 11:15, David Miller wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
> Date: Wed, 16 Mar 2011 08:21:05 -0700
> 
>> Hi,
>> Please test this patch:
>>
>>
>> From: Randy Dunlap <randy.dunlap@oracle.com>
>>
>> e1000e needs to select CRC32 for CRC support.
>> This patch fixes the build error:
>> ERROR: "crc32_le" [drivers/net/e1000e/e1000e.ko] undefined!
>>
>> Reported-by: Frank Peters <frank.peters@comcast.net>
>> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Randy, I applied Eric Dumazet's copy of this fix only because
> his submission preceded your's in terms of time of submission :-)

Ack.  :)

thanks,
-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply

* [patch net-next-2.6 3/6 v2] net: get rid of multiple bond-related netdevice->priv_flags
From: Jiri Pirko @ 2011-03-16 18:45 UTC (permalink / raw)
  To: netdev
  Cc: davem, shemminger, kaber, fubar, eric.dumazet, nicolas.2p.debian,
	andy, xiaosuo
In-Reply-To: <1299935679-18135-4-git-send-email-jpirko@redhat.com>

Now when bond-related code is moved from net/core/dev.c into bonding
code, multiple priv_flags are not needed anymore. So let them rot.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
---
 drivers/net/bonding/bond_main.c  |   33 ++++++++++++++-------------------
 drivers/net/bonding/bond_sysfs.c |    8 --------
 drivers/net/bonding/bonding.h    |   24 +-----------------------
 3 files changed, 15 insertions(+), 50 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 29f69da..3c6ac2f 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1458,20 +1458,20 @@ static void bond_setup_by_slave(struct net_device *bond_dev,
  * ARP on active-backup slaves with arp_validate enabled.
  */
 static bool bond_should_deliver_exact_match(struct sk_buff *skb,
-					    struct net_device *slave_dev,
-					    struct net_device *bond_dev)
+					    struct slave *slave,
+					    struct bonding *bond)
 {
-	if (slave_dev->priv_flags & IFF_SLAVE_INACTIVE) {
-		if (slave_dev->priv_flags & IFF_SLAVE_NEEDARP &&
+	if (slave->dev->priv_flags & IFF_SLAVE_INACTIVE) {
+		if (slave_do_arp_validate(bond, slave) &&
 		    skb->protocol == __cpu_to_be16(ETH_P_ARP))
 			return false;
 
-		if (bond_dev->priv_flags & IFF_MASTER_ALB &&
+		if (bond->params.mode == BOND_MODE_ALB &&
 		    skb->pkt_type != PACKET_BROADCAST &&
 		    skb->pkt_type != PACKET_MULTICAST)
 				return false;
 
-		if (bond_dev->priv_flags & IFF_MASTER_8023AD &&
+		if (bond->params.mode == BOND_MODE_8023AD &&
 		    skb->protocol == __cpu_to_be16(ETH_P_SLOW))
 			return false;
 
@@ -1484,6 +1484,7 @@ static struct sk_buff *bond_handle_frame(struct sk_buff *skb)
 {
 	struct slave *slave;
 	struct net_device *bond_dev;
+	struct bonding *bond;
 
 	skb = skb_share_check(skb, GFP_ATOMIC);
 	if (unlikely(!skb))
@@ -1494,17 +1495,19 @@ static struct sk_buff *bond_handle_frame(struct sk_buff *skb)
 	if (unlikely(!bond_dev))
 		return skb;
 
-	if (bond_dev->priv_flags & IFF_MASTER_ARPMON)
+	bond = netdev_priv(bond_dev);
+
+	if (bond->params.arp_interval)
 		slave->dev->last_rx = jiffies;
 
-	if (bond_should_deliver_exact_match(skb, slave->dev, bond_dev)) {
+	if (bond_should_deliver_exact_match(skb, slave, bond)) {
 		skb->deliver_no_wcard = 1;
 		return skb;
 	}
 
 	skb->dev = bond_dev;
 
-	if (bond_dev->priv_flags & IFF_MASTER_ALB &&
+	if (bond->params.mode == BOND_MODE_ALB &&
 	    bond_dev->priv_flags & IFF_BRIDGE_PORT &&
 	    skb->pkt_type == PACKET_HOST) {
 
@@ -2119,9 +2122,7 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
 
 	dev_set_mtu(slave_dev, slave->original_mtu);
 
-	slave_dev->priv_flags &= ~(IFF_MASTER_8023AD | IFF_MASTER_ALB |
-				   IFF_SLAVE_INACTIVE | IFF_BONDING |
-				   IFF_SLAVE_NEEDARP);
+	slave_dev->priv_flags &= ~(IFF_SLAVE_INACTIVE | IFF_BONDING);
 
 	kfree(slave);
 
@@ -2232,8 +2233,7 @@ static int bond_release_all(struct net_device *bond_dev)
 			dev_set_mac_address(slave_dev, &addr);
 		}
 
-		slave_dev->priv_flags &= ~(IFF_MASTER_8023AD | IFF_MASTER_ALB |
-					   IFF_SLAVE_INACTIVE);
+		slave_dev->priv_flags &= ~IFF_SLAVE_INACTIVE;
 
 		kfree(slave);
 
@@ -4416,11 +4416,9 @@ void bond_set_mode_ops(struct bonding *bond, int mode)
 	case BOND_MODE_BROADCAST:
 		break;
 	case BOND_MODE_8023AD:
-		bond_set_master_3ad_flags(bond);
 		bond_set_xmit_hash_policy(bond);
 		break;
 	case BOND_MODE_ALB:
-		bond_set_master_alb_flags(bond);
 		/* FALLTHRU */
 	case BOND_MODE_TLB:
 		break;
@@ -4511,9 +4509,6 @@ static void bond_setup(struct net_device *bond_dev)
 	bond_dev->priv_flags |= IFF_BONDING;
 	bond_dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
 
-	if (bond->params.arp_interval)
-		bond_dev->priv_flags |= IFF_MASTER_ARPMON;
-
 	/* At first, we block adding VLANs. That's the only way to
 	 * prevent problems that occur when adding VLANs over an
 	 * empty bond. The block will be removed once non-challenged
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 72bb0f6..05e0ae5 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -322,11 +322,6 @@ static ssize_t bonding_store_mode(struct device *d,
 		ret = -EINVAL;
 		goto out;
 	}
-	if (bond->params.mode == BOND_MODE_8023AD)
-		bond_unset_master_3ad_flags(bond);
-
-	if (bond->params.mode == BOND_MODE_ALB)
-		bond_unset_master_alb_flags(bond);
 
 	bond->params.mode = new_value;
 	bond_set_mode_ops(bond, bond->params.mode);
@@ -527,8 +522,6 @@ static ssize_t bonding_store_arp_interval(struct device *d,
 	pr_info("%s: Setting ARP monitoring interval to %d.\n",
 		bond->dev->name, new_value);
 	bond->params.arp_interval = new_value;
-	if (bond->params.arp_interval)
-		bond->dev->priv_flags |= IFF_MASTER_ARPMON;
 	if (bond->params.miimon) {
 		pr_info("%s: ARP monitoring cannot be used with MII monitoring. %s Disabling MII monitoring.\n",
 			bond->dev->name, bond->dev->name);
@@ -1004,7 +997,6 @@ static ssize_t bonding_store_miimon(struct device *d,
 			pr_info("%s: MII monitoring cannot be used with ARP monitoring. Disabling ARP monitoring...\n",
 				bond->dev->name);
 			bond->params.arp_interval = 0;
-			bond->dev->priv_flags &= ~IFF_MASTER_ARPMON;
 			if (bond->params.arp_validate) {
 				bond_unregister_arp(bond);
 				bond->params.arp_validate =
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index ff9af31..049619f 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -356,34 +356,12 @@ static inline void bond_set_slave_inactive_flags(struct slave *slave)
 		slave->state = BOND_STATE_BACKUP;
 	if (!bond->params.all_slaves_active)
 		slave->dev->priv_flags |= IFF_SLAVE_INACTIVE;
-	if (slave_do_arp_validate(bond, slave))
-		slave->dev->priv_flags |= IFF_SLAVE_NEEDARP;
 }
 
 static inline void bond_set_slave_active_flags(struct slave *slave)
 {
 	slave->state = BOND_STATE_ACTIVE;
-	slave->dev->priv_flags &= ~(IFF_SLAVE_INACTIVE | IFF_SLAVE_NEEDARP);
-}
-
-static inline void bond_set_master_3ad_flags(struct bonding *bond)
-{
-	bond->dev->priv_flags |= IFF_MASTER_8023AD;
-}
-
-static inline void bond_unset_master_3ad_flags(struct bonding *bond)
-{
-	bond->dev->priv_flags &= ~IFF_MASTER_8023AD;
-}
-
-static inline void bond_set_master_alb_flags(struct bonding *bond)
-{
-	bond->dev->priv_flags |= IFF_MASTER_ALB;
-}
-
-static inline void bond_unset_master_alb_flags(struct bonding *bond)
-{
-	bond->dev->priv_flags &= ~IFF_MASTER_ALB;
+	slave->dev->priv_flags &= ~IFF_SLAVE_INACTIVE;
 }
 
 struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr);
-- 
1.7.4


^ permalink raw reply related

* [patch net-next-2.6 5/6 v2] bonding: get rid of IFF_SLAVE_INACTIVE netdev->priv_flag
From: Jiri Pirko @ 2011-03-16 18:46 UTC (permalink / raw)
  To: netdev
  Cc: davem, shemminger, kaber, fubar, eric.dumazet, nicolas.2p.debian,
	andy, xiaosuo
In-Reply-To: <1299935679-18135-6-git-send-email-jpirko@redhat.com>

Since bond-related code was moved from net/core/dev.c into bonding,
IFF_SLAVE_INACTIVE is no longer needed. Replace is with flag "inactive"
stored in slave structure

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
---
 drivers/net/bonding/bond_main.c  |    6 ++----
 drivers/net/bonding/bond_sysfs.c |    4 ++--
 drivers/net/bonding/bonding.h    |   14 ++++++++++----
 3 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index c5f3a01..c3150df 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1461,7 +1461,7 @@ static bool bond_should_deliver_exact_match(struct sk_buff *skb,
 					    struct slave *slave,
 					    struct bonding *bond)
 {
-	if (slave->dev->priv_flags & IFF_SLAVE_INACTIVE) {
+	if (bond_is_slave_inactive(slave)) {
 		if (slave_do_arp_validate(bond, slave) &&
 		    skb->protocol == __cpu_to_be16(ETH_P_ARP))
 			return false;
@@ -2122,7 +2122,7 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
 
 	dev_set_mtu(slave_dev, slave->original_mtu);
 
-	slave_dev->priv_flags &= ~(IFF_SLAVE_INACTIVE | IFF_BONDING);
+	slave_dev->priv_flags &= ~IFF_BONDING;
 
 	kfree(slave);
 
@@ -2233,8 +2233,6 @@ static int bond_release_all(struct net_device *bond_dev)
 			dev_set_mac_address(slave_dev, &addr);
 		}
 
-		slave_dev->priv_flags &= ~IFF_SLAVE_INACTIVE;
-
 		kfree(slave);
 
 		/* re-acquire the lock before getting the next slave */
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 344d23f..5161183 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -1581,9 +1581,9 @@ static ssize_t bonding_store_slaves_active(struct device *d,
 	bond_for_each_slave(bond, slave, i) {
 		if (!bond_is_active_slave(slave)) {
 			if (new_value)
-				slave->dev->priv_flags &= ~IFF_SLAVE_INACTIVE;
+				slave->inactive = 0;
 			else
-				slave->dev->priv_flags |= IFF_SLAVE_INACTIVE;
+				slave->inactive = 1;
 		}
 	}
 out:
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index 63e9cf7..6b26962 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -192,8 +192,9 @@ struct slave {
 	unsigned long last_arp_rx;
 	s8     link;    /* one of BOND_LINK_XXXX */
 	s8     new_link;
-	u8     backup;	/* indicates backup slave. Value corresponds with
-			   BOND_STATE_ACTIVE and BOND_STATE_BACKUP */
+	u8     backup:1,   /* indicates backup slave. Value corresponds with
+			      BOND_STATE_ACTIVE and BOND_STATE_BACKUP */
+	       inactive:1; /* indicates inactive slave */
 	u32    original_mtu;
 	u32    link_failure_count;
 	u8     perm_hwaddr[ETH_ALEN];
@@ -376,13 +377,18 @@ static inline void bond_set_slave_inactive_flags(struct slave *slave)
 	if (!bond_is_lb(bond))
 		bond_set_backup_slave(slave);
 	if (!bond->params.all_slaves_active)
-		slave->dev->priv_flags |= IFF_SLAVE_INACTIVE;
+		slave->inactive = 1;
 }
 
 static inline void bond_set_slave_active_flags(struct slave *slave)
 {
 	bond_set_active_slave(slave);
-	slave->dev->priv_flags &= ~IFF_SLAVE_INACTIVE;
+	slave->inactive = 0;
+}
+
+static inline bool bond_is_slave_inactive(struct slave *slave)
+{
+	return slave->inactive;
 }
 
 struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr);
-- 
1.7.4


^ permalink raw reply related

* Re: [PATCH] tcp: avoid cwnd moderation in undo
From: John Heffner @ 2011-03-16 18:52 UTC (permalink / raw)
  To: Carsten Wolff
  Cc: Yuchung Cheng, David Miller, Ilpo Jarvinen, Nandita Dukkipati,
	netdev, Alexander Zimmermann
In-Reply-To: <201103161718.39110.carsten@wolffcarsten.de>

On Wed, Mar 16, 2011 at 12:18 PM, Carsten Wolff <carsten@wolffcarsten.de> wrote:
> Unfortunately, no. ;-) My point is, that cwnd should be moderated when the
> congestion state changes are undone after a spurious recovery has been
> detected. Reordering is only one possible reason for a false recovery. And I
> stick to that point because of the thoughts I pointed out in my mail to john,
> i.e. undo typically leading to exceptionally large segment bursts.

There's a more general discussion here as to how much it's worth
avoiding bursts at all.  What research on the subject I'm aware of is
somewhat inconclusive.  It's possible to construct scenarios where
bursting, burst suppression, or pacing each win or lose badly.  If you
can choose only one approach as one-size-fits all it's difficult with
the information at hand to pick only one.  However, I really do wonder
why it's so important to suppress bursts on congestion state undo when
other, likely far more common, sources of bursts are not suppressed.

Carsten, do you have any specific examples of cases you're concerned
about?  FWIW, there are exactly two causes for spurious retransmits:
spurious fast retransmit due to reordering, and spurious timeouts due
to a delay spike.  Are you particularly concerned with one more than
the other?

Thanks,
  -John

^ permalink raw reply

* [RFC] netfilter: get rid of atomic ops in fast path
From: Eric Dumazet @ 2011-03-16 19:00 UTC (permalink / raw)
  To: Patrick McHardy
  Cc: Netfilter Development Mailinglist, netdev, Jesper Dangaard Brouer

We currently use a percpu spinlock to 'protect' rule bytes/packets
counters, after various attempts to use RCU instead.

Lately we added a seqlock so that get_counters() can run without
blocking BH or 'writers'. But we really use the seqcount in it.

Spinlock itself is only locked by the current cpu, so we can remove it
completely.

This cleanups api, using correct 'writer' vs 'reader' semantic.

At replace time, the get_counters() call makes sure all cpus are done
using the old table.

We could probably avoid blocking BH (we currently block them in xmit
path), but thats a different topic ;)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
This is a POC patch (based on net-next-2.6), only handling ip_tables.
ip6/arp/... need similar changes.

 include/linux/netfilter/x_tables.h |   77 ++++++++-------------------
 net/ipv4/netfilter/ip_tables.c     |   27 +++------
 net/netfilter/x_tables.c           |    9 +--
 3 files changed, 39 insertions(+), 74 deletions(-)

diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index 3721952..5b13fa5 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -457,71 +457,42 @@ extern struct xt_table_info *xt_alloc_table_info(unsigned int size);
 extern void xt_free_table_info(struct xt_table_info *info);
 
 /*
- * Per-CPU spinlock associated with per-cpu table entries, and
- * with a counter for the "reading" side that allows a recursive
- * reader to avoid taking the lock and deadlocking.
- *
- * "reading" is used by ip/arp/ip6 tables rule processing which runs per-cpu.
- * It needs to ensure that the rules are not being changed while the packet
- * is being processed. In some cases, the read lock will be acquired
- * twice on the same CPU; this is okay because of the count.
- *
- * "writing" is used when reading counters.
- *  During replace any readers that are using the old tables have to complete
- *  before freeing the old table. This is handled by the write locking
- *  necessary for reading the counters.
+ * xt_recseq is a recursive seqcount
+ * 
+ * Packet processing changes the seqcount only if no recursion happened
+ * get_counters() can use read_seqcount_begin()/read_seqcount_retry()
  */
-struct xt_info_lock {
-	seqlock_t lock;
-	unsigned char readers;
-};
-DECLARE_PER_CPU(struct xt_info_lock, xt_info_locks);
+DECLARE_PER_CPU(seqcount_t, xt_recseq);
 
-/*
- * Note: we need to ensure that preemption is disabled before acquiring
- * the per-cpu-variable, so we do it as a two step process rather than
- * using "spin_lock_bh()".
+/** xt_write_recseq_begin - start of a write section
  *
- * We _also_ need to disable bottom half processing before updating our
- * nesting count, to make sure that the only kind of re-entrancy is this
- * code being called by itself: since the count+lock is not an atomic
- * operation, we can allow no races.
- *
- * _Only_ that special combination of being per-cpu and never getting
- * re-entered asynchronously means that the count is safe.
+ * Begin packet processing : all readers must wait the end
+ * Must be called with BH off
  */
-static inline void xt_info_rdlock_bh(void)
+static inline seqcount_t *xt_write_recseq_begin(void)
 {
-	struct xt_info_lock *lock;
+	seqcount_t *s;
 
-	local_bh_disable();
-	lock = &__get_cpu_var(xt_info_locks);
-	if (likely(!lock->readers++))
-		write_seqlock(&lock->lock);
-}
+	s = &__get_cpu_var(xt_recseq);
 
-static inline void xt_info_rdunlock_bh(void)
-{
-	struct xt_info_lock *lock = &__get_cpu_var(xt_info_locks);
+	if (s->sequence & 1)
+		return NULL;
 
-	if (likely(!--lock->readers))
-		write_sequnlock(&lock->lock);
-	local_bh_enable();
+	write_seqcount_begin(s);
+	return s;
 }
 
-/*
- * The "writer" side needs to get exclusive access to the lock,
- * regardless of readers.  This must be called with bottom half
- * processing (and thus also preemption) disabled.
+/** xt_write_recseq_end - end of a write section
+ *
+ * @seq: pointer to seqcount or NULL, return value from xt_write_recseq_begin
+ *
+ * End packet processing : all readers can proceed
+ * Must be called with BH off
  */
-static inline void xt_info_wrlock(unsigned int cpu)
-{
-	write_seqlock(&per_cpu(xt_info_locks, cpu).lock);
-}
-
-static inline void xt_info_wrunlock(unsigned int cpu)
+static inline void xt_write_recseq_end(seqcount_t *seq)
 {
-	write_sequnlock(&per_cpu(xt_info_locks, cpu).lock);
+	if (seq)
+		write_seqcount_end(seq);
 }
 
 /*
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index b09ed0d..af5cf4a 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -68,15 +68,6 @@ void *ipt_alloc_initial_table(const struct xt_table *info)
 }
 EXPORT_SYMBOL_GPL(ipt_alloc_initial_table);
 
-/*
-   We keep a set of rules for each CPU, so we can avoid write-locking
-   them in the softirq when updating the counters and therefore
-   only need to read-lock in the softirq; doing a write_lock_bh() in user
-   context stops packets coming through and allows user context to read
-   the counters or update the rules.
-
-   Hence the start of any table is given by get_table() below.  */
-
 /* Returns whether matches rule or not. */
 /* Performance critical - called for every packet */
 static inline bool
@@ -311,6 +302,7 @@ ipt_do_table(struct sk_buff *skb,
 	unsigned int *stackptr, origptr, cpu;
 	const struct xt_table_info *private;
 	struct xt_action_param acpar;
+	seqcount_t *seqp;
 
 	/* Initialization */
 	ip = ip_hdr(skb);
@@ -331,7 +323,8 @@ ipt_do_table(struct sk_buff *skb,
 	acpar.hooknum = hook;
 
 	IP_NF_ASSERT(table->valid_hooks & (1 << hook));
-	xt_info_rdlock_bh();
+	local_bh_disable();
+	seqp = xt_write_recseq_begin();
 	private = table->private;
 	cpu        = smp_processor_id();
 	table_base = private->entries[cpu];
@@ -427,7 +420,8 @@ ipt_do_table(struct sk_buff *skb,
 			/* Verdict */
 			break;
 	} while (!acpar.hotdrop);
-	xt_info_rdunlock_bh();
+	xt_write_recseq_end(seqp);
+	local_bh_enable();
 	pr_debug("Exiting %s; resetting sp from %u to %u\n",
 		 __func__, *stackptr, origptr);
 	*stackptr = origptr;
@@ -886,7 +880,7 @@ get_counters(const struct xt_table_info *t,
 	unsigned int i;
 
 	for_each_possible_cpu(cpu) {
-		seqlock_t *lock = &per_cpu(xt_info_locks, cpu).lock;
+		seqcount_t *s = &per_cpu(xt_recseq, cpu);
 
 		i = 0;
 		xt_entry_foreach(iter, t->entries[cpu], t->size) {
@@ -894,10 +888,10 @@ get_counters(const struct xt_table_info *t,
 			unsigned int start;
 
 			do {
-				start = read_seqbegin(lock);
+				start = read_seqcount_begin(s);
 				bcnt = iter->counters.bcnt;
 				pcnt = iter->counters.pcnt;
-			} while (read_seqretry(lock, start));
+			} while (read_seqcount_retry(s, start));
 
 			ADD_COUNTER(counters[i], bcnt, pcnt);
 			++i; /* macro does multi eval of i */
@@ -1312,6 +1306,7 @@ do_add_counters(struct net *net, const void __user *user,
 	int ret = 0;
 	void *loc_cpu_entry;
 	struct ipt_entry *iter;
+	seqcount_t *seqp;
 #ifdef CONFIG_COMPAT
 	struct compat_xt_counters_info compat_tmp;
 
@@ -1368,12 +1363,12 @@ do_add_counters(struct net *net, const void __user *user,
 	/* Choose the copy that is on our node */
 	curcpu = smp_processor_id();
 	loc_cpu_entry = private->entries[curcpu];
-	xt_info_wrlock(curcpu);
+	seqp = xt_write_recseq_begin();
 	xt_entry_foreach(iter, loc_cpu_entry, private->size) {
 		ADD_COUNTER(iter->counters, paddc[i].bcnt, paddc[i].pcnt);
 		++i;
 	}
-	xt_info_wrunlock(curcpu);
+	xt_write_recseq_end(seqp);
  unlock_up_free:
 	local_bh_enable();
 	xt_table_unlock(t);
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index a9adf4c..18290d2 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -762,8 +762,8 @@ void xt_compat_unlock(u_int8_t af)
 EXPORT_SYMBOL_GPL(xt_compat_unlock);
 #endif
 
-DEFINE_PER_CPU(struct xt_info_lock, xt_info_locks);
-EXPORT_PER_CPU_SYMBOL_GPL(xt_info_locks);
+DEFINE_PER_CPU(seqcount_t, xt_recseq);
+EXPORT_PER_CPU_SYMBOL_GPL(xt_recseq);
 
 static int xt_jumpstack_alloc(struct xt_table_info *i)
 {
@@ -1362,10 +1362,9 @@ static int __init xt_init(void)
 	int rv;
 
 	for_each_possible_cpu(i) {
-		struct xt_info_lock *lock = &per_cpu(xt_info_locks, i);
+		seqcount_t *s = &per_cpu(xt_recseq, i);
 
-		seqlock_init(&lock->lock);
-		lock->readers = 0;
+		seqcount_init(s);
 	}
 
 	xt = kmalloc(sizeof(struct xt_af) * NFPROTO_NUMPROTO, GFP_KERNEL);



^ permalink raw reply related

* Re: [patch net-next-2.6 2/6] bonding: register slave pointer for rx_handler
From: David Miller @ 2011-03-16 19:52 UTC (permalink / raw)
  To: jpirko
  Cc: netdev, shemminger, kaber, fubar, eric.dumazet, nicolas.2p.debian,
	andy, xiaosuo
In-Reply-To: <1299935679-18135-3-git-send-email-jpirko@redhat.com>

From: Jiri Pirko <jpirko@redhat.com>
Date: Sat, 12 Mar 2011 14:14:35 +0100

> Register slave pointer as rx_handler data. That would eventually prevent
> need to loop over slave devices to find the right slave.
> 
> Use synchronize_net to ensure that bond_handle_frame does not get slave
> structure freed when working with that.
> 
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
> Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>

Applied.

^ permalink raw reply

* Re: [patch net-next-2.6 3/6 v2] net: get rid of multiple bond-related netdevice->priv_flags
From: David Miller @ 2011-03-16 19:52 UTC (permalink / raw)
  To: jpirko
  Cc: netdev, shemminger, kaber, fubar, eric.dumazet, nicolas.2p.debian,
	andy, xiaosuo
In-Reply-To: <20110316184522.GA15224@psychotron.redhat.com>

From: Jiri Pirko <jpirko@redhat.com>
Date: Wed, 16 Mar 2011 19:45:23 +0100

> Now when bond-related code is moved from net/core/dev.c into bonding
> code, multiple priv_flags are not needed anymore. So let them rot.
> 
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
> Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>

Applied.

^ permalink raw reply

* Re: [patch net-next-2.6 4/6] bonding: wrap slave state work
From: David Miller @ 2011-03-16 19:52 UTC (permalink / raw)
  To: jpirko
  Cc: netdev, shemminger, kaber, fubar, eric.dumazet, nicolas.2p.debian,
	andy, xiaosuo
In-Reply-To: <1299935679-18135-5-git-send-email-jpirko@redhat.com>

From: Jiri Pirko <jpirko@redhat.com>
Date: Sat, 12 Mar 2011 14:14:37 +0100

> transfers slave->state into slave->backup (that it's going to transfer
> into bitfield. Introduce wrapper inlines to do the work with it.
> 
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
> Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>

Applied.

^ permalink raw reply

* Re: [patch net-next-2.6 5/6 v2] bonding: get rid of IFF_SLAVE_INACTIVE netdev->priv_flag
From: David Miller @ 2011-03-16 19:52 UTC (permalink / raw)
  To: jpirko
  Cc: netdev, shemminger, kaber, fubar, eric.dumazet, nicolas.2p.debian,
	andy, xiaosuo
In-Reply-To: <20110316184642.GB15224@psychotron.redhat.com>

From: Jiri Pirko <jpirko@redhat.com>
Date: Wed, 16 Mar 2011 19:46:43 +0100

> Since bond-related code was moved from net/core/dev.c into bonding,
> IFF_SLAVE_INACTIVE is no longer needed. Replace is with flag "inactive"
> stored in slave structure
> 
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
> Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>

Applied.

^ permalink raw reply

* Re: [patch net-next-2.6 6/6] net: introduce rx_handler results and logic around that
From: David Miller @ 2011-03-16 19:53 UTC (permalink / raw)
  To: jpirko; +Cc: nicolas.2p.debian, netdev
In-Reply-To: <20110312133643.GB2899@psychotron.redhat.com>

From: Jiri Pirko <jpirko@redhat.com>
Date: Sat, 12 Mar 2011 14:36:44 +0100

> Sat, Mar 12, 2011 at 02:25:39PM CET, nicolas.2p.debian@gmail.com wrote:
>>Le 12/03/2011 14:24, Nicolas de Pesloüan a écrit :
>>>Le 12/03/2011 14:14, Jiri Pirko a écrit :
>>>>This patch allows rx_handlers to better signalize what to do next to
>>>>it's caller. That makes skb->deliver_no_wcard no longer needed.
>>>>
>>>>kernel-doc for rx_handler_result is taken from Nicolas' patch.
>>>>
>>>>Signed-off-by: Jiri Pirko<jpirko@redhat.com>
>>>>eviewed-by: Nicolas de Pesloüan<nicolas.2p.debian@free.fr>
>>>
>>>Typo in [R]eviewed-by and missing space between Pesloüan and <nicolas.
>>>
>>>Nicolas.
>>
>>Only the missing R in Reviewed-by:. The space was removed by my mail client, sorry.
> 
> Copypaste err :( Sorry..
> 
> Dave would you please add "R" before you apply. Many thanks.

I will, thanks.

Applied.

^ permalink raw reply

* Re: [PATCH] xfrm: Refcount destination entry on xfrm_lookup
From: David Miller @ 2011-03-16 19:56 UTC (permalink / raw)
  To: timo.teras; +Cc: steffen.klassert, netdev
In-Reply-To: <4D806ECB.4000205@iki.fi>

From: Timo Teräs <timo.teras@iki.fi>
Date: Wed, 16 Mar 2011 10:03:23 +0200

> On 03/16/2011 09:12 AM, Steffen Klassert wrote:
>> We return a destination entry without refcount if a socket
>> policy is found in xfrm_lookup. This triggers a warning on
>> a negative refcount when freeeing this dst entry. So take
>> a refcount in this case to fix it.
>> 
>> This refcount was forgotten when xfrm changed to cache bundles
>> instead of policies for outgoing flows.
>> 
>> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
> 
> Acked-by: Timo Teräs <timo.teras@iki.fi>
> 
> Ok. This is one of the corner cases I did not test: having socket policy
> something else than no action. I just didn't have the application ready
> for it. Sorry about the bug. And good catch Steffen.

Applied and queued up for -stable, thanks!

^ permalink raw reply

* Re: [PATCH net-next-2.6] bonding: enable netpoll without checking link status
From: David Miller @ 2011-03-16 19:58 UTC (permalink / raw)
  To: andy; +Cc: netdev, amwang, fubar
In-Reply-To: <1300140321-12056-1-git-send-email-andy@greyhouse.net>

From: Andy Gospodarek <andy@greyhouse.net>
Date: Mon, 14 Mar 2011 18:05:21 -0400

> Only slaves that are up should transmit netpoll frames, so there is no
> need to check to see if a slave is up before enabling netpoll on it.
> This resolves a reported failure on active-backup bonds where a slave
> interface is down when netpoll was enabled.
> 
> Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
> Tested-by: WANG Cong <amwang@redhat.com>

Applied, thanks Andy.

^ permalink raw reply

* Re: Multicast Fails Over Multipoint GRE Tunnel
From: Doug Kehn @ 2011-03-16 20:02 UTC (permalink / raw)
  To: Timo Teräs; +Cc: Eric Dumazet, netdev
In-Reply-To: <4D805239.6040905@iki.fi>

Hi Timo,


--- On Wed, 3/16/11, Timo Teräs <timo.teras@iki.fi> wrote:

> From: Timo Teräs <timo.teras@iki.fi>
> Subject: Re: Multicast Fails Over Multipoint GRE Tunnel
> To: "Doug Kehn" <rdkehn@yahoo.com>
> Cc: "Eric Dumazet" <eric.dumazet@gmail.com>, netdev@vger.kernel.org
> Date: Wednesday, March 16, 2011, 2:01 AM
> On 03/15/2011 11:35 PM, Doug Kehn
> wrote:
> >> From: Timo Teräs <timo.teras@iki.fi>
> >> Subject: Re: Multicast Fails Over Multipoint GRE
> Tunnel
> >> To: "Eric Dumazet" <eric.dumazet@gmail.com>
> >> Cc: "Doug Kehn" <rdkehn@yahoo.com>,
> netdev@vger.kernel.org
> >> Date: Tuesday, March 15, 2011, 12:36 PM
> >> On 03/15/2011 05:34 PM, Eric Dumazet
> >> wrote:
> >>> Le lundi 14 mars 2011 à 16:34 -0700, Doug
> Kehn a
> >> écrit :
> >>>> I'm running kernel version 2.6.36 on ARM
> XSCALE
> >> (big-endian) and multicast over a multipoint GRE
> tunnel
> >> isn't working.  For my architecture, this
> worked on
> >> 2.6.26.8.  For x86, multicast over a
> multipoint GRE
> >> tunnel worked with kernel version 2.6.31 but
> failed with
> >> version 2.6.35.  Multicast over a multipoint
> GRE tunnel
> >> fails because ipgre_header() fails the 'if
> (iph->daddr)'
> >> check and reutrns -t->hlen. 
> ipgre_header() is being
> >> called, from neigh_connected_output(), with a
> non-null
> >> daddr; the contents of daddr is zero.
> >
> > I wasn't sure if the above patch was in addition too
> or in lieu of the partial revert of ipgre_header() suggested
> by Eric; both cases were attempted.
> 
> It was intended without the ipgre_header revert. The
> partial revert does
> not differ from full revert related to my problem.
> 
> > The multicast scenario described does not work if only
> the arp_mc_map() patch is applied.
> 
> Uh. Right, the if test had wrong condition. The intention
> was to show
> the idea that we create the multicast-to-multicast GRE
> NOARP mappings in
> arp code where it should've been done in the first place
> (IMHO).
> 
> Could you try the below patch? That should work better. And
> the
> ipgre_header should not be touched.
> 
> - Timo
> 
> diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
> index 7927589..8c24845 100644
> --- a/net/ipv4/arp.c
> +++ b/net/ipv4/arp.c
> @@ -215,6 +215,13 @@ int arp_mc_map(__be32 addr, u8 *haddr,
> struct
> net_device *dev, int dir)
>      case ARPHRD_INFINIBAND:
>          ip_ib_mc_map(addr,
> dev->broadcast, haddr);
>          return 0;
> +    case ARPHRD_IPGRE:
> +        if (dev->addr_len
> == 4 &&
> +           
> get_unaligned_be32(dev->broadcast) != INADDR_ANY)
> +           
> memcpy(haddr, dev->broadcast, dev->addr_len);
> +        else
> +           
> memcpy(haddr, &addr, sizeof(addr));
> +        return 0;
>      default:
>          if (dir) {
>             
> memcpy(haddr, dev->broadcast, dev->addr_len);
> --

It does!  With this patch my configuration works.

Thanks,
...doug



      

^ permalink raw reply

* Re: [RFC] netfilter: get rid of atomic ops in fast path
From: David Miller @ 2011-03-16 20:16 UTC (permalink / raw)
  To: eric.dumazet; +Cc: kaber, netfilter-devel, netdev, hawk
In-Reply-To: <1300302005.3202.23.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 16 Mar 2011 20:00:05 +0100

> We currently use a percpu spinlock to 'protect' rule bytes/packets
> counters, after various attempts to use RCU instead.
> 
> Lately we added a seqlock so that get_counters() can run without
> blocking BH or 'writers'. But we really use the seqcount in it.
> 
> Spinlock itself is only locked by the current cpu, so we can remove it
> completely.
> 
> This cleanups api, using correct 'writer' vs 'reader' semantic.
> 
> At replace time, the get_counters() call makes sure all cpus are done
> using the old table.
> 
> We could probably avoid blocking BH (we currently block them in xmit
> path), but thats a different topic ;)
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

FWIW, I think this is a great idea.

^ permalink raw reply

* Re: [PATCHv2 0/9] macb: add support for Cadence GEM
From: David Miller @ 2011-03-16 20:17 UTC (permalink / raw)
  To: jamie; +Cc: netdev, linux-arm-kernel, nicolas.ferre, plagnioj
In-Reply-To: <1300184096-13937-1-git-send-email-jamie@jamieiles.com>

From: Jamie Iles <jamie@jamieiles.com>
Date: Tue, 15 Mar 2011 10:14:47 +0000

> This patch series extends the Atmel MACB driver to support the Cadence
> GEM (Gigabit Ethernet MAC) to support 10/100 operation.  The GEM is
> based on the MACB block but has a few moved registers and bitfields.
> This patch series attempts to use the MACB accessors where block
> functionallity is identical and only overrides to GEM specific
> acccessors when needed.
> 
> This has been runtested on a board with a Cadence GEM and compile tested
> for all at91 configurations and a number of avr32 configurations.
> 
> Changes since v1:
> 	- AT91 now provides a fake "hclk" and "macb_clk" has been
> 	renamed to "pclk" to be consistent with AVR32.
> 	- Configurable GEM receive buffer size support has been added.
> 	- pr_foo() and dev_foo() have been converted to netdev_foo()
> 	where appropriate.
> 	- New conditional accessors (macb_or_gem_{read,write}l) have
> 	been introduced that do the conditional accesses dependent on
> 	macb/gem type.
> 	- GEM is now dynamically detected from the module ID rather than
> 	platform device name.
> 
> Jean-Christophe, I haven't based this on your conditional clock patch as
> I wasn't sure what decision had been made on that and whether the
> at91/avr32 detection is reliable.

I'm happy to ACK this so you guys can merge this via one of the
ARM trees:

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply


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