[v2,3/3] tests/rte_flow_common: change rss common interface
Checks
Commit Message
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(-)
@@ -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)