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 EC938A0524; Thu, 4 Feb 2021 15:41:57 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8DAA72405F3; Thu, 4 Feb 2021 15:41:57 +0100 (CET) Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by mails.dpdk.org (Postfix) with ESMTP id 8C9842405BD; Thu, 4 Feb 2021 15:41:55 +0100 (CET) Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 04 Feb 2021 06:41:54 -0800 Received: from HQMAIL105.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Thu, 04 Feb 2021 06:41:54 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Thu, 04 Feb 2021 06:41:54 -0800 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 4 Feb 2021 14:41:54 +0000 Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 4 Feb 2021 14:41:54 +0000 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.109) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Thu, 4 Feb 2021 14:41:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jaet8+cj7BrfOaeQvAgsxDNr5s8AVTAvBtOsRyjCTaxHwyCcV0u7dAoOWukwfCqH2Mcu3gcbSTAYT57MOVE0LEzCJ8Yx31hHil4MUR76wTzwmqlVq4vUpq88DuIE7IwhY1Xqb16YkIeupM04v5LoqFiOd8oR9QZCLmXoiXgUzZ87aZXV0uGW7b8xTMz2HwrpimTSc8It/IXgLqzjkL8O7ljnR3f4Pr5ZRJAESnGGwP/OZW0rRiQPtNsxhA3Pzy7yZ581f35qgz6D3dhmHkhg8k8vDZ9/aRfqR4fgR0bIqnPvRe1ZZ4Gk+84KMQYlqBmThj7tp/kntuf+U64M/stj/A== 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=K9djm6Iw5xSK9vlLDLD3tz2cvLVeUCq6Q3nSf0CwSlc=; b=n8SgC/maKnubPduIDmDPWC/0CxcURrghjaWiF0T2nG1TuQGP3pDWZJQsl3QK+jiJ3Bzqw6E7xWwrcu+uP9fHAOfGzGF6/5IXf+35CfO9wsA4cGTXYk+Y63P6OQ/oPKVhxfrtXy7wjdEXtIwlUIscU6C5Q8zdhiHc2NYX3j70/ZkZLmXBB6xamh2hPmHbOfkKCyrOnfp+Mm84IZyHZjgpNiUpsD/ojpUIVHzgm7dhmIlcnJxkPp2vNHv84BM1L+i83Hoh0mB74hWcGwP5B/w+h3qsJNVPzK5v+Doz9OoOpDNgBiLCiE0lWLVtbEPfE3OAXgnNhB9bda0w9MfQ+uSCRQ== 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 Received: from DM6PR12MB2748.namprd12.prod.outlook.com (2603:10b6:5:43::28) by DM5PR12MB1465.namprd12.prod.outlook.com (2603:10b6:4:7::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.17; Thu, 4 Feb 2021 14:41:52 +0000 Received: from DM6PR12MB2748.namprd12.prod.outlook.com ([fe80::759a:fb10:c6af:87a3]) by DM6PR12MB2748.namprd12.prod.outlook.com ([fe80::759a:fb10:c6af:87a3%7]) with mapi id 15.20.3742.015; Thu, 4 Feb 2021 14:41:52 +0000 From: Raslan Darawsheh To: "Jiawei(Jonny) Wang" , Slava Ovsiienko , Matan Azrad , Ori Kam , NBU-Contact-Thomas Monjalon CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix E-Switch egress mirror flow validation Thread-Index: AQHW+gbC+wse2C7o/kOTBOg1HLgozKpIE5dA Date: Thu, 4 Feb 2021 14:41:52 +0000 Message-ID: References: <1612340957-128181-1-git-send-email-jiaweiw@nvidia.com> In-Reply-To: <1612340957-128181-1-git-send-email-jiaweiw@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [188.161.230.58] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 632941f4-742d-4696-da84-08d8c91b030f x-ms-traffictypediagnostic: DM5PR12MB1465: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-header: ProcessedBy-CMR-outbound x-ms-oob-tlc-oobclassifiers: OLM:5236; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dphkXUEw4/X6H9RciIXGs26qjdonfeB7LrGNvIrWYnqPvNUqf+X5UZTj4u4dJyS1MvkfjyD8xs0AIGe+mb+IxqMah+5+msHsan1QBoPemBulJ7X5dtfGP892OUyxXLGXcvZ71ethh2C85rH8uPtp3RaDM61CYZ1kYTw14MC0P5hIH9DyExiRX97ciMSbWf+kRUTkC7KEMZTJ4MzJtCn2UZc0WAH3gDWXVnhhw9XsQv1vxdcp1JRLfwMbyyEN9Nut5ab5ILIUNFCBNgV3zNJ2pxY+CkawHJ4ntrqKguMrbUqMaFlZPuTwsPR7XzfzriUWjau0XOQY4k1RDrbWCU0OLVDaR7gzFFssl3QjB6EXRW2PxROWKkNGPkSsEGV2OizL8cLkT7iyYffdMQod3Mp2y8ApX6nxKbiCUP4aKpiCU7oUtXZ7f/PDlC+w9Wapw2dDpdfWrNfP3flYQ2GGOKecYMlEcy/ef5jc1U5SBNSjwzzxMthERriofgxD1egTBf2nSdGZAJMJVEPATxbOfD/kFQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB2748.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(396003)(376002)(366004)(39860400002)(5660300002)(7696005)(54906003)(478600001)(71200400001)(55016002)(66946007)(66556008)(316002)(86362001)(8936002)(64756008)(76116006)(66476007)(52536014)(6506007)(26005)(8676002)(53546011)(83380400001)(33656002)(66446008)(186003)(4326008)(2906002)(9686003)(110136005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?EEnHS1l9RdHLKkM2mNLWezL3YVO/P05JY/cOuC5SrjXO0yNblYcs3jppBlMF?= =?us-ascii?Q?0UfcRlArGyJJmsZPzrCb4i5J/apHb8ZhVhRGKo2BcyVwxqqOkvWxuZXvBk12?= =?us-ascii?Q?LWdExUdqcTaHEfjv3Xj03i1lQxGTlzxEbkDrWleSUN4N9v5WIZqXa5uo6qd4?= =?us-ascii?Q?QhNqhZBnmPXKpUdXSIK/c2dk3BZ7YbyTheMzRKT2SZuNYzUue8g2UxH+ApUl?= =?us-ascii?Q?91N7Tubo7HEBPaKLuPG9OxNVGkpRPOlAE/RfDEK7qE3SS3ab8d/m9kr/gsFX?= =?us-ascii?Q?JULfoXBLqk0V7vvMmMay/Jy+ffPlDigKadx8cYuWFTXBG5+5Xj6HGu4YqLWM?= =?us-ascii?Q?oVBVnq9CzLQIttvhyZ3YJsgllDWhSlN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WswlnLhvb4ThKBGpdL9amkwCSA+oNPj84YPGuDdSFlZxU7wKaF/6LoPvpn?= =?us-ascii?Q?gYdBDeNc1MXvHjnfqQQeX+4G?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB2748.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 632941f4-742d-4696-da84-08d8c91b030f X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Feb 2021 14:41:52.3436 (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: cnIg/WeFIzpsqAzwT+0TEFQJo6MZ1ytjx1s6n76Tq2drbA6IMwI2EDUbEOWS55vWic8Z5aFNVz7nGAGOjdb5Lg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1465 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1612449714; bh=K9djm6Iw5xSK9vlLDLD3tz2cvLVeUCq6Q3nSf0CwSlc=; h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature: ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic: Thread-Index:Date:Message-ID:References:In-Reply-To: Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ld-processed: x-ms-exchange-transport-forked:x-microsoft-antispam-prvs:x-header: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: Content-Type:Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=qJkj34YRKIUeAkw77SyWSWoUMnXos4tJV7uV7jSZypcBf6FGLTygK1wPM7/YQZ+6q gpre4JdtBUmxyvV+W0mNtfRgGeSS/W4whqvHYNCW4S63f+BENUJcmkTJ1X/Ocn3nkS 2sCMfwyE7R5/dzSFYoA7hFoidpR25DYPA+4x0lbBtl+ZWwFYJtoU2u1Y5hNU3woh0J ONUhADA6PXmb9OeIGh4nbywvcmrV2X1z/RWjZ+Id1aLUa44yO4WM58BACh4KYdQGOz 1frywV44WLaT0JPEK3dyo+yMqXn+njcyQmCzMHFttQLDkHMIUqsEmbxPvHsnl4ntV9 SYBre/kuJdsuA== Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix E-Switch egress mirror flow validation 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, > -----Original Message----- > From: Jiawei Wang > Sent: Wednesday, February 3, 2021 10:29 AM > To: Slava Ovsiienko ; Matan Azrad > ; Ori Kam ; NBU-Contact-Thomas > Monjalon > Cc: dev@dpdk.org; Raslan Darawsheh ; > stable@dpdk.org > Subject: [PATCH] net/mlx5: fix E-Switch egress mirror flow validation >=20 > The stored metadata in all registers C were lost in E-Switch egress > mirroring flows due to HW limitation. The register C0 keeps the > source vport index that also was used as one of the flow matcher. >=20 > While sample action and jump action (jump to table X) was in the > E-Switch egress flow, the flow in the next table X wasn't hit since > source vport value lost. >=20 > The modify actions after sample action should be applied to the packet > on normal path, not to the sampled packet. In order to support this > mlx5 PMD splits the flow into sub flows and jump action is engaged > implicitly, causing malfunction due to registers corruption. >=20 > This patch adds the validation the for E-Switch mirroring jump egress > flow, and checks for this hidden jump as well and reject the flows with > modify actions after sampling. >=20 > Fixes: 6a951567c159 ("net/mlx5: support E-Switch mirroring and jump in on= e > flow") > Cc: stable@dpdk.org >=20 > Signed-off-by: Jiawei Wang > Acked-by: Viacheslav Ovsiienko > --- Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh