summaryrefslogtreecommitdiffstats
path: root/test/test_ip4_vrf_multi_instance.py
AgeCommit message (Collapse)AuthorFilesLines
2019-06-18fib: fib api updatesNeale Ranns1-9/+11
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>
2019-04-11Tests: Refactor tearDown show command logging, add lifecycle markers.Paul Vinciguerra1-3/+4
This change adds a consistent interface for adding test-specific show commands to log.txt. It also adds log markers for the execution of setUp[Class], tearDown[Class] in the logs. Change-Id: I7d42e396e594a59e866a7d55dac0af25548e657a Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-04-10Tests Cleanup: Fix missing calls to setUpClass/tearDownClass.Paul Vinciguerra1-0/+4
Continuation/Part 2 of https://gerrit.fd.io/r/#/c/17092/ Change-Id: Id0122d84eaf2c05d29e5be63a594d5e528ee7c9a Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-11VPP-1508: Use scapy.compat to manage packet level library differences.Paul Vinciguerra1-1/+3
Change-Id: Icdf6abc9e53d33b26fd1d531c7dda6be0bb9cb55 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-07Tests: Refactor payload_to_info()Paul Vinciguerra1-1/+1
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>
2019-03-06test framework: vpp_papi_provider.py - further cleanupOle Troan1-2/+2
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>
2018-08-08Remove unnecessary routes during vrf-multi-instances testsNeale Ranns1-3/+0
Change-Id: I0a7fd0df90eff522366cb55ad224fe24a3121e56 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-06-26Add negative tests for leaking across different VRFs - ip4/6Jan Gelety1-16/+86
Jira: CSIT-1140 Change-Id: I5c6dd44d3efb298f203e61b14345a2f13680bd34 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-04-13Enable check of VRF reset - IPv4Jan Gelety1-42/+64
Change-Id: I60818a22f543f9a3c3f62f9c67f5e4239e5b045a Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-09-11FIB table add/delete APINeale Ranns1-1/+3
part 2; - this adds the code to create an IP and MPLS table via the API. - but the enforcement that the table must be created before it is used is still missing, this is so that CSIT can pass. Change-Id: Id124d884ade6cb7da947225200e3bb193454c555 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-03Changing the IP table for an interface is an error if the interface already ↵Neale Ranns1-0/+1
has an address configured (VPP-601) Change-Id: I311fc264f73dd3b2b3ce9d7d1c33cd0515b36c4a Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-02Remove the unused VRF ID parameter from the IP neighbour Add/Del APINeale Ranns1-1/+1
Change-Id: Icf0d72f6af1f98c86f78e586c354515ac69804aa Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-01-27ipv4 vrf test doc cleaningJan Gelety1-6/+6
Change-Id: I0d3b47ce3c029d2ea01f9ff88a541affcbfd70db Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-01-11make test: improve documentation and PEP8 complianceKlement Sekera1-5/+6
Change-Id: Ib4f0353aab6112fcc3c3d8f0bcbed5bc4b567b9b Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-01-11test: ip4 vrf instances multi-context test (CSIT-492)Jan1-0/+410
- add/delete IPv4 VRF instances and verify results by parsing output of ip_fib_dump API command and by traffic Change-Id: I61ed5013adca29afd00b942f65be7bf964f38d85 Signed-off-by: Jan Gelety <jgelety@cisco.com>
contexts themselves, as well as labels for up to two user-supplied u32 labels, used to differentiate the lookup contexts for the debugging purposes. Creating a new context is done by calling acl_plugin.get_lookup_context_index(user_id, val1, val2). The first argument is your "user" ID obtained in a registration call earlier, the other two arguments are u32s with semantics that you designate. They are used purely for debugging purposes in the "show acl lookup context" command. To set the vector of ACL numbers to be looked up within the context, use the function acl_plugin.set_acl_vec_for_context(lc_index, acl_list). The first parameter specifies the context that you have created, the second parameter is a vector of u32s, each u32 being the index of the ACL which we should be looking up within this context. The command is idempotent, i.e. it unapplies the previously applied list of ACLs, and then sets the new list of ACLs. Subsequent ACL updates for the already applied ACLs will cause the re-application on an as-needed basis. Note, that the ACL application is potentially a relatively costly operation, so it is only expected that these changes will be done in the control plane, NOT in the datapath. The matching within the context is done using two functions - acl_plugin.fill_5tuple() and acl_plugin.match_5tuple() and their corresponding inline versions, named acl_plugin_fill_5tuple_inline() and acl_plugin_match_5tuple_inline(). The inline and non-inline versions have the equivalent functionality, in that the non-inline version calls the inline version. These two variants are provided for debugging/maintenance reasons. When you no longer need a particular context, you can return the allocated resources by calling acl_plugin.put_lookup_context_index() to mark it as free. The lookup structured associated with the vector of ACLs set for the lookup are cleaned up automatically. However, the ACLs themselves are not deleted and are available for subsequent reuse by other lookup contexts if needed. There is one delicate detail that you might want to be aware of. When the non-inline functions reference the inline functions, they are compiled as part of ACL plugin; whereas when you refer to the inline functions from your code, they are compiled as part of your code. This makes referring to a single acl_main structure a little trickier. It is done by having a static p_acl_main within the .h file, which points to acl_main of the ACL plugin, and is initialized by a static constructor function. This way the multiple includes and inlines will "just work" as one would expect. Debug CLIs ========== To see the state of the ACL lookup contexts, you can issue "show acl-plugin lookup user" to see all of the users which registered for the usage of the ACL plugin lookup contexts, and "show acl-plugin lookup context" to show the actual contexts created. You will notice that the latter command uses the values supplied during the module registration in order to make the output more friendly. The "show acl-plugin acl" and "show acl-plugin interface" commands have also acquired the notion of lookup context, but there it is used from the client perspective, since with this change the interface ACL lookup itself is a user of ACL lookup contexts.