Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_lro.c
Show First 20 Lines • Show All 1,189 Lines • ▼ Show 20 Lines | if (tp->t_in_pkt == NULL) { | ||||
/* Already some there */ | /* Already some there */ | ||||
tp->t_tail_pkt->m_nextpkt = le->m_head; | tp->t_tail_pkt->m_nextpkt = le->m_head; | ||||
tp->t_tail_pkt = le->m_last_mbuf; | tp->t_tail_pkt = le->m_last_mbuf; | ||||
} | } | ||||
le->m_head = NULL; | le->m_head = NULL; | ||||
le->m_last_mbuf = NULL; | le->m_last_mbuf = NULL; | ||||
} | } | ||||
static bool | |||||
tcp_lro_check_wake_status(struct inpcb *inp) | |||||
{ | |||||
struct tcpcb *tp; | |||||
tp = intotcpcb(inp); | |||||
if (__predict_false(tp == NULL)) | |||||
return (true); | |||||
if (tp->t_fb->tfb_early_wake_check != NULL) | |||||
return ((tp->t_fb->tfb_early_wake_check)(tp)); | |||||
return (false); | |||||
} | |||||
static struct mbuf * | static struct mbuf * | ||||
tcp_lro_get_last_if_ackcmp(struct lro_ctrl *lc, struct lro_entry *le, | tcp_lro_get_last_if_ackcmp(struct lro_ctrl *lc, struct lro_entry *le, | ||||
struct inpcb *inp, int32_t *new_m, bool can_append_old_cmp) | struct inpcb *inp, int32_t *new_m, bool can_append_old_cmp) | ||||
{ | { | ||||
struct tcpcb *tp; | struct tcpcb *tp; | ||||
struct mbuf *m; | struct mbuf *m; | ||||
tp = intotcpcb(inp); | tp = intotcpcb(inp); | ||||
▲ Show 20 Lines • Show All 540 Lines • ▼ Show 20 Lines | do_bpf_strip_and_compress(struct inpcb *inp, struct lro_ctrl *lc, | ||||
if ((other_opts == true) && | if ((other_opts == true) && | ||||
((inp->inp_flags2 & INP_DONT_SACK_QUEUE) == 0)) { | ((inp->inp_flags2 & INP_DONT_SACK_QUEUE) == 0)) { | ||||
/* | /* | ||||
* If there are other options (SACK?) and the | * If there are other options (SACK?) and the | ||||
* tcp endpoint has not expressly told us it does | * tcp endpoint has not expressly told us it does | ||||
* not care about SACKS, then we should wake up. | * not care about SACKS, then we should wake up. | ||||
*/ | */ | ||||
*should_wake = true; | *should_wake = true; | ||||
} else if (*should_wake == false) { | |||||
/* Wakeup override check if we are false here */ | |||||
*should_wake = tcp_lro_check_wake_status(inp); | |||||
} | } | ||||
/* Is the ack compressable? */ | /* Is the ack compressable? */ | ||||
if (can_compress == false) | if (can_compress == false) | ||||
goto done; | goto done; | ||||
/* Does the TCP endpoint support ACK compression? */ | /* Does the TCP endpoint support ACK compression? */ | ||||
if ((inp->inp_flags2 & INP_MBUF_ACKCMP) == 0) | if ((inp->inp_flags2 & INP_MBUF_ACKCMP) == 0) | ||||
goto done; | goto done; | ||||
▲ Show 20 Lines • Show All 309 Lines • Show Last 20 Lines |