From: Samuel Monderer <SMonderer@advaoptical.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: Shimon Zadok <SZadok@advaoptical.com>
Subject: [dpdk-dev] could not l2fwd in DOM0
Date: Tue, 29 Apr 2014 17:53:30 +0000 [thread overview]
Message-ID: <7b60de2c2b904fe78a5ab2f73c08955f@MUC-SRV-MBX2.advaoptical.com> (raw)
Hi,
First I've encountered a compiling problem when compiling for DOM0 due to prototype change of the function xen_create_contiguous_region
I made the following changes:
diff --git a/lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c b/lib/librte_eal/linuxapp/xen
index 87fa3e6..8addc21 100644
--- 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 <linux/types.h>
#include <xen/xen.h>
#include <xen/page.h>
@@ -309,6 +310,7 @@ dom0_prepare_memsegs(struct memory_info* meminfo, struct dom0_mm_data
uint64_t pfn, vstart, vaddr;
uint32_t i, num_block, size;
int idx;
+ dma_addr_t *dma_handle = NULL;
/* Allocate 2M memory once */
num_block = meminfo->size / 2;
@@ -344,7 +346,7 @@ dom0_prepare_memsegs(struct memory_info* meminfo, struct dom0_mm_data
* 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);
After that I tried to run l2fwd example and got a segmentation fault
root@Smart:~/samuelm/dpdk/dpdk# modprobe uio
root@Smart:~/samuelm/dpdk/dpdk# insmod ./x86_64-default-linuxapp-gcc/kmod/igb_uio.ko
root@Smart:~/samuelm/dpdk/dpdk# insmod ./x86_64-default-linuxapp-gcc/kmod/rte_dom0_mm.ko
root@Smart:~/samuelm/dpdk/dpdk# cd examples/l2fwd/build/
root@Smart:~/samuelm/dpdk/dpdk/examples/l2fwd/build# echo 2048 > /sys/kernel/mm/dom0-mm/memsize-mB/memsize
root@Smart:~/samuelm/dpdk/dpdk/examples/l2fwd/build# ./l2fwd -c 3 -n 4 --xen-dom0 -- -q 1 -p 3
EAL: Detected lcore 0 as core 0 on socket 0
EAL: Detected lcore 1 as core 0 on socket 0
EAL: Setting up memory...
Segmentation fault
root@Smart:~/samuelm/dpdk/dpdk/examples/l2fwd/build#
Has anyone already encountered this problem?
Samuelm
next reply other threads:[~2014-04-29 17:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-29 17:53 Samuel Monderer [this message]
[not found] ` <CAD16F236028A64DBBC0158B1636EA4510E8816E@SHSMSX104.ccr.corp.intel.com>
2014-05-07 4:35 ` Liu, Jijiang
[not found] ` <9f34498d15cd400eb2db76212778c038@MUC-SRV-MBX2.advaoptical.com>
2014-05-07 12:44 ` Samuel Monderer
2014-05-17 7:48 Liu, Jijiang
2014-05-29 9:58 ` Thomas Monjalon
2014-05-29 10:12 ` Liu, Jijiang
2014-06-09 16:02 ` Thomas Monjalon
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=7b60de2c2b904fe78a5ab2f73c08955f@MUC-SRV-MBX2.advaoptical.com \
--to=smonderer@advaoptical.com \
--cc=SZadok@advaoptical.com \
--cc=dev@dpdk.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).