Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_syncache.c
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | |||||
#include <netinet/tcp.h> | #include <netinet/tcp.h> | ||||
#include <netinet/tcp_fastopen.h> | #include <netinet/tcp_fastopen.h> | ||||
#include <netinet/tcp_fsm.h> | #include <netinet/tcp_fsm.h> | ||||
#include <netinet/tcp_seq.h> | #include <netinet/tcp_seq.h> | ||||
#include <netinet/tcp_timer.h> | #include <netinet/tcp_timer.h> | ||||
#include <netinet/tcp_var.h> | #include <netinet/tcp_var.h> | ||||
#include <netinet/tcp_syncache.h> | #include <netinet/tcp_syncache.h> | ||||
#include <netinet/tcp_ecn.h> | #include <netinet/tcp_ecn.h> | ||||
#ifdef TCP_BLACKBOX | |||||
#include <netinet/tcp_log_buf.h> | |||||
#endif | |||||
#ifdef TCP_OFFLOAD | #ifdef TCP_OFFLOAD | ||||
#include <netinet/toecore.h> | #include <netinet/toecore.h> | ||||
#endif | #endif | ||||
#include <netinet/udp.h> | #include <netinet/udp.h> | ||||
#include <netipsec/ipsec_support.h> | #include <netipsec/ipsec_support.h> | ||||
#include <machine/in_cksum.h> | #include <machine/in_cksum.h> | ||||
▲ Show 20 Lines • Show All 906 Lines • ▼ Show 20 Lines | #ifdef TCP_OFFLOAD | ||||
* Allow a TOE driver to install its hooks. Note that we hold the | * Allow a TOE driver to install its hooks. Note that we hold the | ||||
* pcbinfo lock too and that prevents tcp_usr_accept from accepting a | * pcbinfo lock too and that prevents tcp_usr_accept from accepting a | ||||
* new connection before the TOE driver has done its thing. | * new connection before the TOE driver has done its thing. | ||||
*/ | */ | ||||
if (ADDED_BY_TOE(sc)) { | if (ADDED_BY_TOE(sc)) { | ||||
struct toedev *tod = sc->sc_tod; | struct toedev *tod = sc->sc_tod; | ||||
tod->tod_offload_socket(tod, sc->sc_todctx, so); | tod->tod_offload_socket(tod, sc->sc_todctx, so); | ||||
} | |||||
#endif | |||||
#ifdef TCP_BLACKBOX | |||||
/* | |||||
* Inherit the log state from the listening socket, if | |||||
* - the log state of the listening socket is not off and | |||||
* - the listening socket was not auto selected from all sessions and | |||||
* - a log id is not set on the listening socket. | |||||
* This avoids inheriting a log state which was automatically set. | |||||
*/ | |||||
if ((tcp_get_bblog_state(sototcpcb(lso)) != TCP_LOG_STATE_OFF) && | |||||
((sototcpcb(lso)->t_flags2 & TF2_LOG_AUTO) == 0) && | |||||
(sototcpcb(lso)->t_lib == NULL)) { | |||||
cc: Looks in default t_logstate is TCP_LOG_STATE_OFF, so check this first can save further checks… | |||||
tcp_log_state_change(tp, tcp_get_bblog_state(sototcpcb(lso))); | |||||
} | } | ||||
#endif | #endif | ||||
/* | /* | ||||
* Copy and activate timers. | * Copy and activate timers. | ||||
*/ | */ | ||||
tp->t_maxunacktime = sototcpcb(lso)->t_maxunacktime; | tp->t_maxunacktime = sototcpcb(lso)->t_maxunacktime; | ||||
tp->t_keepinit = sototcpcb(lso)->t_keepinit; | tp->t_keepinit = sototcpcb(lso)->t_keepinit; | ||||
tp->t_keepidle = sototcpcb(lso)->t_keepidle; | tp->t_keepidle = sototcpcb(lso)->t_keepidle; | ||||
▲ Show 20 Lines • Show All 1,551 Lines • Show Last 20 Lines |
Looks in default t_logstate is TCP_LOG_STATE_OFF, so check this first can save further checks in default.