From nobody Thu Jun 13 12:44:47 2024 X-Original-To: dev-commits-src-branches@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 4W0MYq5wW2z5NcFl; Thu, 13 Jun 2024 12:44:47 +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 4W0MYq54ZNz42B2; Thu, 13 Jun 2024 12:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718282687; 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=Pa9qm6iPiB2aR3TaQiZbP9WQGGtjZZAeORKAUMIIQxk=; b=ESswZaaWkzOL3QorvrYXQCLs5oEWBsaMBwOWRP6vsBe6OhtALw/mWEKm7eS0bd/qMxMsBO iRe29g+FPnasCBKOx2kNMf2YqVhLXcgNWa6baptd1n2cLe+Rt21hPAu9MEEj1WFWXdDt+F LQR5TdadHUuF6I4rRS3dHSuoVk0pxyHb8k0oNZOCZSjAStAcWrhRGzGiFfQ7aX1Wb3LJuh /d8UbsGiSVDgkEcpDVDuyE9mOYHdy3I7I458mT5/C5rPxL6kcKjt5mtIF80Cb3Dt8SJE4F Q1uq9lm9i+IxEIIysZwOtf4m436sJcWjkyJaFtw1oGYhZ0SLX8kYWokzMiieCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718282687; a=rsa-sha256; cv=none; b=ZpFBYWMCXWINgeC9y9HcqYXO7YRiqtA0KMll+RUAdAZLj2IVwhk0yYrC1rXaT1673tRU57 03SbOJsAJChnfELODHln0zwwRJG4sbw80D55FLrsReXG1JsqotCA4nGZvtu2sOBxp6e2/Z CE8Vifl/vJUcG0X7ZfYn3qhfzMXS24jvhmUYbPb8+mXJ1+7dIRQOaSviPMJ0PBdoSvW4WO D14kv8vJ2EviP7GZasxqX2He9+igxaPochCbEweh+6XD0UJ08JztKxYDvLT7XIXht73NTM CDDrcRqzYUw0S1uGOzFccQgJxB4PZF1UXHABND6uAUAzTEwa3fEv0A17RAqB+g== 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=1718282687; 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=Pa9qm6iPiB2aR3TaQiZbP9WQGGtjZZAeORKAUMIIQxk=; b=lo6H2GVgcA2vat+4N+dDqN0fUSj6Bm3WwgmlgH73lux4vD9UIdPk/8sFFTk+y9cMEABECs bIccJwJ3lCdPfRvU1NuKXpcwJWtYsG4Z0MdUSWZ33vMVNiaqch3sV2fgGMaNmKw+HRxH38 ms7pSQ6DkmPuXMSVTAZ2zn7CWq1iMDyOkZrKkZxPVlgesLGnKVjs8Hf/ffyWR9GYYbpEY0 +ck5SBstapfKe5ptKZIXNXENwon0b5Hg3VGZlkNY8YZzr7VUe0cM2VlPQwztXhSJAnt7ZM rQCuAm972GGMq86jdGGvxdI9ws8RUOhxYh9SQKd3NdRFJwBmMYlMWy3GYC/VUQ== 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 4W0MYq4H4czdM4; Thu, 13 Jun 2024 12:44:47 +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 45DCilKm080535; Thu, 13 Jun 2024 12:44:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45DCils5080532; Thu, 13 Jun 2024 12:44:47 GMT (envelope-from git) Date: Thu, 13 Jun 2024 12:44:47 GMT Message-Id: <202406131244.45DCils5080532@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 49e0e1481778 - stable/14 - pf: add sctp multihome probe points List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 49e0e148177897d0d7a6e9ac6d0413a8b38681f9 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=49e0e148177897d0d7a6e9ac6d0413a8b38681f9 commit 49e0e148177897d0d7a6e9ac6d0413a8b38681f9 Author: Kristof Provost AuthorDate: 2024-06-06 15:35:09 +0000 Commit: Kristof Provost CommitDate: 2024-06-13 12:17:34 +0000 pf: add sctp multihome probe points Add probe points to allow us to probe when we add or remove multihome addresses. Example use: pf:sctp:multihome:add { printf("Add tag %x address %x", arg0, ((struct pf_sctp_source *)arg1)->addr.v4.s_addr); } pf:sctp:multihome:remove { printf("Remove tag %x address %x", arg0, ((struct pf_sctp_source *)arg2)->addr.v4.s_addr); } MFC after: 1 week Sponsored by: Orange Business Services (cherry picked from commit f042e1515433456dca4a2be8ec8ac60c75860304) --- sys/netpfil/pf/pf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 6874dd59c1f7..ae0c5dcf8128 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -128,6 +128,10 @@ SDT_PROBE_DEFINE5(pf, ip, state, lookup, "struct pfi_kkif *", "struct pf_kstate *"); SDT_PROBE_DEFINE4(pf, sctp, multihome, test, "struct pfi_kkif *", "struct pf_krule *", "struct mbuf *", "int"); +SDT_PROBE_DEFINE2(pf, sctp, multihome, add, "uint32_t", + "struct pf_sctp_source *"); +SDT_PROBE_DEFINE3(pf, sctp, multihome, remove, "uint32_t", + "struct pf_kstate *", "struct pf_sctp_source *"); SDT_PROBE_DEFINE3(pf, eth, test_rule, entry, "int", "struct ifnet *", "struct mbuf *"); @@ -6001,11 +6005,12 @@ pf_sctp_multihome_detach_addr(const struct pf_kstate *s) key.v_tag = s->dst.scrub->pfss_v_tag; ep = RB_FIND(pf_sctp_endpoints, &V_pf_sctp_endpoints, &key); if (ep != NULL) { - /* XXX Actually remove! */ TAILQ_FOREACH_SAFE(i, &ep->sources, entry, tmp) { if (pf_addr_cmp(&i->addr, &s->key[PF_SK_WIRE]->addr[s->direction == PF_OUT], s->key[PF_SK_WIRE]->af) == 0) { + SDT_PROBE3(pf, sctp, multihome, remove, + key.v_tag, s, i); TAILQ_REMOVE(&ep->sources, i, entry); free(i, M_PFTEMP); break; @@ -6026,6 +6031,8 @@ pf_sctp_multihome_detach_addr(const struct pf_kstate *s) if (pf_addr_cmp(&i->addr, &s->key[PF_SK_WIRE]->addr[s->direction == PF_IN], s->key[PF_SK_WIRE]->af) == 0) { + SDT_PROBE3(pf, sctp, multihome, remove, + key.v_tag, s, i); TAILQ_REMOVE(&ep->sources, i, entry); free(i, M_PFTEMP); break; @@ -6083,6 +6090,7 @@ pf_sctp_multihome_add_addr(struct pf_pdesc *pd, struct pf_addr *a, uint32_t v_ta i->af = pd->af; memcpy(&i->addr, a, sizeof(*a)); TAILQ_INSERT_TAIL(&ep->sources, i, entry); + SDT_PROBE2(pf, sctp, multihome, add, v_tag, i); PF_SCTP_ENDPOINTS_UNLOCK(); }