From nobody Fri Mar 08 10:31:59 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 4TrjCd1myhz5Crb7; Fri, 8 Mar 2024 10:32:13 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TrjCc2gzLz4DwD; Fri, 8 Mar 2024 10:32:12 +0000 (UTC) (envelope-from tuexen@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from smtpclient.apple (unknown [IPv6:2a02:8109:1140:c3d:d1d6:8232:24e7:2597]) (Authenticated sender: micmac) by drew.franken.de (Postfix) with ESMTPSA id EFDA5721E2821; Fri, 8 Mar 2024 11:31:59 +0100 (CET) Content-Type: text/plain; charset=us-ascii 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 (Mac OS X Mail 16.0 \(3774.400.31\)) Subject: Re: git: 96ad640178ea - main - TCP LRO: add dtrace probe points From: tuexen@freebsd.org In-Reply-To: <62073048-DC1D-4A40-8325-701022E9A356@FreeBSD.org> Date: Fri, 8 Mar 2024 11:31:59 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202403080925.4289P2E4079996@gitrepo.freebsd.org> <62073048-DC1D-4A40-8325-701022E9A356@FreeBSD.org> To: Zhenlei Huang X-Mailer: Apple Mail (2.3774.400.31) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:680, ipnet:2001:638::/32, country:DE] X-Rspamd-Queue-Id: 4TrjCc2gzLz4DwD > On Mar 8, 2024, at 10:57, Zhenlei Huang wrote: >=20 >=20 >=20 >> On Mar 8, 2024, at 5:25 PM, Michael Tuexen = wrote: >>=20 >> The branch main has been updated by tuexen: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D96ad640178ea0a8a9d1772687659dce5= be18fbd9 >>=20 >> commit 96ad640178ea0a8a9d1772687659dce5be18fbd9 >> Author: Michael Tuexen >> AuthorDate: 2024-03-08 09:21:09 +0000 >> Commit: Michael Tuexen >> CommitDate: 2024-03-08 09:21:09 +0000 >>=20 >> TCP LRO: add dtrace probe points >>=20 >> Add the IP, UDP, and TCP receive static probes to the code path, >> which avoids if_input. >>=20 >> Reviewed by: rrs, markj >> MFC after: 1 week` >=20 > Be aware the last character ` in meta message 'MFC after' . No idea = whether the reminder mail > for MFCing will be correctly composed or not. Typo on side. Sorry for it and thanks for drawing attention to it. Best regards Michael >=20 >> Sponsored by: Netflix, Inc. >> Differential Revision: https://reviews.freebsd.org/D43727 >> --- >> sys/netinet/tcp_lro_hpts.c | 44 = ++++++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 44 insertions(+) >>=20 >> 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 >>=20 >> #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 -=3D sizeof(*le->outer.ip4); >> m->m_pkthdr.lro_etype =3D 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 -=3D sizeof(*le->outer.ip6); >> m->m_pkthdr.lro_etype =3D 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 -=3D sizeof(*le->outer.ip4); >> m->m_pkthdr.lro_etype =3D 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 -=3D sizeof(*le->outer.ip6); >> m->m_pkthdr.lro_etype =3D 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, >>=20 >> th->th_sum =3D 0; /* TCP checksum is valid. */ >> tcp_fields_to_host(th); >> + TCP_PROBE5(receive, NULL, tp, m, tp, th); >>=20 >> /* Check if ACK can be compressed */ >> can_compress =3D tcp_lro_ack_valid(m, th, &ts_ptr, &other_opts); >=20 > Best regards, > Zhenlei >=20