4491 Commits

Author SHA1 Message Date
Klement Sekera
8dcfed5da8 reassembly: optimize bihash usage
Change-Id: I19690db9996ecb8c5e86415d2fd3c7133ce698f8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-06-28 13:50:13 +00:00
Damjan Marion
08bca80c99 ip: vectorized ip checksum
Change-Id: Ida678e6f31daa8decb18189da712a350336326e2
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-28 10:00:05 +00:00
Florin Coras
0d427d8d8a vcl: refactor debugging
Change-Id: I82e5239239ea24bdc97b1d59946ca0bba739f248
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-27 10:14:25 -07:00
Dave Barach
0654dcc7b9 Tune pool_get / pool_put
Stop spending cycles repeatedly tail-trimming the pool free element
bitmap; possibly at the expense of slightly hurting pool_foreach
peformance.

Change-Id: I8a7f3e7b26c71d7496ba9393b2a167dc7f538355
Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-27 20:51:08 +00:00
Florin Coras
6e74aa2b98 acl: fix for loop initial declaration
Change-Id: Ie899ccbaae4df7cce4ebbba47ed6c3cce5269bdb
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-27 02:05:31 -07:00
Jakub Grajciar
6c9b964445 avf: binary API and configurable RX/TX queue size
Change-Id: Ibd3a8d28d8f1df2bc14c42e48498f6ac26081192
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-06-27 16:16:28 +00:00
Marco Varlese
99d7a72cbc gcc8 and Wstringop-truncation
gcc8 introduced a new warning (Wstringop-truncation) which in our case
is being treated as error.
Disabling the warning globally might introduce bugs related to string
truncation which are not desired by the developer (e.g. bug).
Instead, this patch disables the warning only for those occurences
which have been verified to be non-bugs but the desired behaviour as per
developer will.

Change-Id: I0f04ff6b4fad44061e80a65af633fd7e0148a0c5
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-06-27 15:29:47 +00:00
Marek Gradzki
c5ee4fd4aa jvpp: cleanup generation of swap functions for custom types
Change-Id: I2d06890ba25cfae9f96e820086f228286c807b42
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-06-27 13:38:43 +00:00
Klement Sekera
bbfa5fdf52 make test: easy profiling via make test PROFILE=1
Change-Id: Ib845578485f523b7f14e98c83d05f78db382ecde
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-06-27 13:37:32 +00:00
Marek Gradzki
5b3d95bb32 jvpp: add support for unions (VPP-1322)
Change-Id: I2456a9b03bcae43793f9ac29eb74eff81269df7b
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-06-27 12:59:31 +00:00
Damjan Marion
bf129f458f vppinfra: add vector horizontal add and byte swap (SSE4.2 & AVX2)
Change-Id: I4e0fd487970796f0153a5b16333827d23b57deac
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-27 12:59:11 +00:00
Andrew Yourtchenko
2d11e9f4b9 acl-plugin: tm: avoid hash calculation dependency on a memory store operation
A small store into a middle of a larger structure that was subsequently
loaded for calculating the bihash key was noticeably impacting the performance.

Change-Id: If7f33e1b66e8b438ba7cc91abc0ca749850c6e45
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-06-27 11:46:50 +00:00
Andrew Yourtchenko
2e0798f90d 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>
2018-06-27 11:46:28 +00:00
Florin Coras
b26743d093 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>
2018-06-26 10:55:26 -07:00
Damjan Marion
23cdd4c3d7 dpdk: display rx/tx burst function name in "show hardware detail"
Change-Id: I6fa4c6bf9c4e96ba4502a06907bdecc654ace665
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-26 21:05:52 +00:00
Sirshak Das
536953d529 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>
2018-06-26 21:02:52 +00:00
Hongjun Ni
79c38af0fd 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>
2018-06-26 19:54:12 +00:00
Florin Coras
352c2c40c7 tcp: avoid doing work in tcp_rcv_sacks for no sacks
Change-Id: I00a0d7f57dc144d338d5ad45b0a6e3720c32c400
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-26 18:17:17 +00:00
Matus Fabian
235a47e371 NAT44: fix nat44_ed_not_translate_output_feature (VPP-1329)
Change-Id: Iddb0b848c53da03116524e203c7112c82b401ac5
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-06-26 18:06:26 +00:00
Marco Varlese
6c78436370 Update to latest stable DPDK release (18.02.2)
Change-Id: I00b0e4d7f7b597760a898c895b1a80bfac3a47fb
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-06-26 17:30:13 +00:00
Damjan Marion
2574d9f41a node functions cannot be always_inline
Thanks to gcc-8 for highlighting this...

