From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id CB28EA0471 for ; Fri, 21 Jun 2019 12:46:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 14C231D5AD; Fri, 21 Jun 2019 12:46:48 +0200 (CEST) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by dpdk.org (Postfix) with ESMTP id 77AA21D5A4 for ; Fri, 21 Jun 2019 12:46:46 +0200 (CEST) Received: by mail-wr1-f43.google.com with SMTP id n4so6053041wrw.13 for ; Fri, 21 Jun 2019 03:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gAPLR+n/3HDEY4A3W3ujb9Uq0qHzMdbtfOSqRCadNWw=; b=So/G7KDxAYO0PllG5OCDhz7VXhPJADnDfKZubZ/w9B4v0VPbbiRRGofUygU2+otzTM T4tcQA9WZfADSbJ+8Dc/F71756s4BDffmkkSfvIPcf+gUDQs7K8UnubKtpGAGNkwhd1u UB6Ywb4nt5Br4sO9Qi2GjFhviwvVd0DnYzbzM8tVcxL6SbmAH67eind9+F4d3mTbJbIz Kc3AXDAZl1j1ooBryg3rd/gaXcfL74o3b1Dn3JjkPxLDoT/GTJA3tELaMMTdT7jMwduy z7VynOf4Xr/UtY4TO8i+obknDlMniEo3+f74wZfnk1V28Mpnr2jPsgLkQFI2PU302KnF O7Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gAPLR+n/3HDEY4A3W3ujb9Uq0qHzMdbtfOSqRCadNWw=; b=aqpUKkGkiQoPcVKOQ+GsZ3kIoq+7egVvgTuOazK2c/kGiuaBCc5cklg3G3SLBPe1nW 6z2KTrCT77xbc2cCg24YUpC3K4HJ9o3WGQM+WxKl0RFQFwqL88Jqx8FQehNHhOKaxHXc HXhvo4jDmObaAhO6ez8NuluquHFe5ByPozeCgXxRdRyjnqH/jjx5AetMyACJBZXq+wks uSY8iJ3cozqZc+Xbw05CEZ6iqX+byD6uaWliIyU64OA5agXrFZQMQwVuwmmC8NSQn+JC lWkaJYQQNMm0R+YUYnA2aE/9JUIK7jYxI9Xs+WqZmRYh446/WnKibge7ihsS+v43GND7 eVhg== X-Gm-Message-State: APjAAAXgxAm2bvGeuInmWNx9qE52NuatvbSuA2dPksc4AfHP5obzeKUv WH5pwkgX+ISOCNHdb9lZQGsS+7AbITKKd/3me5U= X-Google-Smtp-Source: APXvYqxKYCCrwjxrZUgyvN6MDfK/BH+bTHvXjViAcmcsVioMFBFAJJZPGfQgjWB0xNkBVpANMk4eqMTUxR5pR06mzE8= X-Received: by 2002:a5d:6242:: with SMTP id m2mr54537903wrv.310.1561114005914; Fri, 21 Jun 2019 03:46:45 -0700 (PDT) MIME-Version: 1.0 References: <6DF84BC835AA424FAE2B23EA6A94E5EB669EFD@IRSMSX104.ger.corp.intel.com> <20190619114228.GA4561@intel.com> In-Reply-To: From: Sruthi Yellamraju Date: Fri, 21 Jun 2019 06:46:35 -0400 Message-ID: To: Cliff Burdick Cc: Ye Xiaolong , users , "Zhang, Xiao" , "Xing, Beilei" , "Wang, Haiyue" , "Zhang, Qi Z" , "Zhang, Helin" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] FW: i40e + rte_flow: Drop filter not working X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" Thank you for your responses Xiaolong. It's very helpful. It confirms our findings from tests. Thank you Cliff for your response. Having such a matrix would be *extremely useful* to the application developer. More so, since rte_flow seems like an extensive, generic API, while the underlying H/w capabilities could be severely limited, and vary. We would very much appreciate such info. Also, how does RSS relate to rte_flow APIs itself? Since RSS distributes packets based on hashes to queues, and using rte_flow you could distribute packets too to various queues based on other criteria. Does RSS have to be disabled for rte_flow to work? Does RSS take precedence over rte_flow? Is that H/w dependent as well? Thanks, Sruthi On Wed, Jun 19, 2019 at 12:28 PM Cliff Burdick wrote: > Xiaolong, maybe it would be useful for every vendor to maintain a matrix > of every flow action/match that's supported and not for each PMD? I know > we've had this problem with Mellanox as well. It's likely only a handful = of > vendors right now that support any form of rte_flow, so starting it soon > would be nice. Also, I believe in Mellanox's case there are some rules th= at > are done in hardware and some that aren't, so it would also be nice to > distinguish between those. Someone from Mellanox can correct me if I'm > wrong on that. > > On Tue, Jun 18, 2019 at 10:00 PM Ye Xiaolong > wrote: > >> >-----Original Message----- >> >From: users [mailto:users-bounces@dpdk.org] On Behalf Of Sruthi >> Yellamraju >> >Sent: Monday, June 17, 2019 3:19 AM >> >To: users@dpdk.org >> >Subject: [dpdk-users] i40e + rte_flow: Drop filter not working >> > >> >Hello, >> > >> >I am trying to test the rte_flow API using the testpmd application. >> >Mainly I start traffic forwarding, then set a rte_flow rule to drop all >> ethernet traffic, then check stats to see if traffic is dropped. >> >Tried many different combinations but traffic is not being dropped. >> > >> >- Any thoughts on how I can get a drop rule to work using testpmd? >> >> The rte_flow rule "flow create 0 ingress pattern eth / end actions drop = / >> end" >> you used in below test is not supported, it should return an explicit >> error >> when you tried to create it, it's an software bug and we'll fix it. >> >> As for how to drop an available rule in testpmd, you can refer to >> >> https://doc.dpdk.org/guides/howto/rte_flow.html >> >> The flow rule example in it is: flow create 0 ingress pattern eth / vlan >> / ipv4 dst is 192.168.3.2 / end actions drop / end >> >> Also, the statistic you get from `show port stats 0` is obtained by >> reading vsi >> registers, it will record all packets hardware received even if the >> packet will >> be filtered out by the rte flow. Instead, you can try to `set verbose 1` >> in testpmd, >> then you can observe whether the rte_flow rule takes effect or not. >> >> >- Also, is there a list of Intel NICs that support rte_flow with >> descriptions of what rte_flow features they support? >> > >> >> Unfortunately, there is no such list info available currently, but we'll >> try to >> improve our doc in dpdk repo. >> >> @beilei, @qi, correct me if I am wrong. >> >> Thanks, >> Xiaolong >> >> >My NIC is an Intel X710. Using DPDK 19.02. >> >My steps: >> >*(1) Start testpmd:* >> >$ sudo ./build/app/testpmd =E2=80=93l 12,13,14 =E2=80=93n 4 -- -i >> >EAL: Detected 56 lcore(s) >> >EAL: Detected 2 NUMA nodes >> >EAL: Multi-process socket /var/run/dpdk/rte/mp_socket >> >EAL: No free hugepages reported in hugepages-1048576kB >> >EAL: Probing VFIO support... >> >EAL: VFIO support initialized >> >EAL: PCI device 0000:08:00.0 on NUMA socket 0 >> >EAL: probe driver: 8086:1572 net_i40e >> >EAL: using IOMMU type 1 (Type 1) >> >EAL: PCI device 0000:08:00.1 on NUMA socket 0 >> >EAL: probe driver: 8086:1572 net_i40e >> >EAL: PCI device 0000:82:00.0 on NUMA socket 1 >> >EAL: probe driver: 8086:1572 net_i40e >> >EAL: PCI device 0000:82:00.1 on NUMA socket 1 >> >EAL: probe driver: 8086:1572 net_i40e >> >Interactive-mode selected >> >testpmd: create a new mbuf pool : n=3D587456, >> size=3D2176, >> >socket=3D0 >> >testpmd: preferred mempool ops selected: ring_mp_mc >> >testpmd: create a new mbuf pool : n=3D587456, >> size=3D2176, >> >socket=3D1 >> >testpmd: preferred mempool ops selected: ring_mp_mc Configuring Port 0 >> (socket 0) Port 0: 3C:FD:FE:CE:EC:54 Configuring Port 1 (socket 1) Port = 1: >> 3C:FD:FE:CE:EE:08 Checking link statuses... >> >Done >> >testpmd> sta >> >Port 1: link state change event >> >Port 0: link state change event >> > >> >(*2) Start forwarding traffic between two ports* >> >testpmd> start >> >io packet forwarding - ports=3D2 - cores=3D1 - streams=3D2 - NUMA suppo= rt >> enabled, MP allocation mode: native Logical Core 1 (socket 0) forwards >> packets on 2 streams: >> > RX P=3D0/Q=3D0 (socket 0) -> TX P=3D1/Q=3D0 (socket 1) peer=3D02:00:0= 0:00:00:01 >> > RX P=3D1/Q=3D0 (socket 1) -> TX P=3D0/Q=3D0 (socket 0) peer=3D02:00:0= 0:00:00:00 >> > io packet forwarding packets/burst=3D32 >> > nb forwarding cores=3D1 - nb forwarding ports=3D2 >> > port 0: RX queue number: 1 Tx queue number: 1 >> > Rx offloads=3D0x0 Tx offloads=3D0x10000 >> > RX queue: 0 >> > RX desc=3D256 - RX free threshold=3D32 >> > RX threshold registers: pthresh=3D8 hthresh=3D8 wthresh=3D0 >> > RX Offloads=3D0x0 >> > TX queue: 0 >> > TX desc=3D256 - TX free threshold=3D32 >> > TX threshold registers: pthresh=3D32 hthresh=3D0 wthresh=3D0 >> > TX offloads=3D0x0 - TX RS bit threshold=3D32 >> > port 1: RX queue number: 1 Tx queue number: 1 >> > Rx offloads=3D0x0 Tx offloads=3D0x10000 >> > RX queue: 0 >> > RX desc=3D256 - RX free threshold=3D32 >> > RX threshold registers: pthresh=3D8 hthresh=3D8 wthresh=3D0 >> > RX Offloads=3D0x0 >> > TX queue: 0 >> > TX desc=3D256 - TX free threshold=3D32 >> > TX threshold registers: pthresh=3D32 hthresh=3D0 wthresh=3D0 >> > TX offloads=3D0x0 - TX RS bit threshold=3D32 >> > >> >*(3) Check that traffic is flowing: OK* >> > >> >testpmd> show port stats all >> > ######################## NIC statistics for port 0 >> ######################## >> > RX-packets: 2565456 RX-missed: 5780962 RX-bytes: 4512982511 >> > RX-errors: 2 >> > RX-nombuf: 0 >> > TX-packets: 2562340 TX-errors: 0 TX-bytes: 1383470795 >> > Throughput (since last show) >> > Rx-pps: 0 >> > Tx-pps: 0 >> > >> >> >#######################################################################= ############################# >> >NIC statistics for port 1 >> >######################## >> > RX-packets: 2563321 RX-missed: 5470250 RX-bytes: 4360388448 >> > RX-errors: 2 >> > RX-nombuf: 0 >> > TX-packets: 2565053 TX-errors: 0 TX-bytes: 1384794806 >> > Throughput (since last show) >> > Rx-pps: 0 >> > Tx-pps: 0 >> > >> >> >#######################################################################= ##### >> > >> >testpmd> show port stats all >> > ######################## NIC statistics for port 0 >> ######################## >> > RX-packets: 3738196 RX-missed: 5781554 RX-bytes: 5226453840 >> > RX-errors: 2 >> > RX-nombuf: 0 >> > TX-packets: 3733847 TX-errors: 0 TX-bytes: 2095944031 >> > Throughput (since last show) >> > Rx-pps: 1146794 >> > Tx-pps: 1145588 >> > >> >> >#######################################################################= ############################# >> >NIC statistics for port 1 >> >######################## >> > RX-packets: 3734584 RX-missed: 5470836 RX-bytes: 5073167767 >> > RX-errors: 2 >> > RX-nombuf: 0 >> > TX-packets: 3737663 TX-errors: 0 TX-bytes: 2097873710 >> > Throughput (since last show) >> > Rx-pps: 1145356 >> > Tx-pps: 1146673 >> > >> >> >#######################################################################= ##### >> > >> > >> >*(4) Set filters to drop all eth traffic from both ports* >> > >> > >> >testpmd> flow create 0 ingress pattern eth / end actions drop / end >> > >> >Flow rule #0 created >> > >> >testpmd> flow create 1 ingress pattern eth / end actions drop / end >> > >> >Flow rule #0 created >> > >> > >> >*(5) Check whether traffic is dropped. Traffic is actually not being >> dropped, so the filter does not seem to work.* >> > >> > >> >testpmd> show port stats all >> > ######################## NIC statistics for port 0 >> ######################## >> > RX-packets: 22396701 RX-missed: 5807012 RX-bytes: 15827722523 >> > RX-errors: 2 >> > RX-nombuf: 0 >> > TX-packets: 22345743 TX-errors: 0 TX-bytes: 12669400435 >> > Throughput (since last show) >> > Rx-pps: 1149437 >> > Tx-pps: 1146447 >> > >> >> >#######################################################################= ############################# >> >NIC statistics for port 1 >> >######################## >> > RX-packets: 22369666 RX-missed: 5496215 RX-bytes: 15660935280 >> > RX-errors: 2 >> > RX-nombuf: 0 >> > TX-packets: 22333043 TX-errors: 0 TX-bytes: 12682032499 >> > Throughput (since last show) >> > Rx-pps: 1147969 >> > Tx-pps: 1145246 >> > >> > >> >> >#######################################################################= ##### >> >testpmd> show port stats all >> > ######################## NIC statistics for port 0 >> ######################## >> > RX-packets: 25054000 RX-missed: 5810727 RX-bytes: 16926854689 >> > RX-errors: 2 >> > RX-nombuf: 0 >> > TX-packets: 24977043 TX-errors: 0 TX-bytes: 13764321537 >> > Throughput (since last show) >> > Rx-pps: 1405948 >> > Tx-pps: 1392192 >> > >> > >> >> >#######################################################################= ############################# >> >NIC statistics for port 1 >> >######################## >> > RX-packets: 25024585 RX-missed: 5499881 RX-bytes: 16758760036 >> > RX-errors: 2 >> > RX-nombuf: 0 >> > TX-packets: 24966843 TX-errors: 0 TX-bytes: 13778185984 >> > Throughput (since last show) >> > Rx-pps: 1404664 >> > Tx-pps: 1393490 >> > >> >> >#######################################################################= ##### >> > >> >Thanks, >> > >> >Sruthi >> >