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>
Chris Luke [Wed, 6 Jun 2018 03:50:19 +0000 (23:50 -0400)]
cli: Fix reverse-line-wrap in terminals (VPP-1295)
- Terminals do not reverse-line-wrap when the cursor is at the left
edge and \b tries to make it go left.
- Instead, we have to track the cursor position if we need to emit \b's
and if we are at the left edge emit an ANSI sequence to relocate
the cursor. Previously we usually simply calculated the new cursor
position after a bunch of output had completed.
- Further trickiness is required since most xterm-like terminals also
defer moving the cursor to the next line when at the right edge[1], and
then if they receive a \b move the cursor back one character too many.
- This requires intricate reworking of everywhere that \b is emitted
by the CLI code during command line editing.
[1] Bash counters this issue by tracking the cursor position as output
is generated and forcing the cursor to the next line (by emitting
a space followed by \r) if it gets to this phantom cursor position);
here we effectively do that but only if the user tries to go left
when in this state.
Change-Id: I7c1d7c0e24c53111a5810cebb504ccfdac743086
Signed-off-by: Chris Luke <chrisy@flirble.org>
Florin Coras [Sat, 9 Jun 2018 13:49:59 +0000 (06:49 -0700)]
tcp: fix timer based recovery exit condition
Change-Id: I3f36e5760fd2935cc29d22601d4c0a1d2a22ba84
Signed-off-by: Florin Coras <fcoras@cisco.com>
Chris Luke [Sun, 10 Jun 2018 14:47:50 +0000 (10:47 -0400)]
cli: Fix off-by-one in the pager
- The last line in the pager buffer was sometimes missed when
using space/pg-dn; simple off-by-one error.
Change-Id: Id4e5f7cf0e5db4f719f87b9069d75427bc66d3f7
Signed-off-by: Chris Luke <chrisy@flirble.org>
Dave Barach [Sat, 9 Jun 2018 18:49:00 +0000 (14:49 -0400)]
Don't use foreach_vlib_main macro w/out barrier sync
It should be OK to scrape dispatch stats without forcing a barrier
sync. Scrape the stats manually. We'll see what happens.
Change-Id: Ia20b51ea12ed81cce76e1801401bad0edd0645bb
Signed-off-by: Dave Barach <dave@barachs.net>
Damjan Marion [Sat, 9 Jun 2018 13:11:52 +0000 (15:11 +0200)]
add script for virtual function create/show/remove
Change-Id: I151bc4269cb4d7e8572a6a676da20f69206d6c3f
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Sat, 9 Jun 2018 17:29:16 +0000 (19:29 +0200)]
Fix bug in vlib_buffer_free_from_ring_no_next
Change-Id: I332bb4578d1a3c79770985bf1f315d2ed823a3e5
Signed-off-by: Damjan Marion <damarion@cisco.com>
Florin Coras [Fri, 8 Jun 2018 16:17:39 +0000 (09:17 -0700)]
session: cleanup queue node tracing
Change-Id: Ib8e332174d96bf9cfa4bbaaa5b8d8bc9958424b1
Signed-off-by: Florin Coras <fcoras@cisco.com>
Damjan Marion [Sat, 9 Jun 2018 08:36:11 +0000 (10:36 +0200)]
avf: properly cofigure RSS LUT
Change-Id: I85cfab692ae0a72277ae561cdba7dcbc1f60aca3
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Sat, 9 Jun 2018 13:10:09 +0000 (15:10 +0200)]
avf: add support for intel X722 NICs
Change-Id: I3e07070eed4948e813ad1490963c7f8ef7f4262e
Signed-off-by: Damjan Marion <damarion@cisco.com>
Dave Barach [Wed, 6 Jun 2018 14:52:08 +0000 (10:52 -0400)]
Time range support for vppinfra
Change-Id: I2356b1e05fd868b46b4d26ade760900a5739ca4d
Signed-off-by: Dave Barach <dave@barachs.net>
Neale Ranns [Tue, 5 Jun 2018 01:41:24 +0000 (18:41 -0700)]
Add reaper functions to want events APIs (VPP-1304)
Change-Id: Iaeb52d94cb6da63ee93af7c1cf2dade6046cba1d
Signed-off-by: Neale Ranns <nranns@cisco.com>
Juraj Sloboda [Fri, 25 May 2018 12:02:20 +0000 (14:02 +0200)]
Implement DHCPv6 PD client (VPP-718, VPP-1050)
Change-Id: I72a1ccdfdd5573335ef78fc01d5268934c73bd31
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Florin Coras [Fri, 8 Jun 2018 09:02:13 +0000 (02:02 -0700)]
http server: do not close connections after reply
Change-Id: I7add46258fe44bc4d23d805ffc7eae75e37cab82
Signed-off-by: Florin Coras <fcoras@cisco.com>
Dave Barach [Fri, 1 Jun 2018 22:52:25 +0000 (18:52 -0400)]
export counters in a memfd segment
also export per-node error counters
directory entries implement object types
Change-Id: I8ce8e0a754e1be9de895c44ed9be6533b4ecef0f
Signed-off-by: Dave Barach <dave@barachs.net>
Neale Ranns [Fri, 8 Jun 2018 01:09:49 +0000 (18:09 -0700)]
Gratuitous ARP packet handling
only learn from a GARP packet if it is an update to an existing entry.
Change-Id: I4c1b59cfedb911466e5e4c9756cf53a6676e1909
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Vijayabhaskar Katamreddy [Thu, 7 Jun 2018 18:49:01 +0000 (11:49 -0700)]
Adding pad for reasm vnet_buffer reasm struct sothat adj_index is retained
Change-Id: Ib756c4f3e8caba1f77ef48b62a2a5d7283fe5016
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
Hongjun Ni [Thu, 7 Jun 2018 18:20:31 +0000 (02:20 +0800)]
LB: reply message id and table length are wrong.
Change-Id: Iea2c661cb3e0728bb2d10b06791ed84fed00f6a7
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
John Lo [Thu, 7 Jun 2018 16:00:43 +0000 (12:00 -0400)]
Fix IP scan neighbor API/CLI handling of interval and stale
Change-Id: I77264c4398e6fad461bb4dc10867a1f9c3accec0
Signed-off-by: John Lo <loj@cisco.com>
Damjan Marion [Thu, 7 Jun 2018 16:16:35 +0000 (18:16 +0200)]
dpdk: fix interface naming issue
... introduced with dpdk 18.05 support patch
Change-Id: Idf2283888f81d7652599651c0d65476e451f9343
Signed-off-by: Damjan Marion <damarion@cisco.com>
John Lo [Thu, 7 Jun 2018 16:46:24 +0000 (16:46 +0000)]
Revert "Allow arp-input node to learn IPv4 neighbors from GARP packets"
This reverts commit
d018870d1b02109fc8b328446f15312fdd2fcd11.
Change-Id: I700ade7a25ae5ed72cfed586e50b02492a4f11de
Signed-off-by: John Lo <loj@cisco.com>
Rui Cai [Fri, 11 May 2018 23:38:41 +0000 (23:38 +0000)]
dpdk: failsafe PMD initialization code
Added code to initialize failsafe PMD
This is part of initial effort to enable vpp running over
dpdk on failsafe PMD in Microsoft Azure(4/4).
Change-Id: Ia2469c7087ca4b5c7881dfb11ec5c4fcebaa1d04
Signed-off-by: Rui Cai <rucai@microsoft.com>
Neale Ranns [Wed, 16 May 2018 11:12:18 +0000 (04:12 -0700)]
DHCP Client Dump
- use types on the DHCP API so that the same data is sent in comfing messages and in dumps
- add the DHCP client dump API
- update VOM to refelct API changes
- rename VOM class dhcp_config* dhcp_client*
- the VOM dhcp_client class maintains the lease data (which it reads on a dump) for clients to read
Change-Id: I2a43463937cbd80c01d45798e74b21288d8b8ead
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Damjan Marion [Wed, 6 Jun 2018 12:23:42 +0000 (14:23 +0200)]
Add support for DPDK 18.05
Change-Id: I205932bc727c990011bbbe1dc6c0cf5349d19806
Signed-off-by: Damjan Marion <damarion@cisco.com>
John Lo [Thu, 7 Jun 2018 00:12:46 +0000 (20:12 -0400)]
Allow arp-input node to learn IPv4 neighbors from GARP packets
Change-Id: I86019f4ff9b0c8c633638fa23341d8ce49099ba6
Signed-off-by: John Lo <loj@cisco.com>
Ian Wells [Wed, 6 Jun 2018 13:12:27 +0000 (14:12 +0100)]
Alter logging semantics for VPP PAPI object
Logging previously used a string name for the log level and changed
the system-wide log level based on this string name. It now uses a
logging-module provided constant for the log level and changes its own
logger's level based on the name, and only if the level is provided.
This allows the logging to be more compatible with Pythonic usage,
where an external source may be used to dictate logging levels across
the system on a per module basis and should not be overridden.
Change-Id: Icf6896ff61a29b12c11d04374767322cdb330323
Signed-off-by: Ian Wells <iawells@cisco.com>
Steven [Tue, 5 Jun 2018 18:09:32 +0000 (11:09 -0700)]
bond: send gratuitous arp when the active slave went down in active-backup mode
- Modify the API send_ip6_na and send_ip4_garp to take sw_if_index instead
of vnet_hw_interface_t and add call to build_ethernet_rewrite to support
subinterface/vlan
- Add code to bonding driver to send an event to bond_process when the first
interface becomes active or when the active interface is down
- Create a bond_process to walk the interface and the corresponding
subinterfaces to send garp/ip6_na when an event is received.
- Minor cleanup in bonding/node.c
Note: dpdk bonding driver does not send garp/ip6_na for subinterfaces. There is
no attempt to fix it here. But the infra is now done and should be easy to
add the support.
Change-Id: If3ecc4cd0fb3051330f7fa11ca0dab3e18557ce1
Signed-off-by: Steven <sluong@cisco.com>
Andrey "Zed" Zaikin [Fri, 1 Jun 2018 12:39:54 +0000 (15:39 +0300)]
lb api: correct byte order of new_flows_table_length argument
Change-Id: I3ac348a8cb1a515dfe1839eaa084c87719d282e1
Signed-off-by: Andrey "Zed" Zaikin <zed.0xff@gmail.com>
Ole Troan [Mon, 4 Jun 2018 20:27:49 +0000 (22:27 +0200)]
VPP API: Memory trace
if you plan to put a hash into shared memory, the key sum and key
equal functions MUST be set to constants such as KEY_FUNC_STRING,
KEY_FUNC_MEM, etc. -lvppinfra is PIC, which means that the process
which set up the hash won't have the same idea where the key sum and
key compare functions live in other processes.
Change-Id: Ib3b5963a0d2fb467b91e1f16274df66ac74009e9
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Ole Troan <ot@cisco.com>
Jerome Tollet [Mon, 4 Jun 2018 15:40:26 +0000 (16:40 +0100)]
VPP-1305: Add support for tags
Change-Id: I9e759037295fe675abe426e565a562b1ec1e7d33
Signed-off-by: Jerome Tollet <jtollet@cisco.com>
Neale Ranns [Tue, 5 Jun 2018 00:10:18 +0000 (17:10 -0700)]
BIER CLI show commands; no crash on non-existant objects (VPP-1303)
DBGvpp# sh bier disp entry
DBGvpp# sh bier disp entry 0
No such BIER disp entry: 0
DBGvpp# sh bier disp table
DBGvpp# sh bier disp table 0
No such BIER disp table: 0
DBGvpp# sh bier disp table 11
No such BIER disp table: 11
DBGvpp#
DBGvpp# sh bier bift
no BIFT entries
DBGvpp# sh bier bift set 0
no BIFT entries
DBGvpp# sh bier bift set 0 sd 0 bsl 0
no BIFT entries
DBGvpp#
DBGvpp# sh bier fib
No BIER tables
DBGvpp# sh bier fib 0
DBGvpp# sh bier fib 0 4
DBGvpp# sh bier fmask
DBGvpp# sh bier fmask 2
No BIER f-mask 2
DBGvpp# sh bier imp
DBGvpp# sh bier imp 0
No such BIER imposition: 0
Change-Id: Ibadac3441dd8a6d1b96bd9ee4358e28498875b95
Signed-off-by: Neale Ranns <nranns@cisco.com>
Dave Barach [Tue, 29 May 2018 21:06:45 +0000 (17:06 -0400)]
Configure or deduce CLIB_LOG2_CACHE_LINE_BYTES (VPP-1064)
Added configure argument "--with-log2-cache-line-bytes=5|6|7|auto"
AKA 32, 64, or 128 bytes, or use the inferred value from the build host.
produces build-xxx/vpp/vppinfra/config.h, which .../src/vppinfra/cache.h
Kernels which implement the following pseudo-file (aka x86_64) are
easy: /sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size
Otherwise, extract the cpuid from /proc/cpuinfo and map it to the
cache line size.
Change-Id: I7ff861e042faf82c3901fa1db98864fbdea95b74
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Nitin Saxena <nitin.saxena@cavium.com>
Florin Coras [Fri, 1 Jun 2018 19:22:23 +0000 (12:22 -0700)]
ip4: optimize ip4_local
"sh run" says the number of clocks for my tcp based throughput test
dropped from ~43 to ~23
Change-Id: I719439ba7fc079ad36be1432c5d7cf74e3b70d73
Signed-off-by: Florin Coras <fcoras@cisco.com>
Milan Lenco [Fri, 4 May 2018 07:00:18 +0000 (09:00 +0200)]
Fix API trace dump for tapv2
Change-Id: Ib092da61ba037ea30c6f38ea692ef9f1ca0cd8e7
Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
Neale Ranns [Mon, 4 Jun 2018 08:27:25 +0000 (04:27 -0400)]
Remove unused GRE buffer meta-data
Change-Id: Ia8ef019742c13b1149916d51796cad6f50687162
Signed-off-by: Neale Ranns <nranns@cisco.com>
Eyal Bari [Thu, 31 May 2018 08:30:16 +0000 (11:30 +0300)]
flow:add enabled hw format function
Change-Id: Ide1f76e9207b6022d5258a119f8d59cca85651b5
Signed-off-by: Eyal Bari <ebari@cisco.com>
Florin Coras [Fri, 1 Jun 2018 19:22:23 +0000 (12:22 -0700)]
ip: save fib index for buffer in ip lookup
Avoids recomputing the fib index in ip local for locally delivered
packets and should incur no extra cost when forwarding packets.
Change-Id: Id826ffa8206392087327f154337eabc8a801b4d7
Signed-off-by: Florin Coras <fcoras@cisco.com>
Jerome Tollet [Mon, 4 Jun 2018 07:31:33 +0000 (08:31 +0100)]
fix usage string missing arg
Change-Id: I9710e9ed6ceff6c0b2de0bcf77f355762df88b58
Signed-off-by: Jerome Tollet <jtollet@cisco.com>
Neale Ranns [Mon, 4 Jun 2018 04:21:19 +0000 (21:21 -0700)]
Join the VAC read timeout thread
Change-Id: I5bcbae276f8ac23718c5afc859da222508d07ad7
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Neale Ranns [Fri, 1 Jun 2018 04:03:17 +0000 (00:03 -0400)]
Enable Position Independent Executable for production VPP
Change-Id: I0f81423b854be1dc456df696416e5f3747393208
Signed-off-by: Neale Ranns <nranns@cisco.com>
Damjan Marion [Sun, 3 Jun 2018 12:29:42 +0000 (14:29 +0200)]
dpdk: buffer free optimizations
~5 clocks/packet improvement...
Change-Id: I1a78fa24dcd1b3ab7f45e10b9ded50f79517114a
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Sat, 2 Jun 2018 18:42:07 +0000 (20:42 +0200)]
dpdk: improve buffer alloc perfomance
This is ~50% improvement in buffer alloc performance.
For a 256 buffer allocation, it was ~10 clocks/buffer, now is < 5 clocks.
Change-Id: I97590e240a79a42bcab5eb26587fc2d11e6eb163
Signed-off-by: Damjan Marion <damarion@cisco.com>
Neale Ranns [Fri, 1 Jun 2018 04:23:37 +0000 (21:23 -0700)]
Interface Tag: memset field in VOM, clear the tag in VPP on interface delete
Change-Id: Id97de732b5952d5d86202e7749c9e81cf8dbed87
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Damjan Marion [Wed, 30 May 2018 10:49:32 +0000 (12:49 +0200)]
AVF input node rework
Change-Id: Ib121b24935d5c706cfba6e4b6d321086a38cad91
Signed-off-by: Damjan Marion <damarion@cisco.com>
Andrew Yourtchenko [Wed, 30 May 2018 20:29:29 +0000 (22:29 +0200)]
acl-plugin: multicore: session management fixes
- implement a 1us purgatory for the session structures
by adding a special connection list, where all connections
about to be deleted go.
- add per-list-head timeouts updated upon the list enqueue/dequeue
for connection idle management
- add a "unused" session list with list ID#0, which should
never be used unless there is a logic error. Use this ID
to initialize the sessions.
- improve the maintainability of the session linked list
structures by using symbolic bogus index name instead of ~0
- change the ordering of session creations - first reverse, then
local. To minimize the potential for two workers competing for
the same session in the corner case of the two packets
on different workers creating the same logical session
- reduce the maximum session count to keep the memory usage the same
- add extra log/debug/trace to session cleaning logic
- be more aggressive with cleaning up sessions - wind up the
interrupts from the workers to themselves if there is more
work to do
Change-Id: I3aa1c91a925a08e83793467cb15bda178c21e426
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Florin Coras [Fri, 1 Jun 2018 00:14:10 +0000 (17:14 -0700)]
session: improve disconnect handling
If the caller is the session owning thread or the main thread with a
worker barrier sync (cli/api) add an event to the pending disconnects
vector in the session node and entirely avoid using the event queue.
Useful for bursts of disconnects (like an app detach).
If disconnects come from a processes, be willing to retry enqueueing the
disconnect to the event queue multiple times.
Change-Id: Ieece1f1091b713f94c41c703b6e805bc8498816a
Signed-off-by: Florin Coras <fcoras@cisco.com>
John Lo [Thu, 31 May 2018 14:25:18 +0000 (10:25 -0400)]
Improve L2FIB delete entry handling and "show l2fib" CLI options
Improve deletion of L2FIB MAC entry using l2fib_add_del API. If
sw_if_index param specified in th API is non-zero, check that its
value match that of the MAC entry to proceed with deletion.
Improve "show l2fib" CLI to allow display of all entries, learned
entries only, or added ovia CLI/API entries only. For added entry,
show "no" under the age column to indicate entry does not age.
Change-Id: I0bd2582c2b6bac268e551e4f8ca6dab2be4400ad
Signed-off-by: John Lo <loj@cisco.com>
Rui Cai [Fri, 11 May 2018 22:55:33 +0000 (22:55 +0000)]
dpdk: Decoupling the meaning of xd->device_index in dpdk_plugin
Prior to the change, dpdk plugin assumes xd->device_index is
used both as index for internal dpdk_main->devices array
and DPDK port index to call into DPDK APIs.
However, when running on top of Failsafe PMDs,
DPDK port index range may no longer be contiguous (as noted:
http://dpdk.org/ml/archives/dev/2018-March/092375.html
for related changes in DPDK). Because this, dpdk plugin can
no longer iterate through all available DPDK ports
with a for 0->rte_eth_dev_count() loop and the assumption of
device_index no longer holds.
This is part of initial effort to enable vpp running over
dpdk on failsafe PMD in Microsoft Azure(3/4).
Change-Id: I416fd80f2d40e12e139f8f3492814da98343eae7
Signed-off-by: Rui Cai <rucai@microsoft.com>
Ping Yu [Thu, 31 May 2018 18:01:04 +0000 (14:01 -0400)]
Fix TLS issue to load certification and key
Change-Id: If1ef2d4bc6f90a4d4b6a345c63723117834c6504
Signed-off-by: Ping Yu <ping.yu@intel.com>
qchang [Wed, 30 May 2018 18:44:18 +0000 (11:44 -0700)]
fix socket send() return size check
Change-Id: I098c671607c75cb34d04f421b4d16b73f7b47392
Signed-off-by: qchang <qing.chang1@huawei.com>
Zhiyong Yang [Thu, 31 May 2018 02:12:57 +0000 (22:12 -0400)]
fix missing void pointer explicit type cast
Change-Id: I5098e5d966abc44db045783883424b63083f08ee
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Ole Troan [Wed, 30 May 2018 20:43:25 +0000 (22:43 +0200)]
VPP-1299: Reset uid/gid on shared memory segment if client starts first.
Change-Id: I2b5bc7d864f8829e1dff63fec3c9484078601309
Signed-off-by: Ole Troan <ot@cisco.com>
Damjan Marion [Wed, 30 May 2018 07:55:05 +0000 (09:55 +0200)]
Add src/vlib/config.h.in template
Change-Id: I9b81dcb9250cab09b88f161366da9475a7ee5dd6
Signed-off-by: Damjan Marion <damarion@cisco.com>