diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-07-17 14:52:21 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-07-17 15:30:11 +0200 |
commit | 66a02c9f7cd5c7a643d9ac5dad5a7209a6e1c467 (patch) | |
tree | f5bee5ae359bcc9be804d57deee2cec0c8b20c08 /doc | |
parent | 5235c47c791919333aec8707ff2839d50bdf727a (diff) | |
download | passt-66a02c9f7cd5c7a643d9ac5dad5a7209a6e1c467.tar passt-66a02c9f7cd5c7a643d9ac5dad5a7209a6e1c467.tar.gz passt-66a02c9f7cd5c7a643d9ac5dad5a7209a6e1c467.tar.bz2 passt-66a02c9f7cd5c7a643d9ac5dad5a7209a6e1c467.tar.lz passt-66a02c9f7cd5c7a643d9ac5dad5a7209a6e1c467.tar.xz passt-66a02c9f7cd5c7a643d9ac5dad5a7209a6e1c467.tar.zst passt-66a02c9f7cd5c7a643d9ac5dad5a7209a6e1c467.zip |
tcp_splice: Use parameterised macros for per-side event/flag bits
Both the events and flags fields in tcp_splice_conn have several bits
which are per-side, e.g. OUT_WAIT_0 for side 0 and OUT_WAIT_1 for side 1.
This necessitates some rather awkward ternary expressions when we need
to get the relevant bit for a particular side.
Simplify this by using a parameterised macro for the bit values. This
needs a ternary expression inside the macros, but makes the places we use
it substantially clearer.
That simplification in turn allows us to use a loop across each side to
implement several things which are currently open coded to do equivalent
things for each side in turn.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions