mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-30 07:11:04 +01:00
MEDIUM: stconn: remove SE_FL_RXBLK_SHUT
This flag is no more needed, it was only set on shut read to be tested by cs_rx_blocked() which is now properly tested for shutr as well. The cs_rx_blk_shut() calls were removed. Interestingly it allowed to remove a special case in the L7 retry code. This also ensures we will not risk to set it back on a new endpoint after cs_reset_endp() via SE_FL_APP_MASK.
This commit is contained in:
parent
e7866b1ff7
commit
676c8db134
@ -187,7 +187,6 @@ void show_endp_flags(unsigned int f)
|
|||||||
SHOW_FLAG(f, SE_FL_RXBLK_CHAN);
|
SHOW_FLAG(f, SE_FL_RXBLK_CHAN);
|
||||||
SHOW_FLAG(f, SE_FL_RXBLK_BUFF);
|
SHOW_FLAG(f, SE_FL_RXBLK_BUFF);
|
||||||
SHOW_FLAG(f, SE_FL_RXBLK_ROOM);
|
SHOW_FLAG(f, SE_FL_RXBLK_ROOM);
|
||||||
SHOW_FLAG(f, SE_FL_RXBLK_SHUT);
|
|
||||||
SHOW_FLAG(f, SE_FL_RXBLK_CONN);
|
SHOW_FLAG(f, SE_FL_RXBLK_CONN);
|
||||||
SHOW_FLAG(f, SE_FL_RX_WAIT_EP);
|
SHOW_FLAG(f, SE_FL_RX_WAIT_EP);
|
||||||
SHOW_FLAG(f, SE_FL_WANT_GET);
|
SHOW_FLAG(f, SE_FL_WANT_GET);
|
||||||
|
|||||||
@ -78,10 +78,10 @@ enum se_flags {
|
|||||||
SE_FL_RXBLK_CHAN = 0x04000000, /* the channel doesn't want the CS to introduce data */
|
SE_FL_RXBLK_CHAN = 0x04000000, /* the channel doesn't want the CS to introduce data */
|
||||||
SE_FL_RXBLK_BUFF = 0x08000000, /* CS waits for a buffer allocation to complete */
|
SE_FL_RXBLK_BUFF = 0x08000000, /* CS waits for a buffer allocation to complete */
|
||||||
SE_FL_RXBLK_ROOM = 0x10000000, /* CS waits for more buffer room to store incoming data */
|
SE_FL_RXBLK_ROOM = 0x10000000, /* CS waits for more buffer room to store incoming data */
|
||||||
SE_FL_RXBLK_SHUT = 0x20000000, /* input is now closed, nothing new will ever come */
|
/* unused 0x20000000,*/
|
||||||
SE_FL_RXBLK_CONN = 0x40000000, /* other side is not connected */
|
SE_FL_RXBLK_CONN = 0x40000000, /* other side is not connected */
|
||||||
SE_FL_RXBLK_ANY = 0x7C000000, /* any of the RXBLK flags above */
|
SE_FL_RXBLK_ANY = 0x5C000000, /* any of the RXBLK flags above */
|
||||||
SE_FL_APP_MASK = 0x7fe00000, /* Mask for flags set by the app layer */
|
SE_FL_APP_MASK = 0x5fe00000, /* Mask for flags set by the app layer */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* stconn flags */
|
/* stconn flags */
|
||||||
|
|||||||
@ -372,15 +372,6 @@ static inline void cs_rx_room_blk(struct stconn *cs)
|
|||||||
sc_ep_set(cs, SE_FL_RXBLK_ROOM);
|
sc_ep_set(cs, SE_FL_RXBLK_ROOM);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The stream connector announces it will never put new data into the input
|
|
||||||
* buffer and that it's not waiting for its endpoint to deliver anything else.
|
|
||||||
* This function obviously doesn't have a _rdy equivalent.
|
|
||||||
*/
|
|
||||||
static inline void cs_rx_shut_blk(struct stconn *cs)
|
|
||||||
{
|
|
||||||
sc_ep_set(cs, SE_FL_RXBLK_SHUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Returns non-zero if the stream connector's Tx path is blocked */
|
/* Returns non-zero if the stream connector's Tx path is blocked */
|
||||||
static inline int cs_tx_blocked(const struct stconn *cs)
|
static inline int cs_tx_blocked(const struct stconn *cs)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -507,7 +507,6 @@ static void sc_app_shutr(struct stconn *cs)
|
|||||||
{
|
{
|
||||||
struct channel *ic = sc_ic(cs);
|
struct channel *ic = sc_ic(cs);
|
||||||
|
|
||||||
cs_rx_shut_blk(cs);
|
|
||||||
if (ic->flags & CF_SHUTR)
|
if (ic->flags & CF_SHUTR)
|
||||||
return;
|
return;
|
||||||
ic->flags |= CF_SHUTR;
|
ic->flags |= CF_SHUTR;
|
||||||
@ -576,7 +575,6 @@ static void sc_app_shutw(struct stconn *cs)
|
|||||||
/* fall through */
|
/* fall through */
|
||||||
default:
|
default:
|
||||||
cs->flags &= ~SC_FL_NOLINGER;
|
cs->flags &= ~SC_FL_NOLINGER;
|
||||||
cs_rx_shut_blk(cs);
|
|
||||||
ic->flags |= CF_SHUTR;
|
ic->flags |= CF_SHUTR;
|
||||||
ic->rex = TICK_ETERNITY;
|
ic->rex = TICK_ETERNITY;
|
||||||
__sc_strm(cs)->conn_exp = TICK_ETERNITY;
|
__sc_strm(cs)->conn_exp = TICK_ETERNITY;
|
||||||
@ -650,7 +648,6 @@ static void sc_app_shutr_conn(struct stconn *cs)
|
|||||||
|
|
||||||
BUG_ON(!sc_conn(cs));
|
BUG_ON(!sc_conn(cs));
|
||||||
|
|
||||||
cs_rx_shut_blk(cs);
|
|
||||||
if (ic->flags & CF_SHUTR)
|
if (ic->flags & CF_SHUTR)
|
||||||
return;
|
return;
|
||||||
ic->flags |= CF_SHUTR;
|
ic->flags |= CF_SHUTR;
|
||||||
@ -744,7 +741,6 @@ static void sc_app_shutw_conn(struct stconn *cs)
|
|||||||
/* fall through */
|
/* fall through */
|
||||||
default:
|
default:
|
||||||
cs->flags &= ~SC_FL_NOLINGER;
|
cs->flags &= ~SC_FL_NOLINGER;
|
||||||
cs_rx_shut_blk(cs);
|
|
||||||
ic->flags |= CF_SHUTR;
|
ic->flags |= CF_SHUTR;
|
||||||
ic->rex = TICK_ETERNITY;
|
ic->rex = TICK_ETERNITY;
|
||||||
__sc_strm(cs)->conn_exp = TICK_ETERNITY;
|
__sc_strm(cs)->conn_exp = TICK_ETERNITY;
|
||||||
@ -876,7 +872,6 @@ static void sc_app_shutr_applet(struct stconn *cs)
|
|||||||
|
|
||||||
BUG_ON(!sc_appctx(cs));
|
BUG_ON(!sc_appctx(cs));
|
||||||
|
|
||||||
cs_rx_shut_blk(cs);
|
|
||||||
if (ic->flags & CF_SHUTR)
|
if (ic->flags & CF_SHUTR)
|
||||||
return;
|
return;
|
||||||
ic->flags |= CF_SHUTR;
|
ic->flags |= CF_SHUTR;
|
||||||
@ -950,7 +945,6 @@ static void sc_app_shutw_applet(struct stconn *cs)
|
|||||||
/* fall through */
|
/* fall through */
|
||||||
default:
|
default:
|
||||||
cs->flags &= ~SC_FL_NOLINGER;
|
cs->flags &= ~SC_FL_NOLINGER;
|
||||||
cs_rx_shut_blk(cs);
|
|
||||||
ic->flags |= CF_SHUTR;
|
ic->flags |= CF_SHUTR;
|
||||||
ic->rex = TICK_ETERNITY;
|
ic->rex = TICK_ETERNITY;
|
||||||
__sc_strm(cs)->conn_exp = TICK_ETERNITY;
|
__sc_strm(cs)->conn_exp = TICK_ETERNITY;
|
||||||
@ -1016,10 +1010,8 @@ void cs_update_rx(struct stconn *cs)
|
|||||||
{
|
{
|
||||||
struct channel *ic = sc_ic(cs);
|
struct channel *ic = sc_ic(cs);
|
||||||
|
|
||||||
if (ic->flags & CF_SHUTR) {
|
if (ic->flags & CF_SHUTR)
|
||||||
cs_rx_shut_blk(cs);
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
/* Read not closed, update FD status and timeout for reads */
|
/* Read not closed, update FD status and timeout for reads */
|
||||||
if (ic->flags & CF_DONT_READ)
|
if (ic->flags & CF_DONT_READ)
|
||||||
@ -1241,7 +1233,6 @@ static void sc_conn_read0(struct stconn *cs)
|
|||||||
|
|
||||||
BUG_ON(!sc_conn(cs));
|
BUG_ON(!sc_conn(cs));
|
||||||
|
|
||||||
cs_rx_shut_blk(cs);
|
|
||||||
if (ic->flags & CF_SHUTR)
|
if (ic->flags & CF_SHUTR)
|
||||||
return;
|
return;
|
||||||
ic->flags |= CF_SHUTR;
|
ic->flags |= CF_SHUTR;
|
||||||
|
|||||||
@ -1268,7 +1268,6 @@ static __inline int do_l7_retry(struct stream *s, struct stconn *cs)
|
|||||||
s->flags |= SF_ERR_INTERNAL;
|
s->flags |= SF_ERR_INTERNAL;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
sc_ep_clr(cs, SE_FL_RXBLK_SHUT);
|
|
||||||
|
|
||||||
b_free(&req->buf);
|
b_free(&req->buf);
|
||||||
/* Swap the L7 buffer with the channel buffer */
|
/* Swap the L7 buffer with the channel buffer */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user