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 98F3941E19 for ; Wed, 8 Mar 2023 04:04:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 932694113C; Wed, 8 Mar 2023 04:04:06 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2074.outbound.protection.outlook.com [40.107.101.74]) by mails.dpdk.org (Postfix) with ESMTP id 9A5AF40E03; Wed, 8 Mar 2023 04:04:03 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mXsdq31z6r8uogPN6ZXrth9uyhaXpYMut4nFAHUbOgzYHAcKtjRQ9lt1vpEzphRNBXK4Rmr5BNZDXEreBuv4wWpzgiu4pw6ee+V1pwQNjrjCa7ddc4dIHfekw9OkjW9pAWMK5oDNrlct2GIXO6lq9QyWwEN2WiDq0w7oZUhtWg1xhTTGfq5e/5Ra0V5ratyQ3We9MRJQi7Nrlcg28kApevw85rxLlscYXTVkMwnuww5ilt0bOZRjNHwA88b0KLNf1nwQdFIpA4GDnARqrrEhyQY8Op6jhQRQy6PwAOQ8gYw3u26D0hx1psFu0bKaO2abMh9CVrkYlcbKN9VvB5h21w== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0fIWJpOp7nTeC1f3BVAlPFMV12XYUTrPFG9kucxGztw=; b=NLQ3WzY0f+djew4cMWu3my+Y4+nBkDawxTpJ7wKRz1cPOPjg+hW8dIGxvHxUSt/NecFMA8skC/WLqd/9DPRZkzqkWhu6VGV0SGX8v6V0CYKFbRouFWvM4t75TzC6B00OtPa9c4DASi/Y0do1KBhtaYyrdGtafd2VmvafWRYQIyD8GzqzmFkfJr/0Wf+HqYZVEFyD6sx/XllIEGpPLbE6UBWU8+kBVJAVvPpr52Ko0lb9tiOKXMwxW8rQCnVZ10rdSutZu9oqdygx23yUcuALS04PcdR6PuEx2EpXWtuKfIP4WESRsxyj3Sr3MQBX1fG6DbQC4dTSlqI3kUazBeKF/w== 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=0fIWJpOp7nTeC1f3BVAlPFMV12XYUTrPFG9kucxGztw=; b=Xt5FW5tKzWugR6rIQTrPXak2P09aeTVJIj4LnHc0NzMhrcPayrQXCvt5EnV4Qom6Wb6m8U1G4DSQOluOq07l7HJPIpfxwsm0q6lsUsjPESIAaxlPlB9bpEe7ZkKmVZmIPxl0AIHXVArVqg7cKnHsRSkZW+drGq61kM69xl1B3+QjvMbkLDDJy3lsuZuuSkom7IoUa+x48J1IIvUeXQFpQJ8WukRGunwxNFlf3qiUc/WRSSTok/aSye7KECBck9kPDSyTMiQnt4DEvZyBcHT1BZCKwB7WbMGhpKxWYD5TssVzPdMnnzuHNi6BWSnwfkI3e5wDN0i8V0l/mVDLaXXZXw== Received: from CO6PR12MB5396.namprd12.prod.outlook.com (2603:10b6:303:139::8) by SJ0PR12MB5487.namprd12.prod.outlook.com (2603:10b6:a03:301::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.17; Wed, 8 Mar 2023 03:04:01 +0000 Received: from CO6PR12MB5396.namprd12.prod.outlook.com ([fe80::e1dc:525:d45b:94d3]) by CO6PR12MB5396.namprd12.prod.outlook.com ([fe80::e1dc:525:d45b:94d3%8]) with mapi id 15.20.6156.029; Wed, 8 Mar 2023 03:04:01 +0000 From: Suanming Mou To: Dariusz Sosnowski , Matan Azrad , Slava Ovsiienko CC: "dev@dpdk.org" , "stable@dpdk.org" , Ori Kam Subject: RE: [PATCH 1/2] net/mlx5: fix egress group translation in HWS Thread-Topic: [PATCH 1/2] net/mlx5: fix egress group translation in HWS Thread-Index: AQHZSVZw2xn7p54mvk21Y0Gt7GtnPa7wQngA Date: Wed, 8 Mar 2023 03:04:01 +0000 Message-ID: References: <20230225201810.10838-1-dsosnowski@nvidia.com> <20230225201810.10838-2-dsosnowski@nvidia.com> In-Reply-To: <20230225201810.10838-2-dsosnowski@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO6PR12MB5396:EE_|SJ0PR12MB5487:EE_ x-ms-office365-filtering-correlation-id: 56debafd-50b5-4795-918d-08db1f81c4a2 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: on3vcw9yAqo6IzFunAGzs8O5Pb/bKO+W9YAiiAtGSlOiFsEihlgjwbwoaWSO1qiPudQ/ejE9BQ9Lief5lO8OklpAZXS5YjLppvKCT/ylWqLhhNq/7+ibwLIEfprHL7HCc83lgLgt0M2jO9oXrzfBBCXlwc1KSOqNLW/JDJJI1xqakwg0vYfYM9keySNp9s4Yx8DbuGq1qAGrOIHEpFcMr5hItO37tnan5B5KDCNS1VwjYErTBl6pS+BZQy2sAemZw7I5iKsXkwOFZKbKQTKJ+eXpOO/6iX+v1mOUgzVM61NtRSebFIHaVSMJxlNu/DTL05y12988wlV+9aZ2Wxi8lC8HC8M8Ey9eUtBunwZZtQWNWkoZsgqCoGdRswnwtvRf1fDia8prW8s3SPTCL1JFXHfgO2UguUS1tViIHXaJ8Snn+ccAoRRfPXIVwyYUjsWRnO49Ap1sWgnlXTDt3pI+X6yI33tBLo9VZa16KEqyCgJp0BbwlUr+tluJp3IirqHY3qawORDRzQuvPgeBpCYhFGh/1MB0YjWs0UR4q4aLQtAWB5gz5l//FtM4JU7gCYnIfB1tMiOjjtmbrZNRmuGVVXNSyMII/JIWSiv6S110hGI1Le/WnfrG8GM+aGmzQWdpv6QaAbEZZlC/aNwfSuzC6vPxkNoV0AxoBP8vSSBcBvx1TAkyYTYVvYnjOANW6yLew+hsk4xAZjiu2kHnIuzJoQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR12MB5396.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(376002)(136003)(396003)(366004)(39860400002)(346002)(451199018)(2906002)(186003)(9686003)(38100700002)(26005)(38070700005)(122000001)(6506007)(53546011)(5660300002)(107886003)(8936002)(52536014)(41300700001)(110136005)(33656002)(86362001)(66556008)(8676002)(64756008)(66446008)(66476007)(66946007)(4326008)(76116006)(55016003)(450100002)(71200400001)(478600001)(316002)(7696005)(83380400001)(54906003)(6636002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?LI+TSArsCa78Cq4+TGqj8TgNQ8pgxQhQ5sjgGleLmmuesmwZRabSQk2+8Cym?= =?us-ascii?Q?MGvC6cEApcdQEFTj7hvsSF87incjdkZm4GvV0jGPgqp5J5a+HDIeFRpzL2Jy?= =?us-ascii?Q?K7Ps+8E6rFPPsTyJVF3zS7ljXCZKwbVacZT5eW6otyFbygjhQOxCMRd+ztmb?= =?us-ascii?Q?zlBUSBurEXYGjTNnGG7/DXAVCcE2fUdj3VAkUPvawJuy50zOCjwOwUM12yiu?= =?us-ascii?Q?dIuCQD7uuEIRgxhHU22wTLrOGY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ascii?Q?06OSlce2sbhGHNVnmuy5QcFKPHkcKlj+ZvnMB7Q7ug5MqE+IMXaA3Lbapp3z?= =?us-ascii?Q?fg6DJEzwxa8aH96lc5ocZHeoCZoKdoOk6F9v/Ibjm7YtoZkzZaEnSrRyy/Mj?= =?us-ascii?Q?U/Sfdw1v5Xdm8ycIIZJP7VsJswQpL1Y1sHqrAgveube7xfK7acKjVWPOCLXA?= =?us-ascii?Q?ApS99/2mxkXcga+ngzqXu1/nT8wD0ES2mYnYipTBpUkt5+OVVqvGGDQhliCk?= =?us-ascii?Q?ZHQJRCef4XAa5kWr8Ni4HgYG3kDhxyU53RrVm+wsp12nb23oOooGTFU9lr2Q?= =?us-ascii?Q?UFwEoEMdf7ppxi4UxuBmnd/zDKQuKoKt4npU8jB3sMSofhaVLnIJVqfAg5k/?= =?us-ascii?Q?mmw+F8ZF8Ib+1CTvnbISjk3v5OAv56xk6liWlfXZCsgcpvlIFYW1ojy98XX+?= =?us-ascii?Q?ExRv0sUrQC6+KgfI1BPcWAtc35AAi6Ps0P1teBD5?= 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: CO6PR12MB5396.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 56debafd-50b5-4795-918d-08db1f81c4a2 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2023 03:04:01.2819 (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: Y1maq1EU8wkaTf+mUZiqLhBGaVj8vxMF0Lz7ozC1QNXq2EXOII5pKLvu41QNkG07pcl3PnHIwC2l53BJQQR5TQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB5487 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org > -----Original Message----- > From: Dariusz Sosnowski > Sent: Sunday, February 26, 2023 4:18 AM > To: Matan Azrad ; Slava Ovsiienko > > Cc: dev@dpdk.org; stable@dpdk.org; Ori Kam > Subject: [PATCH 1/2] net/mlx5: fix egress group translation in HWS >=20 > With HW Steering enabled creating egress template tables and egress flow = rules > on E-Switch setups is allowed. > To enable it, PMD creates a set of default egress flow rules responsible = for: >=20 > - Storing representor ID (vport tag is used) in HW register. > This is used for traffic source identification. > - Copying software metadata to proper HW register to allow > preserving metadata across domains. >=20 > Structure of these flow rules and whether they are inserted depend on the > device configuration. > There are the following cases: >=20 > 1. repr_matching=3D1 and dv_xmeta_en=3D4 > - An egress flow rule in group 0 is created for each Tx queue; > - Flow rule matching SQ number - fills unused REG_C_0 bits > with vport tag, copies REG_A to REG_C_1 and jumps to group 1. > 2. repr_matching=3D1 and dv_xmeta_en=3D0 > - An egress flow rule in group 0 is created for each Tx queue; > - Flow rule matching SQ number - fills unused REG_C_0 bits > with vport tag and jumps to group 1. > 3. repr_matching=3D0 and dv_xmeta_en=3D4 > - A single egress flow rule in group 0 is created; > - Flow rule matches all E-Switch manager TX traffic, > copies REG_A to REG_C and jumps to group 1. > 4. repr_matching=3D0 and dv_xmeta_en=3D0 - no default flow rules are adde= d. >=20 > When default egress flow rules are required, they are inserted in group 0= and > this group is reserved for PMD purposes. > User created template tables must be created in higher groups. > As a result, on template table creation PMD is translating the provided g= roup > (incrementing it in that case). >=20 > Before this patch, a condition used to check if translation of egress flo= w group is > needed was incorrect. It did not allow translation if both representor ma= tching > AND extended metadata mode were enabled. >=20 > This patch fixes this condition - translation is allowed if and only if r= epresentor > matching OR extended metadata mode is enabled. >=20 > Fixes: 483181f7b6dd ("net/mlx5: support device control of representor > matching") > Cc: stable@dpdk.org >=20 > Signed-off-by: Dariusz Sosnowski > Acked-by: Ori Kam Acked-by: Suanming Mou