From: Leon Romanovsky <leonro@xxxxxxxxxxxx> Provide to user space applications ability to reuse kernel link state enum. Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> --- include/rdma/ib_verbs.h | 12 ++++++------ include/uapi/rdma/rdma.h | 10 ++++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index a7cd54061f48..7e9940244e38 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -383,12 +383,12 @@ static inline enum ib_mtu ib_mtu_int_to_enum(int mtu) } enum ib_port_state { - IB_PORT_NOP = 0, - IB_PORT_DOWN = 1, - IB_PORT_INIT = 2, - IB_PORT_ARMED = 3, - IB_PORT_ACTIVE = 4, - IB_PORT_ACTIVE_DEFER = 5 + IB_PORT_NOP = RDMA_LINK_STATE_NOP, + IB_PORT_DOWN = RDMA_LINK_STATE_DOWN, + IB_PORT_INIT = RDMA_LINK_STATE_INIT, + IB_PORT_ARMED = RDMA_LINK_STATE_ARMED, + IB_PORT_ACTIVE = RDMA_LINK_STATE_ACTIVE, + IB_PORT_ACTIVE_DEFER = RDMA_LINK_STATE_ACTIVE_DEFER }; enum ib_port_cap_flags { diff --git a/include/uapi/rdma/rdma.h b/include/uapi/rdma/rdma.h index 397796e63a3a..5f4019e2c5d4 100644 --- a/include/uapi/rdma/rdma.h +++ b/include/uapi/rdma/rdma.h @@ -143,4 +143,14 @@ enum rdma_port_cap { RDMA_PORT_CLIENT_REG = 1 << 25, RDMA_PORT_IP_BASED_GIDS = 1 << 26, }; + +enum rdma_link_state { + RDMA_LINK_STATE_NOP, + RDMA_LINK_STATE_DOWN, + RDMA_LINK_STATE_INIT, + RDMA_LINK_STATE_ARMED, + RDMA_LINK_STATE_ACTIVE, + RDMA_LINK_STATE_ACTIVE_DEFER, +}; +}; #endif /* _RDMA_H */ -- 2.14.0 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html