From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id CC378A00E6 for ; Mon, 13 May 2019 03:59:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A041C2B8D; Mon, 13 May 2019 03:59:11 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 270AB374 for ; Mon, 13 May 2019 03:59:10 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 May 2019 18:59:09 -0700 X-ExtLoop1: 1 Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga006.fm.intel.com with ESMTP; 12 May 2019 18:59:08 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 12 May 2019 18:59:08 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 12 May 2019 18:59:07 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.129]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.7]) with mapi id 14.03.0415.000; Mon, 13 May 2019 09:59:05 +0800 From: "Tu, Lijuan" To: "Ma, LihongX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V2] improve the method of verify_result Thread-Index: AQHU/lVOSccL38bNbE+ijnIcTEVAFKZc5ZaAgAt8lHA= Date: Mon, 13 May 2019 01:59:04 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BA7F8A2@SHSMSX101.ccr.corp.intel.com> References: <1556493078-5927-1-git-send-email-lihongx.ma@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOGZkNWYyMmMtNTllMy00MWIyLTkxM2UtYmMwYWFmYmNmNmU5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidHhyRUx0bUNnYnlGMUhnZUh1VlwvbVVpRmRScDBDcWppVXRRcGExd09haHZXWUs0cnBsRXBIS293TkgzRjZlUlYifQ== x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V2] improve the method of verify_result X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Ma, LihongX > Sent: Monday, May 6, 2019 10:34 AM > To: dts@dpdk.org > Subject: Re: [dts] [PATCH V2] improve the method of verify_result >=20 > Tested-by: lihong >=20 > -----Original Message----- > From: Ma, LihongX > Sent: Monday, April 29, 2019 7:11 AM > To: dts@dpdk.org > Cc: Ma, LihongX > Subject: [dts][PATCH V2] improve the method of verify_result >=20 > when the testpmd receive the miscellaneous packet, we should judge to > whether the packet is expeceted, so modify the verify method. >=20 > Signed-off-by: lihong > --- > tests/TestSuite_generic_flow_api.py | 209 +++++++++++++++++++++---------= --- > --- > 1 file changed, 120 insertions(+), 89 deletions(-) >=20 > diff --git a/tests/TestSuite_generic_flow_api.py > b/tests/TestSuite_generic_flow_api.py > index af27477..feaddce 100644 > --- a/tests/TestSuite_generic_flow_api.py > +++ b/tests/TestSuite_generic_flow_api.py > @@ -155,36 +155,65 @@ class TestGeneric_flow_api(TestCase): > elif module =3D=3D "nvgre": > self.tester.scapy_append('from nvgre import NVGRE') >=20 > - def verify_result(self, pf_vf, expect_rxpkts, expect_queue): > + def verify_result(self, pf_vf, expect_rxpkts, expect_queue, verify_m= ac): > """ > verify the packet to the expected queue or be dropped > """ > self.tester.scapy_execute() > time.sleep(2) > + verify_mac =3D verify_mac.upper() >=20 > if self.vf_flag =3D=3D 1: > + out_vf0 =3D > + self.session_secondary.get_session_before(timeout=3D2) > outstring_vf0 =3D self.session_secondary.send_expect("stop",= "testpmd> > ", 120) > + out_vf1 =3D self.session_third.get_session_before(timeout=3D= 2) > outstring_vf1 =3D self.session_third.send_expect("stop", "te= stpmd> ", > 120) > + self.logger.info("vf0: %s" % out_vf0) > + self.logger.info("vf1: %s" % out_vf1) > + out_pf =3D self.dut.get_session_output(timeout=3D2) > outstring_pf =3D self.dut.send_expect("stop", "testpmd> ", 120) > + self.logger.info("pf: %s" % out_pf) > time.sleep(2) > + > if expect_rxpkts =3D=3D "0": > if pf_vf =3D=3D "pf": > - self.verify("Queue" not in outstring_pf, "the packet is = not > dropped.") > + self.verify(verify_mac not in out_pf, "the packet is > + not dropped.") > elif pf_vf =3D=3D "vf0": > - self.verify("Queue" not in outstring_vf0, "the packet is= not > dropped.") > + self.verify(verify_mac not in out_vf0, "the packet is > + not dropped.") > else: > - self.verify("Queue" not in outstring_vf1, "the packet is= not > dropped.") > + self.verify(verify_mac not in out_vf1, "the packet is > + not dropped.") > else: > - result_scanner =3D r"Forward Stats for RX Port=3D %s/Queue= =3D\s?([0-9]+)" % > self.dut_ports[0] > + result_scanner =3D r"port\s*%s/queue\s?[0-9]+" % > + self.dut_ports[0] > scanner =3D re.compile(result_scanner, re.DOTALL) > if pf_vf =3D=3D "pf": > - m =3D scanner.search(outstring_pf) > + self.verify(verify_mac in out_pf, "the pf not receive th= e expect > packet.") > + out_info =3D out_pf > elif pf_vf =3D=3D "vf0": > - m =3D scanner.search(outstring_vf0) > + self.verify(verify_mac in out_vf0, "the vf0 not receive = the expect > packet.") > + out_info =3D out_vf0 > else: > - m =3D scanner.search(outstring_vf1) > - queue_id =3D m.group(1) > - self.verify(int(expect_queue) =3D=3D int(queue_id), "the act= ual queue > doesn't equal to the expected queue.") > + self.verify(verify_mac in out_vf1, "the vf1 not receive = the expect > packet.") > + out_info =3D out_vf1 > + > + # find the expected packet receive position > + mac_index =3D out_info.find("dst=3D%s" % verify_mac) > + m =3D scanner.findall(out_info) > + # get all the port 0/queue X str position > + # and calculate the port 0/queue X info of expected packet > + all_queue_index =3D [] > + queue_index =3D 0 > + find_index =3D False > + for i in range(len(m)): > + cur =3D out_info.find(m[i], all_queue_index[i-1] + len(m= [i-1]) if i > 0 > else 0) > + if cur > mac_index: > + queue_index =3D i - 1 > + find_index =3D True > + break > + all_queue_index.append(cur) > + if find_index is False: > + queue_index =3D len(m) - 1 > + curr_queue =3D int(m[queue_index][len("port 0/queue"):]) > + self.verify(int(expect_queue) =3D=3D curr_queue, "the actual > + queue doesn't equal to the expected queue.") >=20 > self.dut.send_expect("start", "testpmd> ") >=20 > @@ -287,28 +316,30 @@ class TestGeneric_flow_api(TestCase): >=20 > # The rule is created successfully, so send the consiste= nt packet. > self.tester.scapy_append('sendp(%s, iface=3D"%s")' % (fl= ow_pkt, > self.tester_itf)) > + cur_mac =3D re.search("dst=3D'(\S\S:\S\S:\S\S:\S\S:\S\S:= \S\S)'", flow_pkt) > + cur_mac =3D cur_mac.group(1) > if ("queue" in flow_action['actions']) or ("passthru" in > flow_action['actions']): > if ("vf0" in flow_action['flows']) or ("vf0" in > flow_action['actions']): > - self.verify_result("vf0", expect_rxpkts=3D"1", > expect_queue=3Dflow_queue) > + self.verify_result("vf0", expect_rxpkts=3D"1", > + expect_queue=3Dflow_queue, verify_mac=3Dcur_mac) > elif "vf1" in flow_action['flows'] or "vf1" in flow_= action['actions']: > - self.verify_result("vf1", expect_rxpkts=3D"1", > expect_queue=3Dflow_queue) > + self.verify_result("vf1", expect_rxpkts=3D"1", > + expect_queue=3Dflow_queue, verify_mac=3Dcur_mac) > else: > - self.verify_result("pf", expect_rxpkts=3D"1", > expect_queue=3Dflow_queue) > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3Dflow_queue, verify_mac=3Dcur_mac) > elif "drop" in flow_action['actions']: > if ("vf0" in flow_action['flows']) or ("vf0" in > flow_action['actions']): > - self.verify_result("vf0", expect_rxpkts=3D"0", > expect_queue=3D"NULL") > + self.verify_result("vf0", expect_rxpkts=3D"0", > + expect_queue=3D"NULL", verify_mac=3Dcur_mac) > elif ("vf1" in flow_action['flows']) or ("vf1" in > flow_action['actions']): > - self.verify_result("vf1", expect_rxpkts=3D"0", > expect_queue=3D"NULL") > + self.verify_result("vf1", expect_rxpkts=3D"0", > + expect_queue=3D"NULL", verify_mac=3Dcur_mac) > else: > - self.verify_result("pf", expect_rxpkts=3D"0", > expect_queue=3D"NULL") > + self.verify_result("pf", expect_rxpkts=3D"0", > + expect_queue=3D"NULL", verify_mac=3Dcur_mac) > # L2-tunnel filter > else: > if "vf0" in flow_action['actions']: > - self.verify_result("vf0", expect_rxpkts=3D"1", e= xpect_queue=3D"0") > + self.verify_result("vf0", expect_rxpkts=3D"1", > + expect_queue=3D"0", verify_mac=3Dcur_mac) > elif "vf1" in flow_action['actions']: > - self.verify_result("vf1", expect_rxpkts=3D"1", e= xpect_queue=3D"0") > + self.verify_result("vf1", expect_rxpkts=3D"1", > + expect_queue=3D"0", verify_mac=3Dcur_mac) > elif "pf" in flow_action['actions']: > - self.verify_result("pf", expect_rxpkts=3D"1", ex= pect_queue=3D"0") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"0", verify_mac=3Dcur_mac) > # Return the status of the rule. > return rule_created >=20 > @@ -629,11 +660,11 @@ class TestGeneric_flow_api(TestCase): > # send the packets and verify the results > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/TCP(dport=3D80,flags=3D"S")/Raw("x" * 20)], iface=3D= "%s")' % > (self.pf_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"3"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"3"= , > + verify_mac=3Dself.pf_mac) >=20 > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/TCP(dport=3D80,flags=3D"PA")/Raw("x" * 20)], iface= =3D"%s")' % > (self.pf_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= , > + verify_mac=3Dself.pf_mac) >=20 > # the ipv6 rule is conflicted with ipv4 rule. > self.dut.send_expect("flow destroy 0 rule 0", "testpmd> ", 120) = @@ - > 644,11 +675,11 @@ class TestGeneric_flow_api(TestCase): > # send the packets and verify the results > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IPv6(src=3D"2001::1", > dst=3D"2001::2")/TCP(dport=3D80,flags=3D"S")/Raw("x" * 20)], iface=3D"%s"= )' % > (self.pf_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"4"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"4"= , > + verify_mac=3Dself.pf_mac) >=20 > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IPv6(src=3D"2001::1", > dst=3D"2001::2")/TCP(dport=3D80,flags=3D"PA")/Raw("x" * 20)], iface=3D"%s= ")' % > (self.pf_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= , > + verify_mac=3Dself.pf_mac) >=20 > self.verify_rulenum(1) >=20 > @@ -676,13 +707,13 @@ class TestGeneric_flow_api(TestCase): > # send the packets inconsistent to the rules. > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"%s", dst=3D"%s")/Raw("x"= * 20)], > iface=3D"%s")' % (self.pf_mac, extra_packet[0]['dip'], extra_packet[0]['s= ip'], > self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= , > + verify_mac=3Dself.pf_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"%s", > dst=3D"%s")/SCTP(sport=3D%s,dport=3D%s)/Raw("x" * 20)], iface=3D"%s")' % > (self.pf_mac, extra_packet[3]['dip'], extra_packet[3]['sip'], > extra_packet[3]['sport'], extra_packet[3]['dport'], self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= , > + verify_mac=3Dself.pf_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"%s", > dst=3D"%s")/SCTP(sport=3D%s,dport=3D%s)/Raw("x" * 20)], iface=3D"%s")' % > (self.pf_mac, extra_packet[0]['sip'], extra_packet[0]['dip'], > extra_packet[3]['sport'], extra_packet[3]['dport'], self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", > expect_queue=3Dextrapkt_rulenum['queue'][0]) > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3Dextrapkt_rulenum['queue'][0], verify_mac=3Dself.pf_mac) >=20 > rule_num =3D extrapkt_rulenum['rulenum'] > self.verify_rulenum(rule_num) > @@ -710,10 +741,10 @@ class TestGeneric_flow_api(TestCase): > # send the packets inconsistent to the rules. > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/UDP(sport=3D22,dport=3D24)/Raw("x" * 20)], iface=3D"= %s")' % > (self.pf_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= , > + verify_mac=3Dself.pf_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/TCP(sport=3D32,dport=3D34)/Raw("x" * 20)], iface=3D"= %s")' % > (self.pf_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= , > + verify_mac=3Dself.pf_mac) > rule_num =3D extrapkt_rulenum['rulenum'] > self.verify_rulenum(rule_num) >=20 > @@ -765,7 +796,7 @@ class TestGeneric_flow_api(TestCase): > extrapkt_rulenum =3D self.all_flows_process(basic_flow_actio= ns) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s",type=3D0x88E5)/Raw("x" * 20)], = iface=3D"%s")' % > (self.pf_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue= =3D"0") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"0", verify_mac=3Dself.pf_mac) > rule_num =3D extrapkt_rulenum['rulenum'] > self.verify_rulenum(rule_num) >=20 > @@ -810,7 +841,7 @@ class TestGeneric_flow_api(TestCase): > extra_packet =3D extrapkt_rulenum['extrapacket'] > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Dot1BR(GRP=3D0x2, ECIDbase=3D%s)/R= aw("x" * > 20)], iface=3D"%s")' % (self.pf_mac, extra_packet[0]['etag'], self.tester= _itf)) > - self.verify_result("pf", expect_rxpkts=3D"0", expect_queue=3D"NU= LL") > + self.verify_result("pf", expect_rxpkts=3D"0", > + expect_queue=3D"NULL", verify_mac=3Dself.pf_mac) > rule_num =3D extrapkt_rulenum['rulenum'] > self.verify_rulenum(rule_num) >=20 > @@ -884,46 +915,46 @@ class TestGeneric_flow_api(TestCase): > # send the packets with dst/src ip and dst/src port. > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Dot1Q(vlan=3D%s)/IP(src=3D"192.168= .0.1", > dst=3D"192.168.0.2", proto=3D3)/Raw("x" * 20)], iface=3D"%s")' % (self.pf= _mac, > extra_packet[0]['vlan'], self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", > expect_queue=3Dextrapkt_rulenum['queue'][0]) > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3Dextrapkt_rulenum['queue'][0], verify_mac=3Dself.pf_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Dot1Q(vlan=3D%s)/IP(src=3D"192.168= .0.1", > dst=3D"192.168.0.2", tos=3D3)/UDP()/Raw("x" * 20)], iface=3D"%s")' % (sel= f.pf_mac, > extra_packet[1]['vlan'], self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", > expect_queue=3Dextrapkt_rulenum['queue'][1]) > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3Dextrapkt_rulenum['queue'][1], verify_mac=3Dself.pf_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Dot1Q(vlan=3D%s)/IP(src=3D"192.168= .0.1", > dst=3D"192.168.0.2", ttl=3D3)/TCP()/Raw("x" * 20)], iface=3D"%s")' % (sel= f.pf_mac, > extra_packet[2]['vlan'], self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", > expect_queue=3Dextrapkt_rulenum['queue'][2]) > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3Dextrapkt_rulenum['queue'][2], verify_mac=3Dself.pf_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Dot1Q(vlan=3D%s)/IP(src=3D"192.168= .0.1", > dst=3D"192.168.0.2", tos=3D3, ttl=3D3)/SCTP()/Raw("x" * 20)], iface=3D"%s= ")' % > (self.pf_mac, extra_packet[3]['vlan'], self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", > expect_queue=3Dextrapkt_rulenum['queue'][3]) > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3Dextrapkt_rulenum['queue'][3], verify_mac=3Dself.pf_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Dot1Q(vlan=3D%s)/IP(src=3D"192.168= .0.1", > dst=3D"192.168.0.2", ttl=3D3)/TCP()/Raw("x" * 20)], iface=3D"%s")' % (sel= f.pf_mac, > extra_packet[3]['vlan'], self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= , > + verify_mac=3Dself.pf_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Dot1Q(vlan=3D%s)/IP()/UDP()/Raw("x= " * 20)], > iface=3D"%s")' % (self.pf_mac, extra_packet[2]['vlan'], self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= , > + verify_mac=3Dself.pf_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Dot1Q(vlan=3D%s)/IP(src=3D"192.168= .0.5", > dst=3D"192.168.0.6", tos=3D3, ttl=3D3)/SCTP(sport=3D44,dport=3D45,tag=3D1= )/Raw("x" * > 20)], iface=3D"%s")' % (self.pf_mac, extra_packet[6]['vlan'], self.tester= _itf)) > - self.verify_result("pf", expect_rxpkts=3D"0", expect_queue=3D"NU= LL") > + self.verify_result("pf", expect_rxpkts=3D"0", > + expect_queue=3D"NULL", verify_mac=3Dself.pf_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Dot1Q(vlan=3D%s)/IP(src=3D"192.168= .0.5", > dst=3D"192.168.0.6", tos=3D3, > ttl=3D3)/UDP(sport=3D44,dport=3D45)/SCTPChunkData(data=3D"X" * 20)], ifac= e=3D"%s")' % > (self.outer_mac, extra_packet[7]['vlan'], self.tester_itf)) > - self.verify_result("vf1", expect_rxpkts=3D"0", expect_queue=3D"N= ULL") > + self.verify_result("vf1", expect_rxpkts=3D"0", > + expect_queue=3D"NULL", verify_mac=3Dself.outer_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Dot1Q(vlan=3D%s)/IPv6(src=3D"2001:= :1", > dst=3D"2001::2", tc=3D1, nh=3D5, hlim=3D10)/Raw("x" * 20)], iface=3D"%s")= ' % > (self.pf_mac, extra_packet[8]['vlan'], self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", > expect_queue=3Dextrapkt_rulenum['queue'][8]) > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3Dextrapkt_rulenum['queue'][8], verify_mac=3Dself.pf_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Dot1Q(vlan=3D%s)/IPv6(src=3D"2001:= :1", > dst=3D"2001::2", tc=3D2, hlim=3D20)/UDP(sport=3D22,dport=3D23)/Raw("x" * = 20)], > iface=3D"%s")' % (self.pf_mac, extra_packet[9]['vlan'], self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", > expect_queue=3Dextrapkt_rulenum['queue'][9]) > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3Dextrapkt_rulenum['queue'][9], verify_mac=3Dself.pf_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Dot1Q(vlan=3D%s)/IPv6(src=3D"2001:= :1", > dst=3D"2001::2", tc=3D2, hlim=3D20)/TCP(sport=3D32,dport=3D33)/Raw("x" * = 20)], > iface=3D"%s")' % (self.pf_mac, extra_packet[10]['vlan'], self.tester_itf)= ) > - self.verify_result("pf", expect_rxpkts=3D"1", > expect_queue=3Dextrapkt_rulenum['queue'][10]) > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3Dextrapkt_rulenum['queue'][10], verify_mac=3Dself.pf_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Dot1Q(vlan=3D%s)/IPv6(src=3D"2001:= :1", > dst=3D"2001::2", tc=3D4, nh=3D132, > hlim=3D40)/SCTP(sport=3D44,dport=3D45,tag=3D1)/SCTPChunkData(data=3D"X" *= 20)], > iface=3D"%s")' % (self.pf_mac, extra_packet[11]['vlan'], self.tester_itf)= ) > - self.verify_result("pf", expect_rxpkts=3D"1", > expect_queue=3Dextrapkt_rulenum['queue'][11]) > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3Dextrapkt_rulenum['queue'][11], verify_mac=3Dself.pf_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Dot1Q(vlan=3D%s)/IPv6(src=3D"2001:= :1", > dst=3D"2001::2", tc=3D4, nh=3D132, > hlim=3D40)/SCTP(sport=3D44,dport=3D45,tag=3D1)/SCTPChunkData(data=3D"X" *= 20)], > iface=3D"%s")' % (self.pf_mac, extra_packet[14]['vlan'], self.tester_itf)= ) > - self.verify_result("pf", expect_rxpkts=3D"0", expect_queue=3D"NU= LL") > + self.verify_result("pf", expect_rxpkts=3D"0", > + expect_queue=3D"NULL", verify_mac=3Dself.pf_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Dot1Q(vlan=3D%s)/IPv6(src=3D"2001:= :1", > dst=3D"2001::2", tc=3D2, hlim=3D20)/TCP(sport=3D32,dport=3D33)/Raw("x" * = 20)], > iface=3D"%s")' % (self.outer_mac, extra_packet[15]['vlan'], self.tester_i= tf)) > - self.verify_result("vf1", expect_rxpkts=3D"0", expect_queue=3D"N= ULL") > + self.verify_result("vf1", expect_rxpkts=3D"0", > + expect_queue=3D"NULL", verify_mac=3Dself.outer_mac) >=20 > rule_num =3D extrapkt_rulenum['rulenum'] > self.verify_rulenum(rule_num) > @@ -977,7 +1008,7 @@ class TestGeneric_flow_api(TestCase): > extra_packet =3D extrapkt_rulenum['extrapacket'] > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.3", dst=3D= "192.168.0.4", > proto=3D%s)/Raw("x" * 20)], iface=3D"%s")' % (self.pf_mac, > extra_packet[0]['proto'], self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue= =3D"0") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"0", verify_mac=3Dself.pf_mac) > rule_num =3D extrapkt_rulenum['rulenum'] > self.verify_rulenum(rule_num) >=20 > @@ -1001,7 +1032,7 @@ class TestGeneric_flow_api(TestCase): > extra_packet =3D extrapkt_rulenum['extrapacket'] > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"%s", > dst=3D"%s")/SCTP(sport=3D%s,dport=3D%s)/Raw("x" * 20)], iface=3D"%s")' % > (self.pf_mac, extra_packet[2]['sip'], extra_packet[2]['dip'], > extra_packet[2]['dport'], extra_packet[2]['sport'], self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_que= ue=3D"0") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"0", verify_mac=3Dself.pf_mac) > rule_num =3D extrapkt_rulenum['rulenum'] > self.verify_rulenum(rule_num) > else: > @@ -1015,7 +1046,7 @@ class TestGeneric_flow_api(TestCase): > extra_packet =3D extrapkt_rulenum['extrapacket'] > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"%s", dst=3D"%s")= /SCTP()/Raw("x" * > 20)], iface=3D"%s")' % (self.pf_mac, extra_packet[2]['dip'], extra_packet= [2]['sip'], > self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_que= ue=3D"0") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"0", verify_mac=3Dself.pf_mac) > rule_num =3D extrapkt_rulenum['rulenum'] > self.verify_rulenum(rule_num) >=20 > @@ -1061,7 +1092,7 @@ class TestGeneric_flow_api(TestCase): > extra_packet =3D extrapkt_rulenum['extrapacket'] > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Dot1Q(vlan=3D%s)/IPv6(src=3D"2= 001::1", > dst=3D"2001::2", tc=3D2, hlim=3D20)/UDP(sport=3D22,dport=3D23)/Raw("x" * = 20)], > iface=3D"%s")' % (self.pf_mac, extra_packet[1]['vlan'], self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue= =3D"0") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"0", verify_mac=3Dself.pf_mac) > rule_num =3D extrapkt_rulenum['rulenum'] > self.verify_rulenum(rule_num) >=20 > @@ -1089,13 +1120,13 @@ class TestGeneric_flow_api(TestCase): > extra_packet =3D extrapkt_rulenum['extrapacket'] > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IPv6(src=3D"2001::1", > dst=3D"2001::2",nh=3D132)/SCTP()/Raw("x" * 20)], iface=3D"%s")' % (self.p= f_mac, > self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_que= ue=3D"0") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"0", verify_mac=3Dself.pf_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/SCTP()/Raw("x" * 20)], iface=3D"%s")' % (self.pf_mac= , > self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_que= ue=3D"0") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"0", verify_mac=3Dself.pf_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IPv6(src=3D"2001::1", > dst=3D"2001::2")/UDP(sport=3D22,dport=3D23)/Raw("x" * 20)], iface=3D"%s")= ' % > (self.pf_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_que= ue=3D"1") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"1", verify_mac=3Dself.pf_mac) > rule_num =3D extrapkt_rulenum['rulenum'] > self.verify_rulenum(rule_num+1) > elif (self.nic in ["sagepond", "sageville"]): > @@ -1113,13 +1144,13 @@ class TestGeneric_flow_api(TestCase): > extra_packet =3D extrapkt_rulenum['extrapacket'] > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IPv6(src=3D"%s", dst=3D"%s= ", > nh=3D132)/SCTP(sport=3D32,dport=3D33,tag=3D1)/Raw("x" * 20)], iface=3D"%s= ")' % > (self.pf_mac, extra_packet[3]['sip'], extra_packet[3]['dip'], self.tester= _itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_que= ue=3D"0") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"0", verify_mac=3Dself.pf_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"%s", dst=3D"%s", > proto=3D132)/SCTP(sport=3D32,dport=3D33)/Raw("x" * 20)], iface=3D"%s")' % > (self.pf_mac, extra_packet[4]['dip'], extra_packet[4]['sip'], self.tester= _itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_que= ue=3D"0") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"0", verify_mac=3Dself.pf_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IPv6(src=3D"2001::1", > dst=3D"2001::2")/UDP(sport=3D22,dport=3D23)/Raw("x" * 20)], iface=3D"%s")= ' % > (self.pf_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_que= ue=3D"1") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"1", verify_mac=3Dself.pf_mac) > rule_num =3D extrapkt_rulenum['rulenum'] > self.verify_rulenum(rule_num+1) >=20 > @@ -1162,27 +1193,27 @@ class TestGeneric_flow_api(TestCase): > # send the packets and verify the results > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s", > type=3D0x0807)/Raw(load=3D"abcdefghijklmnop")], iface=3D"%s")' % (self.pf= _mac, > self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue= =3D"1") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"1", verify_mac=3Dself.pf_mac) >=20 > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Dot1Q(vlan=3D4095)/IP(src=3D"1= 92.168.0.1", > dst=3D"192.168.0.2", proto=3D255, > ttl=3D40)/Raw(load=3D"xxabxxxxxxxxxxabcdefghijabcdefg")], iface=3D"%s")' = % > (self.pf_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue= =3D"2") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"2", verify_mac=3Dself.pf_mac) >=20 > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"2.2.2.4", > dst=3D"2.2.2.5")/UDP(sport=3D22,dport=3D23)/Raw(load=3D"fhfhdsdsfwef")], > iface=3D"%s")' % (self.pf_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue= =3D"3") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"3", verify_mac=3Dself.pf_mac) >=20 > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"2.2.2.4", dst=3D"2.2= .2.5", tos=3D4, > ttl=3D3)/TCP(sport=3D32,dport=3D33)/Raw(load=3D"fhhijk")], iface=3D"%s")'= % > (self.pf_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue= =3D"4") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"4", verify_mac=3Dself.pf_mac) >=20 > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"2.2.2.4", > dst=3D"2.2.2.5")/SCTP(sport=3D42,dport=3D43,tag=3D1)/Raw(load=3D"xxabcdef= ghijklmno > pqrst")], iface=3D"%s")' % (self.pf_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue= =3D"5") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"5", verify_mac=3Dself.pf_mac) >=20 > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"2.2.2.4", > dst=3D"2.2.2.5")/SCTP(sport=3D42,dport=3D43,tag=3D1)/Raw(load=3D"xxabxxxa= bcddxxab > cdefghijklmn")], iface=3D"%s")' % (self.outer_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue= =3D"0") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"0", verify_mac=3Dself.outer_mac) >=20 > self.verify_rulenum(5) >=20 > @@ -1202,7 +1233,7 @@ class TestGeneric_flow_api(TestCase): > # send the packet and verify the result > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Dot1Q(vlan=3D1)/IPv6(src=3D"20= 01::1", > dst=3D"2001::2", tc=3D3, > hlim=3D30)/TCP(sport=3D32,dport=3D33)/Raw(load=3D"hijkabcdefghabcdefghijk= lmn")], > iface=3D"%s")' % (self.outer_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue= =3D"6") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"6", verify_mac=3Dself.outer_mac) >=20 > # ixgbe > else: > @@ -1219,7 +1250,7 @@ class TestGeneric_flow_api(TestCase): > # send the packet and verify the result > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/UDP(sport=3D24,dport=3D25)/Raw(load=3D"xx86ddef")], > iface=3D"%s")' % (self.outer_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue= =3D"1") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"1", verify_mac=3Dself.outer_mac) >=20 > self.dut.send_expect("quit", "# ") > time.sleep(2) > @@ -1238,11 +1269,11 @@ class TestGeneric_flow_api(TestCase): > # send the packet and verify the result > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.3", > dst=3D"192.168.0.4")/TCP(sport=3D22,dport=3D23)/Raw(load=3D"abcdxxx")], > iface=3D"%s")' % (self.outer_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue= =3D"0") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"0", verify_mac=3Dself.outer_mac) >=20 > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.3", > dst=3D"192.168.0.4")/TCP(sport=3D22,dport=3D23)/Raw(load=3D"cdcdxxx")], > iface=3D"%s")' % (self.outer_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue= =3D"2") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"2", verify_mac=3Dself.outer_mac) >=20 > self.dut.send_expect("quit", "# ") > time.sleep(2) > @@ -1265,10 +1296,10 @@ class TestGeneric_flow_api(TestCase): > # send the packet and verify the result > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/SCTP(sport=3D24,dport=3D25)/Raw(load=3D"xxabcdef")], > iface=3D"%s")' % (self.outer_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue= =3D"3") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"3", verify_mac=3Dself.outer_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/SCTP(sport=3D24,dport=3D25)/Raw(load=3D"xxaccdef")], > iface=3D"%s")' % (self.outer_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue= =3D"0") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"0", verify_mac=3Dself.outer_mac) >=20 > # ipv6-other-flexbytes > if (self.nic in ["niantic", "twinville"]): > @@ -1285,10 +1316,10 @@ class TestGeneric_flow_api(TestCase): > "flow create 0 ingress pattern fuzzy thresh is 6 / i= pv6 src is > 2001::1 dst is 2001::2 / raw relative is 0 search is 0 offset is 56 limit= is 0 > pattern is 86 / end actions queue index 4 / end", "created") > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IPv6(src=3D"2001::1", > dst=3D"2001::2")/Raw(load=3D"xx86abcd")], iface=3D"%s")' % (self.outer_ma= c, > self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_que= ue=3D"4") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"4", verify_mac=3Dself.outer_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IPv6(src=3D"2001::1", > dst=3D"2001::2")/Raw(load=3D"xxx86abcd")], iface=3D"%s")' % (self.outer_m= ac, > self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_que= ue=3D"0") > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3D"0", verify_mac=3Dself.outer_mac) >=20 > def test_flexbytes_filter(self): > """ > @@ -1325,31 +1356,31 @@ class TestGeneric_flow_api(TestCase): > # send the packet and verify the result > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Raw(load=3D"fhdsab")], iface=3D"%s= ")' % > (self.outer_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"1"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"1"= , > + verify_mac=3Dself.outer_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/Raw(load=3D"afhdsb")], iface=3D"%s= ")' % > (self.outer_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= , > + verify_mac=3Dself.outer_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/Raw(load=3D"abcdef")], iface=3D"%s")' % (self.outer_= mac, > self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"2"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"2"= , > + verify_mac=3Dself.outer_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IPv6(src=3D"2001::1", > dst=3D"2001::2")/Raw(load=3D"xxxxefgh")], iface=3D"%s")' % (self.outer_ma= c, > self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"3"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"3"= , > + verify_mac=3Dself.outer_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IPv6(src=3D"2001::1", > dst=3D"2001::2")/TCP(sport=3D32,dport=3D33)/Raw(load=3D"abcdefgh")], ifac= e=3D"%s")' % > (self.outer_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= , > + verify_mac=3Dself.outer_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/Raw(load=3D"cdxxabxxefghxxxx")], iface=3D"%s")' % > (self.outer_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"4"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"4"= , > + verify_mac=3Dself.outer_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", dst=3D"192= .168.0.2", > tos=3D4, > ttl=3D3)/UDP(sport=3D32,dport=3D33)/Raw(load=3D"xxefghabcdxxxxxxhijklmnop= qxxxx > ")], iface=3D"%s")' % (self.outer_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"5"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"5"= , > + verify_mac=3Dself.outer_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/TCP(sport=3D22,dport=3D23)/Raw(load=3D"xxxxxxxxxxabx= xklmne > fgh")], iface=3D"%s")' % (self.outer_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"6"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"6"= , > + verify_mac=3Dself.outer_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/TCP(sport=3D22,dport=3D23)/Raw(load=3D"xxxxxxxxxxabx= xklcdef > gh")], iface=3D"%s")' % (self.outer_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= , > + verify_mac=3Dself.outer_mac) >=20 > self.dut.send_expect("flow flush 0", "testpmd> ", 120) >=20 > @@ -1369,16 +1400,16 @@ class TestGeneric_flow_api(TestCase): > # send the packet and verify the result > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/TCP(sport=3D22,dport=3D23)/Raw(load=3D"xxxxxxxxxxxxx= xxxxxxx > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxab")], iface=3D"%s")'= % > (self.outer_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"1"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"1"= , > + verify_mac=3Dself.outer_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/TCP(sport=3D22,dport=3D23)/Raw(load=3D"xxxxxxxxxxxxx= xxxxxxx > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxcb")], iface=3D"%s")'= % > (self.outer_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= , > + verify_mac=3Dself.outer_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/TCP(sport=3D22,dport=3D23)/Raw(load=3D"xxxxxxxxxxxxx= xabxxx > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxcd")], iface=3D"%s")= ' % > (self.outer_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"2"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"2"= , > + verify_mac=3Dself.outer_mac) > self.tester.scapy_append( > 'sendp([Ether(dst=3D"%s")/IP(src=3D"192.168.0.1", > dst=3D"192.168.0.2")/TCP(sport=3D22,dport=3D23)/Raw(load=3D"xxxxxxxxxxxxx= xabxxx > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxce")], iface=3D"%s")= ' % > (self.outer_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= , > + verify_mac=3Dself.outer_mac) >=20 > self.verify_rulenum(2) >=20 > @@ -1488,22 +1519,22 @@ class TestGeneric_flow_api(TestCase): > self.load_module("vxlan") > self.tester.scapy_append( >=20 > 'sendp([Ether(dst=3D"%s")/IP()/UDP()/Vxlan()/Ether(dst=3D"%s")/Dot1Q(vlan= =3D11)/I > P()/TCP()/Raw("x" * 20)], iface=3D"%s")' % (self.outer_mac, self.inner_ma= c, > self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", > expect_queue=3Dextrapkt_rulenum['queue'][0]) > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3Dextrapkt_rulenum['queue'][0], verify_mac=3Dself.outer_ma= c) >=20 > self.load_module("vxlan") > self.tester.scapy_append( >=20 > 'sendp([Ether(dst=3D"%s")/IP()/UDP()/Vxlan(vni=3D5)/Ether(dst=3D"%s")/IP(= )/TCP()/R > aw("x" * 20)], iface=3D"%s")' % (self.outer_mac, self.wrong_mac, self.tes= ter_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= , > + verify_mac=3Dself.outer_mac) >=20 > self.load_module("vxlan") > self.tester.scapy_append( >=20 > 'sendp([Ether(dst=3D"%s")/IP()/UDP()/Vxlan(vni=3D%s)/Ether(dst=3D"%s")/Do= t1Q(vla > n=3D%s)/IP()/TCP()/Raw("x" * 20)], iface=3D"%s")' % (self.outer_mac, > extra_packet[5]['vni'], self.wrong_mac, extra_packet[5]['invlan'], > self.tester_itf)) > - self.verify_result("vf0", expect_rxpkts=3D"1", expect_queue=3D"0= ") > + self.verify_result("vf0", expect_rxpkts=3D"1", expect_queue=3D"0= ", > + verify_mac=3Dself.outer_mac) >=20 > self.load_module("vxlan") > self.tester.scapy_append( >=20 > 'sendp([Ether(dst=3D"%s")/IP()/UDP()/Vxlan(vni=3D%s)/Ether(dst=3D"%s")/IP= ()/TCP()/ > Raw("x" * 20)], iface=3D"%s")' % (self.wrong_mac, extra_packet[6]['vni'], > self.inner_mac, self.tester_itf)) > - self.verify_result("vf1", expect_rxpkts=3D"0", expect_queue=3D"N= ULL") > + self.verify_result("vf1", expect_rxpkts=3D"0", > + expect_queue=3D"NULL", verify_mac=3Dself.wrong_mac) > rule_num =3D extrapkt_rulenum['rulenum'] > self.verify_rulenum(rule_num) >=20 > @@ -1547,22 +1578,22 @@ class TestGeneric_flow_api(TestCase): > self.load_module("nvgre") > self.tester.scapy_append( >=20 > 'sendp([Ether(dst=3D"%s")/IP()/NVGRE()/Ether(dst=3D"%s")/Dot1Q(vlan=3D1)/= IP()/TC > P()/Raw("x" * 20)], iface=3D"%s")' % (self.outer_mac, self.inner_mac, > self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", > expect_queue=3Dextrapkt_rulenum['queue'][0]) > + self.verify_result("pf", expect_rxpkts=3D"1", > + expect_queue=3Dextrapkt_rulenum['queue'][0], verify_mac=3Dself.outer_ma= c) >=20 > self.load_module("nvgre") > self.tester.scapy_append( >=20 > 'sendp([Ether(dst=3D"%s")/IP()/NVGRE(TNI=3D%s)/Ether(dst=3D"%s")/IP()/TCP= ()/Raw( > "x" * 20)], iface=3D"%s")' % (self.outer_mac, extra_packet[4]['tni'], > self.wrong_mac, self.tester_itf)) > - self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= ) > + self.verify_result("pf", expect_rxpkts=3D"1", expect_queue=3D"0"= , > + verify_mac=3Dself.outer_mac) >=20 > self.load_module("nvgre") > self.tester.scapy_append( >=20 > 'sendp([Ether(dst=3D"%s")/IP()/NVGRE(TNI=3D%s)/Ether(dst=3D"%s")/Dot1Q(vl= an=3D%s > )/IP()/TCP()/Raw("x" * 20)], iface=3D"%s")' % (self.outer_mac, > extra_packet[5]['tni'], self.wrong_mac, extra_packet[5]['invlan'], > self.tester_itf)) > - self.verify_result("vf0", expect_rxpkts=3D"1", expect_queue=3D"0= ") > + self.verify_result("vf0", expect_rxpkts=3D"1", expect_queue=3D"0= ", > + verify_mac=3Dself.outer_mac) >=20 > self.load_module("nvgre") > self.tester.scapy_append( >=20 > 'sendp([Ether(dst=3D"%s")/IP()/NVGRE(TNI=3D%s)/Ether(dst=3D"%s")/IP()/TCP= ()/Raw( > "x" * 20)], iface=3D"%s")' % (self.wrong_mac, extra_packet[6]['tni'], > self.inner_mac, self.tester_itf)) > - self.verify_result("vf1", expect_rxpkts=3D"0", expect_queue=3D"N= ULL") > + self.verify_result("vf1", expect_rxpkts=3D"0", > + expect_queue=3D"NULL", verify_mac=3Dself.wrong_mac) > rule_num =3D extrapkt_rulenum['rulenum'] > self.verify_rulenum(rule_num) >=20 > -- > 2.7.4