summaryrefslogtreecommitdiffstats
path: root/include/rdma/rdma_vt.h
diff options
context:
space:
mode:
authorMichael J. Ruhl <michael.j.ruhl@intel.com>2017-07-24 16:46:12 +0200
committerDoug Ledford <dledford@redhat.com>2017-07-31 21:17:55 +0200
commitbf90aadd630c2c9f7f965ba1e90d41b5b46db7c9 (patch)
treee95f69b0a661f5693efe4a4d1700f4243f1d6983 /include/rdma/rdma_vt.h
parentIB/hfi1: Pass the context pointer rather than the index (diff)
downloadlinux-bf90aadd630c2c9f7f965ba1e90d41b5b46db7c9.tar.xz
linux-bf90aadd630c2c9f7f965ba1e90d41b5b46db7c9.zip
IB/hfi1: Send MAD traps until repressed
A trap should be sent to the FM until the FM sends a repress message. This is in line with the IBTA 13.4.9. Add the ability to resend traps until a repress message is received. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Reviewed-by: Michael N. Henry <michael.n.henry@intel.com> Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to '')
-rw-r--r--include/rdma/rdma_vt.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/rdma/rdma_vt.h b/include/rdma/rdma_vt.h
index 22fb15ff5e8b..fdfac0fd2f82 100644
--- a/include/rdma/rdma_vt.h
+++ b/include/rdma/rdma_vt.h
@@ -57,11 +57,21 @@
#include <linux/list.h>
#include <linux/hash.h>
#include <rdma/ib_verbs.h>
+#include <rdma/ib_mad.h>
#include <rdma/rdmavt_mr.h>
#include <rdma/rdmavt_qp.h>
#define RVT_MAX_PKEY_VALUES 16
+#define RVT_MAX_TRAP_LEN 100 /* Limit pending trap list */
+#define RVT_MAX_TRAP_LISTS ((IB_NOTICE_TYPE_INFO & 0x0F) + 1)
+#define RVT_TRAP_TIMEOUT 4096 /* 4.096 usec */
+
+struct trap_list {
+ u32 list_len;
+ struct list_head list;
+};
+
struct rvt_ibport {
struct rvt_qp __rcu *qp[2];
struct ib_mad_agent *send_agent; /* agent for SMI (traps) */
@@ -128,6 +138,13 @@ struct rvt_ibport {
u16 *pkey_table;
struct rvt_ah *sm_ah;
+
+ /*
+ * Keep a list of traps that have not been repressed. They will be
+ * resent based on trap_timer.
+ */
+ struct trap_list trap_lists[RVT_MAX_TRAP_LISTS];
+ struct timer_list trap_timer;
};
#define RVT_CQN_MAX 16 /* maximum length of cq name */