aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2018-02-25virtio: add missing tx lock when running multithreadedDamjan Marion3-0/+10
Change-Id: I373f429c53c6f66ad38322addcfaccddb7761392 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-24virtio: reset vnet header on txDamjan Marion1-0/+3
Change-Id: Ib04a8787038fb536470a04d99fdc165102edfb5a Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-22Fix DHCP client crash with worker threadsMatthew Smith3-38/+54
Crash occurring With a worker thread configured and dhcp client active on an interface. When a DHCP reply packet is received, call to ethernet_get_main() from dhcp_proxy_to_client_input() was causing a crash. Replaced with a call to vnet_get_ethernet_main(). Once that was resolved, calling dhcp_client_acquire_address() from a worker thread also caused a crash. Changed so the main thread will do the address/route configuration. Change-Id: Ib23984787102dea8cf6cfcde86188a751f15c1e1 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-02-15VPP-1169: reenable dhcp client detect when lease expiresDave Barach1-1/+50
We disable the client detect feature when we bind a DHCP address. Turn it back on again when the lease expires. Otherwise, if the DHCP server replies after an outage, we'll never see the reply. Add dhcp packet tx counters, by packet type Change-Id: Id54b05647d5d7bd8d3ab99e6584ee86d9e4ff7f9 Signed-off-by: Dave Barach <dave@barachs.net> (cherry picked from commit 4941fcc23ab01f5ca918e56489d404b92d8bde90)
2018-02-08Provide page-aligned length to ftruncate.Igor Mikhailov (imichail)1-1/+1
For some files such as hugepages files, ftruncate() fails with the error "Invalid argument" if the 'length' parameter is not on a page boundary. Change-Id: I42a9cde98707da15e3c5d1653046e2277fc7a424 Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com> (cherry picked from commit 7d25415a9384d4c3d786d0c1ae5c0fcff3112acd)
2018-02-06Release 18.01.1 jvpp version update.Dave Wallace1-1/+1
Change-Id: I000d842e969b838ad5fbcd18186ac7e1b39b4c46 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-05NAT64: Run nat64-expire-worker-walk only when NAT64 is configured (VPP-1162)Matus Fabian2-4/+48
Change-Id: Ic5e8d74bf5ac84cce5661de44778c89541c67636 Signed-off-by: Matus Fabian <matfabia@cisco.com> (cherry picked from commit e71eb5922a293eca36dbd323970741daaca3c5c7)
2018-02-02Improve tunnel interface creation performanceJohn Lo8-90/+86
Modify interface creation to allow creation of tunnel interfaces without dedicated per tunnel output and tx nodes which are not used for most tunnel types. Also changed interface-output node function vnet_per_buffer_interface_output() so it does not rely on hw_if_index as the next node index which is not flexible nor efficient for large scale tunnel interfaces. The improvenemts are done for VXLAN, VXLAN-GPE, GENEVE and GTPU tunnels. GRE tunnel is still using per tunnel output nodes which will be changed in a separate patch with other GRE enhencements. Change-Id: I4123c01c0d2ead814417a867adb8c8a407e4df55 Signed-off-by: John Lo <loj@cisco.com> (cherry picked from commit e5453d0fa29f39a7f78a7e22815566a7f4c9e5ef)
2018-01-30lisp-cp: fix handling of ndp without source link addr VPP-1159Florin Coras1-4/+21
Change-Id: Idddb60bbc7fcc701d39212f6422a6b2f6dc75221 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-29vlib: allocating buffers on thread-x and freeing them on thread-y causesSteven4-25/+17
a crash on debug image (VPP-1151) In debug image, there is extra code to validate the buffer when it is freed. It uses the hash table to lookup the buffer index with spinlock to prevent contention. However, there is one spinlock for each worker thread. So allocating the buffer on thread-x and freeing the same buffer on thread-y causes the validation to fail on thread-y. The fix is to have only one spinlock, stored in vlib_global_main. Change-Id: Ic383846cefe84a3e262255afcf82276742f0f62e Signed-off-by: Steven <sluong@cisco.com>
2018-01-23docs: Clean up TOCDave Wallace1-1/+1
Change-Id: I5415c002a431d84372f56d4a77dc2aabd6ef55f7 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-01-18Sub-Interface deletion not cleanup hash's properly (VPP-1136)John Lo3-18/+24
On deleting sub-interfaces, functions vnet_delete_sub_interface() and vnet_delete_hw_interface() are not cleaning up sub-interface related hash tables and memory properly. Change-Id: I17c7c4b2078c062c77bfe48889beb677610035ca Signed-off-by: John Lo <loj@cisco.com>
2018-01-17VPP-1122 dpdk/ipsec: fix transport mode pkt lenRadu Nicolau1-3/+7
Change-Id: I6eef2ca258ff5b4aa9b21b98543d814633e295af Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
2018-01-11tapv2: deleting tap interface may leak buffers (VPP-1124)Steven4-11/+34
Buffers may be allocated for indirect descriptors by tx thread and they are freed when tx thread is invoked in the next invocation. This is to allow the recipient (kernel) to have a chance to process them. But if the tap interface is deleted, the tx thread may not yet be called to clean up the indirect descriptors' buffers. In that case, we need to remove them without waiting for the tx thread to be called. Failure to do so may cause buffers leak when the tap interface is deleted. For the RX ring, leakage also exists for vring->buffers when the interface is removed. Change-Id: I3df313a0e60334776b19daf51a9f5bf20dfdc489 Signed-off-by: Steven <sluong@cisco.com>
2018-01-10VPP-1131: doxygen: Documentation for Debug CLI stops at src/plugin/l2ev18.01-rc2Billy McFall1-3/+3
Change-Id: I3ce014da7b514aa766a90cacddd76cd2247406a8 Signed-off-by: Billy McFall <bmcfall@redhat.com>
2018-01-10makefile set CXXFLAGS so they are propageted to sub-buildsNeale Ranns1-2/+1
Change-Id: I55d9953851062f7106c66701d46bcd9073cf1ee4 Signed-off-by: Neale Ranns <neale.ranns@cisco.com> (cherry picked from commit 5ee623e789261552eb9460be10f34793d40b6575)
2018-01-10VPP-1120 SRv6 bug with SID list containing only one SID and no srhPablo Camarillo1-26/+65
Packets with a SR policy of one SID list create a malformed packet. Outer IPv6 header points to a routing extension header that does not exist since the SID list contains only one SID. Change-Id: I1effee0457453bab95706a8a24fdabfbd843d5b7 Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
2018-01-09VPP-1113 SR MPLS path.frp_label_stackPablo Camarillo1-17/+16
provide one label stack per fib_table_entry_path_add2 call. otherwise multiple mheap releases take place. Change-Id: I475ca1b801fc85dddda0b540c69ad628a274df7f Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
2018-01-09VPP-1119: PPPoE's destination MAC was overwrittenHongjun Ni1-1/+2
Change-Id: I6ae99c00e76058654f2c5e71377e9fd1bd13b47b Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-01-09BIER: missing endian swap for imposition object in API returnNeale Ranns1-1/+1
Change-Id: Iddd754d00ace3d042336e5c2c40431566275051a Signed-off-by: Neale Ranns <neale.ranns@cisco.com> (cherry picked from commit eea537a288721b867d65b736363ab3f71ba6116c)
2018-01-09BIER: crash in show command when no tables are presentNeale Ranns1-0/+1
Change-Id: Ie291468ea9d05c47cefe39c4ff7fea3e016bacf2 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 0e8cb6c475b616a3296b08d25bcaa1eed3ab0084)
2018-01-08GRE tunnel key should use fib_index instead of fib_id (VPP-1118)John Lo1-12/+1
Follow up fix - vl_api_gre_add_del_tunnel_t_handler should pass outer_fib_id from API message to vnet_gre_add_del_tunnel() and not convert it to fib_index, since vnet_gre_add_del_tunnel() already perform the lookup to get fib_index from fib_id. Change-Id: I24967a97f82ce018ddef596e556bd3eb1706cb63 Signed-off-by: John Lo <loj@cisco.com>
2018-01-08NAT: fixed get_worker_out2in bug (VPP-1116)Matus Fabian2-4/+12
Change-Id: I5e080d69f28661cc0b1846885d5001526b54fbd9 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-01-07VPP-1110 BVI reply ARP that doesn't request BVI loacl IP.zhaoqingling1-0/+6
Change-Id: I66ae618edaa12c2b4e4afe276da689673b02c9cd Signed-off-by: zhaoqingling <zhao.qingling@zte.com.cn> (cherry picked from commit b4c42cdc6bbbf464f3f0034b2b39d4e20fd23a25)
2018-01-06Unify/cleanup usage of hash_set/unset_mem by tunnels (VPP-1117)John Lo5-104/+58
Move the functions hash_set_key_copy() and hash_unset_key_free() which are dupilicated in various tunnel support code modules to hash.h as hash_set_mem_alloc() and hash_unset_mem_free() to be used by all. Change-Id: I40723cabe29072ab7feb1804c221f28606d8e4fe Signed-off-by: John Lo <loj@cisco.com> (cherry picked from commit e6bfeab1c352ae73a19361c038e2a06a58c035db)
2018-01-06GRE tunnel key should use fib_index instead of fib_id (VPP-1118)John Lo1-2/+11
The code path in src/vnet/gre/interface.c uses fib_id as a component to generate hash key for GRE tunnel. This should be fib_index as the GRE rx/decap data path will be using fib_index to generate the hash key to lookup the GRE tunnel. Change-Id: Ia7f0892d84f9dac79223a6e016775892b61eb5fb Signed-off-by: John Lo <loj@cisco.com>
2018-01-04VOM: NAT coverity found bugsNeale Ranns2-3/+3
Change-Id: Ic55ad2e0a1435f552ce84ed1a9b1981191bc178b Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 842eb22e5d5a7e11114fe093eeccafb080e9aa8b)
2018-01-03NAT64: free port when dynamic BIB deleted (VPP-1107)v18.04-rc0Matus Fabian6-39/+46
Change-Id: Id897ed61a26a4069678ed4ddac1ba28bf32809c3 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-01-02VOM: NAT updatesNeale Ranns12-174/+518
Change-Id: I112afaa1f2ccd2ee62a436c73802afaea9b44779 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-12-22tcp: add builtin server/client transfer testFlorin Coras4-33/+60
Change-Id: Iab0baabf2f27bc7ad7fbf2d2789a493752b07d8a Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-12-21fib: make deag entries urpf extemptFlorin Coras5-0/+19
Change-Id: Ie8f6bb4fcd3e4fa269e86a77d2f21c87f372b783 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-12-21VPP-1109 Fix loop for some CLI (code review)Swarup Nayak3-0/+7
Change-Id: I518387ab479bee4778d45a33c95f7b0f72aa1b72 Signed-off-by: Swarup Nayak <swarupnpvt@gmail.com>
2017-12-20L2 emulation: remove usued ip-table-id from APINeale Ranns1-1/+0
IP table mapping is set using 'set int ip table X Y" Change-Id: I2adec40015f9281c9b00c55506000b322f42d91a Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-12-20acl-plugin: add a debug CLI to print 5-tuple structure in human readable ↵Andrew Yourtchenko3-0/+33
format from hex representation Even though the trace now prints the hex as well as human readable format for acl plugin, it can be handy to have a separate function which allows to decode the hex. So add this debug CLI. Change-Id: I1db133a043374817ea9e94ae3736b8a98630669d Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-12-20L2 EmulationNeale Ranns17-2/+1366
L2 Emulation is a feautre that is applied to L2 ports to 'extract' IP packets from the L2 path and inject them into the L3 path (i.e. into the appropriate ip[4|6]_input node). L3 routes in the table_id for that interface should then be configured as DVR routes, therefore the forwarded packet has the L2 header preserved and togehter the L3 routed system behaves like an L2 bridge. Change-Id: I8effd7e2f4c67ee277b73c7bc79aa3e5a3e34d03 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-12-20fix kubeproxy some testsGabriel Ganne2-2/+41
* NAT46: fix test cleanup, missing del keyword * NAT66: fix kube-proxy vip, is ipv6 * add some missing kp_put_writer_lock * wipe flowtable after each unit test * Add new cli api: "test kube-proxy flowtable flush" to flushes everything * Call this new cli function after the end of each kube-proxy unit test. * same as commit b3d1b203579226ca5136b9d6a2744577d07cfcc6 for the lb plugin Change-Id: I4146f44841328ec96eb66729e3bae3d40f33e4aa Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-12-20Translate matching packets using NAT (VPP-1069)Juraj Sloboda6-48/+238
Add API function which enables forwarding of packets not matching existing translation or static mapping instead of dropping them. When forwarding is enabled matching packets will be translated while non-matching packets will be forwarded without translation. Change-Id: Ic13040cbad16d3a1ecdc3e02a497171bef6aa413 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2017-12-20Fix MPLS local-label CLI help stringMarek Gradzki1-1/+1
CLI parsing code (unformat_fib_route_path) does not recognise 'resolve-via-connected'. However it understands 'resolve-via-attached'. Change-Id: I57e5eb75199cb8ae72c0fc8642a41f042b022201 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-12-20VPP-1083 "ip punt redirect add" crashed if not mentioned any other parameterSwarup Nayak2-8/+28
Change-Id: Ibb6f450783d0ab64bd943c19f12d0954b0a94b24 Signed-off-by: Swarup Nayak <swarupnpvt@gmail.com>
2017-12-19BIER coverity fix in route downlaodNeale Ranns2-3/+3
Change-Id: I9341f1554d804dfeeecef656e59e8598704863dc Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-12-19FIB memory leak during recursive loop detectionNeale Ranns1-0/+2
Change-Id: I5ecd43330b3329b072e6da62a4eed1641eb17f8f Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-12-19VPP-1032: fix coverity warning in bierDave Barach1-2/+2
Change-Id: I0f8d2d9be78d4d936ed61538aee1b7207871347b Signed-off-by: Dave Barach <dave@barachs.net>
2017-12-19Fix passing bad context for callback functionJuraj Sloboda1-2/+2
Change-Id: I61e6019ab34f52c82bf3f1e5327501a613f58bd9 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2017-12-19NAT: Twice NAT44 (VPP-969)Matus Fabian6-783/+821
Translation of both source and destination addresses and ports for 1:1 NAT session initiated from outside network (ExternalIP K8 use case). Change-Id: Ic0000497cf71619aac996d6d580844f0ea0edc14 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-12-19lldp: Fix Coverity Warnings CID 177942, CID 177945Dave Wallace1-1/+1
Change-Id: Ic1ab32c5df3f7a613fe0dcd6bfc15037fa2a008b Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-12-18session api: Fix Coverity Warning CID 180115Dave Wallace1-1/+1
Change-Id: I87e3de556910851d16af343bfcbede49500843ff Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-12-18API: Fix Coverity Warning CID 177944Dave Wallace1-1/+1
Change-Id: I5dbd5e5673ecb0d3878053ae9985478740cf3bc6 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-12-18NAT: Add performance testing TRex scripts and config (VPP-832)Matus Fabian13-0/+426
Change-Id: I149a20f183b836db4c32fb4e4a8438b3a14c1c26 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-12-18Fix nat44 identity mappingDave Barach1-0/+5
Set l_addr to the interface address if the interface address is known when the identity mapping is created. Change-Id: I61af0f5248c9d86d23a24457b342b2e1fb4ac726 Signed-off-by: Dave Barach <dave@barachs.net>
2017-12-18Support kube-proxy data planeHongjun Ni12-0/+3595
This plugin provides kube-proxy data plane on user space, which is used to replace linux kernal's kube-proxy based on iptables. The idea is largely inspired from VPP LB plugin. Currently, kube-proxy plugin supports three service types: 1) Cluster IP plus Port: support any protocols, including TCP, UDP. 2) Node IP plus Node Port: currently only support UDP. 3) External Load Balancer. Please refer to kp_plugin_doc.md for details. Change-Id: I36690e417dd26ad5ec1bd77c7ea4b8100416cac6 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>