Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1592848rdb; Tue, 20 Feb 2024 00:26:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWEDvsx7s3rKVSqIjSljfS+mLCwl8xsfeMYR/piYhLXPQlN1anHrvsCqkFHcWb5CCepiekmmSNzgYuJVxChFgzaUg2nRjrQ3tCgz41LZg== X-Google-Smtp-Source: AGHT+IGv4/jX+qPO+RkyJbrr8cLFyGxxNSQV54lgySGx+B6D1jkFTZPmhOyZWYbRgLpup8f/3vP/ X-Received: by 2002:aa7:dd12:0:b0:564:5604:57ca with SMTP id i18-20020aa7dd12000000b00564560457camr4238337edv.31.1708417594005; Tue, 20 Feb 2024 00:26:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708417593; cv=pass; d=google.com; s=arc-20160816; b=ZhnNDcHtkLPkQIDSNJzSKABOUE+107b96iGpI3i4CtldWYrNx3PpWDoVKiURX6gGFr tDAtOv22s+W8ibDmpO7wn8NXigHrL7Y4UQrLzYyc++GV7O/FHKP/DSsrdFsH9b8MjTRV xATeNBhPQQ9nZJYdY3M9UGAnSySYR2Oq8Bm99XYBveOLbEe/sn8wFsx2HgfIL1UL046I Ul0CS7x0VpTTcNoaHH/6vj9sVN8vUx3r2wiRqF+JIoh9LdIXuiosIf/gxxFl6pxDIYxO 0lLSY+uAmIjkyTxpvTxnQiOAiB9kfG6zzxmmBj2pJprbY1E3ik4DbGUXNMFY8oACL+Mr tENQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=Q0khYQe1TZCkRGXvYEjKXmEsLXr+SYGVWcmHfzOfy/w=; fh=wev17V6zO4SsTygeysrUJquweJVSB4bTv6PRUfTqFGg=; b=jMUJ4ErVHNbastHZ/4YGh3UASoXNaVffR+/BuyXk7cdtp4IWoEHTwq56XgJqN1Q8PN Zec2EOmGFO+aPRJNTn0DIFcqFIcabNfkHAQQYsowPP9qUH9zAFjo+ctcNh0V9PbW+vZV wMWkK7AW6NKj94YLV0bj4VWGV32JMnN7vjlid5JtLu2vXZqw+mZqoKmPdWHuA3PdQpLs 6QnaFZGGV11U2o6uZt39opN/0cYcWBLR2AV1FftOJ8KkH9pzazt2Gzwy8aKib13AUNwm 4snlWVDhB8lDfeo6UnM3V2cMXSslUM8Vpp1etYT+WRLBwobpJaLI6u4LEXOZ3IsZGIwi VYMA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-72548-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72548-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id y7-20020a056402358700b00563e74ef3edsi3175504edc.576.2024.02.20.00.26.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 00:26:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72548-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-72548-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72548-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 879DF1F21A09 for ; Tue, 20 Feb 2024 08:26:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8F5465CDC6; Tue, 20 Feb 2024 08:25:09 +0000 (UTC) Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C0EA5C8E2; Tue, 20 Feb 2024 08:25:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=124.126.103.232 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708417509; cv=none; b=hj/R316k7lmbCpzuGRA5FvxtHrSPLKIFoKHHxKK0X9J9ToFmwe5NJbwTLSYBftpTbXXB3R6JOthz72823kFh1xwXZMCLkMqkr+qJ/YqjhjWsdp+587p5SmwQBDFm66QHWcQjmL1gBAVd14gzYPjnSE+pUIeVLspdThGSjVyInpw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708417509; c=relaxed/simple; bh=+gpIKjjNe8+R+5iRvhPGIqKmtaT2w4KlGI3vBCIRKEA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=u0O1PFt941LM96sU8VlV5aM/Dd7jzRI5BpGw+f4G5umSB8QWnS9m7KMkst0hvlprSQD3Cdn4co95laNuhLZ0t9LbySRkFGqZ4QgxCzn2OQHaRg4M82vBgy2PxuOWQLAQpIoMxnsR3Vmh+epr2nmUfoVLT20OBH5Swgmj6I3/xHg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn; spf=pass smtp.mailfrom=kylinos.cn; arc=none smtp.client-ip=124.126.103.232 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: cbb1d3fac0944f1897f3f03419695c7f-20240220 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:530f3a93-76a3-4c1c-965c-e43fbf8c287c,IP:10, URL:0,TC:0,Content:0,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTI ON:release,TS:-5 X-CID-INFO: VERSION:1.1.35,REQID:530f3a93-76a3-4c1c-965c-e43fbf8c287c,IP:10,UR L:0,TC:0,Content:0,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:5d391d7,CLOUDID:5ef67e8f-e2c0-40b0-a8fe-7c7e47299109,B ulkID:240220153655OTY0JWRP,BulkQuantity:0,Recheck:0,SF:44|66|38|24|17|19|1 02,TC:nil,Content:0,EDM:-3,IP:-2,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,CO L:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_FSI,TF_CID_SPAM_SNR,TF_CID_SPAM_FAS,TF_CID_SPAM_FSD X-UUID: cbb1d3fac0944f1897f3f03419695c7f-20240220 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 1545208456; Tue, 20 Feb 2024 15:36:53 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id 5BFFDE000EBC; Tue, 20 Feb 2024 15:36:53 +0800 (CST) X-ns-mid: postfix-65D45695-20178919 Received: from kernel.. (unknown [172.20.15.254]) by mail.kylinos.cn (NSMail) with ESMTPA id 9590BE000EBD; Tue, 20 Feb 2024 15:36:52 +0800 (CST) From: Kunwu Chan To: davem@davemloft.net, dsahern@kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, jiri@resnulli.us, Kunwu Chan , Michal Swiatkowski Subject: [PATCH net-next v2 2/5] ip6mr: Simplify the allocation of slab caches in ip6_mr_init Date: Tue, 20 Feb 2024 15:36:43 +0800 Message-Id: <20240220073646.102033-3-chentao@kylinos.cn> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240220073646.102033-1-chentao@kylinos.cn> References: <20240220073646.102033-1-chentao@kylinos.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. And change cache name from 'ip6_mrt_cache' to 'mfc6_cache'. Signed-off-by: Kunwu Chan Reviewed-by: Michal Swiatkowski --- net/ipv6/ip6mr.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 9782c180fee6..1f19743f2540 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c @@ -1373,10 +1373,7 @@ int __init ip6_mr_init(void) { int err; =20 - mrt_cachep =3D kmem_cache_create("ip6_mrt_cache", - sizeof(struct mfc6_cache), - 0, SLAB_HWCACHE_ALIGN, - NULL); + mrt_cachep =3D KMEM_CACHE(mfc6_cache, SLAB_HWCACHE_ALIGN); if (!mrt_cachep) return -ENOMEM; =20 --=20 2.39.2