summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rxe/rxe.c
diff options
context:
space:
mode:
authorParav Pandit <pandit.parav@gmail.com>2016-09-28 22:26:26 +0200
committerDoug Ledford <dledford@redhat.com>2016-10-06 19:50:04 +0200
commite404f945a6101a6f0f2a29aade6dc32015471daa (patch)
treec507b2ce938d5faa0902346f3177373d264978fb /drivers/infiniband/sw/rxe/rxe.c
parentrdma_rxe: Ensure rdma_rxe init occurs at correct time (diff)
downloadlinux-e404f945a6101a6f0f2a29aade6dc32015471daa.tar.xz
linux-e404f945a6101a6f0f2a29aade6dc32015471daa.zip
IB/rxe: improved debug prints & code cleanup
1. Debugging qp state transitions and qp errors in loopback and multiple QP tests is difficult without qp numbers in debug logs. This patch adds qp number to important debug logs. 2. Instead of having rxe: prefix in few logs and not having in few logs, using uniform module name prefix using pr_fmt macro. 3. Code cleanup for various warnings reported by checkpatch for incomplete unsigned data type, line over 80 characters, return statements. Signed-off-by: Parav Pandit <pandit.parav@gmail.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe.c')
-rw-r--r--drivers/infiniband/sw/rxe/rxe.c34
1 files changed, 6 insertions, 28 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c
index 9a48e7277673..ab6c3c25d7ff 100644
--- a/drivers/infiniband/sw/rxe/rxe.c
+++ b/drivers/infiniband/sw/rxe/rxe.c
@@ -358,38 +358,16 @@ static int __init rxe_module_init(void)
/* initialize slab caches for managed objects */
err = rxe_cache_init();
if (err) {
- pr_err("rxe: unable to init object pools\n");
+ pr_err("unable to init object pools\n");
return err;
}
- err = rxe_net_ipv4_init();
- if (err) {
- pr_err("rxe: unable to init ipv4 tunnel\n");
- rxe_cache_exit();
- goto exit;
- }
-
- err = rxe_net_ipv6_init();
- if (err) {
- pr_err("rxe: unable to init ipv6 tunnel\n");
- rxe_cache_exit();
- goto exit;
- }
-
- err = register_netdevice_notifier(&rxe_net_notifier);
- if (err) {
- pr_err("rxe: Failed to rigister netdev notifier\n");
- goto exit;
- }
-
- pr_info("rxe: loaded\n");
+ err = rxe_net_init();
+ if (err)
+ return err;
+ pr_info("loaded\n");
return 0;
-
-exit:
- rxe_release_udp_tunnel(recv_sockets.sk4);
- rxe_release_udp_tunnel(recv_sockets.sk6);
- return err;
}
static void __exit rxe_module_exit(void)
@@ -398,7 +376,7 @@ static void __exit rxe_module_exit(void)
rxe_net_exit();
rxe_cache_exit();
- pr_info("rxe: unloaded\n");
+ pr_info("unloaded\n");
}
late_initcall(rxe_module_init);