From nobody Fri Mar 08 09:25:02 2024 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 4Trgk6657hz5DFPX; Fri, 8 Mar 2024 09:25:02 +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 4Trgk65TFmz41R9; Fri, 8 Mar 2024 09:25:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709889902; 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=NaZxHDMo4mT46X1NRWYNT2zgMNsggsInXtGA9TpzQME=; b=DuabmklORJeE+Pce5jjBi8x3QuetTbqjZ//ILUCQdYT31g/bsoUX80LpVE9Tkri0rxVnmO 2tV9Fbz+Aw/4/NzIPi66NvvBoBz5NySzkRjJSGC05u2nvjP9k/p8iKpdo7WdYpSr79aQ0B 2URRWQyeVUuSIiAcYjikaomI13Q2HjKmE1lf3NsJlehVrVpVQyUU//yNbsrsF3ufUJ46N4 jE7J6optb9gbSbUIiTAtjUpQ3VJK4nvm1NVE18c4xMNIyHyTUR/pxZnXNt8ngkxiqBJmum xdFbr4yJAygWdhHoVtSg4lLgiLbQOK/LZjqaZCyxunu+OLiVscurRO+VPHFG6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709889902; a=rsa-sha256; cv=none; b=YW774FB5drG0ceArHCX8SQz6FKkpArKtQMyMLYsd407+MMlGQZ05Tzh48hvKDxTm4xd/tt 4iKne0ieh6Fjxy+ZuZHn2uRdJlw5QUr3B/6QNiDg6zHUQ1rb2zjo2CPj25/D2+yvHJjBDu IL/Ls/LE/lJVFIcHbXwK9f6TsDZfT5kpXa9FtKXFsTI1IfoHSzq+wbbnjE5tFy8KygqMh9 3pDHQF597vOjq4TOlTZLk4RvmSl4AT3lEwyLuItJ0PyOoRKLVKYUYnkr2YJwuGmZ/xxKPz sAwhFml9AUVcPte2vbFWTt2PvQCc1UDSWvqAuCJsZwDhnZelcZ+DSKV8bc9EgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709889902; 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=NaZxHDMo4mT46X1NRWYNT2zgMNsggsInXtGA9TpzQME=; b=MjYC1GtHoNZWZDGfD2T+FsdEIE+c9qB4XyeEgTIBMTR0maM332+afG0WADowFeME3/rNFd 8h/TvVHYOIq87+AbmXe+kkqJGsUCAdHleTYmZYMv1Vte3JX5VbzRtm8oGR3eqiMJdVzUxL F0wRnu7jqWOi2ebxGdKC7pc/kZqpBQY8Ya1MEf6wVTHM3TJFe0IfEMYkJQoMiXnaa7jjtb e78A91TEHq0oUj/wdrukHIHTXN0Kfn4lVVCqH0+oj0o07xfiIF89GvTnRStv9/gqfxr/zO 9SrzEvc2zv8zuJVZv6fz7s3cD1VkpjjMzQu25L55v8p0ZYVtnzSXw9C9rZB+SQ== 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 4Trgk654s9z1Bps; Fri, 8 Mar 2024 09:25:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4289P2WA079999; Fri, 8 Mar 2024 09:25:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4289P2E4079996; Fri, 8 Mar 2024 09:25:02 GMT (envelope-from git) Date: Fri, 8 Mar 2024 09:25:02 GMT Message-Id: <202403080925.4289P2E4079996@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 96ad640178ea - main - TCP LRO: add dtrace probe points 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96ad640178ea0a8a9d1772687659dce5be18fbd9 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=96ad640178ea0a8a9d1772687659dce5be18fbd9 commit 96ad640178ea0a8a9d1772687659dce5be18fbd9 Author: Michael Tuexen AuthorDate: 2024-03-08 09:21:09 +0000 Commit: Michael Tuexen CommitDate: 2024-03-08 09:21:09 +0000 TCP LRO: add dtrace probe points Add the IP, UDP, and TCP receive static probes to the code path, which avoids if_input. Reviewed by: rrs, markj MFC after: 1 week` Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D43727 --- sys/netinet/tcp_lro_hpts.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/sys/netinet/tcp_lro_hpts.c b/sys/netinet/tcp_lro_hpts.c index 9c0d4be91d53..cd757d5a6164 100644 --- a/sys/netinet/tcp_lro_hpts.c +++ b/sys/netinet/tcp_lro_hpts.c @@ -50,6 +50,7 @@ #include #include +#include #include #include #include @@ -281,22 +282,64 @@ do_bpf_strip_and_compress(struct tcpcb *tp, struct lro_ctrl *lc, case LRO_TYPE_IPV4_TCP: tcp_hdr_offset -= sizeof(*le->outer.ip4); m->m_pkthdr.lro_etype = ETHERTYPE_IP; + IP_PROBE(receive, NULL, NULL, le->outer.ip4, lc->ifp, + le->outer.ip4, NULL); break; case LRO_TYPE_IPV6_TCP: tcp_hdr_offset -= sizeof(*le->outer.ip6); m->m_pkthdr.lro_etype = ETHERTYPE_IPV6; + IP_PROBE(receive, NULL, NULL, le->outer.ip6, lc->ifp, + NULL, le->outer.ip6); break; default: goto compressed; } break; case LRO_TYPE_IPV4_TCP: + switch (le->outer.data.lro_type) { + case LRO_TYPE_IPV4_UDP: + IP_PROBE(receive, NULL, NULL, le->outer.ip4, lc->ifp, + le->outer.ip4, NULL); + UDP_PROBE(receive, NULL, NULL, le->outer.ip4, NULL, + le->outer.udp); + break; + case LRO_TYPE_IPV6_UDP: + IP_PROBE(receive, NULL, NULL, le->outer.ip6, lc->ifp, + NULL, le->outer.ip6); + UDP_PROBE(receive, NULL, NULL, le->outer.ip6, NULL, + le->outer.udp); + break; + default: + __assert_unreachable(); + break; + } tcp_hdr_offset -= sizeof(*le->outer.ip4); m->m_pkthdr.lro_etype = ETHERTYPE_IP; + IP_PROBE(receive, NULL, NULL, le->inner.ip4, NULL, + le->inner.ip4, NULL); break; case LRO_TYPE_IPV6_TCP: + switch (le->outer.data.lro_type) { + case LRO_TYPE_IPV4_UDP: + IP_PROBE(receive, NULL, NULL, le->outer.ip4, lc->ifp, + le->outer.ip4, NULL); + UDP_PROBE(receive, NULL, NULL, le->outer.ip4, NULL, + le->outer.udp); + break; + case LRO_TYPE_IPV6_UDP: + IP_PROBE(receive, NULL, NULL, le->outer.ip6, lc->ifp, + NULL, le->outer.ip6); + UDP_PROBE(receive, NULL, NULL, le->outer.ip6, NULL, + le->outer.udp); + break; + default: + __assert_unreachable(); + break; + } tcp_hdr_offset -= sizeof(*le->outer.ip6); m->m_pkthdr.lro_etype = ETHERTYPE_IPV6; + IP_PROBE(receive, NULL, NULL, le->inner.ip6, NULL, NULL, + le->inner.ip6); break; default: goto compressed; @@ -313,6 +356,7 @@ do_bpf_strip_and_compress(struct tcpcb *tp, struct lro_ctrl *lc, th->th_sum = 0; /* TCP checksum is valid. */ tcp_fields_to_host(th); + TCP_PROBE5(receive, NULL, tp, m, tp, th); /* Check if ACK can be compressed */ can_compress = tcp_lro_ack_valid(m, th, &ts_ptr, &other_opts);