diff options
author | Peter Mikus <pmikus@cisco.com> | 2019-01-25 20:17:54 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2019-01-30 07:18:20 +0000 |
commit | b573e5b2823746ca7940938df8cdaafca3812a1f (patch) | |
tree | 8acf27ff42fd316b912f786897cfb92a10ebf551 /resources/libraries/robot | |
parent | c2a5a359b627e1db91cdf86ea642d2a6e576b195 (diff) |
CSIT-1409 Implement pipeline configuration for l2bd with memif/ip4.
Change-Id: I7463d47a9d65069332eb2a288ff44f4499a8a467
Signed-off-by: Peter Mikus <pmikus@cisco.com>
(cherry picked from commit 11bd03f27a53fa6060bfa72bc98c52532cb6e404)
Diffstat (limited to 'resources/libraries/robot')
-rw-r--r-- | resources/libraries/robot/performance/performance_configuration.robot | 72 | ||||
-rw-r--r-- | resources/libraries/robot/shared/container.robot | 4 | ||||
-rw-r--r-- | resources/libraries/robot/shared/memif.robot | 14 |
3 files changed, 80 insertions, 10 deletions
diff --git a/resources/libraries/robot/performance/performance_configuration.robot b/resources/libraries/robot/performance/performance_configuration.robot index 5ade4fa037..5873701342 100644 --- a/resources/libraries/robot/performance/performance_configuration.robot +++ b/resources/libraries/robot/performance/performance_configuration.robot @@ -3105,6 +3105,68 @@ | | Set interfaces in path up | | Show Memif on all DUTs | ${nodes} +| Initialize L2 Bridge Domain for pipeline with memif pairs +| | [Documentation] +| | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each +| | ... | Memif interface to separate L2 bridge domain with one physical or +| | ... | virtual interface to create a service pipeline on DUT node. +| | ... +| | ... | *Arguments:* +| | ... | - nf_chain - NF pipe. Type: integer +| | ... | - nf_nodes - Number of NFs nodes per pipeline. Type: integer +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Initialize L2 Bridge Domain for pipeline with memif pairs \ +| | ... | \| 1 \| 1 \| +| | ... +| | [Arguments] | ${nf_chain}=${1} | ${nf_nodes}=${1} +| | ... +| | ${duts}= | Get Matches | ${nodes} | DUT* +| | :FOR | ${dut} | IN | @{duts} +| | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if1} | ${1} +| | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if2} | ${2} +| | | ${nf_id_frst}= | Evaluate | (${nf_chain}-${1}) * ${nf_nodes} + ${1} +| | | ${nf_id_last}= | Evaluate | (${nf_chain}-${1}) * ${nf_nodes} + ${nf_nodes} +| | | ${sid_frst}= | Evaluate | ${nf_id_frst} * ${2} - ${1} +| | | ${sid_last}= | Evaluate | ${nf_id_last} * ${2} +| | | Set up single memif interface on DUT node | ${nodes['${dut}']} +| | | ... | memif-${dut}_CNF | mid=${nf_id_frst} | sid=${sid_frst} +| | | ... | memif_if=${dut}-memif-${nf_id_frst}-if1 +| | | ... | rxq=${rxq_count_int} | txq=${rxq_count_int} +| | | Set up single memif interface on DUT node | ${nodes['${dut}']} +| | | ... | memif-${dut}_CNF | mid=${nf_id_last} | sid=${sid_last} +| | | ... | memif_if=${dut}-memif-${nf_id_last}-if2 +| | | ... | rxq=${rxq_count_int} | txq=${rxq_count_int} +| | | Add interface to bridge domain | ${nodes['${dut}']} +| | | ... | ${${dut}-memif-${nf_id_frst}-if1} | ${1} +| | | Add interface to bridge domain | ${nodes['${dut}']} +| | | ... | ${${dut}-memif-${nf_id_last}-if2} | ${2} + +| Initialize L2 Bridge Domain for multiple pipelines with memif pairs +| | [Documentation] +| | ... | Create pairs of Memif interfaces for defined number of NF pipelines +| | ... | with defined number of NF nodes on all defined VPP nodes. Add each +| | ... | Memif interface into L2 bridge domains with learning enabled +| | ... | with physical inteface or Memif interface of another NF. +| | ... +| | ... | *Arguments:* +| | ... | - nf_chains - Number of pipelines of NFs. Type: integer +| | ... | - nf_nodes - Number of NFs nodes per pipeline. Type: integer +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Initialize L2 Bridge Domain for multiple pipelines with memif \ +| | ... | pairs \| 1 \| 1 \| +| | ... +| | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} +| | ... +| | :FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains}+1 +| | | Initialize L2 Bridge Domain for pipeline with memif pairs +| | | ... | nf_chain=${nf_chain} | nf_nodes=${nf_nodes} +| | Set interfaces in path up +| | Show Memif on all DUTs | ${nodes} + | Initialize L2 Bridge Domain with memif pairs and VLAN in circular topology | | [Documentation] | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each @@ -3349,9 +3411,10 @@ | | ${duts}= | Get Matches | ${nodes} | DUT* | | :FOR | ${dut} | IN | @{duts} | | | ${sock}= | Set Variable | memif-${dut}_CNF +| | | ${sid}= | Evaluate | (${number} * ${2}) - ${1} | | | Set up single memif interface on DUT node | ${nodes['${dut}']} | ${sock} -| | | ... | ${number} | ${dut}-memif-${number}-if1 | ${rxq_count_int} -| | | ... | ${rxq_count_int} +| | | ... | mid=${number} | sid=${sid} | memif_if=${dut}-memif-${number}-if1 +| | | ... | rxq=${rxq_count_int} | txq=${rxq_count_int} | | | Configure L2XC | ${nodes['${dut}']} | ${${dut}_if1} | | | ... | ${${dut}-memif-${number}-if1} | | Set single interfaces in path up @@ -3381,9 +3444,10 @@ | | ${duts}= | Get Matches | ${nodes} | DUT* | | :FOR | ${dut} | IN | @{duts} | | | ${sock}= | Set Variable | memif-${dut}_CNF +| | | ${sid}= | Evaluate | (${number} * ${2}) - ${1} | | | Set up single memif interface on DUT node | ${nodes['${dut}']} | ${sock} -| | | ... | ${number} | ${dut}-memif-${number}-if1 | ${rxq_count_int} -| | | ... | ${rxq_count_int} +| | | ... | mid=${number} | sid=${sid} | memif_if=${dut}-memif-${number}-if1 +| | | ... | rxq=${rxq_count_int} | txq=${rxq_count_int} | | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if1} | | | ... | ${number} | | | Add interface to bridge domain | ${nodes['${dut}']} diff --git a/resources/libraries/robot/shared/container.robot b/resources/libraries/robot/shared/container.robot index cbfbccc787..c08dc71fa6 100644 --- a/resources/libraries/robot/shared/container.robot +++ b/resources/libraries/robot/shared/container.robot @@ -151,6 +151,10 @@ | | ... | ${group}.Configure VPP In All Containers | ${container_chain_topology} | | ... | tg_if1_mac=${tg_if1_mac} | tg_if2_mac=${tg_if2_mac} | | ... | nodes=${nf_nodes} +| | ... | ELSE IF | '${container_chain_topology}' == 'pipeline_ip4' +| | ... | ${group}.Configure VPP In All Containers | ${container_chain_topology} +| | ... | tg_if1_mac=${tg_if1_mac} | tg_if2_mac=${tg_if2_mac} +| | ... | nodes=${nf_nodes} | | ... | ELSE IF | '${container_chain_topology}' == 'cross_horiz' | | ... | ${group}.Configure VPP In All Containers | ${container_chain_topology} | | ... | dut1_if=${dut1_if2} | dut2_if=${dut2_if2} diff --git a/resources/libraries/robot/shared/memif.robot b/resources/libraries/robot/shared/memif.robot index a4334058c9..482a4cf77b 100644 --- a/resources/libraries/robot/shared/memif.robot +++ b/resources/libraries/robot/shared/memif.robot @@ -56,6 +56,7 @@ | | [Arguments] | ${dut_node} | ${filename1} | ${filename2} | ${mid}=${1} | | ... | ${memif_if1}=memif_if1 | ${memif_if2}=memif_if2 | ${rxq}=${1} | | ... | ${txq}=${1} | ${role}=slave | ${dcr_uuid}=${EMPTY} +| | ... | | ${sid_1}= | Evaluate | (${mid}*2)-1 | | ${sid_2}= | Evaluate | (${mid}*2) | | ${memif_1}= | Create memif interface | ${dut_node} @@ -75,12 +76,13 @@ | | ... | *Arguments:* | | ... | - dut_node - DUT node. Type: dictionary | | ... | - filename - Socket filename for Memif interface. Type: string -| | ... | - mid - Memif interface ID. Type: integer +| | ... | - mid - Memif interface ID (Optional). Type: integer +| | ... | - sid - Memif socket ID (Optional). Type: integer | | ... | - memif_if - Name of the Memif interface (Optional). | | ... | Type: string -| | ... | - rxq - RX queues. Type: integer -| | ... | - txq - TX queues. Type: integer -| | ... | - role - Memif role. Type: string +| | ... | - rxq - RX queues (Optional). Type: integer +| | ... | - txq - TX queues (Optional). Type: integer +| | ... | - role - Memif role (Optional). Type: string | | ... | | ... | _NOTE:_ This KW sets following test case variable: | | ... | - ${${memif_if}} - Memif interface. @@ -91,9 +93,9 @@ | | ... | \| ${nodes['DUT1']} \| sock1 \| 1 \| dut1_memif_if1 \| 1 \| 1 \ | | ... | \| slave \| | | ... -| | [Arguments] | ${dut_node} | ${filename} | ${mid}=${1} +| | [Arguments] | ${dut_node} | ${filename} | ${mid}=${1} | ${sid}=${1} | | ... | ${memif_if}=memif_if1 | ${rxq}=${1} | ${txq}=${1} | ${role}=slave -| | ${sid}= | Evaluate | (${mid}*2)-1 +| | ... | | ${memif}= | Create memif interface | ${dut_node} | ${filename}${mid}-${sid} | | ... | ${mid} | ${sid} | rxq=${rxq} | txq=${txq} | role=${role} | | Set Interface State | ${dut_node} | ${memif} | up |