aboutsummaryrefslogtreecommitdiffstats
path: root/vnet/vnet/devices/dpdk/device.c
AgeCommit message (Collapse)AuthorFilesLines
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-840/+0
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-09DPDK HQoS: enable vpp control plane thread connection to hqos threadJasvinder Singh1-0/+2
The vpp control plane thread generates different types of packets such as ARP, DHCP client, IPv6 RA, etc. which need to go through HQoS thread associated with the output interfaces. Therefore, this patch enables vpp main thread connection with the HQoS thread through dedicated SWQ. Change-Id: Idcb759546d4bcd9b40beedaec4f12b29baae3e40 Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2016-12-02interfaces: make no_flatten variant of inteface_ouptut fn defaultDamjan Marion1-1/+0
Flatten variant was used only by old native drivers. Change-Id: If206c6c8b4f10843d60f908c3acb4e8db83ce03d Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-02Fix dpdk_validate_rte-mbuf for chained buffersPierre Pfister1-4/+5
Change I4ad40f398f7b5cf introduced a bug with chained buffers. This patch should fix it. Change-Id: Ia409d5eb90fcd6d7ff3c7da0836edfd2eb25998b Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-11-23Fix coverity warnings, VPP-486Dave Barach1-1/+1
Change-Id: Id88805f77642187f304f8baef1f6b447728e4b5b Signed-off-by: Dave Barach <dave@barachs.net>
2016-11-22dpdk: quad loop dpdk tx and code optimizationsDamjan Marion1-249/+178
Beside performance optimization this change also introduces rte_mbuf validation in dpdk tx code. If packet is arrving from non-DPDK source like self-originated packets or non-dpdk devices (tuntap, af_packet, netmap, pg) it is not anymore exepcted that it contains valid rte_mbuf metadata unless it is explictely stated by setting VNET_BUFFER_RTE_MBUF_VALID flag. dpdk-input node sets VNET_BUFFER_RTE_MBUF_VALID on all packets and that reduces cost of validation in tx node. Change-Id: I4ad40f398f7b5cf90656a2069a27c0f6fc13efba Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-17dpdk: remove efdDamjan Marion1-278/+36
Change-Id: I761af883403b6740bd24ce196ae0bfe6bc77b408 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-26dpdk: remove support for dpdk 16.04Damjan Marion1-176/+2
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-126/+0
This code is outdated and without real use case Change-Id: I30628cc4ca293e5249aea3891173507cbfad8b61 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-30VPP-363: add ability to change mac address of the interfacePavel Kotucek1-0/+1
Added ability to change interface address. Added new CLI and API functions. Change-Id: Ia336bc75ad8c5858c26f39af851485c4c6f19f58 Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-09-28DPDK HQoS: Enable Hierarchical Scheduler in VPPJasvinder Singh1-1/+42
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-19/+17
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-16/+26
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-10/+10
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-58/+16
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-618/+693
Change-Id: Ie3ee4ccc126c5db9020779cbd06b0d1da99c8411 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-08-10VPP-189 Fix coverity warningsDave Barach1-1/+5
Change-Id: Iea6d338e60a95f7f30c10c2e751d4827e816f700 Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-22Add DPDK 16.07 support (rc3 based)Damjan Marion1-0/+8
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-19On bonded interface admin-down, should stop all slave linksJohn Lo1-0/+12
When bonded interface is set to admin down, all slave links should also be stopped or they will continue to receive packets and then be dropped because bonded interface is down. Also remove setting bonded interface L3 packet size limit to that of slave on startup - it is not needed and can cause undesirable side effect if its value become incompatible with bonded interface MTU. Change-Id: Ibdd8acac0ca41a867131441eb26518592bb7d98a Signed-off-by: John Lo <loj@cisco.com>
2016-07-07Retire support for DPDK 2.1.0 and olderDamjan Marion1-2/+0
Change-Id: I3c3427c61e32d4727360aa802950bb9ab44afd84 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-18Move pkt replication counter to the opaque2 cache lineDave Barach1-4/+7
Change-Id: I5e6edfd03ab41949be2c768dfe68aa824bbc1f38 Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-14Retire io threads and main-thread-io modeDamjan Marion1-10/+0
Change-Id: I64f5ec5e32f200834c63ec3b304f9f20cef332a7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-09VPP-106: fix performance hit due to unprefetched data readDave Barach1-4/+12
Change-Id: I1325b60b6deadcb51631e178011a31ee70c06cc7 Signed-off-by: Dave Barach <dave@barachs.net>
2016-05-25Move dpdk startup config data to separate structDamjan Marion1-3/+3
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-42/+1
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-0/+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-05-17dpdk/build - 32bits compilationChristophe Fontaine1-14/+14
In vnet/vnet/devices/dpdk/device.c, post 2 event data instead of merging them into 1 u64. Change-Id: I8b1d61b894279fb6eb57bb82a05affc14360e6b8 Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-04-30IP6 SR multicast replicatorKeith Burns (alagalah)1-2/+70
- 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-25Add APIs to access dpdk informationTodd Foggoa (tfoggoa)1-0/+54
- 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-7/+7
Change-Id: I22cb443c4bd0bf298abb6f06e8e4ca65a44a2854 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-20Cleaned up formatting in device.c - no functionality changes.Keith Burns (alagalah)1-64/+64
Change-Id: Ia7d83784d50b3651117201b876464528d015edea Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-04-18Add API to get the dpdk interface stats delta.Sean Hope1-5/+39
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-13VHOST counters reversedShesha Sreenivasamurthy1-2/+4
VHOST counters are reversed. RX packet count are shown as TX and vise-versa in "show hardware" statistics. Change-Id: Ie1d41f1f0845edf495cdf34ca65466fc307940c6 Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-03-29Allow vlans to be programmed on 40GE VF interfacesTodd Foggoa (tfoggoa)1-2/+4
Change-Id: Ia3a1bf7cb482f0aa98628b23d88de01cf60c46a9 Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-03-25Use rte_mempool private data for storing vlib_buffer_tDamjan Marion1-10/+10
Change-Id: If3fc88a35bc0b736376113a39667caea42802ea1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-04Collect per Q stats for vhost-user interfaceShesha Sreenivasamurthy1-2/+29
Change-Id: I394960c300ff7a81c4c8e05afd5a4175e66666eb Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-03-01Add ability to filter and change MACsChristian Dechamplain1-0/+34
Added new functions to change the MAC address and filter multicast MAC addresses. Change-Id: Iddf518e57dc889800a2f706fda51ee4e5c5142f2 Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-03-01Fix for TX and RX descriptor queue lockupGeorgi Savov1-5/+11
On admin up/down changes the TX and RX queues were getting locked up for VNET_DPDK_PMD_VMXNET3 interfaces. The fix is to ensure the interface is in admin down before touching the hardware. Change-Id: Ia264d95355a860607bff7ada00d2be48f91e6dd9 Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-02-26Move dpdk (un)format functions to separate c fileDamjan Marion1-395/+0
Change-Id: Idb1b1bf6c1b3b3d66672cc715e45aec299fb7592 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-25Add support of Ethernet link bonding utilizing DPDK link bondingJohn Lo1-2/+9
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-24Handle dynamic enable/disable VHOST_USER interfaceShesha Sreenivasamurthy1-5/+12
If number of Qs enabled by the guest is less than number of Qs exported to guest, then all threads route packet to Q0 with the assumption that guest is not interested in performance. If all Qs are enabled, each thread queues packet in their own TX-Q of the VHOST_USER interface, boosting performance. Change-Id: Ic24bb8c0505b11c7513aeecd21c9ec5da5f90138 Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-02-23Enable DPDK KNI code based on DPDK configDamjan Marion1-1/+10
Change-Id: Iab579c4a7e615c723d10acf0532490cdaa6db05a Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-14Implement multiple TX queue sharingDamjan Marion1-4/+5
Maximum number of TX queues ca be defined by NIC driver or configured manualy with 'dpdk { max-tx-queues X }'. If system have more worker threads than TX queues they will be shared between them. Before this change only one tx queue was used in such cases. Change-Id: Iab68170ab45fa6b9925fc4e79ccab9222f095e7e Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-10Vhost multi-q supportShesha Sreenivasamurthy1-8/+24
Remove multi-q support patch for DPDK-2.1.0 Change-Id: I685f3886b3883803210221682fa80353670a6970 Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-02-02Use per-thread vlib_mainShesha Sreenivasamurthy1-4/+8
Change-Id: I8bee9f6661878a74a0375944ac01c9cb3a0acfbf Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-01-27Enable Chelsio T5 supportDamjan Marion1-1/+24
Change-Id: I4bb6ac36a8bc585677448f4b22bd1299630f95de Signed-off-by: Damjan Marion <damarion@cisco.com>
2015-12-16Introduce support for DPDK 2.2Damjan Marion1-9/+10
Change-Id: Id2c7c4a949363a448a6715463dd81f701f046b93 Signed-off-by: Damjan Marion <damarion@cisco.com>
2015-12-08Initial commit of vpp code.v1.0.0Ed Warnicke1-0/+1483
Change-Id: Ib246f1fbfce93274020ee93ce461e3d8bd8b9f17 Signed-off-by: Ed Warnicke <eaw@cisco.com>