From patchwork Fri Jul 24 21:04:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: dliu X-Patchwork-Id: 74795 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 42156A0526; Fri, 24 Jul 2020 23:05:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3040E1C036; Fri, 24 Jul 2020 23:05:10 +0200 (CEST) Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) by dpdk.org (Postfix) with ESMTP id 452593B5 for ; Fri, 24 Jul 2020 23:05:08 +0200 (CEST) Received: by mail-qk1-f174.google.com with SMTP id e13so9955872qkg.5 for ; Fri, 24 Jul 2020 14:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bn99DhorRUJL07k+Ukxu9JKPpBu7HmFeJOyXZpsOiSI=; b=hx/FoMP5IQr51Y0Op2/i2OEcdH/9Af6HJgonpVs3wZuY8CqcNGebeL0Nyau2Dbr3rT pAGoeOJ6F5IBeJFA7bJ4xUE84k54jLnMJsjbpLXJmdyNehNsntAZiXFEuHOZAVbx6uJo TSU+R1A11D+nJg4jA3tF6WIbt4J3L3/tXtlNw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bn99DhorRUJL07k+Ukxu9JKPpBu7HmFeJOyXZpsOiSI=; b=XR16FhyJ+jnBRQ9s3YB9ZFb40yJTD7i9xeXa8ampvdApjNxxecutQlJS68/h9tbumu T2CEwXDTWTLEfbTAVrhGq9R/dfaONVWneNGC6o53hiOwDS1OzdWpkPPfUWWM6RFz5Ly1 aGYznHbNpC/rc9lFu0ICtkKVxbN73/qpiqpdC54gwL281FyNh3+IShYVbM07sjdifWct BnqsO7CEqA0ETJCLTyATqH0bXL9fRE0UVS9mZ88b23jgTLKd2JFUII3dcoGQON4XR5Qb ykxQlLZRwNulElXGCaOFuX2pbIX10t0BfG4A0WNTxvQ51sF+NPcB9OqlViM4d5uKPUZc QzmA== X-Gm-Message-State: AOAM5339iz/IMbcRJXmYwyxnDW3hUC1UH7okAIaUrgLODcoJEC2AKl2M +6OMICvb3xKkLfgIwVkq2tEDbW8zpbL/J6ZHtYCPRnbmTr96OCMk/Bp5deENE2AWIw5jsXciSGg kSc08BXQVioGY6+at2eAG34QRDqto7YhcjZMcayWhnJAmjRyuVw== X-Google-Smtp-Source: ABdhPJwM+8CYOxJfX5V0IlF2o7GrRNQNbju8KesF5Scm6jeK8kj5IcW6fIHQY2f2iT9OfYYp4F/vRQ== X-Received: by 2002:a37:6b47:: with SMTP id g68mr12851510qkc.190.1595624706424; Fri, 24 Jul 2020 14:05:06 -0700 (PDT) Received: from traffictester.opnfv.iol.unh.edu (opnfv-vpn.iol.unh.edu. [132.177.125.250]) by smtp.gmail.com with ESMTPSA id s190sm7889344qkh.116.2020.07.24.14.05.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 14:05:05 -0700 (PDT) From: David Liu To: dts@dpdk.org Cc: lylavoie@iol.unh.edu, David Liu Date: Fri, 24 Jul 2020 17:04:43 -0400 Message-Id: <20200724210443.48220-2-dliu@iol.unh.edu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200724210443.48220-1-dliu@iol.unh.edu> References: <20200724210443.48220-1-dliu@iol.unh.edu> MIME-Version: 1.0 Subject: [dts] [PATCH] Add RSS Key Update X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Signed-off-by: David Liu --- test_plans/rss_key_update_test_plan.rst | 121 +++++++++ tests/TestSuite_rss_key_update.py | 321 ++++++++++++++++++++++++ 2 files changed, 442 insertions(+) create mode 100644 test_plans/rss_key_update_test_plan.rst create mode 100644 tests/TestSuite_rss_key_update.py diff --git a/test_plans/rss_key_update_test_plan.rst b/test_plans/rss_key_update_test_plan.rst new file mode 100644 index 0000000..43f726b --- /dev/null +++ b/test_plans/rss_key_update_test_plan.rst @@ -0,0 +1,121 @@ +.. # BSD LICENSE + # + # Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + # Copyright © 2018[, 2019] The University of New Hampshire. All rights reserved. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions + # are met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above copyright + # notice, this list of conditions and the following disclaimer in + # the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Intel Corporation nor the names of its + # contributors may be used to endorse or promote products derived + # from this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +===================== +RSS Key Update Tests +===================== + +This document provides test plan to configure Receive Side Scaling (RSS) +hash key. This test case use similar testing method in ```pmdrss_hash```. +Verify setting a new hash key will result a change in packets queue destination. + +============= +Prerequisites +============= + +Assuming that ports ``0`` and ``1`` of the test target are directly connected +to the traffic generator and hash function Toeplitz is supported. + + +Test Case: test_set_hash_key_toeplitz +===================================== + +#. Launch the ``testpmd`` application with the following arguments:: + + ./testpmd -c ffffff -n 4 -- -i --portmask=0x6 --rxq=16 --txq=16 + +#. PMD fwd only receive the packets:: + + testpmd> set fwd rxonly + +#. Set port verbosity to 8:: + + testpmd> set verbose 8 + +#. Configure a RETA table with 512 or 128 entries to store queue:: + + testpmd> port config 0 rss reta (hash_index,queue_id) + +#. Set hash function, symmetric, port and packet type:: + + testpmd> set_hash_global_config 0 toeplitz ipv4-udp enable + +#. Send packet and print the hash value and queue id of every packet. \ + Then use the hash value % the table size to find expected queue id. \ + Make sure the expected queue and the destination queue id are the same. + +#. Check RSS enable/disable and types of RSS hash function for each port:: + + testpmd> show port rss-hash + + RSS is on by default, unless ```--disable-rss``` flag is apply. + +#. Configure new RSS hash key:: + + testpmd> port config rss-hash-key + +#. Send packet and print the hash value again to check if they have the same hash value and destination queue id. + + +Test Case: test_set_hash_key_toeplitz_symmetric +================================================ + +Same steps as the "test_set_hash_key_toeplitz" test case. +When set hash function you will need to add:: + + testpmd> set_sym_hash_ena_per_port 0 enable + +Then send in packet as normal. + +Test Case: test_set_hash_key_long_short +======================================== + +#. Check hash key size is supported in "show port info" + +#. Check RSS is enable + +#. Configure RSS hash key in testpmd with longer/normal/shorter hash key:: + + testpmd> port config rss-hash-key + +#. Display updated key and compare it with the original key:: + + testpmd> show port rss-hash key + diff --git a/tests/TestSuite_rss_key_update.py b/tests/TestSuite_rss_key_update.py new file mode 100644 index 0000000..adb44f1 --- /dev/null +++ b/tests/TestSuite_rss_key_update.py @@ -0,0 +1,321 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# Copyright © 2018[, 2019] The University of New Hampshire. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +""" +DPDK Test suite. + +Test the support of RSS Key Update by Poll Mode Drivers. + +""" + +import time +import re +import random +import utils + +from test_case import TestCase +from pmd_output import PmdOutput + +queue = 16 +reta_entries = [] +reta_num = 128 +iptypes = {'ipv4-sctp': 'sctp', + 'ipv4-other': 'ip', + 'ipv4-frag': 'ip', + 'ipv4-udp': 'udp', + 'ipv4-tcp': 'tcp', + 'ipv6-other': 'ip', + 'ipv6-sctp': 'sctp', + 'ipv6-udp': 'udp', + 'ipv6-tcp': 'tcp', + 'ipv6-frag': 'ip' + } + +class TestRssKeyUpdate(TestCase): + + def send_packet(self, itf, tran_type, symmetric): + """ + Sends packets. + """ + packet_list = { + 'ipv4-sctp': 'IP(src="192.168.0.%d", dst="192.168.0.%d")/SCTP(sport=1024,dport=1024,tag=1)', + 'ipv4-other': 'IP(src="192.168.0.%d", dst="192.168.0.%d")', + 'ipv4-frag': 'IP(src="192.168.0.%d", dst="192.168.0.%d",frag=1,flags="MF")', + 'ipv4-udp': 'IP(src="192.168.0.%d", dst="192.168.0.%d")/UDP(sport=1024,dport=1024)', + 'ipv4-tcp': 'IP(src="192.168.0.%d", dst="192.168.0.%d")/TCP(sport=1024,dport=1024)', + 'ipv6-other':'IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")', + 'ipv6-sctp': 'IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d", nh=132)/SCTP(sport=1024,dport=1024,tag=1)', + 'ipv6-udp': 'IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/UDP(sport=1024,dport=1024)', + 'ipv6-tcp': 'IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/TCP(sport=1024,dport=1024)', + 'ipv6-frag': 'IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d",nh=44)/IPv6ExtHdrFragment()' + } + + received_pkts = [] + self.tester.scapy_foreground() + self.dut.send_expect("start", "testpmd>") + mac = self.dut.get_mac_address(0) + + # send packet with different source and dest ip + if tran_type in packet_list.keys(): + packet_temp = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/%s], iface="%s")' % (mac, itf, packet_list[tran_type], itf) + for i in range(10): + packet = packet_temp % (i + 1, i + 2) + self.tester.scapy_append(packet) + if symmetric: + packet2 = packet_list[tran_type] % (mac, itf, i + 2, i + 1, itf) + self.tester.scapy_append(packet2) + self.tester.scapy_execute() + time.sleep(.5) + else: + print("\ntran_type error!\n") + + out = self.dut.get_session_output(timeout=1) + self.dut.send_expect("stop", "testpmd>") + lines = out.split("\r\n") + reta_line = {} + # collect the hash result and the queue id + for line in lines: + line = line.strip() + if len(line) != 0 and line.startswith("port "): + reta_line = {} + rexp = r"port (\d+)/queue (\d+): received (\d+) packets" + m = re.match(rexp, line) + if m: + reta_line["port"] = m.group(1) + reta_line["queue"] = m.group(2) + + elif len(line) != 0 and line.startswith("src="): + if "RSS hash" not in line: + continue + for item in line.split("-"): + item = item.strip() + if item.startswith("RSS hash"): + name, value = item.split("=", 1) + + reta_line[name.strip()] = value.strip() + received_pkts.append(reta_line) + + return(self.verifyResult(received_pkts, symmetric)) + + def verifyResult(self, reta_lines, symmetric): + """ + Verify whether or not the result passes. + """ + result = [] + key_id = {} + self.verify(len(reta_lines) > 0, 'No packet received!') + self.result_table_create( + ['packet index', 'hash value', 'hash index', 'queue id', 'actual queue id', 'pass ']) + + for i, tmp_reta_line in enumerate(reta_lines): + status = "false" + # compute the hash result of five tuple into the 7 LSBs value. + hash_index = int(tmp_reta_line["RSS hash"], 16) % reta_num + if(reta_entries[hash_index] == int(tmp_reta_line["queue"])): + status = "true" + result.insert(i, 0) + if symmetric: + if(i % 2 == 1): + if(pre_RSS_hash == tmp_reta_line["RSS hash"]): + status = "true" + result.insert(len(reta_lines) + (i - 1) // 2, 0) + else: + status = "fail" + result.insert(len(reta_lines) + (i - 1) // 2, 1) + pre_RSS_hash = tmp_reta_line["RSS hash"] + else: + status = "fail" + result.insert(i, 1) + self.result_table_add( + [i, tmp_reta_line["RSS hash"], hash_index, reta_entries[hash_index], tmp_reta_line["queue"], status]) + key_id[tmp_reta_line["RSS hash"]] = reta_entries[hash_index] + + self.result_table_print() + self.verify(sum(result) == 0, "the reta update function failed!") + return key_id + + def set_up_all(self): + """ + Run at the start of each test suite. + """ + + self.verify(self.nic in ["columbiaville_25g", "columbiaville_100g","fortville_eagle", "fortville_spirit", + "fortville_spirit_single", "redrockcanyou", "atwood", + "boulderrapid", "fortpark_TLV", "fortpark_BASE-T","fortville_25g", "niantic", "carlsville", "foxville"], + "NIC Unsupported: " + str(self.nic)) + global reta_num + global iptypes + global queue + if self.nic in ["foxville"]: + queue = 4 + + if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", + "fortpark_BASE-T","fortville_25g", "carlsville"]: + reta_num = 512 + elif self.nic in ["niantic", "foxville"]: + reta_num = 128 + iptypes = {'ipv4-other': 'ip', + 'ipv4-frag': 'ip', + 'ipv4-udp': 'udp', + 'ipv4-tcp': 'tcp', + 'ipv6-other': 'ip', + 'ipv6-udp': 'udp', + 'ipv6-tcp': 'tcp', + 'ipv6-frag': 'ip' + } + elif self.nic in ["redrockcanyou", "atwood", "boulderrapid"]: + reta_num = 128 + else: + self.verify(False, f"NIC Unsupported: {self.nic}") + + cores = self.dut.get_core_list("all") + self.coremask = utils.create_mask(cores) + + ports = self.dut.get_ports(self.nic) + self.ports_socket = self.dut.get_numa_id(ports[0]) + self.verify(len(ports) >= 1, "Not enough ports available") + + self.pmdout = PmdOutput(self.dut) + + def set_up(self): + """ + Run before each test case. + """ + dutPorts = self.dut.get_ports(self.nic) + localPort = self.tester.get_local_port(dutPorts[0]) + self.itf = self.tester.get_interface(localPort) + + self.dut.kill_all() + + self.pmdout.start_testpmd("Default", f"--rxq={queue} --txq={queue}") + + def test_set_hash_key_toeplitz(self): + + self.dut.send_expect("set verbose 8", "testpmd> ") + self.dut.send_expect("set fwd rxonly", "testpmd> ") + self.dut.send_expect("set promisc all off", "testpmd> ") + self.dut.send_expect(f"set nbcore {queue + 1}", "testpmd> ") + + for iptype, rsstype in list(iptypes.items()): + self.logger.info(f"***********************{iptype} rss test********************************") + self.dut.send_expect("port stop all", "testpmd> ") + self.dut.send_expect(f"set_hash_global_config 0 toeplitz {iptype} enable", "testpmd> ") + self.dut.send_expect("port start all", "testpmd> ") + out = self.dut.send_expect(f"port config all rss {rsstype}", "testpmd> ") + self.verify("error" not in out, "Configuration of RSS hash failed: Invalid argument") + # configure the reta with specific mappings. + for i in range(reta_num): + reta_entries.insert(i, random.randint(0, queue - 1)) + self.dut.send_expect(f"port config 0 rss reta ({i},{reta_entries[i]})", "testpmd> ") + + ori_output = self.send_packet(self.itf, iptype, False) + + self.dut.send_expect("show port 0 rss-hash key", "testpmd> ") + self.dut.send_expect(f"port config 0 rss-hash-key {iptype} 4439796BB54C50f3B675EF5B124F9F30B8A2C0FFFFDC4D02A08C9B334FF64A4C05C6FA343958D855FFF9583AE138C92E81150FFF", "testpmd> ") + + new_output = self.send_packet(self.itf, iptype, False) + + self.verify(ori_output != new_output, "before and after results are the same, hash key configuration failed!") + + def test_set_hash_key_toeplitz_symmetric(self): + + self.dut.send_expect("set verbose 8", "testpmd> ") + self.dut.send_expect("set fwd rxonly", "testpmd> ") + self.dut.send_expect("set promisc all off", "testpmd> ") + self.dut.send_expect(f"set nbcore {queue + 1}", "testpmd> ") + + for iptype, rsstype in list(iptypes.items()): + self.logger.info(f"***********************{iptype} rss test********************************") + self.dut.send_expect("port stop all", "testpmd> ") + self.dut.send_expect(f"set_hash_global_config 0 toeplitz {iptype} enable", "testpmd> ") + self.dut.send_expect("set_sym_hash_ena_per_port 0 enable", "testpmd> ") + self.dut.send_expect("port start all", "testpmd> ") + out = self.dut.send_expect(f"port config all rss {rsstype}", "testpmd> ") + self.verify("error" not in out, "configuration of rss hash failed: invalid argument") + + # configure the reta with specific mappings. + for i in range(reta_num): + reta_entries.insert(i, random.randint(0, queue - 1)) + self.dut.send_expect(f"port config 0 rss reta ({i},{reta_entries[i]})", "testpmd> ") + + ori_output = self.send_packet(self.itf, iptype, True) + + out = self.dut.send_expect("show port 0 rss-hash key", "testpmd> ") + self.verify("rss disable" not in out, "rss is disable!") + self.dut.send_expect(f"port config 0 rss-hash-key {iptype} 4439796BB54C50f3B675EF5B124F9F30B8A2C0FFFFDC4D02A08C9B334FF64A4C05C6FA343958D855FFF9583AE138C92E81150FFF", "testpmd> ") + + new_output = self.send_packet(self.itf, iptype, True) + + self.verify(ori_output != new_output, "before and after results are the same, hash key configuration failed!") + + def test_set_hash_key_short_long(self): + + nic_rss_key_size = {"columbiaville_25g": 52, "columbiaville_100g": 52, "fortville_eagle": 52, + "fortville_spirit": 52, + "fortville_spirit_single": 52, "fortville_25g": 52, "niantic": 40, "e1000": 40, + "redrockcanyou": 40, + "atwood": 40, "boulderrapid": 40, "fortpark_TLV": 52, "fortpark_BASE-T": 52, "hi1822": 40, + "cavium_a063": 48, + "cavium_a064": 48, "carlsville": 52, "sagepond": 40, "sageville": 40, "foxville": 40, + "twinpond": 40} + + self.verify(self.nic in list(nic_rss_key_size.keys()), f"Not supported rss key on {self.nic}") + + # Check supported hash key size + out = self.dut.send_expect("show port info all", "testpmd> ", 120) + self.verify(f"Hash key size in bytes: {nic_rss_key_size[self.nic]}" in out, "not expected hash key size!") + + test_keys = { + "4439796BB54C50f3B675EF5B124F9F30B8A2C0FFFFDC4D02A08C9B334FF64A4C05C6FA343958D855FFF9583AE138C92E81150FFFFF": "longer", + "4439796BB54C50f3B675EF5B124F9F30B8A2C0DC4D02A08C9B334FF64A4C05C6FA343958D855FFF9583AE138C92E81150FFF": "shorter", + } + + # config key length longer/shorter than 104 hexa-decimal numbers + for key, error in test_keys.items(): + out = self.dut.send_expect(f"port config 0 rss-hash-key ipv4-udp {key}", "testpmd> ") + self.verify("invalid" in out, f"Try to set hash key {error} than 104 hexa-decimal numbers!") + + # config ket length same as 104 hex-decimal numbers and keep the config + key = "4439796BB54C50f3B675EF5B124F9F30B8A2C0FFFFDC4D02A08C9B334FF64A4C05C6FA343958D855FFF9583AE138C92E81150FFF" + out = self.dut.send_expect(f"port config 0 rss-hash-key ipv4-udp {key}", "testpmd> ") + + def tear_down(self): + """ + Run after each test case. + """ + self.pmdout.quit() + + def tear_down_all(self): + """ + Run after each test suite. + """ + self.dut.kill_all()