Commit 175ba58d authored by Yishai Hadas's avatar Yishai Hadas Committed by Jason Gunthorpe

IB/uverbs: Move QP, SRQ, WQ type and flags to UAPI

These constants are going to be used in the ioctl interface in coming
patches so they are part of the UAPI, place them in the correct header
for clarity.

Link: https://lore.kernel.org/r/20200519072711.257271-5-leon@kernel.orgSigned-off-by: default avatarYishai Hadas <yishaih@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent cda9ee49
......@@ -1040,9 +1040,9 @@ enum ib_cq_notify_flags {
};
enum ib_srq_type {
IB_SRQT_BASIC,
IB_SRQT_XRC,
IB_SRQT_TM,
IB_SRQT_BASIC = IB_UVERBS_SRQT_BASIC,
IB_SRQT_XRC = IB_UVERBS_SRQT_XRC,
IB_SRQT_TM = IB_UVERBS_SRQT_TM,
};
static inline bool ib_srq_has_cq(enum ib_srq_type srq_type)
......@@ -1111,16 +1111,16 @@ enum ib_qp_type {
IB_QPT_SMI,
IB_QPT_GSI,
IB_QPT_RC,
IB_QPT_UC,
IB_QPT_UD,
IB_QPT_RC = IB_UVERBS_QPT_RC,
IB_QPT_UC = IB_UVERBS_QPT_UC,
IB_QPT_UD = IB_UVERBS_QPT_UD,
IB_QPT_RAW_IPV6,
IB_QPT_RAW_ETHERTYPE,
IB_QPT_RAW_PACKET = 8,
IB_QPT_XRC_INI = 9,
IB_QPT_XRC_TGT,
IB_QPT_RAW_PACKET = IB_UVERBS_QPT_RAW_PACKET,
IB_QPT_XRC_INI = IB_UVERBS_QPT_XRC_INI,
IB_QPT_XRC_TGT = IB_UVERBS_QPT_XRC_TGT,
IB_QPT_MAX,
IB_QPT_DRIVER = 0xFF,
IB_QPT_DRIVER = IB_UVERBS_QPT_DRIVER,
/* Reserve a range for qp types internal to the low level driver.
* These qp types will not be visible at the IB core layer, so the
* IB_QPT_MAX usages should not be affected in the core layer
......@@ -1139,17 +1139,21 @@ enum ib_qp_type {
enum ib_qp_create_flags {
IB_QP_CREATE_IPOIB_UD_LSO = 1 << 0,
IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK = 1 << 1,
IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK =
IB_UVERBS_QP_CREATE_BLOCK_MULTICAST_LOOPBACK,
IB_QP_CREATE_CROSS_CHANNEL = 1 << 2,
IB_QP_CREATE_MANAGED_SEND = 1 << 3,
IB_QP_CREATE_MANAGED_RECV = 1 << 4,
IB_QP_CREATE_NETIF_QP = 1 << 5,
IB_QP_CREATE_INTEGRITY_EN = 1 << 6,
IB_QP_CREATE_NETDEV_USE = 1 << 7,
IB_QP_CREATE_SCATTER_FCS = 1 << 8,
IB_QP_CREATE_CVLAN_STRIPPING = 1 << 9,
IB_QP_CREATE_SCATTER_FCS =
IB_UVERBS_QP_CREATE_SCATTER_FCS,
IB_QP_CREATE_CVLAN_STRIPPING =
IB_UVERBS_QP_CREATE_CVLAN_STRIPPING,
IB_QP_CREATE_SOURCE_QPN = 1 << 10,
IB_QP_CREATE_PCI_WRITE_END_PADDING = 1 << 11,
IB_QP_CREATE_PCI_WRITE_END_PADDING =
IB_UVERBS_QP_CREATE_PCI_WRITE_END_PADDING,
/* reserve bits 26-31 for low level drivers' internal use */
IB_QP_CREATE_RESERVED_START = 1 << 26,
IB_QP_CREATE_RESERVED_END = 1 << 31,
......@@ -1654,7 +1658,7 @@ enum ib_raw_packet_caps {
};
enum ib_wq_type {
IB_WQT_RQ
IB_WQT_RQ = IB_UVERBS_WQT_RQ,
};
enum ib_wq_state {
......@@ -1677,10 +1681,11 @@ struct ib_wq {
};
enum ib_wq_flags {
IB_WQ_FLAGS_CVLAN_STRIPPING = 1 << 0,
IB_WQ_FLAGS_SCATTER_FCS = 1 << 1,
IB_WQ_FLAGS_DELAY_DROP = 1 << 2,
IB_WQ_FLAGS_PCI_WRITE_END_PADDING = 1 << 3,
IB_WQ_FLAGS_CVLAN_STRIPPING = IB_UVERBS_WQ_FLAGS_CVLAN_STRIPPING,
IB_WQ_FLAGS_SCATTER_FCS = IB_UVERBS_WQ_FLAGS_SCATTER_FCS,
IB_WQ_FLAGS_DELAY_DROP = IB_UVERBS_WQ_FLAGS_DELAY_DROP,
IB_WQ_FLAGS_PCI_WRITE_END_PADDING =
IB_UVERBS_WQ_FLAGS_PCI_WRITE_END_PADDING,
};
struct ib_wq_init_attr {
......
......@@ -64,6 +64,40 @@ enum ib_uverbs_access_flags {
~(IB_UVERBS_ACCESS_OPTIONAL_FIRST - 1)
};
enum ib_uverbs_srq_type {
IB_UVERBS_SRQT_BASIC,
IB_UVERBS_SRQT_XRC,
IB_UVERBS_SRQT_TM,
};
enum ib_uverbs_wq_type {
IB_UVERBS_WQT_RQ,
};
enum ib_uverbs_wq_flags {
IB_UVERBS_WQ_FLAGS_CVLAN_STRIPPING = 1 << 0,
IB_UVERBS_WQ_FLAGS_SCATTER_FCS = 1 << 1,
IB_UVERBS_WQ_FLAGS_DELAY_DROP = 1 << 2,
IB_UVERBS_WQ_FLAGS_PCI_WRITE_END_PADDING = 1 << 3,
};
enum ib_uverbs_qp_type {
IB_UVERBS_QPT_RC = 2,
IB_UVERBS_QPT_UC,
IB_UVERBS_QPT_UD,
IB_UVERBS_QPT_RAW_PACKET = 8,
IB_UVERBS_QPT_XRC_INI,
IB_UVERBS_QPT_XRC_TGT,
IB_UVERBS_QPT_DRIVER = 0xFF,
};
enum ib_uverbs_qp_create_flags {
IB_UVERBS_QP_CREATE_BLOCK_MULTICAST_LOOPBACK = 1 << 1,
IB_UVERBS_QP_CREATE_SCATTER_FCS = 1 << 8,
IB_UVERBS_QP_CREATE_CVLAN_STRIPPING = 1 << 9,
IB_UVERBS_QP_CREATE_PCI_WRITE_END_PADDING = 1 << 11,
};
enum ib_uverbs_query_port_cap_flags {
IB_UVERBS_PCF_SM = 1 << 1,
IB_UVERBS_PCF_NOTICE_SUP = 1 << 2,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment