4451 Commits

Author SHA1 Message Date
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
Dave Barach
85aa49019f 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>
2018-06-21 14:57:02 +00:00
Igor Mikhailov (imichail)
cb3b705235 FastLinQ QL41000 Series PCI vendor and device ids
Change-Id: I23caebf602e3e6ff45fdec106a0da88f6de7a284
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2018-06-21 14:54:52 +00:00
Klement Sekera
a98346f664 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>
2018-06-21 14:50:10 +00:00
Dave Barach
56ba844d6a Null terminate name string
Change-Id: If7bcc6ae3358b5e39bf76481ee58f4dbaa53d895
Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-21 14:34:55 +00:00
Florin Coras
4df3871a98 tcp: move tracing out of established loop
Change-Id: I4a7e4f616ed4a4df82be3112ac4702f7e4e2025c
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-21 11:34:49 +00:00
Juraj Sloboda
dd3b8f7ab9 Implement DHCPv6 IA NA client (VPP-1094)
Change-Id: I682a47d6cf9975aca6136188d28ee93eaadf4fe3
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-06-21 10:03:03 +00:00
Marek Gradzki
65ce94a1dc jvpp: do not fail on type parsing error
skip the type instead.

Change-Id: I533c8e13c1b2d05c1ddc6dc36427bac010d7c19a
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-06-21 07:45:54 +00:00
Neale Ranns
586479a731 BIER neighbor stats
Change-Id: I2f638f1932b4aeddf2408c06d1b8393551675b72
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-06-21 07:44:37 +00:00
Radu Nicolau
0c58ad4045 dpdk/ipsec: add support for UDP encap/decap
Change-Id: I024c1d398fcb51e5a20f9049d16a87b3b1ba0c20
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
2018-06-21 07:40:33 +00:00
Marek Gradzki
382daf67f3 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>
2018-06-21 07:38:34 +00:00
Andrew Yourtchenko
b53f4d0e18 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>
2018-06-21 07:37:56 +00:00
Dave Barach
a6726b59f1 Nested-loop index typo. Oops.
Change-Id: I73b5a4adcfce0d7cd1dd4cf6d9d6a5fb25256bcf
Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-20 16:37:23 +00:00
Florin Coras
2c4144367c tcp: add per worker ctx structure
Change-Id: I28d3c31bdc4255a4ca223d80bcf44709fb39f4ed
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-20 16:18:44 +00:00
Klement Sekera
ee52d877d4 ipsec: VPP-1308 fix sorting of SPD entries
Change-Id: I761aced55b7cef51a9b47048283b2cb9430bcde2
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-06-20 15:36:56 +00:00
Andrew Yourtchenko
22f9fb1286 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>
2018-06-20 13:37:21 +00:00
Brant Lin
285434a858 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>
2018-06-20 05:25:21 +00:00
Dave Wallace
d239f8d163 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>
2018-06-19 22:15:57 +00:00
Dave Barach
7055e26952 Driver level time-based src mac filter
Change-Id: I062d7653e00d77e73a61d8841e01ab4a159b6404
Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-06-19 22:09:46 +00:00
Florin Coras
8b20bf5ef7 tcp: optimize tcp output
Change-Id: Idf17a0633a1618b12c22b1119e40c2e9d3192df9
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-19 22:08:34 +00:00
Florin Coras
0c8a3bc95d tcp: optimize tcp input
Change-Id: Ib98cfc93f6c574de5250f251925f7ed4e86f5f6f
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-19 22:08:21 +00:00
John Lo
084606befb 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>
2018-06-19 21:26:10 +00:00
Dave Wallace
7e607a7389 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>
2018-06-19 19:35:44 +00:00
Dave Barach
c6215d902f 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>
2018-06-19 18:47:11 +00:00
Pablo Camarillo
3337bd2200 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>
2018-06-19 16:32:11 +00:00
eyal bari
2b9838ac60 flow:free lookup entries after packets are handled
Change-Id: I737dad64bf6dd0743d36500d5cfa1cb1a6594b98
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-06-19 16:22:07 +00:00
Ole Trøan
61debaaaf2 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>
2018-06-18 18:30:09 +00:00
Ole Troan
a5ee900fb7 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>
2018-06-17 15:21:00 +00:00
Matthew Smith
76440d9033 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>
2018-06-17 12:32:54 +00:00
Andrew Yourtchenko
a0dfa8b158 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>
2018-06-17 12:07:11 +00:00
Andrew Yourtchenko
e0b6c8a96d 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>
2018-06-17 12:05:55 +00:00
Matus Fabian
c1c5baa1a9 NAT44: fix coverity
Change-Id: Ib1e4563dbc027571c77497e5c190201713adc72b
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-06-16 19:29:06 +00:00
Ole Troan
e906aacc10 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>
2018-06-15 12:16:32 +00:00
Ole Troan
1ec0ea85c3 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>
2018-06-15 12:07:40 +00:00
Damjan Marion
c22f87b876 avf: tx node fixes
- missing RSV bit set in descriptor
- wrong buffer offset

Change-Id: I8b138266652a30a50e4541c6344e4fe3dec4d1ca
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-15 09:48:36 +00:00
Juraj Sloboda
d9778c2b19 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>
2018-06-15 09:34:44 +00:00
Matus Fabian
a6110b6ea5 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>
2018-06-15 06:53:24 +00:00
Ping Yu
e43832c7e7 TLS async support
Change-Id: I26194e00dfb85e5cd1c65ff4e6ffd665be2d719b
Signed-off-by: Ping Yu <ping.yu@intel.com>
2018-06-15 01:30:23 +00:00
Matthew Smith
d465631c3c 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>
2018-06-14 18:56:16 +00:00
Dave Barach
1f806587d8 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>
2018-06-14 18:52:47 +00:00
Andrew Yourtchenko
abcddcbcab 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>
2018-06-14 17:38:53 +00:00