41 Commits

Author SHA1 Message Date
Dave Barach
3f3b085c8e VPP-106: fix performance hit due to unprefetched data read
Change-Id: I1325b60b6deadcb51631e178011a31ee70c06cc7
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-09 13:41:58 +00:00
Damjan Marion
19414deeaa Rebase DPDK patches
Change-Id: I3ef9faceb085bd06b55e3ba7800389eaae56177a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-07 16:34:44 +00:00
Thomas Monjalon
96e10b554f dpdk: download from dpdk.org
The tarball repository fast.dpdk.org is fast and reliable enough
to be used in VPP build process.

Change-Id: Ifaae57d6f8308127b93fc51b2a2a863da5766cd2
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-06-05 08:45:40 +00:00
John Lo
4cd850e7b2 VPP-106: Patch e40i driver to support VLAN sub-interface
Check packet for presence of VLAN tag in the MAC header and set
the PKT_RX_VLAN_PKT flag to trigger sub-interface lookup in VPP
ethernet-input node.

Change-Id: Iadbfc59d08ef85efb936c88323a90194f3cd656f
Signed-off-by: John Lo <loj@cisco.com>
2016-06-02 20:46:12 +00:00
John Lo
1220afe52a VPP-96 ENID driver update for rx of jumbo pkts using muliple mbuf's
Change-Id: I0e985b079da3224f4886e3ee2cece4d046e291eb
Signed-off-by: John Lo <loj@cisco.com>
2016-05-28 15:47:11 +00:00
Damjan Marion
1c80e831b7 Add support for multiple microarchitectures in single binary
* compiler -march= parameter is changed from native to corei7
   so code is always genereted with instructions which are available
   on the Nehalem microarchitecture (up to SSE4.2)

 * compiler -mtune= parameter is added so code is optimized for
   corei7-avx which equals to Sandy Bridge microarchitecture

 * set of macros is added which allows run-time detection of available
   cpu instructions (e.g. clib_cpu_supports_avx())

 * set of macros is added which allows us to clone graph node funcitons
   where cloned function is optmized for different microarchitecture
   Those macros are using following attributes:
     __attribute__((flatten))
     __attribute__((target("arch=core-avx2)))

   I.e. If applied to foo_node_fn() macro will generate cloned
   functions foo_node_fn_avx2() and foo_node_fn_avx512() (future)
   It will also generate function void * foo_node_fn_multiarch_select()
   which detects available instruction set and returns pointer to the
   best matching function clone.

Change-Id: I2dce0ac92a5ede95fcb56f47f3d1f3c4c040bac0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-05-19 18:14:38 +02:00
Christophe Fontaine
737547efc3 dpdk/Makefile - Allow dpdk target to be set according to the platform
Allows DPDK parameters to be overriden from the platform
definition.

$(PLATFORM)_dpdk_arch = "armv7a"
$(PLATFORM)_dpdk_target = "arm-armv7a-linuxapp-gcc"
$(PLATFORM)_dpdk_make_extra_args = "CONFIG_RTE_EAL_IGB_UIO=y"

Change-Id: I8c0f233942744cb82ca3ed2d65e33acee845cb4e
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-05-17 19:39:25 +00:00
Ed Warnicke
59611303fb Switch to using nexus.fd.io for dpdk tarball
Change-Id: I9751cbb9137627491ee4bd03e0318429327c0bd8
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-05-07 13:02:42 +00:00
John Lo
b53693ab0c ENIC driver patch to set PKT_RX_VLAN_PKT only if pkt passed has VLAN tag
Change-Id: I72475bfe50e42886ffa8fb6e58eb8192892fa381
Signed-off-by: John Lo <loj@cisco.com>
2016-05-04 03:18:44 +00:00
John Lo
816a924fd3 Revert ixgbe driver vRX removal of packet type recognition
VPP still needs to use packet type recognition in vRX path of the
ixgbe driver so ip packet can bypass ethernet-input node processing
for better performance. The shortcoming of packet type recognition
in the vRX path does not affect VPP.

Change-Id: Ibc96021c50402a75a8bc4f80125c664714276cef
Signed-off-by: John Lo <loj@cisco.com>
2016-04-29 14:47:46 -04:00
John Lo
acc22d7c45 ENIC driver updates for DPDK 16.04 and 2.2.0
Change-Id: I896925ea2208d318d353d486707b97f295c78426
Signed-off-by: John Lo <loj@cisco.com>
2016-04-27 21:11:12 +00:00
Damjan Marion
e39a7b8347 Fix compile errors reported by clang
For using clang as a compiler it is enough
to specify CC=clang in the make command line

Change-Id: I06f1c1d418b68768f8119de5bdc8748c51f90c02
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-26 16:16:44 +00:00
Dave Barach
fed985c898 Build vpp w/ dpdk-16.04 by default
Change-Id: I82cdd82213517c51064eb439c44068d8977e5619
Signed-off-by: Dave Barach <dave@barachs.net>
2016-04-26 09:58:54 +00:00
Damjan Marion
106f0eda8d Gernerate dpdk config out of target specific files
DPDK 16.04 introduced new config parameter RTE_ARCH_X86
which was missing in the dpdk/Makefile

That caused issues with virtio devices on older kernels
(observed on 3.13.0).

This patch changes the source of generated config so
it will also include all defines in config/defconfig_TARGET
file.

Change-Id: Idc6ccbef1d01da84235281ea1078c081846446de
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-26 09:58:19 +00:00
Damjan Marion
c843ddcbec Remove execute flags from some dpdk patch files
Change-Id: I972b784082de45480baf1d1f07845743afddea40
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-20 21:02:16 +00:00
John Lo
6bfd2633a1 ENIC driver patch to fix rx miss or drop counters
Change-Id: Ic05d182a5659417e91b85c0ae20b6822a5445945
Signed-off-by: John Lo <loj@cisco.com>
2016-04-16 00:00:17 -04:00
Todd Foggoa
619ac1c84c Porting 2 dpdk patches to dpdk 16.04 patches
Change-Id: If298d0ba4941b3c8ccec3b407080661b4a06ac5b
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
2016-04-12 20:34:21 +00:00
Damjan Marion
c42552d4e0 Add support for DPDK 16.04 release, rebase some of 2.2.0 patches
Change-Id: I08292ba39dc6012c2edbcdaed0b02a8ebe07aec4
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-12 12:11:15 +00:00
Damjan Marion
5ba5f83b79 Bump DPDK 16.04 to RC4
Change-Id: Ia9affeee54e860b6039d7ee0f411bd022b1dc76c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-11 13:04:16 +00:00
Todd Foggoa
a292c8c357 Fix DPDK patch files so git am works smoothly
Change-Id: Ic2a6e6f1ceea81f2e34f3db370682569327b44ad
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
2016-04-06 09:57:01 -04:00
Damjan Marion
0df78dda5a Add DPDK 16.04-rc2 support
Can be used by specifying DPDK_VERSION=16.04-rc2 in the make command line

Change-Id: I657b44d7ca22f1ef57756e7703088020fab12bc6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-29 21:25:12 +00:00
John Lo
23650e6cad Update ENIC driver patches for DPDK 2.2.0
This includes all patches in ENIC driver which are up-streamed to DPDK
to improve RX performance, fix buffer/error handling and interoperation
with link bonding PMD library.

Change-Id: Id4c71a350d5234834951f9261c69db5476ba396b
Signed-off-by: John Lo <loj@cisco.com>
2016-03-29 16:14:35 -04:00
Damjan Marion
dab123ba69 Add abbility to specify dpdk tarball download base url
Change-Id: Ieceb0b1f4ab69609961d8946f627dd9311963da5
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-29 15:24:49 +00:00
Damjan Marion
1901020228 Use rte_mempool private data for storing vlib_buffer_t
Change-Id: If3fc88a35bc0b736376113a39667caea42802ea1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-25 20:55:15 +00:00
John Lo
d90df1820a Add dpdk vmxnet3 driver patch and init.c change to allow jumbo packets
Change-Id: I9d7f8b9a0543d885ed10908b859d52a80bf89f56
Signed-off-by: John Lo <loj@cisco.com>
2016-03-23 16:42:33 -04:00
Jean-Mickael Guerin
966a8b868b dpdk: fix link error
/usr/bin/ld: -f may not be used without -shared
collect2: error: ld returned 1 exit status

Indeed an extra "-fPIC" is given to ld, see the -Wl,-fPIC below:

gcc -pie -fPIC -pthread  -march=native -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3 -DRTE_MACHINE_CPUFLAG_SSSE3 -DRTE_MACHINE_CPUFLAG_SSE4_1 -DRTE_MACHINE_CPUFLAG_SSE4_2 -DRTE_MACHINE_CPUFLAG_AES -DRTE_MACHINE_CPUFLAG_PCLMULQDQ -DRTE_MACHINE_CPUFLAG_AVX -DRTE_COMPILE_TIME_CPUFLAGS=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SSE3,RTE_CPUFLAG_SSSE3,RTE_CPUFLAG_SSE4_1,RTE_CPUFLAG_SSE4_2,RTE_CPUFLAG_AES,RTE_CPUFLAG_PCLMULQDQ,RTE_CPUFLAG_AVX  -I/home/jmg/dev/vpp/build-root/install-vpp_debug-native/dpdk/include -include /home/jmg/dev/vpp/build-root/install-vpp_debug-native/dpdk/include/rte_config.h -O3 -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wpointer-arith -Wcast-align -Wnested-externs -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings -D_GNU_SOURCE  -Wl,-Map=test.map,--cref -o test commands.o test.o test_pci.o test_prefetch.o test_byteorder.o test_per_lcore.o test_atomic.o test_malloc.o test_cycles.o test_spinlock.o test_memory.o test_memzone.o test_ring.o test_ring_perf.o test_pmd_perf.o test_rwlock.o test_mempool.o test_mempool_perf.o test_mbuf.o test_logs.o test_memcpy.o test_memcpy_perf.o test_hash.o test_thash.o test_hash_perf.o test_hash_functions.o test_hash_scaling.o test_debug.o test_errno.o test_tailq.o test_string_fns.o test_cpuflags.o test_mp_secondary.o test_eal_flags.o test_eal_fs.o test_alarm.o test_interrupts.o test_version.o test_func_reentrancy.o test_cmdline.o test_cmdline_num.o test_cmdline_etheraddr.o test_cmdline_portlist.o test_cmdline_ipaddr.o test_cmdline_cirbuf.o test_cmdline_string.o test_cmdline_lib.o test_red.o test_sched.o test_meter.o test_kni.o test_common.o test_devargs.o virtual_pmd.o packet_burst_generator.o test_link_bonding.o test_link_bonding_mode4.o test_link_bonding_rssconf.o test_pmd_ring.o test_pmd_ring_perf.o test_cryptodev_perf.o test_cryptodev.o test_kvargs.o -Wl,-pie -Wl,-fPIC -Wl,--no-as-needed -Wl,-export-dynamic -L/home/jmg/dev/vpp/build-root/install-vpp_debug-native/dpdk/lib -Wl,-g -L/home/jmg/dev/vpp/build-root/install-vpp_debug-native/dpdk/lib -Wl,--whole-archive -Wl,-ldpdk -Wl,--start-group -Wl,-lrt -Wl,-lm -Wl,-ldl -Wl,--end-group -Wl,--no-whole-archive

Fixed by unsetting the flags -pie -fPIC out of LDFLAGS, these are not
options for the linker.

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.3.1-10ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.3.1 20160225 (Ubuntu 5.3.1-10ubuntu2)

Change-Id: Iffbebfbb625e8831822ec092bea88dea42f12930
Signed-off-by: Jean-Mickael Guerin <jean-mickael.guerin@6wind.com>
2016-03-14 09:14:18 +00:00
John Lo
a6a8bfd48f More updated match to ENIC PMD for DPDK 2.2.0 including rx path optimization.
Change-Id: I756940c9c1b2bb71d47caeb08ab34a2e954ddff6
Signed-off-by: John Lo <loj@cisco.com>
2016-03-10 16:41:33 +00:00
John Lo
8b4d82cd4f Fix ENIC PMD not sending the first packet on TX.
Change-Id: I615e9ca6f445092baa211098eb64f9553dd4c407
Signed-off-by: John Lo <loj@cisco.com>
2016-02-26 20:42:04 +00:00
John Lo
a0fac5ac19 Fix link bonding PMD slave status polling path used by VIC ENIC driver.
Change-Id: Ic9fc952b618477beb246974b33d753bf6fd47dde
Signed-off-by: John Lo <loj@cisco.com>
2016-02-26 20:42:04 +00:00
John Lo
d9bf9abbab Add support of Ethernet link bonding utilizing DPDK link bonding
poll mode driver library. The bonded interfaces to be created on
VPP startup is specified in the dpdk section of startup.conf
or qn.conf, using DPDK EAL command. Following is an example of a
dpdk section white listing PCI addressses of 4 ethernet interfacess
to be under VPP control plus two bonded interface and the PCI addresses
of the slaves in each:
dpdk { socket-mem 1024,1024
dev 0000:0f:00.0 dev 0000:10:00.0 dev 0000:11:00.0 dev 0000:12:00.0
vdev eth_bond0,mode=2,slave=0000:0f:00.0,slave=0000:11:00.0,xmit_policy=l34
vdev  eth_bond1,mode=2,slave=0000:10:00.0,slave=0000:12:00.0,xmit_policy=l34
}
Note that only balance XOR (mode 2) is supported and "xmit_policy=l34"
specifies to use layer 3 SIP/DIP and layer 4 Sport/Dport for load
balance. Using "xmit_policy=l2" for SMAC/DMAC or "xmit_policy=l23" for
SMAC/DMAC and SIP/DIP should also work.

Change-Id: Iaf6438686fa20cce893cb5a823b76e2886b4360b
Signed-off-by: John Lo <loj@cisco.com>
2016-02-25 17:55:16 +00:00
Yoann Desmouceaux
ca0f3b3a43 dpdk: fix enic pmd driver tx function
Adding a patch to fix DPDK 2.2.0 enic PMD driver TX function.

The enic PMD driver send function uses a constant offset instead of relying on the data_off in the mbuf to find the start of the packet.

Change-Id: Ic4f3be83865367306785a57e2694e0ccfa295c7b
Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
2016-02-22 13:27:50 +00:00
Yoann Desmouceaux
3c4869cdfa dpdk: fix enic pmd driver tx function
Adding a patch to fix DPDK enic PMD driver TX function.

The enic PMD driver send function uses a constant offset instead of relying on the data_off in the mbuf to find the start of the packet.

Change-Id: I74dbcce949f08e39070a369d992a90586af140a6
Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
2016-02-19 10:56:13 +00:00
Damjan Marion
13f0718e64 Increase number of dpdk lcores to 256
Change-Id: Ia0e228d02fd9f180ed9ca468074ab38d575e415e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-13 00:14:53 +00:00
Dave Barach
8501315d51 Disable EAL message spew which can easily fill /var/log
Change-Id: I63da892d1c4148a54ea33c172986c854932beb01
Signed-off-by: Dave Barach <dave@barachs.net>
2016-02-09 16:20:08 +00:00
Todd Foggoa
505488553a DPDK patch: Add missing init of packet_type field.
This can cause packets to be mishandled in systems with more than
one type of driver in use.

Change-Id: I73ae91ff5d7a22fa542c3b39f6ccfe50437ec71b
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
2016-02-05 14:27:09 -05:00
Todd Foggoa
a9dc8c9e6a DPDK patch: Allow applications to override rte_delay_us()
Some applications may wish to define their own implentation of
usec delay other than the existing blocking one. The default
behavior remains unchanged.

Change-Id: I699b2ed460763492502d22b7e8532514e0886ecd
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
2016-02-05 14:21:37 -05:00
Todd Foggoa
1d8dd705d7 DPDK patch: Fix a crash in igb_uio driver when the device is removed.
Change-Id: I101166ebda1c06e20a3c89cd38786ce44b7ab5d5
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
2016-02-05 14:20:59 -05:00
Damjan Marion
eec5a51c12 Change default dpdk version to 2.2
Change-Id: Iea686ed26d37539d60e52ac1205517512091edab
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-02 15:00:35 +00:00
Damjan Marion
aed4d03268 remove igb_uio static pci id table patch, use new_id for all NICs
Change-Id: I1db64d62c19c28b50f58f9d0b009e3e89e331f71
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-01 23:47:41 +00:00
Damjan Marion
bce6b6a6bf Introduce support for DPDK 2.2
Change-Id: Id2c7c4a949363a448a6715463dd81f701f046b93
Signed-off-by: Damjan Marion <damarion@cisco.com>
2015-12-16 10:01:02 +01:00
Ed Warnicke
cb9cadad57 Initial commit of vpp code.
Change-Id: Ib246f1fbfce93274020ee93ce461e3d8bd8b9f17
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2015-12-08 15:47:27 -07:00