Neale Ranns [Tue, 20 Feb 2018 14:25:02 +0000 (06:25 -0800)]
Adj Delegates; don't store raw pointers
... you'd think I'd have leanred by now...
Change-Id: I65c54feb2ec016baa07ed96c81ab8f60277c3418
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Steve Shin [Tue, 20 Feb 2018 19:38:34 +0000 (11:38 -0800)]
Fix reset the vlan flags when main interface is deleted.
The dot1q_vlans & dot1ad_vlans should be reset to 0 when main interface
is deleted. Otherwise, VPP will crash if the same interface index is reused
without attaching the sub interface on it.
Change-Id: I484d4a8892ff4241a3a32b22189746193d5f2594
Signed-off-by: Steve Shin <jonshin@cisco.com>
Marco Varlese [Mon, 19 Feb 2018 14:23:13 +0000 (15:23 +0100)]
SCTP: congestion control
This patch addresses the requirements depicted by section 7.1.1 and
7.1.2 of the RFC 4960. Specifically, it implements the Slow-start and
Congestion-avoidance policies.
The patch also took care of correctly implementing some 'formatting'
functions required - for instance - in packet(s) tracing.
Change-Id: I68eade1b30345de3acb3ac8a653a5ef76eb6d2ac
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Damjan Marion [Tue, 20 Feb 2018 11:34:40 +0000 (12:34 +0100)]
vppinfra: autogerate vector typedefs and basic inline functions
Change-Id: Ie9f611fa6a962b0937245f5cc949571ba11c5604
Signed-off-by: Damjan Marion <damarion@cisco.com>
Dave Barach [Tue, 20 Feb 2018 13:34:48 +0000 (08:34 -0500)]
Reset expired timer vector length after callback
Otherwise, in a "catch-up / multiple tick" case, the code will repeatedly
hand previously-processed expired timer handles to the user callback.
Change-Id: Idef4f242279ea41cb557bb6cff5984de02a6503d
Signed-off-by: Dave Barach <dave@barachs.net>
Keith Burns (alagalah) [Fri, 16 Feb 2018 16:20:56 +0000 (08:20 -0800)]
vppcomm refactor
- server_[tx|rx]_fifo renamed to [tx|rx]_fifo
- is_cut_thru etc no longer required, vpp session layer works it out
- logic to flip tx/rx fifos in vppcom no longer required
- allocation of memory in vppcom no longer required (if(0) at moment for testing)
- clean up of some uneeded vars
- fixstyle
Change-Id: I266561a6e4b08edb875c98582b22616c295d5a81
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
Damjan Marion [Tue, 20 Feb 2018 07:33:50 +0000 (08:33 +0100)]
vppinfra: CLIB_HAVE_VEC128 mandates SSE4.2
Change-Id: I6511110d0472203498a4f8741781eeeeb4f90844
Signed-off-by: Damjan Marion <damarion@cisco.com>
Dave Wallace [Fri, 16 Feb 2018 23:31:56 +0000 (18:31 -0500)]
make test: Add VPP VCL cut-thru test.
Change-Id: Id3ec196bfeb90b141123adee97f15d9712351680
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Nitin Saxena [Fri, 16 Feb 2018 11:21:38 +0000 (11:21 +0000)]
dpdk: Fix MTU calc for NICs that support mtu<9216
Problem: rte_eth_dev_set_mtu() returns with failure from ThunderX NICVF
DPDK PMD driver which supports MTU less than ETHERNET_MAX_PACKET_BYTES.
rte_eth_dev_set_mtu() being called twice from dpdk_lib_init(): one via
dpdk_device_setup() and second in dpdk_lib_init() itself. Currently
dpdk_lib_init() passes vnet_hardware_interface->max_packet_bytes as an
argument to rte_eth_dev_set_mtu() without consulting dev_info.max_rx_pktlen.
NICs like i4oe, ixgbe can support MTU much greater than 9216 hence its not
a problem for those NICS.
Fix: This patch calculates dpdk_device->port_conf.rxmode.max_rx_pkt_len,
vnet_hardware_interface->max_packet_bytes and MTU by consulting
dev_info.max_rx_pktlen.
Change-Id: If04bbfae49ee971dac0063ff1835e4a9c3087865
Signed-off-by: Nitin Saxena <nitin.saxena@cavium.com>
Damjan Marion [Mon, 19 Feb 2018 11:14:06 +0000 (12:14 +0100)]
Use neutral vector code for ethernet_frame_is_tagged
Also it removes ethernet_frame_is_any_taged implemebntation
which seems to be equally costly compared to two
invocations of ethernet_frame_is_tagged.
Change-Id: If1c95f8267cd34b807ec07e0d675cbd0db2fdf9f
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Fri, 16 Feb 2018 15:13:32 +0000 (16:13 +0100)]
virtio: add missing tx lock when running multithreaded
Change-Id: I373f429c53c6f66ad38322addcfaccddb7761392
Signed-off-by: Damjan Marion <damarion@cisco.com>
Dave Wallace [Fri, 16 Feb 2018 23:26:11 +0000 (18:26 -0500)]
VCL: config api prefix using env var.
- Configure vpp api prefix using VCL_API_PREFIX
environment variable.
- Prepend api prefix to vpp api filename when
connecting to vpp.
- Fix stale vcl_cfg ptr after heap allocation.
- Cleanup misleading warning messages wrt.
reading the vcl config file.
Change-Id: I908c9b567ff4f6f0c21ae43a4627a1a3202a3290
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Damjan Marion [Fri, 16 Feb 2018 08:07:42 +0000 (09:07 +0100)]
dpdk: bump to 18.02
Change-Id: I3764f57a4b8df96d6bd20753b86fc0119d833bd9
Signed-off-by: Damjan Marion <damarion@cisco.com>
Neale Ranns [Mon, 19 Feb 2018 10:36:19 +0000 (02:36 -0800)]
Adjacency Delegate updates
- Register new type (for use from puglins)
- Memory for delegate is provided by delegate provider
Change-Id: I5ece86b1fe84e3028a5c853871476c4ba015b2eb
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Mohsin Kazmi [Wed, 14 Feb 2018 14:47:19 +0000 (15:47 +0100)]
VOM: acl: Some necessary fixes
It:
1. changes ethertype_rule_t to hold actual objects instead of
reference to them.
2. fixes acl_ethertype 'update' function
3. fixes pretty-print of acl-list-update.
4. adds l3-acl update unit test.
Change-Id: Iec72212806e96bd0574b46b563de79f0744cb248
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Damjan Marion [Sat, 17 Feb 2018 13:06:53 +0000 (14:06 +0100)]
vlib: fix pci init
Change-Id: I2b8c1ad5c594aeca5dc44647ab8f8061362c9284
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Sat, 17 Feb 2018 13:05:08 +0000 (14:05 +0100)]
fix format_hexdump
Change-Id: I9710be2e722d716e22d989b3417fb49d2db0848a
Signed-off-by: Damjan Marion <damarion@cisco.com>
Klement Sekera [Sat, 17 Feb 2018 12:41:33 +0000 (13:41 +0100)]
make test: add test framework debugging
New option TEST_DEBUG=1 turns on test framework debugging, which
currently consists of printing difference in allocated objects/memory
and also creates reference graphs for any unfreed VppPapiProvider/VPP
objects - these take a lot of memory and thus should be freed regularly.
Change-Id: I29db0c1341009d4b5c5df9222d14f3095883fd0f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Klement Sekera [Fri, 16 Feb 2018 18:25:06 +0000 (19:25 +0100)]
make test: detect child crash
This change causes parent process to detect child crash in seconds
instead of waiting for timeout to pass.
Change-Id: Ib45e86b7fc97e687d99c554be4212aaeea781dcc
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Klement Sekera [Sat, 17 Feb 2018 10:10:30 +0000 (11:10 +0100)]
vpp_papi: remove legacy way of calling VPP APIs
This allows VPP to define APIs which conflict with internal
function names used in vpp_papi without issues.
Change-Id: I56c21814e1c11fa2aa6bcd95adb3fdeacd304e8e
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Klement Sekera [Sat, 17 Feb 2018 09:58:37 +0000 (10:58 +0100)]
vpp_papi: reduce memory leaks
This changes makes unused VPP objects collectable by garbage collector,
allowing running all `make test` tests again instead of python crashing
due to running out of memory.
Change-Id: I0e271c2b3f195d9d3b64840f9f11144da0fe967d
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Marco Varlese [Thu, 15 Feb 2018 16:01:56 +0000 (17:01 +0100)]
SCTP: 'multi-home' support
This patch addresses the SCTP requirement for multiple sub-connections
to implement the so called 'multi-homed' scenario.
Change-Id: Ibce18f216e9d2bebe318992c441bf278e16aad17
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Jon Loeliger [Fri, 16 Feb 2018 15:55:30 +0000 (09:55 -0600)]
memif: VPP-1172: Ensure memif_create reply contains sw_if_index
Change-Id: If5cd2e913770adac4e7320f54584da63012f925d
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Ole Troan [Thu, 15 Feb 2018 15:14:56 +0000 (16:14 +0100)]
Adj: VFTs for adjacency sub-blocks
Change-Id: I85602b0178315023bb512babdd5b7dd4263a322d
Signed-off-by: Ole Troan <ot@cisco.com>
Neale Ranns [Fri, 16 Feb 2018 10:44:05 +0000 (02:44 -0800)]
Allow providers to override glean behaviour
and update glean address on local interface MAC change
Change-Id: I530826d60c7e9db2b0fa2d45754139d82c5ea807
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
John Lo [Thu, 15 Feb 2018 20:47:53 +0000 (15:47 -0500)]
Minor VXLAN/GRE Tunnel Encap Optimization and Cleanup
Change-Id: I62a2a6524b72115a4239fbd7dc9ac8fdc35e20ed
Signed-off-by: John Lo <loj@cisco.com>
John DeNisco [Tue, 6 Feb 2018 20:23:05 +0000 (15:23 -0500)]
Add iperf VM/vhost creation
Change-Id: I27a59203f406120558f73bfcc12dca8835ae6361
Signed-off-by: John DeNisco <jdenisco@cisco.com>
Keith Burns (alagalah) [Thu, 15 Feb 2018 15:52:50 +0000 (07:52 -0800)]
VPP modified some state checking logic
Change-Id: I5daff79a31f2db33ed55edd54ce043a61f6c6209
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
Florin Coras [Thu, 15 Feb 2018 15:29:49 +0000 (07:29 -0800)]
session: fix fifo allocation for empty connect seg-managers
Change-Id: Ibc5b1149f3fbbe3dfe1f069ab69bfed7de660582
Signed-off-by: Florin Coras <fcoras@cisco.com>
Ole Trøan [Thu, 15 Feb 2018 21:56:06 +0000 (21:56 +0000)]
Revert "Allow interface types to override glean adjacency behaivour"
This reverts commit
8b30e471df4d42214619e1d6c50cc8298426b45f.
Change-Id: I99edb236eb0a7f8ba3fba333c3481a710ebcb59c
Signed-off-by: Ole Troan <ot@cisco.com>
Ole Trøan [Thu, 15 Feb 2018 22:02:01 +0000 (22:02 +0000)]
Revert "Adj: VFTs for adjacency sub-blocks"
This reverts commit
a44b015aa012d3b07ed873925d47c6d5955b7dd2.
Change-Id: I2d76bc0844f58e5ddf3f3a4326b86076f46e3751
Signed-off-by: Ole Troan <ot@cisco.com>
Ole Troan [Thu, 15 Feb 2018 15:14:56 +0000 (16:14 +0100)]
Adj: VFTs for adjacency sub-blocks
Change-Id: I19390f87343bacea84b49fc5d08af38875fdafdd
Signed-off-by: Ole Troan <ot@cisco.com>
Mohsin Kazmi [Thu, 15 Feb 2018 10:42:30 +0000 (11:42 +0100)]
VOM: Fix broken Makefile
Typo mistake broken the makefile which results in missing
vom headers in system.
Change-Id: Ic2e5f742f0e38140559138b4aa7564f8c25b73e4
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Marco Varlese [Thu, 15 Feb 2018 12:45:39 +0000 (13:45 +0100)]
SCTP: coverity warning fix
Change-Id: I1f8a325eac2a9e2c825996f04026ae86259a7ddd
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Neale Ranns [Mon, 12 Feb 2018 16:36:11 +0000 (08:36 -0800)]
Allow interface types to override glean adjacency behaivour
update the glean adj on a local interface MAC change
Change-Id: Ia5c5cde424ed0fea3431532cc5abf22b364bbab5
Signed-off-by: Neale Ranns <nranns@cisco.com>
Damjan Marion [Thu, 15 Feb 2018 10:59:04 +0000 (11:59 +0100)]
dpdk: add support for DPDK 18.02, deprecate 17.08
17.11 is still default.
Change-Id: I524d232579db8a59c717c5d760398b6b7f811d03
Signed-off-by: Damjan Marion <damarion@cisco.com>
John Lo [Tue, 13 Feb 2018 22:15:23 +0000 (17:15 -0500)]
Optimize GRE Tunnel and add support for ERSPAN encap
Change GRE tunnel to use the interface type where the same encap
node is used as output node for all GRE tunnels, instead of having
dedicated output and tx node for each tunnel. This allows for more
efficient tunnel creation and deletion at scale tested at 1000's
of GRE tunnels.
Add support for ERSPAN encap as another tunnel type, in addition
to the existing L3 and TEB types. The GRE ERSPAN encap supported
is type 2 thus GRE encap need to include sequence number and GRE-
ERSPAN tunnel can be created with user secified ERSPAN session ID.
The GRE tunnel lookup hash key is updated to inclue tunnel type
and session ID, in addition to SIP/DIP and FIB index.
Thus, GRE-ERSPAN tunnel can be created, with the appropriate
session ID, to be used as output interface for SPAN config to
send mirrored packets.
Change interface naming so that all GRE tunnels, irrespective of
tunnel type, uses "greN" where N is the instance number. Removed
interface reuse on tunnel creation and deletion to enable unfied
tunnel interface name.
Add support of user specified instance on GRE tunnel creation.
Thus, N in the "greN" interface name can optionally be specified
by user via CLI/API.
Optimize GRE tunnel encap DPO stacking to bypass load-balance DPO
node since packet output on GRE tunnel always belong to the same
flow after 5-tupple hash.
Change-Id: Ifa83915744a1a88045c998604777cc3583f4da52
Signed-off-by: John Lo <loj@cisco.com>
Florin Coras [Wed, 14 Feb 2018 16:04:31 +0000 (08:04 -0800)]
session: avoid session handle conflict with vcl
Change-Id: I7f5a3b8d92ef07d60315bab6e560eba49ea07249
Signed-off-by: Florin Coras <fcoras@cisco.com>
Marco Varlese [Wed, 14 Feb 2018 14:38:35 +0000 (15:38 +0100)]
SCTP: fix corrupted buffers seen in output node
The issue observed in the output-node was actually
caused by one of the input-node pushing buffers to
the output node when not required. That is the case
with the parsing/handling of incoming packets like
the COOKIE_ACK, HEARTBEAT_ACK, DATA, SACK which do
not require a response to be sent to the other peer.
In all the mentioned cases the packets (buffers) need
to be consumed and dropped instead of heading to the
output-node.
Change-Id: I3dcbe5de1cedb2ab8b06fff4364749b525cc7ac6
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Marco Varlese [Tue, 13 Feb 2018 11:38:52 +0000 (12:38 +0100)]
SCTP: refactoring
This patch takes care of some refactoring, including the initialization
of the timestamp to calculate the RTO, the output state-machine
validation which can be enabled (disabled by default) when debugging and
some clean-up of unused fields.
It also addresses the requirement of Karn's algorithm when computing the
RTO.
Change-Id: I6b875152369bff23cad085708cec1f7e1151cfa8
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Dave Barach [Wed, 14 Feb 2018 22:58:33 +0000 (17:58 -0500)]
Reenable dhcp client detect when lease expires
We disable the client detect feature when we bind a DHCP address. Turn
it back on again when the lease expires. Otherwise, if the DHCP
server replies after an outage, we'll never see the reply.
Add dhcp packet tx counters, by packet type
Change-Id: Id54b05647d5d7bd8d3ab99e6584ee86d9e4ff7f9
Signed-off-by: Dave Barach <dave@barachs.net>
Florin Coras [Thu, 8 Feb 2018 23:10:09 +0000 (15:10 -0800)]
session: support local sessions and deprecate redirects
Memfd backed shared memory segments can only be negotiated over sockets.
For such scenarios, the existing redirect mechanism that establishes
cut-through sessions does not work anymore as the two peer application
do not share such a socket.
This patch adds support for local sessions, as opposed to sessions
backed by a transport connection, in a way that is almost transparent to
the two applications by reusing the existing binary api messages.
Moreover, all segment allocations are now entirely done through the
segment manager valloc, so segment overlaps due to independent
allocations previously required for redirects are completely avoided.
The one notable characteristic of local sessions (cut-through from app
perspective) notification messages is that they carry pointers to two
event queues, one for each app peer, instead of one. For
transport-backed sessions one of the queues can be inferred but for
local session they cannot.
Change-Id: Ia443fb63e2d9d8e43490275062a708f039038175
Signed-off-by: Florin Coras <fcoras@cisco.com>
Neale Ranns [Wed, 14 Feb 2018 14:34:20 +0000 (06:34 -0800)]
VOM: build with plugins disabled
Change-Id: I1384d16deb3fa38b988dd2fc98f436124e381536
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Mohsin Kazmi [Fri, 9 Feb 2018 13:34:20 +0000 (14:34 +0100)]
vppinfra: Remove empty file
Change-Id: I3908cc112b40d4bb52da18e7c3ac5ae0af455f87
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Dave Wallace [Tue, 13 Feb 2018 21:14:06 +0000 (16:14 -0500)]
make-test: use api custom-dump to reduce log size.
- Reduce log size by using "api trace custom-dump" instead
of "api trace dump".
- Fix custom-dump output of cli_inband_t api message to include
cli command being executed.
New output:
DBGvpp# api trace custom-dump /tmp/test
vl_api_memclnt_delete_t:
index: 2
handle: 0x301d8e10
SCRIPT: memclnt_create name vpp_api_test
SCRIPT: sw_interface_dump all
SCRIPT: control_ping
SCRIPT: exec show run
Old output:
DBGvpp# api trace dump /tmp/test
---------- trace 0 -----------
vl_api_memclnt_delete_t:
index:
33554432
handle: 0x108e1d3000000000
---------- trace 1 -----------
vl_api_memclnt_create_t:
name: vpp_api_test
input_queue: 0x808e1d3000000000
context: 0
ctx_quota: 0
---------- trace 2 -----------
vl_api_sw_interface_dump_t:
_vl_msg_id: 61
client_index:
33554432
context: 0
name_filter_valid: 0
---------- trace 3 -----------
vl_api_control_ping_t:
_vl_msg_id: 712
client_index:
33554432
context: 0
---------- trace 4 -----------
vl_api_cli_inband_t:
_vl_msg_id: 715
client_index:
33554432
context: 0
length: 9
Change-Id: If740c861649a3a59b8cc7a777c23c3cf94b8ff87
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Matthew Smith [Sat, 10 Feb 2018 03:04:08 +0000 (21:04 -0600)]
NAT44 out2in DHCP client next node
Call vnet_feature_next() for DHCP replies instead of using
default ip4-lookup. This allows DHCP replies to reach an
outside interface if it's configured as a DHCP client.
Change-Id: Icce1cd68b21256fcd6b1fad6792c06578b0e4e36
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Eyal Bari [Tue, 13 Feb 2018 13:17:17 +0000 (15:17 +0200)]
vxlan:remove interface recycle mechanism
vxlan interfaces no longer create tx nodes and are "cheap" to create and delete
Change-Id: I7628d8ce86ec88609ed08162c94f5bc95df0d9f4
Signed-off-by: Eyal Bari <ebari@cisco.com>
Matus Fabian [Thu, 8 Feb 2018 13:28:28 +0000 (05:28 -0800)]
NAT44: run NAT nodes after ACL (VPP-1160)
NAT input features run after acl-plugin-in-ip4-fa
NAT output features run after acl-plugin-out-ip4-fa
Change-Id: I1e4487a0d6fdb99a90b8db640d9ad0e0eb7347a5
Signed-off-by: Matus Fabian <matfabia@cisco.com>
Eyal Bari [Tue, 13 Feb 2018 09:50:58 +0000 (11:50 +0200)]
vnet:remove duplicate interface function macro
Change-Id: I0ee18df69d5fe833c746d0d1e14aac14338a6e42
Signed-off-by: Eyal Bari <ebari@cisco.com>
Klement Sekera [Tue, 13 Feb 2018 12:14:52 +0000 (13:14 +0100)]
BFD: make CLI consume only one line at a time
This makes it possible to add BFD commands to scripts executed via
`exec' CLI.
Change-Id: Id0ed6c09baee6f8ac9ff183d305a470f55a1f885
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Mohsin Kazmi [Wed, 7 Feb 2018 19:20:36 +0000 (20:20 +0100)]
VOM: ACL: Add Object Model for acl ethertype
Change-Id: I2b572ebd4b7bb26381f127912a4cc0825c04fc34
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Igor Mikhailov (imichail) [Mon, 12 Feb 2018 21:45:51 +0000 (13:45 -0800)]
Fix the order of RFC2685 fields in the output.
Also, output VSS info with names according to RFC6607 (3.5).
Change-Id: I27a383515aca1a74dced2363a0c407b2791e5f05
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
Matthew Smith [Sat, 10 Feb 2018 17:11:45 +0000 (11:11 -0600)]
Fix DHCP client crash with worker threads
Crash occurring With a worker thread configured and dhcp
client active on an interface. When a DHCP reply packet
is received, call to ethernet_get_main() from
dhcp_proxy_to_client_input() was causing a crash.
Replaced with a call to vnet_get_ethernet_main().
Once that was resolved, calling dhcp_client_acquire_address()
from a worker thread also caused a crash. Changed so the main
thread will do the address/route configuration.
Change-Id: Ib23984787102dea8cf6cfcde86188a751f15c1e1
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Marco Varlese [Mon, 12 Feb 2018 08:08:21 +0000 (09:08 +0100)]
SCTP: fix build errors on ubuntu bionic
Change-Id: I070771794be92fd9a6e800ca0022e52d592cd1a4
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Neale Ranns [Fri, 9 Feb 2018 14:05:16 +0000 (06:05 -0800)]
Improve MTU handling
- setting MTU on an interface updates the L3 max bytes too
- value cached in the adjacency is also updated
- MTU exceeded generates ICMP to sender
Change-Id: I343ec71d8e903b529594c4bd0543f04bc7f370b3
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Eyal Bari [Thu, 8 Feb 2018 12:48:28 +0000 (14:48 +0200)]
dpdk:fix trace to follow feature arc
Change-Id: Icd2184dec16d30cdcc689ca37c834b5df2f0a1a3
Signed-off-by: Eyal Bari <ebari@cisco.com>
Marek Gradzki [Fri, 9 Feb 2018 12:39:22 +0000 (13:39 +0100)]
vppapigen: simplify JSON format for services
Use
"services": {
"foo_request": {
"reply": "foo_request_reply"
},
"foo_dump": {
"reply": "foo_details",
"stream": true
}
},
instead of:
"services": [
{
"foo_request": {
"reply": "foo_request_reply"
}
},
{
"foo_dump": {
"reply": "foo_details",
"stream": true
}
}
],
Change-Id: I1d8e6bb4d41541b7f7f63242935f2ed4467fc52b
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Dave Wallace [Thu, 8 Feb 2018 02:00:42 +0000 (21:00 -0500)]
LD_PRELOAD: Refactor nomenclature (vcom -> ldp).
Change-Id: Id3891fe2873b631f8f69c1ca2905968130678561
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Steve Shin [Fri, 9 Feb 2018 06:39:02 +0000 (22:39 -0800)]
acl-plugin: Stale classify table after deleting macip ACL
Classify table for output node should be cleaned up
after deleting macip ACL.
Change-Id: Ibbc46c8465bec02fe6fa6a8d33a1f06bcf28e9ad
Signed-off-by: Steve Shin <jonshin@cisco.com>
Neale Ranns [Mon, 5 Feb 2018 09:13:38 +0000 (01:13 -0800)]
GBP plugin
Group Base Policy (GBP) defines:
- endpoints: typically a VM or container that is connected to the
virtual switch/router (i.e. to VPP)
- endpoint-group: (EPG) a collection of endpoints
- policy: rules determining which traffic can pass between EPGs a.k.a
a 'contract'
Here, policy is implemented via an ACL.
EPG classification for transit packets is determined by:
- source EPG: from the packet's input interface
- destination EPG: from the packet's destination IP address.
Change-Id: I7b983844826b5fc3d49e21353ebda9df9b224e25
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Chun Li [Wed, 7 Feb 2018 01:58:28 +0000 (09:58 +0800)]
ip4_forward: set pkt error in case potential memory corrupt
Change-Id: Ib9eb65d2ba166f5883a8ce8d37298c696113f2be
Signed-off-by: Chun Li <chunl2@cisco.com>
Chun Li [Tue, 6 Feb 2018 07:17:20 +0000 (15:17 +0800)]
memif: fix crash caused by zero pkt len in memif and clear dirty cache while interface reconnect.
Change-Id: Ifc7eb2494a22c334d8899422545fca1a4bba4d05
Signed-off-by: Chun Li <chunl2@cisco.com>
Andrew Yourtchenko [Thu, 8 Feb 2018 20:45:08 +0000 (21:45 +0100)]
classifier-based ACL: testcases for L2 ACLs + fix the enabling of outbound L2 ACL
There was no test coverage for the L2 ACL (other than indirect by
means of ACL plugin tests), so the enabling of the outbound ACL
got fumbled throughout the revisions of the refactoring.
Fix both issues - the error and the lack of test coverage for L2 ACL.
Change-Id: Ib7f42780ef84b4a4f70bd88d7319aeeda866cf06
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Gabriel Ganne [Thu, 8 Feb 2018 10:22:33 +0000 (11:22 +0100)]
Geneve - reduce unit-test run time
Reduce the number of tunnels created/destroyed to reduce the load of the tests
without changing the code covered.
These are functional tests, not performance tests.
This reduced the test time down to 10s from 4 minutes on my machine.
Change-Id: Ifcaddc0b0628a21392c5cb247196f56bc28a53a2
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
Damjan Marion [Thu, 8 Feb 2018 18:49:22 +0000 (19:49 +0100)]
virtio: reset vnet header on tx
Change-Id: Ib04a8787038fb536470a04d99fdc165102edfb5a
Signed-off-by: Damjan Marion <damarion@cisco.com>
Haiyang Tan [Tue, 6 Feb 2018 16:16:48 +0000 (11:16 -0500)]
vhostuser: Fix vhostuser file descriptor leak
In the case that vhostuser server accepted more than one client connection,
'vui->clib_file_index' will be overwritten directly without release the possible
existed resource, so file descriptor leak occurs
Change-Id: I89d08133dae31a12a815df2631334dbf0aefeb1e
Signed-off-by: Haiyang Tan <haiyang.tan.dev@gmail.com>
Gabriel Ganne [Tue, 5 Dec 2017 16:33:37 +0000 (17:33 +0100)]
add CLIB_HAVE_VEC128 with NEON intrinsics (VPP-1127)
Enable CLIB_HAVE_VEC128 if both aarch64 and __ARM_NEON
ie. armv8 only, not armv7
Add more neon compare intrinsics wrappers.
I only add simple intrinsics wrappers. More complex ones can be added
later as they are needed, with performance tests on the corresponding
feature to back them up.
Remove wrongly added 128bits definitions defined on both armv7 and armv8
without concern for NEON instructions presence.
Notable correspondinf code activations:
* MHEAP_FLAG_SMALL_OBJECT_CACHE in mheap.c
* ip4 fib mtrie leaves access
* enable ixge plugin compilation for aarch64
(conf still disables it by default)
Change-Id: I99953823627bdff6f222d232c78aa7b655aaf77a
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
Andrew Yourtchenko [Tue, 6 Feb 2018 16:42:32 +0000 (17:42 +0100)]
acl-plugin: add whitelisted ethertype mode (VPP-1163)
Currently, ACL plugin largely does not care about the
ethertypes other than 0x0800 (IPv4) and 0x86dd (IPv6),
the only exception being 0x0806 (ARP), which is
dealt with by the MACIP ACLs.
The other ethertypes in L2 mode are just let through.
This adds a new API message acl_interface_set_etype_whitelist,
which allows to flip the mode of a given interface
into "ethertype whitelist mode": the caller of this message
must supply the two lists (inbound and outbound) of the ethertypes
that are to be permitted, the rest of the ethertypes are
dropped.
The whitelisting for a given interface and direction takes
effect only when a policy ACL is also applied.
This operates on the same classifier node as the one used for
dispatching the policy ACL, thus, if one wishes for most of the
reasonable IPv4 deployments to continue to operate within
the whitelist mode, they must permit ARP ethertype (0x0806)
The empty list for a given direction resets the processing
to allow the unknown ethertypes. So, if one wants to just
permit the IPv4 and IPv6 and nothing else, one can add
their ethertypes to the whitelist.
Add the "show acl-plugin interface" corresponding outputs
about the whitelists, vat command, and unittests.
Change-Id: I4659978c801f36d554b6615e56e424b77876662c
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Marco Varlese [Wed, 7 Feb 2018 11:22:41 +0000 (12:22 +0100)]
SCTP: shutdown phase
This patch addresses some bugs discovered with the shutdown phase which
were causing the actual chunks not to leave the output_node.
While fixing the issue some minor refactoring was also performed to
align the internal functions to a 'common' design.
Change-Id: Ieac4f6e78cffad2e6982536f8e9f190a66f328f7
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Dave Wallace [Wed, 7 Feb 2018 23:14:02 +0000 (18:14 -0500)]
VCL: remove vrf from vppcom api.
Change-Id: I6d91c8051de786fb8781cd0750ea9c350036b306
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Dave Barach [Wed, 7 Feb 2018 18:14:06 +0000 (13:14 -0500)]
Minimize bihash memory consumption
Reference-count the number of entries in each bucket. If the reference
count goes to zero, free the backing store.
Add long-term churn-testing to test_bihash_template.c, thanks to
Andrew Yourtchenko for the initial implementation.
Change-Id: I4fbd9229cacfaba8027a85cbf87b74afdead6e39
Signed-off-by: Dave Barach <dave@barachs.net>
Andrew Yourtchenko [Thu, 18 Jan 2018 07:07:05 +0000 (08:07 +0100)]
acl-plugin: VPP-1088: add support for egress filter in macip ACLs
This is the second patch, using the new functionality from the change 10002
in order to implement the egress filtering on the MACIP ACLs.
This adds an action "2" which means "add also egress filtering rules for this
MACIP ACL.
The reason for having the two choices is that the egress filtering really takes
care of a fairly corner case scenario, and I am not convinced that
always adding the performance cost of the egress lookup check is worth it.
Also, of course, not breaking the existing implementations is a nice plus,
too.
Change-Id: I3d7883ed45b1cdf98d7303771bcc75951dff38f0
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Andrew Yourtchenko [Mon, 5 Feb 2018 16:27:57 +0000 (17:27 +0100)]
acl-plugin: an elog-based tracing implementation for troubleshooting the conn cleaner threads interactions
This replaces some of the early-stage commented-out printf()s with
an elog-based debug collector.
It is aimed to be "better than nothing" initial implementation to be available
in the field. It will be refined/updated based on use. This initial code
is focused on the main/worker threads interactions, hence uses just
the worker tracks.
This code adds a developer debug CLI "set acl-plugin session table event-trace 1",
which allows to gather the events pertaining to connection cleaning.
The CLI is deliberately not part of the online help, as the express
declaration that the semantics/trace levels, etc. are subject to change
without notice.
Change-Id: I3536309f737b73e50639cd5780822dcde667fc2c
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Vijayabhaskar Katamreddy [Tue, 23 Jan 2018 21:39:40 +0000 (13:39 -0800)]
ip: move lookup inline functions to header file
Needed to allow other code paths to reuse them.
Change-Id: I9e469527c6b2e9a6fec7af5f17d8b400a2e85826
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
Keith Burns (alagalah) [Wed, 7 Feb 2018 21:20:28 +0000 (13:20 -0800)]
Fix bug with glibc epoll fd
Change-Id: I0b8ebe2c47fdd1e23a91723a7b454a0c1c8b996e
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
Keith Burns (alagalah) [Tue, 6 Feb 2018 15:14:41 +0000 (07:14 -0800)]
Update gitignore for cmake
Change-Id: Icd50432a60e194c0526a7d28b93e99ceb6f2013b
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
Jon Loeliger [Thu, 1 Feb 2018 22:36:12 +0000 (16:36 -0600)]
VXLAN: Allow user to specify a custom vxlan tunnel instance id.
If one is not selected by the user, the next available id
will be allocated, thus maintaining backward compatibility.
Change-Id: I4691ed0638b8072f9cfa9f20b9fe4f981e708800
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Andrew Yourtchenko [Wed, 7 Feb 2018 15:21:48 +0000 (16:21 +0100)]
acl-plugin: multicore: send the interrupts to thread0 too
The thread0 in some configurations can handle the traffic.
Some of the previous fixes accomodated for that, but
the interrupt sending for connection clearing
was not adapted to that, resulting in a deadlock
during clearing of all connections...
Change-Id: I32b4c7bac09c91c22b796baab843bdaf41f7045c
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Nitin Saxena [Wed, 7 Feb 2018 11:32:00 +0000 (11:32 +0000)]
vhost: Added ARMV8 NEON version of function map_guest_mem()
(VPP-1085)
The NEON implementation searches particular address in
VHOST_MEMORY_MAX_NREGIONS regions. Searching two regions at a
time.
Change-Id: Icc3c6746bc98e3a1fa71424e51b64f62efbfdc74
Signed-off-by: Nitin Saxena <nitin.saxena@cavium.com>
Pierre Pfister [Wed, 7 Feb 2018 14:48:21 +0000 (15:48 +0100)]
af_packet: Fix lock position
In multi-worker cases, af-packet tx was subject to a pretty
serious race condition as the device lock was obtained
after some queue values were read from queue.
Result could go from packet loss to queue inconsistency, leading
to tx being stuck for 'some time'.
The fix is really simple. Finding the problem was not...
Change-Id: Ib18967b7459a8609428a56de934c577cea87b165
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Andrew Yourtchenko [Wed, 7 Feb 2018 10:37:02 +0000 (11:37 +0100)]
classifier-based ACL: refactor + add output ACL
For implementation of MACIP ACLs enhancement (VPP-1088), an outbound
classifier-based ACL would be needed. There was an existing incomplete
code for outbound ACLs, it looked almost exact copy of input ACLs, minus
the various enhancements, trying to sync that code seemed error-prone
and cumbersome to maintain in the longer run.
This change refactors the input+output ACLs processing into a unified
routine (thus any changes will have effect on both), and also adds
the API to set the output interface ACL, with the same format
and semantics as the existing input one (except working on output
ACL of course).
WARNING: IP outbound ACL in L3 mode clobbers the ip.* fields
in the vnet_buffer_opaque_t, since the code is using l2_classify.*
The net_buffer (p0)->ip.save_rewrite_length is rescued into
l2_classify.pad.l2_len, and used to rewind the header in case of
drop, so that ipX_drop prints something sensible.
Change-Id: I62f814f1e3650e504474a3a5359edb8a0a8836ed
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Damjan Marion [Thu, 1 Feb 2018 14:30:13 +0000 (15:30 +0100)]
Refactor vlib_buffer flags
Change-Id: I853386aebfe488ebb10328435b81b6e3403c5dd0
Signed-off-by: Damjan Marion <damarion@cisco.com>
Marco Varlese [Tue, 6 Feb 2018 16:31:06 +0000 (17:31 +0100)]
SCTP: address coverity-scan warnings
Change-Id: Iba7c398a398e24b96eb536bbcefa841bd153a205
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Chun Li [Wed, 7 Feb 2018 01:51:35 +0000 (09:51 +0800)]
libmemif: cleanup queue info while memif connecting
Change-Id: I4265fd0606f87f80f43f7f59ced1c3a73de82776
Signed-off-by: Chun Li <chunl2@cisco.com>
Damjan Marion [Tue, 6 Feb 2018 18:29:35 +0000 (19:29 +0100)]
Fix clang -Wvarargs compile errors
error: passing an object that undergoes default argument promotion to
'va_start' has undefined behavior [-Werror,-Wvarargs]
Change-Id: Id342beea916ec73e29e399087532caecfa19055f
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Tue, 6 Feb 2018 18:01:28 +0000 (19:01 +0100)]
Fix clang implicit conversion errors
Change-Id: I1771a1cca2a4bc394677b2a18f14c47f0633fa77
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Fri, 19 Jan 2018 19:56:12 +0000 (20:56 +0100)]
vlib: epoll on worker threads
This patch teaches worer threads to sleep and to be waken up by
kernel if there is activity on file desctiptors assigned to that thread.
It also adds counters to epoll file descriptors and new
debug cli 'show unix file'.
Change-Id: Iaf67869f4aa88ff5b0a08982e1c08474013107c4
Signed-off-by: Damjan Marion <damarion@cisco.com>
Marco Varlese [Tue, 6 Feb 2018 12:48:30 +0000 (13:48 +0100)]
SCTP: handling of heartbeating and max-retransmits
This patch address the need to send/receive heartbeats between peers.
At the same time, the number of unacked heartbeats is tracked and when
the peer requests to send DATA to the remote-peer the value of unacked
heartbeats needs to be checked against the maximum value allowed for
retransmissions. If the unacked heartbeats value is higher then the
remote-peer is considered unreachable and the connetion needs to be
shutdown.
Change-Id: I2b1a21c26775e734dbe82486f40982ed5702dc63
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Klement Sekera [Tue, 6 Feb 2018 12:26:14 +0000 (13:26 +0100)]
make test: don't test/set parameters in docker
Do not set UDS related system parameters if DOCKER_TEST is set to "True"
as docker environment doesn't contain the necessary /proc/... entries.
Change-Id: Id85e4512c7bba6b3feb6e6fd1fbe1e05aa10a341
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Neale Ranns [Wed, 31 Jan 2018 19:35:41 +0000 (11:35 -0800)]
BIER: fix support for longer bit-string lengths
Change-Id: I2421197b76be58099e5f8ed5554410adff202109
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Dave Wallace [Tue, 6 Feb 2018 01:03:01 +0000 (20:03 -0500)]
VCL: Fix type in trace output.
Change-Id: I7834e676c23a697a12a6e06111c68450ba787fc9
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Marco Varlese [Tue, 6 Feb 2018 08:01:39 +0000 (09:01 +0100)]
SCTP: missing spinlock init when multiple threads
When the number of threads results being more than 1, the spinlock
structure requires to be initialized otherwise subsequent calls to
the "lock" API (clib_spinlock_lock_if_init) would result in a void
operation.
Change-Id: Ia268c4687252e41962bb3f1217f0a849d8c40385
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Steve Shin [Tue, 6 Feb 2018 00:44:19 +0000 (16:44 -0800)]
Reflexive ACL support on ICMP
Normally session keys are generated by mirroring the packets sent.
ICMP message type should be used and inverted for the stateful ACL.
Supported ICMP messages with this patch:
- ICMPv4: Echo/Timestamp/Information/Address Mask requests
- ICMPv6: Echo request/Node Information Queury
The invmap & valid_new tables can be modified to make any other
ICMP messages to be reflexive ACL.
Change-Id: Ia47b08b79fe0a5b1f7a995af78de3763d275dbd9
Signed-off-by: Steve Shin <jonshin@cisco.com>
Igor Mikhailov (imichail) [Mon, 5 Feb 2018 20:09:36 +0000 (12:09 -0800)]
Provide page-aligned length to ftruncate.
For some files such as hugepages files, ftruncate() fails with the error
"Invalid argument" if the 'length' parameter is not on a page boundary.
Change-Id: I42a9cde98707da15e3c5d1653046e2277fc7a424
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
Florin Coras [Wed, 31 Jan 2018 14:52:17 +0000 (06:52 -0800)]
session: segment manager refactor
- use valloc as a 'central' segment baseva manager
- use per segment manager segment pools and use rwlocks to guard them
- add session test that exercises segment creation
- embed segment manager properties into application since they're shared
- fix rw locks
Change-Id: I761164c147275d9e8a926f1eda395e090d231f9a
Signed-off-by: Florin Coras <fcoras@cisco.com>
Matus Fabian [Mon, 5 Feb 2018 10:57:47 +0000 (02:57 -0800)]
NAT64: Run nat64-expire-worker-walk only when NAT64 is configured (VPP-1162)
Change-Id: Ic5e8d74bf5ac84cce5661de44778c89541c67636
Signed-off-by: Matus Fabian <matfabia@cisco.com>
Dave Barach [Mon, 5 Feb 2018 14:45:43 +0000 (09:45 -0500)]
Fix ip4/6_reass_main.ip4/6_reass_expire_node_idx used before set
Add an ASSERT to vlib_process_signal_event_helper to catch future
instances of passing node_index = 0 to vlib_process_signal_event().
Change-Id: Iec896fc7c3917feb2fd3198cea42851ba88e64e5
Signed-off-by: Dave Barach <dave@barachs.net>
Marco Varlese [Fri, 2 Feb 2018 16:17:51 +0000 (17:17 +0100)]
SCTP: calculate RTO / RTT and RTTVAR as per RFC
This patch addresses the need to calculate the RTO / RTT and RTTVAR
according to the rules depicted by the RFC4960 at section 6.3.1
Change-Id: I1d346f3c67610070b3f602f32c7738d58b99ffed
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Haiyang Tan [Sat, 20 Jan 2018 09:48:53 +0000 (04:48 -0500)]
vhost_user: code cleanup
1. Replace the magic number '-1' with MAP_FAILED
2. On x86 platform, QEMU uses vhostuser required the memory back-end is file based,
the file could be tmpfs(4K page size) or hugetlbfs(2M or 1G page size)
Change-Id: If1818cb6833728d641f68e4d4a3bc645e70f2ee6
Signed-off-by: Haiyang Tan <haiyang.tan.dev@gmail.com>
Klement Sekera [Fri, 2 Feb 2018 15:17:55 +0000 (16:17 +0100)]
IP reassembly: workaround coverity warnings
Change-Id: Ide577f036d9d8dcedd99cdb4666a0eaf8a19b92e
Signed-off-by: Klement Sekera <ksekera@cisco.com>