]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sif: Lift sif_verbs up to be independent of sif internal headers
authorKnut Omang <knut.omang@oracle.com>
Thu, 8 Sep 2016 09:08:38 +0000 (11:08 +0200)
committerKnut Omang <knut.omang@oracle.com>
Fri, 9 Sep 2016 12:12:40 +0000 (14:12 +0200)
The sif_verbs.h file needs to be independent of
other header files to be includable from other kernel.
This is necessary to avoid duplicate definition of
the API elements. For Oracle Linux this file now moves from
drivers/infiniband/hw/sif/ to include/rdma/ to make it
available for the RDS and uvNIC drivers.

This is a temporary but necessary measure while we wait
for proper generic interfaces to be defined at the common
verbs layer.

Orabug: 24524698

Signed-off-by: Knut Omang <knut.omang@oracle.com>
15 files changed:
drivers/infiniband/hw/sif/sif_cq.c
drivers/infiniband/hw/sif/sif_defs.c
drivers/infiniband/hw/sif/sif_dev.h
drivers/infiniband/hw/sif/sif_dma.c
drivers/infiniband/hw/sif/sif_idr.h
drivers/infiniband/hw/sif/sif_main.c
drivers/infiniband/hw/sif/sif_mem.h
drivers/infiniband/hw/sif/sif_mmu.c
drivers/infiniband/hw/sif/sif_mmu.h
drivers/infiniband/hw/sif/sif_query.c
drivers/infiniband/hw/sif/sif_user.h
drivers/infiniband/hw/sif/sif_verbs.c
drivers/infiniband/hw/sif/version.c
drivers/infiniband/hw/sif/versioninfo.h
include/rdma/sif_verbs.h [moved from drivers/infiniband/hw/sif/sif_verbs.h with 78% similarity]

index 2afc9793d4e70463bce1bda1b539a8c8d71bce3b..6dda1da04fbb9fb4d629bc6cd18245eb588a97d4 100644 (file)
@@ -10,7 +10,6 @@
  *
  * sif_cq.c: Implementation of completion queue logic for SIF
  */
-#include <linux/version.h>
 #include <linux/sched.h>
 #include <linux/random.h>
 #include <rdma/ib_verbs.h>
index ed95ee69f76649134497f70b62b0d7775042b8fb..b38949487d29b627e25a4148b6f21e181b6bb3e6 100644 (file)
@@ -10,7 +10,6 @@
  *
  * sif_defs.c: IB-to-SIF Mapper.
  */
-#include <linux/version.h>
 #include <rdma/ib_verbs.h>
 #include "sif_dev.h"
 #include "sif_defs.h"
index 1fab1c0b55f76128e37ac4bb824fa943c28a242a..ce2f81fb80d3050124b3db565a2678b147547fd1 100644 (file)
@@ -14,7 +14,6 @@
 #ifndef __SIF_DEV_H
 #define __SIF_DEV_H
 
-#include <linux/version.h>
 #include <linux/pci.h>
 #include <linux/sched.h>
 #include <linux/dma-mapping.h>
@@ -31,7 +30,7 @@
 #include "sif_mem.h"
 
 
-#include "sif_verbs.h"
+#include <rdma/sif_verbs.h>
 
 #include "sif_r3.h"
 
index 18218d1e4a7e705917ceafd094963d63b74dedb0..cf3e4636f65249c099d9852ad9e65038a72955c4 100644 (file)
@@ -10,7 +10,6 @@
  *
  * sif_dma.c: DMA memory mapping
  */
-#include <linux/version.h>
 #include "sif_dma.h"
 #include "sif_dev.h"
 #include "psif_hw_data.h"
index 4bdfcfd575d51668443bfb24090d1ad2c17975f0..47722820dc7f56d787904e58bba6eb8acdc94f16 100644 (file)
@@ -13,7 +13,6 @@
 
 #ifndef _SIF_IDR_H
 #define _SIF_IDR_H
-#include <linux/version.h>
 #include <linux/idr.h>
 #include <linux/mutex.h>
 
index 4a3fbcdf2740874516b2428ee3057ee5cf5a4e78..8be965d50073ebf5f3c7abcdd1c453ab83f394d2 100644 (file)
@@ -11,7 +11,6 @@
  * sif_main.c: main entry points and initialization
  */
 
-#include <linux/version.h>
 #include <linux/module.h>
 #ifdef CONFIG_X86
 #include <asm/mtrr.h>
index 1b91a8fd72854f3a378a8c154bd3b2eac6425378..fc98c59c232fbd9f032f409b8eaf6db10e412fbf 100644 (file)
@@ -15,6 +15,7 @@
 #ifndef _SIF_MEM_H
 #define _SIF_MEM_H
 #include <rdma/ib_verbs.h>
+#include <rdma/sif_verbs.h>
 #include "sif_user.h"
 
 /* We need to support 4 interfaces to memory; abbreviated umem, fmr,
index a0ad6a27cdbd6b40da8ca179bc33e57f03626ee0..32ba74cabb96179c6087a8fe9a1d468ee1393fe0 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/hugetlb.h>
 #include <linux/highmem.h>
 #include <linux/kref.h>
-#include <linux/version.h>
 #include <rdma/ib_umem.h>
 #include "psif_hw_setget.h"
 #include "sif_defs.h"
index 6624f9455856c8322e985630df550cd4fe28802d..0f749c0725e516fc8b061d1175b6bde2f4f7e2b4 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <rdma/ib_verbs.h>
 #include "psif_hw_data.h"
+#include <rdma/sif_verbs.h>
 #include "sif_user.h"
 
 struct sif_mem;
index 4e0a103a4891e7e1d4c2aca1fdb0a3a431a61760..5dc77aceb39615db34be81cfb99bd16787499c7c 100644 (file)
@@ -10,7 +10,6 @@
  *
  * sif_query.c: SIF implementation of some of IB query APIs
  */
-#include <linux/version.h>
 #include <rdma/ib_verbs.h>
 #include <rdma/ib_mad.h>
 #include "sif_dev.h"
index f355f5e3f634b6dc48cd6ca0387c672a21e995a7..a789323eea9fbbce87a01540c56f27763f1cbf81 100644 (file)
@@ -84,19 +84,12 @@ enum sif_mem_type {
        SIFMT_MAX
 };
 
-enum sif_proxy_type {
-       SIFPX_OFF, /* Default value - no proxying */
-       SIFPX_EPSA_1,
-       SIFPX_EPSA_2,
-       SIFPX_EPSA_3,
-       SIFPX_EPSA_4
-};
-
 enum sif_flush_type {
        NO_FLUSH,
        FLUSH_SQ,
        FLUSH_RQ
 };
+
 #endif
 
 /* These should be multiple of 64 bytes and densely packed: */
index 0525ccc42dff0887a21307eeef7ab248171d4076..de58c405b9f4254031f326de2f475d4269ef0fb5 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #include <linux/module.h>
-#include "sif_verbs.h"
+#include <rdma/sif_verbs.h>
 #include "sif_dev.h"
 #include "sif_epsc.h"
 #include "psif_hw_data.h"
index ae3dc70455d43fad4a92e1c7173cedcda24010ea..4b94c7fdccd515577bbd714529511c4f7ffbe87b 100644 (file)
@@ -3,13 +3,13 @@
 #include "version.h"
 
 struct sif_version sif_version = {
-.git_repo = "sifdrv [non public commit]",
-.last_commit = "titan_1.0.0.3 transform: Update used version of EPSC_API",
+.git_repo = "sifdrv [origin/master]",
+.last_commit = "titan_1.0.4.0 Lift sif_verbs up to be independent of sif internal headers",
 .git_status = "",
-.build_git_time = "Fri, 12 Aug 2016 11:24:07 +0000",
+.build_git_time = "Fri, 09 Sep 2016 09:58:31 +0000",
 .build_user = "komang",
 
 .git_psifapi_repo = "psifapi [origin/master]",
-.last_psifapi_commit = "titan_1.0.0.3 EPSC_API_VERSION(2,10) - EPSC_DIAG_COUNTERS",
+.last_psifapi_commit = "titan_1.0.4.0 Fix recently introduced checkpatch issues",
 .git_psifapi_status = "",
 };
index 2b7d562364ad7f88c33b753060f3b71d44fdab06..7cffd353a7938264cfd6157d7d8e40f8b49b0697 100644 (file)
@@ -1,6 +1,6 @@
 /* Misc driver release info */
 
-#define BUILD_DATE "2016-08-12"
-#define BUILD_TIME "11:24:07"
-#define BUILD_EPOCH 1471001047
-#define TITAN_RELEASE "1.0.0.3"
+#define BUILD_DATE "2016-09-09"
+#define BUILD_TIME "09:58:31"
+#define BUILD_EPOCH 1473415111
+#define TITAN_RELEASE "1.0.4.0"
similarity index 78%
rename from drivers/infiniband/hw/sif/sif_verbs.h
rename to include/rdma/sif_verbs.h
index bdc659da9e9fd79af43bc3ced0e4a77bcc26b56a..a4caf77cd98cbd648047be9e0c93cac323b78ad5 100644 (file)
@@ -14,7 +14,6 @@
 #ifndef _SIF_VERBS_H
 #define _SIF_VERBS_H
 #include <rdma/ib_verbs.h>
-#include "sif_user.h"
 
 /*** sif verbs extensions ***/
 
@@ -51,16 +50,18 @@ struct sif_device_modify {
 };
 
 
-/* Extension bits in the qp create mask to ib_create_qp    */
-/* Note that we use bits below IB_QP_CREATE_RESERVED_START */
+/* Provider specific extension bits in the qp create mask to ib_create_qp.
+ * We use the uppermost bits (mostly in the IB_QP_CREATE_RESERVED_START(b.26) - END range)
+ * to avoid conflict with future upstream bits, currently occupying bits 0-8:
+ */
 enum sif_qp_create_flags {
-       IB_QP_CREATE_EOIB            = IB_QP_CREATE_RESERVED_END     ,  /* Indicate that this is an Ethernet over IB QP */
-       IB_QP_CREATE_RSS             = IB_QP_CREATE_RESERVED_END >> 1,  /* Enable receive side scaling */
-       IB_QP_CREATE_HDR_SPLIT       = IB_QP_CREATE_RESERVED_END >> 2,  /* Enable header/data split for offloading */
-       IB_QP_CREATE_RCV_DYNAMIC_MTU = IB_QP_CREATE_RESERVED_END >> 3,  /* Enable receive side dynamic mtu */
-       IB_QP_CREATE_PROXY           = IB_QP_CREATE_RESERVED_END >> 4,  /* Enable a special EPSA proxy */
-       IB_QP_NO_CSUM                = IB_QP_CREATE_RESERVED_END >> 5,  /* No csum for qp, wqe.wr.csum = qp.magic */
-       IB_QP_CREATE_SND_DYNAMIC_MTU = IB_QP_CREATE_RESERVED_END >> 6,  /* Enable receive side dynamic mtu */
+       IB_QP_CREATE_EOIB            = 1 << 24, /* Enable Ethernet over IB support */
+       IB_QP_CREATE_RSS             = 1 << 25, /* Enable receive side scaling */
+       IB_QP_CREATE_HDR_SPLIT       = 1 << 26, /* Enable header/data split for offloading */
+       IB_QP_CREATE_RCV_DYNAMIC_MTU = 1 << 27, /* Enable receive side dynamic mtu */
+       IB_QP_CREATE_PROXY           = 1 << 28, /* Enable a special EPSA proxy QP */
+       IB_QP_NO_CSUM                = 1 << 29, /* No csum for qp, wqe.wr.csum = qp.magic */
+       IB_QP_CREATE_SND_DYNAMIC_MTU = 1 << 30, /* Enable receive side dynamic mtu */
 };
 
 /* Extension bits in the qp attr mask to ib_modify_qp
@@ -75,7 +76,6 @@ enum sif_qp_attr_mask {
        IB_QP_SND_DYN_MTU  = 1 << 29,  /* Enable send side dynamic mtu */
 };
 
-
 /* Set/get the 48 bit ethernet mac address for a port on a uf
  * The uf field is ignored for all ufs except uf 0 (PF)
  */
@@ -87,6 +87,14 @@ struct psif_epsc_csr_req;
 struct psif_epsc_csr_rsp;
 enum psif_mbox_type;
 
+enum sif_proxy_type {
+       SIFPX_OFF, /* Default value - no proxying */
+       SIFPX_EPSA_1,
+       SIFPX_EPSA_2,
+       SIFPX_EPSA_3,
+       SIFPX_EPSA_4
+};
+
 struct sif_verbs {
        /* Exposed internal create_cq call to allow creation of proxy CQs.
         * Needed by EPSA users. Implemented in sif_cq.c.