Patchwork bonding:set save_load to 0 when initializing

login
register
mail settings
Submitter Peter Pan(潘卫平)
Date April 8, 2011, 1:40 p.m.
Message ID <1302270019-11698-1-git-send-email-panweiping3@gmail.com>
Download mbox | patch
Permalink /patch/90343/
State Accepted
Delegated to: David Miller
Headers show

Comments

Peter Pan(潘卫平) - April 8, 2011, 1:40 p.m.
It is unnecessary to set save_load to 1 here,
as the tx_hashtbl is just kzalloced.

Signed-off-by: Weiping Pan(潘卫平) <panweiping3@gmail.com>
---
 drivers/net/bonding/bond_alb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Jay Vosburgh - April 11, 2011, 6:56 p.m.
>It is unnecessary to set save_load to 1 here,
>as the tx_hashtbl is just kzalloced.
>
>Signed-off-by: Weiping Pan(潘卫平) <panweiping3@gmail.com>

	I don't think this will cause any behavioral change, but I'll
grant is more correct in intent (there's no load information to save at
this point).

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>

>---
> drivers/net/bonding/bond_alb.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
>index 9bc5de3..ab69e5a 100644
>--- a/drivers/net/bonding/bond_alb.c
>+++ b/drivers/net/bonding/bond_alb.c
>@@ -176,7 +176,7 @@ static int tlb_initialize(struct bonding *bond)
> 	bond_info->tx_hashtbl = new_hashtbl;
>
> 	for (i = 0; i < TLB_HASH_TABLE_SIZE; i++) {
>-		tlb_init_table_entry(&bond_info->tx_hashtbl[i], 1);
>+		tlb_init_table_entry(&bond_info->tx_hashtbl[i], 0);
> 	}
>
> 	_unlock_tx_hashtbl(bond);
>-- 
>1.7.4
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - April 11, 2011, 8:16 p.m.
From: Jay Vosburgh <fubar@us.ibm.com>

Date: Mon, 11 Apr 2011 11:56:47 -0700

> 

>>It is unnecessary to set save_load to 1 here,

>>as the tx_hashtbl is just kzalloced.

>>

>>Signed-off-by: Weiping Pan(潘卫平) <panweiping3@gmail.com>

> 

> 	I don't think this will cause any behavioral change, but I'll

> grant is more correct in intent (there's no load information to save at

> this point).

> 

> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>


Applied.

Patch

diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 9bc5de3..ab69e5a 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -176,7 +176,7 @@  static int tlb_initialize(struct bonding *bond)
 	bond_info->tx_hashtbl = new_hashtbl;
 
 	for (i = 0; i < TLB_HASH_TABLE_SIZE; i++) {
-		tlb_init_table_entry(&bond_info->tx_hashtbl[i], 1);
+		tlb_init_table_entry(&bond_info->tx_hashtbl[i], 0);
 	}
 
 	_unlock_tx_hashtbl(bond);