From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.advaoptical.com (mail.advaoptical.com [91.217.199.15]) by dpdk.org (Postfix) with ESMTP id 187DEAFD7 for ; Tue, 29 Apr 2014 19:53:29 +0200 (CEST) Received: from MUC-SRV-MBX1.advaoptical.com ([172.20.1.95]) by muc-vsrv-fsmail.advaoptical.com (8.14.5/8.14.5) with ESMTP id s3THrXTc004645 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Tue, 29 Apr 2014 19:53:33 +0200 Received: from MUC-SRV-MBX2.advaoptical.com (172.20.1.96) by MUC-SRV-MBX1.advaoptical.com (172.20.1.95) with Microsoft SMTP Server (TLS) id 15.0.913.11; Tue, 29 Apr 2014 19:53:31 +0200 Received: from MUC-SRV-MBX2.advaoptical.com ([fe80::4c9d:240f:40f7:8e0b]) by MUC-SRV-MBX2.advaoptical.com ([fe80::2d63:66d4:833b:72f0%18]) with mapi id 15.00.0913.011; Tue, 29 Apr 2014 19:53:31 +0200 From: Samuel Monderer To: "dev@dpdk.org" Thread-Topic: could not l2fwd in DOM0 Thread-Index: Ac9j0vUnb82OilObREO8jzx6VqYofA== Date: Tue, 29 Apr 2014 17:53:30 +0000 Message-ID: <7b60de2c2b904fe78a5ab2f73c08955f@MUC-SRV-MBX2.advaoptical.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.179.71] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.96, 1.0.14, 0.0.0000 definitions=2014-04-29_05:2014-04-29,2014-04-29,1970-01-01 signatures=0 Cc: Shimon Zadok Subject: [dpdk-dev] could not l2fwd in DOM0 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: Tue, 29 Apr 2014 17:53:29 -0000 Hi, First I've encountered a compiling problem when compiling for DOM0 due to p= rototype 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_e= al/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 #include #include +//#include #include #include @@ -309,6 +310,7 @@ dom0_prepare_memsegs(struct memory_info* meminfo, struc= t dom0_mm_data uint64_t pfn, vstart, vaddr; uint32_t i, num_block, size; int idx; + dma_addr_t *dma_handle =3D NULL; /* Allocate 2M memory once */ num_block =3D meminfo->size / 2; @@ -344,7 +346,7 @@ dom0_prepare_memsegs(struct memory_info* meminfo, struc= t 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) =3D=3D 0) { + DOM0_CONTIG_NUM_ORDER, 0, dma_handle) = =3D=3D 0) { mm_data->block_info[i].exchange_flag =3D 1; mm_data->block_info[i].mfn =3D 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/i= gb_uio.ko root@Smart:~/samuelm/dpdk/dpdk# insmod ./x86_64-default-linuxapp-gcc/kmod/r= te_dom0_mm.ko root@Smart:~/samuelm/dpdk/dpdk# cd examples/l2fwd/build/ root@Smart:~/samuelm/dpdk/dpdk/examples/l2fwd/build# echo 2048 > /sys/kerne= l/mm/dom0-mm/memsize-mB/memsize root@Smart:~/samuelm/dpdk/dpdk/examples/l2fwd/build# ./l2fwd -c 3 -n 4 --xe= n-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