Skip to content

Commit

Permalink
reclaim unused bit
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuho committed Jun 8, 2023
1 parent 0943c9c commit 8084955
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/quicly.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,13 @@ struct st_quicly_conn_t {
* bit vector indicating if there's any pending crypto data (the insignificant 4 bits), or other non-stream data
*/
uint8_t pending_flows;
#define QUICLY_PENDING_FLOW_NEW_TOKEN_BIT (1 << 5)
#define QUICLY_PENDING_FLOW_HANDSHAKE_DONE_BIT (1 << 6)
/* The flags below indicate if the respective frames have to be sent or not. There are no false positives. */
#define QUICLY_PENDING_FLOW_NEW_TOKEN_BIT (1 << 4)
#define QUICLY_PENDING_FLOW_HANDSHAKE_DONE_BIT (1 << 5)
/* Indicates that PATH_CHALLENGE, PATH_RESPONSE, MAX_STREAMS, MAX_DATA, DATA_BLOCKED, STREAMS_BLOCKED, NEW_CONNECTION_ID _might_
* have to be sent. Contrary to NEW_TOKEN_BIT and HANDSHAKE_DONE_BIT, there could be false positives; logic for sending each of
* these frames have the capability of detecting such false positives. This bit consolidates the information as an optimization. */
#define QUICLY_PENDING_FLOW_OTHERS_BIT (1 << 7)
* have to be sent. There could be false positives; logic for sending each of these frames have the capability of detecting such
* false positives. The purpose of this bit is to consolidate information as an optimization. */
#define QUICLY_PENDING_FLOW_OTHERS_BIT (1 << 6)
/**
* pending RETIRE_CONNECTION_ID frames to be sent
*/
Expand Down Expand Up @@ -843,6 +844,8 @@ static void resched_stream_data(quicly_stream_t *stream)
if (stream->stream_id < 0) {
assert(-4 <= stream->stream_id);
uint8_t mask = 1 << -(1 + stream->stream_id);
assert((mask & (QUICLY_PENDING_FLOW_NEW_TOKEN_BIT | QUICLY_PENDING_FLOW_HANDSHAKE_DONE_BIT |
QUICLY_PENDING_FLOW_OTHERS_BIT)) == 0);
if (stream->sendstate.pending.num_ranges != 0) {
stream->conn->egress.pending_flows |= mask;
} else {
Expand Down

0 comments on commit 8084955

Please sign in to comment.