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 E8E3CA0555 for ; Wed, 25 May 2022 18:29:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E42B8400EF; Wed, 25 May 2022 18:29:14 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 444E74280C for ; Wed, 25 May 2022 18:29:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653496152; 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=0mM8N/ERJV4tEbgtDslCZLe2wlFAqbcdceJ959QIk/w=; b=CQNCBAzz7UyYikJ4UE6MJhMAw7MzX0GkOl+I3alk8/60yX0v5pNng0HnpEWYo/gg1PGEA6 ZTQd/zJhQ5DgnXAJOhpfiPqziliL/H81bFwp/OntU2fp1rWE9VH8ceD1l+FIFbzxKgic7v NYe1QFZJQ25uPwrV7qyyLH/cNVW6slA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-532-4wKnY4fLNGKRfwZn4WGczg-1; Wed, 25 May 2022 12:29:11 -0400 X-MC-Unique: 4wKnY4fLNGKRfwZn4WGczg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2AEDF101036A; Wed, 25 May 2022 16:29:11 +0000 (UTC) Received: from rh.Home (unknown [10.39.193.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id 33BB42026D64; Wed, 25 May 2022 16:29:10 +0000 (UTC) From: Kevin Traynor To: Xueming Li Cc: Maxime Coquelin , dpdk stable Subject: patch 'vdpa/mlx5: fix dead loop when process interrupted' has been queued to stable release 21.11.2 Date: Wed, 25 May 2022 17:28:04 +0100 Message-Id: <20220525162847.711753-12-ktraynor@redhat.com> In-Reply-To: <20220525162847.711753-1-ktraynor@redhat.com> References: <20220525162847.711753-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 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-default=true 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.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/30/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/d24d6395d642237cc9177c270eacb6b57f8b9c14 Thanks. Kevin --- >From d24d6395d642237cc9177c270eacb6b57f8b9c14 Mon Sep 17 00:00:00 2001 From: Xueming Li Date: Sun, 8 May 2022 17:25:49 +0300 Subject: [PATCH] vdpa/mlx5: fix dead loop when process interrupted [ upstream commit 301ef4a18586ae1763206d7e75d9eddb58a7d05e ] In Ctrl+C handling, sometimes kick handling thread gets endless EGAIN error and fall into dead lock. Kick happens frequently in real system due to busy traffic or retry mechanism. This patch simplifies kick firmware anyway and skip setting hardware notifier due to potential device error, notifier could be set in next successful kick request. Fixes: 62c813706e41 ("vdpa/mlx5: map doorbell") Signed-off-by: Xueming Li Reviewed-by: Maxime Coquelin --- drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c index c1a25becdd..0ef7ed0e4a 100644 --- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c +++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c @@ -24,9 +24,9 @@ mlx5_vdpa_virtq_kick_handler(void *cb_arg) uint64_t buf; int nbytes; + int retry; if (rte_intr_fd_get(virtq->intr_handle) < 0) return; - - do { + for (retry = 0; retry < 3; ++retry) { nbytes = read(rte_intr_fd_get(virtq->intr_handle), &buf, 8); @@ -40,5 +40,7 @@ mlx5_vdpa_virtq_kick_handler(void *cb_arg) } break; - } while (1); + } + if (nbytes < 0) + return; rte_write32(virtq->index, priv->virtq_db_addr); if (virtq->notifier_state == MLX5_VDPA_NOTIFIER_STATE_DISABLED) { -- 2.34.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-05-25 17:26:58.906993168 +0100 +++ 0012-vdpa-mlx5-fix-dead-loop-when-process-interrupted.patch 2022-05-25 17:26:58.545828299 +0100 @@ -1 +1 @@ -From 301ef4a18586ae1763206d7e75d9eddb58a7d05e Mon Sep 17 00:00:00 2001 +From d24d6395d642237cc9177c270eacb6b57f8b9c14 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 301ef4a18586ae1763206d7e75d9eddb58a7d05e ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index 2e517beda2..2696d54b41 100644 +index c1a25becdd..0ef7ed0e4a 100644