From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00064.outbound.protection.outlook.com [40.107.0.64]) by dpdk.org (Postfix) with ESMTP id DE99D2BD5 for ; Tue, 7 May 2019 13:29:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KLWFiPpM+57w5z91V3q4BpNVfxZXchmLBp7ZIVLhxPo=; b=Ww4MBBAJSnAchOtmIxUugSqnR9KCJdUPRmAxbhtawgcrKHdvapvJvmSRwO6EpT33Xr5XQf4I2DOcb5WWY6cGxvkwWWop0Wui3W1hpJo3pUStHTRXHbUMyzWMin+lbD6JE44Zzxs/COCALk45g2bC5aJPBiptJuEbDiqwy4CUlpc= Received: from VE1PR08MB5149.eurprd08.prod.outlook.com (20.179.30.152) by VE1PR08MB5152.eurprd08.prod.outlook.com (20.179.30.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1856.12; Tue, 7 May 2019 11:29:17 +0000 Received: from VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::f5e3:39bc:e7d9:dfea]) by VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::f5e3:39bc:e7d9:dfea%5]) with mapi id 15.20.1856.012; Tue, 7 May 2019 11:29:17 +0000 From: Honnappa Nagarahalli To: "Damjan Marion (damarion)" , "Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)" CC: Ferruh Yigit , "dev@dpdk.org" , nd , nd Thread-Topic: [dpdk-dev] [RFC v5] /net: memory interface (memif) Thread-Index: AQHU4KZ16NJCh3r9PESlg1+aACrGcKYdLYsAgBgjuyGAI70qEIAFIX7IgAAFuQCAAZTIkA== Date: Tue, 7 May 2019 11:29:17 +0000 Message-ID: References: <20190220115254.18724-1-jgrajcia@cisco.com> <20190322115727.4358-1-jgrajcia@cisco.com> <0762da59-4a97-474f-7d67-e3bd8daf50f2@intel.com> <1556800556778.14516@cisco.com> <1557140414503.9161@cisco.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4801b12a-ef36-4941-a102-08d6d2df3df7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:VE1PR08MB5152; x-ms-traffictypediagnostic: VE1PR08MB5152: x-ms-exchange-purlcount: 2 nodisclaimer: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4714; x-forefront-prvs: 0030839EEE x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(376002)(39860400002)(396003)(366004)(346002)(189003)(199004)(486006)(2906002)(54906003)(446003)(110136005)(68736007)(99286004)(11346002)(476003)(8936002)(81166006)(8676002)(66066001)(7736002)(305945005)(74316002)(316002)(6246003)(53936002)(4326008)(25786009)(86362001)(5660300002)(81156014)(7696005)(76176011)(102836004)(53546011)(6506007)(3846002)(6116002)(478600001)(256004)(71190400001)(9686003)(55016002)(6306002)(71200400001)(966005)(14454004)(6436002)(72206003)(73956011)(229853002)(33656002)(66946007)(76116006)(186003)(26005)(66476007)(64756008)(66556008)(52536014)(66446008); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB5152; H:VE1PR08MB5149.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: e527/4XNOfU1B3rYHvqVmL83+Tk23qG1YMR+AIkTYHrtSw1wHZaGY9djuU4sK+YdIKxmQURpF9HabJ9OnZh/gbFgsuSDcetBc3RWlERGxAJGEvJbeSQiuIHPsRc8RYtpPi/RdkwQ0Jc2WHuBviaVElUPDU1v21CAeUNcYQkfj/xqHR9FT+21YLTff4P4IijGVckXApioXXTgkP+8J64tfMN2f3SASucujD11+qUkwetB/gkMz14zw2whNH5+Hp2sbB/Ty7c9/K3G1go3xs1ji8emS+TitIXQBZmVUhNgPNxT/vjsERd0Yv4S6xgmduTE4Oe4uWWdaKc5bsiGIInhf9QtzM6/92TucDfg8RIuNPq5idoA7kDMqfhExdZtximgfPwWH3tDlgbiMH0dua3zvRkw0QrpVzY60/DnBmPXgLo= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4801b12a-ef36-4941-a102-08d6d2df3df7 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2019 11:29:17.7591 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5152 Subject: Re: [dpdk-dev] [RFC v5] /net: memory interface (memif) 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: , X-List-Received-Date: Tue, 07 May 2019 11:29:20 -0000 > > > >> On 3/22/2019 11:57 AM, Jakub Grajciar wrote: > >>> Memory interface (memif), provides high performance packet transfer > >>> over shared memory. > >>> > >>> Signed-off-by: Jakub Grajciar > >> > > > > <...> > > > >> With that in mind, I believe that 23Mpps is fine performance. No > >> performance target is > >> defined, the goal is to be as fast as possible. > > Use of C11 atomics have proven to provide better performance on weakly > ordered architectures (at least on Arm). IMO, C11 atomics should be used = to > implement the fast path functions at least. This ensures optimal performa= nce > on all supported architectures in DPDK. > > > > Atomics are not required by memif driver. >=20 > Correct, only thing we need is store barrier once per batch of packets, t= o > make sure that descriptor changes are globally visible before we bump hea= d > pointer. May be I was not clear in my comments, I meant that the use of GCC C++11 me= mory model aware atomic operations [1] show better performance. So, instead= of using full memory barriers you can use store-release and load-acquire s= emantics. A similar change was done to svm_fifo data structure in VPP [2] (= though the original algorithm used was different from the one used in this = memif patch). [1] https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html [2] https://gerrit.fd.io/r/#/c/18223/ >=20 > -- > Damjan From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id A469FA0096 for ; Tue, 7 May 2019 13:29:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 89C3B343C; Tue, 7 May 2019 13:29:21 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00064.outbound.protection.outlook.com [40.107.0.64]) by dpdk.org (Postfix) with ESMTP id DE99D2BD5 for ; Tue, 7 May 2019 13:29:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KLWFiPpM+57w5z91V3q4BpNVfxZXchmLBp7ZIVLhxPo=; b=Ww4MBBAJSnAchOtmIxUugSqnR9KCJdUPRmAxbhtawgcrKHdvapvJvmSRwO6EpT33Xr5XQf4I2DOcb5WWY6cGxvkwWWop0Wui3W1hpJo3pUStHTRXHbUMyzWMin+lbD6JE44Zzxs/COCALk45g2bC5aJPBiptJuEbDiqwy4CUlpc= Received: from VE1PR08MB5149.eurprd08.prod.outlook.com (20.179.30.152) by VE1PR08MB5152.eurprd08.prod.outlook.com (20.179.30.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1856.12; Tue, 7 May 2019 11:29:17 +0000 Received: from VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::f5e3:39bc:e7d9:dfea]) by VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::f5e3:39bc:e7d9:dfea%5]) with mapi id 15.20.1856.012; Tue, 7 May 2019 11:29:17 +0000 From: Honnappa Nagarahalli To: "Damjan Marion (damarion)" , "Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)" CC: Ferruh Yigit , "dev@dpdk.org" , nd , nd Thread-Topic: [dpdk-dev] [RFC v5] /net: memory interface (memif) Thread-Index: AQHU4KZ16NJCh3r9PESlg1+aACrGcKYdLYsAgBgjuyGAI70qEIAFIX7IgAAFuQCAAZTIkA== Date: Tue, 7 May 2019 11:29:17 +0000 Message-ID: References: <20190220115254.18724-1-jgrajcia@cisco.com> <20190322115727.4358-1-jgrajcia@cisco.com> <0762da59-4a97-474f-7d67-e3bd8daf50f2@intel.com> <1556800556778.14516@cisco.com> <1557140414503.9161@cisco.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4801b12a-ef36-4941-a102-08d6d2df3df7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:VE1PR08MB5152; x-ms-traffictypediagnostic: VE1PR08MB5152: x-ms-exchange-purlcount: 2 nodisclaimer: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4714; x-forefront-prvs: 0030839EEE x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(376002)(39860400002)(396003)(366004)(346002)(189003)(199004)(486006)(2906002)(54906003)(446003)(110136005)(68736007)(99286004)(11346002)(476003)(8936002)(81166006)(8676002)(66066001)(7736002)(305945005)(74316002)(316002)(6246003)(53936002)(4326008)(25786009)(86362001)(5660300002)(81156014)(7696005)(76176011)(102836004)(53546011)(6506007)(3846002)(6116002)(478600001)(256004)(71190400001)(9686003)(55016002)(6306002)(71200400001)(966005)(14454004)(6436002)(72206003)(73956011)(229853002)(33656002)(66946007)(76116006)(186003)(26005)(66476007)(64756008)(66556008)(52536014)(66446008); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB5152; H:VE1PR08MB5149.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: e527/4XNOfU1B3rYHvqVmL83+Tk23qG1YMR+AIkTYHrtSw1wHZaGY9djuU4sK+YdIKxmQURpF9HabJ9OnZh/gbFgsuSDcetBc3RWlERGxAJGEvJbeSQiuIHPsRc8RYtpPi/RdkwQ0Jc2WHuBviaVElUPDU1v21CAeUNcYQkfj/xqHR9FT+21YLTff4P4IijGVckXApioXXTgkP+8J64tfMN2f3SASucujD11+qUkwetB/gkMz14zw2whNH5+Hp2sbB/Ty7c9/K3G1go3xs1ji8emS+TitIXQBZmVUhNgPNxT/vjsERd0Yv4S6xgmduTE4Oe4uWWdaKc5bsiGIInhf9QtzM6/92TucDfg8RIuNPq5idoA7kDMqfhExdZtximgfPwWH3tDlgbiMH0dua3zvRkw0QrpVzY60/DnBmPXgLo= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4801b12a-ef36-4941-a102-08d6d2df3df7 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2019 11:29:17.7591 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5152 Subject: Re: [dpdk-dev] [RFC v5] /net: memory interface (memif) 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" Message-ID: <20190507112917.Bt7LVSqJYPlg0nFUZVxLtvYbELcZdJwvwz0g56J4MCw@z> > > > >> On 3/22/2019 11:57 AM, Jakub Grajciar wrote: > >>> Memory interface (memif), provides high performance packet transfer > >>> over shared memory. > >>> > >>> Signed-off-by: Jakub Grajciar > >> > > > > <...> > > > >> With that in mind, I believe that 23Mpps is fine performance. No > >> performance target is > >> defined, the goal is to be as fast as possible. > > Use of C11 atomics have proven to provide better performance on weakly > ordered architectures (at least on Arm). IMO, C11 atomics should be used = to > implement the fast path functions at least. This ensures optimal performa= nce > on all supported architectures in DPDK. > > > > Atomics are not required by memif driver. >=20 > Correct, only thing we need is store barrier once per batch of packets, t= o > make sure that descriptor changes are globally visible before we bump hea= d > pointer. May be I was not clear in my comments, I meant that the use of GCC C++11 me= mory model aware atomic operations [1] show better performance. So, instead= of using full memory barriers you can use store-release and load-acquire s= emantics. A similar change was done to svm_fifo data structure in VPP [2] (= though the original algorithm used was different from the one used in this = memif patch). [1] https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html [2] https://gerrit.fd.io/r/#/c/18223/ >=20 > -- > Damjan