Skip to content

Commit

Permalink
IB/ipoib: Fix for potential no-carrier state
Browse files Browse the repository at this point in the history
On reboot SM can program port pkey table before ipoib registered its
event handler, which could result in missing pkey event and leave root
interface with initial pkey value from index 0.

Since OPA port starts with invalid pkey in index 0, root interface will
fail to initialize and stay down with no-carrier flag.

For IB ipoib interface may end up with pkey different from value
opensm put in pkey table idx 0, resulting in connectivity issues
(different mcast groups, for example).

Close the window by calling event handler after registration
to make sure ipoib pkey is in sync with port pkey table.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Alex Estrin <alex.estrin@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
  • Loading branch information
Alex Estrin authored and Jason Gunthorpe committed Feb 1, 2018
1 parent b5de809 commit 1029361
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/infiniband/ulp/ipoib/ipoib_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2306,6 +2306,9 @@ static struct net_device *ipoib_add_port(const char *format,
priv->ca, ipoib_event);
ib_register_event_handler(&priv->event_handler);

/* call event handler to ensure pkey in sync */
queue_work(ipoib_workqueue, &priv->flush_heavy);

result = register_netdev(priv->dev);
if (result) {
pr_warn("%s: couldn't register ipoib port %d; error %d\n",
Expand Down

0 comments on commit 1029361

Please sign in to comment.