diff options
author | Vratko Polak <vrpolak@cisco.com> | 2024-05-30 10:51:57 +0200 |
---|---|---|
committer | Vratko Polak <vrpolak@cisco.com> | 2024-05-30 12:55:21 +0000 |
commit | 4e897a7a91e8b4782da05a4c906392e62c8f8ab5 (patch) | |
tree | 5885e3531e60667267eb45919c0ac7e662c9cc12 /resources | |
parent | a250e3195d6a4789828795d083f6661343de0f0a (diff) |
feat(hoststack): Enable L4 checksum RX offload
Change-Id: I169b06433ae962811aafa91ce90fe169b0bc4c71
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources')
-rw-r--r-- | resources/libraries/python/ContainerUtils.py | 1 | ||||
-rw-r--r-- | resources/libraries/python/KubernetesUtils.py | 3 | ||||
-rw-r--r-- | resources/libraries/python/QemuUtils.py | 3 | ||||
-rw-r--r-- | resources/libraries/python/VppConfigGenerator.py | 5 | ||||
-rw-r--r-- | resources/libraries/robot/shared/interfaces.robot | 5 |
5 files changed, 15 insertions, 2 deletions
diff --git a/resources/libraries/python/ContainerUtils.py b/resources/libraries/python/ContainerUtils.py index fc32248f6b..c0a282f775 100644 --- a/resources/libraries/python/ContainerUtils.py +++ b/resources/libraries/python/ContainerUtils.py @@ -763,6 +763,7 @@ class ContainerEngine: vpp_config = self.create_base_vpp_startup_config(cpuset_cpus) vpp_config.add_dpdk_dev(*devices) vpp_config.add_dpdk_log_level(u"debug") + vpp_config.add_dpdk_enable_tcp_udp_checksum() vpp_config.add_dpdk_no_tx_checksum_offload() vpp_config.add_dpdk_dev_default_rxq(rxq) vpp_config.add_plugin(u"enable", u"dpdk_plugin.so") diff --git a/resources/libraries/python/KubernetesUtils.py b/resources/libraries/python/KubernetesUtils.py index 9ded0e8b9e..6da5ba017d 100644 --- a/resources/libraries/python/KubernetesUtils.py +++ b/resources/libraries/python/KubernetesUtils.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Cisco and/or its affiliates. +# Copyright (c) 2024 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: @@ -492,6 +492,7 @@ class KubernetesUtils: vpp_config.add_ip6_hash_buckets(u"2000000") if not kwargs[u"jumbo"]: vpp_config.add_dpdk_no_multi_seg() + vpp_config.add_dpdk_enable_tcp_udp_checksum() vpp_config.add_dpdk_no_tx_checksum_offload() vpp_config.add_dpdk_dev_default_rxq(kwargs[u"rxq_count_int"]) vpp_config.add_dpdk_dev(kwargs[u"if1"], kwargs[u"if2"]) diff --git a/resources/libraries/python/QemuUtils.py b/resources/libraries/python/QemuUtils.py index 2df89ee87c..c9bbed4e81 100644 --- a/resources/libraries/python/QemuUtils.py +++ b/resources/libraries/python/QemuUtils.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2023 Cisco and/or its affiliates. +# Copyright (c) 2024 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: @@ -344,6 +344,7 @@ class QemuUtils: vpp_config.add_dpdk_log_level(u"debug") if not kwargs[u"jumbo_frames"]: vpp_config.add_dpdk_no_multi_seg() + vpp_config.add_dpdk_no_enable_tcp_udp_checksum() vpp_config.add_dpdk_no_tx_checksum_offload() if "ipsec" in self._opt.get(u'vnf'): vpp_config.add_plugin(u"enable", u"crypto_native_plugin.so") diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py index 73eff44066..fb3df2fc16 100644 --- a/resources/libraries/python/VppConfigGenerator.py +++ b/resources/libraries/python/VppConfigGenerator.py @@ -551,6 +551,11 @@ class VppConfigGenerator: path = ["dpdk", "no-multi-seg"] self.add_config_item(self._nodeconfig, "", path) + def add_dpdk_enable_tcp_udp_checksum(self): + """Add DPDK enable-tcp-udp-checksum configuration.""" + path = ["dpdk", "enable-tcp-udp-checksum"] + self.add_config_item(self._nodeconfig, "", path) + def add_dpdk_no_tx_checksum_offload(self): """Add DPDK no-tx-checksum-offload configuration.""" path = ["dpdk", "no-tx-checksum-offload"] diff --git a/resources/libraries/robot/shared/interfaces.robot b/resources/libraries/robot/shared/interfaces.robot index 091a09eeaf..b4d6959d01 100644 --- a/resources/libraries/robot/shared/interfaces.robot +++ b/resources/libraries/robot/shared/interfaces.robot @@ -16,6 +16,7 @@ | Library | resources.libraries.python.VhostUser *** Variables *** +| ${dpdk_enable_tcp_udp_checksum}= | ${False} | ${dpdk_no_tx_checksum_offload}= | ${True} *** Keywords *** @@ -136,6 +137,8 @@ | | | Unbind PCI Devices From Other Driver | ${nodes['${dut}']} | vfio-pci | | | | ... | @{${dut}_pf_pci} | | | Run keyword | ${dut}.Add DPDK Dev | @{${dut}_pf_pci} +| | | Run Keyword If | ${dpdk_enable_tcp_udp_checksum} +| | | ... | ${dut}.Add DPDK Enable TCP UDP Checksum | | | Run Keyword If | ${dpdk_no_tx_checksum_offload} | | | ... | ${dut}.Add DPDK No Tx Checksum Offload | | | Run Keyword | ${dut}.Add DPDK Log Level | debug @@ -201,6 +204,8 @@ | | 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_enable_tcp_udp_checksum} +| | | ... | ${dut}.Add DPDK Enable TCP UDP Checksum | | | Run Keyword If | ${dpdk_no_tx_checksum_offload} | | | ... | ${dut}.Add DPDK No Tx Checksum Offload | | | Run Keyword | ${dut}.Add DPDK Log Level | debug |