Commit Graph

3599 Commits

Author SHA1 Message Date
Matthew Smith
3e57d78a9a 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>
2018-02-25 22:04:27 +00:00
Klement Sekera
329a1c10b7 vapi: handle more magic
Change-Id: I25cbf947d6aabadbf637387497104cb301762def
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-02-25 20:35:10 +00:00
Marco Varlese
04e5d64c45 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>
2018-02-25 19:33:48 +00:00
Damjan Marion
3473e49387 dpdk: Add option to specify cache line size for dpdk build
Change-Id: Ib3361eded05babfc17ead28af7d252e7503ce141
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-24 19:21:19 +01:00
Matthew Smith
a530cd0e9f 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>
2018-02-24 18:11:31 +00:00
Dave Wallace
3ee1fe1608 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>
2018-02-24 18:11:16 +00:00
Adrian Oanca
0b8792fd7d 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>
2018-02-24 18:10:57 +00:00
Jon Loeliger
25ef2b5353 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>
2018-02-23 18:47:20 -06:00
Dave Wallace
69d0119158 VCL/LDP: Suppress trace output unless debug is enabled.
Change-Id: Iaef2fe4b8c6b57d54ef6309423c9a0acba8a2f89
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-23 19:29:12 +00:00
Dave Barach
a0cc5ab6d4 Convert a pcap file to a set of C initializers
Change-Id: Ieb6b7a75fa23c8142ae15f42cd3a703253f39e10
Signed-off-by: Dave Barach <dave@barachs.net>
2018-02-23 12:12:04 -05:00
Marco Varlese
1355fcd36f DPDK: disabling DPAA since broken for 18.02
Change-Id: I1e0cea8e7ea6d8a777ca38abb61f4c093f29c722
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-02-23 14:03:18 +00:00
Matthew Smith
825879e74a 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>
2018-02-23 14:03:00 +00:00
Dave Barach
30765e77ac Add prefetch inlines, update bi-hash doc tags
Change-Id: I2e9d01ccba5288e89b886464436097d3cb7d2d18
Signed-off-by: Dave Barach <dave@barachs.net>
2018-02-23 08:02:18 -05:00
Neale Ranns
4ef4226282 VOM: vhost-use interfaces
Change-Id: Iee1574d1f0f081ccc4a90fd9825a0b5e254aa642
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-02-22 19:57:08 +00:00
Klement Sekera
de0203edd2 make test: tidy worker subprocess output
Change-Id: I362765a67762a59775863af12b712abb47445b3a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-02-22 19:32:18 +00:00
Dave Barach
97f5af0180 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>
2018-02-22 19:12:48 +00:00
Klement Sekera
cae7134a8c 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>
2018-02-22 17:55:39 +00:00
Keith Burns (alagalah)
aba98ded5f VCL: Fix for vppcom_session_listen() q_len <= 0 crash
Change-Id: I089dd3855fc21b26a125ee392c7548d44b5732b8
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2018-02-22 03:42:03 -08:00
Dave Wallace
a67a03e324 make test: Add VCL thru hoststack test case.
Change-Id: I7deb1fa4624cc1b7d7bc2f68034d4ce7589d4ef1
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-21 20:33:07 +00:00
Damjan Marion
ab2c5603a1 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>
2018-02-21 19:37:44 +00:00
Damjan Marion
37860ea491 vppinfra: remove vector_iwmmxt.h
Change-Id: I71fac34b071a07b4331cb5c900c3b8667c1fc114
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-21 19:23:29 +00:00
Damjan Marion
66e0ce8dab 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>
2018-02-21 19:22:51 +00:00
Marco Varlese
15cc6a83f1 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>
2018-02-21 19:22:39 +00:00
Klement Sekera
fa5fb2d162 make test: disable broken kubeproxy tests
Change-Id: I8de2594596053a7331c81b342c63df2358548ca3
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-02-21 16:36:17 +00:00
Jan Gelety
237d5aa0bf 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>
2018-02-21 15:36:17 +00:00
Adrian Oanca
2b53e4e525 add 'is_all_zero(x)' for NEON
Change-Id: I5045e0f3ac4698e820b69ad46b96763e404e6fe4
Signed-off-by: Adrian Oanca <adrian.oanca@enea.com>
2018-02-21 10:43:06 +00:00
Neale Ranns
76447a740a 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>
2018-02-21 08:34:12 +00:00
Steve Shin
8a3e575dfc 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>
2018-02-20 21:40:59 +00:00
Marco Varlese
f3ab4896ed 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>
2018-02-20 21:13:03 +00:00
Damjan Marion
6525c7f902 vppinfra: autogerate vector typedefs and basic inline functions
Change-Id: Ie9f611fa6a962b0937245f5cc949571ba11c5604
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-20 21:11:06 +00:00
Dave Barach
ad099335c1 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>
2018-02-20 16:14:10 +00:00
Keith Burns (alagalah)
9b79377ac1 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>
2018-02-20 15:34:54 +00:00
Damjan Marion
927b0714d7 vppinfra: CLIB_HAVE_VEC128 mandates SSE4.2
Change-Id: I6511110d0472203498a4f8741781eeeeb4f90844
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-20 08:53:19 +01:00
Dave Wallace
cfcf2f476a make test: Add VPP VCL cut-thru test.
Change-Id: Id3ec196bfeb90b141123adee97f15d9712351680
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-19 21:51:59 +00:00
Nitin Saxena
fa957142be 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>
2018-02-19 20:14:51 +00:00
Damjan Marion
c6969b55e4 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>
2018-02-19 20:14:30 +00:00
Damjan Marion
829ee53995 virtio: add missing tx lock when running multithreaded
Change-Id: I373f429c53c6f66ad38322addcfaccddb7761392
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-19 16:40:01 +00:00
Dave Wallace
b5a86eed8b 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>
2018-02-19 14:57:39 +00:00
Damjan Marion
1d3ab72941 dpdk: bump to 18.02
Change-Id: I3764f57a4b8df96d6bd20753b86fc0119d833bd9
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-19 13:21:09 +00:00
Neale Ranns
d79a43c7f4 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>
2018-02-19 12:21:00 +00:00
Mohsin Kazmi
d91d14095b 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>
2018-02-19 10:09:49 +00:00
Damjan Marion
3a59382233 vlib: fix pci init
Change-Id: I2b8c1ad5c594aeca5dc44647ab8f8061362c9284
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-18 16:26:52 +00:00
Damjan Marion
1e33663e25 fix format_hexdump
Change-Id: I9710be2e722d716e22d989b3417fb49d2db0848a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-18 16:26:39 +00:00
Klement Sekera
ebbaf55e09 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>
2018-02-17 20:42:49 +00:00
Klement Sekera
545be52c79 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>
2018-02-17 20:42:49 +00:00
Klement Sekera
49bec57f25 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>
2018-02-17 20:42:49 +00:00
Klement Sekera
180402d114 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>
2018-02-17 20:42:49 +00:00
Marco Varlese
54432f8c0a 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>
2018-02-17 09:45:28 +00:00
Jon Loeliger
a250882b8f memif: VPP-1172: Ensure memif_create reply contains sw_if_index
Change-Id: If5cd2e913770adac4e7320f54584da63012f925d
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2018-02-16 09:57:23 -06:00
Ole Troan
793c7fe5fc Adj: VFTs for adjacency sub-blocks
Change-Id: I85602b0178315023bb512babdd5b7dd4263a322d
Signed-off-by: Ole Troan <ot@cisco.com>
2018-02-16 13:45:05 +00:00