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 98A53A0613 for ; Fri, 30 Aug 2019 08:07:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 706BD1E54C; Fri, 30 Aug 2019 08:07:51 +0200 (CEST) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50070.outbound.protection.outlook.com [40.107.5.70]) by dpdk.org (Postfix) with ESMTP id 7A7681E54B for ; Fri, 30 Aug 2019 08:07:49 +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=/S8k8+5IjtTfFhUWsvdpWZte1FF67FKXkjIusoWHu70=; b=9SbUN1duksrhPXkkEMwVpZAvm5K02u7E0orGId9d3pBWwEyyvNaBAH6S9B5KQDzZEjnd1svlSkOuWi7HpwhNmk6fIc4B2iPZ4aBV1qNj5HD7H0GAKXC2Fokz53LXJCTApTILepWykJ//0SzYKEOJibTzQwg5mdyEluVoHwjIlN0= Received: from VI1PR08CA0165.eurprd08.prod.outlook.com (2603:10a6:800:d1::19) by HE1PR0801MB1849.eurprd08.prod.outlook.com (2603:10a6:3:89::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.21; Fri, 30 Aug 2019 06:07:46 +0000 Received: from AM5EUR03FT022.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::206) by VI1PR08CA0165.outlook.office365.com (2603:10a6:800:d1::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2220.18 via Frontend Transport; Fri, 30 Aug 2019 06:07:45 +0000 Authentication-Results: spf=temperror (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=temperror action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT022.mail.protection.outlook.com (10.152.16.79) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2220.16 via Frontend Transport; Fri, 30 Aug 2019 06:07:44 +0000 Received: ("Tessian outbound a25c4e5fef41:v27"); Fri, 30 Aug 2019 06:07:44 +0000 X-CR-MTA-TID: 64aa7808 Received: from 1f12f27c615b.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.4.50]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 68C1B5F7-F5D0-4B7C-9AB6-4E7707892D91.1; Fri, 30 Aug 2019 06:07:39 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02lp2050.outbound.protection.outlook.com [104.47.4.50]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1f12f27c615b.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384); Fri, 30 Aug 2019 06:07:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kHpo7INIEr5f3dRLA0cuhEaz3xCOFCaOiPQngdWDOivTLrqxCGAbMW9r4w3vtfW6uUud8JBfu2fLGqByY15QgTFhNUYj2U2gi7M+FD6esjuKwGxN3Ex8jG9SucbTzmoq0PRzhLHXQe9Qpn1ALvVsof1thkKcjKS6TITkM0JeH4nTD2lQvQBFhvbF6U/6hQXvHDEW/f24FFfnBAsa0HucPdfSg/TplPhARB7nvHgj5EZU4v2QImXdRLujZD7WOB7A5f8V1g30szGA6rk2EIaRnAOVCfGuy0VCIIRGYWYuTHeCWSTMtGAFmAapWkcCTxX8FW7FWYWO8BBohos4yV35yg== 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=cs1DtESe6+idR2BkEhbClwBbOhNR8PjmOumz8fdbk9Y=; b=QqgfSuCy0SHs8Mw0So6qE7XooQ8XTx1/TTbUwPwJbsdY357SS7w+a52gi1wxo44ppssDvVy1KQomW2ryxXgpYwxaT2hoSKhXRVH/nE5T4h+Szksb8EHjmO2218bWoESuzLlWyb1J7TwJcBh1l6Yq80HelTb/z7Fs9Z5Arpy1lD2M8tyZ7ALTgHtsPwnLoBREhwCg1TUl+717aHrTQYmumovyZpiIk/pkdhHT3ziHxP3JcG8HiLL3rbT80KFSRR+PNUZC4c7K6qj6L6ZYI1fQ3XviAN7I8lOIHcNVf7hUPIGLX2MpDeZvfnmyg/PKAQNPsOl6sPPUnLExqeB+x+sAWw== 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=cs1DtESe6+idR2BkEhbClwBbOhNR8PjmOumz8fdbk9Y=; b=MYK+RXdmTAtfJiApw53uqmNhHYFRmHSU7S6bDcpHI4AIg6yF1GvyS1Lro7DrHiyx1STT0FKHg182oTaGWa3Lvn9Tmg3JsO6WZdy4roPyTsdKp2lOYPvkhBEZp+/2hhpDU923CYzxQnr4hQN+4lUBT80Mhb0uWBZcda+doxJvRs0= Received: from VI1PR08MB5376.eurprd08.prod.outlook.com (52.133.244.200) by VI1PR08MB4495.eurprd08.prod.outlook.com (20.179.28.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2220.18; Fri, 30 Aug 2019 06:07:36 +0000 Received: from VI1PR08MB5376.eurprd08.prod.outlook.com ([fe80::dc84:8edf:ba9f:faeb]) by VI1PR08MB5376.eurprd08.prod.outlook.com ([fe80::dc84:8edf:ba9f:faeb%2]) with mapi id 15.20.2220.013; Fri, 30 Aug 2019 06:07:36 +0000 From: "Gavin Hu (Arm Technology China)" To: JinYu , "dev@dpdk.org" CC: "changpeng.liu@intel.com" , "maxime.coquelin@redhat.com" , "tiwei.bie@intel.com" , "zhihong.wang@intel.com" , Honnappa Nagarahalli , "jerinj@marvell.com" Thread-Topic: [dpdk-dev] [PATCH v6 00/10] vhost: support inflight share memory protocol feature Thread-Index: AQHVXjLGkM2PwRtCY0CzDFBm+If2racTNEDA Date: Fri, 30 Aug 2019 06:07:36 +0000 Message-ID: References: <20190806182500.22320> <20190829141224.49700-1-jin.yu@intel.com> In-Reply-To: <20190829141224.49700-1-jin.yu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 552e225f-739c-460c-9649-1497b1b528fc.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: 02250d10-5118-41c1-0ed1-08d72d105f96 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam-Untrusted: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VI1PR08MB4495; X-MS-TrafficTypeDiagnostic: VI1PR08MB4495:|VI1PR08MB4495:|HE1PR0801MB1849: X-MS-Exchange-PUrlCount: 2 x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:5236;OLM:5236; x-forefront-prvs: 0145758B1D X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(346002)(136003)(39860400002)(366004)(376002)(396003)(199004)(189003)(13464003)(9686003)(55016002)(6306002)(966005)(99286004)(53936002)(6436002)(52536014)(55236004)(53546011)(6506007)(54906003)(25786009)(66446008)(64756008)(66556008)(66476007)(66946007)(76116006)(11346002)(66066001)(486006)(476003)(6246003)(5660300002)(478600001)(7696005)(14444005)(256004)(71200400001)(71190400001)(76176011)(2906002)(86362001)(446003)(6116002)(3846002)(33656002)(110136005)(316002)(186003)(81156014)(102836004)(4326008)(229853002)(8936002)(14454004)(81166006)(26005)(74316002)(7736002)(2501003)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB4495; H:VI1PR08MB5376.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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-Original: 5+5kTQOwd2cWKHlpEQD4hWLFi6nk7pyruoga2NQuE8qZM93HS8l8IUIodOQyhFUdssGWqcvp1K1LkP2YHR/cnfmweii2aH1pMU6Gpz/sDvB5LIrVajRZ6olMSvS9I0TyTzlgD/MR1Lx7OhikpG+355BOJc8FtvcTLQUYgiijaWaH1FnMVEKbnGGGlGch11pcS0WcrFug6UgvjfbYj0y1g1k1bVEt75DAWPUMau4Epbp6VwfSSuc6YAiJStZOyWgVL3Sp5b8FYEKHNz9quqpWC7mSwmCpEC9aWjryd/om1ZEr80cKWvNZhN8YHV6nyNIqSc+8k8rCOeky88r6qz2piX2qB/0kb4zNcAPXVObflYA6dUTR97X/CFrj1b9sxLyCOe57ysB10tzuZP7TwgykXSOX/ia4D+NhLXq5dDsz3xk= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4495 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT022.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(136003)(39860400002)(396003)(346002)(376002)(2980300002)(13464003)(189003)(199004)(40434004)(14454004)(81166006)(66066001)(7736002)(47776003)(55016002)(6306002)(22756006)(74316002)(81156014)(9686003)(107886003)(6246003)(97756001)(229853002)(2501003)(305945005)(25786009)(99286004)(8746002)(8936002)(966005)(26826003)(4326008)(36906005)(478600001)(33656002)(50466002)(316002)(7696005)(2906002)(54906003)(356004)(46406003)(26005)(52536014)(76176011)(110136005)(102836004)(6506007)(86362001)(70206006)(53546011)(6116002)(3846002)(70586007)(336012)(11346002)(63350400001)(126002)(476003)(446003)(63370400001)(5660300002)(14444005)(5024004)(486006)(23726003)(186003)(76130400001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0801MB1849; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:TempError; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; MX:1; A:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: 523290d2-1ae9-4038-6d02-08d72d105b06 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(710020)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:HE1PR0801MB1849; X-Forefront-PRVS: 0145758B1D X-Microsoft-Antispam-Message-Info: pTcuBc47a/2GJ/JGElIs3SNLO0sDAKsf3MN8UyagXF4mdHbexRATB+S3pYZwBlwHJf5aQm8nwlPOBzJfxRSDbdcHFJt2e19QthwvJR6nNS9s4RABwSgPL4XHsdkfcnCY+mLGRXYtDQAfrXW5ie9vkImwFnhy5zhXU0MyBmKWqJkDaM9cGIloBnYyVsQ8gjWoH4KId1VgMuSNaj8yG/DrlzfevhDfxqpF8VfgrHachBs131sS4amVAGICD7UEtzmc8oLThxgPqDKV32mZlfokk5RSSRzLMosCDPh+FCJcdt/uc0eByg5vklTzG3qvzTnrdkxv4aHBRde/TbV24eAiTS3/nL8g9pk9CYNG+LAVXfJLYiblJDRRNO/x+oMKuz8V2VTcCXBOiQ+blXX07WisJo9x796QysHV8uvCOPd/Wr8= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2019 06:07:44.1888 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 02250d10-5118-41c1-0ed1-08d72d105f96 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-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1849 Subject: Re: [dpdk-dev] [PATCH v6 00/10] vhost: support inflight share memory protocol feature 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 Jin, I see in this patch set there are several callings rte_compiler_barrier() w= hich is sufficient for x86 but not for aarch64/ppc and other weaker memory = model architectures. EAL has defined coherent memory io barriers(I think this should be the righ= t barrier) for mutli-arch support. Could you change these barriers to rte_c= io_r/wmb barriers? http://git.dpdk.org/dpdk/tree/lib/librte_eal/common/include/generic/rte_ato= mic.h#n110 Best Regards, Gavin > -----Original Message----- > From: dev On Behalf Of JinYu > Sent: Thursday, August 29, 2019 10:12 PM > To: dev@dpdk.org > Cc: changpeng.liu@intel.com; maxime.coquelin@redhat.com; > tiwei.bie@intel.com; zhihong.wang@intel.com; JinYu > Subject: [dpdk-dev] [PATCH v6 00/10] vhost: support inflight share memory > protocol feature > > This patches introduces two new messages > VHOST_USER_GET_INFLIGHT_FD > and VHOST_USER_SET_INFLIGHT_FD to support transferring a shared > buffer between qemu and backend for backend reconnection. > Now It can both support split and packed ring. The example code show > how these APIs work. The test has passed. > > How to test the example: > 1, Qemu need a patch. > https://patchwork.kernel.org/patch/10861411/ > it also needs some manual modifications: > we should confirm that before we send get inflight we have already > sent the set features but it seems Qemu didn't do like this. So we > manually revise this, we can add below code in vhost_dev_get_inflight > int r; > > r =3D vhost_dev_set_features(dev, dev->log_enabled); > if (r < 0) { > return -errno; > } > before get_inflight_fd. > 2, Guest OS version >=3D 5.0 > 3, run the example > 4, run the qemu with vhost-user-blk-pci. > eg: > -chardev socket,id=3Dspdk_vhost_blk0,reconnect=3D1,path=3Dxxxx\ > -device vhost-user-blk- > pci,ring_packed=3Don,chardev=3Dspdk_vhost_blk0,num-queues=3D1\ > 5, run fio in the guest > 6, kill the example and run again. > 7, the fio in the guest should continue run without errors. > > JinYu (10): > vhost: add the inflight description > vhost: add packed ring > vhost: add the inflight structure > vhost: add two new messages to support a shared buffer > vhost: checkout and cleanup the resubmit inflight information > vhost: add the APIs to operate inflight ring > vhost: add APIs for user getting inflight ring > vhost: fix vring functions to support packed ring > vhost: add an API for judging vq format > vhost: add vhost-user-blk example which support inflight > > examples/vhost_blk/Makefile | 67 ++ > examples/vhost_blk/blk.c | 125 +++ > examples/vhost_blk/blk_spec.h | 95 ++ > examples/vhost_blk/meson.build | 20 + > examples/vhost_blk/vhost_blk.c | 1313 +++++++++++++++++++++++++ > examples/vhost_blk/vhost_blk.h | 116 +++ > examples/vhost_blk/vhost_blk_compat.c | 195 ++++ > lib/librte_vhost/rte_vhost.h | 250 ++++- > lib/librte_vhost/vhost.c | 396 +++++++- > lib/librte_vhost/vhost.h | 16 + > lib/librte_vhost/vhost_user.c | 439 +++++++++ > lib/librte_vhost/vhost_user.h | 12 +- > 12 files changed, 3032 insertions(+), 12 deletions(-) > create mode 100644 examples/vhost_blk/Makefile > create mode 100644 examples/vhost_blk/blk.c > create mode 100644 examples/vhost_blk/blk_spec.h > create mode 100644 examples/vhost_blk/meson.build > create mode 100644 examples/vhost_blk/vhost_blk.c > create mode 100644 examples/vhost_blk/vhost_blk.h > create mode 100644 examples/vhost_blk/vhost_blk_compat.c > > -- > 2.17.2 IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.