Message ID | 20240205072013.427639-7-chentao@kylinos.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-52131-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp719990dyb; Sun, 4 Feb 2024 23:32:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IEQHsSFKWeH/oxrsCj3o6GamxHJGO7DyfpPBlCXGBzthN1w+FLU+jrh8vxJbJdxpgvEe3z4 X-Received: by 2002:a17:906:560b:b0:a36:6dc6:d9c7 with SMTP id f11-20020a170906560b00b00a366dc6d9c7mr6268599ejq.4.1707118346476; Sun, 04 Feb 2024 23:32:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707118346; cv=pass; d=google.com; s=arc-20160816; b=0Qax4gAvHJ8cNWdsoksFB4o6F3sBlQw6bdWLtBODX6PwXxqz1laTYo3/0R8A81PIHC AcmfWl270ReoMwKspGX4xQnKIHOExrxeK6fD02GXawibPXCV/rUagXt34ISgG+sVT9Mb yURnB+Bu/537LFMrYLfoT8AOeUWGDpq9FO/4h8C2j0tn1z4vEC8cUxH5jxYrKaPx6vA/ bsz8yuXnzvLjmDudPAYSR+B3bN0l13qijNTJF5EMW7HXpNEL2Phz3f27QUqd4KOZcbno TK+Kt9psfh0JiMXBIFFB1qWAalHw0Uk2YDcVIgi7OgzeOoNiORpHF3vOoub/i24DQ89T dNRg== 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=DEWgvotS6LQ0EyK7fjKHmSKoTOAO5MS3ZNmibs2vv6c=; fh=ja+KLvaqEdqqjG+2x5deWd/5rDqyfKQdbX2cE+9Vkhk=; b=nGBbAlTPXtM6sqkY9i1aLUdoHvlmG4NmCaeRIsuC6RVzixW+vBOncpQgFHHolRM/0e U4wR36iwAJB0+JZxXwkalJ9MUXuhi4gD8PS2dE0QG8Cnhkgf8UcuI80RLuiI3MDLrGcG 3MItViuqn+XKRglIbpZQ1bdQ+MbgcTNeelRFU0OKFMoK89RrqkNwkiyfNVnpJ5A2LfFu EOPt22XjjQnMWEdsKIyTQzuW3Dor0+YiOOzJqYgaENWJUvdnG5lhYYolKmjJFI4phddO NE09tDjLJmycbPb0rRPf9mGiVrM9328UdCrkJhR5+mM/6rnu6wIi8PA/f2/QP9Ql/TSo U2rw==; 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-52131-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52131-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXGnXN17U9cxbWfRgVaAHAwZewxsmIZJElnnlh8da6u3hukbu7+lwVe0cYJUPxKstEMES3lNtUgPQhuCcrV9P939H4htQ== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c20-20020a170906529400b00a37b30c094asi908376ejm.705.2024.02.04.23.32.26 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 23:32:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52131-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-52131-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52131-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 4B99D1F25E00 for <ouuuleilei@gmail.com>; Mon, 5 Feb 2024 07:24:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E2127168DC; Mon, 5 Feb 2024 07:21:01 +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 3FEE6111A2; Mon, 5 Feb 2024 07:20:57 +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=1707117660; cv=none; b=QrVjTvFT31LurIGu3jsTRfrC7Ge2duwrXRGwkau/SbhW7HlAHx+73pXnHiXCqyOfWz3N8nlFr44H+HSB1jpMOuN5d0K2FAwuxzh/2uLIzUvwj9KbcMwHxjVpsAXL4vHjMZQqJtzq6F4ENhxbdKGj8JkrztRAlueA2EaMhe5c6uA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707117660; c=relaxed/simple; bh=2RPhHIO24rO7DrKNGK166qDpBMo7ED6D9CiaT+aa0kg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=slDNABwoIz4GBxsgzQfZGbg16AW1HvW8dRHKQgf2Mee4xJlsqdjUT2f9yVSEBv1GA9t2xAiFi8ncT7+b9aAoXHI+SlvKfnqh5fFzeZA9CYqqzHFMoAaj8YRxEL6H4LhEboOUzOPzC7KfH9uNm403Lg4M+XTjxR9qdNwZxxzgdqA= 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: 3c01047df7ec4e4c9cf90160e14ee212-20240205 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:2fe792de-25ed-4861-8503-5727ad80d150,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:2fe792de-25ed-4861-8503-5727ad80d150,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:cbb1a083-8d4f-477b-89d2-1e3bdbef96d1,B ulkID:240205152054PAMNL1WR,BulkQuantity:0,Recheck:0,SF:66|38|24|17|19|44|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: 3c01047df7ec4e4c9cf90160e14ee212-20240205 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from <chentao@kylinos.cn>) (Generic MTA) with ESMTP id 2062955715; Mon, 05 Feb 2024 15:20:53 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id 123C0E000EBC; Mon, 5 Feb 2024 15:20:53 +0800 (CST) X-ns-mid: postfix-65C08C54-87813279 Received: from kernel.. (unknown [172.20.15.254]) by mail.kylinos.cn (NSMail) with ESMTPA id 5B4D9E000EBD; Mon, 5 Feb 2024 15:20:52 +0800 (CST) From: Kunwu Chan <chentao@kylinos.cn> 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 <chentao@kylinos.cn> Subject: [PATCH net-next 6/6] ipv6: Simplify the allocation of slab caches Date: Mon, 5 Feb 2024 15:20:13 +0800 Message-Id: <20240205072013.427639-7-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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790043327309665873 X-GMAIL-MSGID: 1790043327309665873 |
Series |
Use KMEM_CACHE instead of kmem_cache_create
|
|
Commit Message
Kunwu Chan
Feb. 5, 2024, 7:20 a.m. UTC
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
to simplify the creation of SLAB caches.
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
---
net/ipv6/ip6_fib.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 4fc2cae0d116..25d7e6d45e6a 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -2444,10 +2444,8 @@ int __init fib6_init(void) { int ret = -ENOMEM; - fib6_node_kmem = kmem_cache_create("fib6_nodes", - sizeof(struct fib6_node), 0, - SLAB_HWCACHE_ALIGN | SLAB_ACCOUNT, - NULL); + fib6_node_kmem = KMEM_CACHE(fib6_node, + SLAB_HWCACHE_ALIGN | SLAB_ACCOUNT); if (!fib6_node_kmem) goto out;