[dts] [PATCH] tests/pmdrss: add support for RSS RETA test on Huawei hinic

Tu, Lijuan lijuan.tu at intel.com
Mon Apr 15 21:56:11 CEST 2019


Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of Rami Rosen
> Sent: Wednesday, April 10, 2019 1:34 AM
> To: dts at dpdk.org
> Subject: [dts] [PATCH] tests/pmdrss: add support for RSS RETA test on
> Huawei hinic
> 
> This patch adds support for RSS RETA test on Huawei hinic
> 
> Signed-off-by: Rami Rosen <ramirose at huawei.com>
> ---
>  tests/TestSuite_pmdrssreta.py | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/TestSuite_pmdrssreta.py b/tests/TestSuite_pmdrssreta.py
> index 89086c1..4a2bfd3 100644
> --- a/tests/TestSuite_pmdrssreta.py
> +++ b/tests/TestSuite_pmdrssreta.py
> @@ -148,7 +148,9 @@ class TestPmdrssreta(TestCase):
>          i = 0
>          for tmp_reta_line in reta_lines:
>              status = "false"
> -            if(self.nic in ["niantic", "redrockcanyou", "atwood", "boulderrapid"]):
> +            if(self.nic in ["hi1822"]):
> +                hash_index = int(tmp_reta_line["RSS hash"], 16) % 256
> +            elif (self.nic in ["niantic", "redrockcanyou", "atwood",
> "boulderrapid"]):
>                  # compute the hash result of five tuple into the 7 LSBs value.
>                  hash_index = int(tmp_reta_line["RSS hash"], 16) % 128
>              else:
> @@ -221,7 +223,12 @@ class TestPmdrssreta(TestCase):
>                  self.verify("error" not in out, "Configuration of RSS hash failed:
> Invalid argument")
> 
>                  # configure the reta with specific mappings.
> -                if(self.nic in ["niantic", "redrockcanyou", "atwood",
> "boulderrapid"]):
> +                if(self.nic in ["hi1822"]):
> +                    for i in range(256):
> +                        reta_entries.insert(i, random.randint(0, queue - 1))
> +                        self.dut.send_expect(
> +                            "port config 0 rss reta (%d,%d)" % (i, reta_entries[i]),
> "testpmd> ")
> +                elif (self.nic in ["niantic", "redrockcanyou", "atwood",
> "boulderrapid"]):
>                      for i in range(128):
>                          reta_entries.insert(i, random.randint(0, queue - 1))
>                          self.dut.send_expect( @@ -237,7 +244,7 @@ class
> TestPmdrssreta(TestCase):
>              self.dut.send_expect("quit", "# ", 30)
> 
>      def test_rss_key_size(self):
> -        nic_rss_key_size = {"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}
> +        nic_rss_key_size = {"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, "hi1822": 40}
>          self.verify(self.nic in nic_rss_key_size.keys(), "Not supporte rss key
> on %s" % self.nic)
> 
>          dutPorts = self.dut.get_ports(self.nic)
> --
> 2.17.1



More information about the dts mailing list