24 Commits

Author SHA1 Message Date
Abdel Baig
17a918133b bfd: add support for multihop
Type: feature

Change-Id: If23f9cc9317e7528f3c8d66303457206843a12c5
Signed-off-by: Abdel Baig <abdbaig@cisco.com>
2024-10-15 15:46:01 -04:00
Klement Sekera
d9b0c6fbf7 tests: replace pycodestyle with black
Drop pycodestyle for code style checking in favor of black. Black is
much faster, stable PEP8 compliant code style checker offering also
automatic formatting. It aims to be very stable and produce smallest
diffs. It's used by many small and big projects.

Running checkstyle with black takes a few seconds with a terse output.
Thus, test-checkstyle-diff is no longer necessary.

Expand scope of checkstyle to all python files in the repo, replacing
test-checkstyle with checkstyle-python.

Also, fixstyle-python is now available for automatic style formatting.

Note: python virtualenv has been consolidated in test/Makefile,
test/requirements*.txt which will eventually be moved to a central
location.  This is required to simply the automated generation of
docker executor images in the CI.

Type: improvement
Change-Id: I022a326603485f58585e879ac0f697fceefbc9c8
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2022-05-10 18:52:08 +00:00
Neale Ranns
63f2c7d701 bfd: Add an update API that has create new or modify existing semantics
Type: improvement

helps keep the agents stateless

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I3588f13c081e24f5a8083b490eb02856361e4ccb
2022-02-09 13:47:29 +00:00
Dave Wallace
eddd8e3588 tests: move test source to vpp/test
- Generate copyright year and version
  instead of using hard-coded data

Type: refactor

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I6058f5025323b3aa483f5df4a2c4371e27b5914e
2021-05-13 09:33:06 +00:00
Dave Wallace
9d7d599ca1 tests: move bfd tests to src/vnet/bfd/test
- Refactor make test code to be co-located with
  the vpp feature source code.

Type: test

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I3ef69bc915d2217357a9e2b1afa1cfd6c363faa0
2020-12-22 00:04:14 +00:00
Neale Ranns
efd7bc2b1c tests: Remove the unrequired VPP IP address/prefix class wrappers
Type: refactor

Change-Id: I204f3f8eebc5f5d5a377e91262f91c615fd00168
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-11-15 13:19:20 +00:00
Jakub Grajciar
4682feb1f0 bfd: API cleanup
Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I4b91ebe8aadbec8b95716ed1cde4b0a13eee3a3f
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-09-04 19:54:44 +00:00
Neale Ranns
52cd49616d bfd: UT for BFD session over GRE tunnel
Signed-off-by: Neale Ranns <nranns@cisco.com>

Adding UT for BFD over GRE tunnel.

Ticket: none
Type: test

Change-Id: I03eca4a0c7114cdc16fde9be4cd6db6216b8c845
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-07 15:21:16 +00:00
Paul Vinciguerra
3593a9174a tests: refactor vpp_object.py
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-29 16:02:27 +00:00
Klement Sekera
31da2e3031 Revert "Revert "ipsec: VPP-1316 calculate IP/TCP/UDP inner checksums""
This reverts commit e0d2bd6bd7fc59c0c6ac48195d7f825dc99bfd91.

Change-Id: If491e16f9ea66b2493a6a7c7f3c684ed585f8f51
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-06-24 22:53:37 +02:00
Ole Troan
e0d2bd6bd7 Revert "ipsec: VPP-1316 calculate IP/TCP/UDP inner checksums"
This reverts commit a98346f664aae148d26a8e158008b773d73db96f.

Change-Id: Iee5b3a5ddff0e8fd3a30fe5973cee24de434fe12
Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-22 22:37:55 +02:00
Klement Sekera
a98346f664 ipsec: VPP-1316 calculate IP/TCP/UDP inner checksums
Calculate IP/TCP/UDP checksums in software before adding authentication.

Change-Id: I3e121cb00aeba667764f39ade8d62170f18f8b6b
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-06-21 14:50:10 +00:00
Klement Sekera
2e01dfa25d make test: relax BFD time intervals
Increased time intervals mean longer test runs, but also reduce
the chance of getting annoying (especially in gerrit) random failures.
Now that tests are split into `basic' and `all', the increased runtime
of BFD tests (of which majority doesn't run in basic case) doesn't
matter too much..

Change-Id: I4a15bb4facad634f123bc9cc6f45eddbf4976fd1
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-04-03 17:23:56 +00:00
Klement Sekera
7388448712 BFD: command line interface
Implement command line interface to the BFD binary APIs. Add
corresponding unit tests.

Change-Id: Ia0542d0bc4c8d78e6f7b777a08fd94ebfe4d524f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-03-02 11:56:47 +00:00
Klement Sekera
239790fd91 BFD: echo function
Change-Id: Ib1e301d62b687d4e42434239e7cd412065c28da0
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-02-26 14:20:24 +00:00
Klement Sekera
c48829bb0a BFD: put session admin-up/admin-down
Change-Id: I7d8889dce8495607106593ad83320c9af0f2fa07
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-02-17 16:32:51 +00:00
Klement Sekera
aeeac3bf44 BFD: loop back echo packets
Change-Id: I772b63ac25ebfccaff9ab9d8d0b1445e85f21df7
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-02-15 12:10:23 +00:00
Klement Sekera
d3ba515d99 BFD: respect remote demand mode
Change-Id: I5063d31f5305c848043afb32fcacff6e61aed79f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-02-14 03:38:44 +01:00
Klement Sekera
a57a970952 BFD: modify session parameters
Change-Id: I666e5c0cc71a3693640960c93cdd1907f84fbe23
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-02-08 07:47:00 +01:00
Klement Sekera
b17dd9607e BFD: SHA1 authentication
Add authentication support to BFD feature. Out of three existing
authentication types, implement SHA1 (sole RFC requirement). Simple
password is insecure and MD5 is discouraged by the RFC, so ignore
those.
Add/change APIs to allow configuring BFD authentication keys
and their usage with BFD sessions.

Change-Id: Ifb0fb5b19c2e72196d84c1cde919bd4c074ea415
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-02-02 12:04:30 +00:00
Klement Sekera
46a87adf10 BFD: IPv6 support
Change-Id: Iaa9538c7cca500c04cf2704e5bf87480543cfcdf
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-01-17 22:02:02 +00:00
Klement Sekera
10db26f7bf BFD: fix bfd_udp_add API
Fix reporting of bs_index in the return message. Enhance test suite
to cover this case.

Change-Id: I37d35b850818bc1a05abe67ca919c22aeac978b6
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-01-11 19:49:31 +00:00
Klement Sekera
e4504c6320 BFD: fix timing in the main loop
Properly wakeup the main process loop only when necessary to avoid
missed events. Improve BFD unit test reliability and speed. Add
timestamps to logs and replace Queue with more efficient deque.

Change-Id: I01255a02057d3146917b43b669ccdc74f31ef0c8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-09 09:00:26 +00:00
Klement Sekera
0e3c0de1ed BFD: basic asynchronous session up/down
This is a work-in-progress basic BFD session handling. Only
asynchronous mode is supported at the moment. Setting the session flags
doesn't work.

Change-Id: Idba27f721b5c35be5a66a6d202a63d23ff7ecf6f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-07 19:54:12 +00:00