diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2022-11-17 16:58:49 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-11-25 01:35:00 +0100 |
commit | 433604a581604fe8acfa9a9022b9c29305642ab7 (patch) | |
tree | dff0150f556e9d7cc940c6d736ca6f9d28630403 /tcp_conn.h | |
parent | 34476511f724d52ef4d944627ee741e33c1ba3d7 (diff) | |
download | passt-433604a581604fe8acfa9a9022b9c29305642ab7.tar passt-433604a581604fe8acfa9a9022b9c29305642ab7.tar.gz passt-433604a581604fe8acfa9a9022b9c29305642ab7.tar.bz2 passt-433604a581604fe8acfa9a9022b9c29305642ab7.tar.lz passt-433604a581604fe8acfa9a9022b9c29305642ab7.tar.xz passt-433604a581604fe8acfa9a9022b9c29305642ab7.tar.zst passt-433604a581604fe8acfa9a9022b9c29305642ab7.zip |
tcp: Unify the IN_EPOLL flag
There is very little common between the tcp_tap_conn and tcp_splice_conn
structures. However, both do have an IN_EPOLL flag which has the same
meaning in each case, though it's stored in a different location.
Simplify things slightly by moving this bit into the common header of the
two structures.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp_conn.h')
-rw-r--r-- | tcp_conn.h | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -14,9 +14,11 @@ /** * struct tcp_conn_common - Common fields for spliced and non-spliced * @spliced: Is this a spliced connection? + * @in_epoll: Is the connection in the epoll set? */ struct tcp_conn_common { bool spliced :1; + bool in_epoll :1; }; extern const char *tcp_common_flag_str[]; @@ -90,10 +92,9 @@ struct tcp_tap_conn { #define STALLED BIT(0) #define LOCAL BIT(1) #define WND_CLAMPED BIT(2) -#define IN_EPOLL BIT(3) -#define ACTIVE_CLOSE BIT(4) -#define ACK_TO_TAP_DUE BIT(5) -#define ACK_FROM_TAP_DUE BIT(6) +#define ACTIVE_CLOSE BIT(3) +#define ACK_TO_TAP_DUE BIT(4) +#define ACK_FROM_TAP_DUE BIT(5) unsigned int hash_bucket :TCP_HASH_BUCKET_BITS; @@ -170,12 +171,11 @@ struct tcp_splice_conn { uint8_t flags; #define SPLICE_V6 BIT(0) -#define SPLICE_IN_EPOLL BIT(1) -#define RCVLOWAT_SET_A BIT(2) -#define RCVLOWAT_SET_B BIT(3) -#define RCVLOWAT_ACT_A BIT(4) -#define RCVLOWAT_ACT_B BIT(5) -#define CLOSING BIT(6) +#define RCVLOWAT_SET_A BIT(1) +#define RCVLOWAT_SET_B BIT(2) +#define RCVLOWAT_ACT_A BIT(3) +#define RCVLOWAT_ACT_B BIT(4) +#define CLOSING BIT(5) uint32_t a_read; uint32_t a_written; |