[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] dpdk kernel module when calling xen_create_contiguous_region



On Thu, May 01, 2014 at 01:57:17PM +0000, Samuel Monderer wrote:
> 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.


You might consider also CC-ing the DPDK developers.

> --- 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
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.