Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp81962rdb; Wed, 17 Jan 2024 18:22:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IH4Yz+qTZxqHu5QV2f3oI7Lzo+cgkMVQ/Ro6v5GPDDUAB1SFlhxx+ieTuXKHw1Hc30rBIsL X-Received: by 2002:a05:622a:164d:b0:42a:1bc4:da41 with SMTP id y13-20020a05622a164d00b0042a1bc4da41mr42349qtj.85.1705544557003; Wed, 17 Jan 2024 18:22:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705544556; cv=pass; d=google.com; s=arc-20160816; b=kxbzFTkDbpuf5KHx7Zg5isAAAu39sw6QvzIWJOa5bBR1BH74MOyQnRKYhzyhuwfBsx 25+bqzr4jwre5cDVbFyHmN79r5HRNR+dtxS3R8aq9vOKw7hqxdbk7D/0JRFYp5vFi8zN B7+9EWyb9PKhb+63CA4C9snTQDC4XTeZfEMUFCiVA3vFz86Z8cQM7O153dnnPZ12NffC PNbjk32ahz0W3mnz3ukWpXQ3lig4SadnYwuVfJmaaEPvCOyCsm26GLXh30sZDIWU/nA8 xRwLiRrNzIpjwG0ZzPVBuoxyAkZQ9TsndGbTFKddbPfJo4QNMejo8ZPeVdw07/StZku0 6Tiw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=7dpzxSj62ST+7u0wddCcgzSv1dHYbjha/ns4q0jBaAM=; fh=8BnuGL7pG1vfWctWqgpB05S+Xo709sW/CM/sP+LaWis=; b=QbFFdA4Nfh0RXTEQvW5OlYeBapZLn1heu92wBjXmSO5St6rzdsBApM8ODjaf8P+nuf r+S16fvZ0ZqfTjIg76/4tfHNciItbXdVRWcswTk19tx6tA2zAWs+jec2EasWIm8IcS0A DilvIF2uFl+9a20lrKEru7IS5N9fpPKihi/tOpMlbsPeQtw+sql27kEA59B0KOY6BlID YziT9VTxIbKkC/2T9sWOclYqeMSLSG0kMzBdhj1rGRYIWiiWPH0Ng2D8nN3rih9RonA6 6HkFwkRW0+jPR6vpND/Tl9BbLnKg5Ny3e6imaQSvDgebbYeob/6usd+9kZvYpLBloNhz f6qQ== 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-29655-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29655-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id r10-20020ac85c8a000000b0042a1be5805fsi18628qta.490.2024.01.17.18.22.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 18:22:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29655-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-29655-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29655-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 71FB61C22347 for ; Thu, 18 Jan 2024 02:22:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 51A946FD2; Thu, 18 Jan 2024 02:22:22 +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 F0034612E; Thu, 18 Jan 2024 02:22:17 +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=1705544541; cv=none; b=Oy7v4VJ3bjMN4DYDY45HNqWzbQnrWzWZlzyoK8BWxC3EWJKI4DEVIAT2Hsr5l5mq4tB4viue5NoH+5xW7Drp9jj9tsIjJNFvQCNx/uuxu8LYXGr0qvLaRAWO99ckGNsNRZ0HBMe7cM3KjNApUR2+ChHucZ6x7i0v2qBRaUDMRBA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705544541; c=relaxed/simple; bh=8JHXmYF/SbfhncSbdmAV1mZFnmszoqM2xbG/FA913qo=; h=X-UUID:X-CID-P-RULE:X-CID-O-INFO:X-CID-INFO:X-CID-META:X-CID-BVR: X-CID-BAS:X-CID-FACTOR:X-UUID:Received:Received:X-ns-mid:Received: Message-ID:Date:MIME-Version:User-Agent:Subject:Content-Language: To:Cc:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; b=mRLDG4VmpPBA1OndezO0AKKY1g/OymkVN6ncycnXmza1TnjATUmJdRfrTaOjWgUk1ra0dof3fdsUle4+vZMFeOqycumLpiywn76EQRfV8sCbWOpY8x+Z3bk3gRo9CRhXXee2cYRt13hH385LIVobJPU7ft+wvWapGf6wAwJLC8o= 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: 357999929ba04da58da2de338c6a80bb-20240118 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:f9c5ad19-ce8d-4590-8d0f-425d94764a99,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:f9c5ad19-ce8d-4590-8d0f-425d94764a99,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:b26a5f8e-e2c0-40b0-a8fe-7c7e47299109,B ulkID:240117171645NSDDJDUY,BulkQuantity:12,Recheck:0,SF:64|66|24|17|19|44| 102,TC:nil,Content:0,EDM:-3,IP:-2,URL:0,File:nil,Bulk:40,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_FSD,TF_CID_SPAM_FSI,TF_CID_SPAM_OBB,TF_CID_SPAM_SNR, TF_CID_SPAM_FAS X-UUID: 357999929ba04da58da2de338c6a80bb-20240118 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 2100225134; Thu, 18 Jan 2024 10:22:10 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id 1773FE000EB9; Thu, 18 Jan 2024 10:22:10 +0800 (CST) X-ns-mid: postfix-65A88B51-553218459 Received: from [172.20.15.234] (unknown [172.20.15.234]) by mail.kylinos.cn (NSMail) with ESMTPA id 035EEE000EB9; Thu, 18 Jan 2024 10:22:05 +0800 (CST) Message-ID: Date: Thu, 18 Jan 2024 10:22:05 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net] ipvs: Simplify the allocation of ip_vs_conn slab caches Content-Language: en-US To: Simon Horman Cc: ja@ssi.bg, pablo@netfilter.org, kadlec@netfilter.org, fw@strlen.de, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-kernel@vger.kernel.org References: <20240117072045.142215-1-chentao@kylinos.cn> <20240117092928.GA618956@kernel.org> From: Kunwu Chan In-Reply-To: <20240117092928.GA618956@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Simon, Thanks for your reply. On 2024/1/17 17:29, Simon Horman wrote: > On Wed, Jan 17, 2024 at 03:20:45PM +0800, Kunwu Chan wrote: >> Use the new KMEM_CACHE() macro instead of direct kmem_cache_create >> to simplify the creation of SLAB caches. >> >> Signed-off-by: Kunwu Chan > > Hi Kunwu Chan, > > I think this is more of a cleanup than a fix, > so it should probably be targeted at 'nf-next' rather than 'net'. Thanks, I'm confused about when to use "nf-next" or "net" or "net-next". "nf-next" means fixing errors for linux-next.git and linux-stable.git, while "nf" or "next" just means linux-next.git? > > If it is a fix, then I would suggest targeting it at 'nf' > and providing a Fixes tag. I'll keep it in mind in the future. > > The above notwithstanding, this looks good to me. > > Acked-by: Simon Horman > >> --- >> net/netfilter/ipvs/ip_vs_conn.c | 4 +--- >> 1 file changed, 1 insertion(+), 3 deletions(-) >> >> diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c >> index a743db073887..98d7dbe3d787 100644 >> --- a/net/netfilter/ipvs/ip_vs_conn.c >> +++ b/net/netfilter/ipvs/ip_vs_conn.c >> @@ -1511,9 +1511,7 @@ int __init ip_vs_conn_init(void) >> return -ENOMEM; >> >> /* Allocate ip_vs_conn slab cache */ >> - ip_vs_conn_cachep = kmem_cache_create("ip_vs_conn", >> - sizeof(struct ip_vs_conn), 0, >> - SLAB_HWCACHE_ALIGN, NULL); >> + ip_vs_conn_cachep = KMEM_CACHE(ip_vs_conn, SLAB_HWCACHE_ALIGN); >> if (!ip_vs_conn_cachep) { >> kvfree(ip_vs_conn_tab); >> return -ENOMEM; -- Thanks, Kunwu