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 3EB6DA00C2 for ; Thu, 10 Feb 2022 08:08:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BC33740041; Thu, 10 Feb 2022 08:08:16 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 63BBB40041; Thu, 10 Feb 2022 08:08:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644476894; x=1676012894; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=+4SnyxCu9a1kWbnM/hRJMe0Dr4EKgJNR3vfugAp9BXQ=; b=a0FCnId3QoI3aaV15/w41zEvg/nIVW7NxHMf+7tnVEzBXT05MFergUIX 2ibprblx0GMWrnVuMv0Bp1CskvDNysRAzjHMCK7IjGJ3P+Ta0puZDXQ76 MGrBCly6pgjXBL+o2TLmuMneA7SZGtkZKxxostmUylnhGxJ5D5qWGjANp mpk+k7arfyL75qUlif7vRN/aljG5i6KxvqoyOHGnOz2dFZBRum3P59Dx5 8rkGe/MwkLPn6tY2q9cQNvW3fCRoOeViKEAFCMdxct5n9/JifBoYmHXkh 6w0AIX4mTXCjvkYVr3BvM//nUjpMMY4yqAHvRVpa0vlWIwDDj5bVfMZlj A==; X-IronPort-AV: E=McAfee;i="6200,9189,10253"; a="249180675" X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="249180675" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 23:08:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="526362100" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga007.jf.intel.com with ESMTP; 09 Feb 2022 23:08:13 -0800 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 9 Feb 2022 23:08:13 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Wed, 9 Feb 2022 23:08:13 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Wed, 9 Feb 2022 23:08:13 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fEhJQDGyEZUGLrq5JJzmeZAs6kIN6JgR/1adub98mmFByj7bje+q+Y5T9AA3IySOAkq0tPltGaREIl17pjrA0EoYBRS0EBhhAcSHtT/2KvkM9DOeH2yNbdZnYDcX2I8mT/SrJ4L1E47MMkdxryYciJpSNQ/Vq41eQYjISP9Na3PS4jAlETEgM3O6o97K4u6a8rJciyX/+4BqNkEMAnMqpex9Cw9gc7c0m3wxJkCSN47y4u1hdDJ7nK54JFvs6peGXUUS6HRP069QUHLbcg7Y0pcwIRh/0pin51/AN3U/Tpaf47rgHxWFJTDE4dU7UQixwOgLeDbwARX5+s46vgyUMw== 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=eKu3NfRVeznWvoxWmze9Mw1XY791egRqITbXLpAB9n0=; b=h//Fb4AgbZL5RW1ymExiUF/2Iubs7deiJsSH8g4fN7a0zGMKs0PbJ0/kFhg4RfCsusvsQu/Bv3Yr/rcz29dx6Yg8umbDH5fPPiO8tXD1TzXrMrFZlvsm4CsO5LG6zqAVUryL6CMirvZBr5QLi0jNA9Kby7/Gf1lYtSENog0UPHeRIiSjZvdSZuCm4k2xz/hOz2rn33AB7xkVXoxdwF3uyZ+p7UA/UdM3QQmQSOhCtD+ReXWMO45x3+JcnQbeIU87pL3JmOavExrr995PACHPKQXhrqJRYDxTLHvK7Vv05HRTRRe7SnTfppGTjXqhKGj+vgu+/35p3H5H43b/7KDx0A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DM6PR11MB3723.namprd11.prod.outlook.com (2603:10b6:5:13f::25) by DM6PR11MB3020.namprd11.prod.outlook.com (2603:10b6:5:69::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.18; Thu, 10 Feb 2022 07:08:11 +0000 Received: from DM6PR11MB3723.namprd11.prod.outlook.com ([fe80::2821:b80d:b05c:1682]) by DM6PR11MB3723.namprd11.prod.outlook.com ([fe80::2821:b80d:b05c:1682%5]) with mapi id 15.20.4951.019; Thu, 10 Feb 2022 07:08:11 +0000 From: "Guo, Junfeng" To: "Wu, Jingjing" CC: "dev@dpdk.org" , "stable@dpdk.org" Subject: RE: [PATCH v3] raw/ntb: clear all valid DB bits when DB init Thread-Topic: [PATCH v3] raw/ntb: clear all valid DB bits when DB init Thread-Index: AQHYHXAwqs499Bz8n0C0pAe9mjvcdKyMWi4AgAACMpA= Date: Thu, 10 Feb 2022 07:08:11 +0000 Message-ID: References: <20220209043903.3699229-1-junfeng.guo@intel.com> <20220209044716.3709178-1-junfeng.guo@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 219ab802-dee6-4987-283a-08d9ec641983 x-ms-traffictypediagnostic: DM6PR11MB3020:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PBb1RElE3Q+0DPWIru0Id8Y4PY6/s4WT9jmeNFaDQRrCv0mMWEAPFphTEJqXNlxDAK6T8Ue7/G69vx6deo6fymWo9sj+k0EjdnDYi7bv50Vn9PhY1OnSvg5n3vPxcQhGAbAP7CxdOR/hrJ/8QLUvO52Ke9iZpdD6VWLXXK/2uW8ctUVhb8ndr250nUreHRWDC9/Z14CQ8DHRhY/OCRwvxiqeaP+J/OfnjBmj++H++UJbv4GGd6DjUYpHCCOmn+7jUsj1nBHzScaxY9jcSZOrjh4RsRLgKG77abwemmP8lSV1KMqZddnpjxfH5PDxe4qH73lw8PlbJClSZYiY0yqZLys/PMUrqyDyAur7xsVhdf4UAQrbZclMMKCBUtJNRMXQrtyxeBXTmBgkDkzWLVuSfPkEjEPO+mAn5J2748Nfb8VR2BYmhECFRA0vnu2z84ulkUhTzwwxUC1yTJS0GplYCs5hpl37W6uqHL+3mLjsDO2rxLAg1JbeuEG/J7N5k5Fye2TkeEzLdBSJSDiWEsGk7Fy8RNLNQNwUz4jYAHkZsd4EfTWdmNhOmbNnfdWQ0YbRlQEi1WR17EbuPN1vAbYNBPHCzjAqFM+wE2ED5G6iYqlsktb3EbfmB6rghDzHbxfSjT5DaI2FXr/muZY2IQzDKbmOBHjYETO4MnJ8H0FsVcE+muqmyiC8Rn77SPJRxBDVjA0RVsHEGmEuSjpbTgtU3Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3723.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(83380400001)(450100002)(7696005)(186003)(26005)(82960400001)(66946007)(76116006)(66446008)(64756008)(66556008)(6506007)(66476007)(38100700002)(122000001)(508600001)(52536014)(5660300002)(71200400001)(9686003)(6636002)(2906002)(6862004)(55016003)(8676002)(316002)(4326008)(8936002)(33656002)(54906003)(38070700005)(86362001)(53546011); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?VLVakuWjdlEIYJJtLaFToiVMfPi2SRkfoCeiYyHJsAUa8/M1EpExsuJ8lIzy?= =?us-ascii?Q?ABNwNKALka8KufD+STOEY7FTvPtnvYZV5WYqWNPIEQrJfbTn7D73cStcc3dS?= =?us-ascii?Q?YeoRRGkevLrpaG0XTu9jIFDa0bu6o7OxM+pT67AOoVKmeylkZdG6B8xnw9EV?= =?us-ascii?Q?n6vbOUuvgn4xlY7dLMJoxDDMi6GvcPalFfS7mSI03FIt8V1lDmYX2/P4Z0jI?= =?us-ascii?Q?4TQnUih/V0YQz5fh/wMnbVIumNfqji5PPcYdA0am8SwUe2p+opQSZMYihtYk?= =?us-ascii?Q?ILQJcIjfRoSzInkV/F99S5+0CTLuuZCDtmPrKyzRvBnKk9LtxY9Cvv/EAIX4?= =?us-ascii?Q?3rrEKSWV1xuPBNpoaX0hOigmpt/MoeOHKCFbdugWcQ1ZaIzs/jpkE98/XSeX?= =?us-ascii?Q?XIQumh5ayUhd1gDfrsokPEUrFPVKxGxTt1R0JIbj27lz2AFtSBGyl9eAzyIz?= =?us-ascii?Q?AvF3Q0AGKn+f4MTPYkye6+rCIJe9b2alfweQr+afsgu44jSSJc2am5gD7LpG?= =?us-ascii?Q?NWt+Fd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SNjbgj?= =?us-ascii?Q?Pe/amfxFkITHlardndm/hDBmZj1dtqYG5bWvDLYkhwSzR7z2cMuQyhfcwyDv?= =?us-ascii?Q?bCWUu60NohupVE0m57Vkcm0V3aKT2J8u9uKh/P7go6R98tOLw642g1pRRnEa?= =?us-ascii?Q?FVAcWvVrbTgN7HzaXmg9ZLmry5KqH2qaP25KcJ8O4qKnw8zO5V2GSnugAltc?= =?us-ascii?Q?tslVJpBATF3iMktel6S7TZs=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB3723.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 219ab802-dee6-4987-283a-08d9ec641983 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Feb 2022 07:08:11.7609 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: GRV91YKDshGAy6j/Rffy0zxH1P9Tx6iCs3mHFsSgEhmyIoiXmAcl8qo+L2FGbyAqpfG6R8ewZBctPiuGj9c08w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3020 X-OriginatorOrg: intel.com 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 > -----Original Message----- > From: Wu, Jingjing > Sent: Thursday, February 10, 2022 14:51 > To: Guo, Junfeng > Cc: dev@dpdk.org; stable@dpdk.org > Subject: RE: [PATCH v3] raw/ntb: clear all valid DB bits when DB init >=20 >=20 >=20 > > -----Original Message----- > > From: Guo, Junfeng > > Sent: Wednesday, February 9, 2022 12:47 PM > > To: Wu, Jingjing > > Cc: dev@dpdk.org; stable@dpdk.org; Guo, Junfeng > > > Subject: [PATCH v3] raw/ntb: clear all valid DB bits when DB init > > > > 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") > > Cc: stable@dpdk.org > > > > Signed-off-by: Junfeng Guo > > --- > > drivers/raw/ntb/ntb.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > Better to add changes compared to previous version, which would help > reviewers. Sure, I'll add the version change commit in the coming version. Thanks! >=20 > > diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c > > index 46ac02e5ab..cc611dfbb9 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 =3D 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); >=20 > Check if hw->ntb_ops->db_clear is NULL before call it. OK, will add it in the coming version. Thanks for review!=20 >=20 > > > > intr_handle =3D pci_dev->intr_handle; > > /* Register callback func to eal lib */ > > -- > > 2.25.1