All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Samuel Monderer <SMonderer@advaoptical.com>
Cc: Shimon Zadok <SZadok@advaoptical.com>,
	Eyal Ben Saadon <ESaadon@advaoptical.com>,
	Andrew Sergeev <ASergeev@advaoptical.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: dpdk kernel module when calling xen_create_contiguous_region
Date: Thu, 1 May 2014 11:06:53 -0400	[thread overview]
Message-ID: <20140501150653.GA18826@phenom.dumpdata.com> (raw)
In-Reply-To: <5cd720275956472496663dc0e0e684a6@MUC-SRV-MBX2.advaoptical.com>

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@lists.xen.org
> http://lists.xen.org/xen-devel

  reply	other threads:[~2014-05-01 15:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-01 13:57 dpdk kernel module when calling xen_create_contiguous_region Samuel Monderer
2014-05-01 15:06 ` Konrad Rzeszutek Wilk [this message]
     [not found]   ` <20140501150653.GA18826-6K5HmflnPlqSPmnEAIUT9EEOCMrvLtNR@public.gmane.org>
2014-05-01 15:20     ` [Xen-devel] " Samuel Monderer
2014-05-01 15:20   ` Samuel Monderer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140501150653.GA18826@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=ASergeev@advaoptical.com \
    --cc=ESaadon@advaoptical.com \
    --cc=SMonderer@advaoptical.com \
    --cc=SZadok@advaoptical.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.