git: 1073f416576b - main - tcp_lro: When processing compressed acks lets support the new early wake feature for rack.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 12 Apr 2023 15:35:23 UTC
The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=1073f416576b50c575414c79294c2d80a3634a05 commit 1073f416576b50c575414c79294c2d80a3634a05 Author: Randall Stewart <rrs@FreeBSD.org> AuthorDate: 2023-04-12 15:35:14 +0000 Commit: Randall Stewart <rrs@FreeBSD.org> CommitDate: 2023-04-12 15:35:14 +0000 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 --- sys/netinet/tcp_lro.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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)