[dpdk-users] A bulding question of DPDK with memnic/pmd
Dear all, I want to install an OVS/memnic software in a KVM virtual machine. For the higher speed, I install memnic/pmd (SR-IOV) instead of virtio, since I believe SR-IOV is faster than virtio. But, I meet some trouble when I build the memnic following the doc ( http://dpdk.org/doc/memnic-pmd) I download the most updated software DPDK 2.2.0 and memnic 1.3. My system is : 1. 2 VCPU 2G Mem 2. Ubuntu 14.04 64bit 3. updated packages I build DPDK successfully, but when I build memnic in VM according to the doc. A lot of error message displays: #... (So many lines of errors) ... ... ... In file included from /home/niuroy/dpdk-2.2.0/build/include/rte_ether.h:50:0, from /home/niuroy/dpdk-2.2.0/build/include/rte_ethdev.h:185, from pmd_memnic.c:32: /home/niuroy/dpdk-2.2.0/build/include/rte_memcpy.h:625:2: error: incompatible type for argument 2 of ?_mm_storeu_si128? MOVEUNALIGNED_LEFT47(dst, src, n, srcofs); ^ In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/xmmintrin.h:1246:0, from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/x86intrin.h:34, from /home/niuroy/dpdk-2.2.0/build/include/rte_vect.h:67, from /home/niuroy/dpdk-2.2.0/build/include/rte_memcpy.h:46, from /home/niuroy/dpdk-2.2.0/build/include/rte_ether.h:50, from /home/niuroy/dpdk-2.2.0/build/include/rte_ethdev.h:185, from pmd_memnic.c:32: /usr/lib/gcc/x86_64-linux-gnu/4.8/include/emmintrin.h:700:1: note: expected ?__m128i? but argument is of type ?int? _mm_storeu_si128 (__m128i *__P, __m128i __B) ^ pmd_memnic.c: In function ?memnic_queue_alloc?: pmd_memnic.c:81:35: error: ?CACHE_LINE_SIZE? undeclared (first use in this function) q = rte_zmalloc(buf, sizeof(*q), CACHE_LINE_SIZE); ^ pmd_memnic.c:81:35: note: each undeclared identifier is reported only once for each function it appears in pmd_memnic.c: In function ?memnic_dev_stats_get?: pmd_memnic.c:182:3: error: ?fdirmatch? is deprecated (declared at /home/niuroy/dpdk-2.2.0/build/include/rte_ethdev.h:212) [-Werror=deprecated-declarations] stats->fdirmatch += st->fdirmatch; ^ pmd_memnic.c:182:3: error: ?fdirmatch? is deprecated (declared at /home/niuroy/dpdk-2.2.0/build/include/rte_ethdev.h:212) [-Werror=deprecated-declarations] pmd_memnic.c:183:3: error: ?fdirmiss? is deprecated (declared at /home/niuroy/dpdk-2.2.0/build/include/rte_ethdev.h:214) [-Werror=deprecated-declarations] stats->fdirmiss += st->fdirmiss; ^ pmd_memnic.c:183:3: error: ?fdirmiss? is deprecated (declared at /home/niuroy/dpdk-2.2.0/build/include/rte_ethdev.h:214) [-Werror=deprecated-declarations] pmd_memnic.c: In function ?memnic_recv_pkts?: pmd_memnic.c:315:5: error: ?struct rte_mbuf? has no member named ?pkt? mb->pkt.in_port = q->port_id; ^ pmd_memnic.c: In function ?memnic_xmit_pkts?: pmd_memnic.c:398:37: error: ?struct rte_mbuf? has no member named ?pkt? for (sg = tx_pkts[nr]; sg; sg = sg->pkt.next) { ^ pmd_memnic.c: At top level: pmd_memnic.c:496:2: error: initialization from incompatible pointer type [-Werror] .eth_dev_init = eth_memnic_dev_init, ^ pmd_memnic.c:496:2: error: (near initialization for ?rte_memnic_pmd.eth_dev_init?) [-Werror] cc1: all warnings being treated as errors make: *** [librte_pmd_memnic_copy.so] Error 1 -- Then, I tried DPDK 2.0 and 1.8. with both of these version, I still meet a lot of errors just like 2.2 So, I want to ask 1. How to solve the problems? 2. Can I install OVS with SR-IOV feature by other ways? Thanks! -- Regards, Royce Niu
[dpdk-users] SyntaxError in setup.sh during binding ethernet device
Hello DPDK developers, I experienced issue when I ran tools/setup.sh and chose option [23]: Bind Ethernet device to IGB UIO module. Script Output: File ".../dpdk/dpdk-2.2.0/tools/dpdk_nic_bind.py", line 113 ??? """ % locals() # replace items from local variables ? ^ SyntaxError: invalid syntax It turned out that python 2.7 set as default in system was needed. So I added python2 to every line with dpdk_nic_bind.py call in tools/setup.sh and now it works fine. But the question is: is it expected behaviour? Shouldn't it be fixed by simple patch in way I did it? ? Regards, Dawid
[dpdk-users] SyntaxError in setup.sh during binding ethernet device
Hi 2016-01-19 10:45, dawid_jurek: > Hello DPDK developers, > I experienced issue when I ran tools/setup.sh and chose option [23]: Bind > Ethernet device to IGB UIO module. > Script Output: > File ".../dpdk/dpdk-2.2.0/tools/dpdk_nic_bind.py", line 113 > """ % locals() # replace items from local variables > ^ > SyntaxError: invalid syntax > It turned out that python 2.7 set as default in system was needed. > So I added python2 to every line with dpdk_nic_bind.py call in tools/setup.sh > and now it works fine. > But the question is: is it expected behaviour? Shouldn't it be fixed by > simple patch in way I did it? Yes a patch would be appreciated to make it python 3 friendly. Thanks
[dpdk-users] SyntaxError in setup.sh during binding ethernet device
W dniu 2016-01-19 11:19:55 u?ytkownik Thomas Monjalon napisa?: > Hi > > 2016-01-19 10:45, dawid_jurek: > > Hello DPDK developers, > > I experienced issue when I ran tools/setup.sh and chose option [23]: Bind > > Ethernet device to IGB UIO module. > > Script Output: > > File ".../dpdk/dpdk-2.2.0/tools/dpdk_nic_bind.py", line 113 > > """ % locals() # replace items from local variables > > ^ > > SyntaxError: invalid syntax > > It turned out that python 2.7 set as default in system was needed. > > So I added python2 to every line with dpdk_nic_bind.py call in > > tools/setup.sh and now it works fine. > > But the question is: is it expected behaviour? Shouldn't it be fixed by > > simple patch in way I did it? > > Yes a patch would be appreciated to make it python 3 friendly. > Thanks > OK. I will prepare patch for dpdk_nic_bind.py soon. Regards, Dawid
[dpdk-users] Determining port type using API's
Hello I have a VM running in our company lab which has two ports in it named "int" and "ext" which is binded using dpdk. The port is initialized either as virtio or sriov mode. My question is how do I determine the port type using a C program? Are there any dpdk api's which tells me whether its sriov or virtio based? Using the shell script I can run "lspci" command and grep for keywords to identify the port type but I am not finding a simpler way to do this from a C program. Any help would be appreciated. If I run "lspci", I get the following output 00:03.0 Ethernet controller: Red Hat, Inc Virtio network device < virtio based 00:06.0 Ethernet controller: Intel Corporation 82599 Ethernet Controller Virtual Function (rev 01)
[dpdk-users] Fail to build Memnic in Ubuntu 14.04
On 1/19/16 10:03 PM, Royce Niu wrote: > Hi > > I want to install an OVS/memnic software in a KVM virtual machine. > > For the higher speed, I install memnic/pmd (SR-IOV) instead of virtio, > since I believe SR-IOV is faster than virtio. > > But, I meet some trouble when I build the memnic following the doc ( > http://dpdk.org/doc/memnic-pmd) > > I download the most updated software DPDK 2.2.0 and memnic 1.3. > > My system is : > 1. 2 VCPU 2G Mem > 2. Ubuntu 14.04 64bit > 3. Updated packages > > > I build DPDK successfully, but when I build memnic in VM according to the > doc. Hello, The memnic code is not updated since 2014-09-30. I am not sure if it got replaced by something else in OVS or just fell asleep. But I think that is why you are getting so insanely many errors, it fell too far behind DPDK to work. If you can find an old DPDK released around this time listed here it might help narrow down if that might be the root cause: http://dpdk.org/browse/memnic/log/ However a DPDK that old will probably fail to build due to kernel version issues. Matthew.