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 EB50F432C1; Tue, 7 Nov 2023 07:52:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A0CA0402BC; Tue, 7 Nov 2023 07:52:41 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2042.outbound.protection.outlook.com [40.107.243.42]) by mails.dpdk.org (Postfix) with ESMTP id 859814003C; Tue, 7 Nov 2023 07:52:39 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kodTZdB5Ae48f5GGvP0JUUYATpyaOsGUii0ZKW9FiD+PqJyXWAzwgJf5K0hIw4VHdguGEV6mFbqEiA5XdriFWUjHF1OzbTJgEjDn9XtvyEzw1JwpihUA4N8tli/1koPY95Z22Js/KsfGU+YBpnXHWjzYSRu4RdUF9aAfgkFmiTt59OjsWMdIBZxbxLBi1Sv7VUhqRWDLW8qozknjYnOjmZUjYsb8xCyrRa7S6Xpgek9O3MUY+a64d95wZawd1MWLULSjxvbAQ4X4jEejskg5Ck3FOl53jZtu2n5ky0eR1KCt6powupRct7/kTSgOPMpR1qWZoxIueSck7YScwkV8dQ== 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=yBLROhRvGRsK8K8jEiZgypp97DXP7zmAGSB4xR2h3aE=; b=Wu1xFBcpV8L7/2eu2YdE9jhAcCFNn4D8rGj5KDG5vPTFjc9BGc8rFLlQpp0v/cn/WTITXN38lvsad3UPF8sAAk+PO3T5qdXnTLx46yTfLws+QSsHDblmI6U6ELlJ1RCM9y1XKmqSDgcP40jYfX0Jecm+xGQ6wt37ejlV0SSegnvl5ZUFHNBmgpQaabI2DWWK4SABFa1ssV3rhc1Cb/AxpFlvrJrt7LlDUt7g8N09BcOTYc3aICOguBrV5C+lqNrMWBPZjDKk2QH62D8QfenVF4GZapyY1cTde/Wrt+omMZsZC5FOR83lUGB2bj54r51Yc+Ooyuxh4ExMGk0pCsyanQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; 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=yBLROhRvGRsK8K8jEiZgypp97DXP7zmAGSB4xR2h3aE=; b=hupaHpt1wc+cyNo9SINCbjMCiErvKZVgYMgKZBV4LWyS7t8Ud/mqAC56r3q9HVvvtL/hCKzIlc5qs6IobcWLn8ehEfn+5T0aZzcZpakwgfzoa/qUaPciejqVbzrqm8wjo2UGM46+YpziITi0QIjdoxEEFPFAVm3UqlzG+iecsdE28KVPFvsqxqjvKm+5kcBRXE5LmB4Do8Yjch5VUA7I+tuvwzZySm1jy0ue5KvXapwLEy0WWEa2S1EUq75LUMKQiCiz6+o4htq+BDKXlD/LCLLopmstHgm+jW8jL4kG2gRrom+LMvOBNLhdDeBisZWCZ5zwYQd0Io0SVFLIdlq29w== Received: from DM6PR12MB3753.namprd12.prod.outlook.com (2603:10b6:5:1c7::18) by BL1PR12MB5190.namprd12.prod.outlook.com (2603:10b6:208:31c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 06:52:37 +0000 Received: from DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::5fd9:c0c:398c:7dfb]) by DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::5fd9:c0c:398c:7dfb%2]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 06:52:37 +0000 From: Slava Ovsiienko To: Weiguo Li , Alexander Kozyrev CC: "dev@dpdk.org" , "stable@dpdk.org" , Weiguo Li Subject: RE: [PATCH] net/mlx5: fix the unlock mismatch issue Thread-Topic: [PATCH] net/mlx5: fix the unlock mismatch issue Thread-Index: AQHaDtSARstnb8HRqU2M9a1zjI4wZ7Bub+8Q Date: Tue, 7 Nov 2023 06:52:37 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM6PR12MB3753:EE_|BL1PR12MB5190:EE_ x-ms-office365-filtering-correlation-id: 785ebc80-6ced-4143-1c23-08dbdf5e20cf x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PntAFoJdgFdN8hjkEKyUA14dV988MCYB8EUTwBxMb88no/51uzI2MyZ9KaAV7q6FljOZWW46mriFVOEzj0/3Vm3MnIH4xLAv8kVhM/uJ5MRJoSGygws9h7SIDM4qKsO1OFNcxBm/n7yHfb7ZxgNCFYkyY8bubZokAlGP1zJAdDkJoTEHcxHtDr6iub973GYVCUYH2Bf3mI/fOFETelsKBXHOR0h8/QE/6G3emgpjicMjJ2WZp6BHEtzz2gEW4X8YaC8EJ+1IkuJMBhtyChWCgEyQC4iPPlUMHN0dIrk4FTn+Z4BCuvrMiAbxKJF/hF8emfOjVTcy2yjmvaeGMMX4fC0u+GKpYmjEHetHoAqB551/i15+v7xMK9N2k1scWjh2DfDUuzYhcN9XzfVARBWXRY6zHcqYC2ZW19COK5Bv4UZF+4owfubP8gCpyvq4tMBsk6P/NXaZKk7vGGa+r6guZNFASiHucZM1wMqPRViYo7p7IvBlXN7UCAtgbaYO7+h3dXuA8jR7yXsLBUj5Tjfd1rFUx9Rjs0LQ7TAL2/JuabWrx9WSfKAJclVwnhS21Qvtsg1Eew0VLY9rDm9P2IhH+JP04/z2jquXuaF/Zn0vSU4aN6bjFerj0z3uWumrqTme x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB3753.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(136003)(396003)(366004)(376002)(39860400002)(230922051799003)(186009)(1800799009)(64100799003)(451199024)(478600001)(71200400001)(110136005)(6636002)(66946007)(76116006)(54906003)(66476007)(64756008)(66556008)(66446008)(26005)(53546011)(6506007)(7696005)(9686003)(316002)(4326008)(8676002)(8936002)(52536014)(2906002)(4744005)(41300700001)(5660300002)(122000001)(33656002)(86362001)(38070700009)(83380400001)(38100700002)(55016003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?bJESbctQd7e/Km+sJhN5jbeujE47L1/Rf9L58wGHcGCyQshAKB50HF0YRNHu?= =?us-ascii?Q?8ZuHybi9AJfu7EtB+CCCnneZNulVvDfpW6V016+JproGP/Rd3onc9A/6SnDs?= =?us-ascii?Q?9iNWfwLZQBbGIoeu7EK+WuWkFx1LqaIjfjCnOAAY4xNkzq+cGhM+ZHD3D+tk?= =?us-ascii?Q?0+xhsGEsbn3qHUZPZu692t/inSvK0mzwTiPQoC1STN+j/GC2y05tr1876/Ho?= =?us-ascii?Q?QLq5lW+GKijD+1rIgVZiNeSlyrtpsVFPJxxnlGAzAjOZ8HyCZ8RKSMP9ruSe?= =?us-ascii?Q?GkGVzsKgkCqaTGRlwhPkuRjyJyMJIY1S75E7FJ7DGKFe9KuXu8/+iV4Xoyvh?= =?us-ascii?Q?N4L2L4OwTpW35sQXuNuKCYIfHcuiM8H62NzQ6CN6KioudoJZ6TjTN5Ji5czw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xIHjaQVMrjgNVDlErr+1qnI?= =?us-ascii?Q?fNd7a3X7DU3JDs/OWdIpilOAF3w/uDR5TL4iRkswXbTp3nzlclXoPQpu5Tti?= =?us-ascii?Q?p2rU4oPZFq6IBqQez42P8c3UV8FcDwBnAVW5TXenJQdeRePaBnKY0uqB/TNZ?= =?us-ascii?Q?TZm3vgXAWrIzcNvqT+nUQ/HmEQHIf7hOOPcrNLpy7l8cxAuXBy6HANGNhWqn?= =?us-ascii?Q?/NMZqkQvNT8jVF3xbEIhswkEHSqxCfLFMwlbNzaxbN6QJyjQUTmJeKC/25JD?= =?us-ascii?Q?tJcG15Oesfp61OoJufhhhwpnQRXrhf2bs3+ZbukX?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3753.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 785ebc80-6ced-4143-1c23-08dbdf5e20cf X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Nov 2023 06:52:37.3332 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 9qOUE/ScuhCFefX9Rna9pkCCW5gifpVAFifMOTDYcomcVTaZc72lXqsjWv5CD05/LS3l2QDnYZC1Ly9bq61NUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5190 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 Hi, Weiguo Good catch, thank you. With best regards, Slava > -----Original Message----- > From: Weiguo Li > Sent: Saturday, November 4, 2023 6:08 AM > To: Alexander Kozyrev > Cc: Slava Ovsiienko ; dev@dpdk.org; > stable@dpdk.org; Weiguo Li > Subject: [PATCH] net/mlx5: fix the unlock mismatch issue >=20 > The 'need_lock' parameter controls whether the function acquires and > releases the spinlock, but the first unlock operation occurs regardless o= f the > 'need_lock' parameter. >=20 > To fix this issue, the spin unlock operation should be invoked within an = 'if > (need_lock)' block, ensuring that the function only unlocks the spinlock = if it > has previously been acquired. >=20 > Fixes: 48fbb0e93d06 ("net/mlx5: support flow meter mark indirect action > with HWS") > Cc: stable@dpdk.org >=20 > Signed-off-by: Weiguo Li Acked-by: Viacheslav Ovsiienko