aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MCA/ssh:/anongit@git.FreeBSD.org/src.git
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2026-04-12 18:35:13 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2026-04-12 18:35:13 +0000
commitece716c5d34728a170f1dfe1b3389c267d6ddd1e (patch)
treeb2291d717f1fb108bac9060d6633ad8c6d11a929 /llvm/lib/MCA/ssh:/anongit@git.FreeBSD.org/src.git
parentedece33b38ebcba46bd4d81382ebdb5a634a0c6d (diff)
raw ip: move hash table manipulation to inpcb layerHEADmain
The SOCK_RAW socket is a multiple receiver socket by its definition. An incoming packet may be copied to multiple sockets. Thus, incoming packet handling is expensive. Systems with many thousands of raw sockets usually have them connect(2)-ed to different destinations. This allows for some improvement of the input handling, which was introduced by 9ed324c9a588 back in 2008. This optimization was made specifically for L2TP/PPTP VPN concentrators based on ports/net/mpd5. This change generalizes the idea of 9ed324c9a588, so that it potentially can be used with IPv6 raw sockets. This also eliminates last use of the pcbinfo hash lock outside of in_pcb.c. While here make a speculative design decision: put into the hash table sockets that did only connect(2). Previously, we were indexing only sockets that were protocol bound, did bind(2) and did connect(2). My speculation is that only the remote IP provides some real entropy into the hash and local address and proto are expected to be the same for majority of the sockets. My other speculation is that VPN concentrators other than mpd5 may not bind(2) their sockets, thus not getting any use of the hash. Differential Revision: https://reviews.freebsd.org/D56172
Diffstat (limited to 'llvm/lib/MCA/ssh:/anongit@git.FreeBSD.org/src.git')
0 files changed, 0 insertions, 0 deletions