Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_stacks/rack.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 6,965 Lines • ▼ Show 20 Lines | #endif | ||||
int32_t prefetch_so_done = 0; | int32_t prefetch_so_done = 0; | ||||
struct tcp_log_buffer *lgb = NULL; | struct tcp_log_buffer *lgb = NULL; | ||||
struct inpcb *inp; | struct inpcb *inp; | ||||
struct sockbuf *sb; | struct sockbuf *sb; | ||||
#ifdef INET6 | #ifdef INET6 | ||||
struct ip6_hdr *ip6 = NULL; | struct ip6_hdr *ip6 = NULL; | ||||
int32_t isipv6; | int32_t isipv6; | ||||
#endif | #endif | ||||
#ifdef KERN_TLS | |||||
hselasky: ditto const bool hw_tls = ...
?? | |||||
const bool hw_tls = (so->so_snd.sb_flags & SB_TLS_IFNET) != 0; | |||||
#else | |||||
const bool hw_tls = false; | |||||
#endif | |||||
/* setup and take the cache hits here */ | /* setup and take the cache hits here */ | ||||
rack = (struct tcp_rack *)tp->t_fb_ptr; | rack = (struct tcp_rack *)tp->t_fb_ptr; | ||||
inp = rack->rc_inp; | inp = rack->rc_inp; | ||||
so = inp->inp_socket; | so = inp->inp_socket; | ||||
sb = &so->so_snd; | sb = &so->so_snd; | ||||
kern_prefetch(sb, &do_a_prefetch); | kern_prefetch(sb, &do_a_prefetch); | ||||
do_a_prefetch = 1; | do_a_prefetch = 1; | ||||
▲ Show 20 Lines • Show All 959 Lines • ▼ Show 20 Lines | #endif | ||||
m->m_data += max_linkhdr; | m->m_data += max_linkhdr; | ||||
m->m_len = hdrlen; | m->m_len = hdrlen; | ||||
/* | /* | ||||
* Start the m_copy functions from the closest mbuf to the | * Start the m_copy functions from the closest mbuf to the | ||||
* sb_offset in the socket buffer chain. | * sb_offset in the socket buffer chain. | ||||
*/ | */ | ||||
mb = sbsndptr_noadv(sb, sb_offset, &moff); | mb = sbsndptr_noadv(sb, sb_offset, &moff); | ||||
if (len <= MHLEN - hdrlen - max_linkhdr) { | if (len <= MHLEN - hdrlen - max_linkhdr && !hw_tls) { | ||||
m_copydata(mb, moff, (int)len, | m_copydata(mb, moff, (int)len, | ||||
mtod(m, caddr_t)+hdrlen); | mtod(m, caddr_t)+hdrlen); | ||||
if (SEQ_LT(tp->snd_nxt, tp->snd_max)) | if (SEQ_LT(tp->snd_nxt, tp->snd_max)) | ||||
sbsndptr_adv(sb, mb, len); | sbsndptr_adv(sb, mb, len); | ||||
m->m_len += len; | m->m_len += len; | ||||
} else { | } else { | ||||
struct sockbuf *msb; | struct sockbuf *msb; | ||||
if (SEQ_LT(tp->snd_nxt, tp->snd_max)) | if (SEQ_LT(tp->snd_nxt, tp->snd_max)) | ||||
msb = NULL; | msb = NULL; | ||||
else | else | ||||
msb = sb; | msb = sb; | ||||
m->m_next = tcp_m_copym(/*tp, */ mb, moff, &len, | m->m_next = tcp_m_copym(/*tp, */ mb, moff, &len, | ||||
if_hw_tsomaxsegcount, if_hw_tsomaxsegsize, msb /*, 0, NULL*/); | if_hw_tsomaxsegcount, if_hw_tsomaxsegsize, msb, | ||||
hw_tls /*, NULL */); | |||||
if (len <= (tp->t_maxseg - optlen)) { | if (len <= (tp->t_maxseg - optlen)) { | ||||
/* | /* | ||||
* Must have ran out of mbufs for the copy | * Must have ran out of mbufs for the copy | ||||
* shorten it to no longer need tso. Lets | * shorten it to no longer need tso. Lets | ||||
* not put on sendalot since we are low on | * not put on sendalot since we are low on | ||||
* mbufs. | * mbufs. | ||||
*/ | */ | ||||
tso = 0; | tso = 0; | ||||
▲ Show 20 Lines • Show All 1,237 Lines • Show Last 20 Lines |
ditto const bool hw_tls = ...
??