On 2/7/2019 8:12 PM, Sagi Grimberg wrote:
From: Israel Rukshin <israelr@xxxxxxxxxxxx>
Instead of adding many arguments to RDMA mapping functions with PI,
create a new data structure 'ib_scatterlist' which contains the needed
information on a mapped scatterlist. In the future, this will also be
used by ULPs that define these attributes explicitly.
While this can be viewed as a natural packing of a scatterlist
attributes it seems unneeded. Personally I would rather pass
the arguments explicitly.
If you really don't want to do that, would it make sense to split the
mapping APIs to data vs. pi?
I prefer to ease the API. This was the whole point (+ perf improvements)
of this patches.
I don't think that we should change that state of mind just because
there are objections to use 7 arguments passing it linux-kernel function
from time to time (is there an official recommendation for that ??) or
just because others don't want new structures created to ease that.
I'm ok with passing 7 args and creating new structure, but not with
artificial API changes that will hurt ULP developers (like yourself :))
Something like the following maybe?
ret = ib_map_mr_sg(mr, sg, nents, &offset, PAGE_SIZE);
...
ret = ib_map_mr_sg_pi(mr, meta_sg, meta_nents, &meta_offset,
PAGE_SIZE);
Can't see why that API wouldn't work unless I'm missing something (maybe
for the theoretical case where the data and pi are interleaved in the
first place?)
Thoughts?