From nobody Thu Jun 06 20:40:38 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 4VwGS71gGdz5MwVQ; Thu, 06 Jun 2024 20:40:39 +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 4VwGS63YLbz4nvs; Thu, 6 Jun 2024 20:40:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717706438; 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=SHfFWd919wqM2eXWYqDP3otpDzwbRQNkkloIt4ePwIA=; b=V84dCYw6kxZ+OZNcqmnjnLIq7QA8jZ+wPDeN13cKdKvuryZHitdbeUaySYnnrk6R+GdjW6 1BwU8dqiKfobOHouF/jInmGsV1QP1F+45MvRIpAm2lW9DHtO4zx9oFWnefUQsgt2dI1iw8 ttJSIRXuDs+T5YO7aUmyZqrdLsAfRlEQ+c4rdJKKIJv9WD1zl2XDwuISD3c83sCNL0GZr5 ml+1+2LmF9dqFHgpxYmZlfcwvwrWNoXOc+IBUaqxfqJd0+iE5tG3aGCeSU+II/esQgruSi OE0o5d2wRZ69Puo6gAGavI2GV5YKBMFqQ47XD78xqi8uEWTlrQcDIKIS3kilSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717706438; a=rsa-sha256; cv=none; b=NTszTkBIltJaC24NMi9pIlFy3st+RLEikkwSPC8ME9tUOPWl6XM7FTJ7t5ebfCg4Rber6q 63yYng5iyh1HnZwM2cGNSNN7HEYgzK16eD65YN+MEA5Lq8umJ9530YNvQV7hoas9Hf84Mq B5LM4bKPvUASnxWCh7W20f6dVPpVPpcqPVeR6dAQFBLwWR2KWRkzar4OF/XVtbnGdQIrQ8 xW8aiHYC5dej9nreAy8yai3tkDqB2xMKrbwHWD4QU7Pfl6pNzdQ6dK4nJ6Px8pd8xxke5K 3l1I+x/1/25qizXb8F2WiOL4mi87Ox/qskkvpmYGAlX23KqUBjLbPtS2t+FJbA== 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=1717706438; 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=SHfFWd919wqM2eXWYqDP3otpDzwbRQNkkloIt4ePwIA=; b=sukmt90F6hLQM/nCHgKCoPOdL8tlho9mj7MoAlIX2WohJpBJ50Tf1Xn6VOWIJpQ2ueajcK K8WFcdCnghdmfTn7cB2LUXmpAVqcWyWMEPM4BOtouzM3AtNISRlE3SyUyMAHWsc8xy9gft 9cWx0Fbb55p89tTZaJDFnIUIfFNKFmTQxmEufxcY8JG9ASHasaw5dcTwwR6weSALhGjjhl evMNIU9p9XNhuQFMnH84NAGz7hftoRXCB65orVov8pF4UE9hoKiBgoOkkeRsJxDryJaiAH WHhK9y8sdGMS54lUwlHcJKs8hoSy/q9p1PGlDbhy1mLgaS3v2ThejWDCJ+vVkw== 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 4VwGS637TSz11FK; Thu, 6 Jun 2024 20:40:38 +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 456KecY7039998; Thu, 6 Jun 2024 20:40:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 456KecZ1039995; Thu, 6 Jun 2024 20:40:38 GMT (envelope-from git) Date: Thu, 6 Jun 2024 20:40:38 GMT Message-Id: <202406062040.456KecZ1039995@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: f042e1515433 - main - pf: add sctp multihome probe points 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: f042e1515433456dca4a2be8ec8ac60c75860304 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f042e1515433456dca4a2be8ec8ac60c75860304 commit f042e1515433456dca4a2be8ec8ac60c75860304 Author: Kristof Provost AuthorDate: 2024-06-06 15:35:09 +0000 Commit: Kristof Provost CommitDate: 2024-06-06 18:46:19 +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 --- 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 064642d7da05..8c97d1bf200d 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -130,6 +130,10 @@ SDT_PROBE_DEFINE2(pf, ip, , bound_iface, "struct pf_kstate *", "struct pfi_kkif *"); 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 *"); @@ -6031,11 +6035,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; @@ -6056,6 +6061,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; @@ -6113,6 +6120,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(); }