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>
This commit is contained in:

committed by
Doug Ledford

parent
b9fe856e54
commit
e404f945a6
@@ -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);
|
||||
|
Reference in New Issue
Block a user