summaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
authorIra Weiny <ira.weiny@intel.com>2015-06-06 14:38:31 -0400
committerDoug Ledford <dledford@redhat.com>2015-06-12 14:49:17 -0400
commit4cd7c9479aff33746af490fa4a5a7dee8654891a (patch)
treebf8ecf8bc24f562b3c5b60171c906dc4adff1991 /include/rdma
parentc9082e51b6a4ba0272c30027d87e67c6652a725d (diff)
downloadop-kernel-dev-4cd7c9479aff33746af490fa4a5a7dee8654891a.zip
op-kernel-dev-4cd7c9479aff33746af490fa4a5a7dee8654891a.tar.gz
IB/mad: Add support for additional MAD info to/from drivers
In order to support alternate sized MADs (and variable sized MADs on OPA devices) add in/out MAD size parameters to the process_mad core call. In addition, add an out_mad_pkey_index to communicate the pkey index the driver wishes the MAD stack to use when sending OPA MAD responses. The out MAD size and the out MAD PKey index are required by the MAD stack to generate responses on OPA devices. Furthermore, the in and out MAD parameters are made generic by specifying them as ib_mad_hdr rather than ib_mad. Drivers are modified as needed and are protected by BUG_ON flags if the MAD sizes passed to them is incorrect. Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/ib_verbs.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 75c3499..46c8eb8 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -1463,7 +1463,7 @@ struct ib_flow {
struct ib_uobject *uobject;
};
-struct ib_mad;
+struct ib_mad_hdr;
struct ib_grh;
enum ib_process_mad_flags {
@@ -1705,8 +1705,11 @@ struct ib_device {
u8 port_num,
const struct ib_wc *in_wc,
const struct ib_grh *in_grh,
- const struct ib_mad *in_mad,
- struct ib_mad *out_mad);
+ const struct ib_mad_hdr *in_mad,
+ size_t in_mad_size,
+ struct ib_mad_hdr *out_mad,
+ size_t *out_mad_size,
+ u16 *out_mad_pkey_index);
struct ib_xrcd * (*alloc_xrcd)(struct ib_device *device,
struct ib_ucontext *ucontext,
struct ib_udata *udata);
OpenPOWER on IntegriCloud