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 7D972A034C for ; Fri, 25 Feb 2022 18:18:39 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7A36141150; Fri, 25 Feb 2022 18:18:39 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 27D25410FD for ; Fri, 25 Feb 2022 18:18:38 +0100 (CET) Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 0585A3F1BC for ; Fri, 25 Feb 2022 17:18:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1645809518; bh=m41jNoVc2tAiEA9VuDZLOHBxu+87DPAIeXRqpm/14qU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=o0QvoQgezqODnQJS1V9fNlrilPj22XDj6gq/aoG6+++DIm7cy0QgUoRXF3GjgM9LS U84jOeV5zW9UNmnlarZLAl0n4MxyaVVDtIzuIkWiCq3YZR/bz4PP3UZ6ULbNJmht10 /i87g1t5DxbunqUmc2gnOAACeUXH/LHm2mDmwIgpqVKiRHsfN2sRyZcNwiOWEtOT7N 2izbDT0x34bKuA956UwBwFiSAsPvTbiRKBCAM2JTFEMSIWZVKyRfvMljv9woK0Co+e idvJVZulZBh2k5rCQmGpayxdTVKutaqilCJrOcZf1yy0Oqnm35XkK7SR4q7loshDMb YR6Tts+xPkfPQ== Received: by mail-wm1-f70.google.com with SMTP id f189-20020a1c38c6000000b0037d1bee4847so1828187wma.9 for ; Fri, 25 Feb 2022 09:18:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=m41jNoVc2tAiEA9VuDZLOHBxu+87DPAIeXRqpm/14qU=; b=3muvNawGN3zoDH+MIH995zag37ZVmH1qu9d85Y5heI3ggWGnBSmLTkVXw4mtDCdOdn vz+ObWwmo1h/fMTvkf2hWSQ4cGLNmnvjMQvzjhstM3s+5ADgH2ZNpbTIDKD/Wtq5khHM equiR6ErGD8gzR5bU55ZHPDQmbsS1ldeEU7afuvulXXdTXg6wep8aqMsu7Xk0uSgYZPX waQWJz05o1nnJfsNtjnEkhOJ6PNbCeN8Jh0s3wd7io53lqBvewVHKkEVpl6XYi0DY8a6 OEFpmx3FzNoHI/F4uvbI0npul60+ASG30JzYc0XxpVhi1cMMIf5tQ9ev/dgZmzbYZGH8 cZ5A== X-Gm-Message-State: AOAM530PSlBxpK0cb3hP/hWWyS80pg/RwM7tIWIf8oIZdjmSbwA+obSY ng/R8ea8gvWywQMSzteyESvhfI/CBzmgF1meAeJoloz7w9q6YiemN7bVdY0t1aSQ0zcip3oUSZS uUCIuMQ0ww1RDWg4ID5hzoGgn X-Received: by 2002:a05:6000:1a8c:b0:1e8:88a7:d158 with SMTP id f12-20020a0560001a8c00b001e888a7d158mr6844769wry.364.1645809517730; Fri, 25 Feb 2022 09:18:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJy+hVG85yFoNYRPJDFjUCAcS95l7RfJxO1cSj9RyTCKxsnW1oAMjc79WyEpAIij2qD/34WRrQ== X-Received: by 2002:a05:6000:1a8c:b0:1e8:88a7:d158 with SMTP id f12-20020a0560001a8c00b001e888a7d158mr6844754wry.364.1645809517525; Fri, 25 Feb 2022 09:18:37 -0800 (PST) Received: from Keschdeichel.fritz.box (068-133-067-156.ip-addr.inexio.net. [156.67.133.68]) by smtp.gmail.com with ESMTPSA id 9-20020a05600c268900b00381394d74a1sm2052594wmt.9.2022.02.25.09.18.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 09:18:37 -0800 (PST) From: christian.ehrhardt@canonical.com To: Junfeng Guo Cc: Jingjing Wu , dpdk stable Subject: patch 'raw/ntb: clear all valid doorbell bits on init' has been queued to stable release 19.11.12 Date: Fri, 25 Feb 2022 18:15:50 +0100 Message-Id: <20220225171550.3499040-57-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20220225171550.3499040-1-christian.ehrhardt@canonical.com> References: <20220225171550.3499040-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 19.11.12 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/27/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/37e6856e3f6e89521bdb8dd6adafeb520496ecd0 Thanks. Christian Ehrhardt --- >From 37e6856e3f6e89521bdb8dd6adafeb520496ecd0 Mon Sep 17 00:00:00 2001 From: Junfeng Guo Date: Thu, 10 Feb 2022 15:06:34 +0800 Subject: [PATCH] raw/ntb: clear all valid doorbell bits on init [ upstream commit 3bc814fc555d8c7d1c7c63e1e831e9c34679837f ] Before registering the doorbell interrupt handler callback function, all the valid doorbell bits within the NTB private data struct should be cleared to avoid the confusion of the handshake timing sequence diagram when setting up the NTB connection in back-to-back mode. Fixes: 62012a76811e ("raw/ntb: add handshake process") Signed-off-by: Junfeng Guo Acked-by: Jingjing Wu --- drivers/raw/ntb/ntb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c index 0f0f5c785c..c25608ee8a 100644 --- a/drivers/raw/ntb/ntb.c +++ b/drivers/raw/ntb/ntb.c @@ -1371,6 +1371,10 @@ ntb_init_hw(struct rte_rawdev *dev, struct rte_pci_device *pci_dev) /* Init doorbell. */ hw->db_valid_mask = RTE_LEN2MASK(hw->db_cnt, uint64_t); + /* Clear all valid doorbell bits before registering intr handler */ + if (hw->ntb_ops->db_clear == NULL) + return -ENOTSUP; + (*hw->ntb_ops->db_clear)(dev, hw->db_valid_mask); intr_handle = &pci_dev->intr_handle; /* Register callback func to eal lib */ -- 2.35.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-25 16:58:46.415183941 +0100 +++ 0057-raw-ntb-clear-all-valid-doorbell-bits-on-init.patch 2022-02-25 16:58:44.304990469 +0100 @@ -1 +1 @@ -From 3bc814fc555d8c7d1c7c63e1e831e9c34679837f Mon Sep 17 00:00:00 2001 +From 37e6856e3f6e89521bdb8dd6adafeb520496ecd0 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3bc814fc555d8c7d1c7c63e1e831e9c34679837f ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 46ac02e5ab..f5e773c53b 100644 +index 0f0f5c785c..c25608ee8a 100644 @@ -24 +25 @@ -@@ -1398,6 +1398,10 @@ ntb_init_hw(struct rte_rawdev *dev, struct rte_pci_device *pci_dev) +@@ -1371,6 +1371,10 @@ ntb_init_hw(struct rte_rawdev *dev, struct rte_pci_device *pci_dev) @@ -33 +34 @@ - intr_handle = pci_dev->intr_handle; + intr_handle = &pci_dev->intr_handle;