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 906FBA00C3 for ; Tue, 21 Jun 2022 09:34:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 89F0A40151; Tue, 21 Jun 2022 09:34:18 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2074.outbound.protection.outlook.com [40.107.220.74]) by mails.dpdk.org (Postfix) with ESMTP id 5416240151 for ; Tue, 21 Jun 2022 09:34:17 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DrONpnCK2WNXI2fpS7XbiYPOpSTDzsnYKrly8N+ZoT2ZLSu08lczlHz9j//2/w2baK+XsEj9KOsrlPu0vjhxT/af8W05KeS31bplDaWsR99Cwan4zPzzdXdSv6rXyUNrAxrjBhPa3P3Fvam5axoBGq/4kTBhyBNrFVXCXAnXHwTGizDYZ+oOAwTr3TPP9JwIoy0o2BGwxWbLeBP1icgUll8hhNZG0BjP9NeD25FBAxa2H8H5n2snFIkuZQb0NaGl/m8eIhpiWAgLWLVfwSugpb0Kfsb3ZTHkVGMc/C/8HqlLxbdK6E6AIlQY5Gnx4wGDaJTjmTiUI0k+YvcC4v9x6Q== 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=0BeSoZlDxI7KuT8REIeYU+DrroebcbCnDHXulokAdbs=; b=KZHD8hpqZpbUdHceiM9hSm+77VgQbrVX7MwqLNhO09xuJ/MghvNWg34iz9CE/4WA9BNPgGj7uFV2dDpHnJzKxb50JqY9Mc1C7myPXdS+dOg7CvzlAE7sr1iK3rgyNb8mjRBpi3LA2pZX3b0AkEnIOSTVkao2md84MEuDum3Ud5YUvldNUTRXOklkaHE0P9lwFTL9ptMZlJN2esGgpJOxSQcm9GkgpD81JK3zvth6Uf7V3O220wsS1KgbsSjR+n/qiYJDsXeiHiUsJwrQWIgyeQLZoqsZeJpCVEsBlSZupSepnyBXoDr1E0U8EYkxkPalJdwdytUN0mATK+SNxacxEA== 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=0BeSoZlDxI7KuT8REIeYU+DrroebcbCnDHXulokAdbs=; b=c2OxxUg80nx94vxEDW35DcYF9UGW/8s8jRkkYMkTH3fdn2D0boriYat3cZ4TzNfSEEggrpFQ984hU62XczV6u4n6PmAa7FSIJJjXZkA6Hz77V50bpepDKRgDI1ro/rsHJqmpYmYcMn0AH1pqGtpAB7xVmOl/EW6LyuquAF7PpgMfhZRFBD1TGyIXXQ9nyrZ5I+ZMOoBpHtojnrfdiMijUBwdONWA083mN+N1RGPPYNtpxGjxH5vC08aHJ3FgUdGSsuCzNNBinkWvkCndZco/d9YtW2PLxxORkcWZ117vpjGyhpMmmQO7Py3ieQpjB2Nf5WcywjXqSufIVjoobvZ7HQ== Received: from DM4PR12MB5373.namprd12.prod.outlook.com (2603:10b6:5:39d::14) by CO6PR12MB5393.namprd12.prod.outlook.com (2603:10b6:5:356::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.14; Tue, 21 Jun 2022 07:34:15 +0000 Received: from DM4PR12MB5373.namprd12.prod.outlook.com ([fe80::9416:525c:ef8d:6bcd]) by DM4PR12MB5373.namprd12.prod.outlook.com ([fe80::9416:525c:ef8d:6bcd%8]) with mapi id 15.20.5353.022; Tue, 21 Jun 2022 07:34:15 +0000 From: "Xueming(Steven) Li" To: Dariusz Sosnowski , Matan Azrad , Slava Ovsiienko CC: "stable@dpdk.org" Subject: RE: [PATCH 20.11] net/mlx5: fix RSS hash types adjustment Thread-Topic: [PATCH 20.11] net/mlx5: fix RSS hash types adjustment Thread-Index: AQHYhJH07zX6GxGJAUKW/E983APP3a1ZeWow Date: Tue, 21 Jun 2022 07:34:15 +0000 Message-ID: References: <20220620103728.1219189-1-dsosnowski@nvidia.com> In-Reply-To: <20220620103728.1219189-1-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-office365-filtering-correlation-id: 4eec0628-8866-4958-9070-08da535871c4 x-ms-traffictypediagnostic: CO6PR12MB5393:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: V9Eik9BQVdjLPa315RG4Ih0ZtTWRuhGrcXO79B5vFtcfGaZ4X5G3t4ns6i7rByZSvQvRz9vSEysIIApP8MEWcirpQi+Hl8s8Tx6Twobr3zaoxOA1qXZMS11x5487xmXPU72OeMXLZvYp/J4dekDnWgq0Ly2NTlPrbdO9Qs39MvpX+A1g/dIVsvB16Ymysi5uZG0yeLOewmz9IZ7mce0CitrayvSg7lvN7zJqj0IkjKRQxENGHbmmBzX+MTBxEhghPU9pwXCBFNcR9OGIQ36d1o2N69zmk2ZUphWjd97gLGVU3zIbfaA0Xd0gZcJV/ITbjWuwDlb/PDXWHy1tIZMGszG1eNnlt+RKR8VDvVphywH2KW1A8245blaW3Gxth6eP1KkC8yFvOpuQrwug87lUhBlbilNkCFvMSPJnh9JIgszJ9fNlEWLbsL2AtzwDVwpGCFTn4stMM1uC7X5u5ayNbg9gOrWHyM4TNFeyi6+NEeIdZ26Kzy8sP69mSNU8n8Z3mGrc2RlL3bI3NhHfkHVR3Dekcu97HIN0rZmXGUGV9XWJaj4x/fcqXCjIMJCuAO/qe3LAJdu/VG5thw96tsMnMPv9iIpRenLBTrgeMLlVeYFPFw3d1Z3A83tt9LO0Fz10lepQx9Y+3ysi9f1LMl4h3FAkAlFq0XLJmNOl+fNXh+rpHLlv1pVKgPlljgEKjFB0uT7fgi4lCtvUP7tSF0PXFA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5373.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(39860400002)(136003)(366004)(396003)(376002)(346002)(122000001)(38070700005)(110136005)(38100700002)(6636002)(55016003)(316002)(66556008)(66946007)(9686003)(7696005)(186003)(4326008)(8676002)(66446008)(76116006)(26005)(66476007)(64756008)(478600001)(8936002)(5660300002)(86362001)(33656002)(52536014)(53546011)(83380400001)(2906002)(71200400001)(6506007)(41300700001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?VwhSVeuGsglU5nVW5PugbA6D1tS3Bbpjk5+dvr1fOY3bj6pjK/gV+nCI90K3?= =?us-ascii?Q?OEev1qwIjXgIm8Ii3Bd6L6U/jZ3zHneIjZ7ymLFs0uaZxjnQWrV1bDZbrkuz?= =?us-ascii?Q?/AhNiJ1hZ0hqfWZb4CGhbtc9NjSFG9dcEmpn6ALCCxDZH5CAMW0JMtBawNB5?= =?us-ascii?Q?VaDlkt2V7jQKRtzW/XTAjd6fPilSR/556daBAKOyk+OsQj9jSuwtKlnQU2aD?= =?us-ascii?Q?ieABOyWXiKmIQyDnz1jTKlxHwq0SiAfAbglD32jUhu6meilTx+iY0FD1oYrs?= =?us-ascii?Q?2+wf48m4mpBm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nx?= =?us-ascii?Q?D/MAP8HFJMIuJXlUHMxF/dRp+d9MkbbtqxavFZI+t8HK/zVKpGv9tM1UZwQS?= =?us-ascii?Q?qBJKf/oGq59GRu4byXVgr+rXsJGV06QHx8cqrjwfmBJwnBpHWTvIojH2bj/q?= =?us-ascii?Q?zc4mJvQjC4Dl5Wg2S3W118hyVIJVMids9G14xBeN811hFWqAMMQBH0BVJH72?= =?us-ascii?Q?a5ZvgeLYH29UgElGmRqZgSbQGYVZSZneRaFpwVTSD2DcclqcdBxgcKxbpnSh?= =?us-ascii?Q?qz2kimobD/0Wq6hb9bj4GdhV4KmC3fTCvYLUIo4MOShEN9SbSvQ3abNNwQmX?= =?us-ascii?Q?1OccF2+VoSvOWf5slhblx/ZEs/5vhbXBHnlnlbHHSVlLmR7rf5ndeusgp8mq?= =?us-ascii?Q?qCvz1rHkkyw9vogO2Yxqx2g1t+yQLOh4SykjlYPwX/E29d9MbJfs8SVnsazt?= =?us-ascii?Q?x810OYXKoms2jxDG+BpG99VX2Icj7iNSUXNK9AFZZUJrK3IbclpoeWp8LOBd?= =?us-ascii?Q?kDZgge0ReYyjqt3ozKOCQziAjo+GoSvnm4vE0M+P4+feSURKqTJtjtITWfCK?= =?us-ascii?Q?Lf5m96MbrA=3D=3D?= 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: DM4PR12MB5373.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4eec0628-8866-4958-9070-08da535871c4 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jun 2022 07:34:15.6812 (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: 1HDKTYYcaNa7Sk4aw73r/xEP9woeLeVscGACXOYNMvJ/BgzwA+sFZwDSAAVr5QBnOgS13wyhIqMM4Czkr6byEw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR12MB5393 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 Applied, thanks! > -----Original Message----- > From: Dariusz Sosnowski > Sent: Monday, June 20, 2022 6:37 PM > To: Matan Azrad ; Slava Ovsiienko > Cc: stable@dpdk.org > Subject: [PATCH 20.11] net/mlx5: fix RSS hash types adjustment >=20 > [ upstream commit d2fa2632a4a17b491f9a15834d9e13c6a6e5a1b9 ] >=20 > When an indirect action was created with an RSS action configured to hash= on both source and destination L3 addresses (or L4 ports), it > caused shared hrxq to be configured to hash only on destination address (= or port). >=20 > This patch fixes this behavior by refining RSS types specified in configu= ration before calculating hash types used for hrxq. Refining RSS types > removes *_SRC_ONLY and *_DST_ONLY flags if they are both set. >=20 > Fixes: 212d17b6a650 ("net/mlx5: fix missing shared RSS hash types") > Cc: stable@dpdk.org >=20 > Signed-off-by: Dariusz Sosnowski > Acked-by: Viacheslav Ovsiienko > --- > drivers/net/mlx5/mlx5_flow_dv.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow= _dv.c index aa22e85f6a..c1505b69e6 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -11567,8 +11567,8 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth= _dev *dev, > * MLX5_RSS_HASH_IPV4_DST_ONLY are mutually exclusive so they can share > * same slot in mlx5_rss_hash_fields. > * > - * @param[in] rss > - * Pointer to the shared action RSS conf. > + * @param[in] orig_rss_types > + * RSS type as provided in shared RSS action. > * @param[in, out] hash_field > * hash_field variable needed to be adjusted. > * > @@ -11576,10 +11576,10 @@ __flow_dv_action_rss_hrxqs_release(struct rte_e= th_dev *dev, > * void > */ > static void > -__flow_dv_action_rss_l34_hash_adjust(struct mlx5_shared_action_rss *rss, > +__flow_dv_action_rss_l34_hash_adjust(uint64_t orig_rss_types, > uint64_t *hash_field) > { > - uint64_t rss_types =3D rss->origin.types; > + uint64_t rss_types =3D rte_eth_rss_hf_refine(orig_rss_types); >=20 > switch (*hash_field & ~IBV_RX_HASH_INNER) { > case MLX5_RSS_HASH_IPV4: > @@ -11680,7 +11680,8 @@ __flow_dv_action_rss_setup(struct rte_eth_dev *de= v, > uint64_t hash_fields =3D mlx5_rss_hash_fields[i]; > int tunnel =3D 0; >=20 > - __flow_dv_action_rss_l34_hash_adjust(shared_rss, &hash_fields); > + __flow_dv_action_rss_l34_hash_adjust(shared_rss->origin.types, > + &hash_fields); > if (shared_rss->origin.level > 1) { > hash_fields |=3D IBV_RX_HASH_INNER; > tunnel =3D 1; > -- > 2.25.1