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 48146A034D for ; Thu, 10 Feb 2022 07:50:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A9FB41156; Thu, 10 Feb 2022 07:50:58 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 50E3840041; Thu, 10 Feb 2022 07:50: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=1644475855; x=1676011855; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=uNGBFPOF3vsveW/+zDT7TdqZNS7nNSSk/DWSC4+3peQ=; b=jZVw2TTpGKkf8eGUIuQHhN5teULwBcqgCjfUEBQNbfFfGjVacEpUjboN g5SsM7CCWlRqhrjXcAoeSmqcotroVIc9UF57tJc/qv1PS8vp3swV6F3Sy D22W5rzsxjDxleBrK4wHUbjbe5NA/WttTGm3r7hSrS7BvhieRejAwWXO0 HM+4tPsq5jnad1wTinR1GopAgYT40RlaBqV+tsSnnjM4Mxwr9IrwajHRj 2l9zxx4UW4ljXQXmkmDMEBdqB9v5d3RikTz9tjiutW3ApPRZDjDkQnv+l Fs00Uj9rzOl2WQb4Yv+JG/nwrKRGCvXtkE0gWr72Np2r+WsAimIgpIN+H w==; X-IronPort-AV: E=McAfee;i="6200,9189,10253"; a="232987994" X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="232987994" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 22:50:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="629590082" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga002.fm.intel.com with ESMTP; 09 Feb 2022 22:50:53 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) 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 22:50:53 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) 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 22:50:53 -0800 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.40) by edgegateway.intel.com (134.134.137.103) 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 22:50:53 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h4EcFRRvMvpDymAUk2nlLDhVzYyLEOPdm3KMdeVlrr3NMHWYF4e5Og1CmOp+BruacaJDraFnERDOSfgaVnwufRmd/wLNJSckkcC/kHKeazfEXAsMgJjYOXswth7uE+zCGInC1c3knOW9whSuMooroNeEkSH4PlK4FV4au2NLahnnMQGcb+7Dd496REGgUnw0b3RHK4VRJ5GaKOdEL382Qsc7hXzb5oZvRUQPsMuOMjo9+EmMtV4kSVPbGCUYJ36VQfBGg4Pgvy/FnqPuVFNRkAFX5cMtoFhQk0QXG35MOYTHbbVELOpgnaxRQ0NW8Sem82JzsQg6UqDpgGW3ChJSbg== 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=Le/UO14fPPjehvewx1hs7dvUpcYwQgg2nXsR16HRbqM=; b=Bnt8T6g+n7TH0Lh2M9tbOx86B3JKQeOU5hyCIkvEHR8HFRx4Izc6an62F6bxv54SWcNuJs5p8Nsw5/siuJcnl5iS7M/WCLYknuiXf3LVN3OvfbMqEFQKPHTkwkFHrcjaaihQ0A4x+EakeBMunciPUsIXNxY2VEO6VAHv1TB1bWSLxIqWuQ19EC3KFw+MdTyH2hhsclcexDIO5U9IGRV0O3TBMkL/O4CKMm7Xft46vwHxYswHiwdyPKsXw4tgF0fwqAi7fwcQaw9nh+SuFRB3bhLsO8rQgdPLvl8H9IqgGfZ/B+KIrIK2DZ8lNn3k56AMcFyXSqdCLPZT7QpC17A0gA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from MW3PR11MB4587.namprd11.prod.outlook.com (2603:10b6:303:58::7) by DM5PR11MB1660.namprd11.prod.outlook.com (2603:10b6:4:4::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Thu, 10 Feb 2022 06:50:46 +0000 Received: from MW3PR11MB4587.namprd11.prod.outlook.com ([fe80::cd04:de8e:fecc:6978]) by MW3PR11MB4587.namprd11.prod.outlook.com ([fe80::cd04:de8e:fecc:6978%8]) with mapi id 15.20.4951.019; Thu, 10 Feb 2022 06:50:46 +0000 From: "Wu, Jingjing" To: "Guo, Junfeng" 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: AQHYHXAw4dy1Kbjs50GsRuPykEqY+KyMWWtA Date: Thu, 10 Feb 2022 06:50:46 +0000 Message-ID: References: <20220209043903.3699229-1-junfeng.guo@intel.com> <20220209044716.3709178-1-junfeng.guo@intel.com> In-Reply-To: <20220209044716.3709178-1-junfeng.guo@intel.com> 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: 68cdbe7c-7555-4de8-1c70-08d9ec61aa5d x-ms-traffictypediagnostic: DM5PR11MB1660:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4941; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bKXyuB/dXxX4K/Pokuje8iC+bnn4upOqY4xdgnVPBs5/R7SYSEbDg3mxicGWkcRuXzoOKoBuQxiXeZF7pCgowMb0Esd7qo9cqSjqRY4s/mB4PLneJxIRLBKUOFYcr4/FJAvL8dW92MWg32Fh3m+Z3T7NKkNdXonITI/dVFQ7SnxftXHJLpxIRaqmYQqr1i87AmJ3QWH425EY6ZOgBNh4O/xwij8rk0GTHx2cFVTdpTOPb9gxAHxKTbzx7STCyFQuf0q27pnZ41EHwHGvJUFb7K2ercX7Is64TUlrBXap3/TIdQXRgVSoF3TW9J2pauRf6o1Flv0nLo5JUoz06pTlWCzlqlJoKJxZL/nd3dR/1BStPrRnB6XmpkTZRv5P2++fe1iF7R84XRoBXCZwWLUsSLNEPEpkpHAIahXJ8pKxXvoMSstc8uya6WTIY74+p4+Hh4s06F0qUtQxo7DQNHx+6YlCu5T6NJ2fCmJS9qc8o6jv8Bl9jzVV5h1aI3Xr9l8BW6+9qpTU8xKxDfd7DFZKMZtCfY7+7aAwbB4DjAM1ZZ69UfTuolvPeY/+tapObtzlxBCo8lySbwPxmxJKbD3WPoHwENBUGo6XhlGo8MDOeteMYuPvTlwUmigXyciu+7cqxbth5Kud6AFFAC5TZHBq+qJnAme02xg7LIpALHfghWNviuaqWife+WP2dTRoLfYhUufZiH5R4iCc3xORjeDAaA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW3PR11MB4587.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(4326008)(9686003)(66446008)(7696005)(53546011)(55016003)(33656002)(86362001)(66476007)(38100700002)(52536014)(508600001)(5660300002)(83380400001)(82960400001)(66556008)(8936002)(6506007)(76116006)(64756008)(6862004)(8676002)(316002)(38070700005)(450100002)(2906002)(6636002)(186003)(54906003)(71200400001)(122000001)(66946007)(26005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?nmstd+UINMTOVWeNDafC3M2Sd9CHLelpfIMQpZf0Z+65j6eTj7qsMJG0AuTM?= =?us-ascii?Q?rE/+Z3VHRrkGBVco0TcqEiYFPhUROj27aG9wCvMnjJjCNmx76Bg6p5vfgVC4?= =?us-ascii?Q?ZxOQzVHoLfcRF87Ge7yIvc2YAMUn87/Z25X3g+s31SZb7K1UViCUmN9UzyFD?= =?us-ascii?Q?IsHKQaB01Idshem3GX81gJWvhpQTl7iioVUQ9tlq+B5OUSJeIW0FN1ULJRdh?= =?us-ascii?Q?SKPpU4Vp/BwRGYiePJFeQPC0BwtJGjTZLwEmt/vg0eqYY645ueMcCXyX0vzm?= =?us-ascii?Q?8uwO6i7Tt2fDdXg8cbhkoKay6oAhOZgjGo/D8vMhpU4qI8RJWvVipfQQVLRo?= =?us-ascii?Q?1GrkXDGKjKR1xK0o0FvgzWi3tu6n9jvqblx4n+e088zRFv2nLlKGn6Kbl6np?= =?us-ascii?Q?qixmSIC//5kB4H9WqfyuvKE1gGXvIyg2YvsAvgjEZsj+nDSHYoduzdIEa6dd?= =?us-ascii?Q?0ugfDZVIEdt4COXp9OT/qhL3zmK+OjYl5kZ7Uz8iMHNJdEYUaKT9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kmap7CvYnqInX4zCxl6wLVnACYCZ5KjqwUHCHmdhmlJ?= =?us-ascii?Q?GlDQnUE1F5XRvM/PdBVHkpMks+NO0zDnsnDQl+im/Qt48/DvR3ztqWbyv0I4?= =?us-ascii?Q?2AGXzncPp3FBkD6KE8cUW5aEH5+Agie8ZEbNPjBn47553HpuLf/A+FivCxZl?= =?us-ascii?Q?5KmXjISD8Pl1pKwWQ+7jB6Lut8b2sKrTh1+aPR8r5m2ZRqnkarAFhKPsZI2h?= =?us-ascii?Q?4A=3D=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: MW3PR11MB4587.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 68cdbe7c-7555-4de8-1c70-08d9ec61aa5d X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Feb 2022 06:50:46.2753 (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: pmoFybLEvs5XmR9NCKYntN7jGGodr2lIxyoIDgJehLU1hrRrSXU0PqAH5w4sKbyWym05ZndVEBBLTA4s7ALyQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1660 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: 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 >=20 > 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. >=20 > Fixes: 62012a76811e ("raw/ntb: add handshake process") > Cc: stable@dpdk.org >=20 > Signed-off-by: Junfeng Guo > --- > drivers/raw/ntb/ntb.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 Better to add changes compared to previous version, which would help review= ers. > 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) >=20 > /* 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); Check if hw->ntb_ops->db_clear is NULL before call it. >=20 > intr_handle =3D pci_dev->intr_handle; > /* Register callback func to eal lib */ > -- > 2.25.1