[v4,3/3] tests/rte_flow_common: change common interface

Message ID 20211201143152.20775-4-hailinx.xu@intel.com (mailing list archive)
State Accepted
Headers
Series change test plan and test cases |

Checks

Context Check Description
ci/Intel-dts-doc-test success Testing OK
ci/Intel-dts-suite-test success Testing OK

Commit Message

hailinx Dec. 1, 2021, 2:31 p.m. UTC
  change rss common interface: support hash verify when send multiple packets

Signed-off-by: Hailin Xu <hailinx.xu@intel.com>
---
 tests/rte_flow_common.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
  

Comments

Tu, Lijuan Dec. 16, 2021, 10:52 a.m. UTC | #1
> -----Original Message-----
> From: Hailin Xu <hailinx.xu@intel.com>
> Sent: 2021年12月1日 22:32
> To: dts@dpdk.org; Fu, Qi <qi.fu@intel.com>
> Cc: Xu, HailinX <hailinx.xu@intel.com>
> Subject: [dts][PATCH v4 3/3] tests/rte_flow_common: change common
> interface
> 
> change rss common interface: support hash verify when send multiple packets
> 
> Signed-off-by: Hailin Xu <hailinx.xu@intel.com>

Applied
  

Patch

diff --git a/tests/rte_flow_common.py b/tests/rte_flow_common.py
index fb76bf86..969d3222 100644
--- a/tests/rte_flow_common.py
+++ b/tests/rte_flow_common.py
@@ -804,11 +804,12 @@  class RssProcessing(object):
                 self.logger.error(error_msg)
                 self.error_msgs.append(error_msg)
         else:
-            if hashes != self.hash_records[key]:
-                error_msg = 'hash value {} should be same ' \
-                            'with {} {}'.format(hashes, key, self.hash_records[key])
-                self.logger.error(error_msg)
-                self.error_msgs.append(error_msg)
+            for hash in hashes:
+                if hash not in self.hash_records[key]:
+                    error_msg = 'hash value {} should be same ' \
+                                'with {} {}'.format(hashes, key, self.hash_records[key])
+                    self.logger.error(error_msg)
+                    self.error_msgs.append(error_msg)
         if not rss_distribute:
             error_msg = 'the packet do not distribute by rss'
             self.logger.error(error_msg)