aboutsummaryrefslogtreecommitdiffstats
path: root/vnet/vnet/devices/dpdk/dpdk.h
AgeCommit message (Collapse)AuthorFilesLines
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-534/+0
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-26dpdk: Add support for Mellanox ConnectX-4 devicesDamjan Marion1-0/+2
Due to external library dependency support for Mellanox devices is disabled. To enable it uncoment following line: vpp_uses_dpdk_mlx5_pmd = yes in build-data/platforms/vpp.mk and install OFED libraries. Change-Id: I131d52b5d449a958349f31f9cc04311948f78b71 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-20Improve dpdk-input node to handle drivers not setting mbuf PTYPEJohn Lo1-7/+7
For drivers that do not provide dpdk rte_mbuf PTYPE information, check ethernet header Etype to acccelerate IP4 and IP6 forwarding path. Update packet trace for dpdk-input node to provide more info from DPDK rte_mbuf offload flags and packet types. Change-Id: I207158797a155305314d002726c0af97b8cb0eb3 Signed-off-by: John Lo <loj@cisco.com>
2016-12-08dpdk: don't drop packets if l4 checksum is flagged as badDamjan Marion1-1/+0
Sometimes NICs are flagging checksum 0 as bad, which is not always true. Change-Id: Ibb0147c94f436966e6afa472025bdf92c41f201e Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-04Fix crash whith bonded ethernet / DPDK 16.11Alexander Popovsky1-1/+1
In DPDK 16.11 bonded PMD is still using old naming ‘rte_bond_pmd’. See: dpdk-16.11/drivers/net/bonding/rte_eth_bond_api.c Fixed crash when VPP is generating a name for ‘unknown’ non-PCI interface Change-Id: I59e15f009e1a11949a19abf5234d09425a81c6ce Signed-off-by: Alexander Popovsky <apopovsk@cisco.com>
2016-11-23dpdk: input node next and error optimizationsDamjan Marion1-3/+0
Change-Id: Iee90ed725e824a3beed2660d21d74dae48c76eb0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-18dpdk: quad loop dpdk-input nodeDamjan Marion1-0/+1
Change-Id: I761af883403b6740bd24ce196ae0bfe6bc77b409 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-18dpdk: maintain per-worker trace bufferDamjan Marion1-1/+1
Change-Id: I8234054cef4cadada6745a8c00c8df2c20daac33 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-17dpdk: remove efdDamjan Marion1-94/+1
Change-Id: I761af883403b6740bd24ce196ae0bfe6bc77b408 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-02feature: all input nodes must have same nextsDamjan Marion1-12/+1
Change-Id: Ie4c820933114af2269c99531856c45b0271a4a3e Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-01dpdk-hqos: don't hold up packets indefinitely under low loadDavid Hotham1-0/+5
Change-Id: If884637a6db0cb813a40920194795da2e98c8b23 Signed-off-by: David Hotham <david.hotham@metaswitch.com>
2016-10-26dpdk: enable building with dpdk 16.11-rc1Damjan Marion1-0/+20
Works with: http://dpdk.org/browse/dpdk/snapshot/dpdk-16.11-rc1.tar.xz placed into dpdk/ or ~/Downloads Change-Id: I17f6a721529dbefc796f555e2525d157b9bf8740 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-26dpdk: remove support for dpdk 16.04Damjan Marion1-101/+0
This also removes old DPDK vhost-user code which doesn't help much with DPDK 16.07 or newer. Change-Id: Ic996df1eaccc33acd3fa6cabeaf7381a672c2a90 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-26dpdk: remove KNI supportDamjan Marion1-8/+1
This code is outdated and without real use case Change-Id: I30628cc4ca293e5249aea3891173507cbfad8b61 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-25dpdk: remove dpdk_pmd_constructor_initDamjan Marion1-71/+0
This is not needed anymore, likely because we use --whole-archive parameter during linking. Change-Id: Iab0f2ec647b63c59663faceacfbc60aa4a4b84a6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-28DPDK HQoS: Enable Hierarchical Scheduler in VPPJasvinder Singh1-0/+89
This commit extends the vpp framework with new thread type "hqos-threads" that runs the Hierarchical Quality of Service (HQoS) scheduler associted with output interface. HQoS Scheduler prioritize the packets from different users and ensures sufficient bandwidth to pass the more important traffic. At high level, HQoS scheduler is a buffer that can temporarily store a large number of packets. In otherwords, it is a collection of large number of queues organized into hierarchy of 5 levels; the port (i.e. the physical interface) is at the root of the hierarchy followed by the subport (a set of users), the pipes (individual users), the traffic classes (each with a strict priority) and at the leaves, the queues. In each HQoS scheduler, three operations are performed; classification (setting HQoS port, subport, pipe, traffic class and queue within traffic class from packet fields), enqueue (selecting HQoS queue for the packet, and to drop the packet if the queue is full) and dequeue (schedule the packet based on its length and available credits, and handover the scheduled packet to the output interface). In vpp, the number of hqos threads will be equal to cpu cores specified in corelist-hqos-threads parameter cpu section of the vpp configuration file. One hqos thread can run HQoS for multiple output interfaces. A particular HQoS instance is initialised with default parameters required to configure hqos port, subport, pipe and queues. Some of them can be re-configured in run-time through CLI commands as well binary APIs. Following illustrates the sample startup configuration file with 4x worker threads feeding 2x hqos threads that handle each HQoS for 1x output interface. For more details on HQoS configuration please refer to DPDK Programmer's Guide. dpdk { socket-mem 16384,16384 dev 0000:02:00.0 { num-rx-queues 2 hqos } dev 0000:06:00.0 { num-rx-queues 2 hqos } num-mbufs 1000000 } cpu { main-core 0 corelist-workers 1, 2, 3, 4 corelist-hqos-threads 5, 6 } Change-Id: I635c3395a7c4ddf0a239ef77b0b0a31a6dfc4767 Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2016-09-21dpdk: fix wrong tx ring size calculationsDamjan Marion1-4/+1
At many places code was using constant ring size od 4096 which was defined in macro DPDK_TX_RING_SIZE. As we support differnet ring size and default value s now 1024, we need to remove DPDK_TX_RING_SIZE and use value stored in device structure. For that reason dpdk_device_t.nb_tx_desc is moved to first cacheline. Change-Id: I2c2ac11f0f5e8ae779d34f9a9104eaf2921ec34c Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-20dpdk: move number of sub-interfaces to 2nd cacheline, introduce flagDamjan Marion1-3/+4
This saves 2 bytes from the 1st cacheline. Change-Id: I691a3a0ee07ec2db4ae85b96b451ef53ad8c9458 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-20dpdk: use flags for identifying interface typesDamjan Marion1-11/+5
This will allow us to handle some more complex situations like in case when hqos needs to be enabled only for some PMDs. Change-Id: I5421a8d4cf29b8394b9e956cc4e39737dd07dbbb Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-08-23dpdk: Remove obsolete VMXNET3 driver start/stop workaroundDamjan Marion1-2/+3
Change-Id: I4f46f2965891b0bd0d69a2c426068b0fb1ba881e Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-08-16Coding standards cleanup in vnet/vnet/devices/dpdk, partially fixes VPP-248Damjan Marion1-161/+168
Change-Id: Ie3ee4ccc126c5db9020779cbd06b0d1da99c8411 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-30Remove per-worker destination frame queueDamjan Marion1-3/+0
This frame queue is not part of the dpdk code anymore, so it can be removed. It will save some space in the 1st cacelineof dpdk device data struct. Change-Id: If839861961548750601400a511a609be7ae84b30 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-22Add DPDK 16.07 support (rc3 based)Damjan Marion1-0/+19
DPDK vhost-user support is disabled due to significan changes in the DPDK vhost-user code which are not compatible with current VPP code. Change-Id: I3f0d28cb75f6370282ec7e33d57cbfb77e1a3ce1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-21Improve interface naming for NICs ports sharing same PCI IDDamjan Marion1-0/+2
Change-Id: I68d708f5dd76dc7a46c3c8634aa8f18c515177e5 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-08Allow DPDK per interface startup config to enable/disable VLAN strippingJohn Lo1-0/+5
The init of VIC/ENIC ports enable VLAN stripping of received packets by default, which is different to all other devices. The VLAN stripping of ENIC ports can be disabled by adding the per device DPDK config as "vlan-strip-offload off" such as: dpdk {... dev 0000:0c:00.0 {vlan-strip-offload off} ...} The per device config "vlan-strip-offload on" can be used for enabling VLAN stripping for other devices which support this function but is disabled by default. Change-Id: I9c81904a87c26868a07900b03677aeeb57f72372 Signed-off-by: John Lo <loj@cisco.com>
2016-07-07Retire support for DPDK 2.1.0 and olderDamjan Marion1-13/+0
Change-Id: I3c3427c61e32d4727360aa802950bb9ab44afd84 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-06Retire PLATFORM=virlDamjan Marion1-1/+1
Change-Id: Iaf9735258f456574534c1a581b983326badea171 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-29Decouple worker thread code from dpdk, enable worker threads in vpp_liteDamjan Marion1-23/+0
Change-Id: I28616f1a89f2da95484438ec1a1db64845f15ef6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-28Reduce ring size for dpdk NICs and overtal mem footprintDamjan Marion1-1/+1
Size of interface descriptor rings have direct impact on Last Level Cache utilization, and can significantly affect performance. So generally having smaller ring size is good idea as long as there is enough buffer in the ring to accomodate line rate. Here we are reducing rings sizes to 1024 which is still bigger than lab verified 512 buffers per ring. Indirectly, this also affects memory footprint, as we can have smaller buffer allocation, which is now 16384 (previously it was 32768) This patch also fixes issue with i40e vector PMD which was leaking buffers when previous default ring sizes were set. Change-Id: I58fb40586304b2f0cb5de9a444055da3cd3acb53 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-17VNET: Initialization support for NXP DPAA2 poll mode driverSachin1-1/+6
- NXP proposed a poll mode driver "rte_dpaa2_dpni" in DPDK upstream. - When using external DPDK with the given dpaa2 driver, VPP needs modification to initialize the PMD and to understand the DPAA2 N/W interfaces. Change-Id: I00eb127fa88c71fb430d3def238d50ba68fd595f Signed-off-by: Sachin <sachin.saxena@nxp.com>
2016-06-16Fix hugepage leak on VM terminationShesha Sreenivasamurthy1-0/+1
When VM is terminated, the hugepages mapped should be unmapped so that the system does not run out of hugepage resources. Therefore, mapped pages are unmapped when VPP notices a disconnect. Change-Id: I7398fb20028036738ab87db0b0e79609e95d69a4 Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-06-14Add dpdk per-interface startup config parameter to support rss-flagSrivatsa Sangli1-1/+3
New parameter allows specifying rss-flag - one or more of following ipv4-frag ipv4-tcp ipv4-udp ipv4-sctp ipv4-other ipv4 ipv6-tcp-ex ipv6-udp-ex ipv6-frag ipv6-tcp ipv6-udp ipv6-sctp ipv6-other l2-payload ipv6-ex ipv6 Sample config: dpdk { dev 0000:86:00.0 { rss { ipv4 ipv4-tcp ipv4-udp } } } Change-Id: I33c047d69ef8710b8ba3c7e1a1964d5d54f6e880 Signed-off-by: Srivatsa Sangli <srivrama@cisco.com>
2016-06-14Add dpdk per-interface startup config parameter to specify worker threadsDamjan Marion1-0/+1
New parameter allows specifying which worker threads will process rx queues. Parameter arguments is list of cores and number of worker specified must be equal to the number of rx queues configured (num-rx-queues). If num-rx-queues is not specified, it will be automatically set to number of workers. Sample config: dpdk { dev 0000:86:00.0 { workers 2,3 num-rx-queues 2 } } Change-Id: I88bc381e0e542eb02def09a726c6f04de3e1ae17 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-14Retire io threads and main-thread-io modeDamjan Marion1-12/+1
Change-Id: I64f5ec5e32f200834c63ec3b304f9f20cef332a7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-13Add worker-handoff nodeDamjan Marion1-4/+0
worker-handoff node is universal node which taakes packets from the input node and hands them over to worker threads. Currently it supports flow hashing based on ipv4, ipv6 and mpls headers. New cli: set interface handoff <intrerface-name> workers <list> e.g. set interface handoff TenGigabitEthernet2/0/0 workers 3-6,9-10 Change-Id: Iaf0df83e69bb0e84969865e0e1cdb000b0864cf5 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-09Add verbose flag for packet trace, show hexdump in verbose dpdk input traceDamjan Marion1-0/+1
Verbose trace can be enabled with: trace add dpdk-input 1 verbose Change-Id: If58cfc561143d5a44f7d11e61d54b6835692a0e3 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-09VPP-106: fix performance hit due to unprefetched data readDave Barach1-0/+3
Change-Id: I1325b60b6deadcb51631e178011a31ee70c06cc7 Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-06Add startup conf options to set per-interface descriptor ring sizeDamjan Marion1-1/+3
This patch introduces following 2 startup options: num-rx-desc num-tx-desc Which can be specified under the dpdk { dev PCI_ADDR {...} } or dpdk { dev default {...} } . "show hardware" output is extended to display what is set: TenGigabitEthernet2/0/0 5 down TenGigabitEthernet2/0/0 Ethernet address 90:e2:ba:96:d0:54 Intel 82599 carrier up full duplex speed 10000 mtu 9216 rx queues 2, rx desc 512, tx queues 2, tx desc 1024 cpu socket 0 Change-Id: Ia832885c8e5cf0eb0575367e97581e7065934753 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-05Add per-device startup config supportDamjan Marion1-4/+20
This change adds support for providing per-interface parameters in the startup config. Sample configuration: dpdk { dev default { num-rx-queues 3 num-tx-queues 3 } dev 0000:02:00.0 { num-rx-queues 2 num-tx-queues 2 } dev 0000:02:00.1 } Change-Id: Ia7d9ae2ac9c4fd9baaa480d061a395f8a421a722 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-04Add dpdk config parameter: poll-sleep <nn>Dave Barach1-0/+3
Sleep <nn> milliseconds after each dpdk input device poll, useful when oversubscribing CPUs. Change-Id: I90ad1f21dae7eeeda56bfe845911118aa46f83ec Signed-off-by: Dave Barach <dave@barachs.net>
2016-05-25Move dpdk startup config data to separate structDamjan Marion1-31/+39
This is preparation work for moving DPDK EAL and mempool initialization to vlib. Change-Id: I2dc35aa53edec0e07fc2650d630aa625831154c3 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-05-23Move rte_delay_us_override so it overrides DPDKTodd Foggoa1-0/+5
The current location in the vnet dynamic library does not override the dpdk weak function as intented. Moving this function to the main app allows the linker to find the non-weak symbol and override it. Change-Id: I96c6dc5af2e511cc1f84bd66419c5a4ac96a9541 Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
2016-05-19Add support for multiple microarchitectures in single binaryDamjan Marion1-2/+3
* 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-04-30IP6 SR multicast replicatorKeith Burns (alagalah)1-0/+3
- adds ability to name tunnel - creates policy as a collection of tunnel names - map ip6 multicast address to policy and replicate packet - adds zero memcpy for invariant portion of packet Change-Id: Icd2fe6a2cf65c09906e82ed1afbb0eae8df79452 Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-04-28Add histogram to frame queue tracingBud Grise1-0/+8
Display it via "show frame histogram" CLI. Change-Id: I436a2125f391af85d1743cf8765e5f27fa0ca809 Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-04-25Add APIs to access dpdk informationTodd Foggoa (tfoggoa)1-0/+8
- Add an API to get the number of DPDK mbufs - Add an API to detemrine if the io thread has been released - Add an API to get the DPKD pmd type - Add an API to get the cpu socket of a device Change-Id: I926401891fb6053c676125c9d0621cc9ed1f80bb Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-04-22Add clib_memcpy macro based on DPDK rte_memcpy implementationDamjan Marion1-1/+0
Change-Id: I22cb443c4bd0bf298abb6f06e8e4ca65a44a2854 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-18Add API to get the dpdk interface stats delta.Sean Hope1-0/+5
Internally change the clearing and displaying of the dpdk stats to be based on deltas. Change-Id: I76605ac67492a374ff5522ff44d4a0190cf94e18 Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-04-01Add option to link DPDK dynamicallyDamjan Marion1-0/+83
Change-Id: Ie2b47f9020c8260b199d141103318a0261e16832 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-25Use rte_mempool private data for storing vlib_buffer_tDamjan Marion1-1/+0
Change-Id: If3fc88a35bc0b736376113a39667caea42802ea1 Signed-off-by: Damjan Marion <damarion@cisco.com>