All of lore.kernel.org
 help / color / mirror / Atom feed
* dpdk kernel module when calling xen_create_contiguous_region
@ 2014-05-01 13:57 Samuel Monderer
  2014-05-01 15:06 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 4+ messages in thread
From: Samuel Monderer @ 2014-05-01 13:57 UTC (permalink / raw)
  To: xen-devel@lists.xen.org; +Cc: Shimon Zadok, Eyal Ben Saadon, Andrew Sergeev

Hi,

DPDK application requires hugepages to run.
XEN DOM0 does not support hugepages, to be able to run dpdk application in Dom0 a kernel module has been developed to facilitate the allocation and
mapping of memory.

The current version of dpdk uses the old version of  xen_create_contiguous_region which doesn't get the 4th parameter dma_handle.
I tried to update the call to  xen_create_contiguous_region as following, but the module crashes when it calls  xen_create_contiguous_region.
--- a/lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c
+++ b/lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c
@@ -64,6 +64,7 @@
 #include <linux/errno.h>
 #include <linux/vmalloc.h>
 #include <linux/mm.h>

 #include <xen/xen.h>
 #include <xen/page.h>
@@ -309,6 +310,7 @@ dom0_prepare_memsegs(struct memory_info* meminfo, struct dom0_
        uint64_t pfn, vstart, vaddr;
        uint32_t i, num_block, size;
        int idx;
+       dma_addr_t dma_handle;

        /* Allocate 2M memory once */
        num_block = meminfo->size / 2;
@@ -344,7 +346,7 @@ dom0_prepare_memsegs(struct memory_info* meminfo, struct dom0_
                 * contiguous physical addresses, its maximum size is 2M.
                 */
                if (xen_create_contiguous_region(mm_data->block_info[i].vir_addr,
-                                   DOM0_CONTIG_NUM_ORDER, 0) == 0) {
+                                   DOM0_CONTIG_NUM_ORDER, 0, &dma_handle) == 0) {
                        mm_data->block_info[i].exchange_flag = 1;
                        mm_data->block_info[i].mfn =
                                pfn_to_mfn(mm_data->block_info[i].pfn);

Tried to find some documentation xen memory regions without success.

Samuel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-05-01 15:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-01 13:57 dpdk kernel module when calling xen_create_contiguous_region Samuel Monderer
2014-05-01 15:06 ` Konrad Rzeszutek Wilk
2014-05-01 15:20   ` Samuel Monderer
     [not found]   ` <20140501150653.GA18826-6K5HmflnPlqSPmnEAIUT9EEOCMrvLtNR@public.gmane.org>
2014-05-01 15:20     ` [Xen-devel] " Samuel Monderer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.