From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f181.google.com (mail-we0-f181.google.com [74.125.82.181]) by dpdk.org (Postfix) with ESMTP id D132FAFE0 for ; Fri, 25 Apr 2014 14:00:19 +0200 (CEST) Received: by mail-we0-f181.google.com with SMTP id q58so3536929wes.12 for ; Fri, 25 Apr 2014 05:00:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=t277/Lvl7Yq7YvtwI4zOhKeRpS9SKiei30jXTkVZuPg=; b=MR2RP7Iq+VCA0F+cQwM/klYF03DRtiiY8o1D870CGZL4MqKm+obyWOEBrUJD0VBpxr mVKtqA4BIJnDf/hVVBDecnwCq+8ar0hUocygkSZz2aVyOgDkLDNDYhl7i5lkbsTH2xcS TaW0jw7qN2uTm+VboYAqfCIHUtbWPisa49O5aT1rZqR16Q6wlNL/pem3If6+CfZjiypV V6AE9U2KtgjD3TxXTxwDX+GR+emcANXVQaOsFmMYxRCKkH0mdj473AfGfUFg1oMd1S/l p1Ld71KHoAhIdihWuYwPZKSTMOGRf488rmJwngXL6C5j2cNqCd3oEvb7r27OSpa+AWoF hlJw== X-Gm-Message-State: ALoCoQmegTvnUzqPLMqEFdKfx1T3+/egAllJr4yLo9Fpg0Foavc/rKOd9Ct2vJQb7JSSwyotddA9 X-Received: by 10.181.13.137 with SMTP id ey9mr3434114wid.54.1398427222697; Fri, 25 Apr 2014 05:00:22 -0700 (PDT) Received: from glumotte.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id q2sm5487386wix.5.2014.04.25.05.00.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 Apr 2014 05:00:21 -0700 (PDT) From: Olivier Matz To: dev@dpdk.org Date: Fri, 25 Apr 2014 13:59:48 +0200 Message-Id: <1398427188-14914-11-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 1.9.2 In-Reply-To: <1398427188-14914-1-git-send-email-olivier.matz@6wind.com> References: <1398427188-14914-1-git-send-email-olivier.matz@6wind.com> Subject: [dpdk-dev] [PATCH 10/10] bsd/mem: get physical address of any pointer X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 12:00:20 -0000 The bsdapp part was missing in commit 57c24af85d9eaa81549a212169605b4e2468a29f. This commit adds a dummy rte_mem_virt2phy() to fix the compilation of DPDK under BSD. This function is only used when the debug option "--no-huge" is given, to get the physical address of mempools in memory. As a result, it seems acceptable for now to implement a dummy function to fix the compilation as the usual case (using contigmem module) works properly. Signed-off-by: Olivier Matz --- lib/librte_eal/bsdapp/eal/eal_memory.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/librte_eal/bsdapp/eal/eal_memory.c b/lib/librte_eal/bsdapp/eal/eal_memory.c index 7d2d269..65aabf2 100644 --- a/lib/librte_eal/bsdapp/eal/eal_memory.c +++ b/lib/librte_eal/bsdapp/eal/eal_memory.c @@ -47,6 +47,18 @@ #define PAGE_SIZE (sysconf(_SC_PAGESIZE)) +/* + * Get physical address of any mapped virtual address in the current process. + */ +phys_addr_t +rte_mem_virt2phy(const void *virtaddr) +{ + /* XXX not implemented. This function is only used by + * rte_mempool_virt2phy() when hugepages are disabled. */ + (void)virtaddr; + return RTE_BAD_PHYS_ADDR; +} + static int rte_eal_contigmem_init(void) { -- 1.9.2