aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_bfd.py
AgeCommit message (Expand)AuthorFilesLines
2021-05-21bfd: use vnet cryptoKlement Sekera1-1/+1
2021-05-13tests: move test source to vpp/testDave Wallace1-0/+2763
2020-12-22tests: move bfd tests to src/vnet/bfd/testDave Wallace1-2778/+0
2020-12-03tests: remove py2/py3 six compatability libraryPaul Vinciguerra1-2/+2
2020-08-27tests: "force solo" testcase supportAndrew Yourtchenko1-0/+24
2020-05-03tests: vpp_interface remove deprecated packed propertiesPaul Vinciguerra1-10/+10
2020-02-17bfd: use tw_timer_template instead of legacy wheelKlement Sekera1-2/+0
2020-01-30vppinfra: improve clocks_per_second convergenceDave Barach1-0/+2
2020-01-27bfd: reset peer discriminator on timeoutKlement Sekera1-0/+11
2020-01-02tests: bfd - move test_poll_response to EXTENDED_TESTSPaul Vinciguerra1-0/+2
2019-12-05tests: move bfd over gre to extended testsPaul Vinciguerra1-0/+1
2019-12-02tests: BFD python3 changessnaramre1-40/+5
2019-11-08tests: python3 use byte strings in raw()Ole Troan1-3/+3
2019-11-05misc: Fix python scripts shebang lineRenato Botelho do Couto1-1/+1
2019-09-04bfd: API cleanupJakub Grajciar1-33/+39
2019-06-18fib: fib api updatesNeale Ranns1-6/+2
2019-06-07bfd: UT for BFD session over GRE tunnelNeale Ranns1-13/+107
2019-03-11VPP-1508: Use scapy.compat to manage packet level library differences.Paul Vinciguerra1-13/+16
2019-03-11Tests: fix time.sleep(0) # yield. Reduce sleep related log messages.Paul Vinciguerra1-2/+2
2019-02-04VTL Cleanup: Fix missing calls to setUpClass/tearDownClass, fix numerous Type...Paul Vinciguerra1-1/+32
2018-12-20Tests: Cleanup @skip decorator.Paul Vinciguerra1-35/+35
2018-11-27VPP-1508 Fix for bug introduced in tests on use of repr.Paul Vinciguerra1-2/+2
2018-11-25VPP-1508 python3 tests: python3 repr.Paul Vinciguerra1-9/+13
2018-11-08make test: bfd refactorKlement Sekera1-1/+1
2018-10-02BFD: add get echo source API (VPP-1367)Matus Fabian1-0/+45
2018-09-11GBP Endpoint UpdatesNeale Ranns1-1/+2
2018-06-25make test: fix broken interfaces #2Klement Sekera1-2/+2
2018-06-24Revert "Revert "make test: fix broken interfaces""Klement Sekera1-3/+3
2018-06-22Revert "make test: fix broken interfaces"Ole Troan1-3/+3
2018-06-22make test: fix broken interfacesKlement Sekera1-3/+3
2018-04-17Add logging supportDamjan Marion1-2/+6
2017-10-21test bfd - DPO_PROTO_IP6 is part of DpoProtoGabriel Ganne1-2/+2
2017-08-08L2 over MPLSNeale Ranns1-3/+3
2017-05-02BFD: don't crash if interface is deletedKlement Sekera1-0/+30
2017-04-24make test: mark all BFD tests as extendedKlement Sekera1-0/+5
2017-04-20make test: improve bfd reliabilityKlement Sekera1-18/+30
2017-04-06BFD-FIB interactionsNeale Ranns1-1/+103
2017-04-03make test: relax BFD time intervalsKlement Sekera1-7/+9
2017-03-13Add MAC address check in ethernet-input node if interface in L3 modeJohn Lo1-1/+10
2017-03-08make test: split into basic and extended testsKlement Sekera1-2/+33
2017-03-02BFD: command line interfaceKlement Sekera1-20/+559
2017-02-26BFD: echo functionKlement Sekera1-48/+429
2017-02-17BFD: put session admin-up/admin-downKlement Sekera1-8/+36
2017-02-15BFD: loop back echo packetsKlement Sekera1-19/+103
2017-02-14BFD: respect remote demand modeKlement Sekera1-328/+509
2017-02-08make test: BFD tests speedupKlement Sekera1-2/+4
2017-02-08BFD: modify session parametersKlement Sekera1-13/+151
2017-02-02BFD: SHA1 authenticationKlement Sekera1-37/+696
2017-01-25make test: elegantly handle expected API failuresKlement Sekera1-6/+3
2017-01-17BFD: IPv6 supportKlement Sekera1-79/+142
ss="n">is_add) { pool_get (cwm->sa_sess_d[is_outbound], sa_sess); } else { u8 dev_id; sa_sess = pool_elt_at_index (cwm->sa_sess_d[is_outbound], sa_index); dev_id = cwm->qp_data[sa_sess->qp_index].dev_id; if (!sa_sess->sess) continue; if (rte_cryptodev_sym_session_free(dev_id, sa_sess->sess)) { clib_warning("failed to free session"); return -1; } memset(sa_sess, 0, sizeof(sa_sess[0])); } } } /* *INDENT-OFF* */ return 0; } static_always_inline int translate_crypto_algo(ipsec_crypto_alg_t crypto_algo, struct rte_crypto_sym_xform *cipher_xform) { switch (crypto_algo) { case IPSEC_CRYPTO_ALG_NONE: cipher_xform->cipher.algo = RTE_CRYPTO_CIPHER_NULL; break; case IPSEC_CRYPTO_ALG_AES_CBC_128: case IPSEC_CRYPTO_ALG_AES_CBC_192: case IPSEC_CRYPTO_ALG_AES_CBC_256: cipher_xform->cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC; break; case IPSEC_CRYPTO_ALG_AES_GCM_128: cipher_xform->cipher.algo = RTE_CRYPTO_CIPHER_AES_GCM; break; default: return -1; } cipher_xform->type = RTE_CRYPTO_SYM_XFORM_CIPHER; return 0; } static_always_inline int translate_integ_algo(ipsec_integ_alg_t integ_alg, struct rte_crypto_sym_xform *auth_xform, int use_esn) { switch (integ_alg) { case IPSEC_INTEG_ALG_NONE: auth_xform->auth.algo = RTE_CRYPTO_AUTH_NULL; auth_xform->auth.digest_length = 0; break; case IPSEC_INTEG_ALG_SHA1_96: auth_xform->auth.algo = RTE_CRYPTO_AUTH_SHA1_HMAC; auth_xform->auth.digest_length = 12; break; case IPSEC_INTEG_ALG_SHA_256_96: auth_xform->auth.algo = RTE_CRYPTO_AUTH_SHA256_HMAC; auth_xform->auth.digest_length = 12; break; case IPSEC_INTEG_ALG_SHA_256_128: auth_xform->auth.algo = RTE_CRYPTO_AUTH_SHA256_HMAC; auth_xform->auth.digest_length = 16; break; case IPSEC_INTEG_ALG_SHA_384_192: auth_xform->auth.algo = RTE_CRYPTO_AUTH_SHA384_HMAC; auth_xform->auth.digest_length = 24; break; case IPSEC_INTEG_ALG_SHA_512_256: auth_xform->auth.algo = RTE_CRYPTO_AUTH_SHA512_HMAC; auth_xform->auth.digest_length = 32; break; case IPSEC_INTEG_ALG_AES_GCM_128: auth_xform->auth.algo = RTE_CRYPTO_AUTH_AES_GCM; auth_xform->auth.digest_length = 16; auth_xform->auth.add_auth_data_length = use_esn? 12 : 8; break; default: return -1; } auth_xform->type = RTE_CRYPTO_SYM_XFORM_AUTH; return 0; } static_always_inline int create_sym_sess(ipsec_sa_t *sa, crypto_sa_session_t *sa_sess, u8 is_outbound) { u32 cpu_index = os_get_cpu_number(); dpdk_crypto_main_t * dcm = &dpdk_crypto_main; crypto_worker_main_t *cwm = &dcm->workers_main[cpu_index]; struct rte_crypto_sym_xform cipher_xform = {0}; struct rte_crypto_sym_xform auth_xform = {0}; struct rte_crypto_sym_xform *xfs; uword key = 0, *data; crypto_worker_qp_key_t *p_key = (crypto_worker_qp_key_t *)&key; if (sa->crypto_alg == IPSEC_CRYPTO_ALG_AES_GCM_128) { sa->crypto_key_len -= 4; clib_memcpy(&sa->salt, &sa->crypto_key[sa->crypto_key_len], 4); } else { sa->salt = (u32) rand(); } cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER; cipher_xform.cipher.key.data = sa->crypto_key; cipher_xform.cipher.key.length = sa->crypto_key_len; auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH; auth_xform.auth.key.data = sa->integ_key; auth_xform.auth.key.length = sa->integ_key_len; if (translate_crypto_algo(sa->crypto_alg, &cipher_xform) < 0) return -1; p_key->cipher_algo = cipher_xform.cipher.algo; if (translate_integ_algo(sa->integ_alg, &auth_xform, sa->use_esn) < 0) return -1; p_key->auth_algo = auth_xform.auth.algo; if (is_outbound) { cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT; auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE; cipher_xform.next = &auth_xform; xfs = &cipher_xform; } else { cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_DECRYPT; auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_VERIFY; auth_xform.next = &cipher_xform; xfs = &auth_xform; } p_key->is_outbound = is_outbound; data = hash_get(cwm->algo_qp_map, key); if (!data) return -1; sa_sess->sess = rte_cryptodev_sym_session_create(cwm->qp_data[*data].dev_id, xfs); if (!sa_sess->sess) return -1; sa_sess->qp_index = (u8)*data; return 0; } #endif /* __DPDK_ESP_H__ */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */