summaryrefslogtreecommitdiff
path: root/include/internal/quic_stream_map.h
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2023-04-18 19:30:55 +0100
committerHugo Landau <hlandau@openssl.org>2023-05-12 14:47:12 +0100
commit90cecc406f58b229ffa9c8e8473eaa6924c4a5d5 (patch)
treec02a56da8c5bccb7b033be06e55ec825773ed6ca /include/internal/quic_stream_map.h
parenta6b6ea17376572e3c0227b98f21dedc48215aa9a (diff)
downloadopenssl-new-90cecc406f58b229ffa9c8e8473eaa6924c4a5d5.tar.gz
QUIC RXDP/QSM: Enforce MAX_STREAMS
Also use accept queue popping by the application as the retirement event, i.e., as the cue to increase the limit. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20765)
Diffstat (limited to 'include/internal/quic_stream_map.h')
-rw-r--r--include/internal/quic_stream_map.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/internal/quic_stream_map.h b/include/internal/quic_stream_map.h
index 78ec703fbc..81312e8b4a 100644
--- a/include/internal/quic_stream_map.h
+++ b/include/internal/quic_stream_map.h
@@ -138,6 +138,8 @@ typedef struct quic_stream_map_st {
QUIC_STREAM *rr_cur;
uint64_t (*get_stream_limit_cb)(int uni, void *arg);
void *get_stream_limit_cb_arg;
+ QUIC_RXFC *max_streams_bidi_rxfc;
+ QUIC_RXFC *max_streams_uni_rxfc;
} QUIC_STREAM_MAP;
/*
@@ -155,7 +157,9 @@ typedef struct quic_stream_map_st {
*/
int ossl_quic_stream_map_init(QUIC_STREAM_MAP *qsm,
uint64_t (*get_stream_limit_cb)(int uni, void *arg),
- void *get_stream_limit_cb_arg);
+ void *get_stream_limit_cb_arg,
+ QUIC_RXFC *max_streams_bidi_rxfc,
+ QUIC_RXFC *max_streams_uni_rxfc);
/*
* Any streams still in the map will be released as though
@@ -246,12 +250,14 @@ void ossl_quic_stream_map_push_accept_queue(QUIC_STREAM_MAP *qsm,
QUIC_STREAM *ossl_quic_stream_map_peek_accept_queue(QUIC_STREAM_MAP *qsm);
/*
- * Removes a stream from the accept queue.
+ * Removes a stream from the accept queue. rtt is the estimated connection RTT.
+ * The stream is retired for the purposes of MAX_STREAMS RXFC.
*
* Precondition: s is in the accept queue.
*/
void ossl_quic_stream_map_remove_from_accept_queue(QUIC_STREAM_MAP *qsm,
- QUIC_STREAM *s);
+ QUIC_STREAM *s,
+ OSSL_TIME rtt);
/* Returns the length of the accept queue. */
size_t ossl_quic_stream_map_get_accept_queue_len(QUIC_STREAM_MAP *qsm);