From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 76B8D1B17B for ; Fri, 28 Sep 2018 12:38:18 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180928103817euoutp02b892f28b097904eaadf7979f35c87d7c~YihV0KTIE1943919439euoutp02A for ; Fri, 28 Sep 2018 10:38:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180928103817euoutp02b892f28b097904eaadf7979f35c87d7c~YihV0KTIE1943919439euoutp02A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1538131097; bh=T4h8egGCcjjZ8MZA3wnNCeyBYtSNV+iwNVgTie68OTw=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=THap0Q10K47TOkMgLk2sNbm/ZX4o7yvRYLgBOvjatmt2UDH4+IfzQADywltnPreg1 wtjNXKxt/7DrxriK1oZksuvXQ4+00dRVPQF7PMIqSvknMqSeE613w1mmTPNHQbHRGl q7rj2kviF5B2uInpOoNZZJCz6Lb1QfqaRvRLzBY8= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180928103816eucas1p19d5e5fe1e88596f9ff6be64f01bd25dd~YihVJBeWo2457124571eucas1p1P; Fri, 28 Sep 2018 10:38:16 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 89.51.04294.8940EAB5; Fri, 28 Sep 2018 11:38:16 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20180928103815eucas1p1ddb4141bea8b9ef965073a4706ccdaea~YihUJIT9-2460124601eucas1p1Z; Fri, 28 Sep 2018 10:38:15 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20180928103815eusmtrp232a564eda1bbc827ac32c704a237257f~YihT4OEJG2063120631eusmtrp2M; Fri, 28 Sep 2018 10:38:15 +0000 (GMT) X-AuditID: cbfec7f4-835ff700000010c6-10-5bae04988c2e Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 05.E1.04284.7940EAB5; Fri, 28 Sep 2018 11:38:15 +0100 (BST) Received: from [106.109.129.180] (unknown [106.109.129.180]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20180928103814eusmtip27066c557c6fbc3492538febe4207825c~YihTWlQ1w1466014660eusmtip2E; Fri, 28 Sep 2018 10:38:14 +0000 (GMT) From: Ilya Maximets To: Maxime Coquelin , dev@dpdk.org, tiwei.bie@intel.com, zhihong.wang@intel.com, jfreimann@redhat.com Cc: dgilbert@redhat.com, Thomas Monjalon Date: Fri, 28 Sep 2018 13:40:25 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180927082608eucas1p17cd1d99e54134fb2a6de3151e52048f3~YNErH8Swu2138421384eucas1p1G@eucas1p1.samsung.com> Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA02Sa0hTYRjHec852zkOZ6/T8mEVxdAgKS8pOEM0MWhERF8kaR905klFnbLj JfODkpd0pYgfWk4jL4jX1ExdedlymrMLS0nBUdQqISzUUiHtonU8Vn77Pf/n/7zP/4GXIWVd IjmTrM1kdVpNqkIsofrH1+1Hb1Gd6oCOG/uVi8smQlne/4ZWTl9bp5X2jiZKOV42RCmXnROU sq9gk1Den6oiTjCq73VNIlXj0DyhGnfcpFVL5hmxqqK3DZ0TXZCEJbCpydmszj88TpI0OPqK yFhyu9xt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Cxe+3TGEBsVkEVCXO7P0LFhcViJBYvfwFVI2gxMmZT8BqOAXK JRZuWsEMYjMLqEv8mXcJyhaXaPqykhXClpfY/nYO8wRGoVlI2mchaZmFpGUWkpYFjCyrGEVS S4tz03OLDfWKE3OLS/PS9ZLzczcxAmNw27Gfm3cwXtoYfIhRgINRiYc34dGaaCHWxLLiytxD jBIczEoivPuq10YL8aYkVlalFuXHF5XmpBYfYjQFem4is5Rocj4wPeSVxBuaGppbWBqaG5sb m1koifOeN6iMEhJITyxJzU5NLUgtgulj4uCUamDkj/sl5nCFcfonwZKpq1tWr+7uOsmZGbFm SW3nMjvN1xuyw40dw1nMdir+f5RpZBn9RFEqc0fAPFE3OZflGRdup0QuXfhTIzzN4kV0nNPb g1NnvNm1O8vG4fefdvbkXZJcNvnL3eb8u7Rqje2ejesF5hQvvJtYc4vf7vXVQv19erqnP65O LFmtxFKckWioxVxUnAgA23quYdcCAAA= Message-Id: <20180928103815eucas1p1ddb4141bea8b9ef965073a4706ccdaea~YihUJIT9-2460124601eucas1p1Z@eucas1p1.samsung.com> X-CMS-MailID: 20180928103815eucas1p1ddb4141bea8b9ef965073a4706ccdaea X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20180927082608eucas1p17cd1d99e54134fb2a6de3151e52048f3 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180927082608eucas1p17cd1d99e54134fb2a6de3151e52048f3 References: <20180926072705.22641-1-maxime.coquelin@redhat.com> <20180926072705.22641-5-maxime.coquelin@redhat.com> <20180927082608eucas1p17cd1d99e54134fb2a6de3151e52048f3~YNErH8Swu2138421384eucas1p1G@eucas1p1.samsung.com> Subject: Re: [dpdk-dev] [04/12] vhost: introduce postcopy's advise message 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: Fri, 28 Sep 2018 10:38:18 -0000 On 27.09.2018 11:28, Ilya Maximets wrote: > On 26.09.2018 10:26, Maxime Coquelin wrote: >> This patch opens a userfaultfd and sends it back to Qemu's >> VHOST_USER_POSTCOPY_ADVISE request. >> >> Signed-off-by: Dr. David Alan Gilbert >> Signed-off-by: Maxime Coquelin >> --- >> lib/librte_vhost/vhost.h | 2 ++ >> lib/librte_vhost/vhost_user.c | 37 +++++++++++++++++++++++++++++++++++ >> lib/librte_vhost/vhost_user.h | 3 ++- >> 3 files changed, 41 insertions(+), 1 deletion(-) >> >> diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h >> index 25ffd7614..21722d8a8 100644 >> --- a/lib/librte_vhost/vhost.h >> +++ b/lib/librte_vhost/vhost.h >> @@ -363,6 +363,8 @@ struct virtio_net { >> int slave_req_fd; >> rte_spinlock_t slave_req_lock; >> >> + int postcopy_ufd; >> + >> /* >> * Device id to identify a specific backend device. >> * It's set to -1 for the default software implementation. >> diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c >> index a9b429598..bdfe2cac0 100644 >> --- a/lib/librte_vhost/vhost_user.c >> +++ b/lib/librte_vhost/vhost_user.c >> @@ -24,9 +24,13 @@ >> #include >> #include >> #include >> +#include >> +#include > > Maybe we need compile time check for this header existence? > Otherwise, this will bump minimal kernel version for default linux build > to something like 4.3. We'll need a config option here (disabled by default) and guard all the postcopy related code. Meson build will be able to detect the header file and enable the config if possible. Like this: lib/librte_vhost/meson.build: if cc.has_header('linux/userfaultfd.h') dpdk_conf.set10('RTE_LIBRTE_VHOST_POSTCOPY', true) endif Best regards, Ilya Maximets.