MINOR: protocol: define new callback set_affinity
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 5 Apr 2023 16:16:28 +0000 (18:16 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 18 Apr 2023 14:54:52 +0000 (16:54 +0200)
commita66e04338e2f13e7182e43f4b6964b941e4eb504
tree53852a9f5a7ee0000966f8c43228f43d771187b5
parent987812b190cd98f1f17d3d30e79e07d7e46fca3e
MINOR: protocol: define new callback set_affinity

Define a new protocol callback set_affinity. This function is used
during listener_accept() to notify about a rebind on a new thread just
before pushing the connection on the selected thread queue. If the
callback fails, accept is done locally.

This change will be useful for protocols with state allocated before
accept is done. For the moment, only QUIC protocol is concerned. This
will allow to rebind the quic_conn to a new thread depending on its
load.

This should be backported up to 2.7 after a period of observation.
include/haproxy/protocol-t.h
src/listener.c