Re: [PATCH net-2.6] cxgb4: fix MAC address hash filter

Previous thread: BUG: secpath not clearing between namespaces by Andrew Dickinson on Friday, December 3, 2010 - 9:47 am. (1 message)

Next thread: [net-next-2.6 PATCH 1/2] ixgbe: fix for link failure on SFP+ DA cables by Jeff Kirsher on Friday, December 3, 2010 - 4:23 pm. (4 messages)
From: Dimitris Michailidis
Date: Friday, December 3, 2010 - 1:39 pm

Fix the calculation of the inexact hash-based MAC address filter.
It's 64 bits but current code is missing a ULL.  Results in filtering out
some legitimate packets.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
---
 drivers/net/cxgb4/t4_hw.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/cxgb4/t4_hw.c b/drivers/net/cxgb4/t4_hw.c
index bb813d9..e97521c 100644
--- a/drivers/net/cxgb4/t4_hw.c
+++ b/drivers/net/cxgb4/t4_hw.c
@@ -2408,7 +2408,7 @@ int t4_alloc_mac_filt(struct adapter *adap, unsigned int mbox,
 		if (index < NEXACT_MAC)
 			ret++;
 		else if (hash)
-			*hash |= (1 << hash_mac_addr(addr[i]));
+			*hash |= (1ULL << hash_mac_addr(addr[i]));
 	}
 	return ret;
 }
-- 
1.5.4

--

From: David Miller
Date: Wednesday, December 8, 2010 - 10:36 am

From: Dimitris Michailidis <dm@chelsio.com>

Applied, thanks.
--

Previous thread: BUG: secpath not clearing between namespaces by Andrew Dickinson on Friday, December 3, 2010 - 9:47 am. (1 message)

Next thread: [net-next-2.6 PATCH 1/2] ixgbe: fix for link failure on SFP+ DA cables by Jeff Kirsher on Friday, December 3, 2010 - 4:23 pm. (4 messages)