Message ID | 20221006085921.1323148-2-yanjun.zhu@linux.dev (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | Fix the problem that rxe can not work in net | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c index 51daac5c4feb..a22ff2207b42 100644 --- a/drivers/infiniband/sw/rxe/rxe.c +++ b/drivers/infiniband/sw/rxe/rxe.c @@ -192,6 +192,10 @@ static int rxe_newlink(const char *ibdev_name, struct net_device *ndev) goto err; } + err = rxe_net_init(); + if (err) + return err; + err = rxe_net_add(ibdev_name, ndev); if (err) { pr_err("failed to add %s\n", ndev->name); @@ -210,10 +214,6 @@ static int __init rxe_module_init(void) { int err; - err = rxe_net_init(); - if (err) - return err; - rdma_link_register(&rxe_link_ops); pr_info("loaded\n"); return 0;