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 02EC8A04DD; Mon, 21 Sep 2020 21:28:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BEA8D1D90A; Mon, 21 Sep 2020 21:28:26 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60057.outbound.protection.outlook.com [40.107.6.57]) by dpdk.org (Postfix) with ESMTP id 5BDBC1D906 for ; Mon, 21 Sep 2020 21:28:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ggRxBSS1jdyhVTv19hqDpHQA6ZEZwDR6jmVyFflH4qg=; b=28khWS7FcX2LckhUqk08YKkSyzEF6tj6Or/ccydT7j/RdXsUKo5IVwcnkjTNS1uzR67x3yB3z3Wv9S0cBaa1DzS1UhrrOf1Oym7E9r8Uho56+/xUkFGvrte3/bb4ntNGls6ijtDk7iVN1oPo0Fhsx3hxxQUfIaYd5j0Mb/Zz8NU= Received: from DB6PR07CA0098.eurprd07.prod.outlook.com (2603:10a6:6:2c::12) by DB7PR08MB3739.eurprd08.prod.outlook.com (2603:10a6:10:79::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.15; Mon, 21 Sep 2020 19:28:24 +0000 Received: from DB5EUR03FT050.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:2c:cafe::21) by DB6PR07CA0098.outlook.office365.com (2603:10a6:6:2c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.4 via Frontend Transport; Mon, 21 Sep 2020 19:28:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT050.mail.protection.outlook.com (10.152.21.128) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.15 via Frontend Transport; Mon, 21 Sep 2020 19:28:23 +0000 Received: ("Tessian outbound 7a6fb63c1e64:v64"); Mon, 21 Sep 2020 19:28:23 +0000 X-CR-MTA-TID: 64aa7808 Received: from d69db61cee71.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D219F125-9C4F-4B1C-8E34-E6F9978BE4E2.1; Mon, 21 Sep 2020 19:28:18 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d69db61cee71.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 21 Sep 2020 19:28:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P869qDl4yjshVB01n4452ibKF9NcgludhF1zaBtkxfyIANTnSKqliMm0vRnD307KN/vOfxnFCSdSWQwDTUvUPqbrKYUWHPsBvySF7q3jSO6Gxjr3LLHtfn+7/5StCOEKxRqd+m3AoN1mh9CcvsBWMA3RwbLep+zlSq/XJeq0B5CkyAYbScygu/HdFb3gdzVb0v71pd9PiTuZ4EVF2L8ELQY6/uA5JMQda+AbYWWWPZHygUBlKAAxQsEEJqGpg/RG8EnUk01M1GwdYVuhGX7/GzRXMUilYEx5rxy87lvffjxl15AgFpots8aOaYYFLXpsnSXqRCum+cnrFa+LmlzF6g== 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=ggRxBSS1jdyhVTv19hqDpHQA6ZEZwDR6jmVyFflH4qg=; b=EUissEue1mvEKg5g2iDWtdWP2ZzKhE9cl+L3lJEcVMEruRCpW4ddh2JICeNomI3aNZbnQGQTKVyUX09gf6HndeE4fT9WFG9fY7AKAcrSxD2pfL/1mFTCwr3195Hb4wj7gNSLr7FhrN49WcJae8FuUbXMxLg0l/mYB+FPScMbgVO1uQ7LUsbnb7YeVhyFTOmmQhoo216TWmaOfi96uFJnn9ylnTyydO9Je0k6MS0v8849Ke3hEi8SsEX1ML/WMr5vKIlAjZaJBstZkJJqJpXzYEjP7nESHgRWUiEnavBYLgBdUqO+Bjouue1e4ETEupXwHxsj8w1AfRMga8mwxXpByQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ggRxBSS1jdyhVTv19hqDpHQA6ZEZwDR6jmVyFflH4qg=; b=28khWS7FcX2LckhUqk08YKkSyzEF6tj6Or/ccydT7j/RdXsUKo5IVwcnkjTNS1uzR67x3yB3z3Wv9S0cBaa1DzS1UhrrOf1Oym7E9r8Uho56+/xUkFGvrte3/bb4ntNGls6ijtDk7iVN1oPo0Fhsx3hxxQUfIaYd5j0Mb/Zz8NU= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DB6PR08MB2647.eurprd08.prod.outlook.com (2603:10a6:6:22::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.14; Mon, 21 Sep 2020 19:28:16 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::408a:40fb:7402:c805]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::408a:40fb:7402:c805%6]) with mapi id 15.20.3391.024; Mon, 21 Sep 2020 19:28:16 +0000 From: Honnappa Nagarahalli To: "Jakub Grajciar -X (jgrajcia - PANTHEON TECH SRO at Cisco)" , Phil Yang , "dev@dpdk.org" CC: Ruifeng Wang , nd , Honnappa Nagarahalli , nd Thread-Topic: [PATCH] net/memif: relax barrier for zero copy path Thread-Index: AQHWh/3IeDLcy7ejgU2qzU3V0Erpralu/WvAgAPeyQCAAK0+UA== Date: Mon, 21 Sep 2020 19:28:16 +0000 Message-ID: References: <1599802699-20876-1-git-send-email-phil.yang@arm.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: A9A3512D9333A248B96F936706570D2E.0 x-checkrecipientchecked: true Authentication-Results-Original: cisco.com; dkim=none (message not signed) header.d=none;cisco.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [217.140.110.7] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d1a4f299-6563-45fe-ee4d-08d85e6481bc x-ms-traffictypediagnostic: DB6PR08MB2647:|DB7PR08MB3739: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:8273;OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: dUmHZCdPaKZ4agNWHW/+PvL/07+VfB6oqk9qsvjK5OdWgWb43uygsOhqp111zx1KePbfseNZj/gf0MhsUmjpZddTkiI1p5KZIeOjYMPIF61oXjMVFABXUbOkl9k3U0sTv0PYCEPR2Xp5POIbt05+D13cco7Awqkt98TIraC323wTLAilw0VepAnGWQFGQYCEfo0Cw3+nAMV+GlZVCYtSPq4sbYTYWlhWu1zk5fvgA06aWkCQlxHFfe0D+5HP3C2jPS/BSoxbZ5fdryxLi1h4axak97ubpuW2BqvJltVWPRbGeVSr1LsF3DtH7psvtNU5fKklVS1ZfM9NCnXla+LQmkF4GZRjLctCQtZTWBswr1uGbs9x7iRFM97icAoU1ChXeX2RMz5zzMy1si7NHW68mw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(346002)(39860400002)(376002)(136003)(396003)(478600001)(76116006)(316002)(83380400001)(55016002)(110136005)(86362001)(186003)(54906003)(966005)(52536014)(4326008)(26005)(9686003)(71200400001)(5660300002)(66476007)(66446008)(6506007)(64756008)(8936002)(66556008)(53546011)(2906002)(66946007)(8676002)(7696005)(33656002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: jOwgxKEfLCRvQ8yWLTOBLyy+6VIxOWGgHz+bx24SMi9v9jQ/doY7sFMENsp3EIHaxl+VpyII13XLdPB1xwGUjV7FrfKyyUjPEq4rquEvwuAQ7m8U5lbgLcF7eje4N23fSQVphiDUONenvTYbJgLns4KtChuJstOB+ENnqktK1Cc2C8c6gLf6ECkSjTOA+uwp5+Oycn79jOpQ2FruCwLScN7dSeM13cLmLTAHoVBblMFyi0cc12Y31yvcn+mIXow8joQAmHX6vNFvgeU5VtAOBU+u8D8+Sl++1pCgsSk/2TeiLQdTUHYnrK36T+Ss9/sjR29p0kzovm8F7qivzNvgaC7zZ89WedjaC1LW2IqAHJ9zODO1KFbdlAubZz0FFHbt4oMa4vgrT0UGLnj6pctJ/r/ux2nOIIm399KwNO09DxudRcH4UMTaxPicrZkvf0FsVz35UQPF1n7CfQ+sHNsyF6tfu1oVcDC1vf6dIUd35inHixkdF+P5/NHCRBP6nwBqVaRdtmR3EOJF/dne6GOHjtK5AQG7bFUKEUIKw+nO1Lm46YnTeuALtLW0IVgMiI4DbPxw+BmbGWSaGGL8TYNVG5GMiFpL1Dj82AKA2bJTU6VwFCQHUW9L7DnLmytGv9B/l9EaBufpp452mTD+/mVkug== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR08MB2647 Original-Authentication-Results: cisco.com; dkim=none (message not signed) header.d=none;cisco.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT050.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 0a476e72-7726-4170-d249-08d85e647d4b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6rQXg4mTPzUI6M8vdzYNFNeUqhPY93rYUXxEXC9C1VnPLTcUhXcsDtezjSjMbGSOnifwYfqBAyaIRjbEPq578WAM0p07dcEKMrLtpy+O85x7Itrh1Iby+9F9sZI04RNWsWm6v9h7is3WlucvFpdqcIoVp4SiYHLskmp4ZBCOFaSEhd/8Quo43H2mLLbwY2MG+fJrCP9q/540/23kSNFGA4E9VLgTuODlXgO9mEh7GGQF1QGhZvvLtqjFICqA/0uZGbKC0DPWMvzcKdV1wZSJUIcLizvN1OZPZ3gJJp6+G4LxZ/hDpjVwkkXCgwtRwe2lF+90AMSFvmKTjigEHESOWZuyYclJ6iHYvKe3PL/yH8xlk5S1zUAS6oRZb4PO4UqQswks1UoY+Bec2UbI+TB2KRgZGEIT3Ti02z5FoQSvxYYVWObjiiaXAITrbFipCj4hAovyHJFJYKvBtPM0qfN8qqAp2QHkRPYt57T1vm0p0YQ= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(396003)(39860400002)(376002)(346002)(136003)(46966005)(2906002)(8676002)(316002)(478600001)(8936002)(70586007)(70206006)(336012)(83380400001)(4326008)(5660300002)(82740400003)(47076004)(26005)(356005)(966005)(186003)(55016002)(7696005)(33656002)(81166007)(110136005)(9686003)(82310400003)(86362001)(54906003)(53546011)(6506007)(52536014); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2020 19:28:23.9248 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d1a4f299-6563-45fe-ee4d-08d85e6481bc X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT050.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3739 Subject: Re: [dpdk-dev] [PATCH] net/memif: relax barrier for zero copy path 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 Jakub, > > I am trying to review this patch. I am having difficulty in > > understanding the implementation for the queue/ring, appreciate if you > > could help me understand the logic. >=20 > 'ring' refers to a ring buffer holding packet descriptors. These descript= ors > hold metadata about the packet (packet buffer address, length, etc..). > 'queues' are a representation of rings and buffers (+ some metadata). In > more detail, one ring (S2M) and packet buffers allocated for this ring wo= uld > be represented as 'tx queue' for the slave and 'rx queue' for the master. Thanks Jakub. I could run the testpmd app and was able to understand the im= plementation. I found some issues and I have sent out a patch series [1]. [1] https://patches.dpdk.org/patch/78212/ >=20 > > > > 1) The S2M queues - are used to send packets from slave to master. My > > understanding is that, the slave thread would call 'eth_memif_tx_zc' > > and the master thread would call 'eth_memif_rx_zc'. Is this correct? > > 2) The M2S queues - are used to send packets from master to slave. > > Here the slave thread would call 'eth_memif_rx_zc' and the master > > thread would call 'eth_memif_tx_zc'. Is this correct? >=20 > This is inded correct. >=20 > > > > Thank you, > > Honnappa > > > > > -----Original Message----- > > > From: Phil Yang > > > Sent: Friday, September 11, 2020 12:38 AM > > > To: jgrajcia@cisco.com; dev@dpdk.org > > > Cc: Honnappa Nagarahalli ; Ruifeng > > > Wang ; nd > > > Subject: [PATCH] net/memif: relax barrier for zero copy path > > > > > > Using 'rte_mb' to synchronize the shared ring head/tail between > > > producer and consumer will stall the pipeline and damage performance > > > on the weak memory model platforms, such like aarch64. > > > > > > Relax the expensive barrier with c11 atomic with explicit memory > > > ordering can improve 3.6% performance on throughput. >=20 > My question here is: `rte_mb` is supposed to make sure that head/tail > pointer are not updated before the packets are written into shared memory= . > Does the atomic ensures that the packets are written into shared memory > before head/tail pointers are updated?