From nobody Fri Mar 08 09:57:40 2024 X-Original-To: dev-commits-src-all@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 4TrhRw2M9Rz5Cnvr; Fri, 8 Mar 2024 09:57:48 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TrhRv6Cxbz45lp; Fri, 8 Mar 2024 09:57:47 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709891867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=305Ud1iDYUmt64JJEVeEDhBxJ14yPr+m8SiLshmPdpk=; b=DlrP14kcsrZf2O9CIxop003EMAF5uK8FBw784Vf89Q33tADQf2HD8ZAGN/MRaavJIdhDTi bmaV9Ju0hjByoEkOyqZ7VhxGPB4qYSf7DpaczjhEiLZr1f3MrQLjPFLlBjJnh7jEYnip3o aP+MmwbDojOiagVqYa0OpmoCJbRbeoueCB9X1VJdDKchVUPQS4Ts/3aN4u/IwkVvJEOjZy 1UXLOjADi5VLc2yOVmD53ZFobBcci9/bT5apdNExM8raCBowQInxiEAUdDfXfXRm59W56F 4/dYvQOlJZi0q1i/e6F8cttPp53eEfE+toaPKN5UFOdSKdGRhi08GviZ02eeRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709891867; a=rsa-sha256; cv=none; b=jBhflWHnnkZDiANj1EJbyyuV8w5JJarQl5AIdm9hS+zgjLfdLXDlv4oFoV06Xmfe+PCRrq DJPl3ynoozwDfp3ZFnPWfKS7Z52cZuGKOVlzkY5LBvwfL4HRAzBBdZ3nNkUH1jbRDTv0Ch AQ5FiSlBxruPVPfm+EUeVomBeYaJOsLNJMfUJzmi9X3F//aZF/DHzUKbgHFDqdfI91HpiE mYp9WYaUmzxEWv4aJptaGAmNFLIPoPDy9KAhHXNheJzV6li1K4Qc86gV9res0sY7UwMSR5 zHX5GCLRJUheuOBoT5avq3iZny3jCOKvnJIaRH3suSKn1w7xsSM2aRJkW8ACnA== 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=1709891867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=305Ud1iDYUmt64JJEVeEDhBxJ14yPr+m8SiLshmPdpk=; b=c0LMslzmhXzaWUizCXBB5h6nG27XU/VJ958DoXpKuZayjPjzimGS2T/V1+YBsgxzNY9b4a zgmobGE29xnXqhVximr18XP54dM3PxyAc/dZmWCNqhQrwmpZCFwfcXdf3j+OZAB1Qi426b k70eMmwkV9rC7tYzyZaUIIdWRPAgrYB8O1BUV7n+GbQSDYUMGFFSLffnqC5HG9SRs1ctJZ /H2git+eJl2HNgnvR1ElHK+4RsXxAeCiwhzmoiJpMvsH0QnI425rQDb2mXcemXNxCCHklJ 7nWx1WWt4W545dWSBOD1Hf6dQ7vTGqFa1t5mDmwjx+h+A0mPFJIHZuTi+2rcUg== Received: from smtpclient.apple (ns1.oxydns.net [45.32.91.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4TrhRt3F5jzH62; Fri, 8 Mar 2024 09:57:46 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.8\)) Subject: Re: git: 96ad640178ea - main - TCP LRO: add dtrace probe points From: Zhenlei Huang In-Reply-To: <202403080925.4289P2E4079996@gitrepo.freebsd.org> Date: Fri, 8 Mar 2024 17:57:40 +0800 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <62073048-DC1D-4A40-8325-701022E9A356@FreeBSD.org> References: <202403080925.4289P2E4079996@gitrepo.freebsd.org> To: Michael Tuexen X-Mailer: Apple Mail (2.3696.120.41.1.8) > 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` Be aware the last character ` in meta message 'MFC after' . No idea = whether the reminder mail for MFCing will be correctly composed or not. > 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); Best regards, Zhenlei