I'm writing a multi-process UDP server, which uses SO_REUSEPORT to let multiple worker processes listen on the same port.
Is there a way of telling the kernel that I would like consistent delivery of packets to processes, based on the packets' source address?
(The server needs to hold a little state, per source address. It would be easier to have state local to the processes, rather than for state to have to be shared between processes.)
You might be able to achieve a similar result using a BPF with the SO_ATTACH_REUSEPORT_CBPF or SO_ATTACH_REUSEPORT_EBPF socket options to assign each client to a specific socket index.