Ole Troan [Thu, 1 Mar 2018 12:49:00 +0000 (13:49 +0100)]
STN: Fix stn_rules_dump/details to follow API convention
Change-Id: I94f6c35bf751d25ca7fe7c67054e676a3ad2241b
Signed-off-by: Ole Troan <ot@cisco.com>
John Lo [Tue, 27 Feb 2018 21:35:03 +0000 (16:35 -0500)]
Fix ERSPAN encap to set EN bits in the header and add test case
For ERSPAN encap, both bits in the EN field of the header should
be set to indicate any VLAN tag in the original Ethernet frame is
preserved.
Added SPAN L2 test case where the mirrored packet output is a GRE
ERSPAN tunnel.
Change-Id: Ie7a40992a9278469c24aa6fa9e122b4505797d10
Signed-off-by: John Lo <loj@cisco.com>
Marco Varlese [Thu, 1 Mar 2018 10:19:59 +0000 (11:19 +0100)]
SCTP: API to add a sub-connection
This patch adds an API to add a sub-connection following a SRC/DST IP
mapping as required by the RFC4960.
At the same time, it changes the way the next available sub-connection
is being calculated: rather than having an index in the parent
connection which is prone to many issues at run-time, the next available
sub-connection is being calculated by looking at the state of the set
sub-connections and if marked as DOWN it means that is an available slot
to be used.
Change-Id: I662be6a247bfbbe8bf9aaf3f485183c07ef862fe
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Ole Troan [Wed, 28 Feb 2018 13:55:20 +0000 (14:55 +0100)]
PAPI: pycodestyle on vpp_papi.py
Change-Id: I15cf4a9fd2d2518df4bfffc1ba3c556a87ca5afa
Signed-off-by: Ole Troan <ot@cisco.com>
Florin Coras [Tue, 27 Feb 2018 18:05:57 +0000 (10:05 -0800)]
session: zero out ips in local endpoint lookup only if local
Change-Id: I3425b1533b3d31210166e7b3798685464ad1c489
Signed-off-by: Florin Coras <fcoras@cisco.com>
Dave Wallace [Wed, 28 Feb 2018 22:55:23 +0000 (17:55 -0500)]
make test: Add VCL LD_PRELOAD tests
- Refactor test code into VclTestCase object.
- Add LDP cut thru and thru host stack tests.
Change-Id: I2b16473df108004c79cc86fe1b7a789485b2dc5b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Matthew Smith [Fri, 23 Feb 2018 03:12:11 +0000 (21:12 -0600)]
Adjust vpp-selinux-policy postinstall
Only run semodule command on hosts where selinux
is enabled.
Change-Id: I7bcfc758e44bb0f41ec657ad395352ddb92766eb
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Steven [Wed, 28 Feb 2018 19:00:34 +0000 (11:00 -0800)]
tapv2: abort in tap_create_if (VPP-1179)
The following command sequences cause the crash:
create tap id 0 rx-ring-size 1024 tx-ring-size 1024
create tap id 1 rx-ring-size 1024 tx-ring-size 1024
set interface state tap0 up
set interface state tap1 up
delete tap tap0
delete tap tap1
create tap id 0 rx-ring-size 1024 tx-ring-size 1024
0: /home/sluong/vpp2/vpp/build-data/../src/vnet/interface_funcs.h:46
(vnet_get_hw_interface) assertion `! pool_is_free (vnm->interface_main.hw_interfaces, _e)' fails
The reason for the crash is because when the tap interface is deleted,
the code does not remove the entry from the device queue. But the interface
is deleted anyway from vnet_main.interface_main.hw_interfaces.
When an interface is created again, it may encounter
the deleted entry in the device queue and crash. Notice create and delete a
single entry does not cause a crash. Need to create and delete 2 interfaces
to create a "hole" in the device queue.
Change-Id: I42ce0b7943d73b3eab32a16751a0a3183de62d9f
Signed-off-by: Steven <sluong@cisco.com>
Chaoyu Jin [Wed, 28 Feb 2018 18:15:53 +0000 (10:15 -0800)]
at af_packet input, drop partial packets to prevent l4 checksum deadloop at ouptut
Change-Id: I6f75b7328fd0aa71d00a701e36c8b4ad06bff3c4
Signed-off-by: Chaoyu Jin <chjin@cisco.com>
Fix SELinux capabilities. Creating a tap interface with 'tap connect' was returning an error when VPP was launched as a service (tested on CentOS 7.3). Adding 'net_admin' to SELinux capabilities for VPP solves the issue.
Change-Id: Icd0529b49adb86e7b371283a6f39af03816951c5
Signed-off-by: Victor Nguyen <victong2@cisco.com>
Marco Varlese [Tue, 27 Feb 2018 08:38:31 +0000 (09:38 +0100)]
SCTP: handle COOKIE while in SHUTDOWN phase
This patch address the requirement to handle a COOKIE chunk whilst in
SHUTDOWN phase. The COOKIE shouldn't just be dropped but an OPERATION
ERROR chunk shall be sent to the peer to inform about the current
situation.
Change-Id: I1a47652402d49cfee3b0c810304d7902f3a62f40
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Steven [Tue, 27 Feb 2018 22:43:40 +0000 (14:43 -0800)]
vnet/interface: vnet_(put|get)frame_to_sw_interface is not worker thread aware
When heavy traffic is running using worker threads, it may crash here
DBGvpp# 0: /home/sluong/vpp3/vpp/build-data/../src/vlib/main.c:1128 (dispatch_pending_node) assertion `f->flags & VLIB_FRAME_PENDING' fails
Thread 1 "vpp_main" received signal SIGABRT, Aborted.
0x00007ffff5d50428 in __GI_raise (sig=sig@entry=6)
at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb)
No crash was observed if only main thread was used.
Change-Id: I96f8b02ec23accc85c0f1ddecfeff6043b5e3c2b
Signed-off-by: Steven <sluong@cisco.com>
Jon Loeliger [Tue, 27 Feb 2018 19:58:47 +0000 (13:58 -0600)]
memif: Fix a message initialization problem in VAT
The VAT calls to MEMIF_SOCKET_FILENAME_ADD_DEL erroneously
cleared the message memory after the M() macro call and
thus lost their message id. Don't do that.
While in the neighborhood, prevent a string copy from
referencing data that doesn't belong to the filename string.
Change-Id: Ib4309608ed617ef4f193880ecf4a0b35fda65e51
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Steven [Tue, 27 Feb 2018 18:29:32 +0000 (10:29 -0800)]
sctp: sctp_output.c failed to compile when VLIB_BUFFER_TRACE_TRAJECTORY is enabled
Fixed a typo in sctp_push_header(). It was inherited from tcp_output.c
Change-Id: I810fcb4c24cfd3d54f15da72a5184cfc4df24592
Signed-off-by: Steven <sluong@cisco.com>
Mohsin Kazmi [Tue, 27 Feb 2018 13:05:15 +0000 (14:05 +0100)]
VOM: interface: Fix the vhost user interface
Change-Id: I38904dafb4110322ec0138f7a5b3a65c96426b2b
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Dave Wallace [Mon, 26 Feb 2018 19:40:13 +0000 (14:40 -0500)]
make test: refactor vcl test cases
- Reduce replicated code in test cases
- Configure separate namespace secrets for thru hoststack
test case to validate namespace secret functionality.
- Pass per-instance environment variables to Worker class
init function.
Change-Id: I3cd5d4538f105cbfb09671c4d761541b40714b8f
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Neale Ranns [Sun, 25 Feb 2018 20:39:37 +0000 (12:39 -0800)]
SRv6: API uses table-IDs not FIB indicies
Change-Id: Iacbf7593ef9c03000db502e68335ac3ae18995d7
Signed-off-by: Neale Ranns <nranns@cisco.com>
Adrian Oanca [Fri, 23 Feb 2018 15:27:41 +0000 (16:27 +0100)]
Added u8x16,u32x4,u64x2 variants of _zero_byte_mask(x) for ARM/NEON platform. VPP-1129
Change-Id: I954acb56d901e42976e71534317f38d7c4359bcf
Signed-off-by: Adrian Oanca <adrian.oanca@enea.com>
Marco Varlese [Mon, 26 Feb 2018 15:33:54 +0000 (16:33 +0100)]
SCTP: Handle a COOKIE ECHO/ACK when a TCB Exists
This patch addresses the requirements depicted in section 5.2.4 of the
RFC 4960. It also takes care of handling the ERROR chunk and obviously
the STALE COOKIE error.
Change-Id: I6b88a9371546b18a52abac22f7c593a5f16be838
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Marco Varlese [Mon, 26 Feb 2018 13:52:25 +0000 (14:52 +0100)]
SCTP: handle INIT corner-case handling
As per RFC4960 the INIT chunk could be received in unexpected scenarios
and - depending on the state of the internal state-machine - the INIT
chunk requires different treatment.
This patch addresses section 5.2.1 and 5.2.2 of the RFC4960.
Change-Id: Ib23ef490c6a5ca3da6c46a9584b75e7577cb7042
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Steve Shin [Mon, 26 Feb 2018 19:43:31 +0000 (11:43 -0800)]
Fix current data offset to use vlib_buffer_get_current in input/output ACL
vlib_buffer_get_current() should be used for current data offset in ACL.
This is required for output ACL where packets are decoded through a vxlan tunnel rx node.
Change-Id: I6f739f251c3eb0d59ee4ae0da97aa04ddf667468
Signed-off-by: Steve Shin <jonshin@cisco.com>
Damjan Marion [Sun, 25 Feb 2018 22:26:22 +0000 (23:26 +0100)]
vlib: use vfio fd for accessing PCI config space
Change-Id: Id5c76a529ab9969334207790babcdc420a9c58ad
Signed-off-by: Damjan Marion <damarion@cisco.com>
Marco Varlese [Sun, 25 Feb 2018 10:28:52 +0000 (11:28 +0100)]
Python: addressing PEP8 deprecation
PEP8 has been deprecated and python users are being asked to migrate to
pycodestyle.
Change-Id: I52d5f7b2bf72156216a9966e8322ec58763f24d4
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Neale Ranns [Sun, 25 Feb 2018 18:52:12 +0000 (10:52 -0800)]
update BIER scapy patch to match the scapy repo PR
Change-Id: I4953b8444b49d1ad445c98a199ae8fd1635e24a5
Signed-off-by: Neale Ranns <nranns@cisco.com>
Neale Ranns [Sun, 25 Feb 2018 18:39:02 +0000 (10:39 -0800)]
IPv6 MLD; pointer address used as hash key
Change-Id: I7b2f52b2b2ce13f27bddc8750b8fc564bf6ab73e
Signed-off-by: Neale Ranns <nranns@cisco.com>
Damjan Marion [Sun, 25 Feb 2018 21:55:03 +0000 (22:55 +0100)]
vnet: add 25G interface speed flag
Change-Id: I1d3ede2b043e1fd4abc54f540bb1d3ac9863016e
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Sun, 25 Feb 2018 21:50:39 +0000 (22:50 +0100)]
vlib: add vlib_buffer_free_from_ring
Change-Id: I63f7b14cd63eac9e64cace5d941190096ad148dc
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Sun, 25 Feb 2018 21:52:07 +0000 (22:52 +0100)]
vnet: add vnet_device_input_have_features function
Change-Id: I28cfa7f7f5e4938146478c4a5cc5ad18612aadaa
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Sun, 25 Feb 2018 21:59:11 +0000 (22:59 +0100)]
vlib: fix formatting in pci_config.h
Change-Id: I5ce40f82e42be19f0f4d882ab194e5a25980adc1
Signed-off-by: Damjan Marion <damarion@cisco.com>
Matthew Smith [Sun, 25 Feb 2018 02:51:53 +0000 (20:51 -0600)]
Fix bug in dpdk_crypto_session_disposal()
The expression to determine whether to delete a session
from the disposal list only evaluates true if some,
but not all, of the sessions in the list were freed.
When all sessions in the list are freed, it evaluates
false and the sessions are left in the list to be freed
again later, which can result in a session pool element
that was reallocated to a different SA being freed,
breaking crypto for the newer SA.
Add an 'else' that handles the case where all sessions
were freed.
Change-Id: I3ae54d5b3bfc3658bf406caa50646924baaae589
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Klement Sekera [Sun, 25 Feb 2018 17:48:04 +0000 (18:48 +0100)]
vapi: handle more magic
Change-Id: I25cbf947d6aabadbf637387497104cb301762def
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Marco Varlese [Fri, 23 Feb 2018 16:43:06 +0000 (17:43 +0100)]
SCTP: fix connection memory corruption
A bug was found when multiple SCTP connections were being opened to the
same SCTP server. This patch addresses that problem, removing the use of
the 'parent' pointer approach for sub-connection and saving instead
within the sub-connection itself the ID representing its position. That
facilitates pointer-arithmetic to be computed in the
get_connection_from_transport().
Change-Id: Iaa1f4efc501590be1c93e42fd6fe3d6e02f635eb
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Damjan Marion [Sat, 24 Feb 2018 18:21:14 +0000 (19:21 +0100)]
dpdk: Add option to specify cache line size for dpdk build
Change-Id: Ib3361eded05babfc17ead28af7d252e7503ce141
Signed-off-by: Damjan Marion <damarion@cisco.com>
Matthew Smith [Thu, 22 Feb 2018 05:32:05 +0000 (23:32 -0600)]
Fix crypto session deletion crash
When using a DPDK cryptodev with IPsec, deleting a
session often results in a SEGV. A bad pointer
is being passed to rte_cryptodev_sym_session_free().
Put the correct value on the crypto disposal list and
add a check to determine whether the call to free the
session is going to result in a crash before doing
it.
Change-Id: I8a6b0a594585ebcfa56b555ede7ef7d67e5e2b33
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Dave Wallace [Fri, 23 Feb 2018 06:09:11 +0000 (01:09 -0500)]
LDP: Refactor epoll_ctl wrapper.
- Add AF_UNIX transaction to sock_test_client/server
echo test to verify mixed epoll ldp implementation.
- Misc cleanup / refactoring of ldp code.
- Fix LDP_DEBUG in test/socket_test.sh
Change-Id: Ib524c824728f109007d8c4d07d74603b6c687902
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Adrian Oanca [Thu, 15 Feb 2018 14:44:51 +0000 (15:44 +0100)]
u8x16_compare_byte_mask - optimize to use 128bit registers as suggested by Nintin
Change-Id: I88aabd34ef385d620695ac17ec3fe2f4a5177ada
Signed-off-by: Adrian Oanca <adrian.oanca@enea.com>
Jon Loeliger [Fri, 23 Feb 2018 23:02:41 +0000 (17:02 -0600)]
VXLAN: Instance numbers now properly freed upon delete.
Fixes a small bookkeeping oversight where the VXLAN instance
numbers were being freed erroneously by their device_instance
number rather than the correct user_instance number.
Change-Id: I08f6b2089c7a14cc8a8cb91f04f850f60ecec43b
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Dave Wallace [Thu, 22 Feb 2018 21:22:09 +0000 (16:22 -0500)]
VCL/LDP: Suppress trace output unless debug is enabled.
Change-Id: Iaef2fe4b8c6b57d54ef6309423c9a0acba8a2f89
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Dave Barach [Fri, 23 Feb 2018 17:09:41 +0000 (12:09 -0500)]
Convert a pcap file to a set of C initializers
Change-Id: Ieb6b7a75fa23c8142ae15f42cd3a703253f39e10
Signed-off-by: Dave Barach <dave@barachs.net>
Marco Varlese [Thu, 22 Feb 2018 15:03:35 +0000 (16:03 +0100)]
DPDK: disabling DPAA since broken for 18.02
Change-Id: I1e0cea8e7ea6d8a777ca38abb61f4c093f29c722
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Matthew Smith [Thu, 22 Feb 2018 20:44:03 +0000 (14:44 -0600)]
Disable scatter-gather for ENA
ENA doesn't support scatter-gather. The PMD started
failing rte_eth_dev_rx_queue_config() in DPDK 18.02
if the flag to enable it is set. Turn the flag off in
dpdk_lib_init().
Change-Id: Ifdd9f188c89b46efe82412c75fb935a92436da1c
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Dave Barach [Fri, 23 Feb 2018 12:45:36 +0000 (07:45 -0500)]
Add prefetch inlines, update bi-hash doc tags
Change-Id: I2e9d01ccba5288e89b886464436097d3cb7d2d18
Signed-off-by: Dave Barach <dave@barachs.net>
Neale Ranns [Tue, 20 Feb 2018 16:10:44 +0000 (08:10 -0800)]
VOM: vhost-use interfaces
Change-Id: Iee1574d1f0f081ccc4a90fd9825a0b5e254aa642
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Klement Sekera [Thu, 22 Feb 2018 18:21:27 +0000 (19:21 +0100)]
make test: tidy worker subprocess output
Change-Id: I362765a67762a59775863af12b712abb47445b3a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Dave Barach [Thu, 22 Feb 2018 14:48:45 +0000 (09:48 -0500)]
bihash table size perf/scale improvements
Directly allocate and carve cache-line-aligned chunks of virtual
memory. To a first approximation, bihash wasn't using
clib_mem_free(...).
We eliminate mheap object header/trailers, which improves space
efficiency. We also eliminate the 4gb bihash table size limit. An 8_8
bihash w/ 100 million random entries uses 3.8 Gbytes.
Change-Id: Icf925fdf99bce7d6ac407ac4edd30560b8f04808
Signed-off-by: Dave Barach <dave@barachs.net>
Klement Sekera [Thu, 22 Feb 2018 13:47:00 +0000 (14:47 +0100)]
make test: build test/ext when doing coverage
This makes VAPI/VOM tests part of code coverage report.
Change-Id: I66511b0a59880c2a64daecd37088268bdf5e1269
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Keith Burns (alagalah) [Thu, 22 Feb 2018 11:23:40 +0000 (03:23 -0800)]
VCL: Fix for vppcom_session_listen() q_len <= 0 crash
Change-Id: I089dd3855fc21b26a125ee392c7548d44b5732b8
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
Dave Wallace [Tue, 20 Feb 2018 17:39:37 +0000 (12:39 -0500)]
make test: Add VCL thru hoststack test case.
Change-Id: I7deb1fa4624cc1b7d7bc2f68034d4ce7589d4ef1
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Damjan Marion [Wed, 21 Feb 2018 14:45:07 +0000 (15:45 +0100)]
vppinfra: change default cache line size 64 bytes
This change only affects Aarch64 where previously we were using 128
bytes.
Change-Id: I52a3f2f3ff8c06abe8ae3933bc0d7a2a7749dd8a
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Wed, 21 Feb 2018 13:32:16 +0000 (14:32 +0100)]
vppinfra: remove vector_iwmmxt.h
Change-Id: I71fac34b071a07b4331cb5c900c3b8667c1fc114
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Wed, 21 Feb 2018 10:37:24 +0000 (11:37 +0100)]
dpdk: fix building dpdk debug images with dpdk 18.02
Looks like bug in ipsec-mb library when DEBUG=yes is passed
so simply we stop doing that.
Change-Id: Ifedd6d8a2aecf5af902ab4fa80ef197aebd5f829
Signed-off-by: Damjan Marion <damarion@cisco.com>
Marco Varlese [Wed, 21 Feb 2018 11:39:52 +0000 (12:39 +0100)]
SCTP: minor refactor
This patch adds some missing information in various debugging messages
which can help with debugging state-machine and connection-tracking.
It also renames some internal variable names for better code
readibility.
Change-Id: I68503fc0214300032f7514426c8b5b2b12edf11a
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Klement Sekera [Wed, 21 Feb 2018 10:13:39 +0000 (11:13 +0100)]
make test: disable broken kubeproxy tests
Change-Id: I8de2594596053a7331c81b342c63df2358548ca3
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Jan Gelety [Tue, 20 Feb 2018 11:57:55 +0000 (12:57 +0100)]
vpp-csit-verify: use latest verified CSIT branch by default
- align vpp code with ci-management change:
https://gerrit.fd.io/r/#/c/10518/
Change-Id: I595e02e65db74c39801d8a7a98c5b24a18dbf8fc
Signed-off-by: Jan Gelety <jgelety@cisco.com>
Adrian Oanca [Tue, 20 Feb 2018 16:14:58 +0000 (17:14 +0100)]
add 'is_all_zero(x)' for NEON
Change-Id: I5045e0f3ac4698e820b69ad46b96763e404e6fe4
Signed-off-by: Adrian Oanca <adrian.oanca@enea.com>
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>