Age | Commit message (Collapse) | Author | Files | Lines |
|
Add an IP_ROUTE_LOOKUP function that does either an exact match or
longest prefix match in a given fib table for a given prefix
returning the match if present.
Add API test.
Type: improvement
Signed-off-by: Christian Hopps <chopps@labn.net>
Change-ID: I67ec5a61079f4acf1349a9c646185f91f5f11806
|
|
interface
Type: fix
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I0b7c189006e30a357cd6be4f3c9c61fded4157cb
|
|
Type: feature
- replace functions for prefixes attached to interfaces
- add ip_interface.[ch] to consoldate the functions
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I9c0c39c09dbf80ea1aadefee02c9bd16f094b6ad
|
|
Fix of the top 11 python issues flagged as BLOCKER.
Ticket: VPP-1856
Type: fix
Change-Id: Icf4691e62f4a69d6ee196b6d6e2ab52d961b5c76
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Type: improvement
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ia8dff15855a81cf29729bdaa3ff28fbe3254fa97
|
|
Use consistent API types.
Type: fix
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ia14f33992353b419b70b55beed63ab8ed6a2e837
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
|
|
Type: fix
Change-Id: I8f81cd6c29ff8cb4f0b4850b8b1f6611d89ddb38
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
Make test framework python3 version independence.
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I1ef1eb77b6c1f422ebc4dad0818f87c8e587b34b
|
|
Type: feature
- ip-neighbour: generic neighbour handling; APIs, DBs, event handling,
aging
- arp: ARP protocol implementation
- ip6-nd; IPv6 neighbor discovery implementation; separate ND,
MLD, RA
- ip6-link; manage link-local addresses
- l2-arp-term; events separated from IP neighbours, since they are not
the same.
vnet retains just enough education to perform ND/ARP packet
construction.
arp and ip6-nd to be moved to plugins soon.
Change-Id: I88dedd0006b299344f4c7024a0aa5baa6b9a8bbe
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
Type: fix
Change-Id: I7e041b666dabd90df23a920a1f1d99db4c10ddfe
Signed-off-by: snaramre <snaramre@cisco.com>
|
|
Type: feature
from the API doc, a table replace is:
"
The use-case is that, for some unspecified reason, the control plane
has a very different set of entries it wants in the table than VPP
currently has. The CP would thus like to 'replace' VPP's current table
only by specifying what the new set of entries shall be, i.e. it is not
going to delete anything that already eixts.
the CP delcartes the start of this procedure with this begin_replace
API Call, and when it has populated all the entries it wants, it calls
the below end_replace API. From this point on it is of coursce free
to add and delete entries as usual.
The underlying mechanism by which VPP implements this replace is
purposefully left unspecified.
"
In the FIB, the algorithm is implemented using mark and sweep.
Algorithm goes:
1) replace_begin: this marks all the entries in that table as 'stale'
2) download all the entries that should be in this table
- this clears the stale flag on those entries
3) signal the table converged: ip_table_replace_end
- this removes all entries that are still stale
this procedure can be used when an agent first connects to VPP,
as an alternative to dump and diff state reconciliation.
Change-Id: I168edec10cf7670866076b129ebfe6149ea8222e
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
Type: refactor
Change-Id: I204f3f8eebc5f5d5a377e91262f91c615fd00168
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
Raw('\xaf) and Raw(b'\xaf) are two quite different things in python 2 versus 3.
In most cases this didn't make a difference, apart from those cases where length
of payload actually mattered.
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I3cba5c1486e436a3ca8aa10a7b393da75aa9f6b9
|
|
Type: fix
Since CentOS 8, RPM build script doesn't accept '#!/usr/bin/env python'
as a valid shebang line. It requires scripts to explicitly chose
between python2 or python3.
Change all to use python3 as suggested by Paul Vinciguerra.
Depends-On: https://gerrit.fd.io/r/23170
Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
Change-Id: Ie72af9f60fd0609e07f05b70f8d96e738b2754d1
|
|
the IPv6 RA tests take timing into the account,
but the time inside VPP may go slightly differently compared
to the time inside the driving python thread,
if the machine running the tests is heavily loaded.
Make a sleep function which sleeps "on VPP time" and use it.
Change-Id: I3b34b0164f6e0ec7a619b92ee308089a4a8935e3
Type: test
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
|
|
Type: fix
Change-Id: Ie7764fec13cbb83b6899c7c33b7b2f8cc5d40c8a
Signed-off-by: snaramre <snaramre@cisco.com>
|
|
Type: feature
Adding a prefix to an interface was not permitted if it overlapped
with another prefix on an interface which used the same FIB.
Loosen the restriction. Allow 2 or more addresses from the same
prefix on a single interface. Reference count the prefix to figure
out when a glean/connected route for the prefix needs to be added
or removed.
Added unit tests to check that the route is only removed when all
addresses in the prefix are removed from the interface.
Change-Id: I1a962ecb5e1ee65fc6d41f98a4cc097a51a55321
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
|
|
format_vl_api_prefix_t returns a dict with keys 'address' and 'address_length',
but other format_vl_api_prefix functions return a dict with 'prefix', and 'len'.
Refactor all format_vl_api_prefix_t to return consistent keys 'address' and 'len'.
Type: refactor
Change-Id: I5f9558fc2da8742a303266e011102f5b2db80aad
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Enhance the route add/del APIs to take a set of paths rather than just one.
Most unicast routing protocols calcualte all the available paths in one
run of the algorithm so updating all the paths at once is beneficial for the client.
two knobs control the behaviour:
is_multipath - if set the the set of paths passed will be added to those
that already exist, otherwise the set will replace them.
is_add - add or remove the set
is_add=0, is_multipath=1 and an empty set, results in deleting the route.
It is also considerably faster to add multiple paths at once, than one at a time:
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.11
100000 routes in .572240 secs, 174751.80 routes/sec
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.12
100000 routes in .528383 secs, 189256.54 routes/sec
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.13
100000 routes in .757131 secs, 132077.52 routes/sec
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.14
100000 routes in .878317 secs, 113854.12 routes/sec
vat# ip_route_add_del 1.1.1.1/32 count 100000 multipath via 10.10.10.11 via 10.10.10.12 via 10.10.10.13 via 10.10.10.14
100000 routes in .900212 secs, 111084.93 routes/sec
Change-Id: I416b93f7684745099c1adb0b33edac58c9339c1a
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
This change is made fix a crash, because is_feature flag semantics turn
out to be different from "custom app code" semantics. Introduce a flag
which custom plugins/apps can use to instead of tying that code to
is_feature flag.
Change-Id: Ief5898711e68529f9306cfac54c4dc9b3650f9e3
Ticket: N/A
Type: fix
Fixes: 21aa8f1022590b8b5caf819b4bbd485de0f1dfe5
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Add a minimal ip6 hbh header processing test.
ioam plugin: use ip6_local_hop_by_hop_register_protocol() in
udp_ping_init().
Please test the ioam plugin udp_ping path AYEC, so I can
publish the patch.
Change-Id: I74e35276d6c38c31022026cfd238fad5e4a54485
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
* change literal packet count vlaues from 65 to a named constant of 67.
(This value was recommended to exercise single, dual, and quad loops)
Change-Id: Ieb1738dddacb8b6ea7fa25883032ac01a98399e1
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Continuation/Part 2 of https://gerrit.fd.io/r/#/c/17092/
Change-Id: Id0122d84eaf2c05d29e5be63a594d5e528ee7c9a
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Change-Id: I53ab8d17914e6563110354e4052109ac02bf8f3b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Split this work up into pieces.
Please don't add new wrappers to vpp_papi_provider.py.
Change-Id: I0f8f2afc4cd2bba07ea70ddecea2d7319f7b2e10
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Fix struct.error: expected bytes object got <class 'str'>
Change-Id: I837ae6e97e44c789a9372677151b157956525334
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Change-Id: Icdf6abc9e53d33b26fd1d531c7dda6be0bb9cb55
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
All callers of payload_to_info were required to wrap payload with str().
Refactor to call scapy's payload.load for raw payloads or specify the
specific fieldname.
Change-Id: I1c80599d4df8dc129dbb8274733afaad406d5bcf
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Part of further cleanups of this file.
Removed most wrappers that don't have conflicting signature with
message API.
Change-Id: I6acd93d20291feb7731eb35ab2eb8c9f22f4632c
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
In preparation to remove the wrappers in vpp_papi_provider.py, ensure
names used in tests match the actual API message names.
Change-Id: I230ca4eb75aa727ff68d702e085a2edbbc6b6d19
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Naveen suggested earlier today that we should refactor duplicate code.
This commit kicks off the effort.
Change-Id: I855b0f40d41d1f3a2e673f3b254b76b596409656
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Change unicode references to use text_type
Change-Id: Ia71c16e3235bc509abd3b1c651ae125f892ab108
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Create a common pg_send method for cases when results are just discarded.
Change-Id: I786960d2d7bbb96dcb407f6e59aa96951b7b19e7
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
use address_t and mac_address_t for IPv6 and ARP entries
and all other API calls in ip.api aprat from the route ones,
that will follow in a separate commit
Change-Id: I67161737c2184d3f8fc1e79ebd2b55121c5b0191
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
Change-Id: I7a48890c075826fbd8c75436dfdc5ffff230a693
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
The API calls that use any of vl_api_address_t, vl_api_ip4_address,
vl_api_ip6_address_t, vl_api_prefix_t, vl_api_ip4_prefix_t,
vl_api_ip6_prefix_t now accepts either the old style dictionary,
a text string (2001:db8::/32) or an ipaddress ojbect.
Unless it is called with '_no_type_conversion':True, it will
also return an appropriate ipaddress object.
Change-Id: I84e4a1577bd57f6b5ae725f316a523988b6a955b
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Change-Id: Id8669bbadd1d6b2054865a310a654e9b38d1667d
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
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>
|
|
self.assertTrue(packet.haslayer(msg_type))
File "/usr/lib/python2.7/unittest/case.py", line 422, in assertTrue
raise self.failureException(msg)
AssertionError: 0 is not true
* Scapy packet.haslayer() returns 1 or 0.
Replace with assertEqual(packet.haslayer(), 1) to fix tracebacks.
* Scapy has multiple layers called TCP/UDP
Specify the module name to prevent namespace collisions.
* Remove duplicate import.
Change-Id: I600f9f330075cd40e1da50f8b2ceb24f645f2c20
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Change-Id: I790f7785e183cc9aaffd5b593617c4e12a32e20d
Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
|
|
Use assert(Not)Equal()
Use assert{Greater,Less}[Equal]
Change-Id: I7c14570b8dce463ee13a67e9c1f10beb1a0308a8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
- common types on the API
- endpoints keyed in various ways for DP lookup
- conparison functions for VPP IP address types
Change-Id: If7ec0bbc5cea71fd0983fe78987d147ec1bd7ec8
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
|
|
Change-Id: I59235d11baac18785a4c90cdaf14e8f3ddf06dab
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
|
|
Jira: CSIT-1141
Change-Id: I162bb4e718bff188abefc7b2f33501de9c55bb03
Signed-off-by: Jan Gelety <jgelety@cisco.com>
|
|
DBGvpp# set int ip addr loop0 10.10.10.10/24
DBGvpp# set int ip addr loop0 10.10.10.11/24
set interface ip address: failed to add 10.10.10.11/24 which conflicts with 10.10.10.10/24 for interface loop0
Change-Id: Iba63ffafbd36b6146ce86adb78139da9d55b40ba
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
- move the IPv6 incomplete and glean node to ip6_neighbour.c (so it has access to ip6_neighbour_main_t)
- use the RA info config on the interface to find the multicast adj to use
Change-Id: I835e419072abe54fb09dafb0e7eb0a9e50eba1af
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
Change-Id: I4b5b60e7c6f618bb935eab1e96a2e79bbb14f58f
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
|
|
Add API call to send Router Solicitation messages.
Save info from incoming Router Advertisement messages and notify listeners.
Change-Id: Ie518b5492231e03291bd4c4280be4727bfecab46
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
|
|
Change-Id: I7fa7d0ebf73dab8264a2e5ddbd412600d78ead05
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
Change-Id: I8c42e26152f2ed1246f91b789887bfc923418bdf
Signed-off-by: Neale Ranns <nranns@cisco.com>
|