[master] 121e57c10 acceptor: add private pointers

Nils Goroll nils.goroll at uplex.de
Sun Nov 3 11:03:09 UTC 2024


commit 121e57c100d20774c1ac2984372bdea35646c339
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Mon Sep 16 08:59:57 2024 +0200

    acceptor: add private pointers
    
    Because of the small number of acceptor related objects (acceptor, listen sock,
    poolsock), this is very low overall overhead and helps avoid complications in
    acceptor implementations.
    
    Complements #3976

diff --git a/bin/varnishd/acceptor/acceptor_priv.h b/bin/varnishd/acceptor/acceptor_priv.h
index 4f18d23c5..d24ce5d5b 100644
--- a/bin/varnishd/acceptor/acceptor_priv.h
+++ b/bin/varnishd/acceptor/acceptor_priv.h
@@ -51,6 +51,7 @@ struct poolsock {
 	struct listen_sock		*lsock;
 	struct pool_task		task[1];
 	struct pool			*pool;
+	void				*vca_priv;
 };
 
 struct conn_heritage {
diff --git a/bin/varnishd/acceptor/cache_acceptor.h b/bin/varnishd/acceptor/cache_acceptor.h
index 6dcc2e2f7..79c7a0dec 100644
--- a/bin/varnishd/acceptor/cache_acceptor.h
+++ b/bin/varnishd/acceptor/cache_acceptor.h
@@ -61,6 +61,7 @@ struct acceptor {
 	VTAILQ_ENTRY(acceptor)		list;
 	VTAILQ_HEAD(,listen_sock)	socks;
 	const char			*name;
+	void				*vca_priv;
 
 	acceptor_config_f		*config;
 	acceptor_init_f			*init;
diff --git a/bin/varnishd/common/heritage.h b/bin/varnishd/common/heritage.h
index bf207b17b..043343bbc 100644
--- a/bin/varnishd/common/heritage.h
+++ b/bin/varnishd/common/heritage.h
@@ -55,6 +55,7 @@ struct listen_sock {
 	unsigned			test_heritage;
 	struct conn_heritage		*conn_heritage;
 	struct acceptor			*vca;
+	void				*vca_priv;
 };
 
 VTAILQ_HEAD(listen_sock_head, listen_sock);


More information about the varnish-commit mailing list