feat(core): Add mlx5_core driver tests 02/37902/3
authorpmikus <peter.mikus@protonmail.ch>
Thu, 12 Jan 2023 10:50:29 +0000 (10:50 +0000)
committerPeter Mikus <peter.mikus@protonmail.ch>
Thu, 12 Jan 2023 11:02:35 +0000 (11:02 +0000)
Signed-off-by: pmikus <peter.mikus@protonmail.ch>
Change-Id: I23f2ab678e6666a1423620fa373261d822030bc8

resources/libraries/python/Constants.py
resources/libraries/robot/shared/interfaces.robot

index 2bac8dc..89a302b 100644 (file)
@@ -368,14 +368,15 @@ class Constants:
         u"Intel-E822CQ": [u"vfio-pci", u"avf", u"af_xdp"],
         u"Intel-E810CQ": [u"vfio-pci", u"avf", u"af_xdp"],
         u"Amazon-Nitro-50G": [u"vfio-pci"],
-        u"Mellanox-CX556A": [u"rdma-core", u"af_xdp"],
+        u"Mellanox-CX556A": [u"rdma-core", u"mlx5_core", u"af_xdp"],
     }
 
-    # Each driver needs different prugin to work.
+    # Each driver needs different plugin 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",
+        u"mlx5_core": u"dpdk_plugin.so",
         u"af_xdp": u"af_xdp_plugin.so",
     }
 
@@ -384,6 +385,7 @@ class Constants:
         u"vfio-pci": u"DRV_VFIO_PCI",
         u"avf": u"DRV_AVF",
         u"rdma-core": u"DRV_RDMA_CORE",
+        u"mlx5_core": u"DRV_MLX5_CORE",
         u"af_xdp": u"DRV_AF_XDP",
     }
 
@@ -392,6 +394,7 @@ class Constants:
         u"vfio-pci": u"",
         u"avf": u"avf-",
         u"rdma-core": u"rdma-",
+        u"mlx5_core": u"mlx5-",
         u"af_xdp": u"af-xdp-",
     }
 
@@ -400,6 +403,7 @@ class Constants:
         u"vfio-pci": u"nic_vfs}= | 0",
         u"avf": u"nic_vfs}= | 1",
         u"rdma-core": u"nic_vfs}= | 0",
+        u"mlx5_core": u"nic_vfs}= | 0",
         u"af_xdp": u"nic_vfs}= | 0",
     }
 
index d6d3538..a2e46ef 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2022 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:
 | | | Set Interface Flow Control
 | | | ... | ${nodes['${dut}']} | ${${dut}_pf_pci} | rxf="off" | txf="off"
 | | END
+| | ${index}= | Get Index From List | ${TEST TAGS} | DPDK
+| | Run Keyword If | ${index} >= 0 | Return From Keyword
+| | FOR | ${dut} | IN | @{duts}
+| | | Run keyword | ${dut}.Add DPDK Dev | @{${dut}_pf_pci}
+| | | Run Keyword If | ${dpdk_no_tx_checksum_offload}
+| | | ... | ${dut}.Add DPDK No Tx Checksum Offload
+| | | Run Keyword | ${dut}.Add DPDK Log Level | debug
+| | | Run Keyword | ${dut}.Add DPDK Uio Driver | vfio-pci
+| | | Run Keyword | ${dut}.Add DPDK Dev Default RXQ | ${rxq_count_int}
+| | | Run Keyword If | not ${jumbo}
+| | | ... | ${dut}.Add DPDK No Multi Seg
+| | | Run Keyword If | ${nic_rxq_size} > 0
+| | | ... | ${dut}.Add DPDK Dev Default RXD | ${nic_rxq_size}
+| | | Run Keyword If | ${nic_txq_size} > 0
+| | | ... | ${dut}.Add DPDK Dev Default TXD | ${nic_txq_size}
+| | | Run Keyword If | '${crypto_type}' != '${None}'
+| | | ... | ${dut}.Add DPDK Cryptodev | ${dp_count_int}
+| | | Run Keyword | ${dut}.Add DPDK Max Simd Bitwidth | ${GRAPH_NODE_VARIANT}
+| | END
 
 | Initialize layer driver
 | | [Documentation]
 | | ... | Initialize mlx5_core interfaces on DUT on NIC PF.
 | | ... | Currently no operation.
 | |
+| | ... | *Arguments:*
+| | ... | - dut - DUT node. Type: string
+| | ... | - pf - NIC physical function (physical port). Type: integer
+| |
+| | ... | *Example:*
+| |
+| | ... | \| Initialize layer rdma-core on node \| DUT1 \| 1 \|
+| |
+| | [Arguments] | ${dut} | ${pf}
+| |
 | | No operation
 
 | Initialize layer interface