Browse Source

[ipoib] Attempt the broadcast group join only if the link is up

Attempting the broadcast group join while the link is down is
harmless, but can generate annoying volumes of debug messages.
tags/v0.9.8
Michael Brown 15 years ago
parent
commit
47c4aaa9e2
1 changed files with 4 additions and 9 deletions
  1. 4
    9
      src/drivers/net/ipoib.c

+ 4
- 9
src/drivers/net/ipoib.c View File

535
 	/* Fill receive rings */
535
 	/* Fill receive rings */
536
 	ib_refill_recv ( ibdev, ipoib->qp );
536
 	ib_refill_recv ( ibdev, ipoib->qp );
537
 
537
 
538
-	/* Join broadcast group */
539
-	if ( ( rc = ipoib_join_broadcast_group ( ipoib ) ) != 0 ) {
540
-		DBGC ( ipoib, "IPoIB %p could not join broadcast group: %s\n",
541
-		       ipoib, strerror ( rc ) );
542
-		goto err_join_broadcast;
543
-	}
538
+	/* Fake a link status change to join the broadcast group */
539
+	ipoib_link_state_changed ( ibdev );
544
 
540
 
545
 	return 0;
541
 	return 0;
546
 
542
 
547
-	ipoib_leave_broadcast_group ( ipoib );
548
- err_join_broadcast:
549
 	ib_destroy_qp ( ibdev, ipoib->qp );
543
 	ib_destroy_qp ( ibdev, ipoib->qp );
550
  err_create_qp:
544
  err_create_qp:
551
 	ib_destroy_cq ( ibdev, ipoib->cq );
545
 	ib_destroy_cq ( ibdev, ipoib->cq );
639
 	ipoib_set_ib_params ( ipoib );
633
 	ipoib_set_ib_params ( ipoib );
640
 
634
 
641
 	/* Join new broadcast group */
635
 	/* Join new broadcast group */
642
-	if ( ( rc = ipoib_join_broadcast_group ( ipoib ) ) != 0 ) {
636
+	if ( ib_link_ok ( ibdev ) &&
637
+	     ( ( rc = ipoib_join_broadcast_group ( ipoib ) ) != 0 ) ) {
643
 		DBGC ( ipoib, "IPoIB %p could not rejoin broadcast group: "
638
 		DBGC ( ipoib, "IPoIB %p could not rejoin broadcast group: "
644
 		       "%s\n", ipoib, strerror ( rc ) );
639
 		       "%s\n", ipoib, strerror ( rc ) );
645
 		return;
640
 		return;

Loading…
Cancel
Save