[dts] [PATCH]add configuration detection for RSS hash at ethernet port

Liu, Yong yong.liu at intel.com
Fri Aug 12 07:40:53 CEST 2016


Thanks, applied.

On 08/11/2016 05:50 PM, xueqin.lin wrote:
> From: Xueqin Lin <xueqin.lin at intel.com>
>
> Code can not capture configuration error of RSS hash at ethernet port, add this verification.
>
> ---
>   tests/TestSuite_pmdrss_hash.py | 15 +++++++++------
>   1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/tests/TestSuite_pmdrss_hash.py b/tests/TestSuite_pmdrss_hash.py
> index 0cb703b..ebba3e7 100644
> --- a/tests/TestSuite_pmdrss_hash.py
> +++ b/tests/TestSuite_pmdrss_hash.py
> @@ -475,9 +475,9 @@ class TestPmdrssHash(TestCase):
>                   self.dut.send_expect(
>                       "set_hash_global_config  0 toeplitz %s enable" % iptype, "testpmd> ")
>                   self.dut.send_expect("port start all", "testpmd> ")
> -                self.dut.send_expect(
> +                out = self.dut.send_expect(
>                       "port config all rss %s" % 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))
> @@ -527,8 +527,9 @@ class TestPmdrssHash(TestCase):
>                   self.dut.send_expect(
>                       "set_sym_hash_ena_per_port 0 enable", "testpmd> ")
>                   self.dut.send_expect("port start all", "testpmd> ")
> -                self.dut.send_expect(
> +                out = self.dut.send_expect(
>                       "port config all rss %s" % 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):
> @@ -580,9 +581,9 @@ class TestPmdrssHash(TestCase):
>                       self.dut.send_expect(
>                           "set_hash_global_config 0 simple_xor %s enable" % iptype, "testpmd> ")
>                   self.dut.send_expect("port start all", "testpmd> ")
> -                self.dut.send_expect(
> +                out = self.dut.send_expect(
>                       "port config all rss %s" % 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))
> @@ -633,8 +634,10 @@ class TestPmdrssHash(TestCase):
>                   self.dut.send_expect(
>                       "set_sym_hash_ena_per_port 0 enable", "testpmd> ")
>                   self.dut.send_expect("port start all", "testpmd> ")
> -                self.dut.send_expect(
> +
> +                out = self.dut.send_expect(
>                       "port config all rss %s" % 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))



More information about the dts mailing list