opnsense-src/sys/dev/cxgbe/tom
John Baldwin e3ba94d4f3 Don't require the socket lock for sorele().
Previously, sorele() always required the socket lock and dropped the
lock if the released reference was not the last reference.  Many
callers locked the socket lock just before calling sorele() resulting
in a wasted lock/unlock when not dropping the last reference.

Move the previous implementation of sorele() into a new
sorele_locked() function and use it instead of sorele() for various
places in uipc_socket.c that called sorele() while already holding the
socket lock.

The sorele() macro now uses refcount_release_if_not_last() try to drop
the socket reference without locking the socket.  If that shortcut
fails, it locks the socket and calls sorele_locked().

Reviewed by:	kib, markj
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D32741
2021-11-09 10:50:12 -08:00
..
t4_connect.c cxgbe(4): Overhaul CLIP (Compressed Local IPv6) table management. 2021-05-23 16:07:29 -07:00
t4_cpl_io.c Don't require the socket lock for sorele(). 2021-11-09 10:50:12 -08:00
t4_ddp.c cxgbe tom: Update rcv_nxt for a FIN after handle_ddp_close(). 2021-09-14 13:46:14 -07:00
t4_listen.c routing: Allow using IPv6 next-hops for IPv4 routes (RFC 5549). 2021-08-22 22:56:08 +00:00
t4_tls.c cxgbe tom: Remove orphaned function max_imm_tls_space(). 2021-06-16 11:39:39 -07:00
t4_tls.h cxgbe: De-duplicate some of the code for managing TLS key contexts. 2021-06-15 17:45:32 -07:00
t4_tom.c cxgbe tom: Don't queue AIO requests on listen sockets. 2021-09-14 13:46:14 -07:00
t4_tom.h cxgbei: Wait for the final CPL to be received in icl_cxgbei_conn_close. 2021-08-12 08:48:35 -07:00
t4_tom_l2t.c cxgbe/t4_tom: Use stale L2T entry and avoid busy-waiting for resolution. 2021-09-08 20:55:47 -07:00
t4_tom_l2t.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00