Message ID | 20240124065157.467348-1-chentao@kylinos.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-36524-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp814990dyi; Tue, 23 Jan 2024 22:52:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IEuNkE7VL6xv2XcfH1+QIXyq5CxyjqDWS70iCeMKPdzrlhw51uJpOqTn91pwa1ox2SmhDlP X-Received: by 2002:a05:620a:610a:b0:783:8071:2473 with SMTP id oq10-20020a05620a610a00b0078380712473mr7872157qkn.61.1706079169380; Tue, 23 Jan 2024 22:52:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706079169; cv=pass; d=google.com; s=arc-20160816; b=KjRNMj1N6k92Qv4ofvn6rt99ZqK97YZNmoxKBvH6NU+zS+zIVc34O71xWbr27SVPdU QPrQjb2MjlxTks5/VaZe7BdmMcWmGVnyfWAQucCzz3P+FWnIWGdtBPpVGJVqutc3MKOJ A5KjQjlKb6xSnCx/D/1UdfjUG0Vs6/qqm3DqXXLr4ba3219FWJiPIQXbd0caG+g6CCRs +y74H90cD7YasIoZgetZccHA8fn/bpaFs26iBKBvIn2djbc1DRwteAS5efKbFDv1wWEs xQbx1ACT6xSNS2sAvSoIqZKwArIvQXr1RHR1AD/BgfQQnFHdN7Q3POUz83RRCUY/hDOf QFFA== 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=JeKupQSEPAjh83mzb8yQpnkzY7zCFZVBYLK0pA0BCuY=; fh=Z/oHUYwtkAuxTiqcd8HrW0tt51vU3Lx1Usm+ktEgUT0=; b=LjG0ORo/E2BY4zp7JfGOJHVef1at7cj4SeBvEOGio9artLPeLBMJQ5GsGROi1/26IA lTRkVtqbAORCHWJcxEwoofwCHE3qGIFIdlX7Nthbov8n8IQRN0OVRTDqAcnhr/arZbmT iHr1VIhGqgI9NzroCSOdvyFE+h8VZsw8I087j9WbI1USuloqL5/G3Ku71eVBFlRAp7AG /Xc0k2W5lpH+VcPE653qtZyMmcSwkB8BF3Yb1XIWJ8Hv/hsXT0+Li8thpq/AJ1CnKepF 1+DpVbdmf3RIG5AP7SOcp7daCFfd2FzopcphQM0nxNlBJnUXWRQe6fIuVE6CvRcMaz+Z 2aZQ== 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-36524-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36524-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d17-20020a05620a167100b0078319ef15basi9287592qko.564.2024.01.23.22.52.49 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 22:52:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36524-ouuuleilei=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-36524-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36524-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 2F8B61C219EC for <ouuuleilei@gmail.com>; Wed, 24 Jan 2024 06:52:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4FEA4168DF; Wed, 24 Jan 2024 06:52:24 +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 C4EA9168A4; Wed, 24 Jan 2024 06:52:13 +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=1706079142; cv=none; b=Qz0U1C+7SbaIvD2F/If/vMPeaExM8QrL2jmTvMkNQmTe8VfVeFgkgdtnk6LeqYdx2hm8YENM+nLJr54eHhS4M7cDWzRpDnZt36qEktyTFfSO/3BlYX+CsKbBvO9NwLtk/P8nTJawV6XCMIji4fZWuPQwNe6a+3UaLC+VqqFYO6E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706079142; c=relaxed/simple; bh=2gG83sfVnMnpj1PwNtosLhy2mgrSAfycSWCXarHBPic=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=dyuOfCWLEF5P+L2OWVz580jGbb1pkLK2bW56UP1+MOuMAlRTEYF+xVNAj2owGNJApBwlnVgcn/3l+fTIEXL6bUHtUr9U2bHihoT82lKkptxYsoclNeJrUmrRL8lTZQ3idE67D2Xn2T9T137SiUl0g490/kfXmWZnbwNmwIknoGQ= 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: 4fb796d1e5684301ba7f95fc5bfe8ed3-20240124 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:04c5d8b8-b5c4-453a-a4dd-ec9d73c07a80,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:04c5d8b8-b5c4-453a-a4dd-ec9d73c07a80,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:e6fd988e-e2c0-40b0-a8fe-7c7e47299109,B ulkID:2401241452084ZXC2A0F,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: 4fb796d1e5684301ba7f95fc5bfe8ed3-20240124 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from <chentao@kylinos.cn>) (Generic MTA) with ESMTP id 1003242987; Wed, 24 Jan 2024 14:52:07 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id 8444CE000EB9; Wed, 24 Jan 2024 14:52:07 +0800 (CST) X-ns-mid: postfix-65B0B397-315832218 Received: from kernel.. (unknown [172.20.15.234]) by mail.kylinos.cn (NSMail) with ESMTPA id 313D8E000EB9; Wed, 24 Jan 2024 14:52:06 +0800 (CST) From: Kunwu Chan <chentao@kylinos.cn> To: santosh.shilimkar@oracle.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com, linux-kernel@vger.kernel.org, Kunwu Chan <chentao@kylinos.cn> Subject: [PATCH] net: rds: Simplify the allocation of slab caches in rds_tcp_init Date: Wed, 24 Jan 2024 14:51:57 +0800 Message-Id: <20240124065157.467348-1-chentao@kylinos.cn> X-Mailer: git-send-email 2.39.2 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: 1788953670871380006 X-GMAIL-MSGID: 1788953670871380006 |
Series |
net: rds: Simplify the allocation of slab caches in rds_tcp_init
|
|
Commit Message
Kunwu Chan
Jan. 24, 2024, 6:51 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/rds/tcp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/rds/tcp.c b/net/rds/tcp.c index 2dba7505b414..73317c86e995 100644 --- a/net/rds/tcp.c +++ b/net/rds/tcp.c @@ -720,9 +720,7 @@ static int __init rds_tcp_init(void) { int ret; - rds_tcp_conn_slab = kmem_cache_create("rds_tcp_connection", - sizeof(struct rds_tcp_connection), - 0, 0, NULL); + rds_tcp_conn_slab = KMEM_CACHE(rds_tcp_connection, 0); if (!rds_tcp_conn_slab) { ret = -ENOMEM; goto out;