summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-12-10test/framework.py: change logger to return 'e' format.Paul Vinciguerra1-15/+13
* When the framework logs an unexpected sleep time, display the units in the same format. Typically, it has been returning a float and an 'e'. ex. unexpected time.sleep() result - slept for 0.000107049942017s instead of ~4.88758087158e-05s! * Defer logger interpolation. Change-Id: I543ad6d41c7f263d61615341437f80973c0017de Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-10Python API: Use services to determine stream RPCOle Troan1-4/+11
The services {} definitions contain which APIs are streaming. In addition only create function definition for the client side (not for reply messages). Change-Id: I8e83d35386cdd9ebee83d4571eaebdc6dff19e82 Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-10Test framework: StringIO fixes for Python3Ole Troan23-126/+124
Add 2/3 support to binarytomac and mactobinary and move to vpp_mac.py Change-Id: I3dc7e4a24486aee22140c781aae7e44e58935877 Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-07FIB recusrion loop checks traverse midchain adjacenciesNeale Ranns11-149/+399
if a tunnel's destination address is reachable through the tunnel (see example config belwo) then search for and detect a recursion loop and don't stack the adjacency. Otherwise this results in a nasty surprise. DBGvpp# loop cre DBGvpp# set int state loop0 up DBGvpp# set int ip addr loop0 10.0.0.1/24 DBGvpp# create gre tunnel src 10.0.0.1 dst 1.1.1.1 DBGvpp# set int state gre0 up DBGvpp# set int unnum gre0 use loop0 DBGvpp# ip route 1.1.1.1/32 via gre0 DBGvpp# sh ip fib 1.1.1.1 ipv4-VRF:0, fib_index:0, flow hash:[src dst sport dport proto ] locks:[src:plugin-hi:2, src:default-route:1, ] 1.1.1.1/32 fib:0 index:11 locks:4 <<< this is entry #11 src:CLI refs:1 entry-flags:attached, src-flags:added,contributing,active, path-list:[14] locks:2 flags:shared,looped, uPRF-list:12 len:1 itfs:[2, ] path:[14] pl-index:14 ip4 weight=1 pref=0 attached-nexthop: oper-flags:recursive-loop,resolved, cfg-flags:attached, 1.1.1.1 gre0 (p2p) [@0]: ipv4 via 0.0.0.0 gre0: mtu:9000 4500000000000000fe2fb0cc0a0000010101010100000800 stacked-on entry:11: <<<< and the midchain forwards via entry #11 [@2]: dpo-drop ip4 src:recursive-resolution refs:1 src-flags:added, cover:-1 forwarding: unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:13 buckets:1 uRPF:12 to:[0:0]] [0] [@6]: ipv4 via 0.0.0.0 gre0: mtu:9000 4500000000000000fe2fb0cc0a0000010101010100000800 stacked-on entry:11: [@2]: dpo-drop ip4 DBGvpp# sh adj 1 [@1] ipv4 via 0.0.0.0 gre0: mtu:9000 4500000000000000fe2fb0cc0a0000010101010100000800 stacked-on entry:11: [@2]: dpo-drop ip4 flags:midchain-ip-stack midchain-looped <<<<< this is a loop counts:[0:0] locks:4 delegates: children: {path:14} Change-Id: I39b82bd1ea439be4611c88b130d40289fa0c1b59 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-07tcp: improve check for invalid sack blocksFlorin Coras1-1/+3
Change-Id: Ic6a6202a2d5aca33eee7fc6ff8eeaa1db9b58525 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-07tcp: measure us rtt with syn-ackFlorin Coras1-0/+1
Change-Id: I20820145377060e12aeeb23b433206c79fd88332 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-07tcp: fix timestamp check and pawsFlorin Coras1-5/+2
Change-Id: I5a5ee48755befc370a1f89ddbb0d91f164ed564f Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-07tcp: better handling of options only allowed in synsFlorin Coras1-9/+18
Change-Id: I6debfe85d9d55f6f9a8ef0ce1dcc008393847a37 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-07tcp: validate connection state in retransmitFlorin Coras1-2/+2
Change-Id: Ia9048bb4e074f7ebc36eb77e542a916924103332 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-07tcp: fix length checkFlorin Coras1-3/+14
Change-Id: Iff75be238a231df88a37b61610c134e4a4770708 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-07VPP-1506: dump local punts and registered punt socketsPavel Kotucek13-90/+838
Change-Id: If7835e9b80ec9402404bfc8d271eb11a10ef992b Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
2018-12-07Test reader thread hardeningjuraj.linkes1-103/+111
The test reader thread could get stuck in case an unexpected Exception was raised during test runs in parent thread. Catch the Exception, close the thread and raise the Exception to avoid this. Change-Id: I3a9298d593c334d96d04b6207d604b684572a2ac Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-12-07vpp_if_stats: Fixing a bug in getting vpp interfaces indexesKoren Lev2-10/+10
Change-Id: I6290945a94b4f7878e9af94cc7daec455327482e Signed-off-by: Koren Lev <korenlev@gmail.com>
2018-12-07Fix VPP-1515 IPSec receive packet error in transport mode with udp encapjackiechen19852-4/+14
Change-Id: Ife66395b89e1e9f9206666e5f0fd441b3c241bb2 Signed-off-by: jackiechen1985 <xiaobo.chen@tieto.com>
2018-12-07vom: Fix the api type definitionMohsin Kazmi1-2/+4
Change-Id: I1e5f5a0d60745a42e6efaab3b6eb49b6b0e74e36 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-12-06Fix L2BD arp termination Test CasePaul Vinciguerra1-6/+2
This patch is a followup to: https://gerrit.fd.io/r/#/c/16307/ which is currently causing ubuntu1804 to complain. See: https://logs.fd.io/production/vex-yul-rot-jenkins-1/vpp-beta-verify-master-ubuntu1804/3837/console-timestamp.log.gz s/RuntimeError/ for details. ============================================================================== L2BD arp termination Test Case ============================================================================== 12:02:21,850 Couldn't stat : /tmp/vpp-unittest-TestL2bdArpTerm-_h44qo/stats.sock L2BD arp term - add 5 hosts, verify arp responses OK L2BD arp term - delete 3 hosts, verify arp responses OK L2BD arp term - recreate BD1, readd 3 hosts, verify arp responses OK L2BD arp term - 2 IP4 addrs per host OK L2BD arp term - create and update 10 IP4-mac pairs OK L2BD arp/ND term - hosts with both ip4/ip6 OK L2BD ND term - Add and Del hosts, verify ND replies OK L2BD ND term - Add and update IP+mac, verify ND replies OK L2BD arp term - send garps, verify arp event reports OK L2BD arp term - send duplicate garps, verify suppression OK L2BD arp term - disable ip4 arp events,send garps, verify no events OK L2BD ND term - send NS packets verify reports OK L2BD ND term - send duplicate ns, verify suppression OK L2BD ND term - disable ip4 arp events,send ns, verify no events OK ============================================================================== TEST RESULTS: Scheduled tests: 14 Executed tests: 14 Passed tests: 14 ============================================================================== Test run was successful Change-Id: If66f22412f8aa36b183131cd22af4b3e7a20da46 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-06Rename VPP_TEST_FAILED_DIR to FAILED_DIRjuraj.linkes1-7/+7
15999 renamed VPP_TEST_FAILED_DIR, but not in all files. Fix this in the one remaining file. Change-Id: I159cdc86bfd5dd33af74256830873a8d081f1a73 Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-12-06stat_client: Fix the type castingMohsin Kazmi2-7/+10
Change-Id: I9726ac5cc7292a492928b213bc85ccfa8a26c1cb Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-12-06Skip failing ARM testcases for CIjuraj.linkes4-2/+21
There are a few tests that fail on ARM and thus we can't enable testing in CI. Skip the failing tests until they're fixed so that we catch new failures in CI (when we enable testing for the remaining tests). Change-Id: Ie896ef5c449ef965029633e38d317a8d5ac26352 Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-12-06Test framework: fix import logic for sphynx.Paul Vinciguerra1-9/+6
* Simplify conditional import. Remove global variable. * Fix vpp_l2 import side effect. Change-Id: I3945cf2a0cf8844004af2cd636f92d73ddc60f93 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-06nsim: add packet loss simulation, docsDave Barach8-9/+170
Change-Id: Ic9747541aad8148ebf7d520b525b99c4cc3961f3 Signed-off-by: Dave Barach <dave@barachs.net>
2018-12-06DOC-ONLY: MFIB documentationNeale Ranns4-5/+96
Change-Id: I8c7277584f231dd4732a4c6013e156a5bb821f41 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-06API: Change ip4_address and ip6_address to use type alias.Ole Troan23-144/+94
Change-Id: Id8669bbadd1d6b2054865a310a654e9b38d1667d Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-06Update japi to support type aliasesMichal Cmarada5-32/+126
Change-Id: I6d6068d641d4c91e5c5b52eefb898affc5c0d2c0 Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
2018-12-06MFIB; CLI improvementsNeale Ranns2-7/+37
Change-Id: I7cf3ae8c10dd584e8bc234a3253bea3c5a2d105a Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-05Fix gcc-8 compile issues in string_test.cDave Barach1-1/+35
gcc-8 flunks a certain number of tests at compile time, so conditionally disable (negative) tests which won't even compile. Change-Id: Id7e85f38bc371623972efa6e2c8f9ee4717f5ff5 Signed-off-by: Dave Barach <dave@barachs.net>
2018-12-05Improve strncpy_s src/dst overlap checkDave Barach1-2/+12
Let m = user estimate of the (max) src string length, low = smaller address of (src, dst), hi = larger address (src, dst). if (low + (m - 1) >= hi), we have a *potential* overlapping copy which is not allowed. Before we declare overlap - and return an error - retry the check with m = actual src string length. The resulting "test string" failure affected aarch64 (only) because of differences in test code stack variable placement / alignment. Change-Id: I2931d1ce2c61af3d3880075b033d2a4c4e421f09 Signed-off-by: Dave Barach <dave@barachs.net>
2018-12-05bapi: add options to have vpp cleanup client registrationFlorin Coras5-25/+36
A client can send a memclnt delete message and ask vpp to cleanup the shared memory queue. Obviously, in this case no delete reply is sent back to the client. Change-Id: I9c8375093f8607680ad498a6bed0690ba02a7c3b Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-05ldp: avoid calling write in destructorsFlorin Coras2-5/+8
Change-Id: Ia9c3d7a68a23dc4ab3be06f88fdfb053db422372 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-05session/tcp: postpone cleanup on resetFlorin Coras8-13/+39
Change-Id: I45fd7538853f84c6c8bf804cc20acbc9601db3ba Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-05DOC ONLY: describe dispatch pcap tracingDave Barach3-2/+263
and wireshark dissection of these traces. Change-Id: I61029fd20d6d5f6c40638e3ea9223f2354abedba Signed-off-by: Dave Barach <dave@barachs.net>
2018-12-05stat-client: pass names as const stringsNeale Ranns2-4/+4
Change-Id: I8debcd078b733ed19c4b46ea41a2a150d816724c Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-05VOM: interface event structNeale Ranns7-5/+72
Change-Id: If133829ba4db2da1c9c20bfbbdfc6df6276efa10 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-05VPP-1508: Python3 compatible printPaul Vinciguerra6-24/+23
Change-Id: I7d2597f2a9589f2463e213da6ca67b1b7593095e Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-05VPP-1508 python3 tests: xrangePaul Vinciguerra2-31/+34
xrange is not supported. Use six.range. py27 runtests: commands[5] | stestr --test-path ./test run --slowest test_ip4 test_ip6 ============================================================================== IPv4 disabled ============================================================================== ============================================================================== ICMP Echo Test Case ============================================================================== {0} test.test_ip4.TestIPDisabled.test_ip_disabled [5.256819s] ... ok 07:24:41,902 Couldn't stat : /tmp/vpp-unittest-TestICMPEcho-hU4IsB/stats.sock {1} test.test_ip4.TestICMPEcho.test_icmp_echo [0.367035s] ... ok ============================================================================== IPv4 Deaggregate Routes ============================================================================== ============================================================================== IPv4 Input Exceptions ============================================================================== 07:24:47,314 Couldn't stat : /tmp/vpp-unittest-TestIPDeag-eE1VgC/stats.sock {1} test.test_ip4.TestIPDeag.test_ip_deag [5.895646s] ... ok {0} test.test_ip4.TestIPInput.test_ip_input [5.819001s] ... ok ============================================================================== IPv4 longest Prefix Match ... output truncated ... ============================== Failed 4 tests - output below: ============================== test.test_ip4.TestIPv4FibCrud.test_3_add_new_routes --------------------------------------------------- Captured traceback: ~~~~~~~~~~~~~~~~~~ Traceback (most recent call last): File "/vpp/test/test_ip4.py", line 509, in test_3_add_new_routes self.deleted_routes.remove(x) ValueError: list.remove(x): x not in list test.test_ip4.TestIPv4FibCrud.test_2_del_routes ----------------------------------------------- Captured traceback: ~~~~~~~~~~~~~~~~~~ Traceback (most recent call last): File "/vpp/test/test_ip4.py", line 478, in test_2_del_routes self.configured_routes.remove(x) ValueError: list.remove(x): x not in list test.test_ip4_vrf_multi_instance.TestIp4VrfMultiInst.test_ip4_vrf_03 -------------------------------------------------------------------- Captured traceback: ~~~~~~~~~~~~~~~~~~ Traceback (most recent call last): File "/vpp/test/test_ip4_vrf_multi_instance.py", line 465, in test_ip4_vrf_03 self.create_vrf_and_assign_interfaces(1) File "/vpp/test/test_ip4_vrf_multi_instance.py", line 189, in create_vrf_and_assign_interfaces pg_if.set_table_ip4(vrf_id) File "/vpp/test/vpp_interface.py", line 322, in set_table_ip4 self.sw_if_index, 0, self.ip4_table_id) File "/vpp/test/vpp_papi_provider.py", line 264, in sw_interface_set_table 'vrf_id': table_id}) File "/vpp/test/vpp_papi_provider.py", line 196, in api raise UnexpectedApiReturnValueError(msg) test.vpp_papi_provider.UnexpectedApiReturnValueError: API call failed, expected 0 return value instead of -114 in sw_interface_set_table_reply(_0=91, context=1007, retval=-114) test.test_ip4_vrf_multi_instance.TestIp4VrfMultiInst.test_ip4_vrf_02 -------------------------------------------------------------------- Captured traceback: ~~~~~~~~~~~~~~~~~~ Traceback (most recent call last): File "/vpp/test/test_ip4_vrf_multi_instance.py", line 445, in test_ip4_vrf_02 self.reset_vrf_and_remove_from_vrf_list(1) File "/vpp/test/test_ip4_vrf_multi_instance.py", line 208, in reset_vrf_and_remove_from_vrf_list self.vapi.reset_fib(vrf_id, is_ipv6=0) File "/vpp/test/vpp_papi_provider.py", line 1137, in reset_fib 'is_ipv6': is_ipv6, File "/vpp/test/vpp_papi_provider.py", line 196, in api raise UnexpectedApiReturnValueError(msg) test.vpp_papi_provider.UnexpectedApiReturnValueError: API call failed, expected 0 return value instead of -3 in reset_fib_reply(_0=259, context=1198, retval=-3) ====== Totals ====== Ran: 57 tests in 266.0000 sec. - Passed: 53 - Skipped: 0 - Expected Fail: 0 - Unexpected Success: 0 - Failed: 4 Sum of execute time for each test: 157.3925 sec. ============== Worker Balance ============== - Worker 0 (29 tests) => 0:03:52.608995 - Worker 1 (28 tests) => 0:04:08.615473 Test id Runtime (s) --------------------------------------------- ----------- test.test_ip_mcast.TestIPMcast.test_ip6_mcast 8.535 test.test_ip4.TestIPPunt.test_ip_punt 8.082 test.test_ip6.TestIP6Punt.test_ip_punt 6.582 test.test_ip6.TestIPDeag.test_ip_deag 6.175 test.test_ip6.TestIPv6.test_ns 6.171 test.test_ip4.TestIPDeag.test_ip_deag 5.896 test.test_ip6.TestIPv6.test_fib 5.846 test.test_ip4.TestIPInput.test_ip_input 5.819 test.test_ip6.TestIPv6.test_rs 5.737 test.test_ip4.TestIPv4.test_fib 5.267 ERROR: InvocationError for command '/vpp/.tox/py27/bin/stestr --test-path ./test run --slowest test_ip4 test_ip6' (exited with code 1) ______________________________________________________ summary ______________________________________________________ ERROR: py27: commands failed Change-Id: Id9f6ecb4897386f790d82ab908963e4971a3aac8 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-04ipsec: simplify bumping counters - cosmetic changeKlement Sekera4-116/+35
Change-Id: Ibb55427ed49d0277854a352922c6c4bb007bf072 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-12-04vcl: cleanup children that use _exit()Florin Coras5-32/+154
Change-Id: Ia56c2698adb0ea7811203844dc4db10e121fbc42 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-04Add VNET_BUFFER_F_AVAIL definitionsDave Barach2-1/+26
Add a check to make sure that the vlib and vnet buffer flag bit definitions do not overlap. The VNET_BUFFER_F_AVAIL1...8 definitions allow out-of-tree codes to: #define VNET_BUFFER_F_MY_USECASE VNET_BUFFER_F_AVAIL1 and so on. This avoids introducing irrelevant and/or proprietary bit definitions into vnet/buffer.h, and hopefully minimizes merge pain for everyone involved. Change-Id: I5be4f61dceb81b5bfca005f6d609ade074af205b Signed-off-by: Dave Barach <dave@barachs.net>
2018-12-04vcl: test refactor and improvementsFlorin Coras7-277/+106
Change-Id: I92f415bf253d6e051ec9d94ebeb98f081b2a0293 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-04MPLS: buffer over-run with incorrectly init'd vector. fix VAT dumpNeale Ranns2-3/+3
Change-Id: Ifdbb4c4cffd90c4ec8b39513d284ebf7be39eca5 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-03Format vnet_buffer_t l2 feature bitmapDave Barach1-0/+8
Change-Id: Iad3120ab6466b77875efc89ccb49f6d22e36e62a Signed-off-by: Dave Barach <dave@barachs.net>
2018-12-03API: C generator improve symbol protection.Ole Troan1-2/+2
Change-Id: I9ef042c06c12892a2bbc23cc3bac6891c77e3feb Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-03vcl: handle worker process exitFlorin Coras6-22/+56
Change-Id: Ife05d25fd736ae3064f01e974e5aecc5b48de924 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-03svm: use explicit svm fifo segment main for slavesFlorin Coras8-62/+76
Change-Id: Id39d64bf1b49345a3dc31c63360569212aba6865 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-03Add UDP encap flagFilip Tehlar2-0/+3
Change-Id: Ic6a8b9aaec7e5dee4fb1971168988dbe4f931f86 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2018-12-03move [m]fib and BIER tests to unittest pluginNeale Ranns5-3/+3
Change-Id: I9d2f52e756363df011026773bfffa838a557313f Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-03Copying QoS Bits when fragmented, so that marking can happen properly also ↵Vijayabhaskar Katamreddy1-0/+7
cleaning up some unused code Change-Id: I1558eec79af173e5cdcc769d7c3909039403eed8 Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
2018-12-02IPSEC-AH: anti-replay testingNeale Ranns6-36/+120
Change-Id: Ia5d45db73e4bdb32214ed4f365d5eec8e28115f3 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-02vppinfra: c11 safe string functionsSteven4-25/+2682
Add memcmp_s, strcmp_s, strncmp_s, strcpy_s, strncpy_s, strcat_s, strncat_s, strtok_s, strnlen_s, and strstr_s C11 safe string API. For migrating extant unsafe API, add also the corresponding macro version of each safe API, clib_memcmp, clib_strcmp, etc. In general, the benefits of the safe string APIs are to provide null pointer checks, add additional argument to specify the string length of the passed string rather than relying on the null terminated character, and src/dest overlap checking for the the string copy operations. The macro version of the API takes the same number of arguments as the unsafe API to provide easy migration. However, it does not usually provide the full aformentioned benefits. In some cases, it is necessary to move to the safe API rather than using the macro in order to avoid some unpredictable problems such as accessing memory beyond what it is intended due to the lack of the passed string length. dbarach: add a "make test" vector, and a doxygen file header cookie. Change-Id: I5cd79b8928dcf76a79bf3f0b8cbc1a8f24942f4c Signed-off-by: Steven <sluong@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2018-12-01ip_reassembly_enable_disable reply handler name is changed.Chore1-1/+1
Change-Id: I89be597376690bb75c4347bcfc1c6c3d27c4034c Signed-off-by: Chore <s3m2e1.6star@gmail.com>