From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D62E0A04DD; Thu, 2 Jan 2020 08:17:06 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C54C81BFD7; Thu, 2 Jan 2020 08:17:06 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 4EF3D1BE94 for ; Thu, 2 Jan 2020 08:17:04 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jan 2020 23:17:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,385,1571727600"; d="scan'208";a="215928050" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga007.fm.intel.com with ESMTP; 01 Jan 2020 23:17:02 -0800 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 1 Jan 2020 23:17:02 -0800 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 1 Jan 2020 23:17:01 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.197]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.210]) with mapi id 14.03.0439.000; Thu, 2 Jan 2020 15:17:00 +0800 From: "Chen, Zhaoyan" To: "Xiao, QimaiX" , "dts@dpdk.org" CC: "Chen, Zhaoyan" Thread-Topic: [dts] [PATCH V1]tests/cvl_fdir: add new testsuit cvl_fdir Thread-Index: AQHVv6BeAvKJHl9HrkOqnVsYxZ52LqfTgOmAgAN5CpA= Date: Thu, 2 Jan 2020 07:17:00 +0000 Message-ID: <9DEEADBC57E43F4DA73B571777FECECA41E772F2@SHSMSX104.ccr.corp.intel.com> References: <1577772354-30933-1-git-send-email-qimaix.xiao@intel.com> <5C5FA1EBCC0D164EAD0302E258A5234B7A4A65@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <5C5FA1EBCC0D164EAD0302E258A5234B7A4A65@SHSMSX103.ccr.corp.intel.com> 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.2.0.6 dlp-reaction: no-action 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 V1]tests/cvl_fdir: add new testsuit cvl_fdir 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" Acked-by: Zhaoyan Chen Regards, Zhaoyan Chen > -----Original Message----- > From: dts On Behalf Of Xiao, QimaiX > Sent: Tuesday, December 31, 2019 6:15 PM > To: dts@dpdk.org > Subject: Re: [dts] [PATCH V1]tests/cvl_fdir: add new testsuit cvl_fdir >=20 > Tested_by: Xiao, QimaiX >=20 > > -----Original Message----- > > From: Xiao, QimaiX > > Sent: Tuesday, December 31, 2019 2:06 PM > > To: dts@dpdk.org > > Cc: Xiao, QimaiX > > Subject: [dts][PATCH V1]tests/cvl_fdir: add new testsuit cvl_fdir > > > > add testsuit cvl_fdir > > > > Signed-off-by: Xiao Qimai > > --- > > tests/TestSuite_cvl_fdir.py | 1548 > > +++++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 1548 insertions(+) > > create mode 100644 tests/TestSuite_cvl_fdir.py > > > > diff --git a/tests/TestSuite_cvl_fdir.py b/tests/TestSuite_cvl_fdir.py > > new file mode 100644 > > index 0000000..8a4dde2 > > --- /dev/null > > +++ b/tests/TestSuite_cvl_fdir.py > > @@ -0,0 +1,1548 @@ > > +# BSD LICENSE > > +# > > +# Copyright(c) 2010-2019 Intel Corporation. All rights reserved. > > +# All rights reserved. > > +# > > +# Redistribution and use in source and binary forms, with or without > > +# modification, are permitted provided that the following conditions > > +# are met: > > +# > > +# * Redistributions of source code must retain the above copyright > > +# notice, this list of conditions and the following disclaimer. > > +# * Redistributions in binary form must reproduce the above copyrigh= t > > +# notice, this list of conditions and the following disclaimer in > > +# the documentation and/or other materials provided with the > > +# distribution. > > +# * Neither the name of Intel Corporation nor the names of its > > +# contributors may be used to endorse or promote products derived > > +# from this software without specific prior written permission. > > +# > > +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND > > CONTRIBUTORS > > +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT > > NOT > > +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND > > FITNESS FOR > > +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE > > COPYRIGHT > > +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, > > INCIDENTAL, > > +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > > NOT > > +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS > > OF USE, > > +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED > > AND ON ANY > > +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > > +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF > > THE USE > > +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH > > DAMAGE. > > + > > + > > +import re > > +import time > > + > > +from packet import Packet > > +from pmd_output import PmdOutput > > +from test_case import TestCase > > +import rte_flow_common as rfc > > + > > +from utils import GREEN, RED > > +import utils > > + > > +MAC_IPV4_PAY =3D { > > + "match": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > proto=3D255, ttl=3D2, tos=3D4) / Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > frag=3D1, proto=3D255, ttl=3D2, tos=3D4)/Raw("x" * 80)'], > > + "unmatch": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:56")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.22", > > proto=3D255, ttl=3D2, tos=3D4) / Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.22",dst=3D"192.16= 8.0.21", > > proto=3D255, ttl=3D2, tos=3D4) / Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.1.21", > > proto=3D255, ttl=3D2, tos=3D4) / Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > proto=3D1, ttl=3D2, tos=3D4) / Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > proto=3D255, ttl=3D3, tos=3D4) / Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > proto=3D255, ttl=3D2, tos=3D9) / Raw("x" * 80)' > > + ] > > +} > > + > > +MAC_IPV4_PAY_SELECTED =3D { > > + "match": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > proto=3D1) / Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /UDP(sport=3D22,dport=3D23)/Raw("x" * 80)'], > > + "unmatch": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.22") / > > Raw("x" * 80)' > > + ] > > +} > > + > > +MAC_IPV4_UDP =3D { > > + "match": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /UDP(sport=3D22,dport=3D23)/Raw("x" * 80)'], > > + "unmatch": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:56")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /UDP(sport=3D22,dport=3D23)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.1.19",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /UDP(sport=3D22,dport=3D23)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.22", > > ttl=3D2, tos=3D4) /UDP(sport=3D22,dport=3D23)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /UDP(sport=3D21,dport=3D23)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /UDP(sport=3D22,dport=3D24)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D64, tos=3D4) /UDP(sport=3D22,dport=3D23)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D1) /UDP(sport=3D22,dport=3D23)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /TCP(sport=3D22,dport=3D23)/Raw("x" * 80)'] > > +} > > + > > +MAC_IPV4_TCP =3D { > > + "match": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /TCP(sport=3D22,dport=3D23)/Raw("x" * 80)'], > > + "unmatch": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:56")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /TCP(sport=3D22,dport=3D23)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.1.19",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /TCP(sport=3D22,dport=3D23)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.22", > > ttl=3D2, tos=3D4) /TCP(sport=3D22,dport=3D23)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /TCP(sport=3D21,dport=3D23)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /TCP(sport=3D22,dport=3D24)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D64, tos=3D4) /TCP(sport=3D22,dport=3D23)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D1) /TCP(sport=3D22,dport=3D23)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /UDP(sport=3D22,dport=3D23)/Raw("x" * 80)'] > > +} > > + > > +MAC_IPV4_SCTP =3D { > > + "match": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /SCTP(sport=3D22,dport=3D23)/Raw("x" * 80)'], > > + "unmatch": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:56")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /SCTP(sport=3D22,dport=3D23)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.1.19",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /SCTP(sport=3D22,dport=3D23)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.22", > > ttl=3D2, tos=3D4) /SCTP(sport=3D22,dport=3D23)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /SCTP(sport=3D21,dport=3D23)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /SCTP(sport=3D22,dport=3D24)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D64, tos=3D4) /SCTP(sport=3D22,dport=3D23)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D1) /SCTP(sport=3D22,dport=3D23)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4)/Raw("x" * 80)'] > > +} > > + > > +MAC_IPV6_PAY =3D { > > + "match": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2", nh=3D1, tc=3D1, hlim=3D2)/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2", nh=3D1, tc=3D1, > > hlim=3D2)/IPv6ExtHdrFragment(1000)/("X"*480)'], > > + "unmatch": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:56")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2", nh=3D1, tc=3D1, hlim=3D2)/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2022", src=3D"2001::2", nh=3D1, tc=3D1, hlim=3D2)/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::1", nh=3D1, tc=3D1, hlim=3D2)/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2", nh=3D2, tc=3D1, hlim=3D2)/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2", nh=3D1, tc=3D2, hlim=3D2)/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2", nh=3D1, tc=3D1, hlim=3D5)/("X"*480)'] > > +} > > + > > +MAC_IPV6_PAY_SELECTED =3D { > > + "match": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2", nh=3D1, tc=3D1, hlim=3D2)/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020")/IPv6ExtHdrFragment(1000)/("X"*480)'], > > + "unmatch": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2021")/("X"*480)'] > > +} > > + > > +MAC_IPV6_UDP =3D { > > + "match": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D2)/UDP(sport=3D22,dport=3D23)= /("X"*480)'], > > + "unmatch": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:56")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D2)/UDP(sport=3D22,dport=3D23)= /("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2021", src=3D"2001::2",tc=3D1, hlim=3D2)/UDP(sport=3D22,dport=3D23)= /("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2002::2",tc=3D1, hlim=3D2)/UDP(sport=3D22,dport=3D23)= /("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D3, hlim=3D2)/UDP(sport=3D22,dport=3D23)= /("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D1)/UDP(sport=3D22,dport=3D23)= /("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D2)/UDP(sport=3D21,dport=3D23)= /("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D2)/UDP(sport=3D22,dport=3D24)= /("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D2)/TCP(sport=3D22,dport=3D23)= /("X"*480)'] > > +} > > + > > +MAC_IPV6_TCP =3D { > > + "match": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D2)/TCP(sport=3D22,dport=3D23)= /("X"*480)'], > > + "unmatch": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:56")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D2)/TCP(sport=3D22,dport=3D23)= /("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2021", src=3D"2001::2",tc=3D1, hlim=3D2)/TCP(sport=3D22,dport=3D23)= /("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2002::2",tc=3D1, hlim=3D2)/TCP(sport=3D22,dport=3D23)= /("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D3, hlim=3D2)/TCP(sport=3D22,dport=3D23)= /("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D1)/TCP(sport=3D22,dport=3D23)= /("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D2)/TCP(sport=3D21,dport=3D23)= /("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D2)/TCP(sport=3D22,dport=3D24)= /("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D2)/SCTP(sport=3D22,dport=3D23= )/("X"*480)'] > > +} > > + > > +MAC_IPV6_SCTP =3D { > > + "match": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D2)/SCTP(sport=3D22,dport=3D23= )/("X"*480)'], > > + "unmatch": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:56")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D2)/SCTP(sport=3D22,dport=3D23= )/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2021", src=3D"2001::2",tc=3D1, hlim=3D2)/SCTP(sport=3D22,dport=3D23= )/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2002::2",tc=3D1, hlim=3D2)/SCTP(sport=3D22,dport=3D23= )/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D3, hlim=3D2)/SCTP(sport=3D22,dport=3D23= )/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D1)/SCTP(sport=3D22,dport=3D23= )/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D2)/SCTP(sport=3D21,dport=3D23= )/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D2)/SCTP(sport=3D22,dport=3D24= )/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D2)/UDP(sport=3D22,dport=3D23)= /("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D2)/("X"*480)'] > > +} > > + > > +MAC_IPV4_TUN_IPV4_PAY_MAC_IPV4_TUN_MAC_IPV4_PAY =3D { > > + "match": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP()/VXLAN()/Ether()/IP(src=3D"= 192.168 > > .0.20", dst=3D"192.168.0.21")/("X"*480)', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP(sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/IP(src=3D"192.168.0.20", dst=3D"192.16= 8.0.21")', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP(dst=3D"192.168.1.15")/UDP= (sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/Ether()/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP(sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/IP(src=3D"192.168.0.20", dst=3D"192.16= 8.0.21", > > frag=3D1)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP()/VXLAN(vni=3D2)/Ether(dst= =3D"00:11: > > 22:33:44:55")/IP(dst=3D"192.168.0.21", src=3D"192.168.0.20")/("X"*480)' > > + ], > > + "unmatch": [ > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP(dst=3D"192.168.1.15")/UDP= (sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/IP(src=3D"192.168.0.20", dst=3D"192.16= 8.0.22")', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP(dst=3D"192.168.1.15")/UDP= (sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/IP(src=3D"192.168.0.30", dst=3D"192.16= 8.0.21")', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP()/VXLAN()/IP(dst=3D"192.168.= 0.21", > > src=3D"192.168.0.20")/("X"*480)'] > > +} > > + > > +MAC_IPV4_TUN_IPV4_UDP_MAC_IPV4_TUN_MAC_IPV4_UDP =3D { > > + "match": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP()/VXLAN()/Ether()/IP(src=3D"= 192.168 > > .0.20", dst=3D"192.168.0.21")/UDP(sport=3D22,dport=3D23)/("X"*480)', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP(sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(sport=3D22,dport=3D23)/("X"*480)', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP(dst=3D"192.168.1.15")/UDP= (sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/Ether()/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(sport=3D22,dport=3D23)/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP()/VXLAN(vni=3D2)/Ether(dst= =3D"00:11: > > 22:33:44:55")/IP(dst=3D"192.168.0.21", > > src=3D"192.168.0.20")/UDP(sport=3D22,dport=3D23)/("X"*480)'], > > + "unmatch": [ > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP(dst=3D"192.168.1.15")/UDP= (sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.22")/UDP(sport=3D22,dport=3D23)/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP()/VXLAN(vni=3D2)/Ether(dst= =3D"00:11: > > 22:33:44:55")/IP(src=3D"192.168.0.21", > > dst=3D"192.168.0.23")/UDP(sport=3D22,dport=3D23)/("X"*480)', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP(sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(sport=3D21,dport=3D23)/("X"*480)', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP(sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(sport=3D22,dport=3D24)/("X"*480)', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP(dst=3D"192.168.1.15")/UDP= (sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/TCP(sport=3D22, dport=3D23)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP()/VXLAN()/IP(dst=3D"192.168.= 0.21", > > src=3D"192.168.0.20")/UDP(sport=3D22,dport=3D23)/("X"*480)' > > + ] > > +} > > + > > +MAC_IPV4_TUN_IPV4_TCP_MAC_IPV4_TUN_MAC_IPV4_TCP =3D { > > + "match": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP()/VXLAN(vni=3D2)/Ether()/IP(= src=3D"19 > > 2.168.0.20", dst=3D"192.168.0.21")/TCP(sport=3D22,dport=3D23)/("X"*480)= ', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP(sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/TCP(sport=3D22,dport=3D23)/("X"*480)', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP(dst=3D"192.168.1.15")/UDP= (sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/Ether()/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/TCP(sport=3D22,dport=3D23)/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP()/VXLAN(vni=3D2)/Ether(dst= =3D"00:11: > > 22:33:44:55")/IP(dst=3D"192.168.0.21", > > src=3D"192.168.0.20")/TCP(sport=3D22,dport=3D23)/("X"*480)'], > > + "unmatch": [ > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP(dst=3D"192.168.1.15")/UDP= (sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.22")/TCP(sport=3D22,dport=3D23)/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP()/VXLAN(vni=3D2)/Ether(dst= =3D"00:11: > > 22:33:44:55")/IP(dst=3D"192.168.0.21", > > src=3D"192.168.0.23")/TCP(sport=3D22,dport=3D23)/("X"*480)', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP(sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/TCP(sport=3D21,dport=3D23)/("X"*480)', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP(sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/TCP(sport=3D22,dport=3D24)/("X"*480)', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP(dst=3D"192.168.1.15")/UDP= (sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP()/VXLAN()/IP(dst=3D"192.168.= 0.21", > > src=3D"192.168.0.20")/TCP(sport=3D22,dport=3D23)/("X"*480)'] > > +} > > + > > +MAC_IPV4_TUN_IPV4_SCTP_MAC_IPV4_TUN_MAC_IPV4_SCTP =3D { > > + "match": [ > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP()/VXLAN(vni=3D2)/Ether()/IP(= src=3D"19 > > 2.168.0.20", dst=3D"192.168.0.21")/SCTP(sport=3D22,dport=3D23)/("X"*480= )', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP(sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/SCTP(sport=3D22,dport=3D23)/("X"*480)', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP(dst=3D"192.168.1.15")/UDP= (sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/Ether()/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/SCTP(sport=3D22,dport=3D23)/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP()/VXLAN(vni=3D2)/Ether(dst= =3D"00:11: > > 22:33:44:55")/IP(dst=3D"192.168.0.21", > > src=3D"192.168.0.20")/SCTP(sport=3D22,dport=3D23)/("X"*480)'], > > + "unmatch": [ > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP(dst=3D"192.168.1.15")/UDP= (sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.22")/SCTP(sport=3D22,dport=3D23)/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP()/VXLAN(vni=3D2)/Ether(dst= =3D"00:11: > > 22:33:44:55")/IP(dst=3D"192.168.0.21", > > src=3D"192.168.0.23")/SCTP(sport=3D22,dport=3D23)/("X"*480)', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP(sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/SCTP(sport=3D21,dport=3D23)/("X"*480)', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP(sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/SCTP(sport=3D22,dport=3D24)/("X"*480)', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP(dst=3D"192.168.1.15")/UDP= (sport=3D200, > > dport=3D4790)/VXLAN(flags=3D0xc)/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(sport=3D22, dport=3D23)/Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP()/VXLAN()/IP(dst=3D"192.168.= 0.21", > > src=3D"192.168.0.20")/SCTP(sport=3D22,dport=3D23)/("X"*480)'] > > +} > > + > > +MAC_IPV4_GTPU_IPV4_PAY =3D { > > + "match": [ > > + 'Ether(src=3D"a4:bf:01:51:27:ca", > > dst=3D"00:00:00:00:01:03")/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(dport=3D2152)/GTP_U_Header(gtp_type=3D255, > > teid=3D0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=3D0, > > qos_flow=3D0x34)/IP()/Raw("x"*20)', > > + 'Ether(src=3D"a4:bf:01:51:27:ca", > > dst=3D"00:00:00:00:01:03")/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(dport=3D2152)/GTP_U_Header(gtp_type=3D255, > > teid=3D0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=3D0, > > qos_flow=3D0x34)/IP(frag=3D1)/Raw("x"*20)', > > + 'Ether(src=3D"a4:bf:01:51:27:ca", > > dst=3D"00:00:00:00:01:03")/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(dport=3D2152)/GTP_U_Header(gtp_type=3D255, > > teid=3D0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=3D0, > > qos_flow=3D0x34)/IP()/UDP()/Raw("x"*20)', > > + 'Ether(src=3D"a4:bf:01:51:27:ca", > > dst=3D"00:00:00:00:01:03")/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP( dport=3D2152)/GTP_U_Header(gtp_type=3D255, > > teid=3D0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=3D0, > > qos_flow=3D0x34)/IP()/TCP(sport=3D22, dport=3D23)/Raw("x"*20)', > > + 'Ether(src=3D"a4:bf:01:51:27:ca", > > dst=3D"00:00:00:00:01:03")/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(dport=3D2152)/GTP_U_Header(gtp_type=3D255, > > teid=3D0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=3D0, > > qos_flow=3D0x34)/IP()/ICMP()/Raw("x"*20)'], > > + "unmatch": [ > > + 'Ether(src=3D"a4:bf:01:51:27:ca", > > dst=3D"00:00:00:00:01:03")/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(dport=3D2152)/GTP_U_Header(gtp_type=3D255, > > teid=3D0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=3D0, > > qos_flow=3D0x34)/IP()/SCTP()/Raw("x"*20)', > > + 'Ether(src=3D"a4:bf:01:51:27:ca", > > dst=3D"00:00:00:00:01:03")/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(dport=3D2152)/GTP_U_Header(gtp_type=3D255, > > teid=3D0x1234567)/GTP_PDUSession_ExtensionHeader(pdu_type=3D0, > > qos_flow=3D0x34)/IP()/Raw("x"*20)', > > + 'Ether(src=3D"a4:bf:01:51:27:ca", > > dst=3D"00:00:00:00:01:03")/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(dport=3D2152)/GTP_U_Header(gtp_type=3D255, > > teid=3D0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=3D0, > > qos_flow=3D0x35)/IP()/Raw("x"*20)'] > > +} > > + > > +tv_mac_ipv4_pay_queue_index =3D { > > + "name": "test_mac_ipv4_pay_queue_index", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src > > is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / en= d actions > > queue index 1 / end", > > + "scapy_str": MAC_IPV4_PAY, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": 1} > > +} > > + > > +tv_mac_ipv4_pay_selected_inputset_queue_index =3D { > > + "name": "test_mac_ipv4_pay_selected_inputset_queue_index", > > + "rule": "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0= .21 / end > > actions queue index 1 / end", > > + "scapy_str": MAC_IPV4_PAY_SELECTED, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": 1} > > +} > > + > > +tv_mac_ipv4_udp_queue_index =3D { > > + "name": "test_mac_ipv4_upd_queue_index", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src > > is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 d= st is 23 / end > > actions queue index 1 / end", > > + "scapy_str": MAC_IPV4_UDP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": 1} > > +} > > + > > +tv_mac_ipv4_tcp_queue_index =3D { > > + "name": "test_mac_ipv4_tcp_queue_index", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src > > is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / tcp src is 22 d= st is 23 / end > > actions queue index 63 / end", > > + "scapy_str": MAC_IPV4_TCP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": 63} > > +} > > + > > +tv_mac_ipv4_sctp_queue_index =3D { > > + "name": "test_mac_ipv4_sctp_queue_index", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src > > is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / sctp src is 22 = dst is 23 tag is 1 > > / end actions queue index 2 / end", > > + "scapy_str": MAC_IPV4_SCTP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": 2} > > +} > > + > > +tv_mac_ipv6_pay_queue_index =3D { > > + "name": "test_mac_ipv6_pay_queue_index", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv6 dst > > is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 1 ho= p is 2 > > tc is 1 / end actions queue index 1 / end", > > + "scapy_str": MAC_IPV6_PAY, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": 1} > > +} > > + > > +tv_mac_ipv6_pay_selected_inputset_queue_index =3D { > > + "name": "test_mac_ipv6_pay_selected_inputset_queue_index", > > + "rule": "flow create 0 ingress pattern eth / ipv6 dst is > > CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions queue index 1 / > > end", > > + "scapy_str": MAC_IPV6_PAY_SELECTED, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": 1} > > +} > > + > > +tv_mac_ipv6_udp_queue_index =3D { > > + "name": "test_mac_ipv6_udp_queue_index", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv6 dst > > is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc i= s 1 / > > udp src is 22 dst is 23 / end actions queue index 1 / end", > > + "scapy_str": MAC_IPV6_UDP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": 1} > > +} > > + > > +tv_mac_ipv6_tcp_queue_index =3D { > > + "name": "test_mac_ipv6_tcp_queue_index", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv6 dst > > is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc i= s 1 / > tcp > > src is 22 dst is 23 / end actions queue index 1 / end", > > + "scapy_str": MAC_IPV6_TCP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": 1} > > +} > > + > > +tv_mac_ipv6_sctp_queue_index =3D { > > + "name": "test_mac_ipv6_sctp_queue_index", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv6 dst > > is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc i= s 1 / > > sctp src is 22 dst is 23 / end actions queue index 1 / end", > > + "scapy_str": MAC_IPV6_SCTP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": 1} > > +} > > + > > +tv_mac_ipv4_tun_ipv4_pay_queue_index =3D { > > + "name": "test_mac_ipv4_tun_ipv4_pay_queue_index", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 / end actions queue index 1 / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_PAY_MAC_IPV4_TUN_MAC_IPV4_PAY, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": 1} > > +} > > + > > +tv_mac_ipv4_tun_ipv4_udp_queue_index =3D { > > + "name": "test_mac_ipv4_tun_ipv4_udp_queue_index", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end action= s queue > > index 1 / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_UDP_MAC_IPV4_TUN_MAC_IPV4_UDP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": 1} > > +} > > + > > +tv_mac_ipv4_tun_ipv4_tcp_queue_index =3D { > > + "name": "test_mac_ipv4_tun_ipv4_tcp_queue_index", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end action= s queue > > index 1 / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_TCP_MAC_IPV4_TUN_MAC_IPV4_TCP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": 1} > > +} > > + > > +tv_mac_ipv4_tun_ipv4_sctp_queue_index =3D { > > + "name": "test_mac_ipv4_tun_ipv4_sctp_queue_index", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actio= ns queue > > index 1 / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_SCTP_MAC_IPV4_TUN_MAC_IPV4_SCTP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": 1} > > +} > > + > > +tv_mac_ipv4_tun_mac_ipv4_pay_queue_index =3D { > > + "name": "test_mac_ipv4_tun_mac_ipv4_pay_queue_index", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = eth / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 / end actions queue index 1 / e= nd", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_PAY_MAC_IPV4_TUN_MAC_IPV4_PAY, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": 1} > > +} > > + > > +tv_mac_ipv4_tun_mac_ipv4_udp_queue_index =3D { > > + "name": "test_mac_ipv4_tun_mac_ipv4_udp_queue_index", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = eth / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end= actions > > queue index 1 / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_UDP_MAC_IPV4_TUN_MAC_IPV4_UDP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": 1} > > +} > > + > > +tv_mac_ipv4_tun_mac_ipv4_tcp_queue_index =3D { > > + "name": "test_mac_ipv4_tun_mac_ipv4_tcp_queue_index", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = eth / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end= actions > > queue index 1 / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_TCP_MAC_IPV4_TUN_MAC_IPV4_TCP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": 1} > > +} > > + > > +tv_mac_ipv4_tun_mac_ipv4_sctp_queue_index =3D { > > + "name": "test_mac_ipv4_tun_mac_ipv4_sctp_queue_index", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = eth / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / en= d actions > > queue index 1 / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_SCTP_MAC_IPV4_TUN_MAC_IPV4_SCTP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": 1} > > +} > > + > > +tv_mac_ipv4_pay_drop =3D { > > + "name": "test_mac_ipv4_pay_drop", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src > > is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / en= d actions drop > > / end", > > + "scapy_str": MAC_IPV4_PAY, > > + "check_func": rfc.check_drop, > > + "check_param": {"port_id": 0} > > +} > > + > > +tv_mac_ipv4_udp_drop =3D { > > + "name": "test_mac_ipv4_udp_drop", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src > > is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 d= st is 23 / end > > actions drop / end", > > + "scapy_str": MAC_IPV4_UDP, > > + "check_func": rfc.check_drop, > > + "check_param": {"port_id": 0} > > +} > > + > > +tv_mac_ipv4_tcp_drop =3D { > > + "name": "test_mac_ipv4_tcp_drop", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src > > is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / tcp src is 22 d= st is 23 / end > > actions drop / end", > > + "scapy_str": MAC_IPV4_TCP, > > + "check_func": rfc.check_drop, > > + "check_param": {"port_id": 0} > > +} > > + > > +tv_mac_ipv4_sctp_drop =3D { > > + "name": "test_mac_ipv4_sctp_drop", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src > > is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / sctp src is 22 = dst is 23 / end > > actions drop / end", > > + "scapy_str": MAC_IPV4_SCTP, > > + "check_func": rfc.check_drop, > > + "check_param": {"port_id": 0} > > +} > > + > > +tv_mac_ipv6_pay_drop =3D { > > + "name": "test_mac_ipv6_pay_drop", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv6 dst > > is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 1 ho= p is 2 > > tc is 1 / end actions drop / end", > > + "scapy_str": MAC_IPV6_PAY, > > + "check_func": rfc.check_drop, > > + "check_param": {"port_id": 0} > > +} > > + > > +tv_mac_ipv6_udp_drop =3D { > > + "name": "test_mac_ipv6_udp_drop", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv6 dst > > is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc i= s 1 / > > udp src is 22 dst is 23 / end actions drop / end", > > + "scapy_str": MAC_IPV6_UDP, > > + "check_func": rfc.check_drop, > > + "check_param": {"port_id": 0} > > +} > > +tv_mac_ipv6_tcp_drop =3D { > > + "name": "test_mac_ipv6_tcp_drop", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv6 dst > > is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc i= s 1 / > tcp > > src is 22 dst is 23 / end actions drop / end", > > + "scapy_str": MAC_IPV6_TCP, > > + "check_func": rfc.check_drop, > > + "check_param": {"port_id": 0} > > +} > > + > > +tv_mac_ipv6_sctp_drop =3D { > > + "name": "test_mac_ipv6_sctp_drop", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv6 dst > > is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc i= s 1 / > > sctp src is 22 dst is 23 / end actions drop / end", > > + "scapy_str": MAC_IPV6_SCTP, > > + "check_func": rfc.check_drop, > > + "check_param": {"port_id": 0} > > +} > > + > > +tv_mac_ipv4_tun_ipv4_pay_drop =3D { > > + "name": "test_mac_ipv4_tun_ipv4_pay_drop", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 / end actions drop / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_PAY_MAC_IPV4_TUN_MAC_IPV4_PAY, > > + "check_func": rfc.check_drop, > > + "check_param": {"port_id": 0} > > +} > > + > > +tv_mac_ipv4_tun_ipv4_udp_drop =3D { > > + "name": "test_mac_ipv4_tun_ipv4_udp_drop", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end action= s drop / > > end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_UDP_MAC_IPV4_TUN_MAC_IPV4_UDP, > > + "check_func": rfc.check_drop, > > + "check_param": {"port_id": 0} > > +} > > + > > +tv_mac_ipv4_tun_ipv4_tcp_drop =3D { > > + "name": "test_mac_ipv4_tun_ipv4_tcp_drop", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end action= s drop / > > end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_TCP_MAC_IPV4_TUN_MAC_IPV4_TCP, > > + "check_func": rfc.check_drop, > > + "check_param": {"port_id": 0} > > +} > > + > > +tv_mac_ipv4_tun_ipv4_sctp_drop =3D { > > + "name": "test_mac_ipv4_tun_ipv4_sctp_drop", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actio= ns drop / > > end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_SCTP_MAC_IPV4_TUN_MAC_IPV4_SCTP, > > + "check_func": rfc.check_drop, > > + "check_param": {"port_id": 0} > > +} > > + > > +tv_mac_ipv4_tun_mac_ipv4_pay_drop =3D { > > + "name": "test_mac_ipv4_tun_mac_ipv4_pay_drop", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = eth / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 / end actions drop / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_PAY_MAC_IPV4_TUN_MAC_IPV4_PAY, > > + "check_func": rfc.check_drop, > > + "check_param": {"port_id": 0} > > +} > > + > > +tv_mac_ipv4_tun_mac_ipv4_udp_drop =3D { > > + "name": "test_mac_ipv4_tun_mac_ipv4_udp_drop", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = eth / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end= actions drop > > / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_UDP_MAC_IPV4_TUN_MAC_IPV4_UDP, > > + "check_func": rfc.check_drop, > > + "check_param": {"port_id": 0} > > +} > > + > > +tv_mac_ipv4_tun_mac_ipv4_tcp_drop =3D { > > + "name": "test_mac_ipv4_tun_mac_ipv4_tcp_drop", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = eth / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end= actions drop > > / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_TCP_MAC_IPV4_TUN_MAC_IPV4_TCP, > > + "check_func": rfc.check_drop, > > + "check_param": {"port_id": 0} > > +} > > + > > +tv_mac_ipv4_tun_mac_ipv4_sctp_drop =3D { > > + "name": "test_mac_ipv4_tun_mac_ipv4_sctp_drop", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = eth / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / en= d actions drop > > / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_SCTP_MAC_IPV4_TUN_MAC_IPV4_SCTP, > > + "check_func": rfc.check_drop, > > + "check_param": {"port_id": 0} > > +} > > + > > +tv_mac_ipv4_pay_queue_group =3D { > > + "name": "test_mac_ipv4_pay_queue_group", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src > > is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / en= d actions rss > > queues 0 1 end / end", > > + "scapy_str": MAC_IPV4_PAY, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": [0, 1]} > > +} > > + > > +tv_mac_ipv4_udp_queue_group =3D { > > + "name": "test_mac_ipv4_udp_queue_group", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src > > is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 d= st is 23 / end > > actions rss queues 1 2 3 4 end / end", > > + "scapy_str": MAC_IPV4_UDP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": [1, 2, 3, 4]} > > +} > > + > > +tv_mac_ipv4_tcp_queue_group =3D { > > + "name": "test_mac_ipv4_tcp_queue_group", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src > > is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / tcp src is 22 d= st is 23 / end > > actions rss queues 56 57 58 59 60 61 62 63 end / end", > > + "scapy_str": MAC_IPV4_TCP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": range(56, 64)} > > +} > > + > > +tv_mac_ipv4_sctp_queue_group =3D { > > + "name": "test_mac_ipv4_sctp_queue_group", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src > > is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / sctp src is 22 = dst is 23 tag is 1 > > / end actions rss queues 0 1 2 3 end / end", > > + "scapy_str": MAC_IPV4_SCTP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": range(4)} > > +} > > + > > +tv_mac_ipv6_pay_queue_group =3D { > > + "name": "test_mac_ipv6_pay_queue_group", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv6 dst > > is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 1 ho= p is 2 > > tc is 1 / end actions rss queues 1 2 end / end", > > + "scapy_str": MAC_IPV6_PAY, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": [1, 2]} > > +} > > + > > +tv_mac_ipv6_udp_queue_group =3D { > > + "name": "test_mac_ipv6_udp_queue_group", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv6 dst > > is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc i= s 1 / > > udp src is 22 dst is 23 / end actions rss queues 1 2 end / end", > > + "scapy_str": MAC_IPV6_UDP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": [1, 2]} > > +} > > + > > +tv_mac_ipv6_tcp_queue_group =3D { > > + "name": "test_mac_ipv6_tcp_queue_group", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv6 dst > > is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc i= s 1 / > tcp > > src is 22 dst is 23 / end actions rss queues 1 2 end / end", > > + "scapy_str": MAC_IPV6_TCP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": [1, 2]} > > +} > > + > > +tv_mac_ipv6_sctp_queue_group =3D { > > + "name": "test_mac_ipv6_sctp_queue_group", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv6 dst > > is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc i= s 1 / > > sctp src is 22 dst is 23 / end actions rss queues 1 2 end / end", > > + "scapy_str": MAC_IPV6_SCTP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": [1, 2]} > > +} > > + > > +tv_mac_ipv4_tun_ipv4_pay_queue_group =3D { > > + "name": "test_mac_ipv4_tun_ipv4_pay_queue_group", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 / end actions rss queues 9 10 11 12 13= 14 15 16 > > 17 18 19 20 21 22 23 24 end / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_PAY_MAC_IPV4_TUN_MAC_IPV4_PAY, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": range(9, 25)} > > +} > > + > > +tv_mac_ipv4_tun_ipv4_udp_queue_group =3D { > > + "name": "test_mac_ipv4_tun_ipv4_udp_queue_group", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end action= s rss > > queues 38 39 40 41 end / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_UDP_MAC_IPV4_TUN_MAC_IPV4_UDP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": [38, 39, 40, 41]} > > +} > > + > > +tv_mac_ipv4_tun_ipv4_tcp_queue_group =3D { > > + "name": "test_mac_ipv4_tun_ipv4_tcp_queue_group", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end action= s rss queues > > 1 2 end / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_TCP_MAC_IPV4_TUN_MAC_IPV4_TCP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": [1, 2]} > > +} > > + > > +tv_mac_ipv4_tun_ipv4_sctp_queue_group =3D { > > + "name": "test_mac_ipv4_tun_ipv4_sctp_queue_group", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actio= ns rss > > queues 1 2 end / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_SCTP_MAC_IPV4_TUN_MAC_IPV4_SCTP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": [1, 2]} > > +} > > + > > +tv_mac_ipv4_tun_mac_ipv4_pay_queue_group =3D { > > + "name": "test_mac_ipv4_tun_mac_ipv4_pay_queue_group", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = eth / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 / end actions rss queues 1 2 en= d / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_PAY_MAC_IPV4_TUN_MAC_IPV4_PAY, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": [1, 2]} > > +} > > + > > +tv_mac_ipv4_tun_mac_ipv4_udp_queue_group =3D { > > + "name": "test_mac_ipv4_tun_mac_ipv4_udp_queue_group", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = eth / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end= actions rss > > queues 1 2 end / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_UDP_MAC_IPV4_TUN_MAC_IPV4_UDP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": [1, 2]} > > +} > > + > > +tv_mac_ipv4_tun_mac_ipv4_tcp_queue_group =3D { > > + "name": "test_mac_ipv4_tun_mac_ipv4_tcp_queue_group", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = eth / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end= actions rss > > queues 1 2 end / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_TCP_MAC_IPV4_TUN_MAC_IPV4_TCP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": [1, 2]} > > +} > > + > > +tv_mac_ipv4_tun_mac_ipv4_sctp_queue_group =3D { > > + "name": "test_mac_ipv4_tun_mac_ipv4_sctp_queue_group", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = eth / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / en= d actions rss > > queues 1 2 end / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_SCTP_MAC_IPV4_TUN_MAC_IPV4_SCTP, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": [1, 2]} > > +} > > + > > +tv_mac_ipv4_gtpu_ipv4_pay_queue_index =3D { > > + "name": "test_mac_ipv4_gtpu_ipv4_pay_queue_index", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / gtpu tei= d is > > 0x12345678 / gtp_psc qfi is 0x34 / ipv4 / end actions queue index 1 / e= nd", > > + "scapy_str": MAC_IPV4_GTPU_IPV4_PAY, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": 1} > > +} > > + > > +tv_mac_ipv4_gtpu_ipv4_pay_drop =3D { > > + "name": "test_mac_ipv4_gtpu_ipv4_pay_drop", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / gtpu tei= d is > > 0x12345678 / gtp_psc qfi is 0x34 / ipv4 / end actions drop / end", > > + "scapy_str": MAC_IPV4_GTPU_IPV4_PAY, > > + "check_func": rfc.check_drop, > > + "check_param": {"port_id": 0} > > +} > > + > > +tv_mac_ipv4_gtpu_ipv4_pay_queue_group =3D { > > + "name": "test_mac_ipv4_gtpu_ipv4_pay_queue_group", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / gtpu tei= d is > > 0x12345678 / gtp_psc qfi is 0x34 / ipv4 / end actions rss queues 0 1 en= d / end", > > + "scapy_str": MAC_IPV4_GTPU_IPV4_PAY, > > + "check_func": rfc.check_queue, > > + "check_param": {"port_id": 0, "queue": [0, 1]} > > +} > > + > > +tv_mac_ipv4_gtpu_ipv4_pay_mark_count_query =3D { > > + "name": "test_mac_ipv4_gtpu_ipv4_pay_mark_count_query", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / gtpu tei= d is > > 0x12345678 / gtp_psc qfi is 0x34 / ipv4 / end actions queue index 2 / m= ark id 2 > > / count / end", > > + "scapy_str": MAC_IPV4_GTPU_IPV4_PAY, > > + "check_func": rfc.check_mark, > > + "check_param": {"port_id": 0, "queue": 2, "mark_id": 2, > > + "count": {"hits_set": 1, "hits": 5}, "mark": True} > > +} > > + > > +tv_mac_ipv4_pay_queue_index_mark =3D { > > + "name": "test_mac_ipv4_pay_queue_index_mark", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src > > is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / en= d actions > > queue index 1 / mark id 0 / end", > > + "scapy_str": MAC_IPV4_PAY, > > + "check_func": rfc.check_mark, > > + "check_param": {"port_id": 0, "queue": 1, "mark_id": 0, "mark": Tr= ue} > > +} > > + > > +tv_mac_ipv4_udp_queue_index_mark =3D { > > + "name": "test_mac_ipv4_udp_queue_index_mark", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src > > is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 d= st is 23 / end > > actions queue index 0 / mark id 1 / end", > > + "scapy_str": MAC_IPV4_UDP, > > + "check_func": rfc.check_mark, > > + "check_param": {"port_id": 0, "queue": 0, "mark_id": 1, "mark": Tr= ue} > > +} > > + > > +tv_mac_ipv4_tcp_queue_index_mark =3D { > > + "name": "test_mac_ipv4_tcp_queue_index_mark", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src > > is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / tcp src is 22 d= st is 23 / end > > actions queue index 1 / mark id 4294967294 / end", > > + "scapy_str": MAC_IPV4_TCP, > > + "check_func": rfc.check_mark, > > + "check_param": {"port_id": 0, "queue": 1, "mark_id": 4294967294, "= mark": > > True} > > +} > > + > > +tv_mac_ipv4_sctp_queue_drop_mark =3D { > > + "name": "test_mac_ipv4_sctp_queue_drop_mark", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src > > is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / sctp src is 22 = dst is 23 tag is 1 > > / end actions drop / mark id 1 / end", > > + "scapy_str": MAC_IPV4_SCTP, > > + "check_func": rfc.check_mark, > > + "check_param": {"port_id": 0, "mark_id": 1, "mark": True} > > +} > > + > > +tv_mac_ipv6_pay_queue_index_mark =3D { > > + "name": "test_mac_ipv6_pay_queue_index_mark", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv6 dst > > is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 proto is 1 ho= p is 2 > > tc is 1 / end actions queue index 1 / mark id 1 / end", > > + "scapy_str": MAC_IPV6_PAY, > > + "check_func": rfc.check_mark, > > + "check_param": {"port_id": 0, "queue": 1, "mark_id": 1, "mark": Tr= ue} > > +} > > + > > +tv_mac_ipv6_udp_queue_index_mark =3D { > > + "name": "test_mac_ipv6_udp_queue_index_mark", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv6 dst > > is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc i= s 1 / > > udp src is 22 dst is 23 / end actions queue index 1 / mark id 1 / end", > > + "scapy_str": MAC_IPV6_UDP, > > + "check_func": rfc.check_mark, > > + "check_param": {"port_id": 0, "queue": 1, "mark_id": 1, "mark": Tr= ue} > > +} > > + > > +tv_mac_ipv6_tcp_queue_index_mark =3D { > > + "name": "test_mac_ipv6_tcp_queue_index_mark", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv6 dst > > is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc i= s 1 / > tcp > > src is 22 dst is 23 / end actions queue index 1 / mark id 1 / end", > > + "scapy_str": MAC_IPV6_TCP, > > + "check_func": rfc.check_mark, > > + "check_param": {"port_id": 0, "queue": 1, "mark_id": 1, "mark": Tr= ue} > > +} > > + > > +tv_mac_ipv6_sctp_queue_index_mark =3D { > > + "name": "test_mac_ipv6_sctp_queue_index_mark", > > + "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv6 dst > > is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc i= s 1 / > > sctp src is 22 dst is 23 / end actions queue index 1 / mark id 1 / end"= , > > + "scapy_str": MAC_IPV6_SCTP, > > + "check_func": rfc.check_mark, > > + "check_param": {"port_id": 0, "queue": 1, "mark_id": 1, "mark": Tr= ue} > > +} > > + > > +tv_mac_ipv4_tun_ipv4_pay_queue_index_mark =3D { > > + "name": "test_mac_ipv4_tun_ipv4_pay_queue_index_mark", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 / end actions queue index 1 / mark id = 1 / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_PAY_MAC_IPV4_TUN_MAC_IPV4_PAY, > > + "check_func": rfc.check_mark, > > + "check_param": {"port_id": 0, "queue": 1, "mark_id": 1, "mark": Tr= ue} > > +} > > + > > +tv_mac_ipv4_tun_ipv4_udp_queue_group_mark =3D { > > + "name": "test_mac_ipv4_tun_ipv4_udp_queue_group_mark", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end action= s rss > > queues 1 2 end / mark id 1 / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_UDP_MAC_IPV4_TUN_MAC_IPV4_UDP, > > + "check_func": rfc.check_mark, > > + "check_param": {"port_id": 0, "queue": [1, 2], "mark_id": 1, "mark= ": True} > > +} > > + > > +tv_mac_ipv4_tun_ipv4_tcp_drop_mark =3D { > > + "name": "test_mac_ipv4_tun_ipv4_tcp_drop_mark", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end action= s drop / > > mark id 1 / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_TCP_MAC_IPV4_TUN_MAC_IPV4_TCP, > > + "check_func": rfc.check_mark, > > + "check_param": {"port_id": 0, "mark_id": 1, "mark": True} > > +} > > + > > +tv_mac_ipv4_tun_ipv4_sctp_queue_index_mark =3D { > > + "name": "test_mac_ipv4_tun_ipv4_sctp_queue_index_mark", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actio= ns queue > > index 1 / mark id 1 / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_SCTP_MAC_IPV4_TUN_MAC_IPV4_SCTP, > > + "check_func": rfc.check_mark, > > + "check_param": {"port_id": 0, "queue": 1, "mark_id": 1, "mark": Tr= ue} > > +} > > + > > +tv_mac_ipv4_tun_mac_ipv4_pay_queue_index_mark =3D { > > + "name": "test_mac_ipv4_tun_mac_ipv4_pay_queue_index_mark", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = eth / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 / end actions queue index 1 / m= ark id 1 / > > end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_PAY_MAC_IPV4_TUN_MAC_IPV4_PAY, > > + "check_func": rfc.check_mark, > > + "check_param": {"port_id": 0, "queue": 1, "mark_id": 1, "mark": Tr= ue} > > +} > > + > > +tv_mac_ipv4_tun_mac_ipv4_udp_queue_index_mark =3D { > > + "name": "test_mac_ipv4_tun_mac_ipv4_udp_queue_index_mark", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = eth / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end= actions > > queue index 1 / mark id 1 / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_UDP_MAC_IPV4_TUN_MAC_IPV4_UDP, > > + "check_func": rfc.check_mark, > > + "check_param": {"port_id": 0, "queue": 1, "mark_id": 1, "mark": Tr= ue} > > +} > > + > > +tv_mac_ipv4_tun_mac_ipv4_tcp_queue_index_mark =3D { > > + "name": "test_mac_ipv4_tun_mac_ipv4_tcp_queue_index_mark", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = eth / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end= actions > > queue index 1 / mark id 1 / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_TCP_MAC_IPV4_TUN_MAC_IPV4_TCP, > > + "check_func": rfc.check_mark, > > + "check_param": {"port_id": 0, "queue": 1, "mark_id": 1, "mark": Tr= ue} > > +} > > + > > +tv_mac_ipv4_tun_mac_ipv4_sctp_queue_index_mark =3D { > > + "name": "test_mac_ipv4_tun_mac_ipv4_sctp_queue_index_mark", > > + "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / = eth / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / en= d actions > > queue index 1 / mark id 1 / end", > > + "scapy_str": > > MAC_IPV4_TUN_IPV4_SCTP_MAC_IPV4_TUN_MAC_IPV4_SCTP, > > + "check_func": rfc.check_mark, > > + "check_param": {"port_id": 0, "queue": 1, "mark_id": 1, "mark": Tr= ue} > > +} > > + > > +vectors_ipv4_pay =3D [tv_mac_ipv4_pay_queue_index, > > tv_mac_ipv4_pay_selected_inputset_queue_index, > > + tv_mac_ipv4_pay_drop, tv_mac_ipv4_pay_queue_g= roup, > > tv_mac_ipv4_pay_queue_index_mark] > > + > > +vectors_ipv4_udp =3D [tv_mac_ipv4_udp_drop, > > tv_mac_ipv4_udp_queue_group, tv_mac_ipv4_udp_queue_index_mark, > > + tv_mac_ipv4_udp_queue_index] > > + > > +vectors_ipv4_tcp =3D [tv_mac_ipv4_tcp_drop, > > tv_mac_ipv4_tcp_queue_group, tv_mac_ipv4_tcp_queue_index, > > + tv_mac_ipv4_tcp_queue_index_mark] > > + > > +vectors_ipv4_sctp =3D [tv_mac_ipv4_sctp_queue_drop_mark, > > tv_mac_ipv4_sctp_queue_group, tv_mac_ipv4_sctp_drop, > > + tv_mac_ipv4_sctp_queue_index] > > + > > +vectors_ipv6_pay =3D [tv_mac_ipv6_pay_drop, > > tv_mac_ipv6_pay_queue_group, tv_mac_ipv6_pay_queue_index, > > + tv_mac_ipv6_pay_queue_index_mark, > > tv_mac_ipv6_pay_selected_inputset_queue_index] > > + > > +vectors_ipv6_udp =3D [tv_mac_ipv6_udp_drop, > > tv_mac_ipv6_udp_queue_group, tv_mac_ipv6_udp_queue_index, > > + tv_mac_ipv6_udp_queue_index_mark] > > + > > +vectors_ipv6_tcp =3D [tv_mac_ipv6_tcp_drop, > > tv_mac_ipv6_tcp_queue_group, tv_mac_ipv6_tcp_queue_index, > > + tv_mac_ipv6_tcp_queue_index_mark] > > + > > +vectors_ipv6_sctp =3D [tv_mac_ipv6_sctp_queue_index_mark, > > tv_mac_ipv6_sctp_drop, tv_mac_ipv6_sctp_queue_group, > > + tv_mac_ipv6_sctp_queue_index] > > + > > +vectors_ipv4_tun_ipv4 =3D [tv_mac_ipv4_tun_ipv4_pay_drop, > > tv_mac_ipv4_tun_ipv4_pay_queue_group, > > + tv_mac_ipv4_tun_ipv4_pay_queue_index, > > tv_mac_ipv4_tun_ipv4_pay_queue_index_mark, > > + tv_mac_ipv4_tun_ipv4_sctp_drop, > > tv_mac_ipv4_tun_ipv4_sctp_queue_group, > > + tv_mac_ipv4_tun_ipv4_sctp_queue_index, > > tv_mac_ipv4_tun_ipv4_sctp_queue_index_mark, > > + tv_mac_ipv4_tun_ipv4_tcp_drop, > > tv_mac_ipv4_tun_ipv4_tcp_drop_mark, > > + tv_mac_ipv4_tun_ipv4_tcp_queue_group, > > tv_mac_ipv4_tun_ipv4_tcp_queue_index, > > + tv_mac_ipv4_tun_ipv4_udp_drop, > > tv_mac_ipv4_tun_ipv4_udp_queue_group, > > + tv_mac_ipv4_tun_ipv4_udp_queue_group_mar= k, > > tv_mac_ipv4_tun_ipv4_udp_queue_index] > > + > > +vectors_ipv4_tun_mac =3D > > [tv_mac_ipv4_tun_mac_ipv4_pay_queue_index_mark, > > tv_mac_ipv4_tun_mac_ipv4_pay_drop, > > + tv_mac_ipv4_tun_mac_ipv4_pay_queue_group, > > tv_mac_ipv4_tun_mac_ipv4_pay_queue_index, > > + tv_mac_ipv4_tun_mac_ipv4_sctp_drop, > > tv_mac_ipv4_tun_mac_ipv4_sctp_queue_group, > > + tv_mac_ipv4_tun_mac_ipv4_sctp_queue_index= , > > tv_mac_ipv4_tun_mac_ipv4_sctp_queue_index_mark, > > + tv_mac_ipv4_tun_mac_ipv4_tcp_drop, > > tv_mac_ipv4_tun_mac_ipv4_tcp_queue_group, > > + tv_mac_ipv4_tun_mac_ipv4_tcp_queue_index, > > tv_mac_ipv4_tun_mac_ipv4_tcp_queue_index_mark, > > + tv_mac_ipv4_tun_mac_ipv4_udp_drop, > > tv_mac_ipv4_tun_mac_ipv4_udp_queue_group, > > + tv_mac_ipv4_tun_mac_ipv4_udp_queue_index, > > tv_mac_ipv4_tun_mac_ipv4_udp_queue_index_mark] > > + > > +test_vectors_gtpu_ipv4_pay =3D [tv_mac_ipv4_gtpu_ipv4_pay_drop, > > tv_mac_ipv4_gtpu_ipv4_pay_mark_count_query, > > + tv_mac_ipv4_gtpu_ipv4_pay_queue_group, > > tv_mac_ipv4_gtpu_ipv4_pay_queue_index] > > + > > + > > +class TestCVLFdir(TestCase): > > + > > + def check_rule(self, port_id=3D0, stats=3DTrue, rule_list=3DNone): > > + out =3D self.dut.send_command("flow list %s" % port_id, timeou= t=3D2) > > + p =3D re.compile(r"ID\s+Group\s+Prio\s+Attr\s+Rule") > > + m =3D p.search(out) > > + if stats: > > + self.verify(m, "flow rule on port %s is not existed" % por= t_id) > > + if rule_list: > > + p =3D re.compile("^(\d+)\s") > > + li =3D out.splitlines() > > + res =3D filter(bool, map(p.match, li)) > > + result =3D [i.group(1) for i in res] > > + self.verify(sorted(result) =3D=3D sorted(rule_list), > > + "check rule list failed. expect %s, result= %s" % (rule_list, > > result)) > > + else: > > + self.verify(not m, "flow rule on port %s is existed" % por= t_id) > > + > > + def destroy_rule(self, rule_id, port_id=3D0): > > + if isinstance(rule_id, list): > > + for i in rule_id: > > + out =3D self.dut.send_command("flow destroy %s rule %s= " % (port_id, > > i), timeout=3D1) > > + p =3D re.compile(r"Flow rule #(\d+) destroyed") > > + m =3D p.search(out) > > + self.verify(m, "flow rule %s delete failed" % rule_id) > > + else: > > + out =3D self.dut.send_command("flow destroy %s rule %s" % = (port_id, > > rule_id), timeout=3D1) > > + p =3D re.compile(r"Flow rule #(\d+) destroyed") > > + m =3D p.search(out) > > + self.verify(m, "flow rule %s delete failed" % rule_id) > > + > > + def query_count(self, hits_set, hits, port_id=3D0, rule_id=3D0): > > + out =3D self.dut.send_command("flow query %s %s count" % (port= _id, > > rule_id), timeout=3D1) > > + p =3D re.compile("hits_set:\s(\d+).*hits:\s(\d+)", re.DOTALL) > > + m =3D p.search(out) > > + res_hits_set =3D int(m.group(1)) > > + res_hits =3D int(m.group(2)) > > + self.verify(res_hits_set =3D=3D hits_set, > > + "hits_set number check failed. expect: %d, result:= %d" % (hits_set, > > res_hits_set)) > > + self.verify(res_hits =3D=3D hits, "hits number check failed. e= xpect: %d, > > result: %d" % (hits, res_hits)) > > + > > + def _rte_flow_validate(self, vectors): > > + test_results =3D {} > > + for tv in vectors: > > + try: > > + count =3D 1 if not tv["check_param"].get("count") else > > tv["check_param"]["count"] > > + port_id =3D tv["check_param"]["port_id"] > > + mark =3D tv["check_param"].get("mark") > > + # create rule > > + rule_li =3D self.create_fdir_rule(tv["rule"], check_st= ats=3DTrue) > > + # send and check match packets > > + out1 =3D self.send_pkts_getouput(pkts=3Dtv["scapy_str"= ]["match"], > > port_id=3Dport_id, > > + count=3Dcount, mark=3Dm= ark) > > + tv["check_func"](out1, pkt_num=3Dlen(tv["scapy_str"]["= match"]), > > check_param=3Dtv["check_param"]) > > + # send and check unmatch packets > > + out2 =3D self.send_pkts_getouput(pkts=3Dtv["scapy_str"= ]["unmatch"], > > port_id=3Dport_id, > > + count=3Dcount, mark=3Dm= ark) > > + tv["check_func"](out2, pkt_num=3Dlen(tv["scapy_str"]["= unmatch"]), > > check_param=3Dtv["check_param"], > > + stats=3DFalse) > > + if tv["check_param"].get("count"): > > + self.query_count(tv["check_param"]["count"]["hits_= set"], > > tv["check_param"]["count"]["hits"], > > + port_id=3Dport_id, > > + rule_id=3Drule_li[0]) > > + # list and destroy rule > > + self.check_rule(port_id=3Dtv["check_param"]["port_id"]= , > > rule_list=3Drule_li) > > + self.destroy_rule(rule_id=3Drule_li, port_id=3Dport_id= ) > > + # send matched packet > > + out3 =3D self.send_pkts_getouput(pkts=3Dtv["scapy_str"= ]["match"], > > port_id=3Dport_id, > > + count=3Dcount, mark=3Dm= ark) > > + tv["check_func"](out3, pkt_num=3Dlen(tv["scapy_str"]["= match"]), > > check_param=3Dtv["check_param"], > > + stats=3DFalse) > > + # check not rule exists > > + self.check_rule(port_id=3Dport_id, stats=3DFalse) > > + test_results[tv["name"]] =3D True > > + print(GREEN("case passed: %s" % tv["name"])) > > + except Exception as e: > > + print(RED(e)) > > + test_results[tv["name"]] =3D False > > + continue > > + failed_cases =3D [] > > + for k, v in test_results.items(): > > + if not v: > > + failed_cases.append(k) > > + self.verify(all(test_results.values()), "{} failed.".format(fa= iled_cases)) > > + > > + def set_up_all(self): > > + """ > > + Run at the start of each test suite. > > + prerequisites. > > + """ > > + # Based on h/w type, choose how many ports to use > > + self.dut_ports =3D self.dut.get_ports(self.nic) > > + self.verify(len(self.dut_ports) >=3D 2, "Insufficient ports fo= r testing") > > + # Verify that enough threads are available > > + cores =3D self.dut.get_core_list("1S/4C/1T") > > + self.verify(cores is not None, "Insufficient cores for speed t= esting") > > + self.portMask =3D utils.create_mask([self.dut_ports[0], self.d= ut_ports[1]]) > > + self.ports_socket =3D self.dut.get_numa_id(self.dut_ports[0]) > > + self.dut_port0 =3D self.tester.get_local_port(self.dut_ports[0= ]) > > + self.dut_port1 =3D self.tester.get_local_port(self.dut_ports[1= ]) > > + self.tester_iface0 =3D self.tester.get_interface(self.dut_port= 0) > > + self.tester_iface1 =3D self.tester.get_interface(self.dut_port= 1) > > + self.pci0 =3D self.dut.ports_info[self.dut_ports[0]]['pci'] > > + self.pci1 =3D self.dut.ports_info[self.dut_ports[1]]['pci'] > > + > > + self.pkt =3D Packet() > > + self.pmd_output =3D PmdOutput(self.dut) > > + self.launch_testpmd_with_mark() > > + > > + def set_up(self): > > + """ > > + Run before each test case. > > + """ > > + self.pmd_output.execute_cmd("start") > > + > > + def config_testpmd(self): > > + self.pmd_output.execute_cmd("set fwd rxonly") > > + self.pmd_output.execute_cmd("set verbose 1") > > + self.pmd_output.execute_cmd("port config 0 udp_tunnel_port add > > vxlan 4789") > > + self.pmd_output.execute_cmd("port config 1 udp_tunnel_port add > > vxlan 4789") > > + # specify a fixed rss-hash-key for cvl ether > > + self.pmd_output.execute_cmd( > > + "port config 0 rss-hash-key ipv4 > > > 1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd12 > > 34abcd1234abcd1234abcd1234abcd1234abcd") > > + res =3D self.pmd_output.wait_link_status_up('all', timeout=3D1= 5) > > + self.verify(res is True, 'there have port link is down') > > + > > + def launch_testpmd_with_mark(self): > > + self.pmd_output.start_testpmd(cores=3D"1S/4C/1T", > > + param=3D"--portmask=3D%s --rxq= =3D64 --txq=3D64 --port- > > topology=3Dloop" % self.portMask, > > + eal_param=3D"-w %s,flow-mark-sup= port=3D1 -w %s,flow- > > mark-support=3D1" % ( > > + self.pci0, self.pci1), socke= t=3Dself.ports_socket) > > + self.config_testpmd() > > + > > + def send_packets(self, packets, tx_port=3DNone, count=3D1): > > + self.pkt.update_pkt(packets) > > + tx_port =3D self.tester_iface0 if not tx_port else tx_port > > + self.pkt.send_pkt(crb=3Dself.tester, tx_port=3Dtx_port, count= =3Dcount) > > + > > + def send_pkts_getouput(self, pkts, port_id=3D0, count=3D1, mark=3D= None): > > + tx_port =3D self.tester_iface0 if port_id =3D=3D 0 else self.t= ester_iface1 > > + self.send_packets(pkts, tx_port=3Dtx_port, count=3Dcount) > > + time.sleep(1) > > + if mark: > > + out =3D (self.pmd_output.get_output(), > > self.pmd_output.execute_cmd("stop")) > > + else: > > + out =3D self.pmd_output.execute_cmd("stop") > > + self.pmd_output.execute_cmd("start") > > + return out > > + > > + def create_fdir_rule(self, rule, check_stats=3DNone): > > + # dpdk get a warning message(ice_interrupt_handler), it'll mes= s up > > output stream, testpmd> probably not be > > + # print completely. > > + p =3D re.compile(r"Flow rule #(\d+) created") > > + rule_list =3D [] > > + if isinstance(rule, list): > > + for i in rule: > > + out =3D self.dut.send_command(i, timeout=3D1) > > + m =3D p.search(out) > > + if m: > > + rule_list.append(m.group(1)) > > + else: > > + rule_list.append(False) > > + elif isinstance(rule, str): > > + out =3D self.dut.send_command(rule, timeout=3D1) > > + m =3D p.search(out) > > + if m: > > + rule_list.append(m.group(1)) > > + else: > > + rule_list.append(False) > > + else: > > + raise Exception("unsupported rule type, only accept list o= r str") > > + if check_stats: > > + self.verify(all(rule_list), "some rules create failed, res= ult %s" % > > rule_list) > > + elif check_stats =3D=3D False: > > + self.verify(not any(rule_list), "all rules should create f= ailed, result %s" % > > rule_list) > > + return rule_list > > + > > + def check_fdir_rule(self, port_id=3D0, stats=3DTrue, rule_list=3DN= one): > > + out =3D self.dut.send_command("flow list %s" % port_id, timeou= t=3D2) > > + p =3D re.compile(r"ID\s+Group\s+Prio\s+Attr\s+Rule") > > + if stats: > > + self.verify(p.search(out), "flow rule on port %s is not ex= isted" % > > port_id) > > + if rule_list: > > + p =3D re.compile("^(\d+)\s") > > + li =3D out.splitlines() > > + res =3D filter(bool, map(p.match, li)) > > + result =3D [i.group(1) for i in res] > > + self.verify(sorted(result) =3D=3D sorted(rule_list), > > + "check rule list failed. expect %s, result= %s" % (rule_list, > > result)) > > + else: > > + self.verify(not p.search(out), "flow rule on port %s is ex= isted" % > > port_id) > > + > > + def destroy_fdir_rule(self, port_id=3D0, rule_id=3DNone): > > + if rule_id =3D=3D None: > > + rule_id =3D 0 > > + if isinstance(rule_id, list): > > + for i in rule_id: > > + out =3D self.dut.send_command("flow destroy %s rule %s= " % (port_id, > > i), timeout=3D1) > > + p =3D re.compile(r"Flow rule #(\d+) destroyed") > > + m =3D p.search(out) > > + self.verify(m, "flow rule %s delete failed" % rule_id) > > + else: > > + out =3D self.dut.send_command("flow destroy %s rule %s" % = (port_id, > > rule_id), timeout=3D1) > > + p =3D re.compile(r"Flow rule #(\d+) destroyed") > > + m =3D p.search(out) > > + self.verify(m, "flow rule %s delete failed" % rule_id) > > + > > + def test_mac_ipv4_pay(self): > > + self._rte_flow_validate(vectors_ipv4_pay) > > + > > + def test_mac_ipv4_udp(self): > > + self._rte_flow_validate(vectors_ipv4_udp) > > + > > + def test_mac_ipv4_tcp(self): > > + self._rte_flow_validate(vectors_ipv4_tcp) > > + > > + def test_mac_ipv4_sctp(self): > > + self._rte_flow_validate((vectors_ipv4_sctp)) > > + > > + def test_mac_ipv6_pay(self): > > + self._rte_flow_validate(vectors_ipv6_pay) > > + > > + def test_mac_ipv6_udp(self): > > + self._rte_flow_validate(vectors_ipv6_udp) > > + > > + def test_mac_ipv6_tcp(self): > > + self._rte_flow_validate(vectors_ipv6_tcp) > > + > > + def test_mac_ipv6_sctp(self): > > + self._rte_flow_validate(vectors_ipv6_sctp) > > + > > + def test_mac_ipv4_tun_ipv4(self): > > + self._rte_flow_validate(vectors_ipv4_tun_ipv4) > > + > > + def test_mac_ipv4_tun_mac(self): > > + self._rte_flow_validate(vectors_ipv4_tun_mac) > > + > > + def test_queue_index_wrong_parameters(self): > > + rule1 =3D "flow create 0 ingress pattern eth dst is 00:11:22:3= 3:44:55 / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 = / end actions > > queue index 64 / end" > > + self.create_fdir_rule(rule1, check_stats=3DFalse) > > + rule2 =3D [ > > + "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end a= ctions queue > > index 1 / end", > > + "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end a= ctions queue > > index 2 / end", > > + "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end a= ctions drop / > > end"] > > + res =3D self.create_fdir_rule(rule2) > > + self.verify(res[0], "create fdir rule failed, result %s" % res= ) > > + self.verify(not any(res[1:]), "created wrong fdir rule %s shou= ld fail" % > > rule2[1:]) > > + > > + def test_queue_group_wrong_parameters(self): > > + rule1 =3D "flow create 0 ingress pattern eth dst is 00:11:22:3= 3:44:55 / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 = / end actions > > rss queues 0 1 2 end / end" > > + rule2 =3D "flow create 0 ingress pattern eth dst is 00:11:22:3= 3:44:55 / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 = / end actions > > rss queues 0 end / end" > > + rule3 =3D "flow create 0 ingress pattern eth dst is 00:11:22:3= 3:44:55 / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 = / end actions > > rss queues 1 2 3 5 end / end" > > + rule4 =3D "flow create 0 ingress pattern eth dst is 00:11:22:3= 3:44:55 / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 = / end actions > > rss queues 63 64 end / end" > > + rule5 =3D "flow create 0 ingress pattern eth dst is 00:11:22:3= 3:44:55 / ipv4 > > src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions= rss queues 0 > > 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27= 28 29 30 > 31 > > 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55= 56 57 > 58 > > 59 60 61 62 63 end / end" > > + res =3D self.create_fdir_rule([rule1, rule2, rule3, rule4], ch= eck_stats=3DFalse) > > + self.dut.send_command("stop", timeout=3D1) > > + self.dut.send_command("port stop all", timeout=3D1) > > + self.dut.send_command("port config all rxq 32", timeout=3D1) > > + self.dut.send_command("port config all txq 32", timeout=3D2) > > + self.dut.send_command("port start all", timeout=3D1) > > + self.pmd_output.execute_cmd("start") > > + res =3D self.create_fdir_rule(rule5, check_stats=3DFalse) > > + self.dut.send_command("stop", timeout=3D1) > > + self.dut.send_command("port stop all", timeout=3D1) > > + self.dut.send_command("port config all rxq 64", timeout=3D1) > > + self.dut.send_command("port config all txq 64", timeout=3D2) > > + self.dut.send_command("port start all", timeout=3D1) > > + self.pmd_output.execute_cmd("start") > > + result =3D True > > + try: > > + self.create_fdir_rule(rule5, check_stats=3DTrue) > > + out =3D self.send_pkts_getouput(pkts=3DMAC_IPV4_PAY["match= "]) > > + rfc.check_queue(out, pkt_num=3Dlen(MAC_IPV4_PAY["match"]), > > check_param=3D{"port_id": 0, "queue": range(64)}) > > + out =3D self.send_pkts_getouput(pkts=3DMAC_IPV4_PAY["unmat= ch"]) > > + rfc.check_queue(out, pkt_num=3Dlen(MAC_IPV4_PAY["unmatch"]= ), > > check_param=3D{"port_id": 0, "queue": range(64)}) > > + except Exception as e: > > + result =3D False > > + print(RED("failed:" + str(e))) > > + finally: > > + # restore testpmd config to default, then verify results > > + self.config_testpmd() > > + self.verify(result, "check failed") > > + > > + def test_mac_ipv4_gtpu_ipv4_pay_teid_mark_count_query(self): > > + rule =3D "flow create 1 ingress pattern eth / ipv4 / udp / gtp= u teid is > > 0x12345678 / gtp_psc / ipv4 / end actions rss queues 0 1 2 3 4 5 6 7 8 = 9 10 11 12 > > 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36= 37 38 > 39 > > 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63= end / > > mark id 100 / count / end" > > + p_gtpu1 =3D 'Ether(src=3D"a4:bf:01:51:27:ca", dst=3D"00:00:00:= 00:01:03") / > > IP(src=3D"192.168.0.20", dst=3D"192.168.0.21") / UDP(dport=3D2152) / > > GTP_U_Header(gtp_type=3D255, teid=3D0x12345678) / > > GTP_PDUSession_ExtensionHeader(pdu_type=3D0, qos_flow=3D0x35) / IP() / > > Raw("x" * 20)' > > + p_gtpu2 =3D 'Ether(src=3D"a4:bf:01:51:27:ca", > > dst=3D"00:00:00:00:01:03")/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(dport=3D2152)/GTP_U_Header(gtp_type=3D255, > > teid=3D0x1234567)/GTP_PDUSession_ExtensionHeader(pdu_type=3D0, > > qos_flow=3D0x34)/IP()/UDP()/Raw("x"*20)' > > + # create fdir rule > > + rule_li =3D self.create_fdir_rule(rule, check_stats=3DTrue) > > + out =3D self.send_pkts_getouput(pkts=3Dp_gtpu1, port_id=3D1, m= ark=3DTrue) > > + check_param =3D {"port_id": 1, "queue": range(64), "mark_id": = 100} > > + rfc.check_mark(out, pkt_num=3D1, check_param=3Dcheck_param) > > + > > + out =3D self.send_pkts_getouput(pkts=3Dp_gtpu2, port_id=3D1, m= ark=3DTrue) > > + rfc.check_queue(out[1], pkt_num=3D1, check_param=3Dcheck_param= ) > > + mark_scanner =3D "FDIR matched ID=3D(0x\w+)" > > + res =3D re.search(mark_scanner, out[0]) > > + self.verify(not res, "FDIR should not in %s" % out[0]) > > + self.query_count(1, 1, 1, 0) > > + > > + self.check_fdir_rule(port_id=3D1, stats=3DTrue) > > + self.destroy_fdir_rule(port_id=3D1, rule_id=3Drule_li[0]) > > + # send matched packets > > + out =3D self.send_pkts_getouput(pkts=3Dp_gtpu1, port_id=3D1, m= ark=3DTrue) > > + rfc.check_queue(out[1], pkt_num=3D1, check_param=3Dcheck_param= , > > stats=3DTrue) > > + res =3D re.search(mark_scanner, out[0]) > > + self.verify(not res, "FDIR should not in %s" % out[0]) > > + self.check_fdir_rule(port_id=3D1, stats=3DFalse) > > + > > + def test_mac_ipv4_gtpu_ipv4_pay_qfi_mark_count_query(self): > > + rule =3D "flow create 1 ingress pattern eth / ipv4 / udp / gtp= u / gtp_psc qfi > > is 0x34 / ipv4 / end actions drop / mark id 3 / count / end" > > + p_gtpu1 =3D 'Ether(src=3D"a4:bf:01:51:27:ca", > > dst=3D"00:00:00:00:01:03")/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(dport=3D2152)/GTP_U_Header(gtp_type=3D255, > > teid=3D0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=3D0, > > qos_flow=3D0x34)/IP()/TCP()/Raw("x"*20)' > > + p_gtpu2 =3D 'Ether(src=3D"a4:bf:01:51:27:ca", > > dst=3D"00:00:00:00:01:03")/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(dport=3D2152)/GTP_U_Header(gtp_type=3D255, > > teid=3D0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=3D0, > > qos_flow=3D0x35)/IP()/Raw("x"*20)' > > + # create fdir rule > > + res =3D self.create_fdir_rule(rule, check_stats=3DTrue) > > + check_param =3D {"port_id": 1, "mark": True, "mark_id": 3} > > + # send matched packet > > + out =3D self.send_pkts_getouput(pkts=3Dp_gtpu1, port_id=3D1, m= ark=3DTrue) > > + rfc.check_mark(out, pkt_num=3D1, check_param=3Dcheck_param, > > stats=3DTrue) > > + # send unmatched packet > > + out1 =3D self.send_pkts_getouput(pkts=3Dp_gtpu2, port_id=3D1, = mark=3DTrue) > > + rfc.check_mark(out1, pkt_num=3D1, check_param=3Dcheck_param, > > stats=3DFalse) > > + self.query_count(1, 1, 1, 0) > > + self.check_fdir_rule(port_id=3D1, stats=3DTrue, rule_list=3Dre= s) > > + self.destroy_fdir_rule(port_id=3D1, rule_id=3D0) > > + # send matched packets > > + out =3D self.send_pkts_getouput(p_gtpu1, port_id=3D1, mark=3DT= rue) > > + rfc.check_mark(out, pkt_num=3D1, check_param=3D{"port_id": 1}, > > stats=3DFalse) > > + self.check_fdir_rule(port_id=3D1, stats=3DFalse) > > + > > + def test_mac_ipv4_gtpu_ipv4_pay_multirules(self): > > + rule1 =3D "flow create 0 ingress pattern eth / ipv4 / udp / gt= pu teid is > > 0x12345678 / gtp_psc qfi is 0x34 / ipv4 / end actions queue index 1 / e= nd" > > + rule2 =3D "flow create 0 ingress pattern eth / ipv4 / udp / gt= pu teid is > > 0x12345678 / gtp_psc qfi is 0x35 / ipv4 / end actions queue index 2 / e= nd" > > + rule3 =3D "flow create 0 ingress pattern eth / ipv4 / udp / gt= pu teid is > > 0x1234567 / gtp_psc qfi is 0x35 / ipv4 / end actions queue index 3 / en= d" > > + res =3D self.create_fdir_rule(rule=3D[rule1, rule2, rule3], ch= eck_stats=3DTrue) > > + rule4 =3D "flow create 0 ingress pattern eth / ipv4 / udp / gt= pu teid is > > 0x1234567 / gtp_psc qfi is 0x35 / ipv4 / end actions queue index 3 / en= d" > > + rule5 =3D "flow create 0 ingress pattern eth / ipv4 / udp / gt= pu teid is > > 0x1234567 / gtp_psc qfi is 0x35 / ipv4 / end actions queue index 4 / en= d" > > + rule6 =3D "flow create 0 ingress pattern eth / ipv4 / udp / gt= pu teid is > > 0x1234567 / gtp_psc qfi is 0x75 / ipv4 / end actions queue index 4 / en= d" > > + res2 =3D self.create_fdir_rule(rule=3D[rule4, rule5, rule6], c= heck_stats=3DFalse) > > + rule7 =3D "flow create 0 ingress pattern eth / ipv4 / udp / gt= pu teid is > > 0x1234567 / gtp_psc qfi is 0x34 / ipv4 / end actions queue index 3 / en= d" > > + res3 =3D self.create_fdir_rule(rule7, check_stats=3DTrue) > > + p_gtpu1 =3D 'Ether(src=3D"a4:bf:01:51:27:ca", > > dst=3D"00:00:00:00:01:03")/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(dport=3D2152)/GTP_U_Header(gtp_type=3D255, > > teid=3D0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=3D0, > > qos_flow=3D0x34)/IP()/Raw("x"*20)' > > + p_gtpu2 =3D 'Ether(src=3D"a4:bf:01:51:27:ca", > > dst=3D"00:00:00:00:01:03")/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(dport=3D2152)/GTP_U_Header(gtp_type=3D255, > > teid=3D0x1234567)/GTP_PDUSession_ExtensionHeader(pdu_type=3D0, > > qos_flow=3D0x34)/IP()/Raw("x"*20)' > > + p_gtpu3 =3D 'Ether(src=3D"a4:bf:01:51:27:ca", > > dst=3D"00:00:00:00:01:03")/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(dport=3D2152)/GTP_U_Header(gtp_type=3D255, > > teid=3D0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=3D0, > > qos_flow=3D0x35)/IP()/Raw("x"*20)' > > + p_gtpu4 =3D 'Ether(src=3D"a4:bf:01:51:27:ca", > > dst=3D"00:00:00:00:01:03")/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(dport=3D2152)/GTP_U_Header(gtp_type=3D255, > > teid=3D0x1234567)/GTP_PDUSession_ExtensionHeader(pdu_type=3D0, > > qos_flow=3D0x35)/IP()/Raw("x"*20)' > > + p_gtpu5 =3D 'Ether(src=3D"a4:bf:01:51:27:ca", > > dst=3D"00:00:00:00:01:03")/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(dport=3D2152)/GTP_U_Header(gtp_type=3D255, > > teid=3D0x1234567)/GTP_PDUSession_ExtensionHeader(pdu_type=3D0, > > qos_flow=3D0x36)/IP()/Raw("x"*20)' > > + out1 =3D self.send_pkts_getouput(p_gtpu1) > > + rfc.check_queue(out1, pkt_num=3D1, check_param=3D{"queue": 1}) > > + out2 =3D self.send_pkts_getouput(p_gtpu2) > > + rfc.check_queue(out2, pkt_num=3D1, check_param=3D{"queue": 3}) > > + out3 =3D self.send_pkts_getouput(p_gtpu3) > > + rfc.check_queue(out3, pkt_num=3D1, check_param=3D{"queue": 2}) > > + out4 =3D self.send_pkts_getouput(p_gtpu4) > > + rfc.check_queue(out4, pkt_num=3D1, check_param=3D{"queue": 3}) > > + out5 =3D self.send_pkts_getouput(p_gtpu5) > > + rfc.check_queue(out5, pkt_num=3D1, check_param=3D{"queue": [1,= 2, 3]}, > > stats=3DFalse) > > + res.extend(res3) > > + self.check_fdir_rule(port_id=3D0, stats=3DTrue, rule_list=3Dre= s) > > + self.dut.send_command("flow flush 0", timeout=3D1) > > + out1 =3D self.send_pkts_getouput(p_gtpu1) > > + rfc.check_queue(out1, pkt_num=3D1, check_param=3D{"queue": 1}, > > stats=3DFalse) > > + out2 =3D self.send_pkts_getouput(p_gtpu2) > > + rfc.check_queue(out2, pkt_num=3D1, check_param=3D{"queue": 3}, > > stats=3DFalse) > > + out3 =3D self.send_pkts_getouput(p_gtpu3) > > + rfc.check_queue(out3, pkt_num=3D1, check_param=3D{"queue": 2}, > > stats=3DFalse) > > + out4 =3D self.send_pkts_getouput(p_gtpu4) > > + rfc.check_queue(out4, pkt_num=3D1, check_param=3D{"queue": 3}, > > stats=3DFalse) > > + > > + def test_mac_ipv4_gtpu_ipv4_pay_two_ports(self): > > + rule1 =3D 'flow create 0 ingress pattern eth / ipv4 / udp / gt= pu teid is > > 0x12345678 / gtp_psc qfi is 0x34 / ipv4 / end actions queue index 1 / e= nd' > > + rule2 =3D 'flow create 1 ingress pattern eth / ipv4 / udp / gt= pu teid is > > 0x12345678 / gtp_psc qfi is 0x34 / ipv4 / end actions queue index 1 / e= nd' > > + rule3 =3D 'flow create 0 ingress pattern eth / ipv4 / udp / gt= pu teid is > > 0x12345678 / gtp_psc qfi is 0x35 / ipv4 / end actions queue index 2 / e= nd' > > + rule4 =3D 'flow create 1 ingress pattern eth / ipv4 / udp / gt= pu teid is > > 0x12345678 / gtp_psc qfi is 0x35 / ipv4 / end actions queue index 3 / e= nd' > > + rule5 =3D 'flow create 0 ingress pattern eth / ipv4 / udp / gt= pu teid is > > 0x12345678 / gtp_psc qfi is 0x34 / ipv4 / end actions queue index 1 / e= nd' > > + rule6 =3D 'flow create 1 ingress pattern eth / ipv4 / udp / gt= pu teid is > > 0x12345678 / gtp_psc / ipv4 / end actions queue index 2 / end' > > + > > + p_gtpu1 =3D 'Ether(src=3D"a4:bf:01:51:27:ca", > > dst=3D"00:00:00:00:01:03")/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(dport=3D2152)/GTP_U_Header(gtp_type=3D255, > > teid=3D0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=3D0, > > qos_flow=3D0x34)/IP()/Raw("x"*20)' > > + p_gtpu2 =3D 'Ether(src=3D"a4:bf:01:51:27:ca", > > dst=3D"00:00:00:00:01:03")/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(dport=3D2152)/GTP_U_Header(gtp_type=3D255, > > teid=3D0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=3D0, > > qos_flow=3D0x35)/IP()/Raw("x"*20)' > > + p_gtpu3 =3D 'Ether(src=3D"a4:bf:01:51:27:ca", > > dst=3D"00:00:00:00:01:03")/IP(src=3D"192.168.0.20", > > dst=3D"192.168.0.21")/UDP(dport=3D2152)/GTP_U_Header(gtp_type=3D255, > > teid=3D0x12345678)/GTP_PDUSession_ExtensionHeader(pdu_type=3D0, > > qos_flow=3D0x35)/IP()/Raw("x"*20)' > > + res1 =3D self.create_fdir_rule([rule1, rule2], check_stats=3DT= rue) > > + out1 =3D self.send_pkts_getouput(p_gtpu1) > > + rfc.check_queue(out1, pkt_num=3D1, check_param=3D{"queue": 1}) > > + out2 =3D self.send_pkts_getouput(p_gtpu1, port_id=3D1) > > + rfc.check_queue(out2, pkt_num=3D1, check_param=3D{"port_id": 1= , > > "queue": 1}) > > + > > + res2 =3D self.create_fdir_rule([rule3, rule4], check_stats=3DT= rue) > > + out1 =3D self.send_pkts_getouput(p_gtpu2) > > + rfc.check_queue(out1, pkt_num=3D1, check_param=3D{"queue": 2}) > > + out2 =3D self.send_pkts_getouput(p_gtpu2, port_id=3D1) > > + rfc.check_queue(out2, pkt_num=3D1, check_param=3D{"port_id": 1= , > > "queue": 3}) > > + > > + self.dut.send_command("flow flush 0", timeout=3D1) > > + self.dut.send_command("flow flush 1", timeout=3D1) > > + > > + res3 =3D self.create_fdir_rule([rule5, rule6]) > > + self.verify(all(res3), "rules should be create seccess, result= is %s" % res3) > > + out1 =3D self.send_pkts_getouput(p_gtpu3) > > + rfc.check_queue(out1, pkt_num=3D1, check_param=3D{"queue": 1}, > > stats=3DFalse) > > + out2 =3D self.send_pkts_getouput(p_gtpu3, port_id=3D1) > > + rfc.check_queue(out2, pkt_num=3D1, check_param=3D{"port_id": 1= , > > "queue": 2}, stats=3DTrue) > > + > > + self.check_fdir_rule(port_id=3D0, rule_list=3Dres3[0]) > > + self.check_fdir_rule(port_id=3D1, rule_list=3Dres3[1]) > > + > > + self.destroy_fdir_rule(0, 0) > > + self.destroy_fdir_rule(1, 0) > > + > > + out1 =3D self.send_pkts_getouput([p_gtpu1, p_gtpu2]) > > + rfc.check_queue(out1, pkt_num=3D2, check_param=3D{"port_id": 0= , > > "queue": [1, 2]}, stats=3DFalse) > > + out2 =3D self.send_pkts_getouput([p_gtpu1, p_gtpu2, p_gtpu3], > > port_id=3D1) > > + rfc.check_queue(out2, pkt_num=3D3, check_param=3D{"port_id": 1= , > > "queue": [1, 2, 3]}, stats=3DFalse) > > + > > + self.check_fdir_rule(0, stats=3DFalse) > > + self.check_fdir_rule(1, stats=3DFalse) > > + > > + def test_mac_ipv4_gtpu_ipv4_pay_wrong_parameters(self): > > + rule1 =3D 'flow create 0 ingress pattern eth / ipv4 / udp / gt= pu teid is > > 0x12345678 / gtp_psc qfi is 0x100 / ipv4 / end actions queue index 1 / = end' > > + rule2 =3D 'flow create 0 ingress pattern eth / ipv4 / udp / gt= pu teid is > > 0x100000000 / gtp_psc qfi is 0x5 / ipv4 / end actions queue index 2 / e= nd' > > + self.create_fdir_rule([rule1, rule2], check_stats=3DFalse) > > + self.check_fdir_rule(0, stats=3DFalse) > > + > > + def test_count_query_identifier_share(self): > > + rule1 =3D 'flow create 0 ingress pattern eth / ipv4 src is 192= .168.0.1 / end > > actions queue index 1 / count identifier 0x1234 shared on / end' > > + rule2 =3D 'flow create 0 ingress pattern eth / ipv4 src is 192= .168.0.2 / end > > actions queue index 2 / count identifier 0x1234 shared on / end' > > + rule3 =3D 'flow create 0 ingress pattern eth / ipv4 src is 192= .168.0.3 / end > > actions queue index 3 / count identifier 0x1234 shared off / end' > > + rule4 =3D 'flow create 0 ingress pattern eth / ipv4 src is 192= .168.0.4 / end > > actions queue index 4 / count identifier 0x1234 / end' > > + rule5 =3D 'flow create 0 ingress pattern eth / ipv4 src is 192= .168.0.5 / end > > actions queue index 5 / count shared on / end' > > + rule6 =3D 'flow create 0 ingress pattern eth / ipv4 src is 192= .168.0.6 / end > > actions drop / count shared on / end' > > + rule7 =3D 'flow create 0 ingress pattern eth / ipv4 src is 192= .168.0.7 / end > > actions drop / count identifier 0x1235 shared on / end' > > + > > + pkt1 =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.1",dst=3D"192.168= .0.21") / > > Raw("x" * 80)' > > + pkt2 =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.2",dst=3D"192.168= .0.21") / > > Raw("x" * 80)' > > + pkt3 =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.3",dst=3D"192.168= .0.21") / > > Raw("x" * 80)' > > + pkt4 =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.4",dst=3D"192.168= .0.21") / > > Raw("x" * 80)' > > + pkt5 =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.5",dst=3D"192.168= .0.21") / > > Raw("x" * 80)' > > + pkt6 =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.6",dst=3D"192.168= .0.21") / > > Raw("x" * 80)' > > + pkt7 =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.7",dst=3D"192.168= .0.21") / > > Raw("x" * 80)' > > + > > + res =3D self.create_fdir_rule([rule1, rule2, rule3, rule4, rul= e5, rule6, rule7]) > > + self.verify(all(res), "create rules failed, result: %s" % res) > > + out1 =3D self.send_pkts_getouput(pkt1, count=3D10) > > + rfc.check_queue(out1, pkt_num=3D10, check_param=3D{"queue": 1}= , > > stats=3DTrue) > > + out2 =3D self.send_pkts_getouput(pkt2, count=3D10) > > + rfc.check_queue(out2, pkt_num=3D10, check_param=3D{"queue": 2}= , > > stats=3DTrue) > > + out3 =3D self.send_pkts_getouput(pkt3, count=3D10) > > + rfc.check_queue(out3, pkt_num=3D10, check_param=3D{"queue": 3}= , > > stats=3DTrue) > > + out4 =3D self.send_pkts_getouput(pkt4, count=3D10) > > + rfc.check_queue(out4, pkt_num=3D10, check_param=3D{"queue": 4}= , > > stats=3DTrue) > > + out5 =3D self.send_pkts_getouput(pkt5, count=3D10) > > + rfc.check_queue(out5, pkt_num=3D10, check_param=3D{"queue": 5}= , > > stats=3DTrue) > > + out6 =3D self.send_pkts_getouput(pkt6, count=3D10) > > + rfc.check_drop(out6, pkt_num=3D10, check_param=3D{"port_id": 0= }) > > + out7 =3D self.send_pkts_getouput(pkt7, count=3D10) > > + rfc.check_drop(out7, pkt_num=3D10, check_param=3D{"port_id": 0= }) > > + > > + self.query_count(1, 20, 0, 0) > > + self.query_count(1, 20, 0, 1) > > + self.query_count(1, 10, 0, 2) > > + self.query_count(1, 10, 0, 3) > > + self.query_count(1, 20, 0, 4) > > + self.query_count(1, 20, 0, 5) > > + self.query_count(1, 10, 0, 6) > > + > > + self.check_fdir_rule(0, stats=3DTrue, rule_list=3Dres) > > + self.dut.send_command("flow flush 0", timeout=3D1) > > + out =3D self.send_pkts_getouput(pkts=3D[pkt1, pkt2, pkt3, pkt4= , pkt5]) > > + rfc.check_queue(out, pkt_num=3D5, check_param=3D{"port_id": 0, > > "queue": range(1, 6)}, stats=3DFalse) > > + out6 =3D self.send_pkts_getouput(pkt6, count=3D10) > > + rfc.check_drop(out6, pkt_num=3D10, check_param=3D{"port_id": 0= }, > > stats=3DFalse) > > + out7 =3D self.send_pkts_getouput(pkt7, count=3D10) > > + rfc.check_drop(out7, pkt_num=3D10, check_param=3D{"port_id": 0= }, > > stats=3DFalse) > > + > > + self.check_fdir_rule(stats=3DFalse) > > + > > + def test_multi_patterns_count_query(self): > > + rule1 =3D 'flow create 0 ingress pattern eth / ipv4 dst is 192= .168.0.21 / tcp > > src is 22 dst is 23 / end actions queue index 1 / count / end' > > + rule2 =3D 'flow create 0 ingress pattern eth / ipv4 dst is 192= .168.0.21 / udp > > src is 22 dst is 23 / end actions drop / count / end' > > + rule3 =3D 'flow create 0 ingress pattern eth / ipv4 dst is 192= .168.0.21 / sctp > > src is 22 dst is 23 / end actions rss queues 62 63 end / count / end' > > + rule4 =3D 'flow create 0 ingress pattern eth / ipv6 dst is > > CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 / end actions qu= eue > > index 1 / count / end' > > + rule5 =3D 'flow create 0 ingress pattern eth / ipv4 / udp / vx= lan / ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 / udp src is 22 dst is 23 / end action= s queue > > index 3 / count / end' > > + rule6 =3D 'flow create 0 ingress pattern eth / ipv4 / udp / vx= lan / eth / ipv4 > > src is 192.168.0.20 / tcp dst is 23 / end actions queue index 4 / count= / end' > > + rule7 =3D 'flow create 0 ingress pattern eth / ipv4 / udp / vx= lan / ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 / sctp src is 22 dst is 23 / end actio= ns queue > > index 5 / count / end' > > + > > + pkt1 =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21") > > /TCP(sport=3D22, dport=3D23)/ Raw("x" * 80)' > > + pkt2 =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21") > > /UDP(sport=3D22, dport=3D23)/ Raw("x" * 80)' > > + pkt3 =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21") > > /SCTP(sport=3D22, dport=3D23)/ Raw("x" * 80)' > > + pkt4 =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2", nh=3D1, tc=3D1, hlim=3D2)/("X"*480)' > > + pkt5 =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP(dport=3D4790)/VXLAN(flags=3D= 0xc)/IP( > > dst=3D"192.168.0.21", src=3D"192.168.0.20")/UDP(sport=3D22,dport=3D23)/= ("X"*480)' > > + pkt6 =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP()/VXLAN(vni=3D2)/Ether(dst= =3D"00:11: > > 22:33:44:55")/IP(src=3D"192.168.0.20")/TCP(dport=3D23)/("X"*480)' > > + pkt7 =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP()/VXLAN(vni=3D2)/Ether()/IP(= src=3D"19 > > 2.168.0.20", dst=3D"192.168.0.21")/SCTP(sport=3D22,dport=3D23)/("X"*480= )' > > + > > + res =3D self.create_fdir_rule(rule=3D[rule1, rule2, rule3, rul= e4, rule5, rule6, > > rule7], check_stats=3DTrue) > > + self.verify(all(res), "create rules failed, result %s" % res) > > + out =3D self.send_pkts_getouput(pkts=3Dpkt1, count=3D10) > > + rfc.check_queue(out, pkt_num=3D10, check_param=3D{"queue": 1}, > > stats=3DTrue) > > + out =3D self.send_pkts_getouput(pkts=3Dpkt2, count=3D10) > > + rfc.check_drop(out, pkt_num=3D10, check_param=3D{"port_id": 0}= ) > > + out =3D self.send_pkts_getouput(pkts=3Dpkt3, count=3D10) > > + rfc.check_queue(out, pkt_num=3D10, check_param=3D{"queue": [62= , 63]}, > > stats=3DTrue) > > + out =3D self.send_pkts_getouput(pkts=3Dpkt4, count=3D10) > > + rfc.check_queue(out, pkt_num=3D10, check_param=3D{"queue": 1}, > > stats=3DTrue) > > + out =3D self.send_pkts_getouput(pkts=3Dpkt5, count=3D10) > > + rfc.check_queue(out, pkt_num=3D10, check_param=3D{"queue": 3}, > > stats=3DTrue) > > + out =3D self.send_pkts_getouput(pkts=3Dpkt6, count=3D10) > > + rfc.check_queue(out, pkt_num=3D10, check_param=3D{"queue": 4}, > > stats=3DTrue) > > + out =3D self.send_pkts_getouput(pkts=3Dpkt7, count=3D10) > > + rfc.check_queue(out, pkt_num=3D10, check_param=3D{"queue": 5}, > > stats=3DTrue) > > + > > + for i in range(7): > > + self.query_count(1, 10, port_id=3D0, rule_id=3Di) > > + self.check_fdir_rule(port_id=3D0, stats=3DTrue, rule_list=3Dre= s) > > + > > + self.dut.send_command("flow flush 0", timeout=3D1) > > + out =3D self.send_pkts_getouput(pkts=3Dpkt1, count=3D10) > > + rfc.check_queue(out, pkt_num=3D10, check_param=3D{"queue": 1}, > > stats=3DFalse) > > + out =3D self.send_pkts_getouput(pkts=3Dpkt2, count=3D10) > > + rfc.check_drop(out, pkt_num=3D10, check_param=3D{"port_id": 0}= , > > stats=3DFalse) > > + out =3D self.send_pkts_getouput(pkts=3Dpkt3, count=3D1) > > + rfc.check_queue(out, pkt_num=3D1, check_param=3D{"queue": [62,= 63]}, > > stats=3DFalse) > > + out =3D self.send_pkts_getouput(pkts=3D[pkt4, pkt5, pkt6, pkt7= ], count=3D1) > > + rfc.check_queue(out, pkt_num=3D4, check_param=3D{"queue": [1, = 3, 4, 5]}, > > stats=3DFalse) > > + self.check_fdir_rule(stats=3DFalse) > > + > > + def test_two_ports_multi_patterns_count_query(self): > > + rules =3D [ > > + 'flow create 1 ingress pattern eth / ipv4 dst is 192.168.0= .21 proto is 255 > > tos is 4 / end actions queue index 1 / count / end', > > + 'flow create 1 ingress pattern eth / ipv6 dst is > > CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1= / sctp > > src is 22 dst is 23 / end actions rss queues 6 7 end / count / end', > > + 'flow create 1 ingress pattern eth / ipv6 dst is > > CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1= / udp > > src is 22 dst is 23 / end actions rss queues 6 7 end / count / end', > > + 'flow create 1 ingress pattern eth / ipv6 dst is > > CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 hop is 2 tc is 1= / tcp > > src is 22 dst is 23 / end actions queue index 2 / count / end', > > + 'flow create 1 ingress pattern eth / ipv4 / udp / vxlan / = ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 / end actions drop / count / end', > > + 'flow create 0 ingress pattern eth / ipv4 dst is 192.168.0= .21 tos is 4 / tcp > > src is 22 dst is 23 / end actions drop / count / end', > > + 'flow create 0 ingress pattern eth / ipv6 dst is > > CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 / end actions qu= eue > > index 1 / count / end' > > + ] > > + pkts =3D [ > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > proto=3D255, ttl=3D2, tos=3D4) / Raw("x" * 80)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D2)/SCTP(sport=3D22,dport=3D23= )/("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D2)/UDP(sport=3D22,dport=3D23)= /("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2",tc=3D1, hlim=3D2)/TCP(sport=3D22,dport=3D23)= /("X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IP()/UDP()/VXLAN()/Ether()/IP(src=3D"= 192.168 > > .0.20", dst=3D"192.168.0.21")/("X"*480)', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP(dst=3D"192.168.0.21",= ttl=3D2, > > tos=3D4)/TCP(sport=3D22,dport=3D23)/Raw(load=3D"X"*480)', > > + > > 'Ether(dst=3D"00:11:22:33:44:55")/IPv6(dst=3D"CDCD:910A:2222:5498:8475:= 1111:3 > > 900:2020", src=3D"2001::2", nh=3D1, tc=3D1, hlim=3D2)/("X"*480)', > > + 'Ether(dst=3D"00:11:22:33:44:55")/IP(dst=3D"192.168.0.21",= ttl=3D2, > > tos=3D4)/TCP(sport=3D22,dport=3D23)/Raw(load=3D"X"*480)' > > + ] > > + res =3D self.create_fdir_rule(rule=3Drules, check_stats=3DTrue= ) > > + out =3D self.send_pkts_getouput(pkts[0], port_id=3D1, count=3D= 10) > > + rfc.check_queue(out, pkt_num=3D10, check_param=3D{"port_id": 1= , > > "queue": 1}, stats=3DTrue) > > + out =3D self.send_pkts_getouput(pkts[1:3], port_id=3D1, count= =3D10) > > + rfc.check_queue(out, pkt_num=3D20, check_param=3D{"port_id": 1= , > > "queue": [6, 7]}, stats=3DTrue) > > + out =3D self.send_pkts_getouput(pkts[3], port_id=3D1, count=3D= 10) > > + rfc.check_queue(out, pkt_num=3D10, check_param=3D{"port_id": 1= , > > "queue": 2}, stats=3DTrue) > > + out =3D self.send_pkts_getouput(pkts[4], port_id=3D1, count=3D= 10) > > + rfc.check_drop(out, pkt_num=3D10, check_param=3D{"port_id": 1}= ) > > + out =3D self.send_pkts_getouput(pkts[5], count=3D10) > > + rfc.check_drop(out, pkt_num=3D10, check_param=3D{"port_id": 0}= ) > > + out =3D self.send_pkts_getouput(pkts[6], count=3D10) > > + rfc.check_queue(out, pkt_num=3D10, check_param=3D{"port_id": 0= , > > "queue": 1}, stats=3DTrue) > > + out =3D self.send_pkts_getouput(pkts[7], port_id=3D1, count=3D= 10) > > + rfc.check_drop(out, pkt_num=3D10, check_param=3D{"port_id": 1}= , > > stats=3DFalse) > > + > > + for i in range(5): > > + self.query_count(1, 10, 1, i) > > + for i in range(2): > > + self.query_count(1, 10, 0, i) > > + self.check_fdir_rule(port_id=3D0, stats=3DTrue, rule_list=3Dre= s[0:2]) > > + self.check_fdir_rule(port_id=3D1, stats=3DTrue, rule_list=3Dre= s[2:]) > > + > > + self.dut.send_command("flow flush 0", timeout=3D1) > > + self.dut.send_command("flow flush 1", timeout=3D1) > > + > > + out =3D self.send_pkts_getouput(pkts[0], port_id=3D1, count=3D= 10) > > + rfc.check_queue(out, pkt_num=3D10, check_param=3D{"port_id": 1= , > > "queue": 1}, stats=3DFalse) > > + out =3D self.send_pkts_getouput(pkts[1:3], port_id=3D1, count= =3D10) > > + rfc.check_queue(out, pkt_num=3D20, check_param=3D{"port_id": 1= , > > "queue": [6, 7]}, stats=3DFalse) > > + out =3D self.send_pkts_getouput(pkts[3], port_id=3D1, count=3D= 10) > > + rfc.check_queue(out, pkt_num=3D10, check_param=3D{"port_id": 1= , > > "queue": 2}, stats=3DFalse) > > + out =3D self.send_pkts_getouput(pkts[4], port_id=3D1, count=3D= 10) > > + rfc.check_drop(out, pkt_num=3D10, check_param=3D{"port_id": 1}= , > > stats=3DFalse) > > + out =3D self.send_pkts_getouput(pkts[5], count=3D10) > > + rfc.check_drop(out, pkt_num=3D10, check_param=3D{"port_id": 0}= , > > stats=3DFalse) > > + out =3D self.send_pkts_getouput(pkts[6], count=3D10) > > + rfc.check_queue(out, pkt_num=3D10, check_param=3D{"port_id": 0= , > > "queue": 1}, stats=3DFalse) > > + out =3D self.send_pkts_getouput(pkts[7], port_id=3D0, count=3D= 10) > > + rfc.check_drop(out, pkt_num=3D10, check_param=3D{"port_id": 0}= , > > stats=3DFalse) > > + self.check_fdir_rule(0, stats=3DFalse) > > + self.check_fdir_rule(1, stats=3DFalse) > > + > > + def test_multirules_mark(self): > > + rules =3D [ > > + "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst = is 23 / end > > actions queue index 1 / mark id 1 / end", > > + "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / tcp src is 22 dst = is 23 / end > > actions queue index 2 / mark id 1 / end", > > + "flow create 0 ingress pattern eth dst is 00:11:22:33:44:5= 5 / ipv4 src is > > 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / sctp src is 22 dst= is 23 / end > > actions queue index 1 / mark id 2 / count / end"] > > + > > + pkt1 =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /UDP(sport=3D22,dport=3D23)/Raw("x" * 80)' > > + pkt2 =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /TCP(sport=3D22,dport=3D23)/Raw("x" * 80)' > > + pkt3 =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21", > > ttl=3D2, tos=3D4) /SCTP(sport=3D22,dport=3D23)/Raw("x" * 80)' > > + > > + res =3D self.create_fdir_rule(rules, check_stats=3DTrue) > > + > > + out1 =3D self.send_pkts_getouput(pkt1, mark=3DTrue) > > + rfc.check_mark(out1, pkt_num=3D1, check_param=3D{"port_id": 0, > > "mark_id": 1, "queue": 1}, stats=3DTrue) > > + > > + out2 =3D self.send_pkts_getouput(pkt2, mark=3DTrue) > > + rfc.check_mark(out2, pkt_num=3D1, check_param=3D{"port_id": 0, > > "mark_id": 1, "queue": 2}, stats=3DTrue) > > + > > + out3 =3D self.send_pkts_getouput(pkt3, mark=3DTrue) > > + rfc.check_mark(out3, pkt_num=3D1, check_param=3D{"port_id": 0, > > "mark_id": 2, "queue": 1}, stats=3DTrue) > > + > > + self.query_count(1, 1, port_id=3D0, rule_id=3D2) > > + self.check_fdir_rule(0, stats=3DTrue, rule_list=3Dres) > > + self.destroy_fdir_rule(port_id=3D0, rule_id=3D0) > > + > > + out1 =3D self.send_pkts_getouput(pkt1, mark=3DTrue) > > + rfc.check_mark(out1, pkt_num=3D1, check_param=3D{"port_id": 0, > > "mark_id": 1, "queue": 1}, stats=3DFalse) > > + > > + self.check_fdir_rule(0, stats=3DTrue, rule_list=3Dres[1:]) > > + out2 =3D self.send_pkts_getouput(pkt2, mark=3DTrue) > > + rfc.check_mark(out2, pkt_num=3D1, check_param=3D{"port_id": 0, > > "mark_id": 1, "queue": 2}, stats=3DTrue) > > + > > + out3 =3D self.send_pkts_getouput(pkt3, mark=3DTrue) > > + rfc.check_mark(out3, pkt_num=3D1, check_param=3D{"port_id": 0, > > "mark_id": 2, "queue": 1}, stats=3DTrue) > > + > > + self.query_count(1, 2, port_id=3D0, rule_id=3D2) > > + self.dut.send_command("flow flush 0", timeout=3D1) > > + > > + out1 =3D self.send_pkts_getouput(pkt1, mark=3DTrue) > > + rfc.check_mark(out1, pkt_num=3D1, check_param=3D{"port_id": 0, > > "mark_id": 1, "queue": 1}, stats=3DFalse) > > + > > + out2 =3D self.send_pkts_getouput(pkt2, mark=3DTrue) > > + rfc.check_mark(out2, pkt_num=3D1, check_param=3D{"port_id": 0, > > "mark_id": 1, "queue": 2}, stats=3DFalse) > > + > > + out3 =3D self.send_pkts_getouput(pkt3, mark=3DTrue) > > + rfc.check_mark(out3, pkt_num=3D1, check_param=3D{"port_id": 0, > > "mark_id": 2, "queue": 1}, stats=3DFalse) > > + > > + self.check_fdir_rule(stats=3DFalse) > > + > > + def test_mark_wrong_parameters(self): > > + rule =3D "flow create 0 ingress pattern eth dst is 00:11:22:33= :44:55 / ipv4 > > src is 192.168.0.20 / end actions queue index 1 / mark id 4294967296 / = end" > > + self.create_fdir_rule(rule=3Drule, check_stats=3DFalse) > > + self.check_fdir_rule(stats=3DFalse) > > + > > + def test_pattern_conflict_flow(self): > > + rule1 =3D "flow create 0 ingress pattern eth / ipv4 dst is 192= .168.0.21 / end > > actions queue index 1 / end" > > + self.create_fdir_rule(rule=3Drule1, check_stats=3DTrue) > > + pkt1 =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21")/Ra > > w("x" * 80)' > > + pkt2 =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.0.20",dst=3D"192.16= 8.0.21") > > /UDP(sport=3D22, dport=3D23)/ Raw("x" * 80)' > > + out1 =3D self.send_pkts_getouput(pkts=3D[pkt1, pkt2]) > > + rfc.check_queue(out1, pkt_num=3D2, check_param=3D{"port_id": 0= , > > "queue": 1}, stats=3DTrue) > > + > > + rule2 =3D "flow create 0 ingress pattern eth / ipv4 dst is 192= .168.0.21 / udp > > src is 22 dst is 23 / end actions queue index 2 / end" > > + self.create_fdir_rule(rule=3Drule2, check_stats=3DTrue) > > + out2 =3D self.send_pkts_getouput(pkt1) > > + rfc.check_queue(out2, pkt_num=3D1, check_param=3D{"port_id": 0= , > > "queue": 1}, stats=3DTrue) > > + > > + out3 =3D self.send_pkts_getouput(pkt2) > > + rfc.check_queue(out3, pkt_num=3D1, check_param=3D{"port_id": 0= , > > "queue": 2}, stats=3DTrue) > > + > > + self.dut.send_command("flow flush 0", timeout=3D1) > > + > > + self.create_fdir_rule(rule=3Drule2, check_stats=3DTrue) > > + out4 =3D self.send_pkts_getouput(pkt2) > > + rfc.check_queue(out4, pkt_num=3D1, check_param=3D{"port_id": 0= , > > "queue": 2}, stats=3DTrue) > > + > > + self.create_fdir_rule(rule=3Drule1, check_stats=3DTrue) > > + out5 =3D self.send_pkts_getouput(pkt2) > > + rfc.check_queue(out5, pkt_num=3D1, check_param=3D{"port_id": 0= , > > "queue": 1}, stats=3DTrue) > > + > > + def test_max_count(self): > > + pattern =3D "flow create 0 ingress pattern eth / ipv4 src is 1= 92.168.0.{} / > > end actions drop / count / end" > > + rules =3D [pattern.format(i) for i in range(1, 256)] + [ > > + "flow create 0 ingress pattern eth / ipv4 src is 192.168.1= .1 / end actions > > drop / count / end"] > > + res =3D self.create_fdir_rule(rules, check_stats=3DTrue) > > + > > + rule2 =3D 'flow create 0 ingress pattern eth / ipv4 src is 192= .168.1.2 / end > > actions drop / count / end' > > + res2 =3D self.create_fdir_rule(rule2, check_stats=3DFalse) > > + > > + pkt =3D > > 'Ether(dst=3D"00:11:22:33:44:55")/IP(src=3D"192.168.1.1",dst=3D"192.168= .0.21") / > > Raw("x" * 80)' > > + out =3D self.send_pkts_getouput(pkt, count=3D10) > > + rfc.check_drop(out, pkt_num=3D10, check_param=3D{"port_id": 0}= , > > stats=3DTrue) > > + self.query_count(1, 10, port_id=3D0, rule_id=3D255) > > + self.check_fdir_rule(0, stats=3DTrue, rule_list=3Dres) > > + self.dut.send_command("flow flush 0", timeout=3D1) > > + out =3D self.send_pkts_getouput(pkt, count=3D10) > > + rfc.check_drop(out, pkt_num=3D10, check_param=3D{"port_id": 0}= , > > stats=3DFalse) > > + self.check_fdir_rule(stats=3DFalse) > > + self.dut.send_command("stop", timeout=3D2) > > + self.dut.send_command("quit", timeout=3D2) > > + self.launch_testpmd_with_mark() > > + > > + def tear_down(self): > > + # destroy all flow rule on port 0 > > + self.dut.send_command("flow flush 0", timeout=3D1) > > + self.dut.send_command("flow flush 1", timeout=3D1) > > + self.dut.send_command("clear port stats all", timeout=3D1) > > + self.pmd_output.execute_cmd("stop") > > + > > + def tear_down_all(self): > > + self.dut.kill_all() > > -- > > 1.8.3.1