> -----Original Message----- > From: Stephen Hemminger [mailto:stephen at networkplumber.org] > Sent: Sunday, February 15, 2015 10:28 PM > To: Liu, Jijiang > Cc: Stephen Hemminger; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH 1/4] xen: allow choosing dom0 support at > runtime > > On Sun, 15 Feb 2015 04:07:21 +0000 > "Liu, Jijiang" <jijiang.liu at intel.com> wrote: > > > Hi Stephen, > > > > What do you mean ' allow choosing dom0 support at runtime'? > > If you mean user can choose DPDK to run Xen Dom0 or not on DOM0 by a > runtime flag, I don't think your change can achieve this goal. > > > > Thanks > > Jijiang Liu > > With the existing DPDK model if application is built with DOM0 support it will > not work (it crashes) if the application is run in a non DOM0 environment > (with > real huge pages). And vice-versa if application is built without DOM0 support > and it will crash if run in Xen Paravirt mode. > > This patch allows the library to be built in such a way that only one version > needs to be shipped which is important for distro's like RHEL who want to > ship a > shared library. And also important for users like Brocade/Vyatta who build one > binary that needs to work on bare Linux and in Xen PV mode. > Ok, thanks for the explanation.
Could you replace 'internal_config.xen_dom0_support' with 'is_xen_dom0_supported()' in the function rte_eal_hugepage_init()? /* check if app runs on Xen Dom0 */ if (internal_config.xen_dom0_support) { #ifdef RTE_LIBRTE_XEN_DOM0 /* use dom0_mm kernel driver to init memory */ if (rte_xen_dom0_memory_init() < 0) return -1; else return 0; #endif