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 A41DBA034E for ; Mon, 21 Feb 2022 16:38:11 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9F4154013F; Mon, 21 Feb 2022 16:38:11 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 839E741147 for ; Mon, 21 Feb 2022 16:38:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645457889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a7NBhGoYTmH7X52G625JbN5IPMYWIcSNzPKSMMkct5k=; b=WZUZTl2Cl+DSssc/WUqYmB4vw3Ym4OpGVw6XkgTjPJ2RH78a6VGyCBtS81nO1Qd1fZ16bO bdEcrkjp91LgGQxpV2dBVUyF67rtl/B6ma7t/iO0x7te5yErTqKmmaozwW/nnmM1L7XKA+ am5oMdrncaVHgphRlsjE/FiegBcfvB4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-593-adMvN4zGPIKYTfdZHo5qbA-1; Mon, 21 Feb 2022 10:38:06 -0500 X-MC-Unique: adMvN4zGPIKYTfdZHo5qbA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 68F7C801ADA; Mon, 21 Feb 2022 15:38:05 +0000 (UTC) Received: from rh.Home (unknown [10.39.195.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5DA767E2EF; Mon, 21 Feb 2022 15:38:04 +0000 (UTC) From: Kevin Traynor To: Michael Baum Cc: Matan Azrad , dpdk stable Subject: patch 'common/mlx5: fix error handling in multi-class probe' has been queued to stable release 21.11.1 Date: Mon, 21 Feb 2022 15:33:50 +0000 Message-Id: <20220221153625.152324-41-ktraynor@redhat.com> In-Reply-To: <20220221153625.152324-1-ktraynor@redhat.com> References: <20220221153625.152324-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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 21.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/26/22. 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://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/751bca90b1e70e868e4614cfe232440a9c77695f Thanks. Kevin --- >From 751bca90b1e70e868e4614cfe232440a9c77695f Mon Sep 17 00:00:00 2001 From: Michael Baum Date: Thu, 25 Nov 2021 00:02:38 +0200 Subject: [PATCH] common/mlx5: fix error handling in multi-class probe [ upstream commit 8928997a1388ba1b045a55732acced4baf00b21d ] The common drivers_probe function calls in a loop to all probe functions for classes requested by the user. After it manages to probe them all, it updates this on the device in the "classes_loaded" field. If one of them fails, all those probed to it are remove using the drivers_remove function. However, this function only releases the classes in the "classes_loaded" field on the given device and misses the newly probed classes. This patch removes the condition from the release function, and ensures that the caller function sends a more accurate parameter. Fixes: 8a41f4deccc3 ("common/mlx5: introduce layer for multiple class drivers") Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c index cc13022150..22ff273819 100644 --- a/drivers/common/mlx5/mlx5_common.c +++ b/drivers/common/mlx5/mlx5_common.c @@ -617,5 +617,4 @@ drivers_remove(struct mlx5_common_device *cdev, uint32_t enabled_classes) int ret = 0; - enabled_classes &= cdev->classes_loaded; while (enabled_classes) { driver = driver_get(RTE_BIT64(i)); @@ -666,7 +665,9 @@ drivers_probe(struct mlx5_common_device *cdev, uint32_t user_classes) return 0; probe_err: - /* Only unload drivers which are enabled which were enabled - * in this probe instance. + /* + * Need to remove only drivers which were not probed before this probe + * instance, but have already been probed before this failure. */ + enabled_classes &= ~cdev->classes_loaded; drivers_remove(cdev, enabled_classes); return ret; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-21 15:22:45.540290013 +0000 +++ 0041-common-mlx5-fix-error-handling-in-multi-class-probe.patch 2022-02-21 15:22:44.086704114 +0000 @@ -1 +1 @@ -From 8928997a1388ba1b045a55732acced4baf00b21d Mon Sep 17 00:00:00 2001 +From 751bca90b1e70e868e4614cfe232440a9c77695f Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8928997a1388ba1b045a55732acced4baf00b21d ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org