Re: [ofa-general] [PATCH 09/13] QLogic VNIC: IB Multicast for Ethernet broadcast/multicast

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ramachandra K <ramachandra.kuchimanchi@...>
Cc: <general@...>, <netdev@...>, <poornima.kamath@...>, <amar.mudrankit@...>
Date: Thursday, May 15, 2008 - 6:38 pm

> +#define SET_MCAST_STATE_INVALID \
 > +do { \
 > +	viport->mc_info.state = MCAST_STATE_INVALID; \
 > +	viport->mc_info.mc = NULL; \
 > +	memset(&viport->mc_info.mgid, 0, sizeof(union ib_gid)); \
 > +} while (0);

Seems like this could be profitably implemented in C instead of CPP.

 > +		spin_lock_irqsave(&viport->mc_info.lock, flags);
 > +		viport->mc_info.state = MCAST_STATE_INVALID;
 > +		spin_unlock_irqrestore(&viport->mc_info.lock, flags);

This pattern makes me uneasy about the locking... setting the state
member will already be atomic, so what do you think you're protecting
against here by taking the lock?

 - R.
--
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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/13] QLogic Virtual NIC (VNIC) Driver , Ramachandra K, (Wed Apr 30, 1:15 pm)
Re: [PATCH 00/13] QLogic Virtual NIC (VNIC) Driver, Roland Dreier, (Wed Apr 30, 6:25 pm)
[PATCH 01/13] QLogic VNIC: Driver - netdev implementation, Ramachandra K, (Wed Apr 30, 1:16 pm)
[PATCH 06/13] QLogic VNIC: IB core stack interaction, Ramachandra K, (Wed Apr 30, 1:18 pm)
Re: [PATCH 06/13] QLogic VNIC: IB core stack interaction, Roland Dreier, (Tue May 13, 4:40 pm)
Re: [PATCH 08/13] QLogic VNIC: sysfs interface implementatio..., Stephen Hemminger, (Thu May 1, 10:56 am)
[PATCH 10/13] QLogic VNIC: Driver Statistics collection, Ramachandra K, (Wed Apr 30, 1:20 pm)
Re: [ofa-general] [PATCH 09/13] QLogic VNIC: IB Multicast fo..., Roland Dreier, (Thu May 15, 6:38 pm)
[PATCH 12/13] QLogic VNIC: Driver Kconfig and Makefile., Ramachandra K, (Wed Apr 30, 1:21 pm)
Re: [PATCH 11/13] QLogic VNIC: Driver utility file - impleme..., Stephen Hemminger, (Thu May 1, 10:58 am)