]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/rdma/ib_verbs.h
[PATCH] m68k/Atari: Interrupt updates
[linux-2.6-omap-h63xx.git] / include / rdma / ib_verbs.h
index 6bbf1b364400568b283215e37b6e9bec776dd84b..8eacc3510993ff9fdbccd7f1b372e0fba71262b5 100644 (file)
@@ -56,12 +56,22 @@ union ib_gid {
        } global;
 };
 
-enum ib_node_type {
-       IB_NODE_CA      = 1,
-       IB_NODE_SWITCH,
-       IB_NODE_ROUTER
+enum rdma_node_type {
+       /* IB values map to NodeInfo:NodeType. */
+       RDMA_NODE_IB_CA         = 1,
+       RDMA_NODE_IB_SWITCH,
+       RDMA_NODE_IB_ROUTER,
+       RDMA_NODE_RNIC
 };
 
+enum rdma_transport_type {
+       RDMA_TRANSPORT_IB,
+       RDMA_TRANSPORT_IWARP
+};
+
+enum rdma_transport_type
+rdma_node_get_transport(enum rdma_node_type node_type) __attribute_const__;
+
 enum ib_device_cap_flags {
        IB_DEVICE_RESIZE_MAX_WR         = 1,
        IB_DEVICE_BAD_PKEY_CNTR         = (1<<1),
@@ -78,6 +88,9 @@ enum ib_device_cap_flags {
        IB_DEVICE_RC_RNR_NAK_GEN        = (1<<12),
        IB_DEVICE_SRQ_RESIZE            = (1<<13),
        IB_DEVICE_N_NOTIFY_CQ           = (1<<14),
+       IB_DEVICE_ZERO_STAG             = (1<<15),
+       IB_DEVICE_SEND_W_INV            = (1<<16),
+       IB_DEVICE_MEM_WINDOW            = (1<<17)
 };
 
 enum ib_atomic_cap {
@@ -260,7 +273,8 @@ enum ib_event_type {
        IB_EVENT_SM_CHANGE,
        IB_EVENT_SRQ_ERR,
        IB_EVENT_SRQ_LIMIT_REACHED,
-       IB_EVENT_QP_LAST_WQE_REACHED
+       IB_EVENT_QP_LAST_WQE_REACHED,
+       IB_EVENT_CLIENT_REREGISTER
 };
 
 struct ib_event {
@@ -696,8 +710,12 @@ struct ib_ucontext {
 struct ib_uobject {
        u64                     user_handle;    /* handle given to us by userspace */
        struct ib_ucontext     *context;        /* associated user context */
+       void                   *object;         /* containing object */
        struct list_head        list;           /* link to context's list */
        u32                     id;             /* index into kernel idr */
+       struct kref             ref;
+       struct rw_semaphore     mutex;          /* protects .live */
+       int                     live;
 };
 
 struct ib_umem {
@@ -827,8 +845,11 @@ struct ib_cache {
        struct ib_event_handler event_handler;
        struct ib_pkey_cache  **pkey_cache;
        struct ib_gid_cache   **gid_cache;
+       u8                     *lmc_cache;
 };
 
+struct iw_cm_verbs;
+
 struct ib_device {
        struct device                *dma_device;
 
@@ -845,6 +866,8 @@ struct ib_device {
 
        u32                           flags;
 
+       struct iw_cm_verbs           *iwcm;
+
        int                        (*query_device)(struct ib_device *device,
                                                   struct ib_device_attr *device_attr);
        int                        (*query_port)(struct ib_device *device,
@@ -882,7 +905,8 @@ struct ib_device {
                                                 struct ib_udata *udata);
        int                        (*modify_srq)(struct ib_srq *srq,
                                                 struct ib_srq_attr *srq_attr,
-                                                enum ib_srq_attr_mask srq_attr_mask);
+                                                enum ib_srq_attr_mask srq_attr_mask,
+                                                struct ib_udata *udata);
        int                        (*query_srq)(struct ib_srq *srq,
                                                struct ib_srq_attr *srq_attr);
        int                        (*destroy_srq)(struct ib_srq *srq);
@@ -894,7 +918,8 @@ struct ib_device {
                                                struct ib_udata *udata);
        int                        (*modify_qp)(struct ib_qp *qp,
                                                struct ib_qp_attr *qp_attr,
-                                               int qp_attr_mask);
+                                               int qp_attr_mask,
+                                               struct ib_udata *udata);
        int                        (*query_qp)(struct ib_qp *qp,
                                               struct ib_qp_attr *qp_attr,
                                               int qp_attr_mask,
@@ -1085,6 +1110,20 @@ int ib_dealloc_pd(struct ib_pd *pd);
  */
 struct ib_ah *ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr);
 
+/**
+ * ib_init_ah_from_wc - Initializes address handle attributes from a
+ *   work completion.
+ * @device: Device on which the received message arrived.
+ * @port_num: Port on which the received message arrived.
+ * @wc: Work completion associated with the received message.
+ * @grh: References the received global route header.  This parameter is
+ *   ignored unless the work completion indicates that the GRH is valid.
+ * @ah_attr: Returned attributes that can be used when creating an address
+ *   handle for replying to the message.
+ */
+int ib_init_ah_from_wc(struct ib_device *device, u8 port_num, struct ib_wc *wc,
+                      struct ib_grh *grh, struct ib_ah_attr *ah_attr);
+
 /**
  * ib_create_ah_from_wc - Creates an address handle associated with the
  *   sender of the specified work completion.