From patchwork Mon Feb 5 07:20:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunwu Chan X-Patchwork-Id: 196650 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp720031dyb; Sun, 4 Feb 2024 23:32:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IGXdmxZWcv1Bn2lg2tW3FPQaKaZgPjtFJrpC9OMpFFjjCEe2FF/p6j17wEYKJcPbGQ67ncn X-Received: by 2002:a17:906:2011:b0:a37:31c2:773a with SMTP id 17-20020a170906201100b00a3731c2773amr4297749ejo.0.1707118352450; Sun, 04 Feb 2024 23:32:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707118352; cv=pass; d=google.com; s=arc-20160816; b=fk42Kbeiw9pNya7zbGOKenGhcfRSCwQt/GHOlEkv2K48o+VIzcIdHuUG+8QsamiinX evxkL/74dOOuh/WtiM3G25w5K9YWL/VW+/GRzQ7BevqJ3x8Ds7DFLcI9hPigxXfKYutJ xBjjq+e/yZQt/y+Bsfc4NS75cYe2Muh4FSXnEbXOpuGLeT2ruk1W+6dkPlhSlUNmcLie o4pwv9u2kzw95KwOheMqUx3fnerZo/R3cIqp5X60fUa4Os65vmI9oUh0qnGdPX+Yygwx sgs86HEj09xCpxExDw83JdLI9Fj2+fTjzYVU7aDAAoe5jOdKyUYxKHHatutArBks3m4O KCmA== 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=hpZO6A3lPr1oFZw5lfYcFlbHBV3BShm+nyWvnpS8A/0=; fh=rs8DE78AyHsvnys7DQtjach07uFaUGle4304996SrYI=; b=XPQd0sZ/bSK6lRrAN6Bzmqp5PoxDtqwepbh2qq5YEV5zKOaZbXmAIImYav4c6h3KkP VKJqrZzUFpgXgNY4yqOimIZEGy0awnuPqcrSsK6+JFtIcXfGfMAPqEvC4y2sOCqLHd48 4s1tLrYOnOkloURkydv6EsE6SZXl+C003bJFkErRq5S1gNDWP6JyY6P2ZWxDpXMoGuZY dVh+lM9zdg598+fzXAq5Sv2nk7cZJSfS6OuuT/3cE0W6Wmyf4xvQxqkXY2ARQiOG4SuM sSvOWvkijRa6a2YXGqswQPIwQBf6pE55bINicOx8cyjlUq9N9U+1+KSoobRIxJEjZqNt lLeQ==; 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-52127-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52127-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCVqoi01/ap1srQ2fftk7t/LwLoxAub8z2IMM1uKTg++ODVAHzaOpt5TCqnp5/pTHXUEO9gUQZwaufJRdYx8fIFAfKe86Q== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id l6-20020a170906414600b00a37be23c735si746476ejk.434.2024.02.04.23.32.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 23:32:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52127-ouuuleilei=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-52127-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52127-ouuuleilei=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 4F17E1F2559E for ; Mon, 5 Feb 2024 07:22:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 90ADA13FE7; Mon, 5 Feb 2024 07:20:49 +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 4C37C12E73; Mon, 5 Feb 2024 07:20:44 +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=1707117647; cv=none; b=EDCBBHih3hMk9ARznODPjIba1+MHKuuDv6bxGmLc9MhtoNykZw5DzWsMEsLW9cAxXkbFAQfbfgyUlGTi9T22vR23IfhBeAT9YuXZhRckHfOByuApLlxMtMxoiGJPfhFV6T8bJ9UtK/5LCi87TWf8KJWpsBhj3m7VG8JR/2NrW2M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707117647; c=relaxed/simple; bh=k6Zn+/rUFV8ZYijFcqy7Xv2FOiKYO2DWsKSu3lTTGh4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BHrw/lyxjTxpbE2oifZgJeUVvNI/8/3HViMazPj1wEndXz7klEopnNFBiHSxU+wav+fu0ZOzC7vUIVrG+ufWFZJ0V1Qx1Bk45Y//yWYQuPMABksU8N3GY3beTE77TGiwAE9OcPTwAEc8xtNftVbNJGAU+gnLZx965zDtCub4kIo= 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: 11b7df22684942e3a304abe1199f6ce1-20240205 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:c67de021-7fef-4294-98f9-f2e0ec74004c,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:c67de021-7fef-4294-98f9-f2e0ec74004c,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:76d12080-4f93-4875-95e7-8c66ea833d57,B ulkID:240205152042EC5T5IF3,BulkQuantity:0,Recheck:0,SF:17|19|44|66|38|24|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_SNR,TF_CID_SPAM_FAS,TF_CID_SPAM_FSD,TF_CID_SPAM_FSI X-UUID: 11b7df22684942e3a304abe1199f6ce1-20240205 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 1182238079; Mon, 05 Feb 2024 15:20:40 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id 1411BE000EBC; Mon, 5 Feb 2024 15:20:40 +0800 (CST) X-ns-mid: postfix-65C08C47-86855474 Received: from kernel.. (unknown [172.20.15.254]) by mail.kylinos.cn (NSMail) with ESMTPA id 5E90BE000EBC; Mon, 5 Feb 2024 15:20:39 +0800 (CST) From: Kunwu Chan To: davem@davemloft.net, dsahern@kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, jiri@resnulli.us Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kunwu Chan Subject: [PATCH net-next 2/6] ip6mr: Simplify the allocation of slab caches in ip6_mr_init Date: Mon, 5 Feb 2024 15:20:09 +0800 Message-Id: <20240205072013.427639-3-chentao@kylinos.cn> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240205072013.427639-1-chentao@kylinos.cn> References: <20240205072013.427639-1-chentao@kylinos.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790043333494967255 X-GMAIL-MSGID: 1790043333494967255 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 --- 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; - mrt_cachep = kmem_cache_create("ip6_mrt_cache", - sizeof(struct mfc6_cache), - 0, SLAB_HWCACHE_ALIGN, - NULL); + mrt_cachep = KMEM_CACHE(mfc6_cache, SLAB_HWCACHE_ALIGN); if (!mrt_cachep) return -ENOMEM;