RFC iov_iter: Add composite, scatterlist and skbuff iterator types
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest4 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | iov_iter: Move ITER_DISCARD and ITER_XARRAY iteration out-of-lineinclude/ lib/ | +86 | 0 replies | |
| 2/4 | iov_iter: Add an iterator-of-iteratorsinclude/ lib/ | +172 | 0 replies | |
| 3/4 | iov_iter: Add a scatterlist iterator typeinclude/ lib/ | +321 | 0 replies | |
| 4/4 | iov_iter: Add a scatterlist iterator type [INCOMPLETE]include/ lib/ | +131 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/4] iov_iter: Add composite, scatterlist and skbuff iterator types
Hi Leon,
Here are some patches that illustrate some of what I'm thinking of doing to iov iterators. Note that they are incomplete as I won't have time to finish or test them before LSF, but I thought I'd post them for use as a discussion point.
So the first thing I want to do is to move certain iterators out of line from the main inline iteration multiplexor. This code gets relentlessly duplicated and adding further iterator types expands a whole load of places. So the DISCARD iterator (which is just a simple short circuit) and the XARRAY iterator (which is obsolete) move out of line.
Then I want to add three more types, for now:
(1) ITER_ITERLIST. A compound iterator that takes an array of iterators of disparate types. The aim here is to make it possible to fabricate an network message in one go (say an RPC call) and pass it to a socket without the need for corking.
(2) ITER_SCATTERLIST. An iterator that takes a scatterlist. This can be used to act as a bridge in converting interfaces that currently take a scatterlist (e.g. crypto). It requires extra fields adding to the iov_iter struct because chained scatterlists do not have have a rewind capability and so iov_iter_revert() must go back to the beginning and fast-forward.
(3) ITER_SKBUFF. An iterator that takes a network buffer. The aim here is to render skb_to_sgvec() unnecessary for doing crypto operations.
The patches can also be found here:
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=iov-experimental
David
David Howells (4):
iov_iter: Move ITER_DISCARD and ITER_XARRAY iteration out-of-line
iov_iter: Add an iterator-of-iterators
iov_iter: Add a scatterlist iterator type
iov_iter: Add a scatterlist iterator type [INCOMPLETE]
include/linux/iov_iter.h | 77 +---- include/linux/uio.h | 37 +++ lib/iov_iter.c | 675 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 710 insertions(+), 79 deletions(-)