netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bonding: use the correct size for _simple_hash()
@ 2011-02-28  9:34 Amerigo Wang
  2011-02-28 21:21 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Amerigo Wang @ 2011-02-28  9:34 UTC (permalink / raw)
  To: linux-kernel; +Cc: WANG Cong, Jay Vosburgh, netdev

Clearly it should be the size of ->ip_dst here.
Although this is harmless, but it still reads odd.

Signed-off-by: WANG Cong <amwang@redhat.com>

---
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 5c6fba8..9bc5de3 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -604,7 +604,7 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bon
 
 	_lock_rx_hashtbl(bond);
 
-	hash_index = _simple_hash((u8 *)&arp->ip_dst, sizeof(arp->ip_src));
+	hash_index = _simple_hash((u8 *)&arp->ip_dst, sizeof(arp->ip_dst));
 	client_info = &(bond_info->rx_hashtbl[hash_index]);
 
 	if (client_info->assigned) {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] bonding: use the correct size for _simple_hash()
  2011-02-28  9:34 [PATCH] bonding: use the correct size for _simple_hash() Amerigo Wang
@ 2011-02-28 21:21 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-02-28 21:21 UTC (permalink / raw)
  To: amwang; +Cc: linux-kernel, fubar, netdev

From: Amerigo Wang <amwang@redhat.com>
Date: Mon, 28 Feb 2011 17:34:28 +0800

> Clearly it should be the size of ->ip_dst here.
> Although this is harmless, but it still reads odd.
> 
> Signed-off-by: WANG Cong <amwang@redhat.com>

Applied to net-next-2.6, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-28 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-28  9:34 [PATCH] bonding: use the correct size for _simple_hash() Amerigo Wang
2011-02-28 21:21 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).