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 54BD542D46 for ; Sun, 25 Jun 2023 08:42:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4D28940ED8; Sun, 25 Jun 2023 08:42:01 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2051.outbound.protection.outlook.com [40.107.220.51]) by mails.dpdk.org (Postfix) with ESMTP id B691C40A7F for ; Sun, 25 Jun 2023 08:41:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SsuUEaBI0TXJCCgkAj3pXDe614bjG95IFglUBVWKaNtO0MrmYc7uVyz7u14sGZOR//2ti0xxVy3E7pbtCXQK4MMN/j+n6VePVcr+QDTGljxbf7LxVjlMvDm20FFWgDaKIfb1gS3WoSghA4yYS7nuKWJyMdzKzgTUMbHn6nhVHN0TJDa9fmaPxSw3+Y8RhHLhmNxUOUryW+j5U1r54nhxwIihfCbQ8t2yntoLvbZOZTk5dMiTzOJ9q5PwHUDkzfXezMbkaUehtpz/Ibve0O7k3a+6q6YMAquHA0kuCT+rlhZLFJk1+2JEG0ag1i7cY6/DxV/L7//5Fa7YTT/Ju2PFsw== 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=w4FjbdCosq9BQu76Rnt++Fl25DthAV+e/bKip5NslzA=; b=Nm+LFj3riDckAVMicSekw5n17t9drHknYDoxC+qWkrok5wPZDtAshsVmL2wMibJ1LqCqyiPzw78+RqG03kNgMxTKgpv5hLrZboavScC53I+kOOFf/QiFg0sp20wIfdEmkGj4EaUD+Mx/AeP31jrwdIbeBpv7etDiu1EVIKkOEXVW2Y1yFQGgGRx9rpf9yFX3XnsLK0jHwl4T3IyQIaDkg49nzweK9/ITVXB/6jYSrrCCxszSgoRgqLg4CbbhpFcGrNobspZ9FyFze2fBsP2kFdp7oNiObYuIa11aPVykBqAGptKoPc+P5Z1GR2nQxz62esUfPNgmEZduAhEpx7L4NQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=corigine.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=w4FjbdCosq9BQu76Rnt++Fl25DthAV+e/bKip5NslzA=; b=HirfZD2CN3qEZZTCqdkJTP6DpYUqmJ0VbSmKHWTs/EmljTXNVQJFgNuinIoJnSBMZ+6WkZa1vtvW/dvkQNEP01leCnr5r0mV0d/wxCRsw+hN/ozqXh7YjZ+kG3K4ZBrjcDTpK+erD5GYJF0pOl17mlH1syvxrbo1ylm//l+R/znM4TjwNrc3OFaagkn2ss3furM6xlDd2krDRhR3+xC4rxTDUiR3ERsRIWrc4XgnfrJJaMk/aqHvsMHsxckg54EMrXThjKDRiZ0ASNrU2zoifabluC4YvCq0NzApp3/g1mSu6rkLLiz2R2X76sE8sdRrgyxYFRqbHrBnDl6vPXXPMw== Received: from BN8PR15CA0034.namprd15.prod.outlook.com (2603:10b6:408:c0::47) by CH2PR12MB4874.namprd12.prod.outlook.com (2603:10b6:610:64::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Sun, 25 Jun 2023 06:41:58 +0000 Received: from BN8NAM11FT015.eop-nam11.prod.protection.outlook.com (2603:10b6:408:c0:cafe::85) by BN8PR15CA0034.outlook.office365.com (2603:10b6:408:c0::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.32 via Frontend Transport; Sun, 25 Jun 2023 06:41:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BN8NAM11FT015.mail.protection.outlook.com (10.13.176.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.47 via Frontend Transport; Sun, 25 Jun 2023 06:41:57 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Sat, 24 Jun 2023 23:41:43 -0700 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Sat, 24 Jun 2023 23:41:42 -0700 From: Xueming Li To: Long Wu CC: =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Chaoyong He , dpdk stable Subject: patch 'net/nfp: fix flow hash table creation' has been queued to stable release 22.11.3 Date: Sun, 25 Jun 2023 14:34:45 +0800 Message-ID: <20230625063544.11183-68-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230625063544.11183-1-xuemingl@nvidia.com> References: <20230625063544.11183-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT015:EE_|CH2PR12MB4874:EE_ X-MS-Office365-Filtering-Correlation-Id: 70883233-7feb-4d28-c821-08db754745c7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o+hejoUpF9Ba/EXNhaCzUqxNw0Fod7FQMRdJ+5Jf+/fpWdCnfb5U7uas8CgHMpCyTsaBvr/+rVWqI7lP94mKHw03MoG+11GIBFWXDxxUI5O/rEAgJ9pgJ3ZczmyQXsvDeKAffFJoXVBkpiR6syW9tcQQyUFjbSLoQH9uZudoM6gSkue0/TJKEtNLeSxGShTgwVRcBA6zPLxynnQ1XCG2xDlNAU5WW3px+kLMgOPLbq7wdt6yqrVzs1KFZX3nKpbjFzQ0hUtxttJDwqMRaBHmZ/KaGlYEWUZj+OVsFJ9trolypqQXSxKAcatQ5ZJoZOL+RrYbllVhPznEAil8ifbsz1eqW80Smrt0aPHXrtB++hBNIhX1ljWdw6CATK7GyL6Stq6GdF59iK40McJLSGAKzzu8HswQ/JDo/cbHB18PmC2FTFZLlGot74w+8PbBg8fH9SmWycgdnJ4Htv+QnRsGL+RvYDA1x5YqojRlDVxKFwv753gsaIlyw6svPnsWJ0yp5heMT4EQk9/YobH/u9ynr1RfgFoiYD46TBQSSjkMz1wz1Cs/RpmyTKK8oOXNI/VlVnkdXfzQFX54m0K/j+NoyXsEbDa78mG3MDr7lwvvAZ+VFG1bBPvTuuUMogOl1FOxwvU+alVGUOcU/QntMJYaNLw6e1pUGYZKJ38egNBGegLE7thsHwz8RaAqzIL2gZOzwF/WAQVWFLJ/eLqvBm2Ck75JW8r/WlgbsSofi0C3sdF8xMEtEVn7ZrD78XVZeLtsDnBobbgSlkY0tW4A8phUvQ== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(396003)(346002)(136003)(376002)(39860400002)(451199021)(46966006)(40470700004)(36840700001)(2906002)(40460700003)(7696005)(82310400005)(82740400003)(7636003)(356005)(2616005)(83380400001)(336012)(426003)(66574015)(1076003)(26005)(6286002)(16526019)(53546011)(186003)(47076005)(966005)(36860700001)(55016003)(41300700001)(40480700001)(86362001)(54906003)(478600001)(316002)(70586007)(70206006)(6916009)(4326008)(36756003)(8936002)(8676002)(5660300002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2023 06:41:57.4874 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 70883233-7feb-4d28-c821-08db754745c7 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT015.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4874 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/27/23. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=74870817fb82f87461842b236393c88400c89be9 Thanks. Xueming Li --- >From 74870817fb82f87461842b236393c88400c89be9 Mon Sep 17 00:00:00 2001 From: Long Wu Date: Fri, 9 Jun 2023 14:01:00 +0800 Subject: [PATCH] net/nfp: fix flow hash table creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Xueming Li [ upstream commit 6f37cbf6323770ab5be1a9635c46845d7454e984 ] The former logic does not consider the simultaneous initialization of several NICs using flower firmware. The reason the initialization failed was because several NICs use the same name parameter when we call rte_hash_create(). We use the PCI address to give each NIC a unique name parameter and let the initialization succeed. Fixes: ac09376096d8 ("net/nfp: add structures and functions for flow offload") Signed-off-by: Long Wu Reviewed-by: Niklas Söderlund Reviewed-by: Chaoyong He --- drivers/net/nfp/nfp_flow.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c index 23dc9f06ce..5b562a1086 100644 --- a/drivers/net/nfp/nfp_flow.c +++ b/drivers/net/nfp/nfp_flow.c @@ -4038,11 +4038,21 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev) size_t stats_size; uint64_t ctx_count; uint64_t ctx_split; + char mask_name[RTE_HASH_NAMESIZE]; + char flow_name[RTE_HASH_NAMESIZE]; + char pretun_name[RTE_HASH_NAMESIZE]; struct nfp_flow_priv *priv; struct nfp_app_fw_flower *app_fw_flower; + snprintf(mask_name, sizeof(mask_name), "%s_mask", + pf_dev->pci_dev->device.name); + snprintf(flow_name, sizeof(flow_name), "%s_flow", + pf_dev->pci_dev->device.name); + snprintf(pretun_name, sizeof(pretun_name), "%s_pretun", + pf_dev->pci_dev->device.name); + struct rte_hash_parameters mask_hash_params = { - .name = "mask_hash_table", + .name = mask_name, .entries = NFP_MASK_TABLE_ENTRIES, .hash_func = rte_jhash, .socket_id = rte_socket_id(), @@ -4051,7 +4061,7 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev) }; struct rte_hash_parameters flow_hash_params = { - .name = "flow_hash_table", + .name = flow_name, .hash_func = rte_jhash, .socket_id = rte_socket_id(), .key_len = sizeof(uint32_t), @@ -4059,7 +4069,7 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev) }; struct rte_hash_parameters pre_tun_hash_params = { - .name = "pre_tunnel_table", + .name = pretun_name, .entries = 32, .hash_func = rte_jhash, .socket_id = rte_socket_id(), -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-06-25 14:32:00.305191200 +0800 +++ 0067-net-nfp-fix-flow-hash-table-creation.patch 2023-06-25 14:31:58.425773900 +0800 @@ -1 +1 @@ -From 6f37cbf6323770ab5be1a9635c46845d7454e984 Mon Sep 17 00:00:00 2001 +From 74870817fb82f87461842b236393c88400c89be9 Mon Sep 17 00:00:00 2001 @@ -7,0 +8,3 @@ +Cc: Xueming Li + +[ upstream commit 6f37cbf6323770ab5be1a9635c46845d7454e984 ] @@ -18 +20,0 @@ -Cc: stable@dpdk.org @@ -28 +30 @@ -index a224d01670..359423dc28 100644 +index 23dc9f06ce..5b562a1086 100644 @@ -31 +33 @@ -@@ -4106,11 +4106,21 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev) +@@ -4038,11 +4038,21 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev) @@ -54 +56 @@ -@@ -4119,7 +4129,7 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev) +@@ -4051,7 +4061,7 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev) @@ -63 +65 @@ -@@ -4127,7 +4137,7 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev) +@@ -4059,7 +4069,7 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)