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 B31B8A0546; Wed, 7 Apr 2021 09:15:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 529CA407FF; Wed, 7 Apr 2021 09:15:02 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2054.outbound.protection.outlook.com [40.107.243.54]) by mails.dpdk.org (Postfix) with ESMTP id 604D04069F for ; Wed, 7 Apr 2021 09:15:01 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oU//WrpINum9ExLwigj0qEAy4ffGk3tW3hGh9GpWm96NeF+dQ8mfIf5k+NY8mGoHS9ZlWlSRDVyahTPpUg6RjmerHx7AKkHmifoPqJFLFvOEuI1VMWUuzLIdJmbzHrYW2HAzfHfvpbB52oLcBcHIsmG94MAtzwFTi0KENfvxnyXVhf6DyMh8TOcDnAczFG3OyjYDL4JBUExyw13LDdvtZqf0G9eUMHssS5kxumFFUT0c4YSLlQqBdDNQPLaDn9LuHspLOXyd4scZg1KHgbav6AXLlaqri5Z/wUTSOHFAL2R3m6qyeNIqumRzLNw8xTiArHJf95ovmijA0fNT94wigQ== 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=CDwhpAFqpH3fPqK6/0nWSefWIkiMgp1CLy5Wjy0E0LU=; b=W5zgBB3rVkMlatC9yFomCJqmk+4c8CfIKj8h0TPpBO2s/3op0bXYlf1+34AQqf2h2QxQzvYF/M1l8flYarunYdyWBZZMS/VCUhDP6dA2GRFM223K0Y3fD0VjqjESK9nYhptxaAqwIjymztKEini88yPlXW+7ejSrj94dxKfmlw7P/getrOc8HZmtJncyew1wMHy5pXp64ksr+Oylz2za4CDotzeVBDw6drNSs00BgPfQSM3Jv0GNMHkw6CCVTqEylayNAAuMRN8u08dQ3byzOfEkRs1IZQOMisnwVMpUqZ+o+H1RD2IQJG7h1VlTmMoyOFtMptiYdBwagXL8nlBRaQ== 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=CDwhpAFqpH3fPqK6/0nWSefWIkiMgp1CLy5Wjy0E0LU=; b=nz9h2eahXK/pyHXyt5sqkgnhYEQnPLLzbL5MUh/Lzv0HTX+LFZkBLOWzq1RL3uYd7YK8yQ6E4b6lGIfNq6CWVBr8QGxI2QYhdPP2ot8lgKKcPYddGn+FCKPaIJLHLsNrm7ANLLqblsUuKQ7NA2UAYM8kphEWjPmDPRdKh8eziBJIjAofbwooiMMAQz0TRozhXWFODE2W9AZjREJWu9H2EajygBVCUj0eevtOC6G2o2vQER4CnhYgNp65f3njCALrZGQOgtL5i/nkUZgv48jvnRUhhT9jFnHjIEfRuui9ym2VQ6lAJpVygPqkgppShgvoLJx+T8JiTROJ53C/kzh+iA== Received: from BL0PR12MB2577.namprd12.prod.outlook.com (2603:10b6:207:42::20) by BL0PR12MB4899.namprd12.prod.outlook.com (2603:10b6:208:1cf::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.27; Wed, 7 Apr 2021 07:14:52 +0000 Received: from BL0PR12MB2577.namprd12.prod.outlook.com ([fe80::3c43:105f:fc60:7786]) by BL0PR12MB2577.namprd12.prod.outlook.com ([fe80::3c43:105f:fc60:7786%6]) with mapi id 15.20.3999.032; Wed, 7 Apr 2021 07:14:52 +0000 From: Suanming Mou To: NBU-Contact-Thomas Monjalon , John Hurley CC: "dev@dpdk.org" , Ori Kam , "dev@dpdk.org" , Slava Ovsiienko , Matan Azrad , Raslan Darawsheh Thread-Topic: [dpdk-dev] [PATCH v3 4/4] regex/mlx5: prevent wrong calculation of free sqs in umr mode Thread-Index: AQHXJQWXcQSAREkAc0SCRG+mmPbzQaqnuA4AgACOl5CAAGnMgIAAALCg Date: Wed, 7 Apr 2021 07:14:52 +0000 Message-ID: References: <20210309235732.3952418-1-suanmingm@nvidia.com> <1630409.ut38131ehT@thomas> <3465474.71KI47HSL4@thomas> In-Reply-To: <3465474.71KI47HSL4@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [220.184.249.48] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d378016b-cb1b-44e7-720e-08d8f994d6ee x-ms-traffictypediagnostic: BL0PR12MB4899: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4714; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Y+SrY1m0YR9RMt3C/X5UtwuIrB5MM8Eu/oshujwloj2lEfF1TgqutF729mbLeJpaIuxFTIsOMbc8tnSGDlOvOemWWBSsPr0/5HHj7l4GALxzvUbOgMy/RbqOE3uT2HkCslO84AXo03M9AmKVtJwfAeWeqjPnoBd4cAV1zgULigp76K4eA4sK5B3utlREKAMVloPg0BDHjrcECCEU899QLkQPIF/3I+3GY6wwPlawa4fpMERfd4/epAG3XMjqttQKnYIwxkh3hgD3gwctln5WtTQLPL3+5yCN3ZOlZCTOYSO7BOA1Rr4t/oR46XY9dF+ItDGcx2i38FT12U/MPtTFVx6dr0nT+5t/GeKp12BcLSTqRzmD9vxbRRKc41LNjvOQqUHE5ILJtJm5fzNHmdChaPZo6C7baT0OnFm48NepN5J2YMBd3W1ldM4ryegY2ZX9qv/vPlptbulH5zLxaGxkxaeaYKHgvDLp5GbUprhLwZU1nh5qTrCscMzZpiF+TlMlNrj1Xkx1z45xZf3nQ5Eiu06oYRdHSEyuIVvXzfc4mfDGj6YJGr34kQnmp9BE8Znc/i7ls3cgszLOi8alLhlCJBsQOYhk8RRPbgRRY6QDTQavoyG+PSmNyUtKWWvQteUwuvWDvX2ciItXxqwPzxSVmo8UWqMScl/g9XUba2AQK3A= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR12MB2577.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(39860400002)(366004)(396003)(376002)(38100700001)(5660300002)(52536014)(66946007)(107886003)(478600001)(8676002)(64756008)(4326008)(186003)(66446008)(8936002)(76116006)(71200400001)(66556008)(9686003)(53546011)(26005)(6506007)(83380400001)(7696005)(316002)(54906003)(55016002)(2906002)(6636002)(86362001)(66476007)(110136005)(33656002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?8uAXwHSaf9YLH2sRCMAOszLUVh0vxoJ7zkNpwa6YKxS2K27OzJdfGC45gUwW?= =?us-ascii?Q?FuB065TbMhqT8jk4zCvFtuwQtdFVgf3NFjMX1ZtRAjD0PSSQ6E+bcyEpW9yX?= =?us-ascii?Q?dY2A0BkhIOL0p82FVhM6uJnsmbjpBXjf43genI7AUrdDeBaKJtIkpPJA+sdL?= =?us-ascii?Q?vWnrhg3kYZBqGW5eTjOfU1CctqOK0Kd+fzXhnjVDJyYZFAbXY8N/UShmwoZ4?= =?us-ascii?Q?R0L1tjG8DytX57yP1BdcWLbGP+vqmCzFYv0E+60tshYus4GrBNEkJAlOSgQ7?= =?us-ascii?Q?A7ziE5h2K4hE8cQPzTjOb0L3S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us-ascii?Q?K5m7feZr7G6zgqqfMLpvCnrh1SoAnJ8T/nQBfds6BigApD/xXRLU5Nmqx5wR?= =?us-ascii?Q?IokoGnHpsb6HlM/A1UE2RGWxftyHaMQ36QV95n+e1eFEtq+p6mt+5Pba9O9I?= =?us-ascii?Q?K6SXpNxKe2ayz7wgeM0vSH+l?= 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: BL0PR12MB2577.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d378016b-cb1b-44e7-720e-08d8f994d6ee X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Apr 2021 07:14:52.7753 (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: juXN7x9XghiFTGbCB6DAsGTk+e8HutTMxB0H5HaEN6nGXMfxBCmo4s9dIIoInm3AyT1TN1XkjK8id4ub5I9nOw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4899 Subject: Re: [dpdk-dev] [PATCH v3 4/4] regex/mlx5: prevent wrong calculation of free sqs in umr mode 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" > -----Original Message----- > From: Thomas Monjalon > Sent: Wednesday, April 7, 2021 3:12 PM > To: John Hurley ; Suanming Mou > > Cc: dev@dpdk.org; Ori Kam ; dev@dpdk.org; Slava > Ovsiienko ; Matan Azrad ; > Raslan Darawsheh > Subject: Re: [dpdk-dev] [PATCH v3 4/4] regex/mlx5: prevent wrong calculat= ion > of free sqs in umr mode >=20 > 07/04/2021 03:00, Suanming Mou: > > From: Thomas Monjalon > > > 30/03/2021 03:39, Suanming Mou: > > > > From: John Hurley > > > > > > > > A recent change adds support for scattered mbuf and UMR support for > regex. > > > > Part of this commit makes the pi and ci counters of the regex_sq a > > > > quarter of the length in non umr mode, effectively moving them > > > > from 16 bits to 14. The new get_free method casts the difference > > > > in pi and ci to a 16 bit value when calculating the free send > > > > queues, accounting for any wrapping when pi has looped back to 0 bu= t ci > has not yet. > > > > However, the move to 14 bits while still casting to 16 can now > > > > lead to corrupted, large values returned. > > > > > > > > Modify the get_free function to take in the has_umr flag and, > > > > accordingly, account for wrapping on either 14 or 16 bit pi/ci diff= erence. > > > > > > > > Fixes: d55c9f637263 ("regex/mlx5: add data path scattered mbuf > > > > process") > > > > > > It is fixing a patch in this series, right? > > > Why not squashing them? > > > > Yes, this is a fix for this series. > > This fix was done by John when he tested the code, so I put it as an in= dividual > one. > > Should we update an new version to squash it? >=20 > Yes better to squash it in a v5, thanks. OK, I see, thanks. Will update later. >=20 > > (And Thomas, the latest version of this series is v4, you comment in > > this old v3 version now :) ) >=20 > Yes, sorry. >=20