diff options
author | Mike Marciniszyn <mike.marciniszyn@intel.com> | 2018-06-04 21:43:37 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-06-19 20:49:45 +0300 |
commit | 40442b30aad0b5a476aef8f9ea91c11d0f9eae2a (patch) | |
tree | d982b945ba4179390447d88c364c7268c6f8ea54 /drivers/infiniband/hw/hfi1/init.c | |
parent | b0ba3c18d6bf7e454e83e5f49bbc1fd0eb42be71 (diff) | |
download | linux-40442b30aad0b5a476aef8f9ea91c11d0f9eae2a.tar.xz |
IB/hfi1: Move rhf_offset from devdata to ctxtdata
This field should be in ctxtdata to allow for better locality of access by
eliminating a dd dereference.
The new field is now side-by-side with rcvhdrqentsize since the rhf_offset
is a function of the rcvhdrqentsize.
Both fields are now correctly sized as u8.
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/init.c')
-rw-r--r-- | drivers/infiniband/hw/hfi1/init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hfi1/init.c b/drivers/infiniband/hw/hfi1/init.c index 0c45924a1e21..f3e0b89660ae 100644 --- a/drivers/infiniband/hw/hfi1/init.c +++ b/drivers/infiniband/hw/hfi1/init.c @@ -405,6 +405,8 @@ int hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, int numa, rcd->rcvhdrq_cnt = rcvhdrcnt; rcd->rcvhdrqentsize = hfi1_hdrq_entsize; + rcd->rhf_offset = + rcd->rcvhdrqentsize - sizeof(u64) / sizeof(u32); /* * Simple Eager buffer allocation: we have already pre-allocated * the number of RcvArray entry groups. Each ctxtdata structure |