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 CC8A5A0555 for ; Wed, 25 May 2022 18:29:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C6DA84280C; Wed, 25 May 2022 18:29:13 +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 D2E72400EF for ; Wed, 25 May 2022 18:29:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653496151; 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=xnl+7ZVl3oBwmBgiblt8hnwBv1k+vR/yduB8lrEPVjI=; b=MVjwIdhfKo2rbZq35a8YSRRur4HntPmOfpeR331yAsnm/zzbqjUgf1MemFZYMauCqJHyYs Wc29MkqdjVVDqHNH9GXXrCyOnD+bmKEH9T517TrKbbO7524jwSIdrLTqLv225PrBeTq4Na W3p1RKdzcc8i0wBOR2GIMyUvk4fmMOE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-544-sqewh59LOOyfnn8aq8_Fkw-1; Wed, 25 May 2022 12:29:10 -0400 X-MC-Unique: sqewh59LOOyfnn8aq8_Fkw-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 CE65729AB3F1; Wed, 25 May 2022 16:29:09 +0000 (UTC) Received: from rh.Home (unknown [10.39.193.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id BA9F82026D64; Wed, 25 May 2022 16:29:08 +0000 (UTC) From: Kevin Traynor To: Xueming Li Cc: Maxime Coquelin , dpdk stable Subject: patch 'vdpa/mlx5: fix interrupt trash that leads to crash' has been queued to stable release 21.11.2 Date: Wed, 25 May 2022 17:28:03 +0100 Message-Id: <20220525162847.711753-11-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/879fb64517212c99ecfbafc055be135e9201a28a Thanks. Kevin --- >From 879fb64517212c99ecfbafc055be135e9201a28a Mon Sep 17 00:00:00 2001 From: Xueming Li Date: Sun, 8 May 2022 17:25:48 +0300 Subject: [PATCH] vdpa/mlx5: fix interrupt trash that leads to crash [ upstream commit 66a439c5d7c166347adc799fcc928058e16ac23d ] Disable interrupt unregister timeout to avoid invalid FD caused interrupt thread segment fault. Fixes: 62c813706e41 ("vdpa/mlx5: map doorbell") Signed-off-by: Xueming Li Reviewed-by: Maxime Coquelin --- drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c index 2f32aef67f..c1a25becdd 100644 --- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c +++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c @@ -18,5 +18,5 @@ static void -mlx5_vdpa_virtq_handler(void *cb_arg) +mlx5_vdpa_virtq_kick_handler(void *cb_arg) { struct mlx5_vdpa_virtq *virtq = cb_arg; @@ -60,18 +60,14 @@ mlx5_vdpa_virtq_unset(struct mlx5_vdpa_virtq *virtq) { unsigned int i; - int retries = MLX5_VDPA_INTR_RETRIES; int ret = -EAGAIN; - if (rte_intr_fd_get(virtq->intr_handle) != -1) { - while (retries-- && ret == -EAGAIN) { + if (rte_intr_fd_get(virtq->intr_handle) >= 0) { + while (ret == -EAGAIN) { ret = rte_intr_callback_unregister(virtq->intr_handle, - mlx5_vdpa_virtq_handler, - virtq); + mlx5_vdpa_virtq_kick_handler, virtq); if (ret == -EAGAIN) { - DRV_LOG(DEBUG, "Try again to unregister fd %d " - "of virtq %d interrupt, retries = %d.", - rte_intr_fd_get(virtq->intr_handle), - (int)virtq->index, retries); - + DRV_LOG(DEBUG, "Try again to unregister fd %d of virtq %hu interrupt", + rte_intr_fd_get(virtq->intr_handle), + virtq->index); usleep(MLX5_VDPA_INTR_RETRIES_USEC); } @@ -361,5 +357,5 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index) if (rte_intr_callback_register(virtq->intr_handle, - mlx5_vdpa_virtq_handler, + mlx5_vdpa_virtq_kick_handler, virtq)) { rte_intr_fd_set(virtq->intr_handle, -1); -- 2.34.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-05-25 17:26:58.886958447 +0100 +++ 0011-vdpa-mlx5-fix-interrupt-trash-that-leads-to-crash.patch 2022-05-25 17:26:58.544828298 +0100 @@ -1 +1 @@ -From 66a439c5d7c166347adc799fcc928058e16ac23d Mon Sep 17 00:00:00 2001 +From 879fb64517212c99ecfbafc055be135e9201a28a Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 66a439c5d7c166347adc799fcc928058e16ac23d ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 3416797d28..2e517beda2 100644 +index 2f32aef67f..c1a25becdd 100644 @@ -54 +55 @@ -@@ -360,5 +356,5 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index) +@@ -361,5 +357,5 @@ mlx5_vdpa_virtq_setup(struct mlx5_vdpa_priv *priv, int index)