summaryrefslogtreecommitdiffstats
path: root/test/test_gbp.py
AgeCommit message (Collapse)AuthorFilesLines
2021-11-23misc: deprecate gbp and its dependentsNeale Ranns1-5926/+0
Type: improvement Signed-off-by: Neale Ranns <nranns@cisco.com> Signed-off-by: Benoît Ganne <bganne@cisco.com> Change-Id: I2f30a4f04fd9a8635ce2d259b5fd5b0c85cee8c3
2021-07-13fib: Set the GLEAN flag on attached export routes so that the SAS worksNeale Ranns1-1/+1
correctly. Type: fix Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I4bc2eb394a8f9d01c5a12de2ce963c22209d5439
2021-05-13tests: move test source to vpp/testDave Wallace1-0/+5926
- Generate copyright year and version instead of using hard-coded data Type: refactor Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I6058f5025323b3aa483f5df4a2c4371e27b5914e
2019-08-22tests: move plugin tests to src/plugins/*/testDave Wallace1-5425/+0
- Relocate plugin tests for 'make test' into src/plugins/*/test so that plugin test cases are co-located with the plugin source code. Type: refactor Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I503e6a43528e14981799b735fa65674155713f67 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-08-14gbp: add local l3out redirect to local SEP unit testBenoît Ganne1-3/+36
Type: test Change-Id: Ia6dad86d02f6f665a3e6960812b2527eaabb65f1 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-08-09gbp: add remote EP redirect to remote SEP unit testBenoît Ganne1-1/+94
Type: test Change-Id: I4dd685f9acd4d467e0967e6fdd428558ffc8b209 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-08-09gbp: add unknown remote EP redirect unit testBenoît Ganne1-6/+27
Type: test Change-Id: I1dfbeef08a4f112551450682fc4040820251485b Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-08-07gbp: add l3out redirect to remote SEP unit testBenoît Ganne1-0/+172
Type: test Change-Id: I0fafaebbb1f70488e0bc7d21da778d55fe15c3f5 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-11gbp: An Endpoint can change sclassNeale Ranns1-1/+65
Type: feature Change-Id: I9d3a73a6a6048fa0189f7fa6306a638279977fcd Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-09gbp: Ownership of dynamically created vxlan-gbp tunnels managed via gbp_itfNeale Ranns1-19/+66
Type: fix This solves the ownership of vxlan-gbp tunnels. When the last reference of these goes away they need to be deleted. Currently there are two owners; gbp_itf via gef_itf and the lock held by the gbp_endpoint_location_t. The problem is that the loc removes its reference whilst the fwd still holds the gbp_itf, and things go wrong. This change moves the lifecycle management of the vxlan-gbp tunnel to the gbp_itf. When the last lock of the gbp_itf goes, so does the tunnel. now both the EP's loc and fwd can hold a lock on the gbp_itf and it's only removed when required. The other change is the management of the 'user' of the gbp_itf. Since each user can enable and disable different features, it's the job of the gbp_itf to apply the combined set. determining a unique 'uesr' from the caller was near impossible, so I moved that to the gbp_itf, and return the allocated user, hence the 'handle' that encodes both user and interface. The hash table maps from sw_if_index to pool index. Change-Id: I4c7bf4c0e5dcf33d1c545f262365e69151febcf4 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-08gbp: More unit testsNeale Ranns1-55/+449
Type: test Change-Id: I0a58cc19bdfb73eabadbf6eb49b57e8db96959b5 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-05vxlan-gbp: Decap ignores reserved bitsNeale Ranns1-4/+7
Type: fix from the draft: 3. Backward Compatibility VXLAN [RFC7348] requires reserved fields to be set to zero on transmit and ignored on receive. Change-Id: I98544907894f1a6eba9595a37c3c88322905630e Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-05gbp: add unit-tests for anonymous l3outBenoît Ganne1-26/+495
Type: test Change-Id: Ib32c87b7f07c0552a6801a895332a0156c3c37f0 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-03gbp: Consider data-plane learnt source better than control-planeNeale Ranns1-5/+71
Type: feature Change-Id: Ice8fc0da6450d2aa8ba63ca1277393ac3605aa2c Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-01gbp: VRF scoped contractsNeale Ranns1-82/+108
Type: feature Change-Id: I01772cfc3a0118a5c49bf346339788824e6931b2 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-26gbp: enforce same endpoint mac and ip srcBenoît Ganne1-3/+13
During packet classification, make sure packets coming from an EP also matches this specific EP IP address and vice-versa. This prevents and EP to send a packet on behalf of another EP. Type: fix Change-Id: I30287644ec73b90d9b6913952a82b2baedf6a5ff Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-06-25tests: fix test_gbp.py.Paul Vinciguerra1-15/+58
A number of VppGbpContractRules were missing the hash_mode_t and were being replaced by an optional kwarg. Type: fix Change-Id: I6ca03c93b69e4355c237a6c9402e1e178b701b21 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-19l2: BD ARP termination entry API updateNeale Ranns1-4/+5
Type: refactor Change-Id: I492b6e88acadf0ab0e4d7b1c0c5d1cab84c1726f Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-18fib: fib api updatesNeale Ranns1-8/+9
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-06-06gbp: fix lpm classification with vlanBenoît Ganne1-0/+33
Fix GBP LPM packet classification in the presence of a VLAN header. Change-Id: I2ff63b34f7475d696b10b5a245ff802bbb1ff01a Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-05-17Tests: Raise exception if API cli_inband command fails.Paul Vinciguerra1-3/+3
* Configure tests to raise exception if cli_inband fails. * Fix failing tests. * Add filename detail to pcap.stat clib_error_return for debugging. Note: this change identifies spurious issues with packet-generator such as: CliFailedCommandError: packet-generator capture: pcap file '/tmp/vpp-unittest-Test6RD-v09RPA/pg0_out.pcap' does not exist. These issues resolve themselves on remaining test passes. Change-Id: Iecbd09daee954d892306d11baff3864a43c5b603 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-17gbp: Add unit tests for contractsMohsin Kazmi1-1/+224
Change-Id: Ib6615739b1db44b7788f462196cd477b6e23d67e Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-05-16tests: refactor. Replace literal constant w/ named constant.Paul Vinciguerra1-44/+52
* 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>
2019-05-02NAT: VPP-1661 - test case cleanup and refactoringFilip Varga1-158/+129
Change-Id: I0eb85252d4b489ba25dcf59252e2bcf3b0cd5c6a Signed-off-by: Filip Varga <fivarga@cisco.com>
2019-04-24NAT: VPP-1531 api cleanup & updateFilip Varga1-17/+17
Change-Id: I2492400a67b39a3adbc24ab7cf1ba17a409e95a8 Signed-off-by: Filip Varga <fivarga@cisco.com>
2019-04-23Revert "NAT: VPP-1531 api cleanup & update"Ole Trøan1-17/+17
This reverts commit bed1421b9f1b3643d93384084972337b596aec73. /vpp/master3/src/plugins/nat/nat_api.c: In function ‘send_nat_worker_details’: /vpp/master3/src/vppinfra/clib.h:62:33: error: division ‘sizeof (u8 * {aka unsigned char *}) / sizeof (u8 {aka unsigned char})’ does not compute the number of array elements [-Werror=sizeof-pointer-div] #define ARRAY_LEN(x) (sizeof (x)/sizeof (x[0])) ^ /vpp/master3/src/plugins/nat/nat_api.c:205:43: note: in expansion of macro ‘ARRAY_LEN’ rmp = vl_msg_api_alloc (sizeof (*rmp) + ARRAY_LEN (w->name) - 1); ^~~~~~~~~ Change-Id: Ie82672c145fb2f6580827f95e535435307bc7a23 Signed-off-by: Ole Troan <ot@cisco.com>
2019-04-23NAT: VPP-1531 api cleanup & updateFilip Varga1-17/+17
Change-Id: I519d7efc8ee3c86381d96be2e2a46017cd948895 Signed-off-by: Filip Varga <fivarga@cisco.com>
2019-04-16gbp: Add support for allow sclass/dclass 1Mohsin Kazmi1-0/+40
Change-Id: I51f61a399e3eace93011f9431cbd7968e9be627c Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-04-10Tests Cleanup: Fix missing calls to setUpClass/tearDownClass.Paul Vinciguerra1-1/+9
Continuation/Part 2 of https://gerrit.fd.io/r/#/c/17092/ Change-Id: Id0122d84eaf2c05d29e5be63a594d5e528ee7c9a Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-04-08GBP: drop and contract countersNeale Ranns1-1/+24
Change-Id: Ib436512a26e53f70f7b5e47bf34224ab73e5244e Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-06gbp: Add gbp bd flags unit testMohsin Kazmi1-1/+86
Change-Id: I5b18cb84bec88f5514cacd2df61b5ce3c70abd77 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-04-04gbp: Add bd flagsMohsin Kazmi1-1/+5
Add flags for unknown unicast drop, multicast and broadcast drop and arp unicast. Change-Id: I1203137510b8bee0a20ecfe5f2efad8043d4bac6 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-04-03GBP: iVXLAN reflection checkNeale Ranns1-0/+15
packets should not egress on an iVXLAN tunnel if they arrived on one. Change-Id: I9adca30252364b4878f99e254aebc73b70a5d4d6 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-29tests: test/vpp_l2.py fix missing name.Paul Vinciguerra1-2/+1
test/vpp_l2.py:213:26: F821 undefined name 'L2_VTR_OP' self.itf.set_vtr(L2_VTR_OP.L2_DISABLED) Move L2_VTR_OP enum to vpp_sub_interface.py where the VTR code is found. Change-Id: I9eb9a3a2c679813c221ce1d0c4fa8aac6076c443 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-29tests: refactor vpp_object.pyPaul Vinciguerra1-30/+0
Move __str__ to super for all subclasses of VppObject Implement __repr__ in VppObject Implement __hash__ and __eq__ Change-Id: Ibd4ea37b84b17f499ab86630fb5b9ed9c8b4b1c2 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-28Typos. A bunch of typos I've been collecting.Paul Vinciguerra1-22/+22
Change-Id: I53ab8d17914e6563110354e4052109ac02bf8f3b Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-27GBP: fixes for l3-out routingNeale Ranns1-52/+257
Change-Id: I4d73b712da911588d511a8401b73cdc3c66346fe Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-14GBP: get source address from ARP packets for LPM classificationNeale Ranns1-0/+10
Change-Id: I1370c1882f8ba9b709e54e62356d2c57d47d20fc Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-12GBP: L3 out fixesNeale Ranns1-34/+102
Change-Id: I0562d597fd45c7ddcb6db42cf17d3ffb569eb140 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-12GBP: contracts API fixed length of allowed ethertypesNeale Ranns1-1/+4
VAPI does not handle two VLAs in one struct. Change-Id: I259c998bef4398ead2bbb9e788350d50c2f05694 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-11vpp_papi_provider: Remove more wrapper functions.Ole Troan1-3/+3
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>
2019-03-11VPP-1508: Tests: Fix vpp_api struct.error under py3.Paul Vinciguerra1-3/+3
Fix struct.error: expected bytes object got <class 'str'> Change-Id: I837ae6e97e44c789a9372677151b157956525334 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-11VPP-1508: Use scapy.compat to manage packet level library differences.Paul Vinciguerra1-1/+1
Change-Id: Icdf6abc9e53d33b26fd1d531c7dda6be0bb9cb55 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-06GBP: use sclass in the DP for policyNeale Ranns1-70/+60
Change-Id: I154e18f22ec7708127b8ade98e80546ab1dcd05b Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-06GBP: learn from ARP and L2 packetsNeale Ranns1-9/+108
Change-Id: I8af7bca566ec7c9bd2b72529d49e04c6e649b44a Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-05GBP: per-group EP retention policyNeale Ranns1-38/+34
Change-Id: I3ed4e2e92f74f15b07fcd3e7fbc3fa8718d5249d Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-04test framework: Fix wrapper functions to match API message names.Ole Troan1-3/+3
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>
2019-03-01Tests: Remove all wildcard imports.Paul Vinciguerra1-16/+14
They mask dependencies and confuse third party tools. Change-Id: I24ee16bfa0d746a8e8cb99891ba8b20523048b69 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-01-22GBP: Sclass to src-epg conversionsNeale Ranns1-166/+83
Change-Id: Ica88268fd6a6ee01da7e9219bb4e81f22ed2fd4b Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-01-10ARP/ND: copy opaque2 persistent fields to new packetNeale Ranns1-2/+3
Change-Id: Ic65f686aaccaf8450732d88d7471b587faccaa9d Signed-off-by: Neale Ranns <nranns@cisco.com>