Re: [net-next-2.6 PATCH] ipoib: remove addrlen check for mc addresses

Previous thread: 8021p to dscp remarking by Smital Desai on Monday, March 22, 2010 - 4:54 am. (1 message)

Next thread: [PATCH] rxrpc: Check allocation failure. by David Howells on Monday, March 22, 2010 - 6:50 am. (2 messages)
From: Jiri Pirko
Date: Monday, March 22, 2010 - 6:21 am

Finally this bit can be removed. Currently, after the bonding driver is
changed/fixed (32a806c194ea112cfab00f558482dd97bee5e44e net-next-2.6),
that's not possible for an addr with different length than dev->addr_len
to be present in list. Removing this check as in new mc_list there will be
no addrlen in the record.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
 drivers/infiniband/ulp/ipoib/ipoib_multicast.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index d41ea27..19eba3c 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -767,11 +767,8 @@ void ipoib_mcast_dev_flush(struct net_device *dev)
 	}
 }
 
-static int ipoib_mcast_addr_is_valid(const u8 *addr, unsigned int addrlen,
-				     const u8 *broadcast)
+static int ipoib_mcast_addr_is_valid(const u8 *addr, const u8 *broadcast)
 {
-	if (addrlen != INFINIBAND_ALEN)
-		return 0;
 	/* reserved QPN, prefix, scope */
 	if (memcmp(addr, broadcast, 6))
 		return 0;
@@ -815,7 +812,6 @@ void ipoib_mcast_restart_task(struct work_struct *work)
 		union ib_gid mgid;
 
 		if (!ipoib_mcast_addr_is_valid(mclist->dmi_addr,
-					       mclist->dmi_addrlen,
 					       dev->broadcast))
 			continue;
 
-- 
1.6.6.1

--

From: Jason Gunthorpe
Date: Monday, March 22, 2010 - 9:59 am

Maybe just make this check a WARN_ON? Can userspace create a mc_list
entry with the wrong size via netlink?

Jason
--

From: Jiri Pirko
Date: Monday, March 22, 2010 - 10:26 am

As I said, addrlen will no longer be in record (because it would have no

--

From: Jason Gunthorpe
Date: Monday, March 22, 2010 - 10:46 am

Oh, I see, sounds good then

Jason
--

From: David Miller
Date: Monday, March 22, 2010 - 6:34 pm

From: Jiri Pirko <jpirko@redhat.com>

I've applied your patch, thanks Jiri.
--

From: Eli Cohen
Date: Tuesday, March 23, 2010 - 3:30 am

Could you send a link to the git tree where I can find this commit and
the related fixes?
--

From: Or Gerlitz
Date: Tuesday, March 23, 2010 - 3:34 am

basically, as the subject line suggests, it should be in Dave's net-next tree

Or.
--

From: Eli Cohen
Date: Tuesday, March 23, 2010 - 4:34 am

I just need to clone this tree and need the url. Can you give it to me
from .git/config?
Thanks.
--

From: Moni Shoua
Date: Tuesday, March 23, 2010 - 4:55 am

This is the link to the related patch of course but it also tells you which tree to clone
--

From: Moni Shoua
Date: Tuesday, March 23, 2010 - 3:46 am

See commit 5e47596bee12597824a3b5b21e20f80b61e58a35 for the fix prior to this one.
--

Previous thread: 8021p to dscp remarking by Smital Desai on Monday, March 22, 2010 - 4:54 am. (1 message)

Next thread: [PATCH] rxrpc: Check allocation failure. by David Howells on Monday, March 22, 2010 - 6:50 am. (2 messages)