aboutsummaryrefslogtreecommitdiffstats
path: root/vnet
AgeCommit message (Collapse)AuthorFilesLines
2016-03-20vnet classifier debug CLI enhancementsDave Barach5-10/+234
Extensible next-index and opaque unformat function scheme. Added next-index-by-node-name and sw_if_index->opaque functions. Allow dynamic graph arcs to be added to ip4/6-inacl. Change-Id: Ie434335399a0708772eb82563a154df19c63b622 Signed-off-by: Dave Barach <dave@barachs.net>
2016-03-19* Added support to configure trace type as arangan3-60/+497
configuration parameter. This can be any combination of nodeid, interface indices, timestamp and appdata. This configuration is passed through packet header by encap node to all other nodes. Rewrite buffer is resized accordingly. Trace function modified accordingly. * Added CLI 'show ioam summary' command to display various configuration. * Added CLI 'clear ioam rewrite' Change-Id: Ide4c85f8b22561303df48519c5ea59668a300188 Signed-off-by: rangan <rangan@cisco.com>
2016-03-19cosmetic: indent codeDave Barach1-3/+1
Gerrit wouldn't merge the previous attempt, so let's just make the pain go away... Change-Id: Ia008d43f755b6e3a5f4c699de365d241bf361aa9 Signed-off-by: Dave Barach <dave@barachs.net>
2016-03-19Add llc_init in osi_init to ensure init order dependencyNagaprabhanjan Bellari1-0/+7
Change-Id: I5cb2a319384e49a072d75f3ea05e6fb92e381c23 Signed-off-by: Nagaprabhanjan Bellari <nagp.lists@gmail.com>
2016-03-18vnet_classify: Handle non-aligned vectors and various bugfixesPierre Pfister2-98/+136
classifier used to crash when packet data was not aligned. This commit also includes: - writer lock initialization bugfix - CLI help was missing opaque-index - ip_input_acl was applying the mask on buffer->data instead of packet head On a side note, my tests failed to show any improvements when using SSE. Further tests might be interesting to see if they actually perform better. Change-Id: Ic34eecd6a2226919121ffce2fe4324506deee52f Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-03-18Make adjacencies shareableDave Barach4-11/+233
Change-Id: I620871ca715b751d2e487f37341b7118797c9176 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-17Bring back p1.c so plugins can see DPDK symbolsTodd Foggoa2-95/+14
Change-Id: Ia450c9bc6d00fbd054d41a462366f826121d781d Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
2016-03-17Don't stop binding pci device if write to new_id failsDamjan Marion1-2/+0
In some cases write to new_id fails but binding is still possible. Change-Id: I1944eab4326a08e85e83cd5cd7379c6a4d03d98d Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-16af_packet: vec functions should not be used on poolDamjan Marion3-5/+5
Change-Id: Ifc67db0575a7517ac24519894996906ea44ead67 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-16Add vpp native linux kernel AF_PACKET interface supportDamjan Marion7-1/+917
This is 1st drop of VPP native driver for linux AF_PACKET. New CLI: create host-interface name <host-if-name> [hw-addr <mac-address>] References: - Documentation/networking/packet_mmap.txt in the Linux kernel tree - man 7 packet Known issues: - attaching to linux bridge doesn't work - it is not expected to work in multicore setup Change-Id: I1cb1c3d305f349759e90e76e25696718b73bd73d Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-14Declare node, hw_interface_class and device_class instances as externalDamjan Marion9-12/+12
This fixes issue observed on Ubuntu 16.04 where dynamic loader is not finding correct instance of specific structure. Change-Id: I618d0933c7e171b8a9b40495b36894785af7790a Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-14fix declaration of symbol of different sizeJean-Mickael Guerin27-64/+58
I got many warnings at the link step with gcc version 5.3.1 20160225 (Ubuntu 5.3.1-10ubuntu2): /usr/bin/ld: Warning: size of symbol `cop_input_node' changed from 112 in vnet/cop/.libs/cop.o to 168 in vnet/cop/.libs/node1.o /usr/bin/ld: Warning: size of symbol `ethernet_input_node' changed from 112 in vnet/.libs/interface.o to 136 in vnet/ethernet/.libs/node.o /usr/bin/ld: Warning: size of symbol `l2output_node' changed from 112 in vnet/l2/.libs/l2_efp_filter.o to 120 in vnet/l2/.libs/l2_output.o /usr/bin/ld: Warning: size of symbol `srp_input_node' changed from 112 in vnet/srp/.libs/format.o to 136 in vnet/srp/.libs/node.o /usr/bin/ld: Warning: size of symbol `vxlan_encap_node' changed from 112 in vnet/vxlan/.libs/vxlan.o to 128 in vnet/vxlan/.libs/encap.o /usr/bin/ld: Warning: size of symbol `vxlan_input_node' changed from 112 in vnet/vxlan/.libs/vxlan.o to 144 in vnet/vxlan/.libs/decap.o ... Looking at vlib_node_registration_t, I think the reason is that the char * next_nodes[] could be bigger where the variable is defined in .c file. We should mark global variables as external in header files. Some of them can be made static. Change-Id: Ieb6961fd08180c9a69e1d884852703f3eb23f23f Signed-off-by: Jean-Mickael Guerin <jean-mickael.guerin@6wind.com>
2016-03-14Better match vhost-user specification for live migrationYoann Desmouceaux2-2/+10
The specification requires logging of used vring writes to only happen when VHOST_VRING_F_LOG flag is present in VHOST_USER_SET_VRING_ADDR message; take that into account. Change-Id: I9bf4b9eb43a1783b39909b1a3ea1a3bdf50d91a8 Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
2016-03-14Do not use hugepages if none are available.Stefan Kobza1-2/+2
In case socket-mem was set to <1024 and no 1G page long hupepages were available, the condition was evaluated in unexpected manner. In other words use_1g == 1, and that fails later in mount(). This patch makes sure this is prevented - if there are no pages_available, do not even try to use that pagesize. Change-Id: I30675aa017d97b99d84d5db926e62f0acb54deb6 Signed-off-by: Stefan Kobza <skobza@cisco.com>
2016-03-11Set hardware iface state for loopback interfacesPierre Pfister1-0/+10
So unless I have missed something, loopback interfaces are spawned hardware-down and never set up. This patch uses the same process as tapcli interfaces by mirroring sw state to hw state. Change-Id: I94198c1c880de773daccbb63ca8d32c4c7e26a74 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-03-09Fix IPv6 NDP and bridge BVI and restore NDP and ARP when BVI move is changed.Pierre Pfister1-3/+12
Both ARP and NDP need to be called when hi->output_node_index is changed. It does not look like a perfect solution though. Maybe an actual up-down call would be better... Change-Id: If2988d131e77f4fc522f34f3ffe2d5ba9c1d506c Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-03-07Fix longstanding cleanup-flag bugDave Barach1-12/+9
Change-Id: I9b325b454ef80ffff80a0b0e23b24e3313127376 Signed-off-by: Dave Barach <dave@barachs.net>
2016-03-07Packet filter control-plane API bugfixDave Barach1-4/+14
Don't complain about unknown fib-id's unless actually trying to use the indicated per-address-family fib. Change-Id: Ie8c28dbf7dac9c38193a02ff15a8529d0f90d99a Signed-off-by: Dave Barach <dave@barachs.net>
2016-03-04Allow dpdk linkstate and stat polling intervals to be set dynamically.Bud Grise2-5/+43
Change-Id: I6aa662e060f7ce01a4dd80ae2498dc91a8b65a8e Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-03-04Modified ioam CLI syntax to conform with other CLIsrangan1-10/+10
Change-Id: I384d7b2cdbb63b5ca904db5a11c8b8748f7197b9 Signed-off-by: rangan <rangan@cisco.com>
2016-03-04Collect per Q stats for vhost-user interfaceShesha Sreenivasamurthy5-9/+87
Change-Id: I394960c300ff7a81c4c8e05afd5a4175e66666eb Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-03-04Use xxhash in map code when SSE4.2 not availableDamjan Marion1-1/+1
Change-Id: If4fb86cfeeaf35f3ae89946b437ce5160adbce94 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-03Change default L3 MTU to allow jumbo packets for non-DPDK interfaces.John Lo2-2/+2
Note that L3 MTU for DPDK interfaces is derived from DPDK port_conf in vnet/devices/dpdk/init.c. Change-Id: I9633a1887347a18d05598435baceb6a62cd7b19a Signed-off-by: John Lo <loj@cisco.com>
2016-03-03Fix UDP length check for local IP/UDP lookup and error handling.John Lo1-10/+21
Change-Id: If6695e19e5a1e5471e56099e2cf31794c73f3303 Signed-off-by: John Lo <loj@cisco.com>
2016-03-02TAP: Jumbo-frame support.Ole Troan1-74/+51
Change-Id: I3a0726d7645f775738253d0a47ee04d94d138c9a Signed-off-by: Ole Troan <ot@cisco.com>
2016-03-02Always showing DPDK physical memory on bootupTodd Foggoa1-17/+2
Fixing a previous commit to remove the commandline option and just always display the DPDK physical memory on startup. Also remove the DPDK args for the dbeug image. Change-Id: I9336a2a26ebab84c3b50ae0610025c29da7995f2 Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
2016-03-02Add rotates to v6 worker hash to prevent SIP/DIP synchronizing.Bud Grise1-3/+3
Change-Id: Ibe8ec6271b3f04290a60c0145e59a01d3130500f Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-03-02Remove spurious call to unix_physmem_init(...)Dave Barach1-11/+0
It turns out that unix_physmem_init(...) has been effectively disabled for a very long time. The vnet library supplied a weak symbol override for the vlib_app_physmem_init(...) which returned 1, meaning "do nothing." When we switched libvnet.a -> libvnet.so, the symbol override stopped working. Presto: unix_physmem_init(...) romps all over the data set up by vlib_buffer_pool_create(...), leading to ASSERT failures and/or bus errors, but only when using worker threads. Even then, the failure depended in some complicated way on library dynamic load order. We should remove .../vlib/vlib/unix/physmem.c entirely once we're sure we'll never want it back. Change-Id: I27747edbeb0de88d2f2d8728f7f8eb3135e7f0cf Signed-off-by: Dave Barach <dave@barachs.net>
2016-03-01Dump DPDK physmem to stdout before allocating mbufsSean Hope1-0/+19
Change-Id: I9dac27dc8b6b95cfb0ee77e3cff18240b4ec21d6 Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-03-01Add ability to filter and change MACsChristian Dechamplain3-1/+42
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 Savov2-12/+38
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-29Add ability to override the interface name.Sean Hope4-12/+54
Export interface format functions to plugin and allow ability to show a single hardware interface index. Change-Id: If52fae2d63e97da91e1ac9a9a6fb73389b526ebc Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-02-29Fixed vxlan link status.Pavel Kotucek1-0/+12
Vxlan interface link status corresponds to admin status. When vxlan interfcae is set "admin-up" link status is "link-up" and if interface is set "admin-down" link status is "link-down" also. Change-Id: Iaa85fa8dcd672519312cc7ee6a17df6f4498259d Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-02-29-O3 warnings be goneDave Barach2-2/+2
Note that compiling -O3 doesn't improve performance as of this writing, might as well clean up warnings in any event. Change-Id: Ic2f4982d12fbbf36f5324075183982731759dc94 Signed-off-by: Dave Barach <dave@barachs.net>
2016-02-26Add packet tracing hintBud Grise1-27/+33
This avoids checking the buffer flags bit if tracing is not enabled. Change-Id: I32e1a90b5fd10318254c611344488bc2a441c71e Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-02-26Add support for native vpp_lite (non-dpdk) platformDamjan Marion11-38/+42
Change-Id: Icaa71957f67b923bc9795baa78c7495055615672 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-26Move dpdk (un)format functions to separate c fileDamjan Marion7-767/+806
Change-Id: Idb1b1bf6c1b3b3d66672cc715e45aec299fb7592 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-25Add support of Ethernet link bonding utilizing DPDK link bondingJohn Lo3-2/+61
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-25Fix indexing error in init.c for vnet dpdk.John Lo1-2/+2
Change-Id: I1bab9e8cf428b0d27edf98fa54ffc3edc32fd4f5 Signed-off-by: John Lo <loj@cisco.com>
2016-02-25Add live migration support to (non-dpdk) vhost-user driverYoann Desmouceaux2-8/+144
This patch adds live migration support to vhost interfaces, by supporting the VHOST_F_LOG_ALL feature. When qemu starts a migration, it will negotiate this feature, and provide a fd for a "dirty log" shared mem space. This log is a bitmap representing pages in the device memory. Whenever we touch memory pointed by a "desc" vring, or modify a "used" vring, we log the corresponding page in the bitmap. This allows qemu to send the dirty page to the destination host. See https://github.com/qemu/qemu/blob/master/docs/specs/vhost-user.txt, ยง "Live migration" for more details. In addition to this, this code provides support for the VHOST_USER_F_PROTOCOL_FEATURES feature, and to VHOST_USER_{GET,SET}_PROTOCOL_FEATURES and VHOST_USER_SET_VRING_ENABLE messages, required for live migration. Change-Id: I7577efce8bd67653218f4291af1d651de451e552 Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
2016-02-24Link the vpp application against libvnet.so, not libvnet.aDave Barach7-15/+39
Turn of srp, mainly as an example of how to restructure a featurette for selective disablement. Change-Id: Id3364c58a8711b103939f4434adfa67177380f67 Signed-off-by: Dave Barach <dave@barachs.net>
2016-02-24Enable all vrings if PROTOCOL_FEATURES are not negotiatedShesha Sreenivasamurthy2-5/+23
Change-Id: Ib785a2ffd2fcbe3a836dd59ad419bcc2fa298686 Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-02-24Handle dynamic enable/disable VHOST_USER interfaceShesha Sreenivasamurthy4-11/+29
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 Marion4-1/+16
Change-Id: Iab579c4a7e615c723d10acf0532490cdaa6db05a Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-23Fix warnings in vhost-user code with older version of DPDKDamjan Marion1-1/+5
Change-Id: If76ef977e3914b51da0d6bb5e4089acb0bd67baa Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-19Handle dpdk packet_types properlyDamjan Marion2-14/+45
Change-Id: Ie13f92a21ed8b81775b1e9cbbf2619e752ab6a04 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-19Add custom mac address option to vhost interfaces.Pierre Pfister4-13/+30
Generating a new MAC address everytime vpp reboots can quickly become cumbersome (e.g. in test scenarios). This commit allows vhost mac addresses to be configured manually. Change-Id: Ic6d16a2d14cdf8e49dc29041bbafde39d9fc8370 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-02-19Per-interface, per-address-family fast packet filterDave Barach7-0/+1452
Change-Id: I122aa8edfb16a433a8ccdfb72ee8463c48c56d6d Signed-off-by: Dave Barach <dave@barachs.net>
2016-02-18Add jumbo frames support to non-dpdk vhost interfaces.Pierre Pfister1-290/+229
This code provided inter-VM (2 cores per VM) throughput of 22Gbps using iperf through VPP (1 core) with 9k frames. With the same setup and pktgen running on both sides, it reached 5Mpps with no packets drop (Equivalent to before the patch). During the tests the average vector length was about 1, which likely means that VPP is not the bottleneck. The patch also includes some generic functions for vlib buffers allowing for chained buffer construction whether or not DPDK is enabled. Change-Id: Icfd1803e84b2b4578f305ab730576211f6242d6a Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-02-16Show DPDK EAL cmdline args in 'show version verbose'Damjan Marion2-0/+6
Change-Id: I88a8038a36e7e5060f354cd66a2532ef8c996b67 Signed-off-by: Damjan Marion <damarion@cisco.com>