opnsense-src/sys/dev/cxgbe
Gleb Smirnoff e68b379244 tcp: embed inpcb into tcpcb
For the TCP protocol inpcb storage specify allocation size that would
provide space to most of the data a TCP connection needs, embedding
into struct tcpcb several structures, that previously were allocated
separately.

The most import one is the inpcb itself.  With embedding we can provide
strong guarantee that with a valid TCP inpcb the tcpcb is always valid
and vice versa.  Also we reduce number of allocs/frees per connection.
The embedded inpcb is placed in the beginning of the struct tcpcb,
since in_pcballoc() requires that.  However, later we may want to move
it around for cache line efficiency, and this can be done with a little
effort.  The new intotcpcb() macro is ready for such move.

The congestion algorithm data, the TCP timers and osd(9) data are
also embedded into tcpcb, and temprorary struct tcpcb_mem goes away.
There was no extra allocation here, but we went through extra pointer
every time we accessed this data.

One interesting side effect is that now TCP data is allocated from
SMR-protected zone.  Potentially this allows the TCP stacks or other
TCP related modules to utilize that for their own synchronization.

Large part of the change was done with sed script:

s/tp->ccv->/tp->t_ccv./g
s/tp->ccv/\&tp->t_ccv/g
s/tp->cc_algo/tp->t_cc/g
s/tp->t_timers->tt_/tp->tt_/g
s/CCV\(ccv, osd\)/\&CCV(ccv, t_osd)/g

Dependency side effect is that code that needs to know struct tcpcb
should also know struct inpcb, that added several <netinet/in_pcb.h>.

Differential revision:	https://reviews.freebsd.org/D37127
2022-12-07 09:00:48 -08:00
..
common cxgbe(4): Decode and display some more bits in the PL interrupt handler. 2022-08-16 01:07:36 -07:00
crypto tcp: remove INP_TIMEWAIT flag 2022-10-06 19:24:37 -07:00
cudbg cxgbe: Various whitespace fixes. 2022-11-15 12:03:57 -08:00
cxgbei tcp: remove INP_TIMEWAIT flag 2022-10-06 19:24:37 -07:00
firmware cxgbe(4): Update firmwares to 1.27.0.0. 2022-08-16 01:06:32 -07:00
iw_cxgbe cxgbe: stop open-coding kref access 2022-12-05 17:38:17 +00:00
tom tcp: embed inpcb into tcpcb 2022-12-07 09:00:48 -08:00
adapter.h cxgbe: Various whitespace fixes. 2022-11-15 12:03:57 -08:00
if_cc.c cxgbe(4): Attach to cards with the Terminator 6 ASIC. T6 cards will 2016-09-16 00:08:37 +00:00
if_ccv.c cxgbe(4): Attach to cards with the Terminator 6 ASIC. T6 cards will 2016-09-16 00:08:37 +00:00
if_cxl.c cxgbe(4): Add a minimal if_cxl module that pulls in the real driver as 2015-02-06 01:10:04 +00:00
if_cxlv.c Chelsio T4/T5 VF driver. 2016-09-07 18:13:57 +00:00
offload.h cxgbe: Enable TOE TLS RX when an RX key is provided via setsockopt(). 2022-11-15 12:08:51 -08:00
osdep.h cxgbe(4): make the logging helpers a little more robust. 2021-04-22 15:28:43 -07:00
t4_clip.c cxgbe(4): Empty the clib_db before trying to destroy it. 2021-06-04 12:01:14 -07:00
t4_clip.h cxgbe(4): Overhaul CLIP (Compressed Local IPv6) table management. 2021-05-23 16:07:29 -07:00
t4_filter.c cxgbe(4): Add support for NIC suspend/resume and live reset. 2021-04-27 22:48:51 -07:00
t4_if.m Use the port device name for the iov device for Chelsio T4/T5 cards. 2016-08-03 17:11:08 +00:00
t4_ioctl.h cxgbe/t4_tom: Support for round-robin selection of offload queues. 2022-04-14 15:49:58 -07:00
t4_iov.c cxgbe: Remove unused devclass arguments to *DRIVER_MODULE(). 2022-04-19 10:44:08 -07:00
t4_l2t.c NIC KTLS for Chelsio T6 adapters. 2019-11-21 19:30:31 +00:00
t4_l2t.h NIC KTLS for Chelsio T6 adapters. 2019-11-21 19:30:31 +00:00
t4_main.c cxgbe: Enable TOE TLS RX when an RX key is provided via setsockopt(). 2022-11-15 12:08:51 -08:00
t4_mp_ring.c cxgbe(4): changes in the Tx path to help increase tx coalescing. 2020-07-03 04:44:23 +00:00
t4_mp_ring.h cxgbe(4): changes in the Tx path to help increase tx coalescing. 2020-07-03 04:44:23 +00:00
t4_netmap.c cxgbe: Various whitespace fixes. 2022-11-15 12:03:57 -08:00
t4_sched.c Add a switch structure for send tags. 2021-09-14 11:43:41 -07:00
t4_sge.c cxgbe: Various whitespace fixes. 2022-11-15 12:03:57 -08:00
t4_smt.c cxgbe(4): Move all control queues to the adapter. 2018-08-11 21:10:08 +00:00
t4_smt.h cxgbe(4): Retire an old check. 2018-06-01 01:05:34 +00:00
t4_tracer.c Adjust t4_tracer_mod{load,unload}() definitions to avoid clang 15 warnings 2022-07-19 20:37:02 +02:00
t4_vf.c cxgbe: Remove unused devclass arguments to *DRIVER_MODULE(). 2022-04-19 10:44:08 -07:00