test suite reviews and discussions
 help / color / mirror / Atom feed
From: Zhimin Huang <zhiminx.huang@intel.com>
To: dts@dpdk.org
Cc: Zhimin Huang <zhiminx.huang@intel.com>
Subject: [dts][PATCH V1 1/5] tests/rte_flow_common:modify check mismatch pkts test
Date: Tue, 24 May 2022 10:12:28 +0800	[thread overview]
Message-ID: <20220524021232.32762-1-zhiminx.huang@intel.com> (raw)

For ipfragment test,the mismatch pkt no need to send with fragment.
so modify rte_flow_common to adapt test steps changed.

Signed-off-by: Zhimin Huang <zhiminx.huang@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 45446521..dfd56d2a 100644
--- a/tests/rte_flow_common.py
+++ b/tests/rte_flow_common.py
@@ -1389,14 +1389,15 @@ class FdirProcessing(object):
         self.verify = self.test_case.verify
         self.ipfrag_flag = ipfrag_flag
 
-    def send_pkt_get_output(self, pkts, port_id=0, count=1, interval=0, drop=False):
+    def send_pkt_get_output(self, pkts, port_id=0, count=1, interval=0, drop=False, **kwargs):
         tx_port = self.tester_ifaces[0] if port_id == 0 else self.tester_ifaces[1]
         self.logger.info("----------send packet-------------")
         self.logger.info("{}".format(pkts))
+        mismatch_flag = kwargs.get("mismatch")
         if drop:
             self.pmd_output.execute_cmd("clear port stats all")
             time.sleep(1)
-            if self.ipfrag_flag == True:
+            if self.ipfrag_flag == True and not mismatch_flag:
                 send_ipfragment_pkt(self.test_case, pkts, tx_port)
             else:
                 self.pkt.update_pkt(pkts)
@@ -1410,7 +1411,7 @@ class FdirProcessing(object):
             self.pmd_output.execute_cmd("start")
             return out
         else:
-            if self.ipfrag_flag == True:
+            if self.ipfrag_flag == True and not mismatch_flag:
                 count = 2
                 send_ipfragment_pkt(self.test_case, pkts, tx_port)
             else:
@@ -1623,11 +1624,11 @@ class FdirProcessing(object):
 
                 # send and check unmatched packets
                 out2 = self.send_pkt_get_output(
-                    pkts=tv["scapy_str"]["unmatched"], port_id=port_id, drop=drop
+                    pkts=tv["scapy_str"]["unmatched"], port_id=port_id, drop=drop, mismatch=True
                 )
                 check_mark(
                     out2,
-                    pkt_num=len(tv["scapy_str"]["unmatched"]) * 2
+                    pkt_num=len(tv["scapy_str"]["unmatched"])
                     if self.ipfrag_flag
                     else len(tv["scapy_str"]["unmatched"]),
                     check_param=tv["check_param"],
-- 
2.17.1


             reply	other threads:[~2022-05-24  2:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-24  2:12 Zhimin Huang [this message]
2022-05-24  2:12 ` [dts][PATCH V1 2/5] tests/ice_ip_fragment_rte_flow:extend mismatch pkts Zhimin Huang
2022-05-24  2:12 ` [dts][PATCH V1 3/5] test_plans/ice_ip_fragment_rte_flow:extend " Zhimin Huang
2022-05-24  2:12 ` [dts][PATCH V1 4/5] tests/ice_iavf_ip_fragment_rte_flow:extend " Zhimin Huang
2022-05-24  2:12 ` [dts][PATCH V1 5/5] test_plans/ice_iavf_ip_fragment_rte_flow:extend " Zhimin Huang

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=20220524021232.32762-1-zhiminx.huang@intel.com \
    --to=zhiminx.huang@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).