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 EEBC7454B8; Mon, 24 Jun 2024 03:59:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1D7EF40BA6; Mon, 24 Jun 2024 03:58:07 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2108.outbound.protection.outlook.com [40.107.244.108]) by mails.dpdk.org (Postfix) with ESMTP id 3093640B8D for ; Mon, 24 Jun 2024 03:58:05 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DTJg2V/BurRJmNQLXwtJwmuxpFq6QSV0Gd2/tIVBWrxvzCOMdLsmPFlmNU37T6FQcMNhGDo4vf1TBw181vzd37rVRPmmmlSD6XBAcp9bpXHi18ycxJxbJ61X4a55yw8/IfrZi8KtpUlDUh6qlOWeAJvJ6OqnnCBuOgF2rgaM1369qkwZVMQACaiN2RDsPoHZiK6B7M+EtU3MAtcKaZW8/pMwmFgHWH4oX7y/jQphlPIbbr4mWct+Q1wyOB+Z7wWJMHpFboDTIFjpyfvnIOHEkFPa5XdkLaajrmcZICR0WSh/DNMY1wqq85oaeUmiZ53ajyg03Sks0eh/wZPjGdNxDQ== 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=1CzAKgWxefEjH6dvr7C7jL+mXE2wsj/njd9EvDPSjuE=; b=mNqE0cGVcjrFYleBE6wYuwKF8w15z4RzcWIAgT98+gBif1p3CIcNZVeWO6Znn0aiV8vVghwIniiaDlvwfCokJfG9iq9OBPXluZtkyPiAzBIEAKGRCDr7mZJ5u8Vk23KEhgFXMoKw0Aid3xPjkAY1q1VPss2e8UTL6eL5tYipez3M/iK7g+fVdlwAVnddI1MqHIvAO9rvS/88I4AzpsRrXJp0+M4lGTmLRNW1cNFP1WRyBIdHrGYHeSvXeTTwYo2bA5km1MisBrUQkgHNxOGl5icO9X2sf4QAKaqHA3pxIREbeAPMEMUQQaRcBtTBjfr53AGM1Fih8vq52U4xnxUmeA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1CzAKgWxefEjH6dvr7C7jL+mXE2wsj/njd9EvDPSjuE=; b=bm6pZsR/dywR7eWpGXwP1kHsBXes2O/m6SXbiM3zrBMdjoAfCI8w2LfIdnjzB5kiUq9q97OeuAb01ylSwUXe+Q78qix8EzOjUQmSimdDtvU40rB6wy40RrjkK6r4duEG9y+ek7HZuHNEfht6hB5Q7KvL8dKS8ZR84hwJEHYk3KA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by BY3PR13MB4882.namprd13.prod.outlook.com (2603:10b6:a03:36e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.28; Mon, 24 Jun 2024 01:58:04 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7698.024; Mon, 24 Jun 2024 01:58:04 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Long Wu , Chaoyong He , Peng Zhang Subject: [PATCH 10/17] net/nfp: enlarge flow hash table size Date: Mon, 24 Jun 2024 09:57:16 +0800 Message-Id: <20240624015723.3712898-11-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240624015723.3712898-1-chaoyong.he@corigine.com> References: <20240624015723.3712898-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR13CA0070.namprd13.prod.outlook.com (2603:10b6:a03:2c4::15) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|BY3PR13MB4882:EE_ X-MS-Office365-Filtering-Correlation-Id: 751dea96-fa41-450f-56e2-08dc93f11588 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|366013|52116011|376011|1800799021|38350700011; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?cOvzMUGAw5WpfjVTupgTRA/oB+/kUTh2xUo7cPITFZzBZDk4ZiyhTUUVxf3f?= =?us-ascii?Q?N4tuHTH1rWH6QtwqnnDVy/BbrfeW04TrSHHhc6J2ELhq3ZA3x9VZDo7BIa0R?= =?us-ascii?Q?n5KSlwP63HDfAckDrLqr7lYCE+RX3kiKJtbpZEh7um51dBKbVveRV4KGF+eZ?= =?us-ascii?Q?u6yq5v1peR9QeDgbTFcd7c6oXDWHZzMItDZoohpfMg/rt+kfGEKXn+FPaJHm?= =?us-ascii?Q?Uf+votxc0NBHcV5Fsmx5WGb5ZDlEh9+WjF6UcUj7v39zSGxLDnEpJqbiWc9p?= =?us-ascii?Q?NKy3QjyXkkkojsF9pmy/i3m7HGyb7/QCCSm/Vl3ilUQA3rMUucsR9HpQN47n?= =?us-ascii?Q?ofchZLEm0OP6rT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Ju?= =?us-ascii?Q?DTBvF1mjFkDL8Fbnk+g4hjTfpkZU7P8dZOjDcJYwOtg+ZCCe4za+3x2P4XB/?= =?us-ascii?Q?goFkYX0hd8GiHls41jk5gJL2wMsiHSGFXqwt10NGcHLn7W47exDATfg2jZAe?= =?us-ascii?Q?4AgQMj8=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230037)(366013)(52116011)(376011)(1800799021)(38350700011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?SZO0KNiGttvQ+1nesF8F+TCUd0BGartzrY4QMchC2OvZImwfh9ET/dNiQk5J?= =?us-ascii?Q?TKdSk38BjFfWlDiL+EY9+mcK/byJmsZx1ZPAn6gTKKcsfi938Z6gUkP9Ydys?= =?us-ascii?Q?YUtC739O+b6N8Og0ApAlrm0l20R8D36+lwc5Uv1zYtk9OdSitRXzit15WCMB?= =?us-ascii?Q?/DEZYYPpJfy1SDm4hNIM9Isqb/Hq+bwZpZ3zZ+l7DBlCOm/VmutLKeH8HPHp?= =?us-ascii?Q?8vhk4P3w8UNTd4tXQjmRBnA8hmwsbjiMAqlG/ifCTj7+p4c20kB6xy9dkAtz?= =?us-ascii?Q?JEqEWLTCq63sIAvNPtqkvOUfRE8410/7ENPAomSBSx4rU0kVCn44FLlldv4L?= =?us-ascii?Q?ffaFthbegq7iQH16pF4rz+QlsiAMnhRViYrgEMF93Tq22/lE2Tso9Uvfj0Q7?= =?us-ascii?Q?eVRLcOJBnB3w2J3t3JQK97b4eH/y5P0yH4AdPAo23p8MAxrWP/Rn6ZHuqjIZ?= =?us-ascii?Q?V3aafbY6yglTAS4h6b/JEEFuZOMm+qDi9XweyywSEAUbHEyi9xlPtQBYpsTP?= =?us-ascii?Q?s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8oD20xjm6pcnjlmjaKIOy?= =?us-ascii?Q?u4U1IGQtx7elx9e4e1f1x375tGtqWsx6Rl1q376zP2fKN79uf1Ym18xTYVU+?= =?us-ascii?Q?WZWu/a/bo2DoLn/J6b3vrCohEh+RkIyVEZpzLXusNgiWD03tT8i5ZAxiv3L9?= =?us-ascii?Q?Wsy3Viwua54sI0b52kCRNIfYWa8L45i08vwb4eHNMCdGRKATTmc5gN47E3aD?= =?us-ascii?Q?LQ=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 751dea96-fa41-450f-56e2-08dc93f11588 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2024 01:58:03.9986 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iFmfNP5sJ7x2Tl3DsLtC/fqMbrEnvG/Jz75oPyuYy+WC4TxxfRDhbsfycqGA3g7HRHdJDaoDDHiU2JBlRU9YuCmP7SEfqJjD+ArteH9xSP0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY3PR13MB4882 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 From: Long Wu The flow rules limitation is 2056 and driver needs to store it in hash table. Considering hash conflicts, driver use a new macro to enlarge hash table size. Signed-off-by: Long Wu Reviewed-by: Chaoyong He Reviewed-by: Peng Zhang --- drivers/net/nfp/nfp_net_common.h | 3 +++ drivers/net/nfp/nfp_net_flow.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfp_net_common.h b/drivers/net/nfp/nfp_net_common.h index 6db849eb07..6c739891be 100644 --- a/drivers/net/nfp/nfp_net_common.h +++ b/drivers/net/nfp/nfp_net_common.h @@ -179,6 +179,9 @@ struct nfp_net_flow_count { uint16_t ipv6_count; }; +#define NFP_NET_HASH_REDUNDANCE (1.2) +#define NFP_NET_FLOW_HASH_TBALE_SIZE ((NFP_NET_FLOW_LIMIT) * (NFP_NET_HASH_REDUNDANCE)) + struct nfp_net_priv { uint32_t hash_seed; /**< Hash seed for hash tables in this structure. */ struct rte_hash *flow_table; /**< Hash table to store flow rules. */ diff --git a/drivers/net/nfp/nfp_net_flow.c b/drivers/net/nfp/nfp_net_flow.c index 74dd67abd4..2dab317a5f 100644 --- a/drivers/net/nfp/nfp_net_flow.c +++ b/drivers/net/nfp/nfp_net_flow.c @@ -1063,7 +1063,7 @@ nfp_net_flow_priv_init(struct nfp_pf_dev *pf_dev, struct rte_hash_parameters flow_hash_params = { .name = flow_name, - .entries = NFP_NET_FLOW_LIMIT, + .entries = NFP_NET_FLOW_HASH_TBALE_SIZE, .hash_func = rte_jhash, .socket_id = rte_socket_id(), .key_len = sizeof(uint32_t), -- 2.39.1