From: Christopher Faulet Date: Wed, 14 Feb 2024 14:09:13 +0000 (+0100) Subject: MINOR: stconn: Add SE flag to announce zero-copy forwarding on consumer side X-Git-Tag: v3.0-dev4~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=22d4b0e901fff1392ba9a383271bb619f6309b9e;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/include/haproxy/stconn-t.h b/include/haproxy/stconn-t.h index d75ae443cc..ee1cdd423b 100644 --- a/include/haproxy/stconn-t.h +++ b/include/haproxy/stconn-t.h @@ -97,12 +97,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,*/ @@ -128,9 +128,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;