From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 23CB81B561 for ; Sun, 23 Dec 2018 08:10:46 +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 orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Dec 2018 23:10:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,386,1539673200"; d="scan'208";a="109457940" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga007.fm.intel.com with ESMTP; 22 Dec 2018 23:10:44 -0800 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sat, 22 Dec 2018 23:10:45 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sat, 22 Dec 2018 23:10:44 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.201]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.59]) with mapi id 14.03.0415.000; Sun, 23 Dec 2018 15:10:42 +0800 From: "Tu, Lijuan" To: "Li, WenjieX A" , "dts@dpdk.org" CC: "Li, WenjieX A" Thread-Topic: [dts] [PATCH V2 2/2] add new testplan metering_and_policing Thread-Index: AQHUkd0BEcIjpVRq00ubZikFYHbN8KWL+KdQ Date: Sun, 23 Dec 2018 07:10:42 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0B9E5E8B@SHSMSX101.ccr.corp.intel.com> References: <1544593312-26122-1-git-send-email-wenjiex.a.li@intel.com> <1544593312-26122-2-git-send-email-wenjiex.a.li@intel.com> In-Reply-To: <1544593312-26122-2-git-send-email-wenjiex.a.li@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.0.400.15 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzQxN2QwZTctOTJkNS00ODkwLWI3ZjctYjM3ZmJjYjZjMWJkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoid3BWdW90OGdncjZ3bGp1V29Na1hKbjNsdkxEZlwveEJYbTFpNnhzZEc1VklMRFRwUmVvSHVqdGlKbzFXNjFQQ1UifQ== x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V2 2/2] add new testplan metering_and_policing 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: , X-List-Received-Date: Sun, 23 Dec 2018 07:10:48 -0000 Format is not right. Here are some errors or warning examples: * Errors while applying patch: Applying: add new testplan metering_and_policing .git/rebase-apply/patch:106: trailing whitespace. So when the payload is 460 bytes, the IP packet is 500 bytes. .git/rebase-apply/patch:107: trailing whitespace. .git/rebase-apply/patch:405: trailing whitespace. so the first flow rule will not take effect, just the last one can take eff= ect. .git/rebase-apply/patch:587: trailing whitespace. which means traffic class 0, queue id 0 , color 0 (i.e green). warning: 4 lines add whitespace errors. * Warnings while building documents: metering_and_policing_test_plan.rst:417: WARNING: Inline emphasis start-str= ing without end-string. metering_and_policing_test_plan.rst:397: WARNING: Title underline too short= . > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Wenjie Li > Sent: Wednesday, December 12, 2018 1:42 PM > To: dts@dpdk.org > Cc: Li, WenjieX A > Subject: [dts] [PATCH V2 2/2] add new testplan metering_and_policing >=20 > Add a new test plan "metering_and_policing_test_plan.rst" to test_plans. >=20 > Signed-off-by: Wenjie Li >=20 > --- > .../metering_and_policing_test_plan.rst | 586 > ++++++++++++++++++ > 1 file changed, 586 insertions(+) > create mode 100644 test_plans/metering_and_policing_test_plan.rst >=20 > diff --git a/test_plans/metering_and_policing_test_plan.rst > b/test_plans/metering_and_policing_test_plan.rst > new file mode 100644 > index 0000000..565dda7 > --- /dev/null > +++ b/test_plans/metering_and_policing_test_plan.rst > @@ -0,0 +1,586 @@ > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +softnic PMD > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Description > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +The SoftNIC allows building custom NIC pipelines in SW. The Soft NIC > +pipeline is configurable through firmware (DPDK Packet Framework script)= . > + > +In RFC2698, the behavior of the Meter is specified as below: > +When a packet of size B bytes arrives at time t, the following happens > +if the trTCM is configured to operate: > +in the Color-Blind mode: > +. If Tp(t)-B < 0, the packet is red, else . If Tc(t)-B < 0, the packet > +is yellow and Tp is decremented by B, else . The packet is green and > +both Tp and Tc are decremented by B. > +in the Color-Aware mode: > +. If the packet has been precolored as red or if Tp(t)-B < 0, > + the packet is red, else > +. If the packet has been precolored as yellow or if Tc(t)-B < 0, > + the packet is yellow and Tp is decremented by B, else . The packet is > +green and both Tp and Tc are decremented by B. > + > +DPDK meter library (librte_meter) implements these two mode separately > +and made through different APIs. In table meter action implementation, > +always color aware mode API is invoked regardless of dscp table. > + > +Prerequisites > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +The DUT must have four 10G Ethernet ports connected to four ports on > +Tester that are controlled by the Scapy packet generator, > + > +dut_port_0 <---> tester_port_0 > +dut_port_1 <---> tester_port_1 > +dut_port_2 <---> tester_port_2 > +dut_port_3 <---> tester_port_3 > + > +Assume four DUT 10G Ethernet ports' pci device id is as the following, > + > +dut_port_0 : "0000:05:00.0" > +dut_port_1 : "0000:05:00.1" > +dut_port_2 : "0000:05:00.2" > +dut_port_3 : "0000:05:00.3" > + > +Bind them to dpdk igb_uio driver, > + > +./usertools/dpdk-devbind.py -b igb_uio 05:00.0 05:00.1 > + > +1. change ./drivers/net/softnic/firmware.cli to meet the specific test > environment. > + > +2. start softnic with following command line, > + > +./x86_64-native-linuxapp-gcc/app/testpmd -l 21-25 -n 4 \ --vdev > +'net_softnic0,firmware=3D./drivers/net/softnic/firmware.cli,cpu_id=3D1,c= onn > +_port=3D8086' \ > +-- -i --forward-mode=3Dsoftnic --portmask=3D0x10 > +testpmd> start > + > +3. start softnic with default hierarchy Qos with following command > +line, > + > +./x86_64-native-linuxapp-gcc/app/testpmd -l 21-25 -n 4 \ --vdev > +'net_softnic0,firmware=3D./drivers/net/softnic/firmware.cli,cpu_id=3D1,c= onn > +_port=3D8086' \ > +-- -i --forward-mode=3Dsoftnic --portmask=3D0x10 > +testpmd> set port tm hierarchy default 1 start > + > +Test Case 1: ipv4 ACL table RFC2698 GYR > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +1. Edit meter_and_policing_firmware.cli to change "table action" and > +"pipeline table" as below, > + > +table action profile AP0 ipv4 offset 270 fwd meter trtcm tc 1 stats > +pkts pipeline RX table match acl ipv4 offset 270 size 4K action AP0 > +flowapi map group 0 ingress pipeline RX table 0 > + > +2. start softnic, > +./x86_64-native-linuxapp-gcc/app/testpmd -l 23-25 -n 4 --vdev > +'net_softnic0,firmware=3D/root/dpdk/drivers/net/softnic/meter_and_polici= n > +g_firmware.cli,cpu_id=3D0,conn_port=3D8086' -- -i --forward-mode=3Dsoftn= ic > +--rxq=3D2 --txq=3D2 --portmask=3D0x4 > + > +Add rules to table, set CBS to 400 bytes, PBS to 500 bytes > +testpmd> add port meter profile trtcm_rfc2698 2 0 3125000000 > 3125000000 > +testpmd> 400 500 create port meter 2 0 0 yes g y r 0 0 0 flow create 2 > +testpmd> group 0 ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 6 / tcp src mask 65535 dst mask > +testpmd> 65535 src spec 2 dst spec 2 / end actions meter mtr_id 0 / > +testpmd> queue index 0 / end start > + > +3. Configure the packets with specified src/dst IP address and TCP > dport/sport. > +a)send a packet larger than PBS > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*461)], > iface=3D"enp131s0f3") the packet was forwarded to port 0. > +b)send a packet not larger than PBS but larger than CBS > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*460)], > iface=3D"enp131s0f3") the packet was forwarded to port 0. > +c)send a packet not larger than CBS > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*360)], > iface=3D"enp131s0f3") the packet was forwarded to port 0. > + > +Notes: the CBS/PBS includes IP header(20 bytes) and TCP header(20 bytes)= . > +So when the payload is 460 bytes, the IP packet is 500 bytes. > + > +Test Case 2: ipv4 ACL table RFC2698 GYD > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +1. Edit meter_and_policing_firmware.cli to change "table action" and > +"pipeline table" as below, > + > +table action profile AP0 ipv4 offset 270 fwd meter trtcm tc 1 stats > +pkts pipeline RX table match acl ipv4 offset 270 size 4K action AP0 > +flowapi map group 0 ingress pipeline RX table 0 > + > +2. start softnic, > +./x86_64-native-linuxapp-gcc/app/testpmd -l 23-25 -n 4 --vdev > +'net_softnic0,firmware=3D/root/dpdk/drivers/net/softnic/meter_and_polici= n > +g_firmware.cli,cpu_id=3D0,conn_port=3D8086' -- -i --forward-mode=3Dsoftn= ic > +--rxq=3D2 --txq=3D2 --portmask=3D0x4 > + > +Add rules to table, set CBS to 400 bytes, PBS to 500 bytes > +testpmd> add port meter profile trtcm_rfc2698 2 0 3125000000 > 3125000000 > +testpmd> 400 500 create port meter 2 0 0 yes g y d 0 0 0 flow create 2 > +testpmd> group 0 ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 6 / tcp src mask 65535 dst mask > +testpmd> 65535 src spec 2 dst spec 2 / end actions meter mtr_id 0 / > +testpmd> queue index 0 / end start > + > +3. Configure the packets with specified src/dst IP address and TCP > dport/sport. > +a)send a packet larger than PBS > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*461)], > iface=3D"enp131s0f3") The packet was dropped. > +b)send a packet not larger than PBS but larger than CBS > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*460)], > iface=3D"enp131s0f3") the packet was forwarded to port 0. > +c)send a packet not larger than CBS > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*360)], > iface=3D"enp131s0f3") the packet was forwarded to port 0. > + > +Test Case 3: ipv4 ACL table RFC2698 GDR > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +1. Edit meter_and_policing_firmware.cli to change "table action" and > +"pipeline table" as below, > + > +table action profile AP0 ipv4 offset 270 fwd meter trtcm tc 1 stats > +pkts pipeline RX table match acl ipv4 offset 270 size 4K action AP0 > +flowapi map group 0 ingress pipeline RX table 0 > + > +2. start softnic, > +./x86_64-native-linuxapp-gcc/app/testpmd -l 23-25 -n 4 --vdev > +'net_softnic0,firmware=3D/root/dpdk/drivers/net/softnic/meter_and_polici= n > +g_firmware.cli,cpu_id=3D0,conn_port=3D8086' -- -i --forward-mode=3Dsoftn= ic > +--rxq=3D2 --txq=3D2 --portmask=3D0x4 > + > +Add rules to table, set CBS to 400 bytes, PBS to 500 bytes > +testpmd> add port meter profile trtcm_rfc2698 2 0 3125000000 > 3125000000 > +testpmd> 400 500 create port meter 2 0 0 yes g d r 0 0 0 flow create 2 > +testpmd> group 0 ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 132 / sctp src mask 65535 dst > +testpmd> mask 65535 src spec 2 dst spec 2 / end actions meter mtr_id 0 > +testpmd> / queue index 1 / end start > + > +3. Configure the packets with specified src/dst IP address and SCTP > dport/sport. > +a)send a packet larger than PBS > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D132)/SCTP(sport=3D2,dport=3D2)/Raw(load=3D"P"*469)], > iface=3D"enp131s0f3") the packet was forwarded to port 1. > +b)send a packet not larger than PBS but larger than CBS > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D132)/SCTP(sport=3D2,dport=3D2)/Raw(load=3D"P"*468)], > +iface=3D"enp131s0f3") > sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.20= .21.22',p > roto=3D132)/SCTP(sport=3D2,dport=3D2)/Raw(load=3D"P"*369)], iface=3D"enp1= 31s0f3") > The packets was dropped. > +c)send a packet not larger than CBS > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D132)/SCTP(sport=3D2,dport=3D2)/Raw(load=3D"P"*368)], > iface=3D"enp131s0f3") the packet was forwarded to port 1. > + > +Notes: the CBS/PBS includes IP header(20 bytes) and SCTP header(12 bytes= ). > +So when the payload is 468 bytes, the IP packet is 500 bytes. > + > +Test Case 4: ipv4 ACL table RFC2698 DYR > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +1. Edit meter_and_policing_firmware.cli to change "table action" and > +"pipeline table" as below, > + > +table action profile AP0 ipv4 offset 270 fwd meter trtcm tc 1 stats > +pkts pipeline RX table match acl ipv4 offset 270 size 4K action AP0 > +flowapi map group 0 ingress pipeline RX table 0 > + > +2. start softnic, > +./x86_64-native-linuxapp-gcc/app/testpmd -l 23-25 -n 4 --vdev > +'net_softnic0,firmware=3D/root/dpdk/drivers/net/softnic/meter_and_polici= n > +g_firmware.cli,cpu_id=3D0,conn_port=3D8086' -- -i --forward-mode=3Dsoftn= ic > +--rxq=3D2 --txq=3D2 --portmask=3D0x4 > + > +Add rules to table, set CBS to 400 bytes, PBS to 500 bytes > +testpmd> add port meter profile trtcm_rfc2698 2 0 3125000000 > 3125000000 > +testpmd> 400 500 create port meter 2 0 0 yes d y r 0 0 0 flow create 2 > +testpmd> group 0 ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 17 / udp src mask 65535 dst > +testpmd> mask 65535 src spec 2 dst spec 2 / end actions meter mtr_id 0 > +testpmd> / queue index 0 / end start > + > +3. Configure the packets with specified src/dst IP address and TCP > dport/sport. > +a)send a packet larger than PBS > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D17)/UDP(sport=3D2,dport=3D2)/Raw(load=3D"P"*473)], > iface=3D"enp131s0f3") the packet was forwarded to port 0. > +b)send a packet not larger than PBS but larger than CBS > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D17)/UDP(sport=3D2,dport=3D2)/Raw(load=3D"P"*373)], > iface=3D"enp131s0f3") the packet was forwarded to port 0. > +c)send a packet not larger than CBS > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D17)/UDP(sport=3D2,dport=3D2)/Raw(load=3D"P"*372)], > iface=3D"enp131s0f3") The packet was dropped. > + > +Notes: the CBS/PBS includes IP header(20 bytes) and UDP header(8 bytes). > +So when the payload is 472 bytes, the IP packet is 500 bytes. > + > +Test Case 5: ipv4 ACL table RFC2698 DDD > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +1. Edit meter_and_policing_firmware.cli to change "table action" and > +"pipeline table" as below, > + > +table action profile AP0 ipv4 offset 270 fwd meter trtcm tc 1 stats > +pkts pipeline RX table match acl ipv4 offset 270 size 4K action AP0 > +flowapi map group 0 ingress pipeline RX table 0 > + > +2. start softnic, > +./x86_64-native-linuxapp-gcc/app/testpmd -l 23-25 -n 4 --vdev > +'net_softnic0,firmware=3D/root/dpdk/drivers/net/softnic/meter_and_polici= n > +g_firmware.cli,cpu_id=3D0,conn_port=3D8086' -- -i --forward-mode=3Dsoftn= ic > +--rxq=3D2 --txq=3D2 --portmask=3D0x4 > + > +Add rules to table, set CBS to 400 bytes, PBS to 500 bytes > +testpmd> add port meter profile trtcm_rfc2698 2 0 3125000000 > 3125000000 > +testpmd> 400 500 create port meter 2 0 0 yes d d d 0 0 0 flow create 2 > +testpmd> group 0 ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 6 / tcp src mask 65535 dst mask > +testpmd> 65535 src spec 2 dst spec 2 / end actions meter mtr_id 0 / > +testpmd> queue index 0 / end start > + > +3. Configure the packets with specified src/dst IP address and TCP > dport/sport. > +a)send a packet larger than PBS > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*461)], > iface=3D"enp131s0f3") The packet was dropped. > +b)send a packet not larger than PBS but larger than CBS > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*460)], > iface=3D"enp131s0f3") The packet was dropped. > +c)send a packet not larger than CBS > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*360)], > iface=3D"enp131s0f3") The packet was dropped. > + > +Test Case 6: ipv4 with same CBS and PBS GDR > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +1. Edit meter_and_policing_firmware.cli to change "table action" and > +"pipeline table" as below, > + > +table action profile AP0 ipv4 offset 270 fwd meter trtcm tc 1 stats > +pkts pipeline RX table match acl ipv4 offset 270 size 4K action AP0 > +flowapi map group 0 ingress pipeline RX table 0 > + > +2. start softnic, > +./x86_64-native-linuxapp-gcc/app/testpmd -l 23-25 -n 4 --vdev > +'net_softnic0,firmware=3D/root/dpdk/drivers/net/softnic/meter_and_polici= n > +g_firmware.cli,cpu_id=3D0,conn_port=3D8086' -- -i --forward-mode=3Dsoftn= ic > +--rxq=3D2 --txq=3D2 --portmask=3D0x4 > + > +Add rules to table, set CBS to 400 bytes, PBS to 500 bytes > +testpmd> add port meter profile trtcm_rfc2698 2 0 3125000000 > 3125000000 > +testpmd> 500 500 create port meter 2 0 0 yes g d r 0 0 0 flow create 2 > +testpmd> group 0 ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 6 / tcp src mask 65535 dst mask > +testpmd> 65535 src spec 2 dst spec 2 / end actions meter mtr_id 0 / > +testpmd> queue index 0 / end start > + > +3. Configure the packets with specified src/dst IP address and TCP > dport/sport. > +a)send a packet larger than PBS > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*461)], > iface=3D"enp131s0f3") the packet was forwarded to port 0. > +b)send a packet not larger than PBS > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*460)], > iface=3D"enp131s0f3") the packet was forwarded to port 0. > + > +Test Case 7: ipv4 HASH table RFC2698 > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +1. Edit meter_and_policing_firmware.cli to change "table action" and > +"pipeline table" as below, > + > +table action profile AP0 ipv4 offset 270 fwd meter trtcm tc 1 stats > +pkts pipeline RX table match hash ext key 16 mask > +00FF0000FFFFFFFFFFFFFFFFFFFFFFFF offset 278 buckets 16K size 65K action > +AP0 flowapi map group 0 ingress pipeline RX table 0 > + > +2. start softnic, > +./x86_64-native-linuxapp-gcc/app/testpmd -l 23-25 -n 4 --vdev > +'net_softnic0,firmware=3D/root/dpdk/drivers/net/softnic/meter_and_polici= n > +g_firmware.cli,cpu_id=3D0,conn_port=3D8086' -- -i --forward-mode=3Dsoftn= ic > +--rxq=3D2 --txq=3D2 --portmask=3D0x4 > + > +Add rules to table, > +testpmd> add port meter profile trtcm_rfc2698 2 0 3125000000 > 3125000000 > +testpmd> 400 500 > +a)GYR > +testpmd> create port meter 2 0 0 yes g y r 0 0 0 > +b)GYD > +testpmd> create port meter 2 0 0 yes g y d 0 0 0 > +c)GDR > +testpmd> create port meter 2 0 0 yes g d r 0 0 0 > +d)DYR > +testpmd> create port meter 2 0 0 yes d y r 0 0 0 > +e)DDD > +testpmd> create port meter 2 0 0 yes d d d 0 0 0 flow create 2 group 0 > +testpmd> ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 6 / tcp src mask 65535 dst mask > +testpmd> 65535 src spec 2 dst spec 2 / end actions meter mtr_id 0 / > +testpmd> queue index 0 / end start > + > +3. Configure the packets with specified src/dst IP address and TCP > dport/sport. > +Send packets same as ACL table, there will be the same result with ACL > table. > + > +Test Case 8: ipv6 ACL table RFC2698 > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +1. Edit meter_and_policing_firmware.cli to change "table action" and > +"pipeline table" as below, > + > +table action profile AP0 ipv6 offset 270 fwd meter trtcm tc 1 stats > +pkts pipeline RX table match acl ipv6 offset 270 size 4K action AP0 > +flowapi map group 0 ingress pipeline RX table 0 > + > +2. start softnic, > +./x86_64-native-linuxapp-gcc/app/testpmd -l 23-25 -n 4 --vdev > +'net_softnic0,firmware=3D/root/dpdk/drivers/net/softnic/meter_and_polici= n > +g_firmware.cli,cpu_id=3D0,conn_port=3D8086' -- -i --forward-mode=3Dsoftn= ic > +--rxq=3D2 --txq=3D2 --portmask=3D0x4 > + > +Add rules to table, > +testpmd> add port meter profile trtcm_rfc2698 2 0 3125000000 > 3125000000 > +testpmd> 400 500 create port meter 2 0 0 yes g y d 0 0 0 create port > +testpmd> meter 2 1 0 yes d y r 0 0 0 flow create 2 group 0 ingress > +testpmd> pattern eth / ipv6 proto mask 255 src mask > +testpmd> ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff dst mask > +testpmd> 0:0:0:0:0:0:0:0 src spec > +testpmd> ABCD:EF01:2345:6789:ABCD:EF01:2345:5789 dst spec > +testpmd> 0:0:0:0:0:0:0:0 proto spec 6 / tcp src mask 65535 dst mask > +testpmd> 65535 src spec 2 dst spec 2 / end actions meter mtr_id 0 / > +testpmd> queue index 0 / end flow create 2 group 0 ingress pattern eth > +testpmd> / ipv6 proto mask 255 src mask > +testpmd> ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff dst mask > +testpmd> 0:0:0:0:0:0:0:0 src spec > +testpmd> ABCD:EF01:2345:6789:ABCD:EF01:2345:5789 dst spec > +testpmd> 0:0:0:0:0:0:0:0 proto spec 17 / udp src mask 65535 dst mask > +testpmd> 65535 src spec 2 dst spec 2 / end actions meter mtr_id 1 / > +testpmd> queue index 1 / end start flow list 2 > +ID Group Prio Attr Rule > +0 0 0 i-- ETH IPV6 TCP =3D> METER QUEUE > +1 0 0 i-- ETH IPV6 UDP =3D> METER QUEUE > + > +3. Configure the packets with specified src/dst IPv6 address and TCP > dport/sport. > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IPv6(src=3D"ABCD:EF01:2345:6789:= AB > C > +D:EF01:2345:5789",dst=3D"2001::1",nh=3D6)/TCP(sport=3D2,dport=3D2)/Raw(l= oad=3D" > P"*441)], iface=3D"enp131s0f3") The packet was dropped. > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IPv6(src=3D"ABCD:EF01:2345:6789:= AB > C > +D:EF01:2345:5789",dst=3D"2001::1",nh=3D6)/TCP(sport=3D2,dport=3D2)/Raw(l= oad=3D" > P"*440)], iface=3D"enp131s0f3") the packet was forwarded to port 0. > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IPv6(src=3D"ABCD:EF01:2345:6789:= AB > C > +D:EF01:2345:5789",dst=3D"2001::1",nh=3D6)/TCP(sport=3D2,dport=3D2)/Raw(l= oad=3D" > P"*340)], iface=3D"enp131s0f3") the packet was forwarded to port 0. > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IPv6(src=3D"ABCD:EF01:2345:6789:= AB > C > +D:EF01:2345:5789",dst=3D"2001::1",nh=3D17)/UDP(sport=3D2,dport=3D2)/Raw(= load > =3D"P"*453)], iface=3D"enp131s0f3") the packet was forwarded to port 1. > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IPv6(src=3D"ABCD:EF01:2345:6789:= AB > C > +D:EF01:2345:5789",dst=3D"2001::1",nh=3D17)/UDP(sport=3D2,dport=3D2)/Raw(= load > =3D"P"*353)], iface=3D"enp131s0f3") the packet was forwarded to port 1. > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IPv6(src=3D"ABCD:EF01:2345:6789:= AB > C > +D:EF01:2345:5789",dst=3D"2001::1",nh=3D17)/UDP(sport=3D2,dport=3D2)/Raw(= load > =3D"P"*352)], iface=3D"enp131s0f3") The packet was dropped. > + > +Notes: TCP header covers 20 bytes, UDP header covers 8 bytes. > +the CBS/PBS includes IPv6 header(40 bytes) and TCP/UDP header(20/8 > bytes). > +So when the payload of IPv6-TCP packet is 440 bytes, the IPv6 packet is = 500 > bytes. > +when the payload of IPv6-UDP packet is 452 bytes, the IPv6 packet is 500 > bytes. > + > +Test Case 9: multiple meter and profile > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +1. Edit meter_and_policing_firmware.cli to change "table action" and > +"pipeline table" as below, > + > +table action profile AP0 ipv4 offset 270 fwd meter trtcm tc 1 stats > +pkts pipeline RX table match acl ipv4 offset 270 size 4K action AP0 > +flowapi map group 0 ingress pipeline RX table 0 > + > +2. start softnic, configure 4 ports, > +./x86_64-native-linuxapp-gcc/app/testpmd -l 21-25 -n 4 --vdev > +'net_softnic0,firmware=3D/root/dpdk/drivers/net/softnic/meter_and_polici= n > +g_firmware.cli,cpu_id=3D0,conn_port=3D8086' -- -i --forward-mode=3Dsoftn= ic > +--rxq=3D4 --txq=3D4 --portmask=3D0x10 > + > +Add rules to table, set CBS to 400 bytes, PBS to 500 bytes > +testpmd> add port meter profile trtcm_rfc2698 4 0 3125000000 > 3125000000 > +testpmd> 400 500 add port meter profile trtcm_rfc2698 4 1 3125000000 > +testpmd> 3125000000 300 400 create port meter 4 0 0 yes g y r 0 0 0 > +testpmd> create port meter 4 1 0 yes g y d 0 0 0 create port meter 4 2 > +testpmd> 0 yes g d r 0 0 0 create port meter 4 3 0 yes d y r 0 0 0 > +testpmd> create port meter 4 4 1 yes g y d 0 0 0 create port meter 4 5 > +testpmd> 1 yes g d r 0 0 0 create port meter 4 6 1 yes d y r 0 0 0 > +testpmd> create port meter 4 128 1 yes d d d 0 0 0 flow create 4 group > +testpmd> 0 ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 6 / tcp src mask 65535 dst mask > +testpmd> 65535 src spec 0 dst spec 0 / end actions meter mtr_id 0 / > +testpmd> queue index 0 / end flow create 4 group 0 ingress pattern eth > +testpmd> / ipv4 proto mask 255 src mask 255.255.255.255 dst mask > +testpmd> 255.255.255.255 src spec 1.10.11.12 dst spec 2.20.21.22 proto > +testpmd> spec 6 / tcp src mask 65535 dst mask 65535 src spec 1 dst spec > +testpmd> 1 / end actions meter mtr_id 1 / queue index 1 / end flow > +testpmd> create 4 group 0 ingress pattern eth / ipv4 proto mask 255 src > +testpmd> mask 255.255.255.255 dst mask 255.255.255.255 src spec > +testpmd> 1.10.11.12 dst spec 2.20.21.22 proto spec 6 / tcp src mask > +testpmd> 65535 dst mask 65535 src spec 2 dst spec 2 / end actions meter > +testpmd> mtr_id 2 / queue index 2 / end flow create 4 group 0 ingress > +testpmd> pattern eth / ipv4 proto mask 255 src mask 255.255.255.255 dst > +testpmd> mask 255.255.255.255 src spec 1.10.11.12 dst spec 2.20.21.22 > +testpmd> proto spec 6 / tcp src mask 65535 dst mask 65535 src spec 3 > +testpmd> dst spec 3 / end actions meter mtr_id 3 / queue index 3 / end > +testpmd> flow create 4 group 0 ingress pattern eth / ipv4 proto mask > +testpmd> 255 src mask 255.255.255.255 dst mask 255.255.255.255 src spec > +testpmd> 1.10.11.12 dst spec 2.20.21.22 proto spec 6 / tcp src mask > +testpmd> 65535 dst mask 65535 src spec 4 dst spec 4 / end actions meter > +testpmd> mtr_id 4 / queue index 0 / end flow create 4 group 0 ingress > +testpmd> pattern eth / ipv4 proto mask 255 src mask 255.255.255.255 dst > +testpmd> mask 255.255.255.255 src spec 1.10.11.12 dst spec 2.20.21.22 > +testpmd> proto spec 6 / tcp src mask 65535 dst mask 65535 src spec 5 > +testpmd> dst spec 5 / end actions meter mtr_id 5 / queue index 1 / end > +testpmd> flow create 4 group 0 ingress pattern eth / ipv4 proto mask > +testpmd> 255 src mask 255.255.255.255 dst mask 255.255.255.255 src spec > +testpmd> 1.10.11.12 dst spec 2.20.21.22 proto spec 6 / tcp src mask > +testpmd> 65535 dst mask 65535 src spec 6 dst spec 6 / end actions meter > +testpmd> mtr_id 6 / queue index 2 / end flow create 4 group 0 ingress > +testpmd> pattern eth / ipv4 proto mask 255 src mask 255.255.255.255 dst > +testpmd> mask 255.255.255.255 src spec 1.10.11.12 dst spec 2.20.21.22 > +testpmd> proto spec 6 / tcp src mask 65535 dst mask 65535 src spec 7 > +testpmd> dst spec 7 / end actions meter mtr_id 128 / queue index 3 / > +testpmd> end flow create 4 group 0 ingress pattern eth / ipv4 proto > +testpmd> mask 255 src mask 255.255.255.255 dst mask 255.255.255.255 > src > +testpmd> spec 1.10.11.12 dst spec 2.20.21.22 proto spec 6 / tcp src > +testpmd> mask 65535 dst mask 65535 src spec 8 dst spec 8 / end actions > +testpmd> meter mtr_id 128 / queue index 0 / end > +the last flow can't be created successfully with "METER: Meter already > attached to a flow: Invalid argument" > +testpmd> start > +testpmd> flow list 4 > +ID Group Prio Attr Rule > +0 0 0 i-- ETH IPV4 TCP =3D> METER QUEUE > +1 0 0 i-- ETH IPV4 TCP =3D> METER QUEUE > +2 0 0 i-- ETH IPV4 TCP =3D> METER QUEUE > +3 0 0 i-- ETH IPV4 TCP =3D> METER QUEUE > +4 0 0 i-- ETH IPV4 TCP =3D> METER QUEUE > +5 0 0 i-- ETH IPV4 TCP =3D> METER QUEUE > +6 0 0 i-- ETH IPV4 TCP =3D> METER QUEUE > +7 0 0 i-- ETH IPV4 TCP =3D> METER QUEUE > + > +3. Configure the packets with specified src/dst IP address and TCP > dport/sport. > +pkt1: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D0,dport=3D0)/Raw(load=3D"P"*461)], > +iface=3D"enp131s0f3") > +pkt2: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D0,dport=3D0)/Raw(load=3D"P"*460)], > +iface=3D"enp131s0f3") > +pkt3: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D0,dport=3D0)/Raw(load=3D"P"*360)], > +iface=3D"enp131s0f3") > +pkt1/2/3 were forwarded to port 0 > +pkt4: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D1,dport=3D1)/Raw(load=3D"P"*461)], > +iface=3D"enp131s0f3") > +pkt5: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D1,dport=3D1)/Raw(load=3D"P"*460)], > +iface=3D"enp131s0f3") > +pkt6: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D1,dport=3D1)/Raw(load=3D"P"*360)], > +iface=3D"enp131s0f3") > +pkt4 was dropped, pkt5/6 were forwarded to port1 > +pkt7: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*461)], > +iface=3D"enp131s0f3") > +pkt8: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*460)], > +iface=3D"enp131s0f3") > +pkt9: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*361)], > +iface=3D"enp131s0f3") > +pkt10: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*360)], > +iface=3D"enp131s0f3") > +pkt8/9 were dropped, pkt7/10 were forwarded to port2 > +pkt11: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D3,dport=3D3)/Raw(load=3D"P"*461)], > +iface=3D"enp131s0f3") > +pkt12: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D3,dport=3D3)/Raw(load=3D"P"*361)], > +iface=3D"enp131s0f3") > +pkt13: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D3,dport=3D3)/Raw(load=3D"P"*360)], > +iface=3D"enp131s0f3") > +pkt13 was dropped, pkt11/12 were forwarded to port3 > +pkt14: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D4,dport=3D4)/Raw(load=3D"P"*361)], > +iface=3D"enp131s0f3") > +pkt15: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D4,dport=3D4)/Raw(load=3D"P"*360)], > +iface=3D"enp131s0f3") > +pkt16: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D4,dport=3D4)/Raw(load=3D"P"*260)], > +iface=3D"enp131s0f3") > +pkt14 was dropped, pkt15/16 were forwarded to port0 > +pkt17: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D5,dport=3D5)/Raw(load=3D"P"*361)], > +iface=3D"enp131s0f3") > +pkt18: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D5,dport=3D5)/Raw(load=3D"P"*360)], > +iface=3D"enp131s0f3") > +pkt19: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D5,dport=3D5)/Raw(load=3D"P"*261)], > +iface=3D"enp131s0f3") > +pkt20: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D5,dport=3D5)/Raw(load=3D"P"*260)], > +iface=3D"enp131s0f3") > +pkt18/19 were dropped, pkt17/20 were forwarded to port1 > +pkt21: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D6,dport=3D6)/Raw(load=3D"P"*361)], > +iface=3D"enp131s0f3") > +pkt22: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D6,dport=3D6)/Raw(load=3D"P"*261)], > +iface=3D"enp131s0f3") > +pkt23: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D6,dport=3D6)/Raw(load=3D"P"*260)], > +iface=3D"enp131s0f3") > +pkt23 was dropped, pkt21/22 were forwarded to port2 > +pkt24: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D7,dport=3D7)/Raw(load=3D"P"*361)], > +iface=3D"enp131s0f3") > +pkt25: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D7,dport=3D7)/Raw(load=3D"P"*261)], > +iface=3D"enp131s0f3") > +pkt26: > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D7,dport=3D7)/Raw(load=3D"P"*260)], > +iface=3D"enp131s0f3") > +pkt24/25/26 were dropped > + > +Notes: if create one flow with a mtr_id, then create the flow again > +with another mtr_id, the last flow rule will overlap the previous one. > +so the first flow rule will not take effect, just the last one can take = effect. > + > +Test Case 10: ipv4 RFC2698 pre-colored red by DSCP table > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > +1. Set the DSCP table in dscp.sh, > +set all the packets from every tc and every queue to red color. > + > +Edit meter_and_policing_firmware.cli to change "table action" and > +"pipeline table" as below, > + > +table action profile AP0 ipv4 offset 270 fwd meter trtcm tc 1 stats > +pkts pipeline RX table match acl ipv4 offset 270 size 4K action AP0 > +pipeline RX table 0 dscp /root/dpdk/drivers/net/softnic/dscp_red.sh > +flowapi map group 0 ingress pipeline RX table 0 > + > +2. start softnic, > +./x86_64-native-linuxapp-gcc/app/testpmd -l 23-25 -n 4 --vdev > +'net_softnic0,firmware=3D/root/dpdk/drivers/net/softnic/meter_and_polici= n > +g_firmware.cli,cpu_id=3D0,conn_port=3D8086' -- -i --forward-mode=3Dsoftn= ic > +--rxq=3D2 --txq=3D2 --portmask=3D0x4 > + > +Add rules to table, set CBS to 400 bytes, PBS to 500 bytes > +testpmd> add port meter profile trtcm_rfc2698 2 0 3125000000 > 3125000000 > +testpmd> 400 500 create port meter 2 0 0 yes g y r 0 0 0 flow create 2 > +testpmd> group 0 ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 6 / tcp src mask 65535 dst mask > +testpmd> 65535 src spec 2 dst spec 2 / end actions meter mtr_id 0 / > +testpmd> queue index 0 / end start > + > +3. Configure the packets with specified src/dst IP address and TCP > dport/sport. > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*461)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21.22', > proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*460)], iface=3D"enp131= s0f3") > sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.20= .21.22',p > roto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*360)], iface=3D"enp131s= 0f3") All > the packets were forwarded to port 0. > + > +4. create another meter to drop all the packets with red color, > +testpmd> create port meter 2 1 0 yes g y d 0 0 0 flow create 2 group 0 > +testpmd> ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 6 / tcp src mask 65535 dst mask > +testpmd> 65535 src spec 2 dst spec 2 / end actions meter mtr_id 1 / > +testpmd> queue index 0 / end > + > +5. Configure the packets with specified src/dst IP address and TCP > dport/sport. > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*461)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21.22', > proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*460)], iface=3D"enp131= s0f3") > sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.20= .21.22',p > roto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*360)], iface=3D"enp131s= 0f3") All > the packets were dropped. > + > +6. create another meter to drop all the packets with yellow color, > +testpmd> create port meter 2 2 0 yes g d r 0 0 0 flow create 2 group 0 > +testpmd> ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 6 / tcp src mask 65535 dst mask > +testpmd> 65535 src spec 2 dst spec 2 / end actions meter mtr_id 2 / > +testpmd> queue index 0 / end > + > +7. Configure the packets with specified src/dst IP address and TCP > dport/sport. > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*461)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*460)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*360)], > +iface=3D"enp131s0f3") All the packets were forwarded to port 0 > + > +8. create another meter to drop all the packets with green color, > +testpmd> create port meter 2 3 0 yes d y r 0 0 0 flow create 2 group 0 > +testpmd> ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 6 / tcp src mask 65535 dst mask > +testpmd> 65535 src spec 2 dst spec 2 / end actions meter mtr_id 3 / > +testpmd> queue index 0 / end > + > +9. Configure the packets with specified src/dst IP address and TCP > dport/sport. > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*461)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*460)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*360)], > +iface=3D"enp131s0f3") All the packets were forwarded to port 0 > + > +Test Case 11: ipv4 RFC2698 pre-colored yellow by DSCP table > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > +1. Set the DSCP table in dscp.sh, > +set all the packets from every tc and every queue to yellow color. > + > +Edit meter_and_policing_firmware.cli to change "table action" and > +"pipeline table" as below, > + > +table action profile AP0 ipv4 offset 270 fwd meter trtcm tc 1 stats > +pkts pipeline RX table match acl ipv4 offset 270 size 4K action AP0 > +pipeline RX table 0 dscp /root/dpdk/drivers/net/softnic/dscp_yellow.sh > +flowapi map group 0 ingress pipeline RX table 0 > + > +2. start softnic, > +./x86_64-native-linuxapp-gcc/app/testpmd -l 23-25 -n 4 --vdev > +'net_softnic0,firmware=3D/root/dpdk/drivers/net/softnic/meter_and_polici= n > +g_firmware.cli,cpu_id=3D0,conn_port=3D8086' -- -i --forward-mode=3Dsoftn= ic > +--rxq=3D2 --txq=3D2 --portmask=3D0x4 > + > +Add rules to table, set CBS to 400 bytes, PBS to 500 bytes > +testpmd> add port meter profile trtcm_rfc2698 2 0 3125000000 > 3125000000 > +testpmd> 400 500 create port meter 2 0 0 yes g y r 0 0 0 flow create 2 > +testpmd> group 0 ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 6 / tcp src mask 65535 dst mask > +testpmd> 65535 src spec 2 dst spec 2 / end actions meter mtr_id 0 / > +testpmd> queue index 0 / end start > + > +3. Configure the packets with specified src/dst IP address and TCP > dport/sport. > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*461)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21.22', > proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*460)], iface=3D"enp131= s0f3") > sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.20= .21.22',p > roto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*360)], iface=3D"enp131s= 0f3") All > the packets were forwarded to port 0. > + > +4. create another meter to drop all the packets with red color, > +testpmd> create port meter 2 1 0 yes g y d 0 0 0 flow create 2 group 0 > +testpmd> ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 6 / tcp src mask 65535 dst mask > +testpmd> 65535 src spec 2 dst spec 2 / end actions meter mtr_id 1 / > +testpmd> queue index 0 / end > + > +5. Configure the packets with specified src/dst IP address and TCP > dport/sport. > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*461)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*460)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*360)], > +iface=3D"enp131s0f3") > +pkt1 was dropped. > +pkt2 and pkt3 were forwarded to port 0. > + > +6. create another meter to drop all the packets with yellow color, > +testpmd> create port meter 2 2 0 yes g d r 0 0 0 flow create 2 group 0 > +testpmd> ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 6 / tcp src mask 65535 dst mask > +testpmd> 65535 src spec 2 dst spec 2 / end actions meter mtr_id 2 / > +testpmd> queue index 0 / end > + > +7. Configure the packets with specified src/dst IP address and TCP > dport/sport. > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*461)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*460)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*360)], > +iface=3D"enp131s0f3") > +pkt1 was forwarded to port 0. > +pkt2 and pkt3 were dropped. > + > +8. create another meter to drop all the packets with green color, > +testpmd> create port meter 2 3 0 yes d y r 0 0 0 flow create 2 group 0 > +testpmd> ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 6 / tcp src mask 65535 dst mask > +testpmd> 65535 src spec 2 dst spec 2 / end actions meter mtr_id 3 / > +testpmd> queue index 0 / end > + > +9. Configure the packets with specified src/dst IP address and TCP > dport/sport. > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*461)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*460)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*360)], > +iface=3D"enp131s0f3") All the packets were forwarded to port 0 > + > +Test Case 12: ipv4 RFC2698 pre-colored green by DSCP table > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > +1. Set the DSCP table in dscp.sh, > +set all the packets from every tc and every queue to green color. > + > +Edit meter_and_policing_firmware.cli to change "table action" and > +"pipeline table" as below, > + > +table action profile AP0 ipv4 offset 270 fwd meter trtcm tc 1 stats > +pkts pipeline RX table match acl ipv4 offset 270 size 4K action AP0 > +pipeline RX table 0 dscp /root/dpdk/drivers/net/softnic/dscp_green.sh > +flowapi map group 0 ingress pipeline RX table 0 > + > +2. start softnic, > +./x86_64-native-linuxapp-gcc/app/testpmd -l 23-25 -n 4 --vdev > +'net_softnic0,firmware=3D/root/dpdk/drivers/net/softnic/meter_and_polici= n > +g_firmware.cli,cpu_id=3D0,conn_port=3D8086' -- -i --forward-mode=3Dsoftn= ic > +--rxq=3D2 --txq=3D2 --portmask=3D0x4 > + > +Add rules to table, set CBS to 400 bytes, PBS to 500 bytes > +testpmd> add port meter profile trtcm_rfc2698 2 0 3125000000 > 3125000000 > +testpmd> 400 500 create port meter 2 0 0 yes g y r 0 0 0 flow create 2 > +testpmd> group 0 ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 6 / tcp src mask 65535 dst mask > +testpmd> 65535 src spec 2 dst spec 2 / end actions meter mtr_id 0 / > +testpmd> queue index 0 / end start > + > +3. Configure the packets with specified src/dst IP address and TCP > dport/sport. > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*461)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21.22', > proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*460)], iface=3D"enp131= s0f3") > sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.20= .21.22',p > roto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*360)], iface=3D"enp131s= 0f3") All > the packets were forwarded to port 0. > + > +4. create another meter to drop all the packets with red color, > +testpmd> create port meter 2 1 0 yes g y d 0 0 0 flow create 2 group 0 > +testpmd> ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 6 / tcp src mask 65535 dst mask > +testpmd> 65535 src spec 2 dst spec 2 / end actions meter mtr_id 1 / > +testpmd> queue index 0 / end > + > +5. Configure the packets with specified src/dst IP address and TCP > dport/sport. > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*461)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*460)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*360)], > +iface=3D"enp131s0f3") > +pkt1 was dropped. > +pkt2 and pkt3 were forwarded to port 0. > + > +6. create another meter to drop all the packets with yellow color, > +testpmd> create port meter 2 2 0 yes g d r 0 0 0 flow create 2 group 0 > +testpmd> ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 6 / tcp src mask 65535 dst mask > +testpmd> 65535 src spec 2 dst spec 2 / end actions meter mtr_id 2 / > +testpmd> queue index 0 / end > + > +7. Configure the packets with specified src/dst IP address and TCP > dport/sport. > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*461)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*460)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*360)], > +iface=3D"enp131s0f3") > +pkt1 and pkt3 were forwarded to port 0. > +pkt2 was dropped. > + > +8. create another meter to drop all the packets with green color, > +testpmd> create port meter 2 3 0 yes d y r 0 0 0 flow create 2 group 0 > +testpmd> ingress pattern eth / ipv4 proto mask 255 src mask > +testpmd> 255.255.255.255 dst mask 255.255.255.255 src spec 1.10.11.12 > +testpmd> dst spec 2.20.21.22 proto spec 6 / tcp src mask 65535 dst mask > +testpmd> 65535 src spec 2 dst spec 2 / end actions meter mtr_id 3 / > +testpmd> queue index 0 / end > + > +9. Configure the packets with specified src/dst IP address and TCP > dport/sport. > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*461)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*460)], > +iface=3D"enp131s0f3") > +sendp([Ether(dst=3D"00:00:00:00:01:00")/IP(src=3D'1.10.11.12',dst=3D'2.2= 0.21. > +22',proto=3D6)/TCP(sport=3D2,dport=3D2)/Raw(load=3D"P"*360)], > +iface=3D"enp131s0f3") > +pkt1 and pkt2 were forwarded to port 0. > +pkt3 was dropped. > + > +Test Case 13: ipv4 RFC2698 pre-colored by default DSCP table > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > +1. Set the DSCP table in dscp.sh, > +The default DSCP table translate all input packets dscp values (0...64) > +to 0 0 0 which means traffic class 0, queue id 0 , color 0 (i.e green). > + > +Edit meter_and_policing_firmware.cli to change "table action" and > +"pipeline table" as below, > + > +table action profile AP0 ipv4 offset 270 fwd meter trtcm tc 1 stats > +pkts pipeline RX table match acl ipv4 offset 270 size 4K action AP0 > +pipeline RX table 0 dscp /root/dpdk/drivers/net/softnic/dscp_default.sh > +flowapi map group 0 ingress pipeline RX table 0 > + > +execute the steps2-9 of the case pre-colored green by DSCP table, got > +the same result. > -- > 2.17.2