From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5111DA0C4B; Wed, 10 Nov 2021 20:16:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 18E6B4068B; Wed, 10 Nov 2021 20:16:17 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2086.outbound.protection.outlook.com [40.107.21.86]) by mails.dpdk.org (Postfix) with ESMTP id 9683E40683 for ; Wed, 10 Nov 2021 20:16:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bfsfJyYaMy60HAPMGPelTKtLG9ykRe8wXpDsTgPtd0o=; b=JpppM1PMbNHnPdPqR1F3NGs3+HCJjbzudD5honX9IqHPb00qcQpznL3bzp4qOouLfnO8wX83NLwOJcuNbEq2wZ5Y8SSSxao3em3fa4nyC+oJt65sxQPU/ECgM2ft7sR/Buhpm9G2BtHhRj3c8D5v/iW/LEPNUgsOb7EeiQj1GaI= Received: from DB6PR0202CA0030.eurprd02.prod.outlook.com (2603:10a6:4:a5::16) by AS8PR08MB6629.eurprd08.prod.outlook.com (2603:10a6:20b:319::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Wed, 10 Nov 2021 19:16:14 +0000 Received: from DB5EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:a5:cafe::b7) by DB6PR0202CA0030.outlook.office365.com (2603:10a6:4:a5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 19:16:14 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT037.mail.protection.outlook.com (10.152.20.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.19 via Frontend Transport; Wed, 10 Nov 2021 19:16:14 +0000 Received: ("Tessian outbound c71e1a752bff:v108"); Wed, 10 Nov 2021 19:16:14 +0000 X-CR-MTA-TID: 64aa7808 Received: from 50636ec0cdde.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F764AFBA-E06E-4070-B071-662154F76450.1; Wed, 10 Nov 2021 19:16:08 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 50636ec0cdde.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 10 Nov 2021 19:16:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fVaR5Huxj9gKl5Jc6Q2m0m/itxJNFMz5VOybsSMYAHpkU99NgzWZGR6hW9VzIT2w49jdKBWe7Q9EaBRQeOOovauqsjAcTkVG8RuHkk4ToCh0Pxra9+7PZBSNQBQjIcvddH6uIIauFLRNf4jctjyDcMQNb8o/cIVzkRfz62QUdIqDblfuocTdX1yxNbNfe9QT07AmwuU3pMbmr1nNGmV14bv7vSiFMzC4cEWcdFAPQor5FQGbqdmmqRNt6zDQpf/MnHCFJ/L6/KVdtKo7DflG8lD9B6CI+26M6ztx11+oEAs7LMlFKKgCRlPTHDZBiG0fB7hkQHGwsHxOdIHUQoezyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bfsfJyYaMy60HAPMGPelTKtLG9ykRe8wXpDsTgPtd0o=; b=GQfU64J0EaAPJGzfdXhZxEZr5xMhYI5TYJb9LuWqxe1w4uO8wuV5wIU9HXdTzKBQs5LLGcPEsWV3/Tm0lJMvfSJQsUd5mumxdyqTUHpKkQ5b0CaX9f/gUZLM4Q1gSGy8YOwygRYolwzDY1HBwGqvRrK6oUf7ldYOADtytE81Mx59qF/at0JgLqtvPLHjHpg5MVJ5yojUSwjvyB79uK9mkGt5IOuvL1FR7lc06lpD4hMKGofRqNeHXdg4hMLtpZaRmHw7PdkdPO0vYRrry8DR6mHJ7aVdblB4SWUKssQpCKLgK81gDWb3bcy6bHQw5uneFVsNSoXfxBW4Fo6/a6qoVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bfsfJyYaMy60HAPMGPelTKtLG9ykRe8wXpDsTgPtd0o=; b=JpppM1PMbNHnPdPqR1F3NGs3+HCJjbzudD5honX9IqHPb00qcQpznL3bzp4qOouLfnO8wX83NLwOJcuNbEq2wZ5Y8SSSxao3em3fa4nyC+oJt65sxQPU/ECgM2ft7sR/Buhpm9G2BtHhRj3c8D5v/iW/LEPNUgsOb7EeiQj1GaI= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DB6PR0801MB1672.eurprd08.prod.outlook.com (2603:10a6:4:3a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.15; Wed, 10 Nov 2021 19:16:05 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::8501:86ca:a393:17b7]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::8501:86ca:a393:17b7%9]) with mapi id 15.20.4690.016; Wed, 10 Nov 2021 19:16:05 +0000 From: Honnappa Nagarahalli To: Vladimir Medvedkin , "dev@dpdk.org" CC: "thomas@monjalon.net" , Yipeng Wang , Sameh Gobriel , Bruce Richardson , nd Subject: RE: [PATCH v2] hash: clarify comments for RTE_HASH_BUCKET_ENTRIES Thread-Topic: [PATCH v2] hash: clarify comments for RTE_HASH_BUCKET_ENTRIES Thread-Index: AQHX1mHo16CO+uHMPUKoLS0sWek3Uav9Ic4w Date: Wed, 10 Nov 2021 19:16:05 +0000 Message-ID: References: <20211108173935.133310-1-vladimir.medvedkin@intel.com> <20211110183614.218540-1-vladimir.medvedkin@intel.com> In-Reply-To: <20211110183614.218540-1-vladimir.medvedkin@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 292403CE18A40140A6622C4B636AC34C.0 x-checkrecipientchecked: true Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: e2cd333a-7629-4cce-42d7-08d9a47e9064 x-ms-traffictypediagnostic: DB6PR0801MB1672:|AS8PR08MB6629: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:4941;OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: eNH09ncHSFCryZ7rQYJIQTKaUxL0jLeFPzAedtBUS3pH7rCtJoXcLmPdL+O0Wcw6eb7YRL6c6ObzmyVA6bHopudKJ7+sfBXt1SgOUosqCMNuPprU683ET1vGtrojsy8h/bs6gdIIvMt7DD+NSParHSlIWJL3SGwQruXhdnAWhHItFjE175zyjIxIhoOwRqnHbDEVzgzys/eYPmQSbea01OHmvaqhso5tP2N0gcFoKYk5ZMYXldvfmfjCmaQ55aJF5Vy/UBrRWldnZ8tacPU7EZIB9QGu88jSCIjV5mrTpisb3YmyDnu0ox2GFjeEejN05MtlF+Div24SDvcMwYtRTLxXdJ/G4oSplur7E/KnzBHJL6YWQEsLiKRuUjRaQQMYKwVlusHG2hHz2DiOOCBuS40tYTw6/0QzUpHoFekgFZQJT8q3RBEW/7WtfpbfhNGQFmAmg8p7lxdiTyZLVfhcFjNpfyoWQknSW9EyWbprPraZNZckZIrez9vRgbcMrJcgNxFVnMvtAt/h1TVraz5s8YWRPmyB1yDNl8qeW+kzOI1mtqWt2jGhr9GVMG9T6+W+92gjB+kAfCY+G/fcmf73v7TxiJ7MLKSoEM+OhOx9kZAg2/amy4+/dcE3O04ekRGty55aHz479312BSLLQnbNcLGpFZMW+nSWqYP9N6kYdOkcditTVbHoBybwz0wlKMdekcZ5ikTphhaJvvmt5pI89Q== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(9686003)(7696005)(6506007)(52536014)(55016002)(186003)(38070700005)(4326008)(26005)(316002)(5660300002)(33656002)(2906002)(8676002)(38100700002)(54906003)(508600001)(66556008)(66476007)(76116006)(110136005)(83380400001)(71200400001)(66446008)(8936002)(64756008)(86362001)(122000001)(66946007); DIR:OUT; SFP:1101; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1672 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: a5982ef9-f290-44b2-a16f-08d9a47e8b1b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LynOCAXIhW1NiDnA90xtI6+otXtC/lh1KTlZ24yK3N+Ii99071eFtXTvqa0aTib4+dlrmPeQJ2zpfbbtwZ4nICTiw+uhu5EMiDmjjCTljge/8GiMZA+VM88gxzCSDo5+uUn4m1GF2jdkObSkGJgCekCbBMacZgco3uCMIIME8Ood+ewld8QlEiYNWmWq+YHj2FtAaMK2iHrVQAln39nGNMuj8xxS3NctNyx8JKM+JZsANRPLuvDpHciFBTk4f0+U95/LRz8NI0FcY0ufX2XRTgS8QqLJraQFgF0nQLIjAlAd3yqQ7A9bkZU+UfBXGBJFeycqCo+zZraPOW22sFIrP/N9mE+D2UPErZMoj6ZXiUdgQM8AUPPAAFkEwsZPq+Q2Q5WyWsnotOG9wblulFvB+h+jbPVxBaq7DY5IxjbijLfLi4v136sWCfgsx3c2dGaJEGMdaX55GDP6zUf15sB2FpshaZBtb9UNZZV85mhkuiSotrUEuN/YZJgVeGHgAeXQWfPsFChJmxvFo8F1UmpH2OoaGTVXX1z48gF0mYwzY0NaTbVnHC397JKqP2kI7cSIlafKVYkVv3wjmLxmRoHr5SCb4vCePMcpzBWfidEZ6EXUd4RqpB9WxxBG2tMQD28cQYjvOhEBOxgb83sYwFBeaHFJuYSv17nRgNW4zjnWg9odPGylJ5TT0SIQLrfhVTpO3d6KvvVBR8y2fcKOSmS4+Q== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(86362001)(356005)(52536014)(33656002)(186003)(55016002)(83380400001)(9686003)(336012)(508600001)(6506007)(7696005)(26005)(70586007)(70206006)(36860700001)(47076005)(5660300002)(81166007)(2906002)(82310400003)(110136005)(54906003)(316002)(4326008)(8676002)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 19:16:14.4890 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e2cd333a-7629-4cce-42d7-08d9a47e9064 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6629 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org >=20 > This patch adds a comment for RTE_HASH_BUCKET_ENTRIES explaining why a > particular value was chosen. >=20 > Signed-off-by: Vladimir Medvedkin Looks good Reviewed-by: Honnappa Nagarahalli > --- > lib/hash/rte_cuckoo_hash.h | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) >=20 > diff --git a/lib/hash/rte_cuckoo_hash.h b/lib/hash/rte_cuckoo_hash.h inde= x > 85be49d3bb..eb2644f74b 100644 > --- a/lib/hash/rte_cuckoo_hash.h > +++ b/lib/hash/rte_cuckoo_hash.h > @@ -101,7 +101,13 @@ const rte_hash_cmp_eq_t > cmp_jump_table[NUM_KEY_CMP_CASES] =3D { #endif >=20 >=20 > -/** Number of items per bucket. */ > +/** > + * Number of items per bucket. > + * 8 is a tradeoff between performance and memory consumption. > + * When it is equal to 8, multiple 'struct rte_hash_bucket' can be fit > + * on a single cache line (64 or 128 bytes long) without any gaps > + * in memory between them due to alignment. > + */ > #define RTE_HASH_BUCKET_ENTRIES 8 >=20 > #if !RTE_IS_POWER_OF_2(RTE_HASH_BUCKET_ENTRIES) > -- > 2.25.1