summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2018-06-26We don't have (yet) 128-bit unaligned load/store on ARMDamjan Marion1-2/+2
Change-Id: I16395bbf843e338cdd366d85bb4df3de95d9b265 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-26add backtrace in unix_signal_handlerKingwel Xie2-30/+63
crash stack backtrace will be directed to syslog 1. make use of glic backtrace in execinfo.h. the old clib_backtrace is removed 2. install SIGABRT in signal handler, but have to remove it when backtrace is done. reason is to capture stack trace caused by SIGABRT. vPP ASSERT always call os_exit then abort(). we definitely want to know the trace of this situation. It is a little tricky to avoid SIGABRT infinite loop 3. always load symbols by calling clib_elf_main_init () in main(). Otherwise, PC addresses instead of symbols will be displayed. Change-Id: I150e15b94a4620b2ea4f08c73dc3e6ad1856de1e Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
2018-06-26L3DSR fix ip checksum issue and add testHongjun Ni1-9/+12
Change-Id: Iedebbac71d3e694b915d6a126c80ecc3b5473a4a Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-06-26acl-plugin: tm: optimize multi-lookups and prepare to add tuplemergeAndrew Yourtchenko6-252/+456
- instantiate the per-use mask type entry for a given hash ACE this prepares to adding tuplemerge where the applied ACE may have a different mask type due to relaxing of the tuples - store the vector of the colliding rules for linear lookups rather than traversing the linked list. - store the lowest rule index for a given mask type inside the structure. This allows to skip looking up at the later mask types if we already matched an entry that is in front of the very first entry in the new candidate mask type, thus saving a worthless hash table lookup. - use a vector of mask type indices rather than bitmap, in the sorted order (by construction) of ascending lowest rule index - this allows to terminate the lookups early. - adapt the debug cli outputs accordingly to show the data - propagate the is_ip6 into the inner calls Change-Id: I7a67b271e66785c6eab738b632b432d5886a0a8a Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-06-26Fix api trace replay of handler to pass vm parameterJohn Lo1-2/+2
I suppose most API handlers do not use vm parameter so it has not been a problem so far. Now vl_api_vnet_set_ip6_ethernet_neighbor() was crashing when called from api trace replay because either of ip_neighbor_add_del_t_handler() vnet_arp_set_ip4_over_ethernet() need vm to be correct when it calls vlin_time_now() to update the neighbor timestamp. Change-Id: Iffb2084a7c90f92c4b86b339ea11800dd41117eb Signed-off-by: John Lo <loj@cisco.com>
2018-06-26tcp: cleanup functionsFlorin Coras4-263/+258
- sprinkle statics for functions - move some inlines from header files to corresponding .c files - replace some always_inlines with statics where inlining is not performance critical Change-Id: I371dbf63431ce7e27e4ebbbdd844a9546a1f1849 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-26SIMD optimized linear search in clib_bitmap_first_setDamjan Marion1-2/+23
Change-Id: Ib3a55598a83cc99485b40e38e7c406ecb126fd42 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-25Add checks for bad ARP request packets in arp-termination nodeJohn Lo1-12/+9
Check ARP request packet with bad requester MAC/IP address and drop these packets. Also removed useless VRRP check in the node. Change-Id: I2c8a774d291928eb623b3a515f1edf7e338fa760 Signed-off-by: John Lo <loj@cisco.com>
2018-06-25tw: add light weight timer update functionFlorin Coras6-41/+183
Because it avoids pool putting/getting the timer, this function is somewhat faster than stopping and restarting a timer. Change-Id: Id99ed9d356b0b1f7e12facfe8da193e1cd30b3ec Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-25dpdk: Enhancement to call crypto start api at initializationSachin Saxena1-0/+4
- Some crypto devices rely on rte_cryptodev_start() API to be called by application to enable a pre-configured H/W Crypto device. - NXP dpaa2 is one of the example. Change-Id: I2ad8ca0060604fb4e0541161e91bdebc6642f4da Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
2018-06-25acl-plugin: remove the noisy debug outputAndrew Yourtchenko1-1/+1
Change-Id: I6a3cfcb24f5027ec0f2cd2ec21ea47a01fef331b Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-06-25MAP: Move MAP-E/T to a plugin.Ole Troan26-469/+675
Only remaining traces of MAP in the src/vnet is now in buffer.h. Awaiting a new buffer opaque API (hint, hint). Change-Id: Ie165561484731f1d7ed6e0f604b43624e06db3f0 Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-25VCL: Refactor VCL test (part 1)Dave Wallace6-338/+2171
Change-Id: I6a326e24ed953b1cef63bd4010a3bedd6c4a7b1c Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-06-24Revert "Revert "ipsec: VPP-1316 calculate IP/TCP/UDP inner checksums""Klement Sekera6-195/+180
This reverts commit e0d2bd6bd7fc59c0c6ac48195d7f825dc99bfd91. Change-Id: If491e16f9ea66b2493a6a7c7f3c684ed585f8f51 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-06-23Tx feature node, for accounting purposesDave Barach3-136/+204
Switch to combined allow/drop counters Show matching ip4 neighbor address if known Add static-allow mactime entries for unknown mac addresses Add the "clear mactime" command Change-Id: Ib963981438dfb8a123df1b3c023bd5fcc27f888f Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-06-22Revert "ipsec: VPP-1316 calculate IP/TCP/UDP inner checksums"Ole Troan6-180/+195
This reverts commit a98346f664aae148d26a8e158008b773d73db96f. Change-Id: Iee5b3a5ddff0e8fd3a30fe5973cee24de434fe12 Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-22jvpp: add support for enums (VPP-1153)Marek Gradzki5-4/+244
Change-Id: I2a1b946a71419e1fb3c5d70567c54a6a7d841f10 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-06-22session: improve session lookup speedsFlorin Coras1-57/+24
It would seem that this avoids using the stack for computing the subsequent crc32 by storing the 2 x u64 ip4 5-tuple key into two registers. Probably the cast to the "convenience" data structure "masks" the fact that the key is 16B. Probably ... :-) "sh run" on an ip4 tcp sender reports that the number of clocks spent in tcp_input, where a session lookup is performed, drops ~25% (from ~100 clocks/packet to ~75 clocks/packet) Change-Id: I50d647115ac72f8407bff7e3b73328ba42f0ddb5 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-22jvpp: cleanup JNI generation code (VPP-1153)Marek Gradzki3-168/+286
Minor cleanup that includes unifying common Java to C and C to Java translation code. Change-Id: I14d63dbe06334c3bbfbde75043de04d2c08f3dfd Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-06-22Python API: Add enum and union support.Ole Troan10-1030/+677
As well as a rewrite of the encoders/decoders to make it more readable and extensible. (Re-commit after fix to verify build.) Change-Id: Ic244d3cebe070bb2570491f8a24f4a1e203f889a Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-22Update tapv2 documentationIan Wells1-1/+1
The documentation in the API file says that 0xffff == 'no interface ID specified' but the code tests against ~(u32)0. Change-Id: I5cd83d876c3ad4f53a5b01463299d4fcb806ea98 Signed-off-by: Ian Wells <iawells@cisco.com>
2018-06-21VPP-1042: Fix the DPDK no-hugetbl flagsJessica Tallon1-5/+8
Change-Id: I7c611d3fa7fabe82294fc22a61d5a3927a2da39d Signed-off-by: Jessica Tallon <tsyesika@igalia.com>
2018-06-21configurable per-dispatch-cycle sleepDave Barach6-29/+25
Workaround for lack of driver interrupt support. Also quite handy for home gateway, laptop/vagrant, other use-cases not requiring maximum vectors/second for proper operation. Change-Id: Ifc4b98112450664beef67b89ab8a6940a3bf24b5 Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-21FastLinQ QL41000 Series PCI vendor and device idsIgor Mikhailov (imichail)1-0/+3
Change-Id: I23caebf602e3e6ff45fdec106a0da88f6de7a284 Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2018-06-21ipsec: VPP-1316 calculate IP/TCP/UDP inner checksumsKlement Sekera6-195/+180
Calculate IP/TCP/UDP checksums in software before adding authentication. Change-Id: I3e121cb00aeba667764f39ade8d62170f18f8b6b Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-06-21Null terminate name stringDave Barach1-1/+1
Change-Id: If7bcc6ae3358b5e39bf76481ee58f4dbaa53d895 Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-21tcp: move tracing out of established loopFlorin Coras2-28/+60
Change-Id: I4a7e4f616ed4a4df82be3112ac4702f7e4e2025c Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-21Implement DHCPv6 IA NA client (VPP-1094)Juraj Sloboda15-540/+2514
Change-Id: I682a47d6cf9975aca6136188d28ee93eaadf4fe3 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-06-21jvpp: do not fail on type parsing errorMarek Gradzki1-5/+8
skip the type instead. Change-Id: I533c8e13c1b2d05c1ddc6dc36427bac010d7c19a Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-06-21BIER neighbor statsNeale Ranns10-78/+333
Change-Id: I2f638f1932b4aeddf2408c06d1b8393551675b72 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-06-21dpdk/ipsec: add support for UDP encap/decapRadu Nicolau2-17/+65
Change-Id: I024c1d398fcb51e5a20f9049d16a87b3b1ba0c20 Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
2018-06-21acl-plugin: fallback to linear ACL search for fragmentsAndrew Yourtchenko2-38/+34
Trying to accomodate fragments as first class citizens has shown to be more trouble than it's worth. So fallback to linear ACL search in case it is a fragment packet. Delete the corresponding code from the hash matching. Change-Id: Ic9ecc7c800d575615addb33dcaa89621462e9c7b Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-06-20Nested-loop index typo. Oops.Dave Barach1-6/+6
Change-Id: I73b5a4adcfce0d7cd1dd4cf6d9d6a5fb25256bcf Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-20tcp: add per worker ctx structureFlorin Coras3-54/+56
Change-Id: I28d3c31bdc4255a4ca223d80bcf44709fb39f4ed Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-20ipsec: VPP-1308 fix sorting of SPD entriesKlement Sekera2-10/+11
Change-Id: I761aced55b7cef51a9b47048283b2cb9430bcde2 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-06-20acl-plugin: acl-as-a-service: VPP-1248: fix the error if exports.h included ↵Andrew Yourtchenko10-207/+229
in more than one C file Including the exports.h from multiple .c files belonging to a single plugin results in an error. Rework the approach to require the table of function pointers to be filled in by the initialization function. Since the inline functions are compiled in the "caller" context, there is no knowledge about the acl_main structure used by the ACL plugin. To help with that, the signature of inline functions is slightly different, taking the p_acl_main pointer as the first parameter. That pointer is filled into the .p_acl_main field of the method table during the initialization - since the calling of non-inline variants would have required filling the method table, this should give minimal headaches during the use and switch between the two methods. Change-Id: Icb70695efa23579c46c716944838766cebc8573e Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-06-20Fix sw-if-index display error.Brant Lin1-2/+2
If the sw-if-index is set to -1, it will send out all interfaces' arp enties. In this case, the sw-if-index is always set to -1. It is not correct. Change-Id: I21e9ee078c757ac7efa70a2a1f1a7a4eb73d66a1 Signed-off-by: Brant Lin <brant.lin@ericsson.com>
2018-06-19VCL: Fix session peer and local addressesDave Wallace1-6/+20
VPP-1302: VCL does not provide local and peer addresses Change-Id: I7ff12e57799796dfeb030b181b4c24da07dc12eb Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-06-19Driver level time-based src mac filterDave Barach11-0/+1500
Change-Id: I062d7653e00d77e73a61d8841e01ab4a159b6404 Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-06-19tcp: optimize tcp outputFlorin Coras7-172/+199
Change-Id: Idf17a0633a1618b12c22b1119e40c2e9d3192df9 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-19tcp: optimize tcp inputFlorin Coras1-134/+204
Change-Id: Ib98cfc93f6c574de5250f251925f7ed4e86f5f6f Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-19Check get packet template allocation failure (VPP-1321)John Lo5-0/+24
After calling vlib_packet_template_get_packet(), make sure packet buffer is allocated before using it. Change-Id: Idb5199f4e2c9596137b2101e502d611f474a6ffe Signed-off-by: John Lo <loj@cisco.com>
2018-06-19VCL: refactor async & spinlocksDave Wallace5-544/+577
- Consolidate async code. - Add macros for spinlocks to improve readability. Change-Id: I2e0fd2b82ea76987aaf298a183d816c7d2ee0867 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-06-19ip checksum multiarch support, cleanupDave Barach2-109/+91
When computing tcp/udp checksums across large amounts of data - e.g. when NIC h/w checksum offload is not available - it's worth providing arch-dependent code; if only to compile the code w/ -O3. Fix calculation when data is fully unaligned / on an odd byte boundary. Add a buffer alignment test vector. Change-Id: I7644e2276ac6cbc3f575bf61746a6ffedbbb6150 Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-19Fixed bugs in SRv6 APIPablo Camarillo5-75/+243
Jira ticket VPP-1196 Jira ticket VPP-1081 Jira ticket VPP-1078 Jira ticket VPP-1217 Change-Id: Id7e85229cae1017acb0aa4ca63ced334e6dafb8d Signed-off-by: pcamaril <pcamaril@cisco.com> Signed-off-by: Pablo Camarillo <pcamaril@cisco.com> Signed-off-by: pcamaril <pcamaril@cisco.com> Signed-off-by: Michal Cmarada <michal.cmarada@pantheon.tech>
2018-06-19flow:free lookup entries after packets are handledeyal bari3-13/+36
Change-Id: I737dad64bf6dd0743d36500d5cfa1cb1a6594b98 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-06-18Revert "Python API: Add enum and union support."Ole Trøan5-542/+309
This reverts commit a5ee900fb75201bbfceaf13c8bc57a13ed094988. Some of the unit tests breaks. Backing out until fixed. Change-Id: I1846fb417db44a2a772f7b59cda8bcfe6d39f8c3 Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-17Python API: Add enum and union support.Ole Troan5-309/+542
As well as a rewrite of the encoders/decoders to make it more readable and extensible. Change-Id: I253369ac76303922bf9c11377622c8974fa92f19 Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-17acl-plugin: fix the high cpu usage caused by the connection cleanerAndrew Yourtchenko1-1/+2
The commit 4bc1796b346efd10f3fb19b176ff089179263a24 had incorrect calculation of the session lists minimal timeout, resulting in returned value of 0 which resulted in existing sessions constantly requeued, taking up the CPU. Fix this calculation. Change-Id: I9a789739f96a1f01522c68f91b0a02db2417837f Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-06-17acl-plugin: split (L3) and (L4/pkt) logic of creation of 5tuple structure, ↵Andrew Yourtchenko1-46/+70
optimize stores in the (l4/pkt) Having two pieces of code - one for now much simpler to recreate L3 info, one for a more difficult do build L4/pkt metadata allows more degrees of freedom for optimizations. Also, construct the metadata in local variables first before saving it into the memory structure, this fewer memory stores and they are better aligned, allowing to coalesce with subsequent reads if needed. Change-Id: Icb35d933834b14294f875362c9b58db3feb38d99 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>