diff options
author | Randall Stewart <rrs@FreeBSD.org> | 2023-04-12 15:35:14 +0000 |
---|---|---|
committer | Randall Stewart <rrs@FreeBSD.org> | 2023-04-12 15:35:14 +0000 |
commit | 1073f416576b50c575414c79294c2d80a3634a05 (patch) | |
tree | 946d665caabcad07c75e15f747b6a26d9ad97859 | |
parent | b4f1582f3b62ca943a6009d7f08c938833bf70d5 (diff) | |
download | src-1073f416576b50c575414c79294c2d80a3634a05.tar.gz src-1073f416576b50c575414c79294c2d80a3634a05.zip |
tcp_lro: When processing compressed acks lets support the new early wake feature for rack.
During compressed ack and mbuf queuing we determine if we need to wake up. A
new function was added that is optional to the tfb so that the stack itself can also
be asked if a wakeup should happen. This helps compensate for late hpts calls.
Reviewed by: tuexen
Sponsored by: Netflix Inc
Differential Revision:https://reviews.freebsd.org/D39502
-rw-r--r-- | sys/netinet/tcp_lro.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c index c35fb0ef1035..3ce49171a65c 100644 --- a/sys/netinet/tcp_lro.c +++ b/sys/netinet/tcp_lro.c @@ -1195,6 +1195,19 @@ tcp_queue_pkts(struct inpcb *inp, struct tcpcb *tp, struct lro_entry *le) 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 * 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) @@ -1751,6 +1764,9 @@ do_bpf_strip_and_compress(struct inpcb *inp, struct lro_ctrl *lc, * not care about SACKS, then we should wake up. */ *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? */ if (can_compress == false) |