From nobody Fri Oct 4 15:56:59 2024 X-Original-To: dev-commits-src-branches@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 4XKtTR3ccyz5Xy2p; Fri, 04 Oct 2024 15:56:59 +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 4XKtTR2nzMz40qQ; Fri, 4 Oct 2024 15:56:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728057419; 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=qF901b3462kKdYStOAqfzovyg7ISG6ktbFXM9UhEhnI=; b=h3hGFJmFg4JQ9v20+tdzrbgncKtOmJCjhfw2m5hh22iSefuazEJm9ru2CPo8EW1x1lFlf+ 4913AGv65YI43vLo6hz2vnuigFitO0JbS9m7M8fSg12g5reQbe5I0GAnHNVYUqmf6JjGa7 nQBgZcqx9WpcrIKOEqXMZqogXb0MnwAxzzRBNYKTa6EmtJVVGJMWKqRpnXiC7XhA35RocP B4VoboRP4aHrZIPq1RJC/Nm62hlBsXzowQB8rPXQ8uIvIWAsSreF0+O5WeSpcmjAlQqoF+ I3EsqOeTP05anE7qsY9mcAkBM6QpbMlOT0M8IZbFRcfQInA2/YUivo2k0sqO+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728057419; 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=qF901b3462kKdYStOAqfzovyg7ISG6ktbFXM9UhEhnI=; b=YdohVXGrxCyDmH+ry4zt36LZ6EtLGHTXYoPm/uHgzWc+uRzhOUALisEFIdt0UWxJjp9I8W KpU+FflhMfQK3G83SarrDe+T5iV63i+DPXJfDPAUJ7EOYnUbLxVCqWz7YkOpsSm8DGsb4f UkFvqfJjLSwMnWILV86GL3JxhOSA7yv8cy/RG8norLgjul7ZWhrGFDECREQIugY6/YB+2F ZnLoGLqksWdBrTbyP0vcLUQJIi/OHB4U122PKbMvwoh8O/SzeugmkSrBkgiV3pi9vP3zRT f2DEkPsnAsL9g7irTuxg8UtsKWcMsxLbNX+jjtm84sx/86Enn6WAnEWNsQ8Qrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728057419; a=rsa-sha256; cv=none; b=Ic7/Pv7CP/Hl6VfUU6La3n6J2dpdIZOsYqW9efjwJxXWfmuX4moymQ0tCOi3YCPr7fbbgs 0uottFKtIN1oQFLaLyrVBC0Y9f2N1izFAKCXXIMxc54onI0OShvlF4ND20z6KNWKvMzl0o u0Fpui3D8Y7zXgJVKObxrCuf3hUSKiOm/8ibVjOo9OzTG430FxCv3CkBTQNq5zEcNGPsFt AZWX725ymI//wm6dhdkWwn5WECcmYQBwzl+dBA34MJnZ+WNrWnQ7jhHoAVxaoP1abfQ6KH 5jMZxWooHmE1OM5HgZWQ6bhnl5J39yQLEGpk95y73km3ATtCcOyfUZIrJxcR7w== 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 4XKtTR2N3mzhFx; Fri, 4 Oct 2024 15:56:59 +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 494FuxNR048279; Fri, 4 Oct 2024 15:56:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 494FuxO7048276; Fri, 4 Oct 2024 15:56:59 GMT (envelope-from git) Date: Fri, 4 Oct 2024 15:56:59 GMT Message-Id: <202410041556.494FuxO7048276@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 893caa2ab166 - stable/14 - netmap: Make the memory ops function pointer table const List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 893caa2ab166b8d6428483172bcd61156407652f Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=893caa2ab166b8d6428483172bcd61156407652f commit 893caa2ab166b8d6428483172bcd61156407652f Author: Mark Johnston AuthorDate: 2024-09-19 09:56:30 +0000 Commit: Mark Johnston CommitDate: 2024-10-04 15:56:42 +0000 netmap: Make the memory ops function pointer table const No functional change intended. Reviewed by: vmaffione MFC after: 2 weeks Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D46664 (cherry picked from commit 1ae4951ba7bb203d9a29892792960f0869759d35) --- sys/dev/netmap/netmap_mem2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/netmap/netmap_mem2.c b/sys/dev/netmap/netmap_mem2.c index 23954b377f9b..1ba966e7666a 100644 --- a/sys/dev/netmap/netmap_mem2.c +++ b/sys/dev/netmap/netmap_mem2.c @@ -179,7 +179,7 @@ struct netmap_mem_d { /* list of all existing allocators, sorted by nm_id */ struct netmap_mem_d *prev, *next; - struct netmap_mem_ops *ops; + const struct netmap_mem_ops *ops; struct netmap_obj_params params[NETMAP_POOLS_NR]; @@ -533,7 +533,7 @@ static struct netmap_obj_params netmap_min_priv_params[NETMAP_POOLS_NR] = { * running in netmap mode. * Virtual (VALE) ports will have each its own allocator. */ -extern struct netmap_mem_ops netmap_mem_global_ops; /* forward */ +extern const struct netmap_mem_ops netmap_mem_global_ops; /* forward */ struct netmap_mem_d nm_mem = { /* Our memory allocator. */ .pools = { [NETMAP_IF_POOL] = { @@ -1670,7 +1670,7 @@ error: */ static void * _netmap_mem_private_new(size_t size, struct netmap_obj_params *p, int grp_id, - struct netmap_mem_ops *ops, uint64_t memtotal, int *perr) + const struct netmap_mem_ops *ops, uint64_t memtotal, int *perr) { struct netmap_mem_d *d = NULL; int i, err = 0; @@ -2177,7 +2177,7 @@ netmap_mem2_deref(struct netmap_mem_d *nmd, struct netmap_adapter *na) } -struct netmap_mem_ops netmap_mem_global_ops = { +const struct netmap_mem_ops netmap_mem_global_ops = { .nmd_get_lut = netmap_mem2_get_lut, .nmd_get_info = netmap_mem2_get_info, .nmd_ofstophys = netmap_mem2_ofstophys,