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 EF12AA0032; Mon, 22 Nov 2021 14:13:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6D5D44014E; Mon, 22 Nov 2021 14:13:00 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2062.outbound.protection.outlook.com [40.107.223.62]) by mails.dpdk.org (Postfix) with ESMTP id DF7444003C; Mon, 22 Nov 2021 14:12:58 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gSrEtuyy4zSpv9knhruumJoedZicziv4qf0tu1IVNn7wmqHXmqxH8PigWXBAvRxkIAU+pc7itV/6ICnZ7Wyvw7ugh1h4JC5tqKRYo68c8zl2v/qGkwcJCH11GcHdg/FHP5itqQLMFc59V3xjhW8kHKhih/ds4HAhOOv6eKiBz1lztqxgQbhs2dktsWl7PoW2UlyLXikNiV8Ypvsy150iFshee7pGZ5xb0TC00tiymFEyfpL9I1hQbrEDKw4CG2eod+isNo6ZSFGALgFNveklN8P0qSfi22hwzBJrsBFv9s75zUr4w0c9OupnBihA2NMxXl+LDBm+96jezO4aimXJUw== 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=dQDyydX6w5R4LI+3DOaLIt/FdiAmyK5t9ets6aDBB10=; b=iKP1Reai5ZEN3rDD+ZhoSmkoWBImyq8dELyOp1Ze5WB7m+YRqfOgOsdh151sVmXBb/Xuo/77cRNfgjjUkybnczaERE4+vXAPXFEGLRMpKf3HvP704Z63hM4vwGJoBdxBeTnZuwWXP1882lLu5gih0xF0d1nuKvRzZgyW0Qn0TxOJPtFLhkLnyhgtdg+Cqn9WxQl8SaRxpGJADHZiDuaiJoSpjNWxZg+KLdqdRqmJ4EtnSjaGzsmmZXCn7tXXQrceBj4lK8hCd+4fVUMLdRB1i/G27gG5DhxbsBSFryNmblJQh0n+WbzVjZTNAbMys1ok+jQ1c553dWhwfoGZL+WtxQ== 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=quarantine sp=quarantine 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=dQDyydX6w5R4LI+3DOaLIt/FdiAmyK5t9ets6aDBB10=; b=pu0pDZ00hJPPTQjkyr1si7C6kGNAR0mq3YVdTc1Qcy48FmmNuExlnJEvM9GXMpv3DXRBJGoSOqzaw7FjIgsiwFOztixk1mBT/nCCADWhgLMcEZiSn8cMEJt9NHdXgSYXHrOTnfNd9zNs5kk/Tc/BwwrCLJ1DCD3rZhqX6DtjrC7DYf/Szs6WUo5HI3kQOWBegJxOkMluYExS/PpqMKIpbzQEhhcv13eFcuqh1LvEEHnJwXY/CbUF+4KpnsoVufXIJitH/Y1lJ7QzP8IBTlCWY9un5MramHfoDQAjlaTc6KK8gqmAoONsnwPo5HphURidP3u3xZN++3nurKH3Jn6j4A== Received: from DS7PR06CA0002.namprd06.prod.outlook.com (2603:10b6:8:2a::16) by BL0PR12MB4915.namprd12.prod.outlook.com (2603:10b6:208:1c9::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19; Mon, 22 Nov 2021 13:12:57 +0000 Received: from DM6NAM11FT003.eop-nam11.prod.protection.outlook.com (2603:10b6:8:2a:cafe::f4) by DS7PR06CA0002.outlook.office365.com (2603:10b6:8:2a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.21 via Frontend Transport; Mon, 22 Nov 2021 13:12:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) 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.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 DM6NAM11FT003.mail.protection.outlook.com (10.13.173.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4713.20 via Frontend Transport; Mon, 22 Nov 2021 13:12:56 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 22 Nov 2021 13:12:55 +0000 From: Matan Azrad To: Maxime Coquelin CC: , , Xueming Li Subject: [PATCH] vdpa/mlx5: workaround queue stop with traffic Date: Mon, 22 Nov 2021 15:12:35 +0200 Message-ID: <20211122131235.3270961-1-matan@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 36d39db2-5e08-4232-987f-08d9adb9cce5 X-MS-TrafficTypeDiagnostic: BL0PR12MB4915: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Xi0QSfK/7ZNqmdwYtj9KnVaRXLP4z4rJCzCnmPgD7C8aQhFZx9L08hwXnNc6Y9SwlI78vsOGz6qeIxtVLjWFk8pqLU8GZeNbhz6/y7KxwUpWCGHKPUWuHG1GeGozqQPL2js1rptLri1804EFMvwcYIonIsV6hr211JZFEO3+y0HdAL1HEV0xK4bB1VGuA2VLm9UDtsD3cz1WSK4MnhQdoDIsF1cF463ZjelGI9OJBf1SDEXA0yUEIFdxaOvN+oowAIlPqrsTkRrH6APF+acNz5SK+1MslXU1MurBSooiNMpltsNxMNZBDvsbhC66k1tIHNAixUlhETW9xMvfGBsRUb88+3glkDPxJR8OKa4ok42DgT/1Y/S0ctrlwl6agAUSjnJ7Wfu5gQm/WrFUNnwJJx/nMRvvy12rzfo2GM96VKiqCln5xhifgS0h4dz37V4/Ag/NGtVCT9Wt43HD9CG64Uy2tBcqoJ/6yFZ+DtTdydnzXtd0WYPEZWmFifcshfNhM+dzZ71ThIh5UJA9c9YNyV22rFtj5Ftjuv/rHz2KTVQRoxfGYIZYArau+yl/IIQKQ/w9eC84ld0xBeimfTk6ZsCFca7jgxLHOcG/IZWo2xF3R8GXXQfnPvN45Z3kZCbDdAG2FPOjGrRNOE8Gslg0Gf0WeV4ID1ZlxEsQlMxL94NGSx6o2RnLZalJ25PQ+OlBnFmT3+TUN/8wYthTVL6Kvw== 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)(36840700001)(46966006)(8936002)(426003)(36756003)(2616005)(1076003)(508600001)(6286002)(82310400003)(55016002)(6666004)(54906003)(7696005)(107886003)(8676002)(5660300002)(70586007)(36860700001)(36906005)(7636003)(70206006)(4326008)(316002)(86362001)(16526019)(6916009)(83380400001)(2906002)(26005)(47076005)(356005)(336012)(186003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2021 13:12:56.6630 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 36d39db2-5e08-4232-987f-08d9adb9cce5 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: DM6NAM11FT003.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4915 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 When the event thread polls traffic and a virtq is stopping, the FW loses synchronization in the virtq indexes. It causes LM failure on synchronization between the HOST indexes to the GUEST indexes. Unset the event thread before the queue stop in the LM process. Fixes: 31b9c29c86af ("vdpa/mlx5: support close and config operations") Cc: stable@dpdk.org Signed-off-by: Matan Azrad Acked-by: Xueming Li --- drivers/vdpa/mlx5/mlx5_vdpa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c index b9e84dd9bf..8dfaba791d 100644 --- a/drivers/vdpa/mlx5/mlx5_vdpa.c +++ b/drivers/vdpa/mlx5/mlx5_vdpa.c @@ -250,10 +250,10 @@ mlx5_vdpa_dev_close(int vid) DRV_LOG(ERR, "Invalid vDPA device: %s.", vdev->device->name); return -1; } - if (priv->configured) - ret |= mlx5_vdpa_lm_log(priv); mlx5_vdpa_err_event_unset(priv); mlx5_vdpa_cqe_event_unset(priv); + if (priv->configured) + ret |= mlx5_vdpa_lm_log(priv); mlx5_vdpa_steer_unset(priv); mlx5_vdpa_virtqs_release(priv); mlx5_vdpa_event_qp_global_release(priv); -- 2.25.1