[master] f7b31d651 param: Document mapping to HTTP/2 settings

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Apr 4 14:29:12 UTC 2024


commit f7b31d651d36cce5066f055c2e3fe460e1789993
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Thu Mar 28 16:34:35 2024 +0100

    param: Document mapping to HTTP/2 settings
    
    With the exception of h2_max_header_list_size that is not advertised as
    such despite being ent as part of the initial SETTINGS frame. The same
    parameter also sees its default and maximum values updated to 2^32-1.
    
    This is based on this sentence from rfc9113:
    
    > The initial value of this setting is unlimited.
    
    This aligns the h2_max_header_list_size parameter with the values set in
    h2_settings.h for MAX_HEADER_LIST_SIZE.

diff --git a/include/tbl/params.h b/include/tbl/params.h
index 42d72947b..647ff7e87 100644
--- a/include/tbl/params.h
+++ b/include/tbl/params.h
@@ -1219,6 +1219,12 @@ PARAM_SIMPLE(
 	/* flags */	WIZARD
 )
 
+#define H2_SETTING_NAME(nm) "SETTINGS_" #nm
+#define H2_SETTING_DESCR(nm)						\
+	"\n\nThe value of this parameter defines " H2_SETTING_NAME(nm)	\
+	" in the initial SETTINGS frame sent to the client when a new "	\
+	"HTTP2 session is established."
+
 PARAM_SIMPLE(
 	/* name */	h2_header_table_size,
 	/* type */	bytes_u,
@@ -1230,6 +1236,7 @@ PARAM_SIMPLE(
 	"HTTP2 header table size.\n"
 	"This is the size that will be used for the HPACK dynamic\n"
 	"decoding table."
+	H2_SETTING_DESCR(HEADER_TABLE_SIZE)
 )
 
 PARAM_SIMPLE(
@@ -1243,6 +1250,7 @@ PARAM_SIMPLE(
 	"HTTP2 Maximum number of concurrent streams.\n"
 	"This is the number of requests that can be active\n"
 	"at the same time for a single HTTP2 connection."
+	H2_SETTING_DESCR(MAX_CONCURRENT_STREAMS)
 )
 
 /* We have a strict min at the protocol default here. This is because we
@@ -1258,7 +1266,8 @@ PARAM_SIMPLE(
 	/* def */	"65535b",
 	/* units */	"bytes",
 	/* descr */
-	"HTTP2 initial flow control window size.",
+	"HTTP2 initial flow control window size."
+	H2_SETTING_DESCR(INITIAL_WINDOW_SIZE)
 )
 
 PARAM_SIMPLE(
@@ -1270,19 +1279,23 @@ PARAM_SIMPLE(
 	/* units */	"bytes",
 	/* descr */
 	"HTTP2 maximum per frame payload size we are willing to accept."
+	H2_SETTING_DESCR(MAX_FRAME_SIZE)
 )
 
 PARAM_SIMPLE(
 	/* name */	h2_max_header_list_size,
 	/* type */	bytes_u,
 	/* min */	"0b",
-	/* max */	NULL,
-	/* def */	"2147483647b",
+	/* max */	"4294967295b",
+	/* def */	"4294967295b",
 	/* units */	"bytes",
 	/* descr */
 	"HTTP2 maximum size of an uncompressed header list."
 )
 
+#undef H2_SETTING_DESCR
+#undef H2_SETTING_NAME
+
 #define H2_RR_INFO \
 	"Changes to this parameter affect the default for new HTTP2 " \
 	"sessions. vmod_h2(3) can be used to adjust it from VCL."


More information about the varnish-commit mailing list