From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] fm10k: support XEN domain0 Date: Fri, 15 May 2015 12:21:04 +0200 Message-ID: <1541656.ZXuqYTxN13@xps13> References: <1431680162-13704-1-git-send-email-shaopeng.he@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Shaopeng He Return-path: Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id 06FBA376C for ; Fri, 15 May 2015 12:21:48 +0200 (CEST) Received: by wgnd10 with SMTP id d10so105300517wgn.2 for ; Fri, 15 May 2015 03:21:47 -0700 (PDT) In-Reply-To: <1431680162-13704-1-git-send-email-shaopeng.he@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, 2015-05-15 16:56, Shaopeng He: > +#ifdef RTE_LIBRTE_XEN_DOM0 > + q->hw_ring_phys_addr = rte_mem_phy2mch(mz->memseg_id, mz->phys_addr); > +#else > q->hw_ring_phys_addr = mz->phys_addr; > +#endif I know this is already done this way in other drivers, but don't you think it's time to create a function to get physical address from a memzone? So we could remove these "ifdef Xen" from every drivers. Thanks