Message ID | 1503951119-25573-12-git-send-email-andrew.boyer@dell.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Mon, Aug 28, 2017 at 04:11:59PM -0400, Andrew Boyer wrote: > Without this fix, ports configured on top of ixgbe miss link up > notifications. ibv_query_port() will continue to return IBV_PORT_DOWN even > though the port is up and working. > > Fixes: 8700e3e7c485 ("Soft RoCE driver") > Signed-off-by: Andrew Boyer <andrew.boyer@dell.com> Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> > --- > drivers/infiniband/sw/rxe/rxe_net.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c > index 3ba76e7..59dee10 100644 > --- a/drivers/infiniband/sw/rxe/rxe_net.c > +++ b/drivers/infiniband/sw/rxe/rxe_net.c > @@ -651,8 +651,13 @@ static int rxe_notify(struct notifier_block *not_blk, > pr_info("%s changed mtu to %d\n", ndev->name, ndev->mtu); > rxe_set_mtu(rxe, ndev->mtu); > break; > - case NETDEV_REBOOT: > case NETDEV_CHANGE: > + if (netif_running(ndev) && netif_carrier_ok(ndev)) > + rxe_port_up(rxe); > + else > + rxe_port_down(rxe); > + break; > + case NETDEV_REBOOT: > case NETDEV_GOING_DOWN: > case NETDEV_CHANGEADDR: > case NETDEV_CHANGENAME: > -- > 1.8.3.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c index 3ba76e7..59dee10 100644 --- a/drivers/infiniband/sw/rxe/rxe_net.c +++ b/drivers/infiniband/sw/rxe/rxe_net.c @@ -651,8 +651,13 @@ static int rxe_notify(struct notifier_block *not_blk, pr_info("%s changed mtu to %d\n", ndev->name, ndev->mtu); rxe_set_mtu(rxe, ndev->mtu); break; - case NETDEV_REBOOT: case NETDEV_CHANGE: + if (netif_running(ndev) && netif_carrier_ok(ndev)) + rxe_port_up(rxe); + else + rxe_port_down(rxe); + break; + case NETDEV_REBOOT: case NETDEV_GOING_DOWN: case NETDEV_CHANGEADDR: case NETDEV_CHANGENAME:
Without this fix, ports configured on top of ixgbe miss link up notifications. ibv_query_port() will continue to return IBV_PORT_DOWN even though the port is up and working. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Andrew Boyer <andrew.boyer@dell.com> --- drivers/infiniband/sw/rxe/rxe_net.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)