From nobody Fri Jan 13 21:25:56 2023 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 4Ntvbn00fCz2qlWJ; Fri, 13 Jan 2023 21:25:57 +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 4Ntvbm5mp2z44ML; Fri, 13 Jan 2023 21:25:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673645156; 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=BStyuZmLALAfsKSw7gbofkoK4CKzbjfPzN1CxrP54vY=; b=ubGu9n+NU+0DFIr2xrfN8zAIUrWC04Dda+zvM9RH4zL89wcQMdc7ff87QsLrn4lK4XL2zw 5fZjN2XS30AGcPa21RS5d1eY3F2KU5pjJxrPa8sGMWE5Ae+GgtJL8m/SjsAGPf6C63H+yB 4a0QfpRhJadmOyseXQP3KCwvdN1WygpgJ5T2gAX9DT0Dj3x+5wELkRQKKCfEpJGvEVWReS /SS8jF7jtJlr5qt4Oy1weapu4Xq6cg3AYNw1+wJJ7O8bjkPeoAIi5lKPFlX94ljPv780eq g6jud2GZ/sQ9XC+Uc0ioUYQm2TSQZt0u5zyx6H0S3uc8VesL7mJ+3MSkhnASTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673645156; 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=BStyuZmLALAfsKSw7gbofkoK4CKzbjfPzN1CxrP54vY=; b=wULx8nbSYuDT1vyZLFsgEYlSH/ynHWAT5Kk8PdSH7/cCmLlkwtP7IuXbRlLz9lPCcpLhDh bR7Rrfp3nKpu54SGsF/snOXZEpemlHutusDqZ+W6TR5UhPygN79J7x6Y1LG4uRRNHZYmim P4WjLksETEm6Sd3sQJG+7rihBc+GOHbNv3cBPC9y3hHMZQA3HKruViyIca33dmTgoS8Yql gIvwuDna2MaDaKQuwUQyvj0YYAHJTHJcuSywcSTN6jEcROvVxvMTE7SiEvEpJumSpzp97j IVCREI9/Fwlze6G9LQzOVj4EEgRv0uNttX5JsHGg9rnXK299Ljng6BgC2O+V1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673645156; a=rsa-sha256; cv=none; b=RM5Q9bEn5GwjDesCC9VGJnShFgRCjQt1c9kD+uGYPy1jT99omEIPUSJ34E4PuxFwmbermH qsZ0ougVd9LZIrEZaswJ+/F+skN4wUZWqaXvhOucmJ/e6v08TpmxnppmA3lIWjBxOBApnJ YfRt5vETY9vZq5x0wwZVXrRboVaZ0H8jnEKEMcB+m2EDjvOJEXAuhsHRRYXNs2q8y34cRt OiR4jBRFFZQfrKmB/X6wvObZ+drMtmq7nup6irjXssAht4pOz1SAIKTu5CGi9weUKIcdB6 E8KWbyR04znp/l6Y2QakNTYbcuL2Zbjih0P7vAZr19cwFZOPCeNXvYVwAjzZZQ== 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 4Ntvbm3XClzN2R; Fri, 13 Jan 2023 21:25:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30DLPume042549; Fri, 13 Jan 2023 21:25:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30DLPutv042548; Fri, 13 Jan 2023 21:25:56 GMT (envelope-from git) Date: Fri, 13 Jan 2023 21:25:56 GMT Message-Id: <202301132125.30DLPutv042548@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: ad1954ec9405 - stable/13 - routing: constantify nh/nhg argument in _get_origin(). 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ad1954ec94052117de465c2b1874759dc0499ad2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=ad1954ec94052117de465c2b1874759dc0499ad2 commit ad1954ec94052117de465c2b1874759dc0499ad2 Author: Alexander V. Chernikov AuthorDate: 2022-09-08 10:21:25 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-01-13 21:24:12 +0000 routing: constantify nh/nhg argument in _get_origin(). MFC after: 1 month (cherry picked from commit e7624170772d28c89e841b817634666bbc658ffd) --- sys/net/route/nhgrp_ctl.c | 4 ++-- sys/net/route/nhop.h | 4 ++-- sys/net/route/nhop_ctl.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/net/route/nhgrp_ctl.c b/sys/net/route/nhgrp_ctl.c index 06f46746be4b..842f9d5376bc 100644 --- a/sys/net/route/nhgrp_ctl.c +++ b/sys/net/route/nhgrp_ctl.c @@ -853,9 +853,9 @@ nhgrp_get_idx(const struct nhgrp_object *nhg) } uint8_t -nhgrp_get_origin(struct nhgrp_object *nhg) +nhgrp_get_origin(const struct nhgrp_object *nhg) { - return (NHGRP_PRIV(nhg)->nhg_origin); + return (NHGRP_PRIV_CONST(nhg)->nhg_origin); } void diff --git a/sys/net/route/nhop.h b/sys/net/route/nhop.h index 669284e0ac62..f0feccd6c0f2 100644 --- a/sys/net/route/nhop.h +++ b/sys/net/route/nhop.h @@ -205,7 +205,7 @@ void nhop_set_transmit_ifp(struct nhop_object *nh, struct ifnet *ifp); #define NH_ORIGIN_BOOT 3 /* kernel-originated routes at boot */ #define NH_ORIGIN_STATIC 4 /* route(8) routes */ void nhop_set_origin(struct nhop_object *nh, uint8_t origin); -uint8_t nhop_get_origin(struct nhop_object *nh); +uint8_t nhop_get_origin(const struct nhop_object *nh); uint32_t nhop_get_idx(const struct nhop_object *nh); uint32_t nhop_get_uidx(const struct nhop_object *nh); @@ -225,7 +225,7 @@ struct rib_head *nhop_get_rh(const struct nhop_object *nh); struct nhgrp_object; uint32_t nhgrp_get_uidx(const struct nhgrp_object *nhg); -uint8_t nhgrp_get_origin(struct nhgrp_object *nhg); +uint8_t nhgrp_get_origin(const struct nhgrp_object *nhg); void nhgrp_set_origin(struct nhgrp_object *nhg, uint8_t origin); #endif /* _KERNEL */ diff --git a/sys/net/route/nhop_ctl.c b/sys/net/route/nhop_ctl.c index 033a99acab1b..d5d921dd66c7 100644 --- a/sys/net/route/nhop_ctl.c +++ b/sys/net/route/nhop_ctl.c @@ -1013,7 +1013,7 @@ nhop_get_rh(const struct nhop_object *nh) } uint8_t -nhop_get_origin(struct nhop_object *nh) +nhop_get_origin(const struct nhop_object *nh) { return (nh->nh_priv->nh_origin); }