From nobody Thu Oct 24 03:16:08 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 4XYrfJ5qBBz5b0cg; Thu, 24 Oct 2024 03:16:08 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XYrfJ5KQRz4DNs; Thu, 24 Oct 2024 03:16:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729739768; 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=WmriVtwdAZnd/QsEL+puQFoqKTeU5tl4iYo8Rl6J1zQ=; b=Coiv5QuRS+IFyXR1q/A1kmrZrJqlrl5SixxrXfB+nAvgG+zO7Lej0usCYOiWWRE1mAy2J9 RTOlRW7IA1odpnrQLOPuClQmG9pGi6NRdgQBZADgezkKEuSp1nlu9WlU/bm+L/d13Rp9Oh TovmpNIPccsfO3Io5TH2c+61gotL/xI1KoanRdbJ2Aah7VLGKo+dkQAmXXNi1+/KT/guHn c84w7PfZrmzGsSmeCvtR++ppR/cVvHIehhjhcBDouXD4RBy0/76B3Sgmy00STaOb2lyHXO VEk9q8wyzggdMEM9GOwYmuPnDUUnvdlJSYdyMBeDW7HUKhwJS7SqM6eTeb2sIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729739768; 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=WmriVtwdAZnd/QsEL+puQFoqKTeU5tl4iYo8Rl6J1zQ=; b=posOKXha2NZ4iCfsIf7RqG9G1QaeO//pRc4zJNP9X9WzjDYBGMc7gYMMpVK818bX/fysrM khRCPTBnxh4APGEh8iwaoPkS1OFIxX+zVB37LYvBQ1FTLrxKJodyXcIrYgIKjRDg82AITo z1g4gwNLApGoupvtYv2vZb00wm9g/uursuIKa/6EESmDfNl9bMhOKoW3IFaaED376LtJA9 NxIkN8ntDnjBJCsRaagIx+TOsV4bJPICPyfWqgbQIjRkKtecLhZTWzYrX145JFjJD5pmoq p+yoJIRfVQxndSwjUnpBzGWvq0idZjnM7J+/bUTZw5kTB7bHmx6mqL67gzXMPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729739768; a=rsa-sha256; cv=none; b=qgdft8X2FwiwiUV2Z01dqj+nvPm3uIRHrcCZoi4FylT/OmlFRd/lmlQHFK4n9WS06YXyKL iBXmCpq3OodlSqwP4bUR/rHHyPRNz8Z4JMARCvrRB0qFoQsDmN2tFXidppkJgCcbc6HNtr GjEAXJS8N9I373k/MirXZpol4fpN6PI1aBcIXN+CF0sALKD9bhGvIQbzVgEXJNsUoXKs08 5y7TcqkUQnh6l7cJlCvUiIr72qyrIMBoS8jhi3JDzcj41UKrC+yubp9D64wjHMB170IcXH jJDWLxmcQobZgZkuEDmaiWVM8wq8rGDUxuOla2ALXGYMbwpKDeUrXK5pzn85mA== 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 4XYrfJ4b9XzQcV; Thu, 24 Oct 2024 03:16:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49O3G8We043917; Thu, 24 Oct 2024 03:16:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49O3G8gQ043914; Thu, 24 Oct 2024 03:16:08 GMT (envelope-from git) Date: Thu, 24 Oct 2024 03:16:08 GMT Message-Id: <202410240316.49O3G8gQ043914@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 3360a15898ce - main - net: route: convert routing statistics to a sysctl 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3360a15898ce6cd06aad5afd9b48c8a5454cf952 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=3360a15898ce6cd06aad5afd9b48c8a5454cf952 commit 3360a15898ce6cd06aad5afd9b48c8a5454cf952 Author: Kyle Evans AuthorDate: 2024-10-24 03:15:55 +0000 Commit: Kyle Evans CommitDate: 2024-10-24 03:15:55 +0000 net: route: convert routing statistics to a sysctl Exporting the relevant pcpustat is trivial, so let's do that. We will use it in a near-future change in netstat to avoid having to dig around in mem(4) for live kernel statistics. Differential Revision: https://reviews.freebsd.org/D47231 --- sys/net/route.c | 4 ++++ sys/net/route.h | 1 + 2 files changed, 5 insertions(+) diff --git a/sys/net/route.c b/sys/net/route.c index 650da826d89d..7a50bcc43e06 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -75,6 +75,10 @@ VNET_PCPUSTAT_SYSINIT(rtstat); VNET_PCPUSTAT_SYSUNINIT(rtstat); #endif +SYSCTL_DECL(_net_route); +SYSCTL_VNET_PCPUSTAT(_net_route, OID_AUTO, stats, struct rtstat, + rtstat, "route statistics"); + EVENTHANDLER_LIST_DEFINE(rt_addrmsg); static int rt_ifdelroute(const struct rtentry *rt, const struct nhop_object *, diff --git a/sys/net/route.h b/sys/net/route.h index 6d28f21e9181..603e4fac5354 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -239,6 +239,7 @@ struct rtstat { uint64_t rts_add_retry; /* # of route addition retries */ uint64_t rts_del_failure; /* # of route deletion failure */ uint64_t rts_del_retry; /* # of route deletion retries */ + uint64_t rts_spare[5]; }; /*