mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-08 16:17:09 +02:00
MINOR: stream-int: expand the flags to 32-bit
We used to have enough of 16 bits, with 3 still available but it's not possible to add the rx/tx blocking bits there. Let's extend the format to 32 bits and slightly reorder the fields to maintain the struct size to 64 bytes. Nothing else was changed.
This commit is contained in:
parent
89b6a2b4fd
commit
a44e576f62
@ -59,22 +59,22 @@ enum {
|
|||||||
SI_ET_DATA_ABRT = 0x0400, /* data phase aborted by external cause */
|
SI_ET_DATA_ABRT = 0x0400, /* data phase aborted by external cause */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* flags set after I/O (16 bit) */
|
/* flags set after I/O (32 bit) */
|
||||||
enum {
|
enum {
|
||||||
SI_FL_NONE = 0x0000, /* nothing */
|
SI_FL_NONE = 0x00000000, /* nothing */
|
||||||
SI_FL_EXP = 0x0001, /* timeout has expired */
|
SI_FL_EXP = 0x00000001, /* timeout has expired */
|
||||||
SI_FL_ERR = 0x0002, /* a non-recoverable error has occurred */
|
SI_FL_ERR = 0x00000002, /* a non-recoverable error has occurred */
|
||||||
SI_FL_WAIT_ROOM = 0x0004, /* stream-int waits for space to store incoming data */
|
SI_FL_WAIT_ROOM = 0x00000004, /* stream-int waits for space to store incoming data */
|
||||||
SI_FL_WAIT_DATA = 0x0008, /* stream-int waits for more outgoing data to send */
|
SI_FL_WAIT_DATA = 0x00000008, /* stream-int waits for more outgoing data to send */
|
||||||
SI_FL_ISBACK = 0x0010, /* 0 for front-side SI, 1 for back-side */
|
SI_FL_ISBACK = 0x00000010, /* 0 for front-side SI, 1 for back-side */
|
||||||
SI_FL_DONT_WAKE = 0x0020, /* resync in progress, don't wake up */
|
SI_FL_DONT_WAKE = 0x00000020, /* resync in progress, don't wake up */
|
||||||
SI_FL_INDEP_STR = 0x0040, /* independent streams = don't update rex on write */
|
SI_FL_INDEP_STR = 0x00000040, /* independent streams = don't update rex on write */
|
||||||
SI_FL_NOLINGER = 0x0080, /* may close without lingering. One-shot. */
|
SI_FL_NOLINGER = 0x00000080, /* may close without lingering. One-shot. */
|
||||||
SI_FL_NOHALF = 0x0100, /* no half close, close both sides at once */
|
SI_FL_NOHALF = 0x00000100, /* no half close, close both sides at once */
|
||||||
SI_FL_SRC_ADDR = 0x1000, /* get the source ip/port with getsockname */
|
SI_FL_SRC_ADDR = 0x00001000, /* get the source ip/port with getsockname */
|
||||||
SI_FL_WANT_PUT = 0x2000, /* a stream-int would like to put some data into the buffer */
|
SI_FL_WANT_PUT = 0x00002000, /* a stream-int would like to put some data into the buffer */
|
||||||
SI_FL_WANT_GET = 0x4000, /* a stream-int would like to get some data from the buffer */
|
SI_FL_WANT_GET = 0x00004000, /* a stream-int would like to get some data from the buffer */
|
||||||
SI_FL_CLEAN_ABRT = 0x8000, /* SI_FL_ERR is used to report aborts, and not SHUTR */
|
SI_FL_CLEAN_ABRT = 0x00008000, /* SI_FL_ERR is used to report aborts, and not SHUTR */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* A stream interface has 3 parts :
|
/* A stream interface has 3 parts :
|
||||||
@ -92,10 +92,11 @@ struct stream_interface {
|
|||||||
/* struct members used by the "buffer" side */
|
/* struct members used by the "buffer" side */
|
||||||
enum si_state state; /* SI_ST* */
|
enum si_state state; /* SI_ST* */
|
||||||
enum si_state prev_state;/* SI_ST*, copy of previous state */
|
enum si_state prev_state;/* SI_ST*, copy of previous state */
|
||||||
unsigned short flags; /* SI_FL_* */
|
/* 16-bit hole here */
|
||||||
unsigned int exp; /* wake up time for connect, queue, turn-around, ... */
|
unsigned int flags; /* SI_FL_* */
|
||||||
enum obj_type *end; /* points to the end point (connection or appctx) */
|
enum obj_type *end; /* points to the end point (connection or appctx) */
|
||||||
struct si_ops *ops; /* general operations at the stream interface layer */
|
struct si_ops *ops; /* general operations at the stream interface layer */
|
||||||
|
unsigned int exp; /* wake up time for connect, queue, turn-around, ... */
|
||||||
|
|
||||||
/* struct members below are the "remote" part, as seen from the buffer side */
|
/* struct members below are the "remote" part, as seen from the buffer side */
|
||||||
unsigned int err_type; /* first error detected, one of SI_ET_* */
|
unsigned int err_type; /* first error detected, one of SI_ET_* */
|
||||||
|
Loading…
Reference in New Issue
Block a user