]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: protocol: move __protocol_by_family to read_mostly
authorWilly Tarreau <w@1wt.eu>
Sat, 10 Apr 2021 15:38:05 +0000 (17:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 10 Apr 2021 17:27:41 +0000 (19:27 +0200)
This one is used for each outgoing connection and never changes after
boot, move it to read_mostly.

src/protocol.c

index 77396d0f8ea58ce64d7a011bb378ff6beca79e98..cd574f2b257a262d2d5b5f7bbb6d939e08cfe176 100644 (file)
@@ -24,7 +24,7 @@
 
 /* List head of all registered protocols */
 static struct list protocols = LIST_HEAD_INIT(protocols);
-struct protocol *__protocol_by_family[AF_CUST_MAX][2][2] = { };
+struct protocol *__protocol_by_family[AF_CUST_MAX][2][2] __read_mostly = { };
 
 /* This is the global spinlock we may need to register/unregister listeners or
  * protocols. Its main purpose is in fact to serialize the rare stop/deinit()