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 02600A034F for ; Wed, 9 Feb 2022 05:35:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E6A3E4114A; Wed, 9 Feb 2022 05:35:57 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 3F9FC410F3; Wed, 9 Feb 2022 05:35:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644381355; x=1675917355; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Rk/TESkC/jFjCpge8mIEeWCa8yqbswtRXgtTdTB0u8o=; b=Mp4xSytm2WgPdVIVaJQ1/Cmgmpm/xGOi7F3smhlYJx6nf2KOOD9rmjEL z/cbzS2lz/4grE2LSg90BqIFh1HSGMQEg787dzk6ifqKAWeq24iARA1Er EYgBNzFoelz8gwOWK8tZN2CrS4MUh61EgrVzQq8rVWayb3GeMTsinpHyX S1r9szhm1r+v9jNOB+riees0bMRqDve0NkMBjePHhv8hMHmcNuJbIs7Ys 2sdIff8nEhA1WimwyAcjfY6bDkas8r/Se+IU0zATZSg00lrUK6w5uWZaT L+VoYWtwxBNi9KvcHTuFhwFSd4Px/biwwcM5WA/CPIbQHZxqGu0r+Nzyy Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10252"; a="248877598" X-IronPort-AV: E=Sophos;i="5.88,354,1635231600"; d="scan'208";a="248877598" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2022 20:35:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,354,1635231600"; d="scan'208";a="629141863" Received: from dpdk-jf-ntb-v1.sh.intel.com ([10.67.119.116]) by fmsmga002.fm.intel.com with ESMTP; 08 Feb 2022 20:35:52 -0800 From: Junfeng Guo To: jingjing.wu@intel.com Cc: dev@dpdk.org, stable@dpdk.org, junfeng.guo@intel.com Subject: [PATCH] raw/ntb: clear all valid DB bits when DB init Date: Wed, 9 Feb 2022 12:35:28 +0800 Message-Id: <20220209043528.3694747-1-junfeng.guo@intel.com> X-Mailer: git-send-email 2.25.1 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 Before registering the doorbell interrupt handler callback function, all the valid doorbell bits within the NTB private data struct should be cleared to aviod 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") Cc: stable@dpdk.org Signed-off-by: Junfeng Guo --- drivers/raw/ntb/ntb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c index 46ac02e5ab..6f15b13585 100644 --- a/drivers/raw/ntb/ntb.c +++ b/drivers/raw/ntb/ntb.c @@ -1398,6 +1398,8 @@ 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*/ + (*hw->ntb_ops->db_clear)(dev, hw->db_valid_mask); intr_handle = pci_dev->intr_handle; /* Register callback func to eal lib */ -- 2.25.1