Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1592579rdb; Tue, 20 Feb 2024 00:25:42 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUlfOrxpp1b5+YZQuhQGeMO53VSSVt6cLhFjPj+x9RrIDwdP5hnI5hzQAag8S+pquo/ovy/fk1rBD4x0boTTEfDFdw6b3ZVeapumkcijg== X-Google-Smtp-Source: AGHT+IEewPPw4fqsgPsnGiwzHZe7ZcR+GoEWQGK5Z+3ApGGzzF+Tg4QoSNZ9DE0s8xwBughEQzF7 X-Received: by 2002:a05:622a:4cd:b0:42c:6714:f3eb with SMTP id q13-20020a05622a04cd00b0042c6714f3ebmr19838221qtx.8.1708417542002; Tue, 20 Feb 2024 00:25:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708417541; cv=pass; d=google.com; s=arc-20160816; b=YtLjjLUo9y0HZ0Fiqn4oQ/5M/LcTh9sVyH1CJm4dOHsMWeNu/poPqqqEkwuAues4cn WNyAV6ksYB4AamRHts4HL8rlyznih8j0nFL6yr3qlKby39xiQX2m1EfV+z3jAdMMnWFW EhEZQQVlAPDZ5FLPiBkzf1v1ATlvSeuDbXDr/qv5OBhI4f+cgpxUQ8gS59eX1RIpl9nn juE4PJXPymBEKazayBXMj4okCVIgXDamxAvnk21QSFax6AQMFFDUCEcprGI9N6/6MhqY fg++fCFejXfzoVXBO9MPKWdvzE9pK5/sYxmaQPuwgINs8EkjtQreTQjcQLpcGKPAZFZm s4Qw== 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:message-id:date:subject:cc:to :from; bh=yi83Xy/mmSq/61JoMLa7eJAnhzMB/uJQBsHWLlUS91E=; fh=IUL1LWYXZ86vTeZwN9cTQqWnMggGvz8TiWz/9HdJMfQ=; b=B9oO+Q4yzSplXDLRfMi1+DCrwnCXtx4U4ahORq26Dlxs+FGIZQFDrDq3Sfk7u9oPN5 EoRQVW14KVriGn0io2cyJclL8BUFBfvyeafH2glcRoC7LhVHfVoSKrkjQHsGof8AXOUv EGYzWND8aLHgrpCl/7G576LrOUZVZrDl8OJoky9BcsUVPoDauIarPEAViX94d887wVgj BxvAvlKtS+Jb6i+2MAErz96Bw/pIZVmtBTe44cE1g3BjYXHUm4o1VDt3lvNhYcMc+Zlr FQ0XeK+5xkYCBINBpfEknoIThKvS4EG4v1Nt+Qq4OjTlLPtDOfhalAmtmT4A18Q1hijl av0w==; 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-72544-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72544-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 4-20020ac85904000000b0042e2866c5bfsi890441qty.138.2024.02.20.00.25.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 00:25:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72544-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-72544-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72544-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 29EE01C227A4 for ; Tue, 20 Feb 2024 08:25:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E8B8B5D46B; Tue, 20 Feb 2024 08:25:05 +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 1D26E5C8E3; Tue, 20 Feb 2024 08:24:56 +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=1708417505; cv=none; b=Bidwba23Ew/u1QC2zU1QXRrURj1FswM4c7Q+82scsPR2edIbMiqdnjmClg4rjzxUqCk44v+KN2YHoB4CfnZKYMR1gXcgATPkioMoWjbJDO2ugRXUVo3rPCvI9KcFVe7ScTyAXAx8rbJf/lF8xYAxvyswwaUMieAPdTiTyacrsIw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708417505; c=relaxed/simple; bh=l46b04BQ9/cguSPWDJvEFDJiYvWEQAJk4USQVhOsPVA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=IAqie/XVQEEJAA+4w6FfG/sjLuASOIxyDLKeS8yWmT4g31j9+FnX5FF9iXjgT8N1H3sofcAs3CNqiQ9zneVZDXdHHy24Bl3HA24Wkul1LkCdumrV7L1lIb1e7Y2Lu3Q5jKR+W5mYWmkiHPDtyPxe0lKnVToiYln323j2EpGErQY= 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: 4564e0be11e047c9978189527fd6d6ba-20240220 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:3cc6625c-3a8e-4cfa-b4c0-2e6d50b39c22,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:3cc6625c-3a8e-4cfa-b4c0-2e6d50b39c22,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:94fc9780-4f93-4875-95e7-8c66ea833d57,B ulkID:240220153652XMGBIA5V,BulkQuantity:0,Recheck:0,SF:38|24|17|19|44|66|1 02,TC:nil,Content:0,EDM:-3,IP:-2,URL:1,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 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_FSI,TF_CID_SPAM_ULS,TF_CID_SPAM_SNR,TF_CID_SPAM_FAS, TF_CID_SPAM_FSD X-UUID: 4564e0be11e047c9978189527fd6d6ba-20240220 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 723137940; Tue, 20 Feb 2024 15:36:51 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id 0CE36E000EBC; Tue, 20 Feb 2024 15:36:51 +0800 (CST) X-ns-mid: postfix-65D45692-85218917 Received: from kernel.. (unknown [172.20.15.254]) by mail.kylinos.cn (NSMail) with ESMTPA id 99373E000EBC; Tue, 20 Feb 2024 15:36:48 +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 Subject: [PATCH net-next v2 0/5] Use KMEM_CACHE instead of kmem_cache_create Date: Tue, 20 Feb 2024 15:36:41 +0800 Message-Id: <20240220073646.102033-1-chentao@kylinos.cn> X-Mailer: git-send-email 2.39.2 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 As Jiri Pirko suggests,=20 I'm using a patchset to cleanup the same issues in the 'net' module. Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Some cache names are changed to be the same as struct names.=20 This change is recorded in the changelog for easy reference. It's harmless cause it's used in /proc/slabinfo to identify this cache. --- Changes in v2: - Delete a patch as Eric said in https://lore.kernel.org/all/CANn89iLkWv= um6wSqSya_K+1eqnFvp=3DL2WLW=3DkAYrZTF8Ei4b7g@mail.gmail.com/ - No code changes,only add Reviewed-by tag --- Kunwu Chan (5): net: kcm: Simplify the allocation of slab caches ip6mr: Simplify the allocation of slab caches in ip6_mr_init ipmr: Simplify the allocation of slab caches ipv4: Simplify the allocation of slab caches in ip_rt_init ipv6: Simplify the allocation of slab caches net/ipv4/ipmr.c | 5 +---- net/ipv4/route.c | 5 ++--- net/ipv6/ip6_fib.c | 6 ++---- net/ipv6/ip6mr.c | 5 +---- net/kcm/kcmsock.c | 8 ++------ 5 files changed, 8 insertions(+), 21 deletions(-) --=20 2.39.2