diff options
author | Eric Farman <farman@linux.ibm.com> | 2022-10-31 19:12:54 +0100 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2023-01-09 14:34:08 +0100 |
commit | b21f9cb1124e9fee33dd3c07108aabde060b6ef8 (patch) | |
tree | 42c6fb8fc567531af97ca557efa95fde7f6ffbb7 /net/l2tp | |
parent | vfio/ccw: populate page_array struct inline (diff) | |
download | linux-b21f9cb1124e9fee33dd3c07108aabde060b6ef8.tar.xz linux-b21f9cb1124e9fee33dd3c07108aabde060b6ef8.zip |
vfio/ccw: refactor the idaw counter
The rules of an IDAW are fairly simple: Each one can move no
more than a defined amount of data, must not cross the
boundary defined by that length, and must be aligned to that
length as well. The first IDAW in a list is special, in that
it does not need to adhere to that alignment, but the other
rules still apply. Thus, by reading the first IDAW in a list,
the number of IDAWs that will comprise a data transfer of a
particular size can be calculated.
Let's factor out the reading of that first IDAW with the
logic that calculates the length of the list, to simplify
the rest of the routine that handles the individual IDAWs.
Signed-off-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'net/l2tp')
0 files changed, 0 insertions, 0 deletions