From: Jianwei Mei <jianweix.mei@intel.com>
To: dts@dpdk.org
Cc: Jianwei Mei <jianweix.mei@intel.com>
Subject: [dts] [PATHC V1 2/2] tests/rte_flow_common: deal with type list of mark id.
Date: Mon, 24 Aug 2020 15:46:42 +0000 [thread overview]
Message-ID: <20200824154642.27295-3-jianweix.mei@intel.com> (raw)
In-Reply-To: <20200824154642.27295-1-jianweix.mei@intel.com>
Add list type to deal with mark id for multiple rules.
Signed-off-by: Jianwei Mei <jianweix.mei@intel.com>
---
tests/rte_flow_common.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/tests/rte_flow_common.py b/tests/rte_flow_common.py
index 5728af0..e80575e 100644
--- a/tests/rte_flow_common.py
+++ b/tests/rte_flow_common.py
@@ -504,8 +504,16 @@ def check_iavf_fdir_mark(out, pkt_num, check_param, stats=True):
mark_list = [i for i in res]
print("mark list is: ", mark_list)
verify(len(res) == pkt_num, "get wrong number of packet with mark_id")
- verify(all([int(i, CVL_TXQ_RXQ_NUMBER) == check_param["mark_id"] for i in res]),
- "failed: some packet mark id of %s not match" % mark_list)
+ if isinstance(check_param.get("mark_id"), list):
+ result = [int(m, CVL_TXQ_RXQ_NUMBER) in check_param.get("mark_id") for m in mark_list]
+ verify(all(result),"fail: some packet mark id of %s not match" % mark_list)
+ print((GREEN("pass: mark id %s matched" % mark_list)))
+ elif isinstance(check_param.get("mark_id"), int):
+ verify(all([int(i, CVL_TXQ_RXQ_NUMBER) == check_param["mark_id"] for i in res]),
+ "failed: some packet mark id of %s not match" % mark_list)
+ else:
+ raise Exception("wrong mark value, expect int or list")
+
if check_param.get("queue") is not None:
check_iavf_fdir_queue(out, pkt_num, check_param, stats)
elif check_param.get("passthru") is not None:
--
2.17.1
prev parent reply other threads:[~2020-08-24 7:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-24 15:46 [dts] [PATHC V1 0/2] add new case for check profile delete Jianwei Mei
2020-08-24 7:08 ` Xie, WeiX
2020-08-27 2:45 ` Tu, Lijuan
2020-08-24 15:46 ` [dts] [PATHC V1 1/2] tests/iavf_fdir: update rules of gtpu and " Jianwei Mei
2020-08-24 15:46 ` Jianwei Mei [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200824154642.27295-3-jianweix.mei@intel.com \
--to=jianweix.mei@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).