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 AA583A0A0E for ; Mon, 10 May 2021 18:15:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D34A40140; Mon, 10 May 2021 18:15:31 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2071.outbound.protection.outlook.com [40.107.93.71]) by mails.dpdk.org (Postfix) with ESMTP id CEDB040147 for ; Mon, 10 May 2021 18:15:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GoD8TsOoK84ANy6bX4Neg5Hn1Q8fZ3fkopF81aKDOFHka/zmboQsNahu+oWiU4I1OxfSAcLHQdzWnCbAG+CxOXO2UVxPRYtS7HDiO4PSQ7WlLSaRzKzQZqrnMdx6vLlO/KVnY8pcmO86LXaUk3+M4IZ4p1RvsAZZnicBFWhnCRxoUm0oQvzkXddVgCw5Hz2Uo7/WG2Par1QwOE6hNGeJ9pFyE/qjH5e+QkkDXKoWZU7KHnAkFU1GiaoBXw3FB+bcDVlgncYewvVYD4q4mKkstuyy3ozCi99M884W6PxvLhdEtUCJMwMGDJKgIojtaImYtP3CjO1qJm9rC5fsM+wmtw== 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-SenderADCheck; bh=ttF9DgnpBcIQR2DRwc/z2yxHvpgYQN7QGR4rcYu/Mc8=; b=Yh3UQbzmCTnOfcXkKa4MigzXLZ0lGGnVO6hoXQ33xfCBjqWtZes1q+3jeNfgMFYoiCQg8oPpcQVJYeCS6d7f5g+hVoI0nbfv54fUva8a58st4mIJkFXtmC593pjH+CMfO0m/ty+nITLGp9lQP/CQPXtxZ9EPVPWigNudMR673pmUGZGvbJQ0p+RssxuVRioLv88Ahqd1l/ztwU2jZuyALRVbiJcI2pIelZmqgffyU+ZJ82lRiovE9IbUznDNW5k3Aj8O5wVSwpL9ZzC66Mz8sYKwOTibcBcG3qiIRNNnj6ixdiLC2iu6D43R5BzeM8lBYIu5b0sUxs4sHFSX+gwugQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none 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=ttF9DgnpBcIQR2DRwc/z2yxHvpgYQN7QGR4rcYu/Mc8=; b=JVn9/i7s3a6arHBaBW/qxJ55hfSeOifxga0cVqd5KKqWxK162jyfpI5GrN6k+5fqlofj5dgzzhQsj5JPeGSoy9ct1mIn7jUuALbvy71lyST0c8hWIOc225qJkqYBO5KNuzRiwoGB2r3Myx0uZYu3uhRrpr9/ZNPiBw17SHTkwbXD4LcQjafyz1ixpHPwrounPXpnOCA51V2bPT8iLWwEDGPncXaDaFulSPR5yXRRE3A8aigQXgr8REqYB5xFqUu0PnzHHa1uH9XNRB2fta/HdiYryeoXh9pEKswlzuB7nCp8yeYd5sc0e9M3J2zAC9q1nWd4ZPf6RIIsAefRfNtpzA== Received: from MWHPR2001CA0022.namprd20.prod.outlook.com (2603:10b6:301:15::32) by CH2PR12MB3846.namprd12.prod.outlook.com (2603:10b6:610:24::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Mon, 10 May 2021 16:15:28 +0000 Received: from CO1NAM11FT061.eop-nam11.prod.protection.outlook.com (2603:10b6:301:15:cafe::86) by MWHPR2001CA0022.outlook.office365.com (2603:10b6:301:15::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:15:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by CO1NAM11FT061.mail.protection.outlook.com (10.13.175.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:15:27 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:15:25 +0000 From: Xueming Li To: Matan Azrad CC: Luca Boccassi , Maxime Coquelin , dpdk stable Date: Tue, 11 May 2021 00:01:14 +0800 Message-ID: <20210510160258.30982-125-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1c529be9-72a9-48fa-97df-08d913ced355 X-MS-TrafficTypeDiagnostic: CH2PR12MB3846: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ecoKB1+yBbEgfEZNou/CMwLj8yMLdh7X6wJBHN17nchCXsLL0NgqX2+BNRkPlAX7jMEzKbx3+hC1RT28g8iBUdfIu/rfNB1yZie/SEtMYIRfNdrJMFPHrBn5HmjWS0rzEQCWZjWVOlm6EId9M+TXQY8Ydys8bQn4a6oR230ttidy5zaG3ev/Hx33BTcy3DtUwyFcL6y2AZL6x2EG0WuWOE6GUGKjVC70uTXbvtSdDAbWL3Ot7+fJCRimCGzSkkc86nxMhQcwdKOKN/+RXglrjGERlRWwtdpk+XErKyoQ+P19AFULATkIrKo/dqXNrxLGNQFTbkmsz0m4+AmoeiFGcWDuqySqSm1yymLSd+aN02RMmLGOsTD0BEbcSye6MOjHDajeUMlzhBhD0dbLENp9aFumFuzMMChgzT55Bi9k61d1WEC9TcWSOXPL+uySqGJLHoevK5Ma01FFMVvWJZMj3z60WYF9HKI+bEH3ywqNiVwGI/6Ve6XdaU2SwWLmaH2tbAnh6d2v23DlyOPq/OonT89HWFOmx3/vXFXs4+mbIHGvXO5Pb/8uhkeoYnc6h2HmmUvHRjNhNEXnj5muzSDkr+Q7XVITv1QUbMhSz6EqPw145g/sjTcMI56nUG0rOieQOE4yPJilbEatmHWz7YsnB0FKvnahX4l+Kj4AKyUc4JNzCSDHq02yfEYzYbT02YHTqmvGnE0PWILXYUPLM9VKt7yi8v5NiLQloHBf38W1tiSZzDZhArBr8QVJOUxJ4XixjBIlaS6YnShEePL17Aj14Q== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(396003)(376002)(136003)(346002)(39860400002)(36840700001)(46966006)(186003)(8936002)(2906002)(7696005)(53546011)(37006003)(356005)(426003)(1076003)(36860700001)(54906003)(36756003)(2616005)(6636002)(82740400003)(966005)(86362001)(26005)(16526019)(5660300002)(316002)(83380400001)(6862004)(82310400003)(336012)(70206006)(478600001)(8676002)(47076005)(7636003)(4326008)(70586007)(6286002)(6666004)(55016002)(36906005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:15:27.8339 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1c529be9-72a9-48fa-97df-08d913ced355 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT061.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB3846 Subject: [dpdk-stable] patch 'vdpa/mlx5: fix virtq cleaning' has been queued to stable release 20.11.2 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/12/21. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/8d3f8b347f6c8c47b99d549db7875e15c975ba57 Thanks. Xueming Li --- >From 8d3f8b347f6c8c47b99d549db7875e15c975ba57 Mon Sep 17 00:00:00 2001 From: Matan Azrad Date: Mon, 1 Mar 2021 10:41:31 +0000 Subject: [PATCH] vdpa/mlx5: fix virtq cleaning Cc: Luca Boccassi [ upstream commit 846ec2ea75adc6ce00ad79485fca5d9943ebecaa ] The HW virtq object can be destroyed either when the device is closed or when the state of the virtq becomes disabled. Some parameters of the virtq should continue to be managed when the virtq state is changed but all of them must be initialized when the device is closed. Wrongly, the enable parameter stayed on when the device is closed what might cause creation of invalid virtq in the next time a device is assigned to the driver. Clean all the virtqs memory when the device is closed. Fixes: c47d6e83334e ("vdpa/mlx5: support queue update") Signed-off-by: Matan Azrad Acked-by: Xueming Li Reviewed-by: Maxime Coquelin --- drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c index 3e882e4000..87704c782b 100644 --- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c +++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c @@ -103,13 +103,8 @@ mlx5_vdpa_virtqs_release(struct mlx5_vdpa_priv *priv) for (i = 0; i < priv->nr_virtqs; i++) { virtq = &priv->virtqs[i]; mlx5_vdpa_virtq_unset(virtq); - if (virtq->counters) { + if (virtq->counters) claim_zero(mlx5_devx_cmd_destroy(virtq->counters)); - virtq->counters = NULL; - memset(&virtq->reset, 0, sizeof(virtq->reset)); - } - memset(virtq->err_time, 0, sizeof(virtq->err_time)); - virtq->n_retry = 0; } for (i = 0; i < priv->num_lag_ports; i++) { if (priv->tiss[i]) { @@ -126,6 +121,7 @@ mlx5_vdpa_virtqs_release(struct mlx5_vdpa_priv *priv) priv->virtq_db_addr = NULL; } priv->features = 0; + memset(priv->virtqs, 0, sizeof(*virtq) * priv->nr_virtqs); priv->nr_virtqs = 0; } -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:29.844863400 +0800 +++ 0126-vdpa-mlx5-fix-virtq-cleaning.patch 2021-05-10 23:59:26.520000000 +0800 @@ -1 +1 @@ -From 846ec2ea75adc6ce00ad79485fca5d9943ebecaa Mon Sep 17 00:00:00 2001 +From 8d3f8b347f6c8c47b99d549db7875e15c975ba57 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 846ec2ea75adc6ce00ad79485fca5d9943ebecaa ] @@ -20 +22,0 @@ -Cc: stable@dpdk.org @@ -30 +32 @@ -index ef2642a656..024c5c4180 100644 +index 3e882e4000..87704c782b 100644