aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/shared/interfaces.robot
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2020-10-02 05:48:34 +0000
committerPeter Mikus <pmikus@cisco.com>2021-01-04 10:30:50 +0000
commit44dcb3113c8ade2e44543746abca861a89362c9b (patch)
tree4800a2f9dcf106c5f5222f4be256c9a488f1b85b /resources/libraries/robot/shared/interfaces.robot
parente813695b481b745d5136f8cbd0152e62a4ec990c (diff)
GSO: TAP/VHOST use case
Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: Ibafaaca4438587284d1e255c764f0701002941e8
Diffstat (limited to 'resources/libraries/robot/shared/interfaces.robot')
-rw-r--r--resources/libraries/robot/shared/interfaces.robot95
1 files changed, 91 insertions, 4 deletions
diff --git a/resources/libraries/robot/shared/interfaces.robot b/resources/libraries/robot/shared/interfaces.robot
index 27908c3cf8..a9b6440173 100644
--- a/resources/libraries/robot/shared/interfaces.robot
+++ b/resources/libraries/robot/shared/interfaces.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:
@@ -44,10 +44,17 @@
| | ... | *Set UP state on VPP interfaces in path on all DUT nodes and set
| | ... | maximal MTU.*
| |
+| | ... | *Arguments:*
+| | ... | - validate - Validate interfaces are up.
+| | ... | Type: boolean
+| |
+| | [Arguments] | ${validate}=${True}
+| |
| | FOR | ${dut} | IN | @{duts}
| | | Set interfaces in path up on node | ${dut}
| | END
-| | All VPP Interfaces Ready Wait | ${nodes} | retries=${60}
+| | Run Keyword If | ${validate}
+| | ... | All VPP Interfaces Ready Wait | ${nodes} | retries=${60}
| Set interfaces in path up on node
| | [Documentation]
@@ -109,6 +116,18 @@
| |
| | Run Keyword | Pre-initialize layer ${driver} on all DUTs
+| Pre-initialize layer tap on all DUTs
+| | [Documentation]
+| | ... | Pre-initialize tap driver. Currently no operation.
+| |
+| | No operation
+
+| Pre-initialize layer vhost on all DUTs
+| | [Documentation]
+| | ... | Pre-initialize vhost driver. Currently no operation.
+| |
+| | No operation
+
| Pre-initialize layer vfio-pci on all DUTs
| | [Documentation]
| | ... | Pre-initialize vfio-pci driver by adding related sections to startup
@@ -179,18 +198,20 @@
| | ... | *Arguments:*
| | ... | - driver - NIC driver used in test [vfio-pci|avf|rdma-core].
| | ... | Type: string
+| | ... | - validate - Validate interfaces are up.
+| | ... | Type: boolean
| |
| | ... | *Example:*
| |
| | ... | \| Initialize layer driver \| vfio-pci \|
| |
-| | [Arguments] | ${driver}
+| | [Arguments] | ${driver} | ${validate}=${True}
| |
| | FOR | ${dut} | IN | @{duts}
| | | Initialize layer driver on node | ${dut} | ${driver}
| | END
| | Set Test Variable | ${int} | vf
-| | Set interfaces in path up
+| | Set interfaces in path up | validate=${validate}
| Initialize layer driver on node
| | [Documentation]
@@ -236,6 +257,72 @@
| | | Run Keyword | Initialize layer ${driver} on node | ${dut} | ${pf}
| | END
+| Initialize layer tap on node
+| | [Documentation]
+| | ... | Initialize tap interfaces on DUT.
+| |
+| | ... | *Arguments:*
+| | ... | - dut - DUT node.
+| | ... | Type: string
+| | ... | - pf - TAP ID (logical port).
+| | ... | Type: integer
+| |
+| | ... | *Example:*
+| |
+| | ... | \| Initialize layer tap on node \| DUT1 \| 0 \|
+| |
+| | [Arguments] | ${dut} | ${pf}
+| |
+| | Create Namespace
+| | ... | ${nodes['${dut}']} | tap${${pf}-1}_namespace
+| | ${tap_feature_mask}= | Create Tap feature mask | gso=${enable_gso}
+| | ${_tap}=
+| | ... | And Add Tap Interface | ${nodes['${dut}']} | tap${${pf}-1}
+| | ... | host_namespace=tap${${pf}-1}_namespace
+| | ... | num_rx_queues=${rxq_count_int}
+| | ... | rxq_size=${nic_rxq_size} | txq_size=${nic_txq_size}
+| | ... | tap_feature_mask=${tap_feature_mask}
+| | ${_mac}=
+| | ... | Get Interface MAC | ${nodes['${dut}']} | tap${pf}
+| | ${_tap}= | Create List | ${_tap}
+| | ${_mac}= | Create List | ${_mac}
+| | Vhost User Affinity
+| | ... | ${nodes['${dut}']} | ${${dut}_pf${pf}}[0]
+| | ... | skip_cnt=${${CPU_CNT_MAIN}+${CPU_CNT_SYSTEM}+${cpu_count_int}}
+| | Set Test Variable
+| | ... | ${${dut}_vf${pf}} | ${_tap}
+| | Set Test Variable
+| | ... | ${${dut}_vf${pf}_mac} | ${_mac}
+
+| Initialize layer vhost on node
+| | [Documentation]
+| | ... | Initialize vhost interfaces on DUT.
+| |
+| | ... | *Arguments:*
+| | ... | - dut - DUT node.
+| | ... | Type: string
+| | ... | - pf - VHOST ID (logical port).
+| | ... | Type: integer
+| |
+| | ... | *Example:*
+| |
+| | ... | \| Initialize layer vhost on node \| DUT1 \| 0 \|
+| |
+| | [Arguments] | ${dut} | ${pf}
+| |
+| | ${virtio_feature_mask}= | Create Virtio feature mask | gso=${enable_gso}
+| | ${vhost}= | Vpp Create Vhost User Interface
+| | ... | ${nodes['${dut}']} | /var/run/vpp/sock-${pf}-1
+| | ... | is_server=${True} | virtio_feature_mask=${virtio_feature_mask}
+| | ${_mac}=
+| | ... | Get Interface MAC | ${nodes['${dut}']} | vhost${pf}
+| | ${_vhost}= | Create List | ${_vhost}
+| | ${_mac}= | Create List | ${_mac}
+| | Set Test Variable
+| | ... | ${${dut}_vf${pf}} | ${_vhost}
+| | Set Test Variable
+| | ... | ${${dut}_vf${pf}_mac} | ${_mac}
+
| Initialize layer vfio-pci on node
| | [Documentation]
| | ... | Initialize vfio-pci interfaces on DUT on NIC PF.