[master] 3c09eb39c h2_vsl_frame: Exit early if masked

Nils Goroll nils.goroll at uplex.de
Mon May 22 13:11:06 UTC 2023


commit 3c09eb39c70788a372a6f75eed34feeaf20a6d46
Author: Dag Haavi Finstad <daghf at varnish-software.com>
Date:   Mon May 22 10:57:09 2023 +0200

    h2_vsl_frame: Exit early if masked
    
    The VSB bits in here come with a very significant performance penalty
    for H2 request body processing.

diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index c1ced04b6..5b66795b0 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -243,6 +243,10 @@ h2_vsl_frame(const struct h2_sess *h2, const void *ptr, size_t len)
 	const char *p;
 	unsigned u;
 
+	if (VSL_tag_is_masked(SLT_H2RxHdr) &&
+	    VSL_tag_is_masked(SLT_H2RxBody))
+		return;
+
 	AN(ptr);
 	assert(len >= 9);
 	b = ptr;


More information about the varnish-commit mailing list