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 57DCCA0547; Fri, 12 Mar 2021 10:33:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 962EA1607EE; Fri, 12 Mar 2021 10:32:47 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2077.outbound.protection.outlook.com [40.107.220.77]) by mails.dpdk.org (Postfix) with ESMTP id 683CF1607ED for ; Fri, 12 Mar 2021 10:32:46 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Iv9MQf7+2HHWMq6ZqdRmyf+eyAFRidEHr6VnVHk6o0xNS8QyZDEibQ9LaZUUfzvaZ08++2R0i/0b2hPw+HcuKCI4hNTXElFUaEmL4fl3LRsPs3t9h5YFMC2446sH+jU3D7dARRYNFvS9VxpjvQ25t7QzPPDoJJ4NxB0jNHMh/7S7pvUzX1YCXxgtElkuXWBIn/9tJZ7uLfbpyTzQW8gwvbFoT6CvfOhc6hrUWhQ6HX8lFHENOdybF+3j8hgJBOQJq6FX9abhMIJsMYXr3zmaivNS5nC6kNNA8NM2Wp0Q4x+tr254I0D9t+qlpRItz3BXhzuts3MF4Vh6Pb5UhzoYow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l1LRSL+kcMCeGVVMHwQEpg6ReUIyvDHiVkDWBcKeo6g=; b=mEi+qdXDR28FqThfYPrUt4iHJZLXFCqQ/bIRkxeb5VDzS49akfV4ilCX90r9uOOqTQICb2FRpxBbaPh468+FwGMRQu+/9I6RmmcH5kjxvYjQEzElwuW7/V+Kzd+Pus1Jxqze3mFt8uvsxfAWycYsdNXJOBCAkxQsFue9HqSATyXB1nvBTp8ix4XD3Sn/88s0fCezTJJYCxOs6bjNaSCG/GZWeiDl736ssNzLfwX7xcjFbp0MYaXVdzH8wkUbPPp0YDvnnCt57paEsnp9V4ANaZ6sr9NFQqyFxIGQ/9U6D9OU9oJMJwGxsrlQrQHBbJyjEXDSbe7X/aBrfxc5QgoyqQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l1LRSL+kcMCeGVVMHwQEpg6ReUIyvDHiVkDWBcKeo6g=; b=heh79+cX7WLsixskNNTL3uAlmJgFVpSyOvktaeexVZ//NIO0DbsphYarewTU8NjWTXJBnI0NIX6OMXpUepBdXcORBliR5L6t/bqgElNempHU9MEaOPGlOqN5Y7lc39T308SB8vrspm520EqbnYv2uSaxdM1FOad1OPzN9aznu/X/ZHJL1B/jt6W5HfN0/R6vKEY6rp1zwPQbAV2NR+nZgRE0OYVblYGen6B2iUf/vXJtqlrztfpqXvo5YXOsYH5yCd9mhWEPJjITLoDmACc73AWs+zwRmb9bbx/2uCutf9Yg5xXlPOvOK+2at6egGS+mCO/ukuUDREdLjcQBYmhOzg== Received: from BL0PR12MB2419.namprd12.prod.outlook.com (2603:10b6:207:44::27) by MN2PR12MB4254.namprd12.prod.outlook.com (2603:10b6:208:1d0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Fri, 12 Mar 2021 09:32:44 +0000 Received: from BL0PR12MB2419.namprd12.prod.outlook.com ([fe80::7979:5ea5:f490:d87f]) by BL0PR12MB2419.namprd12.prod.outlook.com ([fe80::7979:5ea5:f490:d87f%5]) with mapi id 15.20.3912.030; Fri, 12 Mar 2021 09:32:44 +0000 From: "Jiawei(Jonny) Wang" To: Jan Viktorin CC: Slava Ovsiienko , Asaf Penso , "dev@dpdk.org" , Ori Kam Thread-Topic: [dpdk-dev] Duplicating traffic with RTE Flow Thread-Index: AQHWjbskaGtIlNoO40CpXwlnnA70Y6lucygAgQGcLgCAACUSgIAAApoAgA7j0ECAAPIUAIAA9Cmg Date: Fri, 12 Mar 2021 09:32:44 +0000 Message-ID: References: <20200918145618.052ee504@tanguero.localdomain> <20210301132126.437df4df@tanguero.localdomain> <20210301154326.344c2e1f@tanguero.localdomain> <20210311173252.5c3dc2ab@tanguero.localdomain> In-Reply-To: <20210311173252.5c3dc2ab@tanguero.localdomain> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: cesnet.cz; dkim=none (message not signed) header.d=none;cesnet.cz; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [163.125.176.70] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 00fa70c7-46c6-47fc-50c1-08d8e539ca78 x-ms-traffictypediagnostic: MN2PR12MB4254: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3968; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UUJEpphvrfbqhmIR64IN+qYNdUqU1ZuQYkOyOegAvaoFW/n3VzKY7mkPYbD5hgfOSbIA15/hgzaI+8CiBtHc7AGODkTyFM9vG6BveRhIr0FGDDTyvRGuSPUXw0yjHqZkdyPOu4yhM2pVNAdFXMG1f4anUPto4sncFAufZdr34ge3aUc42UPy7wbIOGF/gSg2MQZXbVP64MoyS23XIZH9S6hh8NYtDnLIVfmaWF3xz6bePHQaA0NpAsJW5f5gDzWQ+Vz57isTTHIZ74ChtFpsl/vCdMFVYi5lGZe4KOwjzdHvfZ++DzqVdSpfG76ArY5sNWW6LwvtAikbFbzLdD+Lc9HFGI1oi7EF6WYeCOPtgxSZZeae63aLAbVyOecQSy1c7P5T8dqqjTZM/9I4G5wsk9Z2t/Iwmciee/fCOQrV6yofa2SbOjrFn0s9TkNz3FyhLIKR8/M5LB6+TBlJBmqX0yOHf+e02XWCVA0zRUh1mWbolNwtBmRpVwSWT3Qx5Qaf6rMjTjJxAX6SRKruAZ9xb23InIH2DPcvkwWJHjV0ISoNCF621SBLV/VxHUeh32XwwkIE9kzoJ7iQM7XWNzvr8VdolhQm4CvqgRFnBYXbFjI= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR12MB2419.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(396003)(136003)(366004)(376002)(346002)(8936002)(8676002)(66446008)(71200400001)(107886003)(54906003)(316002)(6916009)(966005)(478600001)(45080400002)(83380400001)(33656002)(4326008)(66946007)(53546011)(6506007)(66476007)(76116006)(64756008)(66556008)(7696005)(9686003)(86362001)(5660300002)(52536014)(26005)(186003)(2906002)(55016002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?LfGzTuc2QsTIAhhgF9N0zTCD5M0x99/a7oi4Sks3TTzfXIGl1Pgxlv4bfOAb?= =?us-ascii?Q?2onWwz2CqoGthl/70PTreFIhFxzcONUxN33ZEn/jCctqHmciFDBsqr6jqScV?= =?us-ascii?Q?dYm2to8/kbR6+T1evw+q/C0KDom3waNwfYTdd2BPJGRVqVeYpXDhq61FZ62C?= =?us-ascii?Q?nVYj3j9lIi2ZfoiFqb2/7DMLeS9+t61qbXE2mfTYwwCSLtT7Y3vgriWnlDpI?= =?us-ascii?Q?ex6HcL/uSmZEA300mfEvqztGN0s+CUCPd2s60sAuHTnON4gbGGZ1zFGNjY5A?= =?us-ascii?Q?VW0YuhYZoEM5dXL3Z79nwMEQDXweV2UbbKA0YvazyJs+ptYrA8Y4VLkOlxR5?= =?us-ascii?Q?jlxnX+7+qaQa4a1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MEl?= =?us-ascii?Q?tyIdSvXGQB6dczsZ+0yKGZd0jxto3o0gQb4+pkq24XJEUaZI87IuJuTryoVB?= =?us-ascii?Q?9AQvuaVnZsiVQZOs2k/MhXFW?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL0PR12MB2419.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 00fa70c7-46c6-47fc-50c1-08d8e539ca78 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Mar 2021 09:32:44.4185 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: cbUCmFDT2HrptKdqSlc/YBWe63CmSQmnPqyKee48Jsbn9dJMqrav6LXQah5SOGCkGK1ja53/WAjK/aQKDiPzJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4254 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" Hi Jan, > -----Original Message----- > From: Jan Viktorin > Sent: Friday, March 12, 2021 12:33 AM > To: Jiawei(Jonny) Wang > Cc: Slava Ovsiienko ; Asaf Penso > ; dev@dpdk.org; Ori Kam > Subject: Re: [dpdk-dev] Duplicating traffic with RTE Flow >=20 > On Thu, 11 Mar 2021 02:11:07 +0000 > "Jiawei(Jonny) Wang" wrote: >=20 > > 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 t= he > port 1 was enabled on you dpdk application? >=20 > I assume that it is enabled, see full transcript: >=20 > $ 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=3D331456, size=3D2176, > socket=3D0 > 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) Por= t 1: > B8:59:9F:E2:09:F7 Checking link statuses... > Done Seems that you start two PF port here, Port 1 is not VF port; FDB rule can steering the packet form PF to its VFs and vice versa, Could y= ou please try to open the VF ports and start the testpmd with representor=3D. Thanks. > 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 >=20 > Stopping port 1... > Stopping ports... > Done >=20 > Shutting down port 0... > Closing ports... > Port 0 is closed > Done >=20 > Shutting down port 1... > Closing ports... > Port 1 is closed > Done >=20 > Bye... >=20 > Jan >=20 > > > > 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-samp > > > > > le > > > > > > > > > > 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=3D12045 > > > > > > > > > > > > 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 hardw= are. > > > > > > > > > > > > > >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=3Dhttps%3A= % > > > > > > >2F% > > > 2 > > > > > > >Fdoc > > > > > > >.dpdk > > > > > > >.org%2Fguides%2Fprog_guide%2Frte_flow.html%23table-rte-flow- > > > redir > > > > > > >ect- > > > > > > >queue-5- > > > > > > > > > > > >3&data=3D02%7C01%7Casafp%40nvidia.com%7C1a46005bec5245 > e72 > > > 9e70 > > > > > 8d > > > > > > > > > > > >85bd24caf%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C6 > 373 > > > 6030 > > > > > 60 > > > > > > > > > > > >73519816&sdata=3DEOF%2Fz62crvBZK8rwzwKIWxj5cVlfPVnU3FLm > cL9 > > > X2w0 > > > > > %3 > > > > > > >D&reserved=3D0 > > > > > >