summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/i40iw/i40iw_d.h
diff options
context:
space:
mode:
authorChien Tin Tung <chien.tin.tung@intel.com>2017-11-21 16:18:30 -0600
committerJason Gunthorpe <jgg@mellanox.com>2017-12-01 12:21:24 -0700
commit100d6de2ced538c539d923dc14a1b5cbae234503 (patch)
treed4bd92a192f7bdae986da2a066ddab3d2260b091 /drivers/infiniband/hw/i40iw/i40iw_d.h
parentdb0acbc475f06c775682ba969ab338e1efa2ae96 (diff)
downloadlinux-stable-100d6de2ced538c539d923dc14a1b5cbae234503.tar.gz
i40iw: Allocate a sdbuf per CQP WQE
Currently there is only one sdbuf per Control QP (CQP) for programming Segment Descriptor (SD). If multiple SD work requests are posted simultaneously, the sdbuf is reused by all WQEs and new WQEs can corrupt previous WQEs sdbuf leading to incorrect SD programming. Fix this by allocating one sdbuf per CQP SQ WQE. When an SD command is posted, it will use the corresponding sdbuf for the WQE. Fixes: 86dbcd0f12e9 ("i40iw: add file to handle cqp calls") Signed-off-by: Chien Tin Tung <chien.tin.tung@intel.com> Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/i40iw/i40iw_d.h')
-rw-r--r--drivers/infiniband/hw/i40iw/i40iw_d.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw_d.h b/drivers/infiniband/hw/i40iw/i40iw_d.h
index 65ec39e3746b..1077b78f7754 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_d.h
+++ b/drivers/infiniband/hw/i40iw/i40iw_d.h
@@ -1526,7 +1526,7 @@ enum i40iw_alignment {
I40IW_AEQ_ALIGNMENT = 0x100,
I40IW_CEQ_ALIGNMENT = 0x100,
I40IW_CQ0_ALIGNMENT = 0x100,
- I40IW_SD_BUF_ALIGNMENT = 0x100
+ I40IW_SD_BUF_ALIGNMENT = 0x80
};
#define I40IW_WQE_SIZE_64 64
@@ -1534,6 +1534,8 @@ enum i40iw_alignment {
#define I40IW_QP_WQE_MIN_SIZE 32
#define I40IW_QP_WQE_MAX_SIZE 128
+#define I40IW_UPDATE_SD_BUF_SIZE 128
+
#define I40IW_CQE_QTYPE_RQ 0
#define I40IW_CQE_QTYPE_SQ 1