From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9FD67A2EDB for ; Mon, 30 Sep 2019 15:41:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1A4A7378E; Mon, 30 Sep 2019 15:41:05 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 07D173423 for ; Mon, 30 Sep 2019 15:41:03 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x8UDYk1K012255; Mon, 30 Sep 2019 06:40:52 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=oAkOQmBUCQhQnZDVlAqjUTykhvE8C78r+iODf5LxhRs=; b=KD4POTmPBpR/VsyOtSr45VjNesZGuGKvR0FcdgS03mDboEYkQ13A3Dq/OVS2NoFkWAzJ ub5lIAjYHzcHYChLJREKhORf9dnb4TpUR6wVJn3Y4di7drA6QXJedPVbUMlRDQXIFtW8 ZrGHKEB42y0vUzc2ZmeTmKtgVLMPxOR22XixUTG4Nzvh59s1TFKSA5MDZOjyZxrwV3XN YSnk1nUA809UWcrOui0F1lItkJEAJLinAL+lHJwzyUI0T1pUBUvFKyYoQNjaWci3MQHi sm8nqVSL4j0I2PsaWpnW9ntGH+a4NTh/8GS24ZX7JnbApadqBZZ6x2DEc1q9QwEqSATy 0g== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 2va71me7f8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 30 Sep 2019 06:40:52 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 30 Sep 2019 06:40:50 -0700 Received: from NAM01-BN3-obe.outbound.protection.outlook.com (104.47.33.55) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Mon, 30 Sep 2019 06:40:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Io+uw2Y11YtTpwwpRN8ZtFSgC7raYqSCcKq6uBKciQTTIDbWA5DsymFkvVT/LxuWKaqFYn9tbCeP2ljhknceNPQ+TZR9PV98PXL5tmy+hsb4GcJL4rF5udFR0gE8B1kQIaFW4NVWiNMGrh7RJr0p4yBy/Gf5QkRmyhAIDkBGPvbD7+iPvC9/r8czYrTAylS+cNhFvfAs7mrw9RJlVGgYFE6GNN39NhC6vl43al49cTF/tuwD/nCZoO/PC6QLPmflWX1BfIsySuKwj8wC+5L9paPxV6vOHv/n+94fJC9qjBbkQQaT5Fv323HoqVhZuLTbrNKI+B1Or4eIPoRV8fLtIQ== 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-SenderADCheck; bh=oAkOQmBUCQhQnZDVlAqjUTykhvE8C78r+iODf5LxhRs=; b=oIHENK/I7NYArNX0dKP9gj03iYC7+TeRhGyL/mtZ4bV28gBXGKKcyp95ycaKj3QjM5eA+0EJtbOgY2cfgTA9Q8bs2lzRn1bBTJXnBabRX0xD5IHVld9OKW1ckS0gRgsYbL32fp5qrDc9MqbE9DS4k/UmT+dY+Roh/GT9lJHZBx/4QhQvSg6SuzF6E6alEE3Pc5EsjQmV9aF6dDvlOPue7/VoTBcbNlkGpgsj8Y3giHTJkjWjCwWQZCfAanHfMNiV9CYAu/19RIK6kglXWXrU98q/eNz6BRYNkRzYo9deypJebw8pV8vKcDWxFwCdPcaUAhMxj0eN4ADz+O1n8ooqEw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oAkOQmBUCQhQnZDVlAqjUTykhvE8C78r+iODf5LxhRs=; b=IUeBhNuU5NQk1rf7EFkKwmOZFFciyr16SJyGkETpn5kAQUFDR4GScWtxp4wbal6wYM19to7g4VGFAKSWmlefqSMNBbCN0JPMSgVjnV4eBlB/e0Bhvh/bLAVSSI1lheiL02TVuJ2CxD3guCZ71j0C080yKCqsnYY0vZsvnzBL5O4= Received: from MN2PR18MB2797.namprd18.prod.outlook.com (20.179.22.16) by MN2PR18MB3405.namprd18.prod.outlook.com (10.255.238.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2305.20; Mon, 30 Sep 2019 13:40:48 +0000 Received: from MN2PR18MB2797.namprd18.prod.outlook.com ([fe80::259c:a73e:a83:ccfe]) by MN2PR18MB2797.namprd18.prod.outlook.com ([fe80::259c:a73e:a83:ccfe%4]) with mapi id 15.20.2305.017; Mon, 30 Sep 2019 13:40:48 +0000 From: Nagadheeraj Rottela To: "Gavin Hu (Arm Technology China)" , "Akhil.goyal@nxp.com" , "pablo.de.lara.guarch@intel.com" CC: Srikanth Jampala , "dev@dpdk.org" , Honnappa Nagarahalli , nd , nd Thread-Topic: [PATCH v6 0/8] add Nitrox crypto device support Thread-Index: AQHVdPx7uYJPG8uV10y3DhyAg64NiqdBJ6aggAMPEaA= Date: Mon, 30 Sep 2019 13:40:48 +0000 Message-ID: References: <20190716091016.4788-1-rnagadheeraj@marvell.com> <20190927062533.19005-1-rnagadheeraj@marvell.com> In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6bfb7e68-aade-4fd5-2f3e-08d745abcd93 x-ms-traffictypediagnostic: MN2PR18MB3405: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 01762B0D64 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(366004)(39850400004)(376002)(346002)(396003)(13464003)(189003)(199004)(4326008)(76116006)(66066001)(66476007)(66556008)(66946007)(64756008)(66446008)(33656002)(2501003)(305945005)(74316002)(71200400001)(71190400001)(14444005)(7736002)(256004)(6246003)(99286004)(9686003)(6116002)(102836004)(3846002)(55016002)(8676002)(2906002)(25786009)(11346002)(55236004)(76176011)(81166006)(7696005)(8936002)(486006)(6506007)(26005)(54906003)(110136005)(316002)(478600001)(14454004)(52536014)(2201001)(476003)(86362001)(5660300002)(186003)(229853002)(53546011)(6436002)(446003)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB3405; H:MN2PR18MB2797.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: RgR64Mitgu2nmR0OedGMGwQF2kMovpE4d9b//B9DRM0qHjlrQy+MSzWShGyJ0nTX47NCkzKNyu1uGjK2yl+REIoBZNxDFgJGqC4ulSq/qHSLG6/Ra8XtMQxgO6lDHGeqknQSbTw2Fhlh3eZWPTycujHxYW7lJjBQR/flNhA7e2ZmnbYH9CF+1WknWuX33658Gu6lm6vMyXCykLyVrVgZFeTxjJecKUYif+c0dripUH3Y+VRV1NhSd56oV//KNa/5C/l1nrwMSmN8JjCfMxlKs50ibnlXewnlpFYaG2tMvk8GFy6X5FW/ZnBpOIP9WQyyOPxvLupmyiP32KRLk8X7pb4w7i0lxDcxEY2Xh6jCWMRI3Ie/7ZGG+kyVsE8ExYTjEe+8F+Ao2MSrzHTcpewoGbTCgc1r1gW8RRZ/DNz43X4= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 6bfb7e68-aade-4fd5-2f3e-08d745abcd93 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Sep 2019 13:40:48.5704 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: +Vt+4ZYh8IGgac3Qk2GR6gRT4eZE33SohjycE/8uFd7+6okMBuGfEf8clOf5FeRnFMzgFf5Cr/EqMApE/xRpdewkkc8O+6uLX+clpXRobhA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB3405 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-09-30_08:2019-09-25,2019-09-30 signatures=0 Subject: Re: [dpdk-dev] [PATCH v6 0/8] add Nitrox crypto device support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Gavin, Thanks for your comments. Your suggestions are applicable in this case. I will remove the usage of rte_wmb() and rte_rmb() in all places as they ar= e not required. I will add rte_smp_wmb() before pending count update in enqueue operation a= nd add rte_smp_rmb() before reading softreq from pending queue. I will add rte_io_wmb() before the ring doorbell to ensure all the DMA buff= ers & descriptors stores are completed. We check command completion based on the completion code update (which is t= he last word in the output buffer) and hence rte_io_rmb() is not required. Best Regards, Dheeraj > -----Original Message----- > From: Gavin Hu (Arm Technology China) > Sent: Saturday, September 28, 2019 8:17 PM > To: Nagadheeraj Rottela ; > Akhil.goyal@nxp.com; pablo.de.lara.guarch@intel.com > Cc: Srikanth Jampala ; dev@dpdk.org; Honnappa > Nagarahalli ; Gavin Hu (Arm Technology > China) ; nd ; nd > Subject: [EXT] RE: [PATCH v6 0/8] add Nitrox crypto device support >=20 > External Email >=20 > ---------------------------------------------------------------------- > Hi Nagadheeraj, >=20 > I am no expert in crypto dev, maybe you can educate me if I am wrong: > I got an impression in this series, the barriers were used too much, too > heavily and unnecessarily. >=20 > For enqueue operations, I understand they are stores to the DMA buffer, > the queue will be fetched and updated by the crypto device after processi= ng, > then dequeued by the other CPU cores. So for enqueue operations, an > rte_io_wmb is required before the doorbell ringing, and an rte_smp_wmb i= s > required to ensure the enqueue operations were done before the consumer > on the other side(who dequeues) sees the updated pending_count. For > dequeue operations, rte_smp_rmb is required after reading the > pending_count to ensure reading the intact content from the queue(if the > queue entries were not handled yet by the crypto dev, the status will sho= w > that, maybe an rte_io_rmb is required to ensure the status is read out fi= rst). >=20 > The rte_smp_xmb can even be optimized with C11 atomics, but it can be > next step. >=20 > Best Regards, > Gavin