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 DE882A04A9; Wed, 26 Jan 2022 16:26:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 691C042746; Wed, 26 Jan 2022 16:26:14 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2047.outbound.protection.outlook.com [40.107.92.47]) by mails.dpdk.org (Postfix) with ESMTP id C56F942716; Wed, 26 Jan 2022 16:26:13 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MMJF1renDCC7HE73KhcsZH3WTAeDF6coppjuCX7UkAKSuVIO4maaBdPL2F/mHhkHO8OChl1lHGJ8vqkLpkCnKjSGD5PrxqoW9vOam5v/pA3f1J5NyVtQ2pjByTB8uOGPU8MdXvgW/uJ/mWH2KGTWpeHc1+qvd2q63ILCII84ioXDiiVh1D1dpfzR/+PpmilkZw4s/Qey1lbFgtPiFPaHMcEBcru0iFw/J0RCrEGyD7UhQR2oRRccUbfjveL67L26yBnnDSf4fRamnSd6SKv1vgsccagrmHQUghSTsbH/LhB+gvoIYJzOKbGPvNTv7XcgrVtnkb9jhCKGc284B1hauw== 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=4UzIiRuRrMDwLaTssM1QqNSzeKlpumBdR+68kYQs+Kk=; b=fu9UPHiGW0RRs2tyLWagNWRYt/c6Qy0/RTonQBwPgy72eSuGhz1I8+dQTld14Hpogni0Wmwaa669CrlsrMWu9scJXKXRqDObiSXTaBORH9Mz1mCdNQgCZaW1wJQGpdCOEYKGFgySykxO3sTTbXJZx9aT8p/uHnUwIHcV8srNZuzFU19ndJ0wncEaWr0lIRXJ/HCzSZBeORVGi+mT/5eo1W+LuehaPcYjFVtKr1ayhk5puYCaejowkvTvDSvjEkwPNM2fS3Hk026w839UlnZqj2AoJRibZ3/iWOTem7ZDSD1Qj5zRW/fDxFs4I4NCN3jo0sRt97Fjf0DHkfonrsuYMQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=4UzIiRuRrMDwLaTssM1QqNSzeKlpumBdR+68kYQs+Kk=; b=lT77H59qLdUSnWR2vw6+vrLB6Ou1YyRY+OO9siqKKq1xKlgLkWDcXVCZy7lgIMd8BzhL2Uhb3mdUD7O+Nkw5F7GYPpMasxFTtBoPHZHAzmV+Ru1w4WHiFGaMoJHvIllF/ccObfT+zkVy6AHC1XJP+Wh/rAadwQgFzkHWLR1hVyIjNQAwLWkOJ6RCztiDPZahvkQqaqVCfvmDXMsDnxUi7eBFMURhRci4cTYBfReEzdEjyshueo0qn+Lg6YxrYlZfeWrNUk9yZP/owtrvh0tcd9mq9IKwmNFLmzxkb25IjOIK+9i1XLWxbFIRcOIPSfQP5jrypgBHKF5Rcnl63+vD6Q== Received: from BYAPR12MB3078.namprd12.prod.outlook.com (2603:10b6:a03:a8::31) by MWHPR1201MB0144.namprd12.prod.outlook.com (2603:10b6:301:5a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.10; Wed, 26 Jan 2022 15:26:12 +0000 Received: from BYAPR12MB3078.namprd12.prod.outlook.com ([fe80::c8a5:fe91:7c8d:5e84]) by BYAPR12MB3078.namprd12.prod.outlook.com ([fe80::c8a5:fe91:7c8d:5e84%4]) with mapi id 15.20.4909.019; Wed, 26 Jan 2022 15:26:11 +0000 From: Raslan Darawsheh To: Dmitry Kozlyuk , "dev@dpdk.org" CC: "stable@dpdk.org" , Wang Yunjian , Slava Ovsiienko , Matan Azrad Subject: RE: [PATCH] common/mlx5: fix MR lookup for non-contiguous mempool Thread-Topic: [PATCH] common/mlx5: fix MR lookup for non-contiguous mempool Thread-Index: AQHYCTTjIhRpmRYm2Emuero4f9Tzkqx1f3zQ Date: Wed, 26 Jan 2022 15:26:11 +0000 Message-ID: References: <20220114105217.343139-1-dkozlyuk@nvidia.com> In-Reply-To: <20220114105217.343139-1-dkozlyuk@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: 08b5ae69-6a3f-40d6-38ef-08d9e0e02f40 x-ms-traffictypediagnostic: MWHPR1201MB0144:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2958; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wH/mjZcfr9aGshRrbJtecPd9MC+NCm8i0jzp6IwOq/EPjZKFAGf0LXhw4+KOtSgkEq+rmsugUfLZLInQQFSD/Z65DriEEevD+3/Mp4jYV+qy1wi/kyKwnJRrQ66PGSFxPrEYYrQxli456IU0RvUGR6gN3UJIYQy7TP/lL/FK1xR6MxfXeySoYF+xb6qlhFjeXeuc5rTDPb4dqAXRLgze8F9XnsJXPkvk7e7Mr3/zBVQljSGEs3rsIZOrtZ6zPg7C9Rq+06N+jKXDG5PyFq6PSXRLJvibJTUn0Jwu2rBNNzMAs34PJnBqUJZQJo+dyjmG3aWTO0oeAAuoAQlzR++I9MJ/jISH4FDqcx9tKfwP+QP30jpipYVy0Mdf7eauQ4uS6PNVbVhz4+Uu+JrA3sU3kt0xvCxRpQ/UX8nO3ctu2/9Z+LQ+j0Xiezb/3i6A/TK/WDRDNDlSIvOVCD+h3G/WHZoZ3Y1aCcyBRL9x1+C2YgprSkLgJJ9hX8/WT2DRGWvdTHbGe8SRrPZ8oKghDqcB37Fg4itmXdKGoVYRy5ftrZtR4cTfjNWGqtvsADnYb48/MNbuu04jfHrQ+nojaXZXQj9UfLTWcZxFbS0i+tBUg7gDhewcBbg5Kmrwo4ydADWinEmw/IAMG9a9jNpHZyBsZGV+aTemMrBF6oRI8TQP1VWhl0KW/kdd5TEJZmz7l6/uxmHfl5rohFGL8XKPXr2wiQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR12MB3078.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(55016003)(26005)(5660300002)(4326008)(186003)(52536014)(122000001)(2906002)(110136005)(71200400001)(83380400001)(8936002)(6506007)(7696005)(53546011)(8676002)(54906003)(107886003)(66446008)(64756008)(76116006)(66946007)(66476007)(66556008)(38070700005)(33656002)(316002)(86362001)(38100700002)(508600001)(9686003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?i0JQQQQXpbyaq1hy85eZxkLD/0gbveVDYnjTaSeC1oIN8HeYzAfo/HUA8edb?= =?us-ascii?Q?AutFUwywP7C+nXStjOuKkpXbVVkylULiLBfM3roH1vvhXqqN7EvLG2n23+RC?= =?us-ascii?Q?46kxSRN+32rWlXcOz5m0ypRFJgr1CklQnIX8rHEqSH997gp0XK5hFR5Q5Una?= =?us-ascii?Q?gZKrzZeLWBja2n4E1nY0mXdJhKPYZbiXjPGpfjhwxKlrjpsvD1RQYbSp8zg+?= =?us-ascii?Q?q6GFX8XAZkH/7wyvSJLHThnb4xsIXW9jyxdNNleQfsWNp8hMc1p1HeGSD/qa?= =?us-ascii?Q?QnkBaVo4JtOB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= =?us-ascii?Q?nDvpTzFRCgrlleivawl/U2FzebaGp8TV59HoUUoEoKmxmfr9i/iXSTBFr6fk?= =?us-ascii?Q?PxQCUbEdTY751lIqIvk8EOHkMk+tpwESbN3GYynLgeZ7BSddema4P0l6oN8N?= =?us-ascii?Q?1neMYKvgHpb5eQopIfYXdPd082QXdJRA3wvlL3OlJxaW2fwalyscY4r8G0Bs?= =?us-ascii?Q?g/rCHqzKs/+6IHAshR03O/h8fo5Bc2PXMQp7P8UI5iJgHhPqgj56bukf6haV?= =?us-ascii?Q?Y44jEd4JkVzsBgSpliUEyKF/SZZLfSta8uEsulj7YdJ4m+pZquf/aJWeWMLr?= =?us-ascii?Q?qx5I2PTl7OOj1i643CHEdRo6Iq0G4JWdAhh2v35O0u9dE2HK7UrB3sY56n8B?= =?us-ascii?Q?qq5BSPDbcVJORYufA5KWY7MAT6SyHIRuuShPXbkN4O5oZCCvRemvX4gtRDJb?= =?us-ascii?Q?SGDUyQMrOtQcn6gjDDwCbwc=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: BYAPR12MB3078.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 08b5ae69-6a3f-40d6-38ef-08d9e0e02f40 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jan 2022 15:26:11.8420 (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: KAFhO+AJBR0ZP5X+AzTsl+w4t9+9tpqMpwpDIjKsY6Z0wEoVnrfq8nP7fA23QYcFI+yY/NZQuLaC8GQH0IsNYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1201MB0144 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 Hi, > -----Original Message----- > From: Dmitry Kozlyuk > Sent: Friday, January 14, 2022 12:52 PM > To: dev@dpdk.org > Cc: stable@dpdk.org; Wang Yunjian ; Slava > Ovsiienko ; Matan Azrad > Subject: [PATCH] common/mlx5: fix MR lookup for non-contiguous mempool >=20 > Memory region (MR) lookup by address inside mempool MRs was not > accounting for the upper bound of an MR. > For mempools covered by multiple MRs this could return a wrong MR LKey, > typically resulting in an unrecoverable TxQ failure: >=20 > mlx5_net: Cannot change Tx QP state to INIT Invalid argument >=20 > Corresponding message from /var/log/dpdk_mlx5_port_X_txq_Y_index_Z*: >=20 > Unexpected CQE error syndrome 0x04 CQN =3D 128 SQN =3D 4848 > wqe_counter =3D 0 wq_ci =3D 9 cq_ci =3D 122 >=20 > This is likely to happen with --legacy-mem and IOVA-as-PA, because EAL > intentionally maps pages at non-adjacent PA to non-adjacent VA in this > mode, and MLX5 PMD works with VA. >=20 > Fixes: 690b2a88c2f7 ("common/mlx5: add mempool registration facilities") > Cc: stable@dpdk.org >=20 > Reported-by: Wang Yunjian > Signed-off-by: Dmitry Kozlyuk > Reviewed-by: Viacheslav Ovsiienko Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh