|
@@ -89,14 +89,8 @@ struct ipoib_device {
|
89
|
89
|
struct ipoib_mac mac;
|
90
|
90
|
/** Broadcast MAC */
|
91
|
91
|
struct ipoib_mac broadcast;
|
92
|
|
- /** Joined to IPv4 broadcast multicast group
|
93
|
|
- *
|
94
|
|
- * This flag indicates whether or not we have initiated the
|
95
|
|
- * join to the IPv4 broadcast multicast group.
|
96
|
|
- */
|
97
|
|
- int broadcast_joined;
|
98
|
92
|
/** IPv4 broadcast multicast group membership */
|
99
|
|
- struct ib_mc_membership broadcast_membership;
|
|
93
|
+ struct ib_mc_membership membership;
|
100
|
94
|
/** REMAC cache */
|
101
|
95
|
struct list_head peers;
|
102
|
96
|
};
|
|
@@ -742,8 +736,8 @@ void ipoib_join_complete ( struct ib_device *ibdev __unused,
|
742
|
736
|
struct ib_queue_pair *qp __unused,
|
743
|
737
|
struct ib_mc_membership *membership, int rc,
|
744
|
738
|
union ib_mad *mad __unused ) {
|
745
|
|
- struct ipoib_device *ipoib = container_of ( membership,
|
746
|
|
- struct ipoib_device, broadcast_membership );
|
|
739
|
+ struct ipoib_device *ipoib =
|
|
740
|
+ container_of ( membership, struct ipoib_device, membership );
|
747
|
741
|
|
748
|
742
|
/* Record join status as link status */
|
749
|
743
|
netdev_link_err ( ipoib->netdev, rc );
|
|
@@ -759,14 +753,12 @@ static int ipoib_join_broadcast_group ( struct ipoib_device *ipoib ) {
|
759
|
753
|
int rc;
|
760
|
754
|
|
761
|
755
|
if ( ( rc = ib_mcast_join ( ipoib->ibdev, ipoib->qp,
|
762
|
|
- &ipoib->broadcast_membership,
|
763
|
|
- &ipoib->broadcast.gid,
|
|
756
|
+ &ipoib->membership, &ipoib->broadcast.gid,
|
764
|
757
|
ipoib_join_complete ) ) != 0 ) {
|
765
|
758
|
DBGC ( ipoib, "IPoIB %p could not join broadcast group: %s\n",
|
766
|
759
|
ipoib, strerror ( rc ) );
|
767
|
760
|
return rc;
|
768
|
761
|
}
|
769
|
|
- ipoib->broadcast_joined = 1;
|
770
|
762
|
|
771
|
763
|
return 0;
|
772
|
764
|
}
|
|
@@ -778,11 +770,7 @@ static int ipoib_join_broadcast_group ( struct ipoib_device *ipoib ) {
|
778
|
770
|
*/
|
779
|
771
|
static void ipoib_leave_broadcast_group ( struct ipoib_device *ipoib ) {
|
780
|
772
|
|
781
|
|
- if ( ipoib->broadcast_joined ) {
|
782
|
|
- ib_mcast_leave ( ipoib->ibdev, ipoib->qp,
|
783
|
|
- &ipoib->broadcast_membership );
|
784
|
|
- ipoib->broadcast_joined = 0;
|
785
|
|
- }
|
|
773
|
+ ib_mcast_leave ( ipoib->ibdev, ipoib->qp, &ipoib->membership );
|
786
|
774
|
}
|
787
|
775
|
|
788
|
776
|
/**
|