[PATCH] IB uverbs: add mthca user context support
[deliverable/linux.git] / drivers / infiniband / hw / mthca / mthca_provider.h
index 4d976cccb1a8126acd97096821d92808b698a114..27cd43cadd4816d6278ce505d558f8df274395c9 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2004 Topspin Communications.  All rights reserved.
+ * Copyright (c) 2005 Cisco Systems.  All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -54,6 +55,14 @@ struct mthca_uar {
        int           index;
 };
 
+struct mthca_user_db_table;
+
+struct mthca_ucontext {
+       struct ib_ucontext          ibucontext;
+       struct mthca_uar            uar;
+       struct mthca_user_db_table *db_tab;
+};
+
 struct mthca_mtt;
 
 struct mthca_mr {
@@ -236,6 +245,11 @@ struct mthca_sqp {
        dma_addr_t      header_dma;
 };
 
+static inline struct mthca_ucontext *to_mucontext(struct ib_ucontext *ibucontext)
+{
+       return container_of(ibucontext, struct mthca_ucontext, ibucontext);
+}
+
 static inline struct mthca_fmr *to_mfmr(struct ib_fmr *ibmr)
 {
        return container_of(ibmr, struct mthca_fmr, ibmr);
This page took 0.031512 seconds and 5 git commands to generate.