[dts][PATCH v3 3/3] tests/rte_flow_common: change common interface

Hailin Xu hailinx.xu at intel.com
Wed Nov 24 11:58:15 CET 2021


change rss common interface: support hash verify when send multiple packets

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

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)
-- 
2.17.1



More information about the dts mailing list