diff options
author | Yulong Pei <yulong.pei@intel.com> | 2020-08-19 18:30:34 +0800 |
---|---|---|
committer | Jan Gelety <jgelety@cisco.com> | 2020-09-11 13:18:02 +0000 |
commit | 262b202ce95fb5cfb80dfd783c0b8a0f94e48533 (patch) | |
tree | 62b1763c908aa2aaabc082da868dcfe72e27e38b /resources | |
parent | 3d394523e4cc49e71e25140f03f0d96674211da1 (diff) |
Add ipsec async mode performance test cases
In VPP 20.05, vpp added async crypto engine that support to use QAT hardware
to do encryption and decryption, vnet/ipsec enabled async mode to use async
crypto engine.
Current async crypto engine also use dpdk_cryptodev as async handlers, in the
future it may add other native QAT driver as async handlers.
Note that async crypto engine is to support vnet/ipsec, it is different
with current existing dpdk backend which itself has ESP implementation
in plugins/dpdk/ipsec.
Change-Id: I4e6eaa7ca1eddb8b1c45212de0684fb26907119b
Signed-off-by: Yulong Pei <yulong.pei@intel.com>
(cherry picked from commit d12f510caf3bb83695488684eb07de79b3e753b9)
Diffstat (limited to 'resources')
-rw-r--r-- | resources/api/vpp/supported_crcs.yaml | 2 | ||||
-rw-r--r-- | resources/libraries/python/IPsecUtil.py | 19 | ||||
-rw-r--r-- | resources/libraries/robot/crypto/ipsec.robot | 8 |
3 files changed, 29 insertions, 0 deletions
diff --git a/resources/api/vpp/supported_crcs.yaml b/resources/api/vpp/supported_crcs.yaml index c4bc243aae..c3eb03226b 100644 --- a/resources/api/vpp/supported_crcs.yaml +++ b/resources/api/vpp/supported_crcs.yaml @@ -134,6 +134,8 @@ ipsec_spd_entry_add_del_reply: '0x9ffac24b' # dev ipsec_tunnel_if_add_del: '0x2b135e68' # perf ipsec_tunnel_if_add_del_reply: '0x5383d31f' # perf + ipsec_set_async_mode: '0xa6465f7c' #perf + ipsec_set_async_mode_reply: '0xe8d4e804' #perf # ^^ tc01-64B-1c-ethip4ipsec1tnlhw-ip4base-int-aes256gcm-mrr # ^ See select_backend. # l2_fib_table_dump / details # honeycomb diff --git a/resources/libraries/python/IPsecUtil.py b/resources/libraries/python/IPsecUtil.py index 63fb6f1e8e..36e984923b 100644 --- a/resources/libraries/python/IPsecUtil.py +++ b/resources/libraries/python/IPsecUtil.py @@ -264,6 +264,25 @@ class IPsecUtil: papi_exec.add(cmd, **args).get_reply(err_msg) @staticmethod + def vpp_ipsec_set_async_mode(node, async_enable=1): + """Set IPsec async mode on|off. + + :param node: VPP node to set IPsec async mode. + :param async_enable: Async mode on or off. + :type node: dict + :type async_enable: int + :raises RuntimeError: If failed to set IPsec async mode or if no API + reply received. + """ + cmd = u"ipsec_set_async_mode" + err_msg = f"Failed to set IPsec async mode on host {node[u'host']}" + args = dict( + async_enable=async_enable + ) + with PapiSocketExecutor(node) as papi_exec: + papi_exec.add(cmd, **args).get_reply(err_msg) + + @staticmethod def vpp_ipsec_add_sad_entry( node, sad_id, spi, crypto_alg, crypto_key, integ_alg=None, integ_key=u"", tunnel_src=None, tunnel_dst=None): diff --git a/resources/libraries/robot/crypto/ipsec.robot b/resources/libraries/robot/crypto/ipsec.robot index b55c8a83ce..ec5884daa6 100644 --- a/resources/libraries/robot/crypto/ipsec.robot +++ b/resources/libraries/robot/crypto/ipsec.robot @@ -223,3 +223,11 @@ | | Vpp Route Add | | ... | ${dut1} | ${laddr_ip4} | 8 | gateway=${tg_if1_ip4} | | ... | interface=${DUT1_${int}1}[0] + +| Enable IPSec Async Mode on all VPP DUTs +| | [Documentation] +| | ... | Set IPsec async mode on for all DUT nodes. +| | +| | FOR | ${dut} | IN | @{duts} +| | | VPP Ipsec Set Async Mode | ${nodes['${dut}']} +| | END |