Home
last modified time | relevance | path

Searched hist:f1fb051716625d29d9dea599c6d7d20d773fe6e3 (Results 1 – 2 of 2) sorted by relevance

/freebsd/share/man/man4/
H A Ddivert.4diff f1fb051716625d29d9dea599c6d7d20d773fe6e3 Wed Aug 31 00:09:21 CEST 2022 Gleb Smirnoff <glebius@FreeBSD.org> divert(4): maintain own cb database and stop using inpcb KPI

Here go cons of using inpcb for divert:
- divert(4) uses only 16 bits (local port) out of struct inpcb,
which is 424 bytes today.
- The inpcb KPI isn't able to provide hashing for divert(4),
thus it uses global inpcb list for lookups.
- divert(4) uses INET-specific part of the KPI, making INET
a requirement for IPDIVERT.

Maintain our own very simple hash lookup database instead. It
has mutex protection for write and epoch protection for lookups.
Since now so->so_pcb no longer points to struct inpcb, don't
initialize protosw methods to methods that belong to PF_INET.
Also, drop support for setting options on a divert socket. My
review of software in base and ports confirms that this has no
use and unlikely worked before.

Differential revision: https://reviews.freebsd.org/D36382
/freebsd/sys/netinet/
H A Dip_divert.cdiff f1fb051716625d29d9dea599c6d7d20d773fe6e3 Wed Aug 31 00:09:21 CEST 2022 Gleb Smirnoff <glebius@FreeBSD.org> divert(4): maintain own cb database and stop using inpcb KPI

Here go cons of using inpcb for divert:
- divert(4) uses only 16 bits (local port) out of struct inpcb,
which is 424 bytes today.
- The inpcb KPI isn't able to provide hashing for divert(4),
thus it uses global inpcb list for lookups.
- divert(4) uses INET-specific part of the KPI, making INET
a requirement for IPDIVERT.

Maintain our own very simple hash lookup database instead. It
has mutex protection for write and epoch protection for lookups.
Since now so->so_pcb no longer points to struct inpcb, don't
initialize protosw methods to methods that belong to PF_INET.
Also, drop support for setting options on a divert socket. My
review of software in base and ports confirms that this has no
use and unlikely worked before.

Differential revision: https://reviews.freebsd.org/D36382