From nobody Thu Sep 08 10:22:24 2022 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 4MNZtn1v7Jz4blRx; Thu, 8 Sep 2022 10:22:25 +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 4MNZtn1Pr7z3xMc; Thu, 8 Sep 2022 10:22:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662632545; 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=QwlTxXFYU1l/QbUeid+Zirg4qwZcVdgrzI0yWb+dzc4=; b=pTDOV2yPo090alFNdzNoF73tvTINgDDIqZkZ+MPig+8zCeuTLYRkp2lEQaIiIjHD9sicvX phnjhu7UzvaIJxPWfLJAhjX0FEpsAPM/5pVbwXZeeAnx6kCt64d7XqFgvzeAX4E7FUokre ZTS4nWF1t2C/u7S1TRa3KuUKlCPAelYmrYgD51X3qG9QnHUZ7dfQ3VknSGGAfCe0BjgSuG EiXdmpsIbw3jH5AioEbmP9JdJO9RkmYkiFG3274Ckv8tLkfWkxFAJYYLrV5XOcxufLmgzw 1mA20/7W5kNs+7DUktm2mXJCdsAAxQQ9hPR0Cp33ez5HaQ2pSJ2I7QLOraPVLg== 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 4MNZtn0SHCzrDW; Thu, 8 Sep 2022 10:22:25 +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 288AMOBi035918; Thu, 8 Sep 2022 10:22:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 288AMO2X035917; Thu, 8 Sep 2022 10:22:24 GMT (envelope-from git) Date: Thu, 8 Sep 2022 10:22:24 GMT Message-Id: <202209081022.288AMO2X035917@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: e7624170772d - main - 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/main X-Git-Reftype: branch X-Git-Commit: e7624170772d28c89e841b817634666bbc658ffd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662632545; 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=QwlTxXFYU1l/QbUeid+Zirg4qwZcVdgrzI0yWb+dzc4=; b=hk4N5pQGY4Nev6RsXCfl2P/2+yYGay+5bh8964WLU2amC5xYLKPiFAVEdR8Jz/CnW1qr8G mbKFmfhqm9u5fbt2CgYcL/oezeZv1LLVzQeZnmSpwyLNLI/NEQcBIqRhwxzGK4yoR44K5o GZCt25PWC90jF4zoPxksVUULibpqhAnhvdzRkU4kYCC/aK5mZ2GvRR8LG1bBt5po+6ZFUD dAR37OiA9kUjnlQmTCt5pBf9jgT2M7yRnUl/AZye8uYoUhYF80MOTyYnxx0OHByZ6a1cP+ ysXeHvKNyJonEgeYpzE4LA6oe4rIuTGMSITXCw/tmsN+ckTwbgNvhizfdNf3NA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662632545; a=rsa-sha256; cv=none; b=uLQIv2yGSxV+05pCjc57fGxry2iHHJazTpWqcZoHM1ER4aUwtVRl/7fgfUzcykepT93wMx k/mvu1lFgsq/x17XaQBuCtrYjLkVlQInBDoyZ6gOPCxkRuwGqVxK1huFvMrINpzZHcHyl/ JvFO89Y/hbFKTuz1wbk2tncg9vmD2rkplfSsUY4jVHfVPxbZoIWLdD4lPAdbMPkENV7cc9 /hpCVq4eKGlBHpLLy0gOeB7Z9GxNIMxcEaCY+7vNGR3wkvGUXDIkxyspzx5NGGeRrmApxL 1cfpaYY/jjUE7aeGCwOmFdAxhW2buItHJzmY5NNPtZtrWGIM0IlTVZ7F3R0WLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=e7624170772d28c89e841b817634666bbc658ffd commit e7624170772d28c89e841b817634666bbc658ffd Author: Alexander V. Chernikov AuthorDate: 2022-09-08 10:21:25 +0000 Commit: Alexander V. Chernikov CommitDate: 2022-09-08 10:21:25 +0000 routing: constantify nh/nhg argument in _get_origin(). MFC after: 1 month --- 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); }