X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fcrypto%2Fipsec.robot;h=8403ae4516b17436af888d67047121629595e09f;hb=f67c6ca7cb2fa7c0a62f34931d69db71ba1092ff;hp=b55c8a83ce65e6361a8aba5f39b8d35e698806e4;hpb=aada4992a8d0de65707df858a274a3f2e024748d;p=csit.git diff --git a/resources/libraries/robot/crypto/ipsec.robot b/resources/libraries/robot/crypto/ipsec.robot index b55c8a83ce..8403ae4516 100644 --- a/resources/libraries/robot/crypto/ipsec.robot +++ b/resources/libraries/robot/crypto/ipsec.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Cisco and/or its affiliates. +# Copyright (c) 2023 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -69,7 +69,7 @@ | | ... | ${dut1} | ${DUT1_${int}2}[0] | ${tg_if2_ip4} | ${TG_pf2_mac}[0] | | Vpp Route Add | | ... | ${dut1} | ${tg_host_ip4} | ${ip4_plen} | gateway=${tg_if1_ip4} -| | ... | interface=${DUT1_${int}1}[0] +| | ... | interface=${DUT1_${int}1}[0] | strict=${False} | | Set Test Variable | ${dut_tun_ip} | ${dut_if1_ip4} | | Set Test Variable | ${tg_tun_ip} | ${tg_if1_ip4} | | Set Test Variable | ${tg_src_ip} | ${tg_host_ip4} @@ -96,7 +96,7 @@ | | ... | ${dut1} | ${DUT1_${int}1}[0] | ${tg_if1_ip6} | ${TG_pf1_mac}[0] | | VPP Add IP Neighbor | | ... | ${dut1} | ${DUT1_${int}2}[0] | ${tg_if2_ip6} | ${TG_pf2_mac}[0] -| | Vpp All RA Suppress Link Layer | ${nodes} +| | Vpp Interfaces RA Suppress On All Nodes | ${nodes} | | Vpp Route Add | | ... | ${dut1} | ${tg_host_ip6} | ${ip6_plen_rt} | gateway=${tg_if1_ip6} | | ... | interface=${DUT1_${int}1}[0] @@ -153,17 +153,17 @@ | | VPP IPsec Add SPD | ${node} | ${spd_id} | | VPP IPsec SPD Add If | ${node} | ${spd_id} | ${interface} | | ${action}= | Policy Action Bypass -| | VPP IPsec Policy Add | ${node} | ${spd_id} | ${p_hi} | ${action} +| | VPP IPsec Add SPD Entry | ${node} | ${spd_id} | ${p_hi} | ${action} | | ... | inbound=${TRUE} | proto=${ESP_PROTO} | is_ipv6=${is_ipv6} | | ... | laddr_range=${tg_tun_ip} | raddr_range=${dut_tun_ip} -| | VPP IPsec Policy Add | ${node} | ${spd_id} | ${p_hi} | ${action} +| | VPP IPsec Add SPD Entry | ${node} | ${spd_id} | ${p_hi} | ${action} | | ... | inbound=${FALSE} | proto=${ESP_PROTO} | is_ipv6=${is_ipv6} | | ... | laddr_range=${dut_tun_ip} | raddr_range=${tg_tun_ip} | | ${action}= | Policy Action Protect -| | VPP IPsec Policy Add | ${node} | ${spd_id} | ${p_lo} | ${action} +| | VPP IPsec Add SPD Entry | ${node} | ${spd_id} | ${p_lo} | ${action} | | ... | sa_id=${r_sa_id} | laddr_range=${l_ip} | | ... | raddr_range=${r_ip} | inbound=${TRUE} -| | VPP IPsec Policy Add | ${node} | ${spd_id} | ${p_lo} | ${action} +| | VPP IPsec Add SPD Entry | ${node} | ${spd_id} | ${p_lo} | ${action} | | ... | sa_id=${l_sa_id} | laddr_range=${l_ip} | | ... | raddr_range=${r_ip} | inbound=${FALSE} @@ -223,3 +223,59 @@ | | 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 + +| Set Data Plane And Feature Plane Workers for IPsec on all VPP DUTs +| | [Documentation] +| | ... | Disable crypto work for specified data plane CPU cores +| | ... | on all DUT nodes (leaving feature plane workers enabled). +| | ... | Set Round Robin interface RX placement on data plane CPU cores +| | ... | on all DUT nodes (leaving feature plane workers disabled). +| | +| | VPP Round Robin Rx Placement on all DUTs +| | ... | ${nodes} | prefix=${EMPTY} | use_dp_cores=${True} +| | VPP IPSec Crypto SW Scheduler Set Worker on all DUTs +| | ... | ${nodes} | crypto_enable=${False} + +| Enable SPD flow cache IPv4 Inbound +| | [Documentation] +| | ... | Enable IPv4 Inbound SPD flow cache in VPP configuration file. +| | +| | FOR | ${dut} | IN | @{duts} +| | | Run Keyword | ${dut}.Add IPsec SPD Flow cache IPv4 Inbound | on +| | | Run Keyword | ${dut}.Add IPsec SPD Fast Path IPv4 Inbound | on +| | END + +| Enable SPD flow cache IPv4 Outbound +| | [Documentation] +| | ... | Enable IPv4 Outbound SPD flow cache in VPP configuration file. +| | +| | FOR | ${dut} | IN | @{duts} +| | | Run Keyword | ${dut}.Add IPsec SPD Flow cache IPv4 Outbound | on +| | | Run Keyword | ${dut}.Add IPsec SPD Fast Path IPv4 Outbound | on +| | END + +| Enable IPsec SPD Fast Path IPv4 Inbound and Outbound +| | [Documentation] +| | ... | Enable IPsec SPD fast path IPv4 Inbound and outbound in VPP +| | ... | configuration file. +| | +| | ... | *Arguments:* +| | ... | - value - The number buckets for spd fast path. Type: int +| | +| | [Arguments] | ${value} +| | +| | FOR | ${dut} | IN | @{duts} +| | | Run Keyword | ${dut}.Add IPsec SPD Flow Cache IPv4 Outbound | off +| | | Run Keyword | ${dut}.Add IPsec SPD Flow Cache IPv4 Inbound | off +| | | Run Keyword | ${dut}.Add IPsec SPD Fast Path IPv4 Outbound | on +| | | Run Keyword | ${dut}.Add IPsec SPD Fast Path IPv4 Inbound | on +| | | Run Keyword | ${dut}.Add IPsec SPD Fast Path Num Buckets | ${value} +| | END