From nobody Mon Aug 29 18:12:31 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 4MGdnq3myYz4bcTN; Mon, 29 Aug 2022 18:12:31 +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 4MGdnq3M3Dz3WSy; Mon, 29 Aug 2022 18:12:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661796751; 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=Yl8dqAW+Cf877sm3c3+/ulmseJVbYDgXfVmQyb7Mns8=; b=OS2AdwrndWIY/JCYb7VMI8upalD7X1dGh8q8B3/GA3JP0BgfxeqUqEd4sU2SdVNb/w7Aom GwWOoUbB039mraMgyp+GRHE9V1lT16pcteeNLlroFNN8fqv2bJJzkJeJeINSBP9/yHsMqe PuWClM6df+gozUGXzgywlH71A4GM3YDPkkYz2P3U+H6vSKDg/6dBfGrsdtLiEFHegUPpi7 bh8cHRGoe0GZQGH7ldF6XVHN3rE9Wz9r/N5VDx5jHa6yBqSwvJCcW1JgSuW+7rBC2FQsQN yG9Z+Of+ptW7kkkEzsiKWb+M46GdHGtBQ2YzYfJFBoRgurUkyHO+C+6YYV31ow== 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 4MGdnq2QPVzWd8; Mon, 29 Aug 2022 18:12:31 +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 27TICVMf000523; Mon, 29 Aug 2022 18:12:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27TICVQA000522; Mon, 29 Aug 2022 18:12:31 GMT (envelope-from git) Date: Mon, 29 Aug 2022 18:12:31 GMT Message-Id: <202208291812.27TICVQA000522@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: 177f04d57fbd - main - routing: constantify @rc in rib_decompose_notification(). 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: 177f04d57fbdb1c18ed845e19cc9b902c8b65312 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661796751; 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=Yl8dqAW+Cf877sm3c3+/ulmseJVbYDgXfVmQyb7Mns8=; b=oa71IeM3O2WDR/wdrlO6IjBW/DJqE9OD3sDYsh10nx7BlddopRIv0YLR2FMPgOjlwa4PtU OKsfvk8tNqaOAB2gMijiNwpck2f0v+37y4faixN9mrnf6v2hdcVJhq7GS4FTo/IwPjUrWC g78poqXRKgze++pPIfIAgpujkc5hdG7q59BhFenOHUDM06Eae7Fd75N3Gw1bPxwdCqhLGn l4HobY7InZj8RGvHvE6nh+B59qr6Kp+p2ZQKw8SH1BOWCAFKoWwwH/e4/CfqFvkm8J3uaP n6wkbqHytbrtNHUAYOTwmL7ZHapXSmvAm1M6C9xELViYgvF8DYRhh4XZJBn+DA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661796751; a=rsa-sha256; cv=none; b=laC2jmUWbfNwkHmIelHzIn6AuK8LeT5K3I/qMeNRCcxiD/mOuLL4yWo/a8iV/lQOO8O1w5 fCpHtk9VlIEp7YxWjJIEb2dBPH+ZH73wsKnl3ZTOPGrwCRL8o8yMmW+HoTGEpbEJvDkmMF VhuVTs60gsRmiWz2G18UMc6VJd8fJiViV8AVUQM8Qcx8sqciPU3aHjF8h/Fzw7PUewpbTF ruMp6+65S22eCu0Fba0LzQQqEI8z3lrL75NDMYrvUZl+DtjxJXXVOMw4ggTOMWqMQiK2Bu lRCXuRPc2L0MXBAHmHm3AhPSZ1Qu3b3AVT2CujvuVGcdRMe/oDV3eemCB/et0A== 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=177f04d57fbdb1c18ed845e19cc9b902c8b65312 commit 177f04d57fbdb1c18ed845e19cc9b902c8b65312 Author: Alexander V. Chernikov AuthorDate: 2022-08-29 18:10:21 +0000 Commit: Alexander V. Chernikov CommitDate: 2022-08-29 18:12:24 +0000 routing: constantify @rc in rib_decompose_notification(). Clarify the @rc immutability by explicitly marking @rc const. MFC after: 2 weeks --- sys/net/route/route_ctl.h | 4 ++-- sys/net/route/route_helpers.c | 4 ++-- sys/net/rtsock.c | 4 ++-- sys/netinet6/nd6.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/net/route/route_ctl.h b/sys/net/route/route_ctl.h index e73a6dcf8a93..0b331e5f7d2c 100644 --- a/sys/net/route/route_ctl.h +++ b/sys/net/route/route_ctl.h @@ -82,8 +82,8 @@ int rib_handle_ifaddr_info(uint32_t fibnum, int cmd, struct rt_addrinfo *info); int rib_add_default_route(uint32_t fibnum, int family, struct ifnet *ifp, struct sockaddr *gw, struct rib_cmd_info *rc); -typedef void route_notification_t(struct rib_cmd_info *rc, void *); -void rib_decompose_notification(struct rib_cmd_info *rc, +typedef void route_notification_t(const struct rib_cmd_info *rc, void *); +void rib_decompose_notification(const struct rib_cmd_info *rc, route_notification_t *cb, void *cbdata); int rib_add_redirect(u_int fibnum, struct sockaddr *dst, diff --git a/sys/net/route/route_helpers.c b/sys/net/route/route_helpers.c index fe503db368ce..465e0de81882 100644 --- a/sys/net/route/route_helpers.c +++ b/sys/net/route/route_helpers.c @@ -292,7 +292,7 @@ notify_del(struct rib_cmd_info *rc, const struct weightened_nhop *wn_src, } static void -decompose_change_notification(struct rib_cmd_info *rc, route_notification_t *cb, +decompose_change_notification(const struct rib_cmd_info *rc, route_notification_t *cb, void *cbdata) { uint32_t num_old, num_new; @@ -379,7 +379,7 @@ decompose_change_notification(struct rib_cmd_info *rc, route_notification_t *cb, * Assumes at least one of the nexthops in @rc is multipath. */ void -rib_decompose_notification(struct rib_cmd_info *rc, route_notification_t *cb, +rib_decompose_notification(const struct rib_cmd_info *rc, route_notification_t *cb, void *cbdata) { const struct weightened_nhop *wn; diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 1ddb72d926b9..91ad8c79a5eb 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -935,7 +935,7 @@ update_rtm_from_rc(struct rt_addrinfo *info, struct rt_msghdr **prtm, #ifdef ROUTE_MPATH static void -save_del_notification(struct rib_cmd_info *rc, void *_cbdata) +save_del_notification(const struct rib_cmd_info *rc, void *_cbdata) { struct rib_cmd_info *rc_new = (struct rib_cmd_info *)_cbdata; @@ -944,7 +944,7 @@ save_del_notification(struct rib_cmd_info *rc, void *_cbdata) } static void -save_add_notification(struct rib_cmd_info *rc, void *_cbdata) +save_add_notification(const struct rib_cmd_info *rc, void *_cbdata) { struct rib_cmd_info *rc_new = (struct rib_cmd_info *)_cbdata; diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 0382b1525d4a..84af00eabaac 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1591,7 +1591,7 @@ nd6_free_redirect(const struct llentry *ln) * Updates status of the default router route. */ static void -check_release_defrouter(struct rib_cmd_info *rc, void *_cbdata) +check_release_defrouter(const struct rib_cmd_info *rc, void *_cbdata) { struct nd_defrouter *dr; struct nhop_object *nh;