aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@dev.mellanox.co.il>2013-07-07 10:25:52 -0400
committerRoland Dreier <roland@purestorage.com>2013-07-07 22:21:21 -0400
commit0134f16bc91cc15a38c867b81568b791c9b626aa (patch)
tree3307473ccef02d89066aca1130a05a32204b6099 /include/rdma
parentfedaf4ffc224a194e2d13a3ec2abe5df0bc94258 (diff)
IB/core: Add reserved values to enums for low-level driver use
Continue the approach taken by commit d2b57063e4a ("IB/core: Reserve bits in enum ib_qp_create_flags for low-level driver use") and add reserved entries to the ib_qp_type and ib_wr_opcode enums. Low-level drivers can then define macros to use these reserved values, giving proper names to the macros for readability. Also add a range of reserved flags to enum ib_send_flags. The mlx5 IB driver uses the new additions. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/ib_verbs.h35
1 files changed, 33 insertions, 2 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 98cc4b29fc5b..645c3cedce9c 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -610,7 +610,21 @@ enum ib_qp_type {
610 IB_QPT_RAW_PACKET = 8, 610 IB_QPT_RAW_PACKET = 8,
611 IB_QPT_XRC_INI = 9, 611 IB_QPT_XRC_INI = 9,
612 IB_QPT_XRC_TGT, 612 IB_QPT_XRC_TGT,
613 IB_QPT_MAX 613 IB_QPT_MAX,
614 /* Reserve a range for qp types internal to the low level driver.
615 * These qp types will not be visible at the IB core layer, so the
616 * IB_QPT_MAX usages should not be affected in the core layer
617 */
618 IB_QPT_RESERVED1 = 0x1000,
619 IB_QPT_RESERVED2,
620 IB_QPT_RESERVED3,
621 IB_QPT_RESERVED4,
622 IB_QPT_RESERVED5,
623 IB_QPT_RESERVED6,
624 IB_QPT_RESERVED7,
625 IB_QPT_RESERVED8,
626 IB_QPT_RESERVED9,
627 IB_QPT_RESERVED10,
614}; 628};
615 629
616enum ib_qp_create_flags { 630enum ib_qp_create_flags {
@@ -766,6 +780,19 @@ enum ib_wr_opcode {
766 IB_WR_MASKED_ATOMIC_CMP_AND_SWP, 780 IB_WR_MASKED_ATOMIC_CMP_AND_SWP,
767 IB_WR_MASKED_ATOMIC_FETCH_AND_ADD, 781 IB_WR_MASKED_ATOMIC_FETCH_AND_ADD,
768 IB_WR_BIND_MW, 782 IB_WR_BIND_MW,
783 /* reserve values for low level drivers' internal use.
784 * These values will not be used at all in the ib core layer.
785 */
786 IB_WR_RESERVED1 = 0xf0,
787 IB_WR_RESERVED2,
788 IB_WR_RESERVED3,
789 IB_WR_RESERVED4,
790 IB_WR_RESERVED5,
791 IB_WR_RESERVED6,
792 IB_WR_RESERVED7,
793 IB_WR_RESERVED8,
794 IB_WR_RESERVED9,
795 IB_WR_RESERVED10,
769}; 796};
770 797
771enum ib_send_flags { 798enum ib_send_flags {
@@ -773,7 +800,11 @@ enum ib_send_flags {
773 IB_SEND_SIGNALED = (1<<1), 800 IB_SEND_SIGNALED = (1<<1),
774 IB_SEND_SOLICITED = (1<<2), 801 IB_SEND_SOLICITED = (1<<2),
775 IB_SEND_INLINE = (1<<3), 802 IB_SEND_INLINE = (1<<3),
776 IB_SEND_IP_CSUM = (1<<4) 803 IB_SEND_IP_CSUM = (1<<4),
804
805 /* reserve bits 26-31 for low level drivers' internal use */
806 IB_SEND_RESERVED_START = (1 << 26),
807 IB_SEND_RESERVED_END = (1 << 31),
777}; 808};
778 809
779struct ib_sge { 810struct ib_sge {