Andrew Yourtchenko [Wed, 20 Jun 2018 08:44:19 +0000 (10:44 +0200)]
acl-plugin: tm: add tuplemerge algorithm for relaxing the hashtable masks
Slightly refactored from the initial implementation of the TupleMerge [1]
algorithm by Valerio Bruschi (valerio.bruschi@telecom-paristech.fr)
[1] James Daly, Eric Torng "TupleMerge: Building Online Packet Classifiers
by Omitting Bits", In Proc. IEEE ICCCN 2017, pp. 1-10
Also add startup parameters to turn on/off the algorithm ("use tuple merge 1/0"),
and a startup parameter to be able to tweak the split threshold
("tuple merge split threshold N"), the default value of the split threshold
is 39 as per paper, but some more tuning might be necessary to find the best
value.
This change, alongside with the optimizations which avoid extra lookups,
significantly reduces the slowdown on the ClassBench generated ACLs, which
are supposed to resemble realistic ACLs seen in use in the field.
Change-Id: I9713e4673970e9a62d4d9e9718365293375fab7b
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Florin Coras [Tue, 26 Jun 2018 16:31:04 +0000 (09:31 -0700)]
tcp/session: tx optimizations
- cache and reuse tcp options and rcv_wnd for session layer tx bursts
- avoid reading/setting total_length_not_including_first_buffer. It's
part of a buffer's second cache line so it comes at a "cost".
Change-Id: Id18219c2f7e07cf4c63ee74f9cdd9e5918904036
Signed-off-by: Florin Coras <fcoras@cisco.com>
Damjan Marion [Tue, 26 Jun 2018 14:54:36 +0000 (16:54 +0200)]
dpdk: display rx/tx burst function name in "show hardware detail"
Change-Id: I6fa4c6bf9c4e96ba4502a06907bdecc654ace665
Signed-off-by: Damjan Marion <damarion@cisco.com>
Sirshak Das [Tue, 26 Jun 2018 18:08:46 +0000 (13:08 -0500)]
Fix load_unaligned undefined and other possible build failures
Add aarch64 neon intrinsics to fix build failures similar to this:
error: implicit declaration of function ‘u64x2_load_unaligned’
Change-Id: I6178504a48242742df3f7d75abdaf108796cf73f
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Hongjun Ni [Thu, 14 Jun 2018 21:32:23 +0000 (05:32 +0800)]
Fix assert issue in ip_csum_add_even()
ASSERT (ip_csum_with_carry (d, x) == c) will raise assert
if d equals to zero while x not equals to zero.
Change-Id: Ia9ccdbf801ae565eaadd49f04569d13bfc31cba8
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
Florin Coras [Tue, 26 Jun 2018 08:22:41 +0000 (01:22 -0700)]
tcp: avoid doing work in tcp_rcv_sacks for no sacks
Change-Id: I00a0d7f57dc144d338d5ad45b0a6e3720c32c400
Signed-off-by: Florin Coras <fcoras@cisco.com>
Matus Fabian [Mon, 25 Jun 2018 23:42:36 +0000 (16:42 -0700)]
NAT44: fix nat44_ed_not_translate_output_feature (VPP-1329)
Change-Id: Iddb0b848c53da03116524e203c7112c82b401ac5
Signed-off-by: Matus Fabian <matfabia@cisco.com>
Marco Varlese [Tue, 26 Jun 2018 13:12:52 +0000 (15:12 +0200)]
Update to latest stable DPDK release (18.02.2)
Change-Id: I00b0e4d7f7b597760a898c895b1a80bfac3a47fb
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Damjan Marion [Tue, 26 Jun 2018 12:45:49 +0000 (14:45 +0200)]
node functions cannot be always_inline
Thanks to gcc-8 for highlighting this...
Change-Id: I53bfab631a40fd1b680c76a48b0307a33fa2b154
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Tue, 26 Jun 2018 14:05:43 +0000 (16:05 +0200)]
We don't have (yet) 128-bit unaligned load/store on ARM
Change-Id: I16395bbf843e338cdd366d85bb4df3de95d9b265
Signed-off-by: Damjan Marion <damarion@cisco.com>
Kingwel Xie [Fri, 15 Jun 2018 08:56:24 +0000 (04:56 -0400)]
add backtrace in unix_signal_handler
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>
Hongjun Ni [Thu, 7 Jun 2018 23:12:05 +0000 (07:12 +0800)]
L3DSR fix ip checksum issue and add test
Change-Id: Iedebbac71d3e694b915d6a126c80ecc3b5473a4a
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
Andrew Yourtchenko [Wed, 20 Jun 2018 13:28:15 +0000 (15:28 +0200)]
acl-plugin: tm: optimize multi-lookups and prepare to add tuplemerge
- 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>
Jan Gelety [Thu, 21 Jun 2018 14:57:47 +0000 (16:57 +0200)]
Add negative tests for leaking across different VRFs - ip4/6
Jira: CSIT-1140
Change-Id: I5c6dd44d3efb298f203e61b14345a2f13680bd34
Signed-off-by: Jan Gelety <jgelety@cisco.com>
John Lo [Tue, 26 Jun 2018 00:38:35 +0000 (20:38 -0400)]
Fix api trace replay of handler to pass vm parameter
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>
Florin Coras [Mon, 25 Jun 2018 23:19:34 +0000 (16:19 -0700)]
tcp: cleanup functions
- 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>
Damjan Marion [Mon, 25 Jun 2018 23:29:55 +0000 (01:29 +0200)]
SIMD optimized linear search in clib_bitmap_first_set
Change-Id: Ib3a55598a83cc99485b40e38e7c406ecb126fd42
Signed-off-by: Damjan Marion <damarion@cisco.com>
John Lo [Mon, 25 Jun 2018 16:35:21 +0000 (12:35 -0400)]
Add checks for bad ARP request packets in arp-termination node
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>
Florin Coras [Fri, 22 Jun 2018 22:29:38 +0000 (15:29 -0700)]
tw: add light weight timer update function
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>
Sachin Saxena [Fri, 22 Jun 2018 06:50:20 +0000 (12:20 +0530)]
dpdk: Enhancement to call crypto start api at initialization
- 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>
Andrew Yourtchenko [Fri, 22 Jun 2018 16:59:29 +0000 (18:59 +0200)]
acl-plugin: remove the noisy debug output
Change-Id: I6a3cfcb24f5027ec0f2cd2ec21ea47a01fef331b
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Ole Troan [Fri, 22 Jun 2018 09:32:12 +0000 (11:32 +0200)]
MAP: Move MAP-E/T to a plugin.
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>
Dave Wallace [Mon, 25 Jun 2018 01:21:21 +0000 (21:21 -0400)]
VCL: Refactor VCL test (part 1)
Change-Id: I6a326e24ed953b1cef63bd4010a3bedd6c4a7b1c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Klement Sekera [Fri, 22 Jun 2018 11:19:45 +0000 (13:19 +0200)]
make test: fix RETRIES when setUpClass throws
This change adds handling of special case when setUpClass throws. In
this case TestResults receives a mock object called _ErrorHolder.
By parsing its description, we find test class name and use it to lookup
the test class in test suite to be able to add it to the list of failures
for re-running.
Change-Id: I656f21e38aa450fc567cdcbcf6e586967f947a64
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Klement Sekera [Sun, 24 Jun 2018 08:30:37 +0000 (10:30 +0200)]
make test: fix broken interfaces #2
Change-Id: I9d5b5d925fd2c09a1113fc51e433a16d729a241b
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Klement Sekera [Sun, 24 Jun 2018 20:49:33 +0000 (22:49 +0200)]
Revert "Revert "make test: fix broken interfaces""
This reverts commit
c8efa29b6f9a91381897b54f1147daf922ed7164.
Change-Id: I1d5c5773d5f86a63073e255336bd9de628e26179
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Klement Sekera [Sun, 24 Jun 2018 20:49:55 +0000 (22:49 +0200)]
Revert "Revert "ipsec: VPP-1316 calculate IP/TCP/UDP inner checksums""
This reverts commit
e0d2bd6bd7fc59c0c6ac48195d7f825dc99bfd91.
Change-Id: If491e16f9ea66b2493a6a7c7f3c684ed585f8f51
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Dave Barach [Fri, 22 Jun 2018 17:14:08 +0000 (13:14 -0400)]
Tx feature node, for accounting purposes
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>
Ole Troan [Fri, 22 Jun 2018 20:36:46 +0000 (22:36 +0200)]
Revert "ipsec: VPP-1316 calculate IP/TCP/UDP inner checksums"
This reverts commit
a98346f664aae148d26a8e158008b773d73db96f.
Change-Id: Iee5b3a5ddff0e8fd3a30fe5973cee24de434fe12
Signed-off-by: Ole Troan <ot@cisco.com>
Ole Troan [Fri, 22 Jun 2018 20:33:41 +0000 (22:33 +0200)]
Revert "make test: fix broken interfaces"
This reverts commit
d5c60b96a3fd93916fc4af5c8d6d25625c28242e.
Change-Id: I3632b9c3f76c615aee897f28f76d094e7031e689
Signed-off-by: Ole Troan <ot@cisco.com>
Klement Sekera [Fri, 22 Jun 2018 11:54:07 +0000 (13:54 +0200)]
make test: fix broken interfaces
Change-Id: I2e092774f81503e04b53cc6c6b5d357fe3fc52ab
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Marek Gradzki [Wed, 20 Jun 2018 12:49:39 +0000 (14:49 +0200)]
jvpp: add support for enums (VPP-1153)
Change-Id: I2a1b946a71419e1fb3c5d70567c54a6a7d841f10
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Florin Coras [Thu, 21 Jun 2018 15:14:34 +0000 (08:14 -0700)]
session: improve session lookup speeds
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>
Marek Gradzki [Wed, 20 Jun 2018 11:15:08 +0000 (13:15 +0200)]
jvpp: cleanup JNI generation code (VPP-1153)
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>
Ole Troan [Tue, 12 Jun 2018 19:06:44 +0000 (21:06 +0200)]
Python API: Add enum and union support.
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>
Ian Wells [Mon, 18 Jun 2018 20:53:17 +0000 (13:53 -0700)]
Update tapv2 documentation
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>
Eyal Bari [Mon, 18 Jun 2018 10:01:59 +0000 (13:01 +0300)]
test:vxlan over ipv6 tests
Change-Id: Id910db0e3a07ecc6f469e2f0d1e97f39ba48cc60
Signed-off-by: Eyal Bari <ebari@cisco.com>
Jessica Tallon [Mon, 21 May 2018 12:27:05 +0000 (12:27 +0000)]
VPP-1042: Fix the DPDK no-hugetbl flags
Change-Id: I7c611d3fa7fabe82294fc22a61d5a3927a2da39d
Signed-off-by: Jessica Tallon <tsyesika@igalia.com>
Dave Barach [Thu, 14 Jun 2018 22:52:46 +0000 (18:52 -0400)]
configurable per-dispatch-cycle sleep
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>
Igor Mikhailov (imichail) [Mon, 18 Jun 2018 17:19:10 +0000 (10:19 -0700)]
FastLinQ QL41000 Series PCI vendor and device ids
Change-Id: I23caebf602e3e6ff45fdec106a0da88f6de7a284
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
Klement Sekera [Wed, 16 May 2018 08:52:45 +0000 (10:52 +0200)]
ipsec: VPP-1316 calculate IP/TCP/UDP inner checksums
Calculate IP/TCP/UDP checksums in software before adding authentication.
Change-Id: I3e121cb00aeba667764f39ade8d62170f18f8b6b
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Dave Barach [Thu, 21 Jun 2018 11:33:12 +0000 (07:33 -0400)]
Null terminate name string
Change-Id: If7bcc6ae3358b5e39bf76481ee58f4dbaa53d895
Signed-off-by: Dave Barach <dave@barachs.net>
Florin Coras [Wed, 20 Jun 2018 19:44:16 +0000 (12:44 -0700)]
tcp: move tracing out of established loop
Change-Id: I4a7e4f616ed4a4df82be3112ac4702f7e4e2025c
Signed-off-by: Florin Coras <fcoras@cisco.com>
Juraj Sloboda [Fri, 4 May 2018 12:20:06 +0000 (14:20 +0200)]
Implement DHCPv6 IA NA client (VPP-1094)
Change-Id: I682a47d6cf9975aca6136188d28ee93eaadf4fe3
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Marek Gradzki [Wed, 20 Jun 2018 11:53:10 +0000 (13:53 +0200)]
jvpp: do not fail on type parsing error
skip the type instead.
Change-Id: I533c8e13c1b2d05c1ddc6dc36427bac010d7c19a
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Neale Ranns [Thu, 7 Jun 2018 09:08:07 +0000 (02:08 -0700)]
BIER neighbor stats
Change-Id: I2f638f1932b4aeddf2408c06d1b8393551675b72
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Radu Nicolau [Wed, 13 Jun 2018 15:39:05 +0000 (16:39 +0100)]
dpdk/ipsec: add support for UDP encap/decap
Change-Id: I024c1d398fcb51e5a20f9049d16a87b3b1ba0c20
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Marek Gradzki [Wed, 20 Jun 2018 18:59:00 +0000 (20:59 +0200)]
Add .pydevproject to .gitignore
the file is used by PyDev - a Python IDE for Eclipse.
Change-Id: Id47287451fc8773332c65afa40c6f0464067cf81
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Andrew Yourtchenko [Mon, 18 Jun 2018 10:15:09 +0000 (12:15 +0200)]
acl-plugin: fallback to linear ACL search for fragments
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>
Dave Barach [Wed, 20 Jun 2018 14:53:51 +0000 (10:53 -0400)]
Nested-loop index typo. Oops.
Change-Id: I73b5a4adcfce0d7cd1dd4cf6d9d6a5fb25256bcf
Signed-off-by: Dave Barach <dave@barachs.net>
Florin Coras [Tue, 19 Jun 2018 16:58:04 +0000 (09:58 -0700)]
tcp: add per worker ctx structure
Change-Id: I28d3c31bdc4255a4ca223d80bcf44709fb39f4ed
Signed-off-by: Florin Coras <fcoras@cisco.com>
Klement Sekera [Thu, 7 Jun 2018 17:36:07 +0000 (19:36 +0200)]
ipsec: VPP-1308 fix sorting of SPD entries
Change-Id: I761aced55b7cef51a9b47048283b2cb9430bcde2
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Andrew Yourtchenko [Tue, 15 May 2018 15:25:50 +0000 (17:25 +0200)]
acl-plugin: acl-as-a-service: VPP-1248: fix the error if exports.h included 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>
Brant Lin [Wed, 13 Jun 2018 10:01:58 +0000 (06:01 -0400)]
Fix sw-if-index display error.
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>
Dave Wallace [Tue, 19 Jun 2018 17:37:30 +0000 (13:37 -0400)]
VCL: Fix session peer and local addresses
VPP-1302: VCL does not provide local and peer addresses
Change-Id: I7ff12e57799796dfeb030b181b4c24da07dc12eb
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Dave Barach [Mon, 18 Jun 2018 17:16:39 +0000 (13:16 -0400)]
Driver level time-based src mac filter
Change-Id: I062d7653e00d77e73a61d8841e01ab4a159b6404
Signed-off-by: Dave Barach <dbarach@cisco.com>
Florin Coras [Thu, 14 Jun 2018 21:55:50 +0000 (14:55 -0700)]
tcp: optimize tcp output
Change-Id: Idf17a0633a1618b12c22b1119e40c2e9d3192df9
Signed-off-by: Florin Coras <fcoras@cisco.com>
Florin Coras [Fri, 15 Jun 2018 00:11:56 +0000 (17:11 -0700)]
tcp: optimize tcp input
Change-Id: Ib98cfc93f6c574de5250f251925f7ed4e86f5f6f
Signed-off-by: Florin Coras <fcoras@cisco.com>
John Lo [Tue, 19 Jun 2018 19:27:48 +0000 (15:27 -0400)]
Check get packet template allocation failure (VPP-1321)
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>
Dave Wallace [Mon, 18 Jun 2018 22:41:32 +0000 (18:41 -0400)]
VCL: refactor async & spinlocks
- Consolidate async code.
- Add macros for spinlocks to improve readability.
Change-Id: I2e0fd2b82ea76987aaf298a183d816c7d2ee0867
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Dave Barach [Thu, 14 Jun 2018 22:05:30 +0000 (18:05 -0400)]
ip checksum multiarch support, cleanup
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>
Pablo Camarillo [Tue, 19 Jun 2018 13:49:02 +0000 (15:49 +0200)]
Fixed bugs in SRv6 API
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>
eyal bari [Mon, 11 Jun 2018 16:50:40 +0000 (19:50 +0300)]
flow:free lookup entries after packets are handled
Change-Id: I737dad64bf6dd0743d36500d5cfa1cb1a6594b98
Signed-off-by: Eyal Bari <ebari@cisco.com>
Ole Trøan [Mon, 18 Jun 2018 18:30:09 +0000 (18:30 +0000)]
Revert "Python API: Add enum and union support."
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>
Ole Troan [Tue, 12 Jun 2018 19:06:44 +0000 (21:06 +0200)]
Python API: Add enum and union support.
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>
Matthew Smith [Fri, 15 Jun 2018 21:42:57 +0000 (16:42 -0500)]
ixgbe patch for link status updates
An x550 with SFP+ interfaces attached to some switches can
have problems bringing the port up.
After configuring the link, there is a wait for 500 ms for
the link to come up. Some switches don't bring their ports up
that quickly. So the link is never observed to come up and is
reconfigured again the next time dpdk_update_link_state() is
called. Subsequent attempts time out also indefinitely.
Instead of waiting through 5 iterations of a 100 ms delay, wait
through 10 iterations. The i40e PMD does this when updating
link status.
This issue & patch will be reported to Intel so this or
some better solution can be applied upstream in the future.
Change-Id: I16d706a2790e51d695edc43c0ca17f1eff1dcf5e
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Andrew Yourtchenko [Thu, 14 Jun 2018 16:36:41 +0000 (18:36 +0200)]
acl-plugin: fix the high cpu usage caused by the connection cleaner
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>
Andrew Yourtchenko [Sun, 27 May 2018 15:41:27 +0000 (17:41 +0200)]
acl-plugin: split (L3) and (L4/pkt) logic of creation of 5tuple structure, 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>
Matus Fabian [Fri, 15 Jun 2018 10:59:12 +0000 (03:59 -0700)]
NAT44: fix coverity
Change-Id: Ib1e4563dbc027571c77497e5c190201713adc72b
Signed-off-by: Matus Fabian <matfabia@cisco.com>
Ole Troan [Thu, 14 Jun 2018 12:42:14 +0000 (14:42 +0200)]
STATS: Separate socket for fd exchange.
stats { interval <no> socket-name <name> | default }
Where the default socket is in /run/vpp/stats.sock
Change-Id: Idd501b328c662804d4ccd58034b0ea6b8aa1f89a
Signed-off-by: Ole Troan <ot@cisco.com>
Ole Troan [Thu, 14 Jun 2018 07:28:27 +0000 (09:28 +0200)]
STATS: Add more hierarchy to counters.
Put error counters under node_index.
/err/<node-name>/<error-name>
E.g:
/err/ip4-lookup/Hash table collisions
/err/ip6-rewrite/Buffer allocation error
Error names are not globally unique, and this allows
for walking all errors for a particular node.
Put interface counters under the directory /if.
E.g. /if/rx
Put system counters under the directory /sys.
E.g. /sys/vector_rate
Change-Id: I5b794d16698f61bcb2063a8cd77a7c4ae36419b8
Signed-off-by: Ole Troan <ot@cisco.com>
Damjan Marion [Thu, 14 Jun 2018 20:56:34 +0000 (22:56 +0200)]
avf: tx node fixes
- missing RSV bit set in descriptor
- wrong buffer offset
Change-Id: I8b138266652a30a50e4541c6344e4fe3dec4d1ca
Signed-off-by: Damjan Marion <damarion@cisco.com>
Juraj Sloboda [Tue, 12 Jun 2018 08:21:05 +0000 (10:21 +0200)]
Update DHCPv6 DUID code and fix coverity warnings
- Generate client DUID only when DHCPv6 PD feature is enabled
- Change client DUID type from DUID-LLT to DUID-LL
- Fix coverity warnings
Change-Id: I20e518fc9a1c5f3f7ea9add7e7e03a487c99e978
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Matus Fabian [Wed, 13 Jun 2018 12:39:07 +0000 (05:39 -0700)]
NAT44: endpoint dependent mode (VPP-1273)
To enable NAT plugin endpoint dependent mode add following to statrup config:
nat { endpoint-dependent }
Enable endpoint dependent filtering and mapping for all sessions.
Move some existing functionality such as service load balancing, twice nat,
out2in-only static mappings and unknown protocol dynamic translations, which
use endpoint dependent lookup hash tables before. Basically split to vanilla
NAT44 and extra features NAT44.
Change-Id: I3925eb5ddcc8f1ec4cf6af4e2a618a7ec7aa9735
Signed-off-by: Matus Fabian <matfabia@cisco.com>
Ping Yu [Wed, 30 May 2018 22:16:08 +0000 (18:16 -0400)]
TLS async support
Change-Id: I26194e00dfb85e5cd1c65ff4e6ffd665be2d719b
Signed-off-by: Ping Yu <ping.yu@intel.com>
Matthew Smith [Thu, 14 Jun 2018 16:40:49 +0000 (11:40 -0500)]
Fix SEGV in generic event sub reaper
When a client subscribed to receive events disconnects
from the API, while deleting their subscription, a hash
lookup was being performed against a pointer that did
not refer to a hash, resulting in a SEGV.
Perform the hash lookup against the correct hash.
Change-Id: I011d7479e2c3b9ee50721cf7499385c3ff7f704a
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Dave Barach [Thu, 14 Jun 2018 13:18:21 +0000 (09:18 -0400)]
Use __attribute__((weak)) references where necessary
It should be possible to use vlib without the vlibmemory library, etc.
Change-Id: Ic2316b93d7dbb728fb4ff42a3ca8b0d747c9425e
Signed-off-by: Dave Barach <dave@barachs.net>
Andrew Yourtchenko [Sun, 27 May 2018 18:56:26 +0000 (20:56 +0200)]
Add clib_bihash_search_inline_2_with_hash to bihash template
Use similar approach as in the clib_bihash_search_inline_with_hash to
be able to do the hash calculation and lookup separately.
Change-Id: Ief79aa0f9f1e42b0af88be4807ca01fac30a80d7
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
John Lo [Tue, 12 Jun 2018 00:14:49 +0000 (20:14 -0400)]
Use unicast DMAC for IP neighbor pool refresh probes
Change-Id: I12fbebd1d24c37dc77c147773ea522c8a4b7b99d
Signed-off-by: John Lo <loj@cisco.com>
Andrew Yourtchenko [Fri, 18 May 2018 16:10:16 +0000 (18:10 +0200)]
acl-plugin: VAT: add an option to load entire ACL from a ClassBench ruleset file for testing
Add a command "acl_add_replace_from_file" to VAT which can load a ruleset and
add an ACL with it. There are a few options which augment the ACL being created:
"permit+reflect" or "permit" alter the default action from deny on the ACEs
created.
"append-default-permit" adds an entry in the end with the "permit+reflect"
if the default action has been changed to permit+reflect, or with a simple
permit otherwise.
This command is IPv4-only because the available datasets were IPv4-only.
Change-Id: I26b9f33ecb6b59e051d1d9cbafedbc47e8203392
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Eyal Bari [Thu, 14 Jun 2018 05:57:39 +0000 (08:57 +0300)]
vxlan:use VLIB_NODE_FN for multiarch selection
Change-Id: Ic98945fa1ffcc73e0b239ff5cc11d45e7318613e
Signed-off-by: Eyal Bari <ebari@cisco.com>
Ole Troan [Tue, 10 Apr 2018 14:02:51 +0000 (16:02 +0200)]
MTU: IP fragmentation added to ip4-rewrite and ip6-rewrite
Change-Id: Ibae260273f25a319153be37470aed49ff73e957a
Signed-off-by: Ole Troan <ot@cisco.com>
Andrew Yourtchenko [Wed, 13 Jun 2018 14:10:35 +0000 (16:10 +0200)]
acl-plugin: use 16_8 bihash for IPv4 sessions and 40_8 bihash for IPv6 sessions
Add a new kv_16_8 field into 5tuple union, rename
the existing kv into kv_40_8 for clarity, and
add the compile-time alignment constraints.
Change-Id: I9bfca91f34850a5c89cba590fbfe9b865e63ef94
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Dave Barach [Thu, 14 Jun 2018 00:48:09 +0000 (20:48 -0400)]
Disable bihash bucket-level caching
It'll be interesting to see what the perf trend job
says about this change.
Change-Id: I66307a19a865011ac9660108098874fa1481c895
Signed-off-by: Dave Barach <dave@barachs.net>
Dave Barach [Wed, 13 Jun 2018 13:26:05 +0000 (09:26 -0400)]
Stat segment / client: show run" works now
Seems to have minimal-to-zero performance consequences. Data appears
accurate: result match the debug CLI output. Checked at low rates, 27
MPPS sprayed across two worker threads.
Change-Id: I09ede5150b88a91547feeee448a2854997613004
Signed-off-by: Dave Barach <dave@barachs.net>
Andrew Yourtchenko [Tue, 12 Jun 2018 13:15:49 +0000 (15:15 +0200)]
acl-plugin: change the src/dst L3 info in 5tuple struct to be always contiguous with L4 data
Using ip46_address_t was convenient from operational point of view but created
some difficulties dealing with IPv4 addresses - the extra 3x of u32 padding
are costly, and the "holes" mean we can not use the smaller key-value
data structures for the lookup.
This commit changes the 5tuple layout for the IPv4 case, such that
the src/dst addresses directly precede the L4 information.
That will allow to treat the same data within 40x8 key-value
structure as a 16x8 key-value structure starting with 24 byte offset.
Change-Id: Ifea8d266ca0b9c931d44440bf6dc62446c1a83ec
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
lollita liu [Wed, 13 Jun 2018 09:14:02 +0000 (05:14 -0400)]
add end of string for format name in unix_physmem_region_alloc
Change-Id: I8cb4d5d90fb321de6e5037a3d0440507db79ec75
Signed-off-by: lollita liu <lollita.liu@ericsson.com>
Chris Luke [Wed, 13 Jun 2018 02:45:06 +0000 (22:45 -0400)]
cli: 'restart' should close open files (VPP-1068)
- On 'restart' close all registered files (except stdio) so that the
new process has a clean start; in particular, CLI sockets, API
sockets, tun/af_packet etc descriptors all need to close so they're
not left open but unused by the new VPP process. To do this we iterate
all the files registered for the polling mechanism and close() them.[1]
- While we're here, retain the original environment on 'restart';
several things make use of it.
[1] An alternative mechanism would be to mark all files with CLOEXEC
on opening; I think that is a little fragile for this fairly esoteric
use case.
Change-Id: I81b4e261c4d3c4e2948981231be899824dd4e69f
Signed-off-by: Chris Luke <chrisy@flirble.org>
Sirshak Das [Mon, 11 Jun 2018 16:40:17 +0000 (11:40 -0500)]
Fix clang compilation on aarch64: extraneous parentheses
Fixes clang error: equality comparison with extraneous parentheses
Changing all the #defines to inlines.
Change-Id: I30a931679ac3325b23b249b1ae28c7c8cf54b012
Signed-off-by: Sirshak Das<sirshak.das@arm.com>
eyal bari [Tue, 17 Apr 2018 08:20:27 +0000 (11:20 +0300)]
vxlan:offload RX flow
ip4 vxlan cli/api (using flow infra) to create flows and enable them on
different hardware (currently tested with i40e)
to offload a vxlan tunnel onto hw:
set flow-offload vxlan hw TwentyFiveGigabitEthernet3/0/0 rx vxlan_tunnel1
to remove offload:
set flow-offload vxlan hw TwentyFiveGigabitEthernet3/0/0 rx vxlan_tunnel1 del
TODO:ipv6 handling
Change-Id: I70e61f792ef8e3f007d03d7df70e97ea4725b101
Signed-off-by: Eyal Bari <ebari@cisco.com>
Jakub Grajciar [Mon, 11 Jun 2018 10:22:46 +0000 (12:22 +0200)]
avf: fix crash if device is busy
Change-Id: I170d78c8e5f7e16a264c9f226a09693109aece5e
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Florin Coras [Mon, 11 Jun 2018 20:15:11 +0000 (13:15 -0700)]
tcp: add close-wait state flags
Change-Id: I35508d5251633396393f52842d1b58bc1c1463f6
Signed-off-by: Florin Coras <fcoras@cisco.com>
Ole Troan [Tue, 12 Jun 2018 09:39:15 +0000 (11:39 +0200)]
MTU assigning to itself (Coverity)
Change-Id: Iee8de25ab3c68ae3698c79852195dc336050914c
Signed-off-by: Ole Troan <ot@cisco.com>
Mohsin Kazmi [Fri, 8 Jun 2018 14:57:33 +0000 (16:57 +0200)]
vom: Add support for af-packet dump
Change-Id: I0a1fc36ac29f6da70334ea3b5a5cf0e841faef76
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Florin Coras [Thu, 7 Jun 2018 00:55:02 +0000 (17:55 -0700)]
tcp: cleanup connection/session fixes
- Cleanup session state after last ack and avoid using a cleanup timer.
- Change session cleanup to free the session as opposed to waiting for
delete notify.
- When in close-wait, postpone sending the fin on close until all
outstanding data has been sent.
- Don't flush rx fifo unless in closed state
Change-Id: Ic2a4f0d5568b65c83f4b55b6c469a7b24b947f39
Signed-off-by: Florin Coras <fcoras@cisco.com>
Florin Coras [Sun, 10 Jun 2018 21:41:23 +0000 (14:41 -0700)]
udp: fix for multiple workers and add test
Since the main thread is not used for session polling anymore, when vpp
is started with multiple wokers, allocate connections on the first. Also
add a simple udp make test.
Change-Id: Id869f5d89e0fced51048f0384fa86a5022258b7c
Signed-off-by: Florin Coras <fcoras@cisco.com>
Ole Troan [Thu, 7 Jun 2018 08:17:57 +0000 (10:17 +0200)]
MTU: Software interface / Per-protocol MTU support
This patch separates setting of hardware interfaec and software
interface MTU. Software MTU is L2 payload MTU (i.e. not including L2
header). Per-protocol MTU for IPv4, IPv6 and MPLS can also be set.
Currently only IP4, IP6 are enabled in adjacency / rewrite code.
Documentation in src/vnet/MTU.md
Change-Id: Iee2fd6f0bbc8210748dd8e073ab9fab87d323690
Signed-off-by: Ole Troan <ot@cisco.com>
Alexander Chernavin [Fri, 8 Jun 2018 15:28:27 +0000 (11:28 -0400)]
Fix multiple NAT translation with interface address as external
Change-Id: Idd65c6d0489bf83984a2c34d22d3f94000fc7018
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Neale Ranns [Mon, 11 Jun 2018 01:01:49 +0000 (18:01 -0700)]
IGMP: use simple u32 bit hash key
some IGMP hashse use only a u32 key, which is not stored in the object, so don't use memory based hash
Change-Id: Iaa4eddf568ea0164bc2a812da4cc502f1811b93c
Signed-off-by: Neale Ranns <nranns@cisco.com>
Chris Luke [Sun, 10 Jun 2018 17:42:45 +0000 (13:42 -0400)]
cli: Disable XON/XOFF in the tty
- CLI history forward-search is bound to ^S which is common, but
that is also the tty's default control byte to pause output.
So we disable XON/XOFF in the tty so that we can use ^S.
Change-Id: I61717c77a11733d64eed7f8119677e7cd2e20029
Signed-off-by: Chris Luke <chrisy@flirble.org>