Change-Id: I53bfab631a40fd1b680c76a48b0307a33fa2b154
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-26 15:15:15 +00:00
Damjan Marion
13c98a2b22 We don't have (yet) 128-bit unaligned load/store on ARM
Change-Id: I16395bbf843e338cdd366d85bb4df3de95d9b265
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-26 15:11:22 +00:00
Kingwel Xie
497deaf72f 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>
2018-06-26 15:02:16 +00:00
Hongjun Ni
6fb0d9b269 L3DSR fix ip checksum issue and add test
Change-Id: Iedebbac71d3e694b915d6a126c80ecc3b5473a4a
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-06-26 14:56:30 +00:00
Andrew Yourtchenko
8d2e9bd8d8 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>
2018-06-26 13:35:24 +00:00
Jan Gelety
d16ba6295b Add negative tests for leaking across different VRFs - ip4/6
Jira: CSIT-1140

Change-Id: I5c6dd44d3efb298f203e61b14345a2f13680bd34
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-06-26 13:09:46 +00:00
John Lo
a56f270987 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>
2018-06-26 12:53:36 +00:00
Florin Coras
0dbd517134 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>
2018-06-26 12:10:13 +00:00
Damjan Marion
32ab95426d SIMD optimized linear search in clib_bitmap_first_set
Change-Id: Ib3a55598a83cc99485b40e38e7c406ecb126fd42
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-26 12:08:02 +02:00
John Lo
0131b6c438 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>
2018-06-25 22:46:14 +00:00
Florin Coras
adb5bd5344 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>
2018-06-25 20:43:44 +00:00
Sachin Saxena
c474feea96 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>
2018-06-25 20:22:53 +00:00
Andrew Yourtchenko
f124c34b61 acl-plugin: remove the noisy debug output
Change-Id: I6a3cfcb24f5027ec0f2cd2ec21ea47a01fef331b
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-06-25 20:20:51 +00:00
Ole Troan
381e9a9074 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>
2018-06-25 20:19:40 +00:00
Dave Wallace
e4d5a652a3 VCL: Refactor VCL test (part 1)
Change-Id: I6a326e24ed953b1cef63bd4010a3bedd6c4a7b1c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-06-25 20:11:05 +00:00
Klement Sekera
4c5422ee52 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>
2018-06-25 14:19:57 +02:00
Klement Sekera
beaded5e0c make test: fix broken interfaces #2
Change-Id: I9d5b5d925fd2c09a1113fc51e433a16d729a241b
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-06-25 13:19:26 +02:00
Klement Sekera
b9ef2739dd Revert "Revert "make test: fix broken interfaces""
This reverts commit c8efa29b6f9a91381897b54f1147daf922ed7164.

Change-Id: I1d5c5773d5f86a63073e255336bd9de628e26179
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-06-24 22:53:37 +02:00
Klement Sekera
31da2e3031 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>
2018-06-24 22:53:37 +02:00
Dave Barach
2a8d02df15 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>
2018-06-23 23:49:33 +00:00
Ole Troan
e0d2bd6bd7 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>
2018-06-22 22:37:55 +02:00
Ole Troan
c8efa29b6f Revert "make test: fix broken interfaces"
This reverts commit d5c60b96a3fd93916fc4af5c8d6d25625c28242e.

Change-Id: I3632b9c3f76c615aee897f28f76d094e7031e689
Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-22 22:34:56 +02:00
Klement Sekera
d5c60b96a3 make test: fix broken interfaces
Change-Id: I2e092774f81503e04b53cc6c6b5d357fe3fc52ab
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-06-22 16:20:47 +00:00
Marek Gradzki
3e2d57d877 jvpp: add support for enums (VPP-1153)
Change-Id: I2a1b946a71419e1fb3c5d70567c54a6a7d841f10
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-06-22 09:27:47 +00:00
Florin Coras
9679c81b64 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>
2018-06-22 07:31:29 +00:00
Marek Gradzki
02c88e4179 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>
2018-06-22 07:03:06 +00:00
Ole Troan
a7564e8004 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>
2018-06-22 03:00:45 +00:00
Ian Wells
d600ffe13a 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>
2018-06-22 02:59:35 +00:00
Eyal Bari
cef1e2a8b4 test:vxlan over ipv6 tests
Change-Id: Id910db0e3a07ecc6f469e2f0d1e97f39ba48cc60
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-06-21 19:21:36 +00:00
Jessica Tallon
e513f98f5b VPP-1042: Fix the DPDK no-hugetbl flags
Change-Id: I7c611d3fa7fabe82294fc22a61d5a3927a2da39d
Signed-off-by: Jessica Tallon <tsyesika@igalia.com>
2018-06-21 14:58:19 +00:00