From nobody Wed Apr 12 15:35:23 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PxRcC5wv9z44yD3; Wed, 12 Apr 2023 15:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PxRcC5Ppzz3Pwl; Wed, 12 Apr 2023 15:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681313723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z36eESDGLPA6U4x3dvI/eCZyd6nt84Y4UcrdmU+3It0=; b=eZXrg7sEzBUZLMHkORQxoH0MNvUaHMZj0WfMIF7t+fOZdNz0UdPyucSaW8YrKa7ShQeK16 65d7q2KEg+Mk/J+BbwwAvfcgWZwdhtfOAZRtEoXuFEEFElUae22ME+keeI/NVS5xs2pYdX Q/nG+lt3kbqBkSyk84WDTVAfPI83wyx914+CUYViy+g770QWZkZUAVKKzqSOpulBPh5dSs rRopg2R6IdwV972QMfRJ2S5vbOPH8dFFqgSrqjdg5Hhn3z3krcdHF0lXhbjYywc0u1a7+Z 5uv1EoZeXPDtTxMFBMOAI8UxH805jNxa+k96mq/zVBp1PnaLoEASzDY73uSDaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681313723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z36eESDGLPA6U4x3dvI/eCZyd6nt84Y4UcrdmU+3It0=; b=B3ICAOfp42kFFM9bCQxFGWfi/doMIDKNIrgzwEMA7kV2ZoSkt0lcJhVcXS7S/0dAWJIrIU v8aQMm1jj7+jNPQNzCUVvuu2kEERxHPUaZH620CmpXvQlBmY/89vyI9Wt1vQR2IowD+9hL 6n2W5qUnj0y/J2Oh/zwfOSNeVxQuJi9xxHJz16XBp3YGnDuXiWwXA1J4R9TNVznRCDEHye es5F9u+YcCFVoC53ljmIcw10P/kCuVdAR6NrQOprsTXNxURY8cKsrKlmgdmJae0pjkGP57 ntXgSPcYdK5nhfv3xhdrf5jINSUB8q/9zn6MyK00PZeloYcOVSp+RuMHs25Dbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681313723; a=rsa-sha256; cv=none; b=aHAKIuQkbuFjj+66pjt2sbrYxe+gGW4YPuIWeF6CRxMJK71TRfLJyC89lmJrzIlsg9PMFu Zw+jiImAHOtQ1dHqW/wE96DtyyIXi8tXhlwTh0XPVN75VIeJBpa0hvtm59Wyk9tpUS0rBs smEsI8yKVwLgJXUa8lmkVToHYl+AKl6H117kFziN/36kVlqMUKqRYVKGok9L+5rFDmJmHy yCrgIncUjLR1l7ahmQO90ht6VZjyF304iC0gsNYkP5LWU7e8C2T+dLP104Io73n/NtSNoT 7BfB9aH8+zQYLkkb9T5N+i/dS8/lMJCBabfRVPt67wE+IN+G2TtEdyD+auFRXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PxRcC4TxYz14mw; Wed, 12 Apr 2023 15:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33CFZN3f001870; Wed, 12 Apr 2023 15:35:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33CFZNfK001864; Wed, 12 Apr 2023 15:35:23 GMT (envelope-from git) Date: Wed, 12 Apr 2023 15:35:23 GMT Message-Id: <202304121535.33CFZNfK001864@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: 1073f416576b - main - tcp_lro: When processing compressed acks lets support the new early wake feature for rack. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1073f416576b50c575414c79294c2d80a3634a05 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=1073f416576b50c575414c79294c2d80a3634a05 commit 1073f416576b50c575414c79294c2d80a3634a05 Author: Randall Stewart AuthorDate: 2023-04-12 15:35:14 +0000 Commit: Randall Stewart 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)