diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2014-12-07 14:12:02 +0300 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-12-13 10:32:34 +0300 |
commit | 24f412dd3838a1fecad7c702ee76039b818b310a (patch) | |
tree | 1cbce8bbdba9e0ee1b11a5665eee8587f71964e6 /drivers/infiniband/ulp/isert/ib_isert.h | |
parent | 991bb7640d7e0971c360b6166cbca84a7f502312 (diff) | |
download | linux-24f412dd3838a1fecad7c702ee76039b818b310a.tar.xz |
iser-target: Use debug_level parameter to control logging level
Personal preference, easier control of the log level with
a single modparam which can be changed dynamically. Allows
better saparation of control and IO plains.
Replaced throughout ib_isert.c:
s/pr_debug/isert_dbg/g
s/pr_info/isert_info/g
s/pr_warn/isert_warn/g
s/pr_err/isert_err/g
Plus nit checkpatch warning change.
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/infiniband/ulp/isert/ib_isert.h')
-rw-r--r-- | drivers/infiniband/ulp/isert/ib_isert.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.h b/drivers/infiniband/ulp/isert/ib_isert.h index e89f384efc22..8dc8415d152d 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.h +++ b/drivers/infiniband/ulp/isert/ib_isert.h @@ -4,6 +4,33 @@ #include <rdma/ib_verbs.h> #include <rdma/rdma_cm.h> +#define DRV_NAME "isert" +#define PFX DRV_NAME ": " + +#define isert_dbg(fmt, arg...) \ + do { \ + if (unlikely(isert_debug_level > 2)) \ + printk(KERN_DEBUG PFX "%s: " fmt,\ + __func__ , ## arg); \ + } while (0) + +#define isert_warn(fmt, arg...) \ + do { \ + if (unlikely(isert_debug_level > 0)) \ + pr_warn(PFX "%s: " fmt, \ + __func__ , ## arg); \ + } while (0) + +#define isert_info(fmt, arg...) \ + do { \ + if (unlikely(isert_debug_level > 1)) \ + pr_info(PFX "%s: " fmt, \ + __func__ , ## arg); \ + } while (0) + +#define isert_err(fmt, arg...) \ + pr_err(PFX "%s: " fmt, __func__ , ## arg) + #define ISERT_RDMA_LISTEN_BACKLOG 10 #define ISCSI_ISER_SG_TABLESIZE 256 #define ISER_FASTREG_LI_WRID 0xffffffffffffffffULL |