From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5A8B6A056A; Thu, 11 Mar 2021 17:32:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D6C38160829; Thu, 11 Mar 2021 17:32:55 +0100 (CET) Received: from office2.cesnet.cz (office2.cesnet.cz [195.113.144.244]) by mails.dpdk.org (Postfix) with ESMTP id 660A6406A3 for ; Thu, 11 Mar 2021 17:32:54 +0100 (CET) Received: from tanguero.localdomain (unknown [95.82.135.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by office2.cesnet.cz (Postfix) with ESMTPSA id 9108340006C; Thu, 11 Mar 2021 17:32:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2-2020; t=1615480374; bh=+UfrQZgVwGWXNUhP05OaTUEu5CRbIEx+i5irro8QGaY=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=P/HY+3qflkJuTHgccpif+52H1vwJ9FquogkjGObprVKrHFzmxOBWmE6K1M0aaPZGP F4NBMIVCooQqbo3E5euOVnbd4EgyA9f6ohJtYmKbJWIKh7GVdUlU+uT5omGsB8zQ85 2lA3efaNd7kxri4Ec+DdFe3RE/silg+mZ+chL5L6YCNc8HWdXwoGD8vt/9WSMvHkzv okVC1uTjwghvSVcFlVhRF/lxvapW4v+8jscVBn9F2XGfSqKVpTuni7BWCX0siJD2fT nlpb7Cm8F1zjuLsPz8DOOldbJBNlq3Wrr8R6viW9736oXty3bhWCm0CkSOAYua0HG5 DMjPS4VFaLysg== Date: Thu, 11 Mar 2021 17:32:52 +0100 From: Jan Viktorin To: "Jiawei(Jonny) Wang" Cc: Slava Ovsiienko , Asaf Penso , "dev@dpdk.org" , Ori Kam Message-ID: <20210311173252.5c3dc2ab@tanguero.localdomain> In-Reply-To: References: <20200918145618.052ee504@tanguero.localdomain> <20210301132126.437df4df@tanguero.localdomain> <20210301154326.344c2e1f@tanguero.localdomain> Organization: CESNET MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] Duplicating traffic with RTE Flow X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 11 Mar 2021 02:11:07 +0000 "Jiawei(Jonny) Wang" wrote: > Hi Jan, > > Sorry for late response, > > First rule is invalid, port only works on FDB domain so need 'transfer' here; > Second rule should be ok, could you please check if the port 1 was enabled on you dpdk application? I assume that it is enabled, see full transcript: $ ofed_info MLNX_OFED_LINUX-5.2-1.0.4.0 (OFED-5.2-1.0.4): ... $ sudo dpdk-testpmd -v -- -i EAL: Detected 24 lcore(s) EAL: Detected 1 NUMA nodes EAL: RTE Version: 'DPDK 20.11.0' EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'PA' EAL: No available hugepages reported in hugepages-1048576kB EAL: Probing VFIO support... EAL: Probe PCI driver: mlx5_pci (15b3:1017) device: 0000:04:00.0 (socket 0) mlx5_pci: No available register for Sampler. mlx5_pci: Size 0xFFFF is not power of 2, will be aligned to 0x10000. EAL: Probe PCI driver: mlx5_pci (15b3:1017) device: 0000:04:00.1 (socket 0) mlx5_pci: No available register for Sampler. mlx5_pci: Size 0xFFFF is not power of 2, will be aligned to 0x10000. EAL: No legacy callbacks, legacy socket not created Interactive-mode selected testpmd: create a new mbuf pool : n=331456, size=2176, socket=0 testpmd: preferred mempool ops selected: ring_mp_mc Configuring Port 0 (socket 0) Port 0: B8:59:9F:E2:09:F6 Configuring Port 1 (socket 0) Port 1: B8:59:9F:E2:09:F7 Checking link statuses... Done testpmd> port start 1 Port 1 is now not stopped Please stop the ports first Done testpmd> set sample_actions 0 port_id id 1 / end testpmd> flow validate 0 ingress transfer pattern end actions sample ratio 1 index 0 / drop / end port_flow_complain(): Caught PMD error type 1 (cause unspecified): (no stated reason): Operation not supported testpmd> flow create 0 ingress transfer pattern end actions sample ratio 1 index 0 / drop / end port_flow_complain(): Caught PMD error type 1 (cause unspecified): (no stated reason): Operation not supported testpmd> Stopping port 0... Stopping ports... Done Stopping port 1... Stopping ports... Done Shutting down port 0... Closing ports... Port 0 is closed Done Shutting down port 1... Closing ports... Port 1 is closed Done Bye... Jan > > Thanks. > Jonny > > > -----Original Message----- > > From: Jan Viktorin > > Sent: Monday, March 1, 2021 10:43 PM > > To: Slava Ovsiienko > > Cc: Asaf Penso ; dev@dpdk.org; Ori Kam > > ; Jiawei(Jonny) Wang > > Subject: Re: [dpdk-dev] Duplicating traffic with RTE Flow > > > > On Mon, 1 Mar 2021 14:34:07 +0000 > > Slava Ovsiienko wrote: > > > > > Hi, Jan > > > > > > To use port action (I see it is in your sample action list) the flow > > > should be applied to the FDB domain, ie "transfer" attribute should be > > specified: > > > > > > flow validate 0 ingress transfer... > > > > As you can see (however, it's a bit messy in the response below, in [1], it is > > better), I tried both. First without transfer and second with. The first gives > > hint "action is valid in transfer mode only" but the second try with transfer > > gives "Operation not supported". > > > > Jan > > > > [1] http://mails.dpdk.org/archives/dev/2021-March/200475.html > > > > > > > > With best regards, Slava > > > > > > > -----Original Message----- > > > > From: Jan Viktorin > > > > Sent: Monday, March 1, 2021 14:21 > > > > To: Asaf Penso > > > > Cc: dev@dpdk.org; Ori Kam ; Jiawei(Jonny) Wang > > > > ; Slava Ovsiienko > > > > Subject: Re: [dpdk-dev] Duplicating traffic with RTE Flow > > > > > > > > Hello Asaf, > > > > > > > > it is a while we were in touch regarding this topic. Finally, I am > > > > again trying to get work this feature. I've seen that sampling is > > > > already upstreamed which is great. However, I am not very successful > > > > with that. There is nearly no documentation, just [1], I found no examples, > > just commit logs... > > > > > > > > I tried: > > > > > > > > > set sample_actions 0 port_id id 1 / end > flow validate 0 > > > > ingress pattern end actions sample ratio 1 index 0 / drop / end > > > > port_flow_complain(): Caught PMD error type 1 (cause unspecified): > > > > port id action is valid in transfer mode only: Operation not > > > > supported > flow validate > > > > 0 ingress transfer pattern end actions sample ratio 1 index 0 / drop > > > > / end > > > > port_flow_complain(): Caught PMD error type 1 (cause unspecified): > > > > (no stated reason): Operation not supported > > > > > > > > Using CentOS 7, DPDK 20.11.0, OFED-5.2-1.0.4. > > > > NICs: MT2892 Family [ConnectX-6 Dx] 101d (fw 22.28.1002), MT27800 > > > > Family [ConnectX-5] 1017 (fw 16.27.2008). > > > > > > > > My primary goal is to be able to deliver exactly the same packets > > > > both to DPDK and to the Linux kernel. Doing this at RTE Flow level > > > > would be great due to performance and transparency. > > > > > > > > Jan > > > > > > > > [1] > > > > https://doc.dpdk.org/guides/prog_guide/rte_flow.html#action-sample > > > > > > > > On Fri, 18 Sep 2020 14:23:42 +0000 > > > > Asaf Penso wrote: > > > > > > > > > Hello Jan, > > > > > > > > > > You can have a look in series [1] where we propose to add APIs to > > > > DPDK20.11 for both mirroring and sampling for packets, with > > > > additional actions of the different traffic. > > > > > > > > > > [1] > > > > > http://patches.dpdk.org/project/dpdk/list/?series=12045 > > > > > > > > > > Regards, > > > > > Asaf Penso > > > > > > > > > > >-----Original Message----- > > > > > >From: dev On Behalf Of Jan Viktorin > > > > > >Sent: Friday, September 18, 2020 3:56 PM > > > > > >To: dev@dpdk.org > > > > > >Subject: [dpdk-dev] Duplicating traffic with RTE Flow > > > > > > > > > > > >Hello all, > > > > > > > > > > > >we are looking for a way to duplicate ingress traffic in hardware. > > > > > > > > > > > >There is an example in [1] suggesting to insert two fate actions > > > > > >into the RTE Flow actions array like: > > > > > > > > > > > > flow create 0 ingress pattern end \ > > > > > > actions queue index 0 / void / queue index 1 / end > > > > > > > > > > > >But our experience is that PMDs reject two fate actions (tried > > > > > >with mlx5). Another similar approach would be to deliver every > > > > > >single packet into two virtual > > > > > >functions: > > > > > > > > > > > > flow create 0 ingress pattern end \ > > > > > > actions vf index 0 / vf index 1 / end > > > > > > > > > > > >Third possibility was to use passthru: > > > > > > > > > > > > flow create 0 ingress pattern end \ > > > > > > actions passthru / vf index 0 / end flow create 0 ingress > > > > > > pattern end \ > > > > > > actions vf index 1 / end > > > > > > > > > > > >Again, tried on mlx5 and it does not support the passthru. > > > > > > > > > > > >Last idea was to use isolate with passthru (to deliver both to > > > > > >DPDK application and to the kernel) but again there was no > > > > > >support on mlx5 for > > > > passthru... > > > > > > > > > > > > flow isolate 0 true > > > > > > flow create 0 ingress pattern end actions passthru / rss end / > > > > > > end > > > > > > > > > > > >Is there any other possibility or PMD+NIC that is known to solve > > > > > >such > > > > issue? > > > > > > > > > > > >Thanks > > > > > >Jan Viktorin > > > > > > > > > > > >[1] > > > > > >https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F% > > 2 > > > > > >Fdoc > > > > > >.dpdk > > > > > >.org%2Fguides%2Fprog_guide%2Frte_flow.html%23table-rte-flow- > > redir > > > > > >ect- > > > > > >queue-5- > > > > > > > > > >3&data=02%7C01%7Casafp%40nvidia.com%7C1a46005bec5245e72 > > 9e70 > > > > 8d > > > > > > > > > >85bd24caf%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C6373 > > 6030 > > > > 60 > > > > > > > > > >73519816&sdata=EOF%2Fz62crvBZK8rwzwKIWxj5cVlfPVnU3FLmcL9 > > X2w0 > > > > %3 > > > > > >D&reserved=0 > > > >