feat(hoststack): Enable L4 checksum RX offload 06/41006/1
authorVratko Polak <vrpolak@cisco.com>
Thu, 30 May 2024 08:51:57 +0000 (10:51 +0200)
committerVratko Polak <vrpolak@cisco.com>
Thu, 30 May 2024 12:55:59 +0000 (12:55 +0000)
Change-Id: I169b06433ae962811aafa91ce90fe169b0bc4c71
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
(cherry picked from commit 4e897a7a91e8b4782da05a4c906392e62c8f8ab5)

19 files changed:
resources/libraries/python/ContainerUtils.py
resources/libraries/python/KubernetesUtils.py
resources/libraries/python/QemuUtils.py
resources/libraries/python/VppConfigGenerator.py
resources/libraries/robot/shared/interfaces.robot
tests/vpp/perf/hoststack/10ge2p1x710-eth-ip4tcpbase-ldpreload-iperf3-bps.robot
tests/vpp/perf/hoststack/10ge2p1x710-eth-ip4tcpbase-nsim-ldpreload-iperf3-bps.robot
tests/vpp/perf/hoststack/10ge2p1x710-eth-ip4tcpscale1cl10s-ldpreload-iperf3-bps.robot
tests/vpp/perf/hoststack/10ge2p1x710-eth-ip4tcpscale1cl10s-nsim-ldpreload-iperf3-bps.robot
tests/vpp/perf/hoststack/10ge2p1x710-eth-ip4udpbase-ldpreload-iperf3-bps.robot
tests/vpp/perf/hoststack/10ge2p1x710-eth-ip4udpquicbase-vppecho-bps.robot
tests/vpp/perf/hoststack/10ge2p1x710-eth-ip4udpquicscale10cl10s-vppecho-bps.robot
tests/vpp/perf/hoststack/10ge2p1x710-eth-ip4udpquicscale10cl1s-vppecho-bps.robot
tests/vpp/perf/hoststack/10ge2p1x710-eth-ip4udpquicscale1cl10s-vppecho-bps.robot
tests/vpp/perf/hoststack/10ge2p1x710-eth-ip4udpscale1cl10s-ldpreload-iperf3-bps.robot
tests/vpp/perf/hoststack/2n1l-10ge2p1x710-eth-ip4tcphttp-dma-ldpreload-nginx-1_21_5-cps.robot
tests/vpp/perf/hoststack/2n1l-10ge2p1x710-eth-ip4tcphttp-dma-ldpreload-nginx-1_21_5-rps.robot
tests/vpp/perf/hoststack/2n1l-10ge2p1x710-eth-ip4tcphttp-ldpreload-nginx-1_21_5-cps.robot
tests/vpp/perf/hoststack/2n1l-10ge2p1x710-eth-ip4tcphttp-ldpreload-nginx-1_21_5-rps.robot

index fc32248..c0a282f 100644 (file)
@@ -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")
index 9ded0e8..6da5ba0 100644 (file)
@@ -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"])
index 2df89ee..c9bbed4 100644 (file)
@@ -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")
index 73eff44..fb3df2f 100644 (file)
@@ -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"]
index 091a09e..b4d6959 100644 (file)
@@ -16,6 +16,7 @@
 | Library | resources.libraries.python.VhostUser
 
 *** Variables ***
+| ${dpdk_enable_tcp_udp_checksum}= | ${False}
 | ${dpdk_no_tx_checksum_offload}= | ${True}
 
 *** Keywords ***
 | | | 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
 | | 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
index 2f8232e..654562f 100644 (file)
@@ -50,6 +50,7 @@
 | ${nic_vfs}= | 0
 | ${smt_used}= | ${False}
 | ${overhead}= | ${0}
+| ${dpdk_enable_tcp_udp_checksum}= | ${True}
 | ${dpdk_no_tx_checksum_offload}= | ${False}
 | ${frame_size}= | ${1518}
 | ${crypto_type}= | ${None}
index 39dd77f..c7ed27e 100644 (file)
@@ -50,6 +50,7 @@
 | ${nic_vfs}= | 0
 | ${smt_used}= | ${False}
 | ${overhead}= | ${0}
+| ${dpdk_enable_tcp_udp_checksum}= | ${True}
 | ${dpdk_no_tx_checksum_offload}= | ${False}
 | ${frame_size}= | ${1518}
 | ${crypto_type}= | ${None}
index 17ac73b..20a4049 100644 (file)
@@ -49,6 +49,7 @@
 | ${nic_pfs}= | 2
 | ${nic_vfs}= | 0
 | ${overhead}= | ${0}
+| ${dpdk_enable_tcp_udp_checksum}= | ${True}
 | ${dpdk_no_tx_checksum_offload}= | ${False}
 | ${frame_size}= | ${1518}
 | ${crypto_type}= | ${None}
index 30ac61d..5c13ca0 100644 (file)
@@ -49,6 +49,7 @@
 | ${nic_pfs}= | 2
 | ${nic_vfs}= | 0
 | ${overhead}= | ${0}
+| ${dpdk_enable_tcp_udp_checksum}= | ${True}
 | ${dpdk_no_tx_checksum_offload}= | ${False}
 | ${frame_size}= | ${1518}
 | ${crypto_type}= | ${None}
index 491e20b..87f3c09 100644 (file)
@@ -50,6 +50,7 @@
 | ${nic_vfs}= | 0
 | ${smt_used}= | ${False}
 | ${overhead}= | ${0}
+| ${dpdk_enable_tcp_udp_checksum}= | ${True}
 | ${dpdk_no_tx_checksum_offload}= | ${False}
 | ${frame_size}= | ${1518}
 | ${crypto_type}= | ${None}
index 5f2eafb..911af4c 100644 (file)
@@ -49,6 +49,7 @@
 | ${nic_vfs}= | 0
 | ${smt_used}= | ${False}
 | ${overhead}= | ${0}
+| ${dpdk_enable_tcp_udp_checksum}= | ${True}
 | ${dpdk_no_tx_checksum_offload}= | ${False}
 | ${frame_size}= | ${1518}
 | ${crypto_type}= | ${None}
index 5806905..e068186 100644 (file)
@@ -49,6 +49,7 @@
 | ${nic_pfs}= | 2
 | ${nic_vfs}= | 0
 | ${overhead}= | ${0}
+| ${dpdk_enable_tcp_udp_checksum}= | ${True}
 | ${dpdk_no_tx_checksum_offload}= | ${False}
 | ${frame_size}= | ${1518}
 | ${crypto_type}= | ${None}
index a312736..1203173 100644 (file)
@@ -49,6 +49,7 @@
 | ${nic_pfs}= | 2
 | ${nic_vfs}= | 0
 | ${overhead}= | ${0}
+| ${dpdk_enable_tcp_udp_checksum}= | ${True}
 | ${dpdk_no_tx_checksum_offload}= | ${False}
 | ${frame_size}= | ${1518}
 | ${crypto_type}= | ${None}
index 59951aa..6c28e2f 100644 (file)
@@ -49,6 +49,7 @@
 | ${nic_pfs}= | 2
 | ${nic_vfs}= | 0
 | ${overhead}= | ${0}
+| ${dpdk_enable_tcp_udp_checksum}= | ${True}
 | ${dpdk_no_tx_checksum_offload}= | ${False}
 | ${frame_size}= | ${1518}
 | ${crypto_type}= | ${None}
index 0368f9d..c942f2b 100644 (file)
@@ -49,6 +49,7 @@
 | ${nic_pfs}= | 2
 | ${nic_vfs}= | 0
 | ${overhead}= | ${0}
+| ${dpdk_enable_tcp_udp_checksum}= | ${True}
 | ${dpdk_no_tx_checksum_offload}= | ${False}
 | ${frame_size}= | ${1518}
 | ${crypto_type}= | ${None}
index cd6cb67..667b833 100644 (file)
@@ -51,6 +51,7 @@
 | ${nic_pfs}= | 2
 | ${nic_vfs}= | 0
 | ${overhead}= | ${0}
+| ${dpdk_enable_tcp_udp_checksum}= | ${True}
 | ${dpdk_no_tx_checksum_offload}= | ${False}
 #| ${page_size}= | 1G
 | ${ciphers}= | 0
index e1680b4..3cf4cf3 100644 (file)
@@ -51,6 +51,7 @@
 | ${nic_pfs}= | 2
 | ${nic_vfs}= | 0
 | ${overhead}= | ${0}
+| ${dpdk_enable_tcp_udp_checksum}= | ${True}
 | ${dpdk_no_tx_checksum_offload}= | ${False}
 #| ${page_size}= | 1G
 | ${ciphers}= | 0
index 7f1e4ba..75c9a4f 100644 (file)
@@ -49,6 +49,7 @@
 | ${nic_pfs}= | 2
 | ${nic_vfs}= | 0
 | ${overhead}= | ${0}
+| ${dpdk_enable_tcp_udp_checksum}= | ${True}
 | ${dpdk_no_tx_checksum_offload}= | ${False}
 | ${ciphers}= | 0
 | ${rps_cps}= | cps
index 0db8a72..9020c6c 100644 (file)
@@ -49,6 +49,7 @@
 | ${nic_pfs}= | 2
 | ${nic_vfs}= | 0
 | ${overhead}= | ${0}
+| ${dpdk_enable_tcp_udp_checksum}= | ${True}
 | ${dpdk_no_tx_checksum_offload}= | ${False}
 | ${ciphers}= | 0
 | ${rps_cps}= | rps