Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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.
  • Loading branch information
Michael Brown committed Jul 17, 2009
1 parent 165074c commit 47c4aaa
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/drivers/net/ipoib.c
Expand Up @@ -535,17 +535,11 @@ static int ipoib_open ( struct net_device *netdev ) {
/* Fill receive rings */
ib_refill_recv ( ibdev, ipoib->qp );

/* Join broadcast group */
if ( ( rc = ipoib_join_broadcast_group ( ipoib ) ) != 0 ) {
DBGC ( ipoib, "IPoIB %p could not join broadcast group: %s\n",
ipoib, strerror ( rc ) );
goto err_join_broadcast;
}
/* Fake a link status change to join the broadcast group */
ipoib_link_state_changed ( ibdev );

return 0;

ipoib_leave_broadcast_group ( ipoib );
err_join_broadcast:
ib_destroy_qp ( ibdev, ipoib->qp );
err_create_qp:
ib_destroy_cq ( ibdev, ipoib->cq );
Expand Down Expand Up @@ -639,7 +633,8 @@ void ipoib_link_state_changed ( struct ib_device *ibdev ) {
ipoib_set_ib_params ( ipoib );

/* Join new broadcast group */
if ( ( rc = ipoib_join_broadcast_group ( ipoib ) ) != 0 ) {
if ( ib_link_ok ( ibdev ) &&
( ( rc = ipoib_join_broadcast_group ( ipoib ) ) != 0 ) ) {
DBGC ( ipoib, "IPoIB %p could not rejoin broadcast group: "
"%s\n", ipoib, strerror ( rc ) );
return;
Expand Down

0 comments on commit 47c4aaa

Please sign in to comment.