From nobody Thu Sep 19 09:57:24 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 4X8WCS37gGz5Vng8; Thu, 19 Sep 2024 09:57:24 +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 4X8WCS1rpMz4SCL; Thu, 19 Sep 2024 09:57:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726739844; 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=GhDfCwz7AgFzlawxwhjiilv8K2mSMUI+rikxS9KLlPc=; b=NyCgoVEGGQx371Xm4O4HNc9g+S86vHiHs0VUcDwZlBobKqVIgXqOE3St9c+bgUueloBfh7 5jM0rAzUs/RGjQ6mU7WBBJW0blmVmw0j7GdKyIrLhZbClH9WnxnCcBV5DpSr/0o+ENhZhn SLhDlS1/fm6wAfx9EZMmI9wxvWDQcPDHfX/Ku5EIKoyJzAngQ8/HC706MG9MwXAwMiaux8 K+yDy3xmrPPfoFfmITZqm++W7Sq2ZN613egtLUvL5Bsqnxzd5yy6ltnxqEmLuHCXnSaK3d sqbJtNS1xUVv4aMaRGm/XfdqSGV209j30/LqYnHacAlnNH3rkp2xWISoE7jWsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726739844; a=rsa-sha256; cv=none; b=Ep64KpjKO3x6DEL1XsUR7NMFKI0unD84jl380zk1kgi/fpf2hFwpO1ic98WJUyI1uZ7HFe BZ++QAdI0x7ZRnWuwAyxVBJuQqL/0CPtPwjTr3ckLc6FcmRY6Wc/YWtWeqSAXGQW83fDbm DLEPytqsiS9AIuMTMXkcJX52tecDKggAuiwnakCnulUyKTZG82pt9oexjmt3sb0TPyRqO0 ks86QkIEwh/BJTPh7EUBDZHzxRiK7HTMJzvOHCjI/fm0KITrYHeVNNGoPQRTiTZRaQl48g lUDxU6fS/UGOTpa9oUm5bUxdqqnHF2S3eJjsa0uhwCC55SWdzz6c3EatiVszEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726739844; 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=GhDfCwz7AgFzlawxwhjiilv8K2mSMUI+rikxS9KLlPc=; b=ZlqmfQi3UCGv5KIIQKTxHA3fRLX1Owt3fvxy0+d8K+QmGslejawmB6RVWX0DHiX1cjPafs UnlLTeUfUF93t0WZQpFwsik8i04FQE6fw0vxuZ8UNng/ypzr0SxJzwSRFt/bi4w9AaGRK3 u0fKX7Ux9NrZXF1PC8BbjOLwAsioq3ybO5OQI/QMWG/Wx7UbmAClu1SvVoUrpWhD3W6q7f lkBNVb8tsblJFRhhIOjD5IOfMoPnvmGyeHUQI0CoLdJ6FCHHtmvQlPRXi1GmXHF4eNAXP5 6LwRPqdFQXu52rfbYSpViMRrtc1uOvaB0Wyhi32C1oEEas6r3If0KM67RVXPTg== 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 4X8WCS0w0Zz11Kj; Thu, 19 Sep 2024 09:57:24 +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 48J9vOKu076211; Thu, 19 Sep 2024 09:57:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48J9vO4P076208; Thu, 19 Sep 2024 09:57:24 GMT (envelope-from git) Date: Thu, 19 Sep 2024 09:57:24 GMT Message-Id: <202409190957.48J9vO4P076208@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 1ae4951ba7bb - main - netmap: Make the memory ops function pointer table const 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ae4951ba7bb203d9a29892792960f0869759d35 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1ae4951ba7bb203d9a29892792960f0869759d35 commit 1ae4951ba7bb203d9a29892792960f0869759d35 Author: Mark Johnston AuthorDate: 2024-09-19 09:56:30 +0000 Commit: Mark Johnston CommitDate: 2024-09-19 09:56:30 +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 --- 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 473b252e7329..3cd3422b10ce 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] = { @@ -1667,7 +1667,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; @@ -2174,7 +2174,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,