diff options
author | Don Hiatt | 2017-08-04 22:54:47 +0200 |
---|---|---|
committer | Doug Ledford | 2017-08-22 20:22:37 +0200 |
commit | 566d53a8264452ee75aa6eb1f2f1970391c1a271 (patch) | |
tree | 61ecda1d6d494bf759aa0b0eb445b0dd5f719584 /drivers/infiniband/hw/hfi1/user_sdma.c | |
parent | IB/hfi1: Add 16B RC/UC support (diff) | |
download | kernel-qcow2-linux-566d53a8264452ee75aa6eb1f2f1970391c1a271.tar.gz kernel-qcow2-linux-566d53a8264452ee75aa6eb1f2f1970391c1a271.tar.xz kernel-qcow2-linux-566d53a8264452ee75aa6eb1f2f1970391c1a271.zip |
IB/hfi1: Enhance PIO/SDMA send for 16B
PIO/SDMA send logic now uses the hdr_type field to determine
the type of packet that has been constructed. Based on the hdr_type,
certain things such as PBC flags, padding count and the LT extra
trailing bytes are determined.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com>
Signed-off-by: Don Hiatt <don.hiatt@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/user_sdma.c')
-rw-r--r-- | drivers/infiniband/hw/hfi1/user_sdma.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/hfi1/user_sdma.c b/drivers/infiniband/hw/hfi1/user_sdma.c index 8f02707e9c95..aae1f40016e4 100644 --- a/drivers/infiniband/hw/hfi1/user_sdma.c +++ b/drivers/infiniband/hw/hfi1/user_sdma.c @@ -502,6 +502,8 @@ int hfi1_user_sdma_process_request(struct hfi1_filedata *fd, struct sdma_req_info info; struct user_sdma_request *req; u8 opcode, sc, vl; + u16 pkey; + u32 slid; int req_queued = 0; u16 dlid; u32 selector; @@ -635,8 +637,9 @@ int hfi1_user_sdma_process_request(struct hfi1_filedata *fd, } /* Checking P_KEY for requests from user-space */ - if (egress_pkey_check(dd->pport, req->hdr.lrh, req->hdr.bth, sc, - PKEY_CHECK_INVALID)) { + pkey = (u16)be32_to_cpu(req->hdr.bth[0]); + slid = be16_to_cpu(req->hdr.lrh[3]); + if (egress_pkey_check(dd->pport, slid, pkey, sc, PKEY_CHECK_INVALID)) { ret = -EINVAL; goto free_req; } |