Originally, after adding a RXE device successfully, the RXE device gets ready, it still reports 'PORT_DOWN' state. Set the state to *IB_PORT_ACTIVE* once it becomes ready to access. Signed-off-by: zhenwei pi <pizhenwei@xxxxxxxxxxxxx> --- drivers/infiniband/sw/rxe/rxe_net.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c index cd59666158b1..eafcb2351a7b 100644 --- a/drivers/infiniband/sw/rxe/rxe_net.c +++ b/drivers/infiniband/sw/rxe/rxe_net.c @@ -524,6 +524,7 @@ int rxe_net_add(const char *ibdev_name, struct net_device *ndev) { int err; struct rxe_dev *rxe = NULL; + struct rxe_port *port; rxe = ib_alloc_device(rxe_dev, ib_dev); if (!rxe) @@ -537,6 +538,11 @@ int rxe_net_add(const char *ibdev_name, struct net_device *ndev) return err; } + if (netif_running(ndev) && netif_carrier_ok(ndev)) { + port = &rxe->port; + port->attr.state = IB_PORT_ACTIVE; + } + return 0; } -- 2.34.1