Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH v4 net-next 0/5] bonding:use latest lacp_rate and ad_select and delete unused ad_timer and arp_mon_pt
From: David Miller @ 2011-06-09  7:21 UTC (permalink / raw)
  To: panweiping3; +Cc: fubar, andy, netdev, linux-kernel
In-Reply-To: <cover.1307603621.git.panweiping3@gmail.com>


My head will spin if I see yet another submission of these
patches :-(

^ permalink raw reply

* Re: [PATCH 2/2] net: dummy: allocate devices with alloc_netdev_id
From: David Miller @ 2011-06-09  7:20 UTC (permalink / raw)
  To: lucian.grijincu; +Cc: netdev, eric.dumazet
In-Reply-To: <20110607.022926.472309688813629515.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Tue, 07 Jun 2011 02:29:26 -0700 (PDT)

> From: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>
> Date: Tue, 7 Jun 2011 11:30:38 +0300
> 
>> @David: I see [1][2] that you marked the patches as Rejected. If it's
>> not a script that sends all my patches to /dev/null because of the
>> 100+ patch set I sent a while back, could you tell me why you rejected
>> the patches?
> 
> I misfired while changing patch states earlier today, I put them back
> into "Under Review"

So I took a look again, you're patches introduce problems.

We don't do the instance allocation and (more importantly) conflict
validation of the netdev name in alloc_netdev_mqs(), we do it when the
netdev is registered.

So with your patch some other entity could rename a random netdev
to "dummy62" in between the alloc_netdev_id() call and the register
and the register will fail erroneously.

I really don't like this optimization, sorry.  Make dev_alloc_name()
less stupid instead.


^ permalink raw reply

* [PATCH net-next 4/5] bonding: delete unused ad_timer
From: Weiping Pan @ 2011-06-09  7:19 UTC (permalink / raw)
  To: fubar, andy; +Cc: netdev, linux-kernel, Weiping Pan
In-Reply-To: <cover.1307603621.git.panweiping3@gmail.com>

Now we use agg_select_timer and ad_work.

Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Weiping Pan <panweiping3@gmail.com>
---
 drivers/net/bonding/bond_3ad.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h
index 1682e69..235b2cc 100644
--- a/drivers/net/bonding/bond_3ad.h
+++ b/drivers/net/bonding/bond_3ad.h
@@ -253,7 +253,6 @@ struct ad_system {
 struct ad_bond_info {
 	struct ad_system system;	    /* 802.3ad system structure */
 	u32 agg_select_timer;	    // Timer to select aggregator after all adapter's hand shakes
-	struct timer_list ad_timer;
 };
 
 struct ad_slave_info {
-- 
1.7.4.4

^ permalink raw reply related

* [PATCH net-next 3/5] bonding:delete agg_select_mode from ad_bond_info
From: Weiping Pan @ 2011-06-09  7:19 UTC (permalink / raw)
  To: fubar, andy; +Cc: netdev, linux-kernel, Weiping Pan
In-Reply-To: <cover.1307603621.git.panweiping3@gmail.com>

bond_params->ad_select and ad_bond_info->agg_select_mode have the same
meaning, they are duplicate and need extra synchronization.

__get_agg_selection_mode() get ad_select from bond_params directly.

Signed-off-by: Weiping Pan <panweiping3@gmail.com>
---
 drivers/net/bonding/bond_3ad.c |    3 +--
 drivers/net/bonding/bond_3ad.h |    1 -
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 013a801..6122725 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -262,7 +262,7 @@ static inline u32 __get_agg_selection_mode(struct port *port)
 	if (bond == NULL)
 		return BOND_AD_STABLE;
 
-	return BOND_AD_INFO(bond).agg_select_mode;
+	return bond->params.ad_select;
 }
 
 /**
@@ -1859,7 +1859,6 @@ static void ad_marker_response_received(struct bond_marker *marker,
 void bond_3ad_initiate_agg_selection(struct bonding *bond, int timeout)
 {
 	BOND_AD_INFO(bond).agg_select_timer = timeout;
-	BOND_AD_INFO(bond).agg_select_mode = bond->params.ad_select;
 }
 
 static u16 aggregator_identifier;
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h
index 9782785..1682e69 100644
--- a/drivers/net/bonding/bond_3ad.h
+++ b/drivers/net/bonding/bond_3ad.h
@@ -253,7 +253,6 @@ struct ad_system {
 struct ad_bond_info {
 	struct ad_system system;	    /* 802.3ad system structure */
 	u32 agg_select_timer;	    // Timer to select aggregator after all adapter's hand shakes
-	u32 agg_select_mode;	    // Mode of selection of active aggregator(bandwidth/count)
 	struct timer_list ad_timer;
 };
 
-- 
1.7.4.4

^ permalink raw reply related

* [PATCH net-next 1/5] bonding: make 802.3ad use latest lacp_rate
From: Weiping Pan @ 2011-06-09  7:19 UTC (permalink / raw)
  To: fubar, andy; +Cc: netdev, linux-kernel, Weiping Pan
In-Reply-To: <cover.1307603621.git.panweiping3@gmail.com>

There is bug that when you modify lacp_rate via sysfs,
802.3ad won't use the new value of lacp_rate to transmit packets.
This is because port->actor_oper_port_state isn't changed.

Signed-off-by: Weiping Pan <panweiping3@gmail.com>
---
 drivers/net/bonding/bond_3ad.c   |   31 +++++++++++++++++++++++++++++++
 drivers/net/bonding/bond_3ad.h   |    1 +
 drivers/net/bonding/bond_sysfs.c |    1 +
 3 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index c7537abc..4512bc4 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -2473,3 +2473,34 @@ void bond_3ad_lacpdu_recv(struct sk_buff *skb, struct bonding *bond,
 	bond_3ad_rx_indication((struct lacpdu *) skb->data, slave, skb->len);
 	read_unlock(&bond->lock);
 }
+
+/*
+ * When modify lacp_rate parameter via sysfs,
+ * update actor_oper_port_state of each port.
+ *
+ * Hold slave->state_machine_lock,
+ * so we can modify port->actor_oper_port_state,
+ * no matter bond is up or down.
+ */
+void bond_3ad_update_lacp_rate(struct bonding *bond)
+{
+	int i;
+	struct slave *slave;
+	struct port *port = NULL;
+	int lacp_fast;
+
+	read_lock(&bond->lock);
+	lacp_fast = bond->params.lacp_fast;
+
+	bond_for_each_slave(bond, slave, i) {
+		port = &(SLAVE_AD_INFO(slave).port);
+		__get_state_machine_lock(port);
+		if (lacp_fast)
+			port->actor_oper_port_state |= AD_STATE_LACP_TIMEOUT;
+		else
+			port->actor_oper_port_state &= ~AD_STATE_LACP_TIMEOUT;
+		__release_state_machine_lock(port);
+	}
+
+	read_unlock(&bond->lock);
+}
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h
index 0ee3f16..e466faf 100644
--- a/drivers/net/bonding/bond_3ad.h
+++ b/drivers/net/bonding/bond_3ad.h
@@ -282,5 +282,6 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev);
 void bond_3ad_lacpdu_recv(struct sk_buff *skb, struct bonding *bond,
 			  struct slave *slave);
 int bond_3ad_set_carrier(struct bonding *bond);
+void bond_3ad_update_lacp_rate(struct bonding *bond);
 #endif //__BOND_3AD_H__
 
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 88fcb25..03d1196 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -804,6 +804,7 @@ static ssize_t bonding_store_lacp(struct device *d,
 
 	if ((new_value == 1) || (new_value == 0)) {
 		bond->params.lacp_fast = new_value;
+		bond_3ad_update_lacp_rate(bond);
 		pr_info("%s: Setting LACP rate to %s (%d).\n",
 			bond->dev->name, bond_lacp_tbl[new_value].modename,
 			new_value);
-- 
1.7.4.4

^ permalink raw reply related

* [PATCH v4 net-next 0/5] bonding:use latest lacp_rate and ad_select and delete unused ad_timer and arp_mon_pt
From: Weiping Pan @ 2011-06-09  7:19 UTC (permalink / raw)
  To: fubar, andy; +Cc: netdev, linux-kernel, Weiping Pan

There is bug that when you modify lacp_rate via sysfs,
802.3ad won't use the new value of lacp_rate to transmit packets.
This is because port->actor_oper_port_state isn't changed.

As for ad_select, it can work,
but both struct bond_params and ad_bond_info have lacp_fast and ad_select,
they are duplicate and need extra synchronization.
802.3ad can get them from bond_params directly every time.

And ad_timer and arp_mon_pt aren't used any more, just delete them.

changelog:
v2:
add bond_3ad_update_lacp_rate() as a helper function,
and hold bond->lock when iterates slave list.

v3:
delete duplicate lacp_fast and agg_select_mode from struct ad_bond_info.

v4:
delete unused ad_timer and arp_mon_pt.

Weiping Pan (5):
  bonding: make 802.3ad use latest lacp_rate
  bonding:delete lacp_fast from ad_bond_info
  bonding:delete agg_select_mode from ad_bond_info
  bonding: delete unused ad_timer
  bonding: delete unused arp_mon_pt

 drivers/net/bonding/bond_3ad.c   |   41 ++++++++++++++++++++++++++++++++-----
 drivers/net/bonding/bond_3ad.h   |    8 +-----
 drivers/net/bonding/bond_main.c  |    3 +-
 drivers/net/bonding/bond_sysfs.c |    1 +
 drivers/net/bonding/bonding.h    |    1 -
 5 files changed, 39 insertions(+), 15 deletions(-)

-- 
1.7.4.4

^ permalink raw reply

* [PATCH net-next 5/5] bonding: delete unused arp_mon_pt
From: Weiping Pan @ 2011-06-09  7:19 UTC (permalink / raw)
  To: fubar, andy; +Cc: netdev, linux-kernel, Weiping Pan
In-Reply-To: <cover.1307603621.git.panweiping3@gmail.com>

Now all received packets are handled by bond_handle_frame,
and arp_mon_pt isn't used any more.

Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Weiping Pan <panweiping3@gmail.com>
---
 drivers/net/bonding/bonding.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index ea1d005..382903f 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -240,7 +240,6 @@ struct bonding {
 	struct   bond_params params;
 	struct   list_head vlan_list;
 	struct   vlan_group *vlgrp;
-	struct   packet_type arp_mon_pt;
 	struct   workqueue_struct *wq;
 	struct   delayed_work mii_work;
 	struct   delayed_work arp_work;
-- 
1.7.4.4


^ permalink raw reply related

* [PATCH net-next 2/5] bonding:delete lacp_fast from ad_bond_info
From: Weiping Pan @ 2011-06-09  7:19 UTC (permalink / raw)
  To: fubar, andy; +Cc: netdev, linux-kernel, Weiping Pan
In-Reply-To: <cover.1307603621.git.panweiping3@gmail.com>

These is also a bug, that if you modify lacp_rate via sysfs,
and add new slaves in bonding, new slaves won't use the latest lacp_rate,
since ad_bond_info->lacp_fast is initialized only once,
in bond_3ad_initialize().

Since both struct bond_params and ad_bond_info have lacp_fast,
they are duplicate and need extra synchronization.

bond_3ad_bind_slave() can use bond_params->lacp_fast to initialize port.
So we can just remove lacp_fast from struct ad_bond_info.

Signed-off-by: Weiping Pan <panweiping3@gmail.com>
---
 drivers/net/bonding/bond_3ad.c  |    7 +++----
 drivers/net/bonding/bond_3ad.h  |    5 +----
 drivers/net/bonding/bond_main.c |    3 +--
 3 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 4512bc4..013a801 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -1868,11 +1868,10 @@ static u16 aggregator_identifier;
  * bond_3ad_initialize - initialize a bond's 802.3ad parameters and structures
  * @bond: bonding struct to work on
  * @tick_resolution: tick duration (millisecond resolution)
- * @lacp_fast: boolean. whether fast periodic should be used
  *
  * Can be called only after the mac address of the bond is set.
  */
-void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution, int lacp_fast)
+void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution)
 {
 	// check that the bond is not initialized yet
 	if (MAC_ADDRESS_COMPARE(&(BOND_AD_INFO(bond).system.sys_mac_addr),
@@ -1880,7 +1879,6 @@ void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution, int lacp_fas
 
 		aggregator_identifier = 0;
 
-		BOND_AD_INFO(bond).lacp_fast = lacp_fast;
 		BOND_AD_INFO(bond).system.sys_priority = 0xFFFF;
 		BOND_AD_INFO(bond).system.sys_mac_addr = *((struct mac_addr *)bond->dev->dev_addr);
 
@@ -1903,6 +1901,7 @@ void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution, int lacp_fas
 int bond_3ad_bind_slave(struct slave *slave)
 {
 	struct bonding *bond = bond_get_bond_by_slave(slave);
+	int lacp_fast = bond->params.lacp_fast;
 	struct port *port;
 	struct aggregator *aggregator;
 
@@ -1918,7 +1917,7 @@ int bond_3ad_bind_slave(struct slave *slave)
 		// port initialization
 		port = &(SLAVE_AD_INFO(slave).port);
 
-		ad_initialize_port(port, BOND_AD_INFO(bond).lacp_fast);
+		ad_initialize_port(port, lacp_fast);
 
 		port->slave = slave;
 		port->actor_port_number = SLAVE_AD_INFO(slave).id;
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h
index e466faf..9782785 100644
--- a/drivers/net/bonding/bond_3ad.h
+++ b/drivers/net/bonding/bond_3ad.h
@@ -254,9 +254,6 @@ struct ad_bond_info {
 	struct ad_system system;	    /* 802.3ad system structure */
 	u32 agg_select_timer;	    // Timer to select aggregator after all adapter's hand shakes
 	u32 agg_select_mode;	    // Mode of selection of active aggregator(bandwidth/count)
-	int lacp_fast;		/* whether fast periodic tx should be
-				 * requested
-				 */
 	struct timer_list ad_timer;
 };
 
@@ -269,7 +266,7 @@ struct ad_slave_info {
 };
 
 // ================= AD Exported functions to the main bonding code ==================
-void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution, int lacp_fast);
+void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution);
 int  bond_3ad_bind_slave(struct slave *slave);
 void bond_3ad_unbind_slave(struct slave *slave);
 void bond_3ad_state_machine_handler(struct work_struct *);
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 716c852..bb1af9c 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1843,8 +1843,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
 			/* Initialize AD with the number of times that the AD timer is called in 1 second
 			 * can be called only after the mac address of the bond is set
 			 */
-			bond_3ad_initialize(bond, 1000/AD_TIMER_INTERVAL,
-					    bond->params.lacp_fast);
+			bond_3ad_initialize(bond, 1000/AD_TIMER_INTERVAL);
 		} else {
 			SLAVE_AD_INFO(new_slave).id =
 				SLAVE_AD_INFO(new_slave->prev).id + 1;
-- 
1.7.4.4


^ permalink raw reply related

* Re: [PATCH] gianfar:localized filer table
From: David Miller @ 2011-06-09  7:13 UTC (permalink / raw)
  To: b06378; +Cc: netdev, linuxppc-dev
In-Reply-To: <1307519211-3540-1-git-send-email-b06378@freescale.com>

From: Jiajun Wu <b06378@freescale.com>
Date: Wed, 8 Jun 2011 15:46:51 +0800

> Each eTSEC device should own localized filer table.
> 
> Signed-off-by: Jiajun Wu <b06378@freescale.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH v4 net-next 0/5] bonding:use latest lacp_rate and ad_select,
From: WeipingPan @ 2011-06-09  7:13 UTC (permalink / raw)
  To: Weiping Pan; +Cc: fubar, andy, netdev, linux-kernel
In-Reply-To: <cover.1307601948.git.panweiping3@gmail.com>

On 06/09/2011 03:03 PM, Weiping Pan wrote:
> There is bug that when you modify lacp_rate via sysfs,
> 802.3ad won't use the new value of lacp_rate to transmit packets.
> This is because port->actor_oper_port_state isn't changed.
>
> As for ad_select, it can work,
> but both struct bond_params and ad_bond_info have lacp_fast and ad_select,
> they are duplicate and need extra synchronization.
> 802.3ad can get them from bond_params directly every time.
>
> And ad_timer and arp_mon_pt aren't used any more, just delete them.
>
> changelog:
> v2:
> add bond_3ad_update_lacp_rate() as a helper function,
> and hold bond->lock when iterates slave list.
>
> v3:
> delete duplicate lacp_fast and agg_select_mode from struct ad_bond_info.
>
> v4:
> delete unused ad_timer and arp_mon_pt.
>
> Weiping Pan (5):
>    bonding: make 802.3ad use latest lacp_rate
>    bonding:delete lacp_fast from ad_bond_info
>    bonding:delete agg_select_mode from ad_bond_info
>    bonding: delete unused ad_timer
>    bonding: delete unused arp_mon_pt
>
>   drivers/net/bonding/bond_3ad.c   |   41 ++++++++++++++++++++++++++++++++-----
>   drivers/net/bonding/bond_3ad.h   |    8 +-----
>   drivers/net/bonding/bond_main.c  |    3 +-
>   drivers/net/bonding/bond_sysfs.c |    1 +
>   drivers/net/bonding/bonding.h    |    1 -
>   5 files changed, 39 insertions(+), 15 deletions(-)
>
Oh, my god, it's messy, I will resend the patch set.
sorry

Weiping Pan

^ permalink raw reply

* Re: [PATCH 2/3] net: msm_ipc: Add user-space support for MSM_IPC Router
From: David Miller @ 2011-06-09  7:11 UTC (permalink / raw)
  To: kramasub; +Cc: netdev, linux-arm-msm
In-Reply-To: <1307555467-1530-1-git-send-email-kramasub@codeaurora.org>


There is no reason to create a whole new socket address family, use
genetlink instead.

^ permalink raw reply

* Re: [PATCH] bonding: use new value of lacp_rate and ad_select
From: WeipingPan @ 2011-06-09  7:09 UTC (permalink / raw)
  To: Américo Wang
  Cc: jpirko, Jay Vosburgh, Andy Gospodarek, netdev, open list
In-Reply-To: <BANLkTik4az0FF+AUo1SbmvhJhKP-bBG4Fw@mail.gmail.com>

On 06/09/2011 11:15 AM, Américo Wang wrote:
> On Thu, Jun 9, 2011 at 11:13 AM, Américo Wang<xiyou.wangcong@gmail.com>  wrote:
>> On Thu, Jun 9, 2011 at 11:05 AM, WeipingPan<panweiping3@gmail.com>  wrote:
>>> On 06/07/2011 10:24 AM, Weiping Pan wrote:
>>>> There is bug that when you modify lacp_rate via sysfs,
>>>> 802.3ad won't use the new value of lacp_rate to transmit packets.
>>>> This is because port->actor_oper_port_state isn't changed.
>>>>
>>>> As for ad_select, it can work,
>>>> but both struct bond_params and ad_bond_info have lacp_fast and ad_select,
>>>> they are duplicate and need extra synchronization.
>>>> 802.3ad can get them from bond_params directly every time.
>>>>
>>> Any comments ?
>>>
>> I think you'd better separate bug fix from cleanup's.
>>
> By the way, please mark the version of your patch in $subject,
> in this case, V3. And describe what you changed from V2.
ok, I will split the patch.

thanks
Weiping Pan

^ permalink raw reply

* Re: [PATCH 1/2] tun: reserves space for network in skb
From: David Miller @ 2011-06-09  7:09 UTC (permalink / raw)
  To: shemminger; +Cc: netdev
In-Reply-To: <20110609003321.904295399@vyatta.com>

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 08 Jun 2011 17:33:07 -0700

> The tun driver allocates skb's to hold data from user and then passes
> the data into the network stack as received data. Most network devices
> allocate the receive skb with routines like dev_alloc_skb() that reserves
> additional space for use by network protocol stack but tun does not.
> 
> Because of the lack of padding, when the packet is passed through bridge
> netfilter a new skb has to be allocated.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Netconf must be coming up soon, Stephen Hemminger is submitting patches
again :-)

Both applied, thanks!

^ permalink raw reply

* Re: [net-next 00/12][pull request] Intel Wired LAN Driver Update
From: David Miller @ 2011-06-09  7:08 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo
In-Reply-To: <20110609.000505.2259375858864240000.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Thu, 09 Jun 2011 00:05:05 -0700 (PDT)

> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Wed,  8 Jun 2011 15:56:28 -0700
> 
>> The following series is a (smaller) subset of the previous 40 patch
>> submission.  This subset only contains updates to e1000e, igb, igbvf
>> and rtnetlink.
>> 
>> e1000e: several cleanups and fixes, as well as bump the version
>> igb/igbvf/ixgbevf: bump driver version
>> rtnetlink: Compute and store minimum ifinfo dump size
>> 
>> The following are changes since commit ffbc03bc75b39c7bd412e7cc6d2185c11b0ffedd:
>>   net: add needed interrupt.h
>> and are available in the git repository at:
>>   master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net-next-2.6 master
> 
> Pulled, thanks Jeff.

Actually, I have to un-pull.  Please build test your changes:

drivers/infiniband/core/netlink.c: In function ‘ibnl_rcv_msg’:
drivers/infiniband/core/netlink.c:151:9: error: too few arguments to function ‘netlink_dump_start’
include/linux/netlink.h:260:12: note: declared here
make[3]: *** [drivers/infiniband/core/netlink.o] Error 1
make[2]: *** [drivers/infiniband/core] Error 2
make[1]: *** [drivers/infiniband] Error 2
make[1]: *** Waiting for unfinished jobs....

^ permalink raw reply

* Re: [net-next 00/12][pull request] Intel Wired LAN Driver Update
From: David Miller @ 2011-06-09  7:05 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo
In-Reply-To: <1307573800-24868-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed,  8 Jun 2011 15:56:28 -0700

> The following series is a (smaller) subset of the previous 40 patch
> submission.  This subset only contains updates to e1000e, igb, igbvf
> and rtnetlink.
> 
> e1000e: several cleanups and fixes, as well as bump the version
> igb/igbvf/ixgbevf: bump driver version
> rtnetlink: Compute and store minimum ifinfo dump size
> 
> The following are changes since commit ffbc03bc75b39c7bd412e7cc6d2185c11b0ffedd:
>   net: add needed interrupt.h
> and are available in the git repository at:
>   master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net-next-2.6 master

Pulled, thanks Jeff.

^ permalink raw reply

* [PATCH net-next 2/5] bonding:delete lacp_fast from ad_bond_info
From: Weiping Pan @ 2011-06-09  7:03 UTC (permalink / raw)
  To: fubar, andy; +Cc: netdev, linux-kernel, Weiping Pan
In-Reply-To: <cover.1307601948.git.panweiping3@gmail.com>

These is also a bug, that if you modify lacp_rate via sysfs,
and add new slaves in bonding, new slaves won't use the latest lacp_rate,
since ad_bond_info->lacp_fast is initialized only once,
in bond_3ad_initialize().

Since both struct bond_params and ad_bond_info have lacp_fast,
they are duplicate and need extra synchronization.

bond_3ad_bind_slave() can use bond_params->lacp_fast to initialize port.
So we can just remove lacp_fast from struct ad_bond_info.

Signed-off-by: Weiping Pan <panweiping3@gmail.com>
---
 drivers/net/bonding/bond_3ad.c  |    7 +++----
 drivers/net/bonding/bond_3ad.h  |    5 +----
 drivers/net/bonding/bond_main.c |    3 +--
 3 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 4512bc4..013a801 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -1868,11 +1868,10 @@ static u16 aggregator_identifier;
  * bond_3ad_initialize - initialize a bond's 802.3ad parameters and structures
  * @bond: bonding struct to work on
  * @tick_resolution: tick duration (millisecond resolution)
- * @lacp_fast: boolean. whether fast periodic should be used
  *
  * Can be called only after the mac address of the bond is set.
  */
-void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution, int lacp_fast)
+void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution)
 {
 	// check that the bond is not initialized yet
 	if (MAC_ADDRESS_COMPARE(&(BOND_AD_INFO(bond).system.sys_mac_addr),
@@ -1880,7 +1879,6 @@ void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution, int lacp_fas
 
 		aggregator_identifier = 0;
 
-		BOND_AD_INFO(bond).lacp_fast = lacp_fast;
 		BOND_AD_INFO(bond).system.sys_priority = 0xFFFF;
 		BOND_AD_INFO(bond).system.sys_mac_addr = *((struct mac_addr *)bond->dev->dev_addr);
 
@@ -1903,6 +1901,7 @@ void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution, int lacp_fas
 int bond_3ad_bind_slave(struct slave *slave)
 {
 	struct bonding *bond = bond_get_bond_by_slave(slave);
+	int lacp_fast = bond->params.lacp_fast;
 	struct port *port;
 	struct aggregator *aggregator;
 
@@ -1918,7 +1917,7 @@ int bond_3ad_bind_slave(struct slave *slave)
 		// port initialization
 		port = &(SLAVE_AD_INFO(slave).port);
 
-		ad_initialize_port(port, BOND_AD_INFO(bond).lacp_fast);
+		ad_initialize_port(port, lacp_fast);
 
 		port->slave = slave;
 		port->actor_port_number = SLAVE_AD_INFO(slave).id;
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h
index e466faf..9782785 100644
--- a/drivers/net/bonding/bond_3ad.h
+++ b/drivers/net/bonding/bond_3ad.h
@@ -254,9 +254,6 @@ struct ad_bond_info {
 	struct ad_system system;	    /* 802.3ad system structure */
 	u32 agg_select_timer;	    // Timer to select aggregator after all adapter's hand shakes
 	u32 agg_select_mode;	    // Mode of selection of active aggregator(bandwidth/count)
-	int lacp_fast;		/* whether fast periodic tx should be
-				 * requested
-				 */
 	struct timer_list ad_timer;
 };
 
@@ -269,7 +266,7 @@ struct ad_slave_info {
 };
 
 // ================= AD Exported functions to the main bonding code ==================
-void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution, int lacp_fast);
+void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution);
 int  bond_3ad_bind_slave(struct slave *slave);
 void bond_3ad_unbind_slave(struct slave *slave);
 void bond_3ad_state_machine_handler(struct work_struct *);
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 716c852..bb1af9c 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1843,8 +1843,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
 			/* Initialize AD with the number of times that the AD timer is called in 1 second
 			 * can be called only after the mac address of the bond is set
 			 */
-			bond_3ad_initialize(bond, 1000/AD_TIMER_INTERVAL,
-					    bond->params.lacp_fast);
+			bond_3ad_initialize(bond, 1000/AD_TIMER_INTERVAL);
 		} else {
 			SLAVE_AD_INFO(new_slave).id =
 				SLAVE_AD_INFO(new_slave->prev).id + 1;
-- 
1.7.4.4

^ permalink raw reply related

* [PATCH net-next 1/5] bonding: make 802.3ad use latest lacp_rate
From: Weiping Pan @ 2011-06-09  7:03 UTC (permalink / raw)
  To: fubar, andy; +Cc: netdev, linux-kernel, Weiping Pan
In-Reply-To: <cover.1307601948.git.panweiping3@gmail.com>

There is bug that when you modify lacp_rate via sysfs,
802.3ad won't use the new value of lacp_rate to transmit packets.
This is because port->actor_oper_port_state isn't changed.

Signed-off-by: Weiping Pan <panweiping3@gmail.com>
---
 drivers/net/bonding/bond_3ad.c   |   31 +++++++++++++++++++++++++++++++
 drivers/net/bonding/bond_3ad.h   |    1 +
 drivers/net/bonding/bond_sysfs.c |    1 +
 3 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index c7537abc..4512bc4 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -2473,3 +2473,34 @@ void bond_3ad_lacpdu_recv(struct sk_buff *skb, struct bonding *bond,
 	bond_3ad_rx_indication((struct lacpdu *) skb->data, slave, skb->len);
 	read_unlock(&bond->lock);
 }
+
+/*
+ * When modify lacp_rate parameter via sysfs,
+ * update actor_oper_port_state of each port.
+ *
+ * Hold slave->state_machine_lock,
+ * so we can modify port->actor_oper_port_state,
+ * no matter bond is up or down.
+ */
+void bond_3ad_update_lacp_rate(struct bonding *bond)
+{
+	int i;
+	struct slave *slave;
+	struct port *port = NULL;
+	int lacp_fast;
+
+	read_lock(&bond->lock);
+	lacp_fast = bond->params.lacp_fast;
+
+	bond_for_each_slave(bond, slave, i) {
+		port = &(SLAVE_AD_INFO(slave).port);
+		__get_state_machine_lock(port);
+		if (lacp_fast)
+			port->actor_oper_port_state |= AD_STATE_LACP_TIMEOUT;
+		else
+			port->actor_oper_port_state &= ~AD_STATE_LACP_TIMEOUT;
+		__release_state_machine_lock(port);
+	}
+
+	read_unlock(&bond->lock);
+}
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h
index 0ee3f16..e466faf 100644
--- a/drivers/net/bonding/bond_3ad.h
+++ b/drivers/net/bonding/bond_3ad.h
@@ -282,5 +282,6 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev);
 void bond_3ad_lacpdu_recv(struct sk_buff *skb, struct bonding *bond,
 			  struct slave *slave);
 int bond_3ad_set_carrier(struct bonding *bond);
+void bond_3ad_update_lacp_rate(struct bonding *bond);
 #endif //__BOND_3AD_H__
 
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 88fcb25..03d1196 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -804,6 +804,7 @@ static ssize_t bonding_store_lacp(struct device *d,
 
 	if ((new_value == 1) || (new_value == 0)) {
 		bond->params.lacp_fast = new_value;
+		bond_3ad_update_lacp_rate(bond);
 		pr_info("%s: Setting LACP rate to %s (%d).\n",
 			bond->dev->name, bond_lacp_tbl[new_value].modename,
 			new_value);
-- 
1.7.4.4

^ permalink raw reply related

* [PATCH v4 net-next 0/5] bonding:use latest lacp_rate and ad_select,
From: Weiping Pan @ 2011-06-09  7:03 UTC (permalink / raw)
  To: fubar, andy; +Cc: netdev, linux-kernel, Weiping Pan

There is bug that when you modify lacp_rate via sysfs,
802.3ad won't use the new value of lacp_rate to transmit packets.
This is because port->actor_oper_port_state isn't changed.

As for ad_select, it can work,
but both struct bond_params and ad_bond_info have lacp_fast and ad_select,
they are duplicate and need extra synchronization.
802.3ad can get them from bond_params directly every time.

And ad_timer and arp_mon_pt aren't used any more, just delete them.

changelog:
v2:
add bond_3ad_update_lacp_rate() as a helper function,
and hold bond->lock when iterates slave list.

v3:
delete duplicate lacp_fast and agg_select_mode from struct ad_bond_info.

v4:
delete unused ad_timer and arp_mon_pt.

Weiping Pan (5):
  bonding: make 802.3ad use latest lacp_rate
  bonding:delete lacp_fast from ad_bond_info
  bonding:delete agg_select_mode from ad_bond_info
  bonding: delete unused ad_timer
  bonding: delete unused arp_mon_pt

 drivers/net/bonding/bond_3ad.c   |   41 ++++++++++++++++++++++++++++++++-----
 drivers/net/bonding/bond_3ad.h   |    8 +-----
 drivers/net/bonding/bond_main.c  |    3 +-
 drivers/net/bonding/bond_sysfs.c |    1 +
 drivers/net/bonding/bonding.h    |    1 -
 5 files changed, 39 insertions(+), 15 deletions(-)

-- 
1.7.4.4

^ permalink raw reply

* [PATCH net-next 5/5] bonding: delete unused arp_mon_pt
From: Weiping Pan @ 2011-06-09  7:03 UTC (permalink / raw)
  To: fubar, andy; +Cc: netdev, linux-kernel, Weiping Pan
In-Reply-To: <cover.1307601948.git.panweiping3@gmail.com>

Now all received packets are handled by bond_handle_frame,
and arp_mon_pt isn't used any more.

Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Weiping Pan <panweiping3@gmail.com>
---
 drivers/net/bonding/bonding.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index ea1d005..382903f 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -240,7 +240,6 @@ struct bonding {
 	struct   bond_params params;
 	struct   list_head vlan_list;
 	struct   vlan_group *vlgrp;
-	struct   packet_type arp_mon_pt;
 	struct   workqueue_struct *wq;
 	struct   delayed_work mii_work;
 	struct   delayed_work arp_work;
-- 
1.7.4.4


^ permalink raw reply related

* [PATCH net-next 4/5] bonding: delete unused ad_timer
From: Weiping Pan @ 2011-06-09  7:03 UTC (permalink / raw)
  To: fubar, andy; +Cc: netdev, linux-kernel, Weiping Pan
In-Reply-To: <cover.1307601948.git.panweiping3@gmail.com>

Now we use agg_select_timer and ad_work.

Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Weiping Pan <panweiping3@gmail.com>
---
 drivers/net/bonding/bond_3ad.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h
index 1682e69..235b2cc 100644
--- a/drivers/net/bonding/bond_3ad.h
+++ b/drivers/net/bonding/bond_3ad.h
@@ -253,7 +253,6 @@ struct ad_system {
 struct ad_bond_info {
 	struct ad_system system;	    /* 802.3ad system structure */
 	u32 agg_select_timer;	    // Timer to select aggregator after all adapter's hand shakes
-	struct timer_list ad_timer;
 };
 
 struct ad_slave_info {
-- 
1.7.4.4


^ permalink raw reply related

* [PATCH net-next 3/5] bonding:delete agg_select_mode from ad_bond_info
From: Weiping Pan @ 2011-06-09  7:03 UTC (permalink / raw)
  To: fubar, andy; +Cc: netdev, linux-kernel, Weiping Pan
In-Reply-To: <cover.1307601948.git.panweiping3@gmail.com>

bond_params->ad_select and ad_bond_info->agg_select_mode have the same
meaning, they are duplicate and need extra synchronization.

__get_agg_selection_mode() get ad_select from bond_params directly.

Signed-off-by: Weiping Pan <panweiping3@gmail.com>
---
 drivers/net/bonding/bond_3ad.c |    3 +--
 drivers/net/bonding/bond_3ad.h |    1 -
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 013a801..6122725 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -262,7 +262,7 @@ static inline u32 __get_agg_selection_mode(struct port *port)
 	if (bond == NULL)
 		return BOND_AD_STABLE;
 
-	return BOND_AD_INFO(bond).agg_select_mode;
+	return bond->params.ad_select;
 }
 
 /**
@@ -1859,7 +1859,6 @@ static void ad_marker_response_received(struct bond_marker *marker,
 void bond_3ad_initiate_agg_selection(struct bonding *bond, int timeout)
 {
 	BOND_AD_INFO(bond).agg_select_timer = timeout;
-	BOND_AD_INFO(bond).agg_select_mode = bond->params.ad_select;
 }
 
 static u16 aggregator_identifier;
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h
index 9782785..1682e69 100644
--- a/drivers/net/bonding/bond_3ad.h
+++ b/drivers/net/bonding/bond_3ad.h
@@ -253,7 +253,6 @@ struct ad_system {
 struct ad_bond_info {
 	struct ad_system system;	    /* 802.3ad system structure */
 	u32 agg_select_timer;	    // Timer to select aggregator after all adapter's hand shakes
-	u32 agg_select_mode;	    // Mode of selection of active aggregator(bandwidth/count)
 	struct timer_list ad_timer;
 };
 
-- 
1.7.4.4


^ permalink raw reply related

* Re: [PATCH 5/5 net-next] cnic, bnx2: Check iSCSI support early in bnx2_init_one()
From: David Miller @ 2011-06-09  6:53 UTC (permalink / raw)
  To: mchan; +Cc: netdev, nhorman
In-Reply-To: <1307597376-5379-5-git-send-email-mchan@broadcom.com>

From: "Michael Chan" <mchan@broadcom.com>
Date: Wed, 8 Jun 2011 22:29:36 -0700

> Based on earlier patch from Neil Horman <nhorman@tuxdriver.com>
> 
> If iSCSI is not supported on a bnx2 device, bnx2_cnic_probe() will
> return NULL and the cnic device will not be visible to bnx2i.  This
> will prevent bnx2i from registering and then unregistering during
> cnic_start() and cause the warning message:
> 
> bnx2 0003:01:00.1: eth1: Failed waiting for ULP up call to complete
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>
> Cc: Neil Horman <nhorman@tuxdriver.com>

Applied.

^ permalink raw reply

* Re: [PATCH 4/5 net-next] cnic: Improve NETDEV_UP event handling
From: David Miller @ 2011-06-09  6:53 UTC (permalink / raw)
  To: mchan; +Cc: netdev
In-Reply-To: <1307597376-5379-4-git-send-email-mchan@broadcom.com>

From: "Michael Chan" <mchan@broadcom.com>
Date: Wed, 8 Jun 2011 22:29:35 -0700

> During NETDEV_UP, we use symbol_get() to get the net driver's cnic
> probe function.  This sometimes doesn't work if NETDEV_UP happens
> right after NETDEV_REGISTER and the net driver is still running module
> init code.  As a result, the cnic device may not be discovered.  We
> fix this by probing on all NETDEV events if the device's netif_running
> state is up.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied.

^ permalink raw reply

* Re: [PATCH 3/5 net-next] cnic: Randomize initial TCP port for iSCSI connections
From: David Miller @ 2011-06-09  6:53 UTC (permalink / raw)
  To: mchan; +Cc: netdev, eddie.wai
In-Reply-To: <1307597376-5379-3-git-send-email-mchan@broadcom.com>

From: "Michael Chan" <mchan@broadcom.com>
Date: Wed, 8 Jun 2011 22:29:34 -0700

> From: Eddie Wai <eddie.wai@broadcom.com>
> 
> This reduces the likelihood of port re-use when re-loading the driver.
> 
> Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied.

^ permalink raw reply

* Re: [PATCH 2/5 net-next] cnic: Fix race conditions with firmware
From: David Miller @ 2011-06-09  6:53 UTC (permalink / raw)
  To: mchan; +Cc: netdev
In-Reply-To: <1307597376-5379-2-git-send-email-mchan@broadcom.com>

From: "Michael Chan" <mchan@broadcom.com>
Date: Wed, 8 Jun 2011 22:29:33 -0700

> During iSCSI connection terminations, if the target is also terminating
> at about the same time, the firmware may not complete the driver's
> request to close or reset the connection.  This is fixed by handling
> other events (instead of the expected completion event) as an indication
> that the driver's request has been rejected.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied.

^ 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