Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp170634rdb; Sun, 21 Jan 2024 23:36:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IHxBh9ZemeBMAV2crJBFcUE0KFZja8yVixzT5e42dX+l5iZ9OZsdDnvs9LF76IWw8DLGARS X-Received: by 2002:ac8:7d0d:0:b0:42a:4527:9e09 with SMTP id g13-20020ac87d0d000000b0042a45279e09mr233112qtb.19.1705908972929; Sun, 21 Jan 2024 23:36:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705908972; cv=pass; d=google.com; s=arc-20160816; b=R0+qhLffF9CWjK/zydXRl2PWsg0Afvg5Ij3mT34nybQUCxhNcpM7BduRGbOqKgi1Sx p1Y0hMWSzDdQvZoAtwnz88fIxbtW7+V9kYvDhgVc1OZCbNm7gpwTXGF+aoHZrdOIxarO xk2jrO+7U9MGeS6EO+QF85WStqrhg8+qo1gWJibBC4haqPYfO6sJjxLvPTmIWS/ZS6bA SCv6F01648E5+VPW6E9N/3Clb0/Z9afcFth42Pr9i4BGDVE4ozAHNuOsD4Zjs8cxlk0S /EgD8H4cugyJBc0uHQRVFSF/o6+2pFShj8C1/dtmtZUW+U7ugNaVesioo1GMiA2+QgKh JuCA== 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=VicDmxaYPEMZsvpOnrq88mTa6//K/hsbpoTTHMminNY=; fh=8BnuGL7pG1vfWctWqgpB05S+Xo709sW/CM/sP+LaWis=; b=vG52DMW++Cw9dT8CBw8vnCiFXQRAi06E5KsXH7NDmodGGJgG9X3fQ7AxsfbX6LNEAb 93ox/TTmzhD7W2C/TrLPbHF71QQbGqvAZbWQlANXujm9F6bzEHyaoE6kda6dXou3o1VI G5u5BUROu0LYS1A8PJzF2k2vxH9hcLMRMOiw3Z8/Yb+PX/h/9ekUN6/js3w5rXPl+Hxm JIfPR9tsFy0YLxRd8p1XOP9y5rQ29JTJmT755ANW8Fwi2xoIgTYHtUHAfD0Rvc7tfidE x/GOXBhB28zBKLK9R7jQi0E8SgnQsI9bEkAAKmnKsoygeUQ/Ld2uD6X4SjgWOgn7UZAp B0MQ== 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-32429-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32429-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 d15-20020a05622a100f00b00429be28d592si4973448qte.750.2024.01.21.23.36.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jan 2024 23:36:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32429-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-32429-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32429-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 98CAE1C217F0 for ; Mon, 22 Jan 2024 07:36:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2DFC5179BA; Mon, 22 Jan 2024 07:35:52 +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 AE3EDFBE1; Mon, 22 Jan 2024 07:35:42 +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=1705908951; cv=none; b=pHciYUmO6k8qxhnBkVZ7w6GlM6P6o5iMbGRv2Sis6PHTeMHwRPf9C5rTsh/h8Ykee6KRGetGSms08WAz5YFhxSmFb855cLWjWAJmVcHdYiAsYdx0YZbtuoaPD+l1o8yCVMiLU1u8Uvn5f9F8S32bT/UjBPw/glUof2Q4IA81E48= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705908951; c=relaxed/simple; bh=a84Ae00L5X+yF+jz93N/QgllxGAF2cgD93WBqZxUQnU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=LW10TVcIURohqx0bQ/7rHrNYFQAJtJUqYCvOAsl2stf/CPvb0akMTZGBAAJJMUvwFAumovSfF+NZphS/s+bS5/+WJU7mET2YxifqrUfys/5/4eOkqeGxd0OPlj3ux4Ix7tPk8mvyBWZYfqmdEceEZ7Edyfz7V54K9j6RbyGWnGk= 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: 89f05498b4a1435a833053f4f2fd8887-20240122 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:f3d5e596-f7c8-4dbd-b751-633a1d132f37,IP:20, 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:f3d5e596-f7c8-4dbd-b751-633a1d132f37,IP:20,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:af3d1c83-8d4f-477b-89d2-1e3bdbef96d1,B ulkID:240119232059I7ZFFJYE,BulkQuantity:6,Recheck:0,SF:44|64|66|24|17|19|1 02,TC:nil,Content:0,EDM:-3,IP:-2,URL:11|1,File:nil,Bulk:40,QS:nil,BEC:nil, COL: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_ULN,TF_CID_SPAM_SNR,TF_CID_SPAM_FAS, TF_CID_SPAM_FSD X-UUID: 89f05498b4a1435a833053f4f2fd8887-20240122 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 1749565469; Mon, 22 Jan 2024 15:35:30 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id E9923E000EB9; Mon, 22 Jan 2024 15:35:29 +0800 (CST) X-ns-mid: postfix-65AE1AC1-869568164 Received: from [172.20.15.234] (unknown [172.20.15.234]) by mail.kylinos.cn (NSMail) with ESMTPA id 810BFE000EB9; Mon, 22 Jan 2024 15:35:23 +0800 (CST) Message-ID: Date: Mon, 22 Jan 2024 15:35:22 +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> <20240119152039.GC89683@kernel.org> From: Kunwu Chan In-Reply-To: <20240119152039.GC89683@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024/1/19 23:20, Simon Horman wrote: > On Thu, Jan 18, 2024 at 10:22:05AM +0800, Kunwu Chan wrote: >> 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? > > Hi Kunwu, > > nf is for fixes for Netfilter (which includes IPVS). The target tree is nf.git > nf-next is for non-fixes for Netfilter. The target tree if nf-next.git > > net is for fixes for Networking code, which does not have a more specific > tree (as is the case for Netfilter). The target tree is net.git. > Liikewise, net-next is for non-fixes for Networking code. > The target tree is net-next.git > Hi Simon, Thank you very much for your detailed guidance. In the future, I will carefully follow the rules you introduced to set the appropriate subject for the patch. > The MAINTAINERS file, and get_maintainers.pl script are useful here. > > nf is merged into net on request from the Netfilter maintainers, > this is it's path to released kernels. > Likewise, nf-next is merged into net-next. > Before send the patch, I'll read the MAINTAINERS file, and search in email-list to confirm the correct subject. And if need a new subject patch, i could resend a new one. >> >>> >>> 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 >> -- Thanks, Kunwu