[dpdk-dev] [PATCH] i40e: support xen domain0
> i40e was failing to run in XEN domain0, as the physical > memory for adminq DMA should be allocated and translated > in a different way for XEN domain0. So > rte_memzone_reserve_bounded() should be used for DMA > memory allocation, and rte_mem_phy2mch() should be used > for DMA memory address translation to support running > i40e PMD in XEN domain0. > > Signed-off-by: Helin Zhang Tested-by: Zhaochen Zhan This patch updates i40e to support xen domain0, testpmd can works OK with it. It is ready to be integrated to dpdk.org.
[dpdk-dev] [PATCH] eal: fix build for bsd
Hi I have tested the patch, it still has a build error although it is different from the previous one. OS: FreeBSD10 == Build lib/librte_pmd_bond CC rte_eth_bond_api.o /root/zzc/dpdk-1.7.0-rc3/lib/librte_pmd_bond/rte_eth_bond_api.c:35:27: fatal error: linux/binfmts.h: No such file or directory #include ^ compilation terminated. gmake[5]: *** [rte_eth_bond_api.o] Error 1 gmake[4]: *** [librte_pmd_bond] Error 2 gmake[3]: *** [lib] Error 2 gmake[2]: *** [all] Error 2 gmake[1]: *** [x86_64-native-bsdapp-gcc_install] Error 2 gmake: *** [install] Error 2 Thanks, Zhaochen > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Thomas Monjalon > Sent: Wednesday, July 02, 2014 5:22 PM > To: dev at dpdk.org > Subject: [dpdk-dev] [PATCH] eal: fix build for bsd > > When adding link bonding to EAL initialization (a155d430119), > an include was missing for BSD. > > Signed-off-by: Thomas Monjalon > --- > lib/librte_eal/bsdapp/eal/eal.c | 1 + > 1 file changed, 1 insertion(+) > > > Please, a quick test and acknowledgement of this fix would be helpful. > > > diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c > index ec57b26..69ead31 100644 > --- a/lib/librte_eal/bsdapp/eal/eal.c > +++ b/lib/librte_eal/bsdapp/eal/eal.c > @@ -66,6 +66,7 @@ > #include > #include > #include > +#include > #include > #include > #include > -- > 2.0.0
[dpdk-dev] [PATCH 0/6] Clang compilation support on FreeBSD and Linux
Tested by Zhan, Zhaochen Applying these patches on the dpdk-1.7.0, we verified the compilation on FreeBSD10.0 with Clang 3.3 and Fedora20 with Clang 3.4. We also verified some simple test case (pmd, cmdline, hello_world and timer) on FreeBSD with Clang 3.3. > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Bruce Richardson > Sent: Tuesday, July 08, 2014 7:37 AM > To: dev at dpdk.org > Subject: [dpdk-dev] [PATCH 0/6] Clang compilation support on FreeBSD and > Linux > > This patch set enables clang compilation on FreeBSD and Linux. It includes > patches to fix a number of compilation errors thrown up by clang, and then > adds in the appropriate toolchain makefiles and compile-time configurations. > > This set has been tested with clang v3.3 on FreeBSD 10 and clang v3.4 on > Fedora linux 20. The example apps folder has not been tested at this time, > this > patch set only focuses on the core libraries and apps. > > Bruce Richardson (6): > pmd_bond: add missing variable initialization > Makefiles: add clang to compiler if/else block > mk: Ensure correct detection of SSE4.2 on FreeBSD > acl: add nmmintrin.h header to allow clang compilation > mk: add toolchain for clang and linuxapp target > config: add compile target for clang on BSD > > config/defconfig_x86_64-native-bsdapp-clang | 71 > > config/defconfig_x86_64-native-linuxapp-clang | 63 > ++ > lib/librte_acl/acl_bld.c | 1 + > lib/librte_pmd_bond/rte_eth_bond_pmd.c| 2 +- > lib/librte_pmd_i40e/Makefile | 9 > lib/librte_pmd_ixgbe/Makefile | 7 +++ > lib/librte_pmd_vmxnet3/Makefile | 7 +++ > mk/machine/native/rte.vars.mk | 12 + > mk/toolchain/clang/rte.toolchain-compat.mk| 43 +++ > mk/toolchain/clang/rte.vars.mk| 77 > +++ > 10 files changed, 291 insertions(+), 1 deletion(-) > create mode 100644 config/defconfig_x86_64-native-bsdapp-clang > create mode 100644 config/defconfig_x86_64-native-linuxapp-clang > create mode 100644 mk/toolchain/clang/rte.toolchain-compat.mk > create mode 100644 mk/toolchain/clang/rte.vars.mk > > -- > 1.9.3
[dpdk-dev] [PATCH 0/6] Clang compilation support on FreeBSD and Linux
> > This patch set enables clang compilation on FreeBSD and Linux. It > > includes patches to fix a number of compilation errors thrown up by > > clang, and then adds in the appropriate toolchain makefiles and > > compile-time configurations. > > > > This set has been tested with clang v3.3 on FreeBSD 10 and clang > > v3.4 on Fedora linux 20. The example apps folder has not been tested > > at this time, this patch set only focuses on the core libraries and apps. > > > > Bruce Richardson (6): > > pmd_bond: add missing variable initialization > > Makefiles: add clang to compiler if/else block > > mk: Ensure correct detection of SSE4.2 on FreeBSD > > acl: add nmmintrin.h header to allow clang compilation > > mk: add toolchain for clang and linuxapp target > > config: add compile target for clang on BSD > > Tested-by: Zhaochen Zhan mailto:zhaochen.zhan at > intel.com>> > > We verified the compilation on FreeBSD 10.0 with Clang 3.3 and Fedora > 20 with Clang 3.4. > We also verified some simple test cases (pmd, cmdline, hello_world and > timer) on FreeBSD with Clang 3.3. Acked-by: Zhaochen Zhan mailto:zhaochen.zhan at intel.com>>
[dpdk-dev] [PATCH 0/3] add i40e RSS support in VF
> As RSS in i40e VF is supported by hardware, these patches enable > it in i40e PMD, and also enable its testing in testpmd. > > Helin Zhang (3): > i40evf: add RSS support in VF > app/testpmd: enable RSS support for i40e > ethdev: improvements for some macro definition in head file Tested-by: Zhaochen Zhan I have tested this patch on KVM virtual machine with Fortville NIC. Testpmd support RSS works well with rx_queue=4/16, the max_queue can be configured by CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF in the config file.
[dpdk-dev] [PATCH v2 0/6] Support configuring hash functions
> These pathches mainly support configuring hash functions. > In detail, > - It can select Toeplitz or simple XOR hash functions. > - It can configure symmetric hash functions. >* Get/set symmetric hash enable per port. >* Get/set symmetric hash enable per 'PCTYPE'. >* Get/set filter swap configurations. > - 'ethdev' level interfaces are added. >* 'is_command_supported', to check if a feature (command) > is supported on a port. >* 'rx_classification_filter_ctl', a common API to execute > specific command of each feature. > - Seven commands are implemented in testpmd to support >testing above. > Note that 'PCTYPE' means 'Packet Classification Type'. > > Helin Zhang (6): > ethdev: rename macros of packet classification type > ethdev: add new ops of 'is_command_supported' and > 'rx_classification_filter_ctl' > i40e: support of 'rx_classification_filter_ctl' > i40e: support of 'is_command_supported' > i40e: Initialize hash function during port initialization. > app/testpmd: add commands for configuring hash functions Tested-by: Zhaochen Zhan I have tested this patch on fedora20 with Fortville NIC. The hash function toeplitz/simple XOR/ symmetric all works well for ip/udp both ipv4 and ipv6 packets in testpmd support RSS.
[dpdk-dev] [PATCH 0/5] app/test: unit test to measure cycles per packet
> It provides unit test to measure cycles/packet in NIC loopback mode. > It simply gives the average cycles of IO used per packet without test > equipment. > When doing the test, make sure the link is UP. Tested-by: Zhaochen Zhan This patch has been verified on ixgbe and it is ready to be integrated to dpdk.org. For e1000 and i40e, lacking loopback supporting, this patch can't support them for now.
[dpdk-dev] [PATCHv5] librte_acl make it build/work for 'default' target
Tested-by: Zhaochen Zhan This patch has been verified both on "native" and "default" target. Please see environment information as the following: CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz OS: Linux fc20 3.11.10-301.fc20.x86_64 GCC: 4.8.3 NIC: Intel Niantic 82599
[dpdk-dev] [PATCH v2 0/3] add i40e RSS support in VF
Tested-by: Zhaochen Zhan This patch has been verified on KVM virtual environment with 4*10G, 2*40G and 1*40G NICs. The VF is generated by SRIOV. And testpmd should be run on HOST to support testpmd works on VM. The RSS function works well in the testpmd app in VM environment of KVM. Please see environment information as the following: HOST environment: CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz OS: Linux 3.11.10-301.fc20.x86_64 GCC: 4.8.3 NIC: 4*10G(1572), 2*40G(1583), 1*40G(1584) VM environment generated by KVM: CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz OS: Linux 3.11.10-301.fc20.x86_64 GCC: 4.8.2 NIC: VF generated through SRIOV > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Helin Zhang > Sent: Friday, September 19, 2014 9:15 AM > To: dev at dpdk.org > Subject: [dpdk-dev] [PATCH v2 0/3] add i40e RSS support in VF > > As hardware supports RSS in VF, the patches add that support > in driver. In addition, minor improvements are added for > defining macro with constant. > > v2 changes: > * Remove support of updating/querying redirection table, as it > will be implemented in another patches later. > * Remove changes in testpmd, as it is not needed at all for > supporting RSS in VF. > > Helin Zhang (3): > ethdev: improvement for constant usage > i40e: extern two functions and relevant macros > i40evf: support of RSS in VF > > lib/librte_ether/rte_ethdev.h| 47 ++-- > lib/librte_pmd_i40e/i40e_ethdev.c| 4 +- > lib/librte_pmd_i40e/i40e_ethdev.h| 40 +- > lib/librte_pmd_i40e/i40e_ethdev_vf.c | 142 > +++ > 4 files changed, 207 insertions(+), 26 deletions(-) > > -- > 1.8.1.4
[dpdk-dev] [PATCH] eal/bsd: fix core detection
> > Following "options parsing" patchset (commit d7cb626f and 489a9d6c), core > > detection is not working correctly on bsd. > > > > ./x86_64-native-bsdapp-gcc/app/test -c f -n 4 -- -i > > [...] > > EAL: lcore 0 unavailable > > EAL: invalid coremask > > > > Align bsd to linux: > > - commit f563a372 "eal: fix recording of detected/enabled logical cores" > > - commit 4f04db8b "eal: check coremask against detected lcores" > > > > Reported-by: Zhan, Zhaochen > > Signed-off-by: David Marchand > > Acked-by: Bruce Richardson Tested-by: Zhaochen Zhan This patch has been verified on FreeBSD 10.0. DPDK base commit: 3043ce5011aa7075b32c80c79b9db96199938602 CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz GCC: gcc48 (FreeBSD Ports Collection) 4.8.3
[dpdk-dev] [PATCH] i40e: fix of compile error
Hi Helin, It still has errors: You can get access to 10.239.129.2 with root/tester. /root/zzz/dpdk is the latest dpdk code, /root/zzz/error is the latest code with the patch appled. cc1: warnings being treated as errors /root/zzz/error/app/test/test_prefetch.c:65: error: 'testfn_prefetch_cmd' defined but not used make[5]: *** [test_prefetch.o] Error 1 make[5]: *** Waiting for unfinished jobs CC test_table.o cc1: warnings being treated as errors /root/zzz/error/app/test/test_byteorder.c:99: error: 'testfn_byteorder_cmd' defined but not used make[5]: *** [test_byteorder.o] Error 1 cc1: warnings being treated as errors /root/zzz/error/app/test/test_pci.c:203: error: 'testfn_pci_cmd' defined but not used make[5]: *** [test_pci.o] Error 1 cc1: warnings being treated as errors /root/zzz/error/app/test/test_memory.c:92: error: 'testfn_memory_cmd' defined but not used cc1: warnings being treated as errors /root/zzz/error/app/test/test_cycles.c:96: error: 'testfn_cycles_cmd' defined but not used cc1: warnings being treated as errors /root/zzz/error/app/test/test_spinlock.c:341: error: 'testfn_spinlock_cmd' defined but not used make[5]: *** [test_cycles.o] Error 1 make[5]: *** [test_memory.o] Error 1 make[5]: *** [test_spinlock.o] Error 1 LD dump_cfg cc1: warnings being treated as errors /root/zzz/error/app/test/test_per_lcore.c:144: error: 'testfn_per_lcore_cmd' defined but not used make[5]: *** [test_per_lcore.o] Error 1 cc1: warnings being treated as errors /root/zzz/error/app/test/test_atomic.c:382: error: 'testfn_atomic_cmd' defined but not used cc1: warnings being treated as errors /root/zzz/error/app/test/test_ring_perf.c:421: error: 'testfn_ring_perf_cmd' defined but not used make[5]: *** [test_atomic.o] Error 1 make[5]: *** [test_ring_perf.o] Error 1 cc1: warnings being treated as errors /root/zzz/error/app/test/test_memzone.c:1052: error: 'testfn_memzone_cmd' defined but not used make[5]: *** [test_memzone.o] Error 1 cc1: warnings being treated as errors /root/zzz/error/app/test/test_malloc.c:1053: error: 'testfn_malloc_cmd' defined but not used make[5]: *** [test_malloc.o] Error 1 cc1: warnings being treated as errors /root/zzz/error/app/test/test_ring.c:1400: error: 'testfn_ring_cmd' defined but not used make[5]: *** [test_ring.o] Error 1 cc1: warnings being treated as errors /root/zzz/error/app/test/test_table.c:211: error: 'testfn_table_cmd' defined but not used make[5]: LD testacl *** [test_table.o] Error 1 INSTALL-APP cmdline_test INSTALL-MAP cmdline_test.map make[4]: *** [test] Error 2 make[4]: *** Waiting for unfinished jobs INSTALL-MAP dump_cfg.map INSTALL-APP dump_cfg INSTALL-APP testacl INSTALL-MAP testacl.map LD testpipeline INSTALL-APP testpipeline INSTALL-MAP testpipeline.map LD testpmd INSTALL-APP testpmd INSTALL-MAP testpmd.map make[3]: *** [app] Error 2 make[2]: *** [all] Error 2 make[1]: *** [x86_64-native-linuxapp-gcc_install] Error 2 make: *** [install] Error 2 > -Original Message- > From: Zhang, Helin > Sent: Monday, October 13, 2014 3:18 PM > To: dev at dpdk.org > Cc: Zhan, Zhaochen; Cao, Waterman; Zhang, Helin > Subject: [PATCH] i40e: fix of compile error > > It fixes the compile error as below on gcc version 4.3.4. > cc1: error: unrecognized command line option "-Wno-unused-but-set- > variable" > > Signed-off-by: Helin Zhang > --- > lib/librte_pmd_i40e/Makefile | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile > index 4b31675..bd3428f 100644 > --- a/lib/librte_pmd_i40e/Makefile > +++ b/lib/librte_pmd_i40e/Makefile > @@ -55,8 +55,7 @@ CFLAGS_BASE_DRIVER += -Wno-missing-field-initializers > CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast > CFLAGS_BASE_DRIVER += -Wno-format-nonliteral > else > -CFLAGS_BASE_DRIVER = -Wno-unused-but-set-variable > -CFLAGS_BASE_DRIVER += -Wno-sign-compare > +CFLAGS_BASE_DRIVER = -Wno-sign-compare > CFLAGS_BASE_DRIVER += -Wno-unused-value > CFLAGS_BASE_DRIVER += -Wno-unused-parameter > CFLAGS_BASE_DRIVER += -Wno-strict-aliasing > @@ -65,6 +64,11 @@ CFLAGS_BASE_DRIVER += -Wno-missing-field-initializers > CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast > CFLAGS_BASE_DRIVER += -Wno-format-nonliteral
[dpdk-dev] [PATCH v4 0/7] Support configuring hash functions
> These patches mainly support configuring hash functions. Tested-by: Zhaochen Zhan This patch has been verified on three kinds of Fortville NICs. Base commit: 23fcffe8ffaccf8a2901050e7daa4979597141ed CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz OS: Linux fc20 3.11.10-301.fc20.x86_64 GCC: 4.8.2 NIC: 4*10G(fortville_eagle), 2*40G(fortville_spirit), 1*40G(fortville_spirit_single) == Fortville RSS full support - Support configuring hash functions == This document provides test plan for testing the function of Fortville: Support configuring hash functions. Prerequisites - 2x Intel(r) 82599 (Niantic) NICs (2x 10GbE full duplex optical ports per NIC) 1x Fortville_eagle NIC (4x 10G) 1x Fortville_spirit NIC (2x 40G) 2x Fortville_spirit_single NIC (1x 40G) The four ports of the 82599 connect to the Fortville_eagle; The two ports of Fortville_spirit connect to Fortville_spirit_single. The three kinds of NICs are the target NICs. the connected NICs can send packets to these three NICs using scapy. Network Traffic --- The RSS feature is designed to improve networking performance by load balancing the packets received from a NIC port to multiple NIC RX queues, with each queue handled by a different logical core. #1. The receive packet is parsed into the header fields used by the hash operation (such as IP addresses, TCP port, etc.) #2. A hash calculation is performed. The Fortville supports four hash function: Toeplitz, simple XOR and their Symmetric RSS. #3. The seven LSBs of the hash result are used as an index into a 128/512 entry 'redirection table'. Each entry provides a 4-bit RSS output index. #4. There are four cases to test the four hash function. Test Case: test_toeplitz = Testpmd configuration - 16 RX/TX queues per port ~~~ #1. set up testpmd with fortville NICs:: ./testpmd -c f -n %d -- -i --coremask=0xe --rxq=16 --txq=16 #2. Reta Configuration. 128 reta entries configuration:: testpmd command: port config 0 rss reta (hash_index,queue_id) #3. PMD fwd only receive the packets:: testpmd command: set fwd rxonly #4. rss received package type configuration two received packet types configuration:: testpmd command: port config 0 rss ip/udp #5. verbose configuration:: testpmd command: set verbose 8 #6. set hash functions, can choose symmetric or not, chose port and packet type:: set_hash_function 0 toeplitz #7. start packet receive:: testpmd command: start tester Configuration #1. set up scapy #2. send packets with different type ipv4/ipv4 with tcp/ipv4 with udp/ ipv6/ipv6 with tcp/ipv6 with udp:: sendp([Ether(dst="90:e2:ba:36:99:3c")/IP(src="192.168.0.4", dst="192.168.0.5")], iface="eth3") test result --- The testpmd will print the hash value and actual queue of every packet. #1. Calaute the queue id: hash value%128or512, then refer to the redirection table to get the theoretical queue id. #2. Compare the theoretical queue id with the actual queue id. Test Case: test_toeplitz_symmetric === The same with the above steps, pay attention to "set hash function", should use:: set_hash_function 0 toeplitz set_sym_hash_ena_per_port 0 enable set_sym_hash_ena_per_pctype 0 35 enable And send packets with the same flow in different direction:: sendp([Ether(dst="90:e2:ba:36:99:3c")/IP(src="192.168.0.4", dst="192.168.0.5")], iface="eth3") sendp([Ether(dst="90:e2:ba:36:99:3c")/IP(src="192.168.0.5", dst="192.168.0.4")], iface="eth3") And the hash value and queue should be the same for these two flow . Test Case: test_simple === The same as the above two test cases. Just pay attention to set the hash function to "simple xor" Test Case: test_simple_symmetric = The same as the above two test cases. Just pay attention to set the hash function to "simple xor"
[dpdk-dev] [PATCH] i40e: fix of compile error
> It fixes the compile error as below on gcc version 4.3.4. > cc1: error: unrecognized command line option "-Wno-unused-but-set- > variable" > > Signed-off-by: Helin Zhang Tested-by: Zhaochen Zhan This patch has been verified on SUSE with gcc4.3.4. It has fixed the compile error related to i40e. But the dpdk still has error about"app/test/test_prefetch.c" with gcc4.3.4. Base commit: 23fcffe8ffaccf8a2901050e7daa4979597141ed CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz OS: SUSE 11, 3.0.13-0.5-default GCC: 4.3.4