IB/core, cma: Nice log-friendly string helpers
Some of us keep revisiting the code to decode enumerations that appear in out logs. Let's borrow the nice logging helpers that exists in xprtrdma and rds for CMA events, IB events and WC statuses. Reviewd-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:

committed by
Doug Ledford

parent
e26081808e
commit
2b1b5b6012
@@ -412,6 +412,8 @@ enum ib_event_type {
|
||||
IB_EVENT_GID_CHANGE,
|
||||
};
|
||||
|
||||
__attribute_const__ const char *ib_event_msg(enum ib_event_type event);
|
||||
|
||||
struct ib_event {
|
||||
struct ib_device *device;
|
||||
union {
|
||||
@@ -663,6 +665,8 @@ enum ib_wc_status {
|
||||
IB_WC_GENERAL_ERR
|
||||
};
|
||||
|
||||
__attribute_const__ const char *ib_wc_status_msg(enum ib_wc_status status);
|
||||
|
||||
enum ib_wc_opcode {
|
||||
IB_WC_SEND,
|
||||
IB_WC_RDMA_WRITE,
|
||||
|
Reference in New Issue
Block a user