[dts] [PATCH V1 1/3] framework/pmd_output add method to get maximum number of rules
sunqin
qinx.sun at intel.com
Fri Jan 8 15:19:51 CET 2021
Add 'get_max_rule_number' method
Signed-off-by: sunqin <qinx.sun at intel.com>
---
framework/pmd_output.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/framework/pmd_output.py b/framework/pmd_output.py
index 3418efe4..3daa86b6 100644
--- a/framework/pmd_output.py
+++ b/framework/pmd_output.py
@@ -299,3 +299,11 @@ class PmdOutput():
break
sleep(1)
return 'down' not in status
+
+ def get_max_rule_number(self,obj,out):
+ res = re.search(r"fd_fltr_guar\s+=\s+(\d+).*fd_fltr_best_effort\s+=\s+(\d+)\.",out)
+ obj.verify(res,"'fd_fltr_guar' and 'fd_fltr_best_effort not found'")
+ fltr_guar,fltr_best = res.group(1),res.group(2)
+ max_rule = int(fltr_guar) + int(fltr_best)
+ obj.logger.info(f'this Card max rule number is :{max_rule}')
+ return max_rule
--
2.17.1
More information about the dts
mailing list