git: inpcb: Save local group index
Sepherosa Ziehau
sephe at crater.dragonflybsd.org
Sun Sep 28 06:14:35 PDT 2014
commit d31e82302ae39c4b008419f7fda0c1ac5f927f3b
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date: Sun Sep 21 21:00:32 2014 +0800
inpcb: Save local group index
So that the caller, e.g. UDP protocol, could redistribute the inpcb
accordingly.
We keep the local group sorted by the inpcb local group index in
ascending order. This eases the multi-process userland application
which uses SO_REUSEPORT sockets and binds process to the owner cpu
of the SO_REUSEPORT socket:
If we didn't sort the local group by the inpcb local group index and
one of the process owning an inpcb in this local group restarted, e.g.
crashed and restarted by watchdog, other processes owning a inpcb in
this local group would have to detect that event, refetch its socket's
owner cpu, and re-bind.
Summary of changes:
sys/netinet/in_pcb.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++-
sys/netinet/in_pcb.h | 1 +
2 files changed, 57 insertions(+), 1 deletion(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d31e82302ae39c4b008419f7fda0c1ac5f927f3b
--
DragonFly BSD source repository
More information about the Commits
mailing list