Whamcloud - gitweb
LU-8573 lnet: Revert LU-7650 patches
[fs/lustre-release.git] / lnet / klnds / o2iblnd / o2iblnd.h
index 37896b3..7d0d411 100644 (file)
@@ -135,9 +135,8 @@ extern kib_tunables_t  kiblnd_tunables;
 #define IBLND_OOB_CAPABLE(v)       ((v) != IBLND_MSG_VERSION_1)
 #define IBLND_OOB_MSGS(v)           (IBLND_OOB_CAPABLE(v) ? 2 : 0)
 
-#define IBLND_FRAG_SHIFT       (PAGE_SHIFT - 12)       /* frag size on wire is in 4K units */
-#define IBLND_MSG_SIZE         (4 << 10)               /* max size of queued messages (inc hdr) */
-#define IBLND_MAX_RDMA_FRAGS   (LNET_MAX_PAYLOAD >> 12)/* max # of fragments supported in 4K size */
+#define IBLND_MSG_SIZE              (4<<10)                 /* max size of queued messages (inc hdr) */
+#define IBLND_MAX_RDMA_FRAGS         LNET_MAX_IOV           /* max # of fragments supported */
 
 /************************/
 /* derived constants... */
@@ -157,8 +156,8 @@ extern kib_tunables_t  kiblnd_tunables;
 /* WRs and CQEs (per connection) */
 #define IBLND_RECV_WRS(c)            IBLND_RX_MSGS(c)
 #define IBLND_SEND_WRS(c)      \
-       (((c->ibc_max_frags + 1) << IBLND_FRAG_SHIFT) * \
-         kiblnd_concurrent_sends(c->ibc_version, c->ibc_peer->ibp_ni))
+       ((c->ibc_max_frags + 1) * kiblnd_concurrent_sends(c->ibc_version, \
+                                                         c->ibc_peer->ibp_ni))
 #define IBLND_CQ_ENTRIES(c)         (IBLND_RECV_WRS(c) + IBLND_SEND_WRS(c))
 
 struct kib_hca_dev;
@@ -785,14 +784,14 @@ kiblnd_cfg_rdma_frags(struct lnet_ni *ni)
 
        tunables = &ni->ni_lnd_tunables->lt_tun_u.lt_o2ib;
        mod = tunables->lnd_map_on_demand;
-       return mod != 0 ? mod : IBLND_MAX_RDMA_FRAGS >> IBLND_FRAG_SHIFT;
+       return mod != 0 ? mod : IBLND_MAX_RDMA_FRAGS;
 }
 
 static inline int
 kiblnd_rdma_frags(int version, struct lnet_ni *ni)
 {
        return version == IBLND_MSG_VERSION_1 ?
-         (IBLND_MAX_RDMA_FRAGS >> IBLND_FRAG_SHIFT) :
+         IBLND_MAX_RDMA_FRAGS :
          kiblnd_cfg_rdma_frags(ni);
 }