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 8BE0641D49 for ; Tue, 28 Feb 2023 09:56:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 88B144114B; Tue, 28 Feb 2023 09:56:48 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2100.outbound.protection.outlook.com [40.107.236.100]) by mails.dpdk.org (Postfix) with ESMTP id E0E5E40EE4; Tue, 28 Feb 2023 09:56:45 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HP2L19ZZKtXbUC7dadDjz6pr3ll1nTWer2r024ojs/migtKryn1zeMHVCiasDX4no5Xnw+wmcNYecU/1aQR/6PeznPQThaY4ytVZ6AaadkRkA/hNzIKZwq06ZZJwL63cDFmnAniGQH3DgNGFG84spTbNTiHaH3lZwsBcPv9fWq+qlRrrwnHqBAvCFkNEKbPo6qww1Xc5t6F1XNu8SSPkg11hyiNbzSa9Ov95/rZisuTiym/mf1O1GG3saZFgIP1KgE83/MgGXuSxIJ0BBZHi6QMRiIH8+WIyXxFlvwcnyFbGY4uzZEXTQ4U/dNZYt5GaqzgUpag+wFn5wkgNIfcBdQ== 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=0kVCw5u964LGsxTZnELjzB6uqaRccywCKviQRGESM6w=; b=gykx62rgP+1ZKTghYzWuo6eRsyO3BJa0o4iKGc1HD0iFf7mx7PeQcLfS8Wr72IinmOjJafcgtRbHI6Eiu3tzZ8kfuI3PYdZjZjOPCZylWe9JrWZBxuCUXSWVtqlQyenVD1JYbH0IuHNwUy8bV3qIwtUdSFMPxhWULVno1W0ES73qYBwyMUhS4UbR6eUcIcPOaoM7qn82w9nkSgJ5lZDFLpS2w8jl7U8ZL9zDbPlXKhW0UbbGevvGDesPewHdxV6pqEdotgUYVnVBc7379ZHi1Tuu6XAPBNV/vgnCxbv5ZGOsFVZATvA6eENX10bbJjMbg8u6lOZd9cFOSzn35O65ig== 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=0kVCw5u964LGsxTZnELjzB6uqaRccywCKviQRGESM6w=; b=TZU2ZYiRM4sUWlmANTEg/fAEC2n4XuGEhOV1JqL8kJOPHAINwOpDaI+xQEjcieeT1wZZkbF66+rJbv3Rn2CnokCB1wyCf/MQ/tp0zH7WcW3/eOU/KJzVplY6e4vc0781rep8KmCF43jFII0ykApaOmeCGhhdS+ITqwYyBee7k4M= 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 BY5PR13MB3825.namprd13.prod.outlook.com (2603:10b6:a03:22a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.30; Tue, 28 Feb 2023 08:56:42 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::7ea4:e421:5dd5:9f4d]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::7ea4:e421:5dd5:9f4d%7]) with mapi id 15.20.6134.030; Tue, 28 Feb 2023 08:56:42 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Jin Liu , stable@dpdk.org, Chaoyong He Subject: [PATCH] net/nfp: reset profile config while modify profile Date: Tue, 28 Feb 2023 16:56:11 +0800 Message-Id: <20230228085611.498197-1-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2P153CA0039.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c6::8) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|BY5PR13MB3825:EE_ X-MS-Office365-Filtering-Correlation-Id: cceb2ba5-ab77-49f3-f223-08db1969b5ed X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jiKwhuniY0BC7hW5Opshv/iVTbPfy9mStevXyBa8iSv5DNc6PiHzK3WfJ3gZwr8tawEifmBsf/GkJkA9+1g3XCR8BrKhtHe4B+ilWaL+G31DnqQ4HSOeUSLbd/0hvOjQ6V5cSec5xU/0jCEPBRWCPJK7dbDAnDKAA81DR/oxRAVvN60Iit8jJoaupaY+Y/sP8c4GbAA/h2SCqKVzntK/PDn4LfAZU4kBC2Tml/ykN21pe0tdR2gu04FXCGzOkXJtSNAH7OqsCwZlQzFYbst8EFnodCmUH5s5UopmZVVyOjjge6XChJvve+1MviYy2lmH9SKr6nwezc+j/q0atIfmu0vinP/ZB1QZGHLVob61XYuJEzFr57NMDBX5ujP5xBDGtAUIdrGbVImBXNzRUpOaT0VVJO/mDUUf6B0RoAuXdqxbGxZ9K9P0J7JcSNeMwUhLTYcmy/fcHo8ye4Pu9+3sf2ML73B71k61hUUmC47kBFis5txeVoF7u5Hj4vho/R6hQOY79NWRhEzrRFW6cA5fU84AcLhXeVjgXyArM7Hajl1RnUzj+bFoMPDYxnoDsFVNm6CY1nFtizVEQADCDttQ4tyT/uXa9vHxWkZtoMqy7LUkntvvvv4JI7nqWRVtpAWqHk0ecH/13rMZV0m8zZvX6PU0xznk2LUJqMMt7Q7V4aQa6cKqnsqfqSOi4f3DNmh99EhHZM23YebRhYireg365g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(366004)(39830400003)(136003)(346002)(376002)(396003)(451199018)(38100700002)(38350700002)(86362001)(36756003)(44832011)(2906002)(8676002)(66946007)(66556008)(66476007)(5660300002)(4326008)(41300700001)(8936002)(6916009)(52116002)(2616005)(1076003)(6506007)(6512007)(26005)(83380400001)(186003)(66574015)(478600001)(450100002)(316002)(54906003)(107886003)(6666004)(6486002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RTI3QWdTZnMwRDhhS3NlTkFMTVJzVmY2R1E0dnFaeTZua0UrUS9QMVJMQmc3?= =?utf-8?B?VUh5WlZYeWlzWDdra2xWa2JpRXBEOEdETUNTZU9xSURkKzRMbmgvMGpqdFQ5?= =?utf-8?B?YlFJUXd2YUpya1J0U2c4NjNLV0w0UnhYNE9OQThUNnNiVTVDQ1hEUi90Tlg0?= =?utf-8?B?Zm5kOEMrbml4Tm9VNHlkZm05K2VEakZLbHdyY0kwN2l1RXNwR3dBRmZub0VC?= =?utf-8?B?UnBpQU52MDJCMUkwTDQxM2o4bm9FTTVWaWM1Mit1UUw3bGRVNCtkb0hWY0c0?= =?utf-8?B?TjRPa3dubWZqU2poTElHWGVDVUNNWURaeGdzTFVZMWxuSlRVMHg1NEttbE1q?= =?utf-8?B?RE5YOWpsbDRSdTlTRWFQUnEzQ2tZL3ljaW5SUURIbXZXSzd2bDJ5TU1h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corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: cceb2ba5-ab77-49f3-f223-08db1969b5ed X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2023 08:56:42.2274 (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: gMKga+zMnqIzoiQ+IRFWkHSvMWKF6u7vY71P+vsUKGX3hv9qMnPVYInyL23KiwWmkmCJvMY29b76PpgcZ6DjY5Qxk8kOUV/mNQnCOHMP/IA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR13MB3825 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 From: Jin Liu While changing meter profile from pps rate limit mode to bps, the profile configuration was not reset, leaving the profile in pps mode. This lead to incorrect operation. Fix this by clearing the profile before configuring it. Fixes: 434c66e7e55c ("net/nfp: add meter profile options") Cc: stable@dpdk.org Signed-off-by: Jin Liu Reviewed-by: Chaoyong He Reviewed-by: Niklas Söderlund --- drivers/net/nfp/nfp_mtr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/nfp/nfp_mtr.c b/drivers/net/nfp/nfp_mtr.c index 356bcdb370..5f85106f9d 100644 --- a/drivers/net/nfp/nfp_mtr.c +++ b/drivers/net/nfp/nfp_mtr.c @@ -241,6 +241,8 @@ nfp_mtr_profile_mod(struct nfp_app_fw_flower *app_fw_flower, /* Get the old profile config */ rte_memcpy(&old_conf, &mtr_profile->conf, sizeof(old_conf)); + memset(&mtr_profile->conf, 0, sizeof(struct nfp_profile_conf)); + ret = nfp_mtr_profile_conf_mod(mtr_profile->profile_id, profile, &mtr_profile->conf); if (ret != 0) { -- 2.39.1