X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fip%2Fip4.robot;h=ef5b27f7de815a163e0e025d5aed1d2ded0911e4;hp=3b2724fe757bacc6e449f051d3faad63397773d3;hb=7829fea4a2c8936513fa95215b7d84997f814a69;hpb=0e8a09b2ab237b8107f4e60b983fc6191118bb1c diff --git a/resources/libraries/robot/ip/ip4.robot b/resources/libraries/robot/ip/ip4.robot index 3b2724fe75..ef5b27f7de 100644 --- a/resources/libraries/robot/ip/ip4.robot +++ b/resources/libraries/robot/ip/ip4.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Cisco and/or its affiliates. +# Copyright (c) 2021 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: @@ -32,13 +32,16 @@ | | ... | Type: string | | ... | - remote_host2_ip - IP address of remote host2 (Optional). | | ... | Type: string +| | ... | - remote_host_mask - Mask of remote host IP addresses (Optional). +| | ... | Type: string | | | | ... | *Example:* | | | | ... | \| Initialize IPv4 forwarding in circular topology \ -| | ... | \| 192.168.0.1 \| 192.168.0.2 \| +| | ... | \| 192.168.0.1 \| 192.168.0.2 \| 24 \| | | | | [Arguments] | ${remote_host1_ip}=${NONE} | ${remote_host2_ip}=${NONE} +| | ... | ${remote_host_mask}=32 | | | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error | | ... | Variable Should Exist | ${dut2} @@ -81,18 +84,18 @@ | | ... | interface=${DUT2_${int}1}[0] | | | | Run Keyword Unless | '${remote_host1_ip}' == '${NONE}' -| | ... | Vpp Route Add | ${dut1} | ${remote_host1_ip} | 32 +| | ... | Vpp Route Add | ${dut1} | ${remote_host1_ip} | ${remote_host_mask} | | ... | gateway=10.10.10.2 | interface=${DUT1_${int}1}[0] | | Run Keyword Unless | '${remote_host2_ip}' == '${NONE}' -| | ... | Vpp Route Add | ${dut} | ${remote_host2_ip} | 32 +| | ... | Vpp Route Add | ${dut} | ${remote_host2_ip} | ${remote_host_mask} | | ... | gateway=20.20.20.2 | interface=${dut_if2} | | Run Keyword Unless | '${remote_host1_ip}' == '${NONE}' | | ... | Run Keyword If | '${dut2_status}' == 'PASS' -| | ... | Vpp Route Add | ${dut1} | ${remote_host1_ip} | 32 +| | ... | Vpp Route Add | ${dut1} | ${remote_host1_ip} | ${remote_host_mask} | | ... | gateway=1.1.1.2 | interface=${DUT1_${int}2}[0] | | Run Keyword Unless | '${remote_host2_ip}' == '${NONE}' | | ... | Run Keyword If | '${dut2_status}' == 'PASS' -| | ... | Vpp Route Add | ${dut2} | ${remote_host2_ip} | 32 +| | ... | Vpp Route Add | ${dut2} | ${remote_host2_ip} | ${remote_host_mask} | | ... | gateway=1.1.1.1 | interface=${DUT2_${int}1}[0] | Initialize IPv4 forwarding with scaling in circular topology @@ -316,6 +319,8 @@ | | ... | - nf_nodes - Number of guest VMs. Type: integer | | ... | - testpmd_mac - Switch for testpmd_mac test configuration. | | ... | Type: boolean +| | ... | - virtio_feature_mask - Enabled Virtio features (Optional). +| | ... | Type: integer | | | | ... | *Note:* | | ... | Socket paths for VM are defined in following format: @@ -328,6 +333,7 @@ | | ... | topology \| 1 \| | | | | [Arguments] | ${nf_nodes}=${1} | ${testpmd_mac}=${FALSE} +| | ... | ${virtio_feature_mask}=${None} | | | | Set interfaces in path up | | ${fib_table_1}= | Set Variable | ${101} @@ -356,6 +362,7 @@ | | | Configure vhost interfaces | ${dut1} | | | ... | /var/run/vpp/sock-${number}-1 | /var/run/vpp/sock-${number}-2 | | | ... | dut1-vhost-${number}-if1 | dut1-vhost-${number}-if2 +| | | ... | virtio_feature_mask=${virtio_feature_mask} | | | Set Interface State | ${dut1} | ${dut1-vhost-${number}-if1} | up | | | Set Interface State | ${dut1} | ${dut1-vhost-${number}-if2} | up | | | Add Fib Table | ${dut1} | ${fib_table_1} @@ -401,6 +408,8 @@ | | | | ... | *Arguments:* | | ... | - nf_nodes - Number of guest VMs. Type: integer +| | ... | - virtio_feature_mask - Enabled Virtio features (Optional). +| | ... | Type: integer | | | | ... | *Note:* | | ... | Socket paths for VM are defined in following format: @@ -413,6 +422,7 @@ | | ... | topology \| 1 \| | | | | [Arguments] | ${nf_nodes}=${1} | ${testpmd_mac}=${FALSE} +| | ... | ${virtio_feature_mask}=${None} | | | | Set interfaces in path up | | ${fib_table_1}= | Set Variable | ${101} @@ -455,11 +465,13 @@ | | | Configure vhost interfaces | ${dut1} | | | ... | /var/run/vpp/sock-${number}-1 | /var/run/vpp/sock-${number}-2 | | | ... | dut1-vhost-${number}-if1 | dut1-vhost-${number}-if2 +| | | ... | virtio_feature_mask=${virtio_feature_mask} | | | Set Interface State | ${dut1} | ${dut1-vhost-${number}-if1} | up | | | Set Interface State | ${dut1} | ${dut1-vhost-${number}-if2} | up | | | Configure vhost interfaces | ${dut2} | | | ... | /var/run/vpp/sock-${number}-1 | /var/run/vpp/sock-${number}-2 | | | ... | dut2-vhost-${number}-if1 | dut2-vhost-${number}-if2 +| | | ... | virtio_feature_mask=${virtio_feature_mask} | | | Set Interface State | ${dut2} | ${dut2-vhost-${number}-if1} | up | | | Set Interface State | ${dut2} | ${dut2-vhost-${number}-if2} | up | | | Add Fib Table | ${dut1} | ${fib_table_1} @@ -583,7 +595,7 @@ | | ... | Set Variable | ${dut2} | | ... | ELSE | Set Variable | ${dut1} | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS' -| | ... | Set Variable | ${dut2_if2} +| | ... | Set Variable | ${DUT2_${int}2}[0] | | ... | ELSE | Set Variable | ${subif_index_1} | | VPP Add IP Neighbor | | ... | ${dut} | ${dut_if2} | 3.3.3.1 | ${TG_pf2_mac}[0] @@ -596,7 +608,7 @@ | | ... | VPP Interface Set IP Address | ${dut2} | ${subif_index_2} | | ... | 2.2.2.2 | 30 | | VPP Interface Set IP Address -| | ... | ${dut} | ${dut_if2} | 3.3.3.2 | 30 +| | ... | ${dut} | ${dut_if2} | 3.3.3.2 | 30 | | Vpp Route Add | ${dut1} | ${tg_if1_net} | 30 | gateway=1.1.1.1 | | ... | interface=${DUT1_${int}1}[0] | | Run Keyword If | '${dut2_status}' == 'PASS'