From 9ec1d5b01678d7daa1962b5ee9f45f3faedfbc77 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 14 Feb 2024 15:09:13 +0100 Subject: [PATCH] MINOR: stconn: Add SE flag to announce zero-copy forwarding on consumer side The SE_FL_MAY_FASTFWD_CONS is added and it will be used by endpoints to announce their support for the zero-copy forwarding on the consumer side. The flag is not necessarily permanent. However, it will be used this way for now. (cherry picked from commit 22d4b0e901fff1392ba9a383271bb619f6309b9e) Signed-off-by: Christopher Faulet --- include/haproxy/stconn-t.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/haproxy/stconn-t.h b/include/haproxy/stconn-t.h index 525b5de..63bcb79 100644 --- a/include/haproxy/stconn-t.h +++ b/include/haproxy/stconn-t.h @@ -90,12 +90,12 @@ enum se_flags { SE_FL_WANT_ROOM = 0x00080000, /* More bytes to transfer, but not enough room */ SE_FL_EXP_NO_DATA= 0x00100000, /* No data expected by the endpoint */ SE_FL_MAY_FASTFWD_PROD = 0x00200000, /* The endpoint may produce data via zero-copy forwarding */ - SE_FL_ENDP_MASK = 0x002ff000, /* Mask for flags set by the endpoint */ + SE_FL_MAY_FASTFWD_CONS = 0x00400000, /* The endpoint may consume data via zero-copy forwarding */ + SE_FL_ENDP_MASK = 0x004ff000, /* Mask for flags set by the endpoint */ /* following flags are supposed to be set by the app layer and read by * the endpoint : */ - /* unused 0x00400000,*/ /* unused 0x00800000,*/ /* unused 0x01000000,*/ /* unused 0x02000000,*/ @@ -121,9 +121,9 @@ static forceinline char *se_show_flags(char *buf, size_t len, const char *delim, _(SE_FL_SHRD, _(SE_FL_SHRR, _(SE_FL_SHWN, _(SE_FL_SHWS, _(SE_FL_NOT_FIRST, _(SE_FL_WEBSOCKET, _(SE_FL_EOI, _(SE_FL_EOS, _(SE_FL_ERROR, _(SE_FL_ERR_PENDING, _(SE_FL_RCV_MORE, - _(SE_FL_WANT_ROOM, _(SE_FL_EXP_NO_DATA, _(SE_FL_MAY_FASTFWD_PROD, + _(SE_FL_WANT_ROOM, _(SE_FL_EXP_NO_DATA, _(SE_FL_MAY_FASTFWD_PROD, _(SE_FL_MAY_FASTFWD_CONS, _(SE_FL_WAIT_FOR_HS, _(SE_FL_KILL_CONN, _(SE_FL_WAIT_DATA, - _(SE_FL_WONT_CONSUME, _(SE_FL_HAVE_NO_DATA, _(SE_FL_APPLET_NEED_CONN)))))))))))))))))))))))); + _(SE_FL_WONT_CONSUME, _(SE_FL_HAVE_NO_DATA, _(SE_FL_APPLET_NEED_CONN))))))))))))))))))))))))); /* epilogue */ _(~0U); return buf; -- 1.7.10.4