aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2020-01-03 16:01:30 +0100
committerJan Gelety <jgelety@cisco.com>2020-01-10 16:08:42 +0100
commitb55e324d526e5b05baef015c3614b9743c955992 (patch)
tree1e42006c4513bdcdee35eb5f677e055b64c06e86 /resources
parent5147d3ac0844b31852a3c221759f31915744b1c7 (diff)
Autogen: Generate also NIC drivers.
+ Disallowed -avf- (or -rdma-) as "template" suites. + GBP suite switched to DPDK driver in repo. + Each NIC has its own list of supported drivers, in Constants. + Updated tag expressions for daily jobs: + Feature, ipsec, memif, scale, srv6, tunnels, vhost and vts are tested only with vfio-pci. + Other (base, dot1q, dot1ad) tested with all drivers. + Setup actions currently depend on driver, generated. - The performance_rdma action is trivial for now. - Several tests fail, to be fixed later, e.g. by performance_rdma. + Reconf tests are also supported. + Added DRV_VFIO_PCI tags missing, mainly in density tests. - Vhost suites (density, reconf) are failing, but suites look good. - TCP suites do not support NIC drivers yet. - DPDK obviously not supported. + Use Python 3 in regenerate scripts. + Fix typos binded => bound. + File open modes set either u"rt" or u"wt" everywhere. + Remove a trailing space in an environment variable name. Change-Id: I290470675dc5c9e88b2eaa5ab6285ecd9ed7827a Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/bash/function/device.sh4
-rw-r--r--resources/libraries/bash/function/mrr-daily-clx.txt48
-rw-r--r--resources/libraries/bash/function/mrr-daily-dnv.txt36
-rw-r--r--resources/libraries/bash/function/mrr-daily-hsw.txt25
-rw-r--r--resources/libraries/bash/function/mrr-daily-skx.txt44
-rw-r--r--resources/libraries/bash/function/mrr-daily-tsh.txt38
-rw-r--r--resources/libraries/bash/function/mrr-daily.txt4
-rw-r--r--resources/libraries/bash/function/mrr-weekly.txt2
-rw-r--r--resources/libraries/python/Constants.py43
-rw-r--r--resources/libraries/python/ContainerUtils.py2
-rw-r--r--resources/libraries/python/QemuUtils.py4
-rw-r--r--resources/libraries/python/VatExecutor.py6
-rw-r--r--resources/libraries/python/VppApiCrc.py4
-rw-r--r--resources/libraries/python/autogen/Regenerator.py127
-rw-r--r--resources/libraries/python/parsers/JsonParser.py2
-rw-r--r--resources/libraries/robot/shared/suite_setup.robot30
-rw-r--r--resources/tools/presentation/generator_cpta.py4
-rw-r--r--resources/tools/presentation/generator_files.py2
-rw-r--r--resources/tools/presentation/generator_report.py4
-rw-r--r--resources/tools/presentation/generator_tables.py18
-rw-r--r--resources/tools/presentation/pal_utils.py2
-rwxr-xr-xresources/tools/scripts/topo_reservation.py2
-rwxr-xr-xresources/tools/topology/update_topology.py4
-rw-r--r--resources/tools/wrk/wrk_traffic_profile_parser.py2
24 files changed, 278 insertions, 179 deletions
diff --git a/resources/libraries/bash/function/device.sh b/resources/libraries/bash/function/device.sh
index fbdf56a7e1..1819c457bb 100644
--- a/resources/libraries/bash/function/device.sh
+++ b/resources/libraries/bash/function/device.sh
@@ -606,8 +606,8 @@ function start_topology_containers () {
# Override access to PCI bus by attaching a filesystem mount to the
# container.
dcr_stc_params+="--mount type=tmpfs,destination=/sys/bus/pci/devices "
- # Mount vfio to be able to bind to see binded interfaces. We cannot use
- # --device=/dev/vfio as this does not see newly binded interfaces.
+ # Mount vfio to be able to bind to see bound interfaces. We cannot use
+ # --device=/dev/vfio as this does not see newly bound interfaces.
dcr_stc_params+="--volume /dev/vfio:/dev/vfio "
# Mount docker.sock to be able to use docker deamon of the host.
dcr_stc_params+="--volume /var/run/docker.sock:/var/run/docker.sock "
diff --git a/resources/libraries/bash/function/mrr-daily-clx.txt b/resources/libraries/bash/function/mrr-daily-clx.txt
index 95697a7ed6..e94df5c6e5 100644
--- a/resources/libraries/bash/function/mrr-daily-clx.txt
+++ b/resources/libraries/bash/function/mrr-daily-clx.txt
@@ -1,55 +1,49 @@
!nf_density
# container_memif
-mrrAND${default_nic}ANDmemifANDbaseAND64b
+mrrAND${default_nic}ANDmemifANDbaseAND64bANDdrv_vfio_pci
# crypto
-# mrrAND${default_nic}ANDscaleANDipsecswAND64bNOTipsectunNOThmac_sha_256NOTaes_128_gcmNOTtnl_40NOTtnl_400NOTtnl_5000NOTtnl_20000NOTtnl_40000NOTtnl_60000
-mrrAND${default_nic}ANDscaleANDipsecswANDimixNOTipsectunNOThmac_sha_256NOTaes_128_gcmNOTtnl_40NOTtnl_400NOTtnl_5000NOTtnl_20000NOTtnl_40000NOTtnl_60000
+mrrAND${default_nic}ANDscaleANDipsecswANDimixNOTipsectunNOThmac_sha_256NOTaes_128_gcmNOTtnl_40NOTtnl_400NOTtnl_5000NOTtnl_20000NOTtnl_40000NOTtnl_60000ANDdrv_vfio_pci
# ip4
-mrrAND${default_nic}ANDip4fwdANDbaseAND64bNOTipsecNOTmemifNOTvhostNOTvxlanNOTsrc_user_1NOTdot1qNOTsrc_user_1
-mrrAND${default_nic}ANDip4fwdANDbaseAND64bANDdot1qAND2_node_*_link_topoNOTipsecNOTmemifNOTvhostNOTvxlanNOTsrc_user_1
-mrrAND${default_nic}ANDip4fwdANDbaseAND64bANDdot1qAND3_node_*_link_topoNOTipsecNOTmemifNOTvhostNOTvxlanNOTsrc_user_1NOTdrv_avf
-mrrAND${default_nic}ANDip4fwdANDscaleAND64bNOTnat44NOTipsec
-mrrAND${default_nic}ANDip4fwdANDacl50AND10k_flowsAND64b
+mrrAND${default_nic}ANDip4fwdANDbaseAND64bNOTipsecNOTmemifNOTvhostNOTvxlanNOTsrc_user_1
+mrrAND${default_nic}ANDip4fwdANDscaleAND64bNOTnat44NOTipsecANDdrv_vfio_pci
+mrrAND${default_nic}ANDip4fwdANDacl50AND10k_flowsAND64bANDdrv_vfio_pci
mrrANDip4baseAND64bNOTdot1q
-mrrANDip4baseAND64bANDdot1qNOTdrv_avf
-mrrANDip4fwdANDscaleANDfib_2mAND64b
+mrrANDip4fwdANDscaleANDfib_2mAND64bANDdrv_vfio_pci
# ip4_tunnels
-mrrAND${default_nic}ANDvxlanAND64bNOTvxlan_10NOTvxlan_1kNOTvtsNOTvhost
+mrrAND${default_nic}ANDvxlanAND64bNOTvxlan_10NOTvxlan_1kNOTvtsNOTvhostANDdrv_vfio_pci
# ip6
-mrrAND${default_nic}ANDip6fwdANDbaseAND78b
-mrrAND${default_nic}ANDip6fwdANDscaleAND78b
+mrrAND${default_nic}ANDip6fwdANDbaseAND78bANDdrv_vfio_pci
+mrrAND${default_nic}ANDip6fwdANDscaleAND78bANDdrv_vfio_pci
mrrANDip6baseAND78b
-mrrANDip6fwdANDscaleANDfib_2mAND78b
+mrrANDip6fwdANDscaleANDfib_2mAND78bANDdrv_vfio_pci
# ip6_tunnels
# l2
-mrrAND${default_nic}ANDl2bdmaclrnANDbaseAND64bNOTmemifNOTvhostNOTvxlanNOTdot1q
-mrrAND${default_nic}ANDl2bdmaclrnANDbaseAND64bANDdot1qAND2_node_*_link_topoNOTmemifNOTvhostNOTvxlan
-mrrAND${default_nic}ANDl2bdmaclrnANDbaseAND64bANDdot1qAND3_node_*_link_topoNOTmemifNOTvhostNOTvxlanNOTdrv_avf
+mrrAND${default_nic}ANDl2bdmaclrnANDbaseAND64bNOTmemifNOTvhostNOTvxlan
mrrAND${default_nic}ANDl2xcfwdANDbaseAND64bNOTdot1adNOTmemifNOTvhostNOTvxlan
mrrAND${default_nic}ANDl2patchANDbaseAND64bNOTmemifNOTvhostNOTvxlan
-mrrAND${default_nic}ANDl2bdmaclrnANDscaleAND64bNOTmemifNOTvhostNOTvxlan
-mrrAND${default_nic}ANDl2bdmaclrnANDfeatureANDacl50AND10k_flowsAND64b
-mrrANDl2bdmaclrnANDbaseAND64bNOTmemifNOTvhostNOTvxlanNOTgbp
-mrrANDl2xcfwdANDbaseANDdrv_avfAND64bNOTdot1qNOTdot1adNOTmemifNOTvhost
-mrrANDl2patchANDbaseANDdrv_avfAND64bNOTdot1qNOTdot1adNOTmemifNOTvhost
-mrrANDl2bdmaclrnANDscaleANDfib_1mAND64bNOTmemifNOTvhostNOTvxlan
+mrrAND${default_nic}ANDl2bdmaclrnANDscaleAND64bNOTmemifNOTvhostNOTvxlanANDdrv_vfio_pci
+mrrAND${default_nic}ANDl2bdmaclrnANDfeatureANDacl50AND10k_flowsAND64bANDdrv_vfio_pci
+mrrANDl2bdmaclrnANDbaseAND64bNOTmemifNOTvhostNOTvxlanNOTgbpANDdrv_vfio_pci
+mrrANDl2xcfwdANDbaseAND64bNOTdot1qNOTdot1adNOTmemifNOTvhost
+mrrANDl2patchANDbaseAND64bNOTdot1qNOTdot1adNOTmemifNOTvhost
+mrrANDl2bdmaclrnANDscaleANDfib_1mAND64bNOTmemifNOTvhostNOTvxlanANDdrv_vfio_pci
# srv6
-mrrAND${default_nic}ANDfeatureANDsrv6AND78b
+mrrAND${default_nic}ANDfeatureANDsrv6AND78bANDdrv_vfio_pci
# vm_vhost
-mrrAND${default_nic}ANDvhostAND64b
-mrrANDvhostAND64bANDlbond
+mrrAND${default_nic}ANDvhostAND64bANDdrv_vfio_pci
+mrrANDvhostAND64bANDlbondANDdrv_vfio_pci
# vts
-mrrAND${default_nic}ANDvtsAND114b
+mrrAND${default_nic}ANDvtsAND114bANDdrv_vfio_pci
!ipsectun
!hmac_sha_256
diff --git a/resources/libraries/bash/function/mrr-daily-dnv.txt b/resources/libraries/bash/function/mrr-daily-dnv.txt
index 2dd4757464..d5294be6cd 100644
--- a/resources/libraries/bash/function/mrr-daily-dnv.txt
+++ b/resources/libraries/bash/function/mrr-daily-dnv.txt
@@ -1,45 +1,41 @@
!nf_density
# container_memif
-mrrAND${default_nic}ANDmemifANDbaseAND64b
+mrrAND${default_nic}ANDmemifANDbaseAND64bANDdrv_vfio_pci
# crypto
-# mrrAND${default_nic}ANDscaleANDipsecswAND64bNOTipsectunNOThmac_sha_256NOTaes_128_gcmNOTtnl_40NOTtnl_400NOTtnl_5000NOTtnl_20000NOTtnl_40000NOTtnl_60000
-mrrAND${default_nic}ANDscaleANDipsecswANDimixNOTipsectunNOThmac_sha_256NOTaes_128_gcmNOTtnl_40NOTtnl_400NOTtnl_5000NOTtnl_20000NOTtnl_40000NOTtnl_60000
+mrrAND${default_nic}ANDscaleANDipsecswANDimixNOTipsectunNOThmac_sha_256NOTaes_128_gcmNOTtnl_40NOTtnl_400NOTtnl_5000NOTtnl_20000NOTtnl_40000NOTtnl_60000ANDdrv_vfio_pci
# ip4
-mrrAND${default_nic}ANDip4fwdANDbaseAND64bNOTipsecNOTmemifNOTvhostNOTvxlanNOTsrc_user_1NOTdot1q
-mrrAND${default_nic}ANDip4fwdANDbaseAND64bNOTipsecNOTmemifNOTvhostNOTvxlanNOTsrc_user_1ANDdot1qNOTdrv_avf
-mrrAND${default_nic}ANDip4fwdANDscaleAND64bNOTnat44NOTipsec
-mrrAND${default_nic}ANDip4fwdANDacl50AND10k_flowsAND64b
+mrrAND${default_nic}ANDip4fwdANDbaseAND64bNOTipsecNOTmemifNOTvhostNOTvxlanNOTsrc_user_1
+mrrAND${default_nic}ANDip4fwdANDscaleAND64bNOTnat44NOTipsecANDdrv_vfio_pci
+mrrAND${default_nic}ANDip4fwdANDacl50AND10k_flowsAND64bANDdrv_vfio_pci
mrrANDip4baseAND64bNOTdot1q
-mrrANDip4baseAND64bANDdot1qNOTdrv_avf
-mrrANDip4fwdANDscaleANDfib_2mAND64b
+mrrANDip4fwdANDscaleANDfib_2mAND64bANDdrv_vfio_pci
# ip4_tunnels
-mrrAND${default_nic}ANDvxlanAND64bNOTvxlan_10NOTvxlan_1kNOTvtsNOTvhost
+mrrAND${default_nic}ANDvxlanAND64bNOTvxlan_10NOTvxlan_1kNOTvtsNOTvhostANDdrv_vfio_pci
# ip6
mrrAND${default_nic}ANDip6fwdANDbaseAND78b
-mrrAND${default_nic}ANDip6fwdANDscaleAND78b
+mrrAND${default_nic}ANDip6fwdANDscaleAND78bANDdrv_vfio_pci
mrrANDip6baseAND78b
-mrrANDip6fwdANDscaleANDfib_2mAND78b
+mrrANDip6fwdANDscaleANDfib_2mAND78bANDdrv_vfio_pci
# ip6_tunnels
# l2
-mrrAND${default_nic}ANDl2bdmaclrnANDbaseAND64bNOTmemifNOTvhostNOTvxlanNOTdot1q
-mrrAND${default_nic}ANDl2bdmaclrnANDbaseAND64bNOTmemifNOTvhostNOTvxlanANDdot1qNOTdrv_avf
+mrrAND${default_nic}ANDl2bdmaclrnANDbaseAND64bNOTmemifNOTvhostNOTvxlan
mrrAND${default_nic}ANDl2xcfwdANDbaseAND64bNOTdot1adNOTmemifNOTvhostNOTvxlan
mrrAND${default_nic}ANDl2patchANDbaseAND64bNOTmemifNOTvhostNOTvxlan
-mrrAND${default_nic}ANDl2bdmaclrnANDscaleAND64bNOTmemifNOTvhostNOTvxlan
-mrrAND${default_nic}ANDl2bdmaclrnANDfeatureANDacl50AND10k_flowsAND64b
+mrrAND${default_nic}ANDl2bdmaclrnANDscaleAND64bNOTmemifNOTvhostNOTvxlanANDdrv_vfio_pci
+mrrAND${default_nic}ANDl2bdmaclrnANDfeatureANDacl50AND10k_flowsAND64bANDdrv_vfio_pci
mrrANDl2bdmaclrnANDbaseAND64bNOTmemifNOTvhostNOTvxlanNOTgbp
-mrrANDl2xcfwdANDbaseANDdrv_avfAND64bNOTdot1qNOTdot1adNOTmemifNOTvhost
-mrrANDl2bdmaclrnANDscaleANDfib_1mAND64bNOTmemifNOTvhostNOTvxlan
+mrrANDl2xcfwdANDbaseAND64bNOTdot1qNOTdot1adNOTmemifNOTvhost
+mrrANDl2bdmaclrnANDscaleANDfib_1mAND64bNOTmemifNOTvhostNOTvxlanANDdrv_vfio_pci
# srv6
-mrrAND${default_nic}ANDfeatureANDsrv6AND78b
+mrrAND${default_nic}ANDfeatureANDsrv6AND78bANDdrv_vfio_pci
# vm_vhost
-mrrAND${default_nic}ANDvhostANDbaseAND64b
+mrrAND${default_nic}ANDvhostANDbaseAND64bANDdrv_vfio_pci
diff --git a/resources/libraries/bash/function/mrr-daily-hsw.txt b/resources/libraries/bash/function/mrr-daily-hsw.txt
index 0393e3c192..52bd19b98a 100644
--- a/resources/libraries/bash/function/mrr-daily-hsw.txt
+++ b/resources/libraries/bash/function/mrr-daily-hsw.txt
@@ -1,23 +1,20 @@
# container_memif
# crypto
-# mrrAND${default_nic}ANDscaleANDipsecswAND64bNOTipsectunNOThmac_sha_256NOTaes_128_gcmNOTtnl_40NOTtnl_400NOTtnl_5000NOTtnl_20000NOTtnl_40000NOTtnl_60000
-# mrrAND${default_nic}ANDscaleANDipsechwANDtnl_1000AND64bNOTipsectunNOThmac_sha_256NOTaes_128_gcm
-# mrrAND${default_nic}ANDbaseANDipsechwAND64bNOTipsectunNOThmac_sha_256NOTaes_128_gcm
-mrrAND${default_nic}ANDscaleANDipsecswANDimixNOTipsectunNOThmac_sha_256NOTaes_128_gcmNOTtnl_40NOTtnl_400NOTtnl_5000NOTtnl_20000NOTtnl_40000NOTtnl_60000
-mrrAND${default_nic}ANDscaleANDipsechwANDtnl_1000ANDimixNOTipsectunNOThmac_sha_256NOTaes_128_gcm
-mrrAND${default_nic}ANDbaseANDipsechwANDimixNOTipsectunNOThmac_sha_256NOTaes_128_gcm
+mrrAND${default_nic}ANDscaleANDipsecswANDimixNOTipsectunNOThmac_sha_256NOTaes_128_gcmNOTtnl_40NOTtnl_400NOTtnl_5000NOTtnl_20000NOTtnl_40000NOTtnl_60000ANDdrv_vfio_pci
+mrrAND${default_nic}ANDscaleANDipsechwANDtnl_1000ANDimixNOTipsectunNOThmac_sha_256NOTaes_128_gcmANDdrv_vfio_pci
+mrrAND${default_nic}ANDbaseANDipsechwANDimixNOTipsectunNOThmac_sha_256NOTaes_128_gcmANDdrv_vfio_pci
# ip4
mrrAND${default_nic}ANDip4fwdANDbaseAND64bNOTmemifNOTipsecNOTnat44NOTvhostNOTvxlan
-mrrAND${default_nic}ANDip4fwdANDscaleANDfib_2mAND64bNOTnat44
+mrrAND${default_nic}ANDip4fwdANDscaleANDfib_2mAND64bNOTnat44ANDdrv_vfio_pci
# ip4_tunnels
-mrrAND${default_nic}ANDvxlanAND64bNOTscaleNOTvhost
+mrrAND${default_nic}ANDvxlanAND64bNOTscaleNOTvhostANDdrv_vfio_pci
# ip6
mrrAND${default_nic}ANDip6fwdANDbaseAND78bNOTmemif
-mrrAND${default_nic}ANDip6fwdANDscaleANDfib_2mAND78b
+mrrAND${default_nic}ANDip6fwdANDscaleANDfib_2mAND78bANDdrv_vfio_pci
# ip6_tunnels
@@ -25,17 +22,17 @@ mrrAND${default_nic}ANDip6fwdANDscaleANDfib_2mAND78b
mrrAND${default_nic}ANDl2bdmaclrnANDbaseAND64bNOTmemifNOTvhostNOTvxlan
mrrAND${default_nic}ANDl2xcfwdANDbaseAND64bNOTdot1adNOTmemifNOTvhostNOTvxlan
mrrAND${default_nic}ANDl2patchANDbaseAND64bNOTmemifNOTvhostNOTvxlan
-mrrAND${default_nic}ANDl2bdmaclrnANDscaleANDfib_1mAND64b
+mrrAND${default_nic}ANDl2bdmaclrnANDscaleANDfib_1mAND64bANDdrv_vfio_pci
# srv6
-mrrAND${default_nic}ANDfeatureANDsrv6AND78b
+mrrAND${default_nic}ANDfeatureANDsrv6AND78bANDdrv_vfio_pci
# vm_vhost
-mrrAND${default_nic}ANDvhostANDbaseAND64bNOTvxlanNOTlbondNOTdot1q
-mrrAND${default_nic}ANDvhostANDl2bdmaclrnAND64bANDdot1qNOTlbondNOTvxlan
+mrrAND${default_nic}ANDvhostANDbaseAND64bNOTvxlanNOTlbondNOTdot1qANDdrv_vfio_pci
+mrrAND${default_nic}ANDvhostANDl2bdmaclrnAND64bANDdot1qNOTlbondNOTvxlanANDdrv_vfio_pci
# vts
-mrrAND${default_nic}ANDvtsAND114b
+mrrAND${default_nic}ANDvtsAND114bANDdrv_vfio_pci
!ipsectun
!hmac_sha_256
diff --git a/resources/libraries/bash/function/mrr-daily-skx.txt b/resources/libraries/bash/function/mrr-daily-skx.txt
index 95697a7ed6..2b1f598a7a 100644
--- a/resources/libraries/bash/function/mrr-daily-skx.txt
+++ b/resources/libraries/bash/function/mrr-daily-skx.txt
@@ -1,55 +1,49 @@
!nf_density
# container_memif
-mrrAND${default_nic}ANDmemifANDbaseAND64b
+mrrAND${default_nic}ANDmemifANDbaseAND64bANDdrv_vfio_pci
# crypto
-# mrrAND${default_nic}ANDscaleANDipsecswAND64bNOTipsectunNOThmac_sha_256NOTaes_128_gcmNOTtnl_40NOTtnl_400NOTtnl_5000NOTtnl_20000NOTtnl_40000NOTtnl_60000
-mrrAND${default_nic}ANDscaleANDipsecswANDimixNOTipsectunNOThmac_sha_256NOTaes_128_gcmNOTtnl_40NOTtnl_400NOTtnl_5000NOTtnl_20000NOTtnl_40000NOTtnl_60000
+mrrAND${default_nic}ANDscaleANDipsecswANDimixNOTipsectunNOThmac_sha_256NOTaes_128_gcmNOTtnl_40NOTtnl_400NOTtnl_5000NOTtnl_20000NOTtnl_40000NOTtnl_60000ANDdrv_vfio_pci
# ip4
-mrrAND${default_nic}ANDip4fwdANDbaseAND64bNOTipsecNOTmemifNOTvhostNOTvxlanNOTsrc_user_1NOTdot1qNOTsrc_user_1
-mrrAND${default_nic}ANDip4fwdANDbaseAND64bANDdot1qAND2_node_*_link_topoNOTipsecNOTmemifNOTvhostNOTvxlanNOTsrc_user_1
-mrrAND${default_nic}ANDip4fwdANDbaseAND64bANDdot1qAND3_node_*_link_topoNOTipsecNOTmemifNOTvhostNOTvxlanNOTsrc_user_1NOTdrv_avf
-mrrAND${default_nic}ANDip4fwdANDscaleAND64bNOTnat44NOTipsec
-mrrAND${default_nic}ANDip4fwdANDacl50AND10k_flowsAND64b
+mrrAND${default_nic}ANDip4fwdANDbaseAND64bNOTipsecNOTmemifNOTvhostNOTvxlanNOTsrc_user_1
+mrrAND${default_nic}ANDip4fwdANDscaleAND64bNOTnat44NOTipsecANDdrv_vfio_pci
+mrrAND${default_nic}ANDip4fwdANDacl50AND10k_flowsAND64bANDdrv_vfio_pci
mrrANDip4baseAND64bNOTdot1q
-mrrANDip4baseAND64bANDdot1qNOTdrv_avf
-mrrANDip4fwdANDscaleANDfib_2mAND64b
+mrrANDip4fwdANDscaleANDfib_2mAND64bANDdrv_vfio_pci
# ip4_tunnels
-mrrAND${default_nic}ANDvxlanAND64bNOTvxlan_10NOTvxlan_1kNOTvtsNOTvhost
+mrrAND${default_nic}ANDvxlanAND64bNOTvxlan_10NOTvxlan_1kNOTvtsNOTvhostANDdrv_vfio_pci
# ip6
mrrAND${default_nic}ANDip6fwdANDbaseAND78b
-mrrAND${default_nic}ANDip6fwdANDscaleAND78b
+mrrAND${default_nic}ANDip6fwdANDscaleAND78bANDdrv_vfio_pci
mrrANDip6baseAND78b
-mrrANDip6fwdANDscaleANDfib_2mAND78b
+mrrANDip6fwdANDscaleANDfib_2mAND78bANDdrv_vfio_pci
# ip6_tunnels
# l2
-mrrAND${default_nic}ANDl2bdmaclrnANDbaseAND64bNOTmemifNOTvhostNOTvxlanNOTdot1q
-mrrAND${default_nic}ANDl2bdmaclrnANDbaseAND64bANDdot1qAND2_node_*_link_topoNOTmemifNOTvhostNOTvxlan
-mrrAND${default_nic}ANDl2bdmaclrnANDbaseAND64bANDdot1qAND3_node_*_link_topoNOTmemifNOTvhostNOTvxlanNOTdrv_avf
+mrrAND${default_nic}ANDl2bdmaclrnANDbaseAND64bNOTmemifNOTvhostNOTvxlan
mrrAND${default_nic}ANDl2xcfwdANDbaseAND64bNOTdot1adNOTmemifNOTvhostNOTvxlan
mrrAND${default_nic}ANDl2patchANDbaseAND64bNOTmemifNOTvhostNOTvxlan
-mrrAND${default_nic}ANDl2bdmaclrnANDscaleAND64bNOTmemifNOTvhostNOTvxlan
-mrrAND${default_nic}ANDl2bdmaclrnANDfeatureANDacl50AND10k_flowsAND64b
+mrrAND${default_nic}ANDl2bdmaclrnANDscaleAND64bNOTmemifNOTvhostNOTvxlanANDdrv_vfio_pci
+mrrAND${default_nic}ANDl2bdmaclrnANDfeatureANDacl50AND10k_flowsAND64bANDdrv_vfio_pci
mrrANDl2bdmaclrnANDbaseAND64bNOTmemifNOTvhostNOTvxlanNOTgbp
-mrrANDl2xcfwdANDbaseANDdrv_avfAND64bNOTdot1qNOTdot1adNOTmemifNOTvhost
-mrrANDl2patchANDbaseANDdrv_avfAND64bNOTdot1qNOTdot1adNOTmemifNOTvhost
-mrrANDl2bdmaclrnANDscaleANDfib_1mAND64bNOTmemifNOTvhostNOTvxlan
+mrrANDl2xcfwdANDbaseAND64bNOTdot1qNOTdot1adNOTmemifNOTvhost
+mrrANDl2patchANDbaseAND64bNOTdot1qNOTdot1adNOTmemifNOTvhost
+mrrANDl2bdmaclrnANDscaleANDfib_1mAND64bNOTmemifNOTvhostNOTvxlanANDdrv_vfio_pci
# srv6
-mrrAND${default_nic}ANDfeatureANDsrv6AND78b
+mrrAND${default_nic}ANDfeatureANDsrv6AND78bANDdrv_vfio_pci
# vm_vhost
-mrrAND${default_nic}ANDvhostAND64b
-mrrANDvhostAND64bANDlbond
+mrrAND${default_nic}ANDvhostAND64bANDdrv_vfio_pci
+mrrANDvhostAND64bANDlbondANDdrv_vfio_pci
# vts
-mrrAND${default_nic}ANDvtsAND114b
+mrrAND${default_nic}ANDvtsAND114bANDdrv_vfio_pci
!ipsectun
!hmac_sha_256
diff --git a/resources/libraries/bash/function/mrr-daily-tsh.txt b/resources/libraries/bash/function/mrr-daily-tsh.txt
index 37b4f3be33..32f2fed913 100644
--- a/resources/libraries/bash/function/mrr-daily-tsh.txt
+++ b/resources/libraries/bash/function/mrr-daily-tsh.txt
@@ -1,50 +1,46 @@
# !nf_density
# container_memif
-mrrAND${default_nic}ANDmemifANDbaseAND64b
+mrrAND${default_nic}ANDmemifANDbaseAND64bANDdrv_vfio_pci
# crypto
-# mrrAND${default_nic}ANDscaleANDipsecswAND64bNOTipsectunNOThmac_sha_256NOTaes_128_gcmNOTtnl_40NOTtnl_400NOTtnl_5000NOTtnl_20000NOTtnl_40000NOTtnl_60000
-mrrAND${default_nic}ANDscaleANDipsecswANDimixNOTipsectunNOThmac_sha_256NOTaes_128_gcmNOTtnl_40NOTtnl_400NOTtnl_5000NOTtnl_20000NOTtnl_40000NOTtnl_60000
+mrrAND${default_nic}ANDscaleANDipsecswANDimixNOTipsectunNOThmac_sha_256NOTaes_128_gcmNOTtnl_40NOTtnl_400NOTtnl_5000NOTtnl_20000NOTtnl_40000NOTtnl_60000ANDdrv_vfio_pci
# ip4
-mrrAND${default_nic}ANDip4fwdANDbaseAND64bNOTipsecNOTmemifNOTvhostNOTvxlanNOTsrc_user_1NOTdot1q
-mrrAND${default_nic}ANDip4fwdANDbaseAND64bNOTipsecNOTmemifNOTvhostNOTvxlanNOTsrc_user_1ANDdot1qNOTdrv_avf
-mrrAND${default_nic}ANDip4fwdANDscaleAND64bNOTnat44NOTipsec
-mrrAND${default_nic}ANDip4fwdANDacl50AND10k_flowsAND64b
-mrrANDip4baseAND64bNOTdot1q
-mrrANDip4baseAND64bANDdot1qNOTdrv_avf
-mrrANDip4fwdANDscaleANDfib_2mAND64b
+mrrAND${default_nic}ANDip4fwdANDbaseAND64bNOTipsecNOTmemifNOTvhostNOTvxlanNOTsrc_user_1
+mrrAND${default_nic}ANDip4fwdANDscaleAND64bNOTnat44NOTipsecANDdrv_vfio_pci
+mrrAND${default_nic}ANDip4fwdANDacl50AND10k_flowsAND64bANDdrv_vfio_pci
+mrrANDip4baseAND64b
+mrrANDip4fwdANDscaleANDfib_2mAND64bANDdrv_vfio_pci
# ip4_tunnels
-mrrAND${default_nic}ANDvxlanAND64bNOTvxlan_10NOTvxlan_1kNOTvtsNOTvhost
+mrrAND${default_nic}ANDvxlanAND64bNOTvxlan_10NOTvxlan_1kNOTvtsNOTvhostANDdrv_vfio_pci
# ip6
mrrAND${default_nic}ANDip6fwdANDbaseAND78b
-mrrAND${default_nic}ANDip6fwdANDscaleAND78b
+mrrAND${default_nic}ANDip6fwdANDscaleAND78bANDdrv_vfio_pci
mrrANDip6baseAND78b
-mrrANDip6fwdANDscaleANDfib_2mAND78b
+mrrANDip6fwdANDscaleANDfib_2mAND78bANDdrv_vfio_pci
# ip6_tunnels
# l2
-mrrAND${default_nic}ANDl2bdmaclrnANDbaseAND64bNOTmemifNOTvhostNOTvxlanNOTdot1q
-mrrAND${default_nic}ANDl2bdmaclrnANDbaseAND64bANDdot1qNOTmemifNOTvhostNOTvxlanNOTdrv_avf
+mrrAND${default_nic}ANDl2bdmaclrnANDbaseAND64bNOTmemifNOTvhostNOTvxlan
mrrAND${default_nic}ANDl2xcfwdANDbaseAND64bNOTdot1adNOTmemifNOTvhostNOTvxlan
mrrAND${default_nic}ANDl2patchANDbaseAND64bNOTmemifNOTvhostNOTvxlan
-mrrAND${default_nic}ANDl2bdmaclrnANDscaleAND64bNOTmemifNOTvhostNOTvxlan
-mrrAND${default_nic}ANDl2bdmaclrnANDfeatureANDacl50AND10k_flowsAND64b
+mrrAND${default_nic}ANDl2bdmaclrnANDscaleAND64bNOTmemifNOTvhostNOTvxlanANDdrv_vfio_pci
+mrrAND${default_nic}ANDl2bdmaclrnANDfeatureANDacl50AND10k_flowsAND64bANDdrv_vfio_pci
mrrANDl2bdmaclrnANDbaseAND64bNOTmemifNOTvhostNOTvxlanNOTgbp
-mrrANDl2bdmaclrnANDscaleANDfib_1mAND64bNOTmemifNOTvhostNOTvxlan
+mrrANDl2bdmaclrnANDscaleANDfib_1mAND64bNOTmemifNOTvhostNOTvxlanANDdrv_vfio_pci
# srv6
-mrrAND${default_nic}ANDfeatureANDsrv6AND78b
+mrrAND${default_nic}ANDfeatureANDsrv6AND78bANDdrv_vfio_pci
# vm_vhost
-mrrAND${default_nic}ANDvhostANDbaseAND64b
+mrrAND${default_nic}ANDvhostANDbaseAND64bANDdrv_vfio_pci
# vts
-mrrAND${default_nic}ANDvtsAND114b
+mrrAND${default_nic}ANDvtsAND114bANDdrv_vfio_pci
!ipsectun
!hmac_sha_256
diff --git a/resources/libraries/bash/function/mrr-daily.txt b/resources/libraries/bash/function/mrr-daily.txt
index 20af48aad4..02a6d7eab0 100644
--- a/resources/libraries/bash/function/mrr-daily.txt
+++ b/resources/libraries/bash/function/mrr-daily.txt
@@ -4,5 +4,5 @@ mrrAND64bANDip4baseNOTdot1q
mrrAND78bANDip6baseNOTdot1q
mrrAND64bANDl2bdbaseNOTdot1q
mrrAND64bANDl2xcbaseNOTdot1q
-mrrAND${default_nic}ANDscaleAND64bNOT4cNOTnf_density
-mrrAND${default_nic}ANDscaleAND78bNOT4cNOTnf_density
+mrrAND${default_nic}ANDscaleAND64bNOT4cNOTnf_densityANDdrv_vfio_pci
+mrrAND${default_nic}ANDscaleAND78bNOT4cNOTnf_densityANDdrv_vfio_pci
diff --git a/resources/libraries/bash/function/mrr-weekly.txt b/resources/libraries/bash/function/mrr-weekly.txt
index b89987dc23..b09c8228a2 100644
--- a/resources/libraries/bash/function/mrr-weekly.txt
+++ b/resources/libraries/bash/function/mrr-weekly.txt
@@ -24,4 +24,4 @@
1numaAND4cAND64bANDbaseANDdpdkANDethANDhw_envANDl2xcfwdANDmrrANDnic_intel-xxv710NOT100_flowsNOT100k_flowsNOT10k_flowsNOT10r1cNOT114bNOT1518bNOT1cNOT1r10cNOT1r1cNOT1r2cNOT1r4cNOT1r6cNOT1r8cNOT1vmNOT1vnfNOT1vswitchNOT2cNOT2r1cNOT2r2cNOT2r4cNOT2r6cNOT2r8cNOT2vmNOT2vnfNOT4r1cNOT4r2cNOT4r4cNOT4vnfNOT6r1cNOT6r2cNOT78bNOT8r1cNOT8r2cNOT9000bNOTaclNOTacl1NOTacl10NOTacl50NOTacl_permitNOTacl_permit_reflectNOTacl_statefulNOTacl_statelessNOTaes_gcmNOTcbc_sha1NOTcfs_optNOTchainNOTcopwhlistNOTdockerNOTdot1adNOTdot1qNOTdrv_avfNOTencapNOTfeatureNOTfib_100kNOTfib_10kNOTfib_1mNOTfib_200kNOTfib_20kNOTfib_2mNOThorizontalNOTiaclNOTiacldstNOTimixNOTip4baseNOTip4fwdNOTip4ovrlayNOTip4unrlayNOTip6baseNOTip6fwdNOTip6ovrlayNOTip6unrlayNOTipsecNOTipsechwNOTipsecintNOTipsecswNOTipsectranNOTipsectunNOTk8sNOTl2bd_1NOTl2bd_10NOTl2bd_100NOTl2bd_1kNOTl2bdbaseNOTl2bdmaclrnNOTl2bdscaleNOTl2ovrlayNOTl2patchNOTl2xcbaseNOTlbondNOTlbond_1lNOTlbond_2lNOTlbond_dpdkNOTlbond_lb_l34NOTlbond_mode_lacpNOTlbond_mode_xorNOTlbond_vppNOTlispNOTlispgpeNOTlxcNOTmacipNOTmemifNOTnat44NOTndrpdrNOTnf_densityNOTnf_l3fwdip4NOTnf_vppip4NOTnic_cisco-vic-1227NOTnic_cisco-vic-1385NOTnic_intel-x520-da2NOTnic_intel-x553NOTnic_intel-x710NOTnic_intel-xl710NOToaclNOTparallelNOTpipelineNOTpolice_markNOTscaleNOTsfc_controllerNOTsingle_memifNOTsrc_user_1NOTsrc_user_10NOTsrc_user_100NOTsrc_user_1000NOTsrc_user_2000NOTsrc_user_4000NOTsrv6NOTsrv6_1sidNOTsrv6_2sid_decapNOTsrv6_2sid_nodecapNOTsrv6_proxyNOTsrv6_proxy_dynNOTsrv6_proxy_masqNOTsrv6_proxy_statNOTtnl_1000NOTvhostNOTvhost_1024NOTvlan_1NOTvlan_10NOTvlan_100NOTvlan_1kNOTvpp_agentNOTvtsNOTvxlanNOTvxlan_1NOTvxlan_10NOTvxlan_100NOTvxlan_1k
# nfv_density
-mrrAND${default_nic}ANDnf_densityANDimix
+mrrAND${default_nic}ANDnf_densityANDimixANDdrv_vfio_pci
diff --git a/resources/libraries/python/Constants.py b/resources/libraries/python/Constants.py
index dc9eda7505..0e06857472 100644
--- a/resources/libraries/python/Constants.py
+++ b/resources/libraries/python/Constants.py
@@ -185,7 +185,7 @@ class Constants:
TREX_INSTALL_DIR = u"/opt/trex-core-2.73"
# TRex limit memory.
- TREX_LIMIT_MEMORY = get_int_from_env(u"TREX_LIMIT_MEMORY ", 4096)
+ TREX_LIMIT_MEMORY = get_int_from_env(u"TREX_LIMIT_MEMORY", 4096)
# TRex number of cores
TREX_CORE_COUNT = get_int_from_env(u"TREX_CORE_COUNT", 7)
@@ -270,6 +270,47 @@ class Constants:
u"Mellanox-CX556A": u"100ge2p1cx556a",
}
+ # Not each driver is supported by each NIC.
+ NIC_NAME_TO_DRIVER = {
+ u"Cisco-VIC-1227": [u"vfio-pci"],
+ u"Cisco-VIC-1385": [u"vfio-pci"],
+ u"Intel-X520-DA2": [u"vfio-pci"],
+ u"Intel-X553": [u"vfio-pci"],
+ u"Intel-X710": [u"vfio-pci", u"avf"],
+ u"Intel-XL710": [u"vfio-pci", u"avf"],
+ u"Intel-XXV710": [u"vfio-pci", u"avf"],
+ u"Mellanox-CX556A": [u"rdma-core"],
+ }
+
+ # Each driver needs different prugin to work.
+ NIC_DRIVER_TO_PLUGINS = {
+ u"vfio-pci": u"dpdk_plugin.so",
+ u"avf": u"avf_plugin.so",
+ u"rdma-core": u"rdma_plugin.so",
+ }
+
+ # Tags to differentiate tests for different NIC driver.
+ NIC_DRIVER_TO_TAG = {
+ u"vfio-pci": u"DRV_VFIO_PCI",
+ u"avf": u"DRV_AVF",
+ u"rdma-core": u"DRV_RDMA_CORE",
+ }
+
+ # Suite names have to be different, add prefix.
+ NIC_DRIVER_TO_SUITE_PREFIX = {
+ u"vfio-pci": u"",
+ u"avf": u"avf-",
+ u"rdma-core": u"rdma-",
+ }
+
+ # Additional step for perf needs to know driver type.
+ # Contains part of suite setup line, matching both single and double link.
+ NIC_DRIVER_TO_SETUP_ARG = {
+ u"vfio-pci": u"le link | performance",
+ u"avf": u"le link | performance_avf",
+ u"rdma-core": u"le link | performance_rdma",
+ }
+
# TODO CSIT-1481: Crypto HW should be read from topology file instead.
NIC_NAME_TO_CRYPTO_HW = {
u"Intel-X553": u"HW_C3xxx",
diff --git a/resources/libraries/python/ContainerUtils.py b/resources/libraries/python/ContainerUtils.py
index b2d0296656..a3b79518c2 100644
--- a/resources/libraries/python/ContainerUtils.py
+++ b/resources/libraries/python/ContainerUtils.py
@@ -696,7 +696,7 @@ class ContainerEngine:
running = u"/tmp/running.exec"
template = f"{Constants.RESOURCES_TPL_CONTAINER}/{template_file}"
- with open(template, "r") as src_file:
+ with open(template, u"rt") as src_file:
src = Template(src_file.read())
self.execute(f'echo "{src.safe_substitute(**kwargs)}" > {running}')
diff --git a/resources/libraries/python/QemuUtils.py b/resources/libraries/python/QemuUtils.py
index 09c3df7725..f31e153bd2 100644
--- a/resources/libraries/python/QemuUtils.py
+++ b/resources/libraries/python/QemuUtils.py
@@ -236,7 +236,7 @@ class QemuUtils:
template = f"{Constants.RESOURCES_TPL_VM}/{self._opt.get(u'vnf')}.exec"
exec_cmd_no_error(self._node, f"rm -f {running}", sudo=True)
- with open(template, "r") as src_file:
+ with open(template, u"rt") as src_file:
src = Template(src_file.read())
exec_cmd_no_error(
self._node, f"echo '{src.safe_substitute(**kwargs)}' | "
@@ -296,7 +296,7 @@ class QemuUtils:
init = self._temp.get(u"ini")
exec_cmd_no_error(self._node, f"rm -f {init}", sudo=True)
- with open(template, "r") as src_file:
+ with open(template, u"rt") as src_file:
src = Template(src_file.read())
exec_cmd_no_error(
self._node, f"echo '{src.safe_substitute(**kwargs)}' | "
diff --git a/resources/libraries/python/VatExecutor.py b/resources/libraries/python/VatExecutor.py
index 1de32a2a21..26d4b75781 100644
--- a/resources/libraries/python/VatExecutor.py
+++ b/resources/libraries/python/VatExecutor.py
@@ -113,7 +113,7 @@ class VatExecutor:
ssh.scp(vat_name, vat_name)
remote_file_path = vat_name
if history:
- with open(vat_name, "r") as vat_file:
+ with open(vat_name, u"rt") as vat_file:
for line in vat_file:
PapiHistory.add_to_papi_history(
node, line.replace(u"\n", u""), papi=False
@@ -155,7 +155,7 @@ class VatExecutor:
:type timeout: int
:type json_out: bool
"""
- with open(tmp_fn, "w") as tmp_f:
+ with open(tmp_fn, u"wt") as tmp_f:
tmp_f.writelines(commands)
self.execute_script(
@@ -388,7 +388,7 @@ class VatTerminal:
"""
file_path = f"{Constants.RESOURCES_TPL_VAT}/{vat_template_file}"
- with open(file_path, "r") as template_file:
+ with open(file_path, u"rt") as template_file:
cmd_template = template_file.readlines()
ret = list()
for line_tmpl in cmd_template:
diff --git a/resources/libraries/python/VppApiCrc.py b/resources/libraries/python/VppApiCrc.py
index d55058e431..693dac064a 100644
--- a/resources/libraries/python/VppApiCrc.py
+++ b/resources/libraries/python/VppApiCrc.py
@@ -132,7 +132,7 @@ class VppApiCrcChecker:
file_path = os.path.normpath(os.path.join(
os.path.dirname(os.path.abspath(__file__)), u"..", u"..",
u"api", u"vpp", u"supported_crcs.yaml"))
- with open(file_path, "r") as file_in:
+ with open(file_path, u"rt") as file_in:
collections_dict = yaml.safe_load(file_in.read())
for collection_name, name_to_crc_mapping in collections_dict.items():
self._register_collection(collection_name, name_to_crc_mapping)
@@ -242,7 +242,7 @@ class VppApiCrcChecker:
for filename in files:
if not filename.endswith(u".api.json"):
continue
- with open(f"{root}/{filename}", "r") as file_in:
+ with open(f"{root}/{filename}", u"rt") as file_in:
json_obj = json.load(file_in)
msgs = json_obj[u"messages"]
for msg_obj in msgs:
diff --git a/resources/libraries/python/autogen/Regenerator.py b/resources/libraries/python/autogen/Regenerator.py
index 7271fbcf37..b1d0c9e993 100644
--- a/resources/libraries/python/autogen/Regenerator.py
+++ b/resources/libraries/python/autogen/Regenerator.py
@@ -188,31 +188,66 @@ def write_default_files(in_filename, in_prolog, kwargs_list):
_, suite_id = get_iface_and_suite_id(tmp_filename)
testcase = Testcase.default(suite_id)
for nic_name in Constants.NIC_NAME_TO_CODE:
- out_filename = replace_defensively(
+ tmp2_filename = replace_defensively(
tmp_filename, u"10ge2p1x710",
Constants.NIC_NAME_TO_CODE[nic_name], 1,
u"File name should contain NIC code once.", in_filename
)
- out_prolog = replace_defensively(
+ tmp2_prolog = replace_defensively(
tmp_prolog, u"Intel-X710", nic_name, 2,
u"NIC name should appear twice (tag and variable).",
in_filename
)
- if out_prolog.count(u"HW_") == 2:
+ if tmp2_prolog.count(u"HW_") == 2:
# TODO CSIT-1481: Crypto HW should be read
# from topology file instead.
if nic_name in Constants.NIC_NAME_TO_CRYPTO_HW:
- out_prolog = replace_defensively(
- out_prolog, u"HW_DH895xcc",
+ tmp2_prolog = replace_defensively(
+ tmp2_prolog, u"HW_DH895xcc",
Constants.NIC_NAME_TO_CRYPTO_HW[nic_name], 1,
u"HW crypto name should appear.", in_filename
)
- iface, suite_id = get_iface_and_suite_id(out_filename)
- with open(out_filename, "wt") as file_out:
- file_out.write(out_prolog)
- add_default_testcases(
- testcase, iface, suite_id, file_out, kwargs_list
+ iface, old_suite_id = get_iface_and_suite_id(tmp2_filename)
+ if u"DPDK" in in_prolog:
+ with open(tmp2_filename, u"wt") as file_out:
+ file_out.write(tmp2_prolog)
+ add_default_testcases(
+ testcase, iface, old_suite_id, file_out, kwargs_list
+ )
+ return
+ for driver in Constants.NIC_NAME_TO_DRIVER[nic_name]:
+ out_filename = replace_defensively(
+ tmp2_filename, old_suite_id,
+ Constants.NIC_DRIVER_TO_SUITE_PREFIX[driver] + old_suite_id,
+ 1, u"Error adding driver prefix.", in_filename
+ )
+ out_prolog = replace_defensively(
+ tmp2_prolog, u"vfio-pci", driver, 1,
+ u"Driver name should appear once.", in_filename
+ )
+ out_prolog = replace_defensively(
+ out_prolog, Constants.NIC_DRIVER_TO_TAG[u"vfio-pci"],
+ Constants.NIC_DRIVER_TO_TAG[driver], 1,
+ u"Driver tag should appear once.", in_filename
+ )
+ out_prolog = replace_defensively(
+ out_prolog, Constants.NIC_DRIVER_TO_PLUGINS[u"vfio-pci"],
+ Constants.NIC_DRIVER_TO_PLUGINS[driver], 1,
+ u"Driver plugin should appear once.", in_filename
+ )
+ out_prolog = replace_defensively(
+ out_prolog, Constants.NIC_DRIVER_TO_SETUP_ARG[u"vfio-pci"],
+ Constants.NIC_DRIVER_TO_SETUP_ARG[driver], 1,
+ u"Perf setup argument should appear once.", in_filename
)
+ iface, suite_id = get_iface_and_suite_id(out_filename)
+ # TODO: Reorder loops so suite_id is finalized sooner.
+ testcase = Testcase.default(suite_id)
+ with open(out_filename, u"wt") as file_out:
+ file_out.write(out_prolog)
+ add_default_testcases(
+ testcase, iface, suite_id, file_out, kwargs_list
+ )
def write_reconf_files(in_filename, in_prolog, kwargs_list):
@@ -232,36 +267,66 @@ def write_reconf_files(in_filename, in_prolog, kwargs_list):
_, suite_id = get_iface_and_suite_id(in_filename)
testcase = Testcase.default(suite_id)
for nic_name in Constants.NIC_NAME_TO_CODE:
- out_filename = replace_defensively(
+ tmp_filename = replace_defensively(
in_filename, u"10ge2p1x710",
Constants.NIC_NAME_TO_CODE[nic_name], 1,
u"File name should contain NIC code once.", in_filename
)
- out_prolog = replace_defensively(
+ tmp_prolog = replace_defensively(
in_prolog, u"Intel-X710", nic_name, 2,
u"NIC name should appear twice (tag and variable).",
in_filename
)
- if out_prolog.count(u"HW_") == 2:
+ if tmp_prolog.count(u"HW_") == 2:
# TODO CSIT-1481: Crypto HW should be read
# from topology file instead.
- if nic_name in list(Constants.NIC_NAME_TO_CRYPTO_HW.keys()):
- out_prolog = replace_defensively(
- out_prolog, u"HW_DH895xcc",
+ if nic_name in Constants.NIC_NAME_TO_CRYPTO_HW.keys():
+ tmp_prolog = replace_defensively(
+ tmp_prolog, u"HW_DH895xcc",
Constants.NIC_NAME_TO_CRYPTO_HW[nic_name], 1,
u"HW crypto name should appear.", in_filename
)
- iface, suite_id = get_iface_and_suite_id(out_filename)
- with open(out_filename, "wt") as file_out:
- file_out.write(out_prolog)
- add_default_testcases(
- testcase, iface, suite_id, file_out, kwargs_list
+ iface, old_suite_id = get_iface_and_suite_id(tmp_filename)
+ for driver in Constants.NIC_NAME_TO_DRIVER[nic_name]:
+ out_filename = replace_defensively(
+ tmp_filename, old_suite_id,
+ Constants.NIC_DRIVER_TO_SUITE_PREFIX[driver] + old_suite_id,
+ 1, u"Error adding driver prefix.", in_filename
+ )
+ out_prolog = replace_defensively(
+ tmp_prolog, u"vfio-pci", driver, 1,
+ u"Driver name should appear once.", in_filename
)
+ out_prolog = replace_defensively(
+ out_prolog, Constants.NIC_DRIVER_TO_TAG[u"vfio-pci"],
+ Constants.NIC_DRIVER_TO_TAG[driver], 1,
+ u"Driver tag should appear once.", in_filename
+ )
+ out_prolog = replace_defensively(
+ out_prolog, Constants.NIC_DRIVER_TO_PLUGINS[u"vfio-pci"],
+ Constants.NIC_DRIVER_TO_PLUGINS[driver], 1,
+ u"Driver plugin should appear once.", in_filename
+ )
+ out_prolog = replace_defensively(
+ out_prolog, Constants.NIC_DRIVER_TO_SETUP_ARG[u"vfio-pci"],
+ Constants.NIC_DRIVER_TO_SETUP_ARG[driver], 1,
+ u"Perf setup argument should appear once.", in_filename
+ )
+ iface, suite_id = get_iface_and_suite_id(out_filename)
+ # TODO: Reorder loops so suite_id is finalized sooner.
+ testcase = Testcase.default(suite_id)
+ with open(out_filename, u"wt") as file_out:
+ file_out.write(out_prolog)
+ add_default_testcases(
+ testcase, iface, suite_id, file_out, kwargs_list
+ )
def write_tcp_files(in_filename, in_prolog, kwargs_list):
"""Using given filename and prolog, write all generated tcp suites.
+ TODO: Suport drivers.
+
:param in_filename: Template filename to derive real filenames from.
:param in_prolog: Template content to derive real content from.
:param kwargs_list: List of kwargs for add_default_testcase.
@@ -283,7 +348,7 @@ def write_tcp_files(in_filename, in_prolog, kwargs_list):
u"NIC name should appear twice (tag and variable).",
in_filename
)
- with open(out_filename, "wt") as file_out:
+ with open(out_filename, u"wt") as file_out:
file_out.write(out_prolog)
add_tcp_testcases(testcase, file_out, kwargs_list)
@@ -303,9 +368,9 @@ class Regenerator:
"""Regenerate files matching glob pattern based on arguments.
In the current working directory, find all files matching
- the glob pattern. Use testcase template according to suffix
- to regenerate test cases, auto-numbering them,
- taking arguments from list.
+ the glob pattern. Use testcase template to regenerate test cases
+ according to suffix, governed by protocol, autonumbering them.
+ Also generate suites for other NICs and drivers.
Log-like prints are emitted to sys.stderr.
@@ -336,6 +401,9 @@ class Regenerator:
tcp_kwargs_list = [
{u"phy_cores": i, u"frame_size": 0} for i in (1, 2, 4)
]
+ forbidden = [
+ v for v in Constants.NIC_DRIVER_TO_SUITE_PREFIX.values() if v
+ ]
for in_filename in glob(pattern):
if not self.quiet:
print(
@@ -346,9 +414,14 @@ class Regenerator:
raise RuntimeError(
f"Error in {in_filename}: non-primary NIC found."
)
- with open(in_filename, "rt") as file_in:
+ for prefix in forbidden:
+ if prefix in in_filename:
+ raise RuntimeError(
+ f"Error in {in_filename}: non-primary driver found."
+ )
+ with open(in_filename, u"rt") as file_in:
in_prolog = u"".join(
- file_in.read().partition("*** Test Cases ***")[:-1]
+ file_in.read().partition(u"*** Test Cases ***")[:-1]
)
if in_filename.endswith(u"-ndrpdr.robot"):
write_default_files(in_filename, in_prolog, default_kwargs_list)
diff --git a/resources/libraries/python/parsers/JsonParser.py b/resources/libraries/python/parsers/JsonParser.py
index c597d5a935..bebe2a2407 100644
--- a/resources/libraries/python/parsers/JsonParser.py
+++ b/resources/libraries/python/parsers/JsonParser.py
@@ -49,6 +49,6 @@ class JsonParser:
:returns: JSON data parsed as python list.
:rtype: list
"""
- input_data = open(json_file, "rt").read()
+ input_data = open(json_file, u"rt").read()
parsed_data = JsonParser.parse_data(input_data)
return parsed_data
diff --git a/resources/libraries/robot/shared/suite_setup.robot b/resources/libraries/robot/shared/suite_setup.robot
index 0a78226962..7518899ee1 100644
--- a/resources/libraries/robot/shared/suite_setup.robot
+++ b/resources/libraries/robot/shared/suite_setup.robot
@@ -227,17 +227,6 @@
| | | Run Keyword | Additional Suite setup Action For ${action}
| | END
-| Additional Suite Setup Action For performance
-| | [Documentation]
-| | ... | Additional Setup for suites which uses performance measurement.
-| |
-| | Run Keyword If | ${duts_count} == 1
-| | ... | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
-| | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${osi_layer}
-| | Run Keyword If | ${duts_count} == 2
-| | ... | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
-| | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${osi_layer}
-
| Additional Suite Setup Action For scapy
| | [Documentation]
| | ... | Additional Setup for suites which uses scapy as Traffic generator.
@@ -255,6 +244,25 @@
| | | ... | ${${dut_str}_if1} | ${${dut_str}_if2}
| | END
+| Additional Suite Setup Action For performance
+| | [Documentation]
+| | ... | Additional Setup for suites which uses performance measurement.
+| | ...
+| | Run Keyword If | ${duts_count} == 1
+| | ... | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
+| | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${osi_layer}
+| | Run Keyword If | ${duts_count} == 2
+| | ... | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
+| | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${osi_layer}
+
+| Additional Suite Setup Action For performance_rdma
+| | [Documentation]
+| | ... | Additional Setup for suites which uses performance measurement with
+| | ... | RDMA-core driver.
+| | ...
+# TODO: Add functionality for tests that need some.
+| | Additional Suite Setup Action For performance
+
| Additional Suite Setup Action For performance_avf
| | [Documentation]
| | ... | Additional Setup for suites which uses performance measurement over
diff --git a/resources/tools/presentation/generator_cpta.py b/resources/tools/presentation/generator_cpta.py
index a11d1da25f..4017670427 100644
--- a/resources/tools/presentation/generator_cpta.py
+++ b/resources/tools/presentation/generator_cpta.py
@@ -587,7 +587,7 @@ def _generate_all_charts(spec, input_data):
# Write the tables:
for job_name, csv_table in csv_tables.items():
file_name = f"{spec.cpta[u'output-file']}/{job_name}-trending"
- with open(f"{file_name}.csv", u"w") as file_handler:
+ with open(f"{file_name}.csv", u"wt") as file_handler:
file_handler.writelines(csv_table)
txt_table = None
@@ -613,7 +613,7 @@ def _generate_all_charts(spec, input_data):
)
line_nr += 1
txt_table.align[u"Build Number:"] = u"l"
- with open(f"{file_name}.txt", u"w") as txt_file:
+ with open(f"{file_name}.txt", u"wt") as txt_file:
txt_file.write(str(txt_table))
# Evaluate result:
diff --git a/resources/tools/presentation/generator_files.py b/resources/tools/presentation/generator_files.py
index 00a78cc99a..fdd364fc12 100644
--- a/resources/tools/presentation/generator_files.py
+++ b/resources/tools/presentation/generator_files.py
@@ -114,7 +114,7 @@ def file_test_results(file_spec, input_data):
suites = input_data.merge_data(suites)
suites.sort_index(inplace=True)
- with open(file_name, u"w") as file_handler:
+ with open(file_name, u"wt") as file_handler:
file_handler.write(rst_header)
for suite_longname, suite in suites.items():
if len(suite_longname.split(u".")) <= \
diff --git a/resources/tools/presentation/generator_report.py b/resources/tools/presentation/generator_report.py
index f2bf8a1cb2..0712b78ef0 100644
--- a/resources/tools/presentation/generator_report.py
+++ b/resources/tools/presentation/generator_report.py
@@ -158,11 +158,11 @@ def generate_html_report(release, spec, report_version):
build_dir=spec.environment[u"paths"][u"DIR[BUILD,HTML]"])
execute_command(cmd)
- with open(spec.environment[u"paths"][u"DIR[CSS_PATCH_FILE]"], u"w") as \
+ with open(spec.environment[u"paths"][u"DIR[CSS_PATCH_FILE]"], u"wt") as \
css_file:
css_file.write(THEME_OVERRIDES)
- with open(spec.environment[u"paths"][u"DIR[CSS_PATCH_FILE2]"], u"w") as \
+ with open(spec.environment[u"paths"][u"DIR[CSS_PATCH_FILE2]"], u"wt") as \
css_file:
css_file.write(THEME_OVERRIDES)
diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py
index 7c99ab5d72..ef8af1de69 100644
--- a/resources/tools/presentation/generator_tables.py
+++ b/resources/tools/presentation/generator_tables.py
@@ -138,7 +138,7 @@ def table_details(table, input_data):
f"{table[u'output-file-ext']}"
)
logging.info(f" Writing file: {file_name}")
- with open(file_name, u"w") as file_handler:
+ with open(file_name, u"wt") as file_handler:
file_handler.write(u",".join(header) + u"\n")
for item in table_lst:
file_handler.write(u",".join(item) + u"\n")
@@ -212,7 +212,7 @@ def table_merged_details(table, input_data):
f"{table[u'output-file-ext']}"
)
logging.info(f" Writing file: {file_name}")
- with open(file_name, u"w") as file_handler:
+ with open(file_name, u"wt") as file_handler:
file_handler.write(u",".join(header) + u"\n")
for item in table_lst:
file_handler.write(u",".join(item) + u"\n")
@@ -622,7 +622,7 @@ def table_perf_comparison(table, input_data):
# Generate csv tables:
csv_file = f"{table[u'output-file']}.csv"
- with open(csv_file, u"w") as file_handler:
+ with open(csv_file, u"wt") as file_handler:
file_handler.write(header_str)
for test in tbl_lst:
file_handler.write(u",".join([str(item) for item in test]) + u"\n")
@@ -857,7 +857,7 @@ def table_perf_comparison_nic(table, input_data):
# Generate csv tables:
csv_file = f"{table[u'output-file']}.csv"
- with open(csv_file, u"w") as file_handler:
+ with open(csv_file, u"wt") as file_handler:
file_handler.write(header_str)
for test in tbl_lst:
file_handler.write(u",".join([str(item) for item in test]) + u"\n")
@@ -983,7 +983,7 @@ def table_nics_comparison(table, input_data):
tbl_lst.sort(key=lambda rel: rel[-1], reverse=True)
# Generate csv tables:
- with open(f"{table[u'output-file']}.csv", u"w") as file_handler:
+ with open(f"{table[u'output-file']}.csv", u"wt") as file_handler:
file_handler.write(u",".join(header) + u"\n")
for test in tbl_lst:
file_handler.write(u",".join([str(item) for item in test]) + u"\n")
@@ -1117,7 +1117,7 @@ def table_soak_vs_ndr(table, input_data):
# Generate csv tables:
csv_file = f"{table[u'output-file']}.csv"
- with open(csv_file, u"w") as file_handler:
+ with open(csv_file, u"wt") as file_handler:
file_handler.write(header_str)
for test in tbl_lst:
file_handler.write(u",".join([str(item) for item in test]) + u"\n")
@@ -1240,7 +1240,7 @@ def table_perf_trending_dash(table, input_data):
file_name = f"{table[u'output-file']}{table[u'output-file-ext']}"
logging.info(f" Writing file: {file_name}")
- with open(file_name, u"w") as file_handler:
+ with open(file_name, u"wt") as file_handler:
file_handler.write(header_str)
for test in tbl_sorted:
file_handler.write(u",".join([str(item) for item in test]) + u'\n')
@@ -1548,7 +1548,7 @@ def table_last_failed_tests(table, input_data):
file_name = f"{table[u'output-file']}{table[u'output-file-ext']}"
logging.info(f" Writing file: {file_name}")
- with open(file_name, u"w") as file_handler:
+ with open(file_name, u"wt") as file_handler:
for test in tbl_list:
file_handler.write(test + u'\n')
@@ -1653,7 +1653,7 @@ def table_failed_tests(table, input_data):
file_name = f"{table[u'output-file']}{table[u'output-file-ext']}"
logging.info(f" Writing file: {file_name}")
- with open(file_name, u"w") as file_handler:
+ with open(file_name, u"wt") as file_handler:
file_handler.write(u",".join(header) + u"\n")
for test in tbl_sorted:
file_handler.write(u",".join([str(item) for item in test]) + u'\n')
diff --git a/resources/tools/presentation/pal_utils.py b/resources/tools/presentation/pal_utils.py
index 5949432340..45fd277048 100644
--- a/resources/tools/presentation/pal_utils.py
+++ b/resources/tools/presentation/pal_utils.py
@@ -316,5 +316,5 @@ def convert_csv_to_pretty_txt(csv_file_name, txt_file_name):
txt_table.add_row(row)
txt_table.align[u"Test case"] = u"l"
if txt_table:
- with open(txt_file_name, u"w") as txt_file:
+ with open(txt_file_name, u"wt") as txt_file:
txt_file.write(str(txt_table))
diff --git a/resources/tools/scripts/topo_reservation.py b/resources/tools/scripts/topo_reservation.py
index 73f6d0e815..e0f39c76e9 100755
--- a/resources/tools/scripts/topo_reservation.py
+++ b/resources/tools/scripts/topo_reservation.py
@@ -84,7 +84,7 @@ def main():
)
args = parser.parse_args()
- with open(args.topo, "r") as topo_file:
+ with open(args.topo, u"rt") as topo_file:
topology = yaml.safe_load(topo_file.read())[u"nodes"]
# Even if TG is not guaranteed to be a Linux host,
diff --git a/resources/tools/topology/update_topology.py b/resources/tools/topology/update_topology.py
index 4ba3a833d0..37d64b1a05 100755
--- a/resources/tools/topology/update_topology.py
+++ b/resources/tools/topology/update_topology.py
@@ -37,7 +37,7 @@ def load_topology(args):
:rtype: dict
"""
data = None
- with open(args.topology, "r") as stream:
+ with open(args.topology, u"rt") as stream:
try:
data = yaml.safe_load(stream)
except yaml.YAMLError as exc:
@@ -153,7 +153,7 @@ def dump_updated_topology(topology, args):
f"overwrite this file, add -f as a parameter to this script"
)
return 1
- with open(args.output_file, "w") as stream:
+ with open(args.output_file, u"wt") as stream:
yaml.dump(topology, stream, default_flow_style=False)
else:
print(yaml.dump(topology, default_flow_style=False))
diff --git a/resources/tools/wrk/wrk_traffic_profile_parser.py b/resources/tools/wrk/wrk_traffic_profile_parser.py
index f59210350b..f553465705 100644
--- a/resources/tools/wrk/wrk_traffic_profile_parser.py
+++ b/resources/tools/wrk/wrk_traffic_profile_parser.py
@@ -61,7 +61,7 @@ class WrkTrafficProfile:
self.profile_name = profile_name
try:
- with open(self.profile_name, "r") as profile_file:
+ with open(self.profile_name, u"rt") as profile_file:
self.traffic_profile = safe_load(profile_file)
except IOError as err:
raise WrkError(