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 56D9FA0C41; Wed, 12 May 2021 18:12:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 27B914003F; Wed, 12 May 2021 18:12:11 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 2F7784003E for ; Wed, 12 May 2021 18:12:09 +0200 (CEST) IronPort-SDR: ejp0iV4edUcN9UHfVtCFPxBeiLb8icb62CSro+KmkK8rslYr7ZVbuD74CjXWRuZQ8BS7b+JMKp TJSnVMWjL0/A== X-IronPort-AV: E=McAfee;i="6200,9189,9982"; a="187169850" X-IronPort-AV: E=Sophos;i="5.82,293,1613462400"; d="scan'208";a="187169850" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2021 09:11:51 -0700 IronPort-SDR: NZxkgzRaumx1MJUpjj5Ah14R4EHbPovBtV4YUqmKKBcBTOp+BlC7lRjQbamNFcJaSSD9lqmkEz Ik4rEOnjVQew== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,293,1613462400"; d="scan'208";a="625460822" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga005.fm.intel.com with ESMTP; 12 May 2021 09:11:49 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Wed, 12 May 2021 09:11:49 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Wed, 12 May 2021 09:11:49 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.173) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Wed, 12 May 2021 09:11:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HH82Fbg4lzwDdCwTxXv59rsPI2vhlEkanQFoc6Z2Vbf0b0hvBK5esfWZj2G7ewUHS+keIXfKWL4dSmPupYo5HQht6jiFnz8NWw0egNQEusGrN0yHPW6R5cBPEBW6qlUtitkjfGWgo+NCgnf+Z4xIBtaIeGYAUATeEGUMiOwecaQI2llQc67HiRWoNKhpp3Oa1VnplVg1AZSN2qcyucpQ17N6E7xp0+GtaF7ImFEubaxsxzY//I+J9X18TiDzhduGaPyMsQOOPNlNFZJDZbRckqfd9yk9AHiHW6nfNvb7JguK+PqkgUuJfnepe2rIqmiyjcs2CDJAjVRQOzRFyhb7rw== 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=UdYAvNjQTxoh+6x6w8QLYrDUYhAYtEvk2tDDq5Mj24A=; b=Sv+EBBIzeERFq2nrwKRKFR98iZWKBUQZWzQ+1sG1xvFdyRmANOEb4wlB8fyNxIqraYRw7u//l/VR+wyKwaQ4M02L1Y7MN1Ypdggy4aAExviiJOW0OifOzXQg85TlhPkNhJRNgY2ZGg4zWi11UQ2MM+73uIicYqlFsrRHaD/gWV2HTqAhz5/STEMx8gk6SyvxvlIyRzUc7YWygUCaKuhf2K25hU8nyg7I5xX5fDUG/vP2UfjUqzjI9h+Z4UnSDrldrQ6jwsWyCAsKW+GwjOpqZ7DxdLfoGvLZlWWOIYIfqb3bUaZDg39Zv8GTb3LfNfHQi5jsjkwW8wiCaFzgmhDX1g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UdYAvNjQTxoh+6x6w8QLYrDUYhAYtEvk2tDDq5Mj24A=; b=eqdh2f6wb8K1wwUPRTZg5EPdv3MnprP3WryqgXB6u6ZIbqvSdiYLwBmUb44RymGeV993LmJ2Dc+cgJkcBK+aKWcwcX1GrjgsewUOa5Z0r/sEC434SZrhSRRJYkvNd3Hd/l21pC4THU7kcESUP0rubE05djY2eu0L9LICFRrutT0= Received: from SJ0PR11MB5055.namprd11.prod.outlook.com (2603:10b6:a03:2d9::10) by SJ0PR11MB5181.namprd11.prod.outlook.com (2603:10b6:a03:2de::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.26; Wed, 12 May 2021 16:11:47 +0000 Received: from SJ0PR11MB5055.namprd11.prod.outlook.com ([fe80::d4c0:1747:b7ba:6ffb]) by SJ0PR11MB5055.namprd11.prod.outlook.com ([fe80::d4c0:1747:b7ba:6ffb%5]) with mapi id 15.20.4108.031; Wed, 12 May 2021 16:11:46 +0000 From: "Laatz, Kevin" To: "Richardson, Bruce" , "dev@dpdk.org" CC: "Hu, Jiayu" Thread-Topic: [PATCH 1/2] raw/ioat: fix ring space checks Thread-Index: AQHXRz4lWdvTwPN3fE6Hy4DqXzJx46rgA1Iw Date: Wed, 12 May 2021 16:11:46 +0000 Message-ID: References: <20210512145000.249215-1-bruce.richardson@intel.com> In-Reply-To: <20210512145000.249215-1-bruce.richardson@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [51.37.15.184] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8447a674-903b-4067-9dbc-08d91560a475 x-ms-traffictypediagnostic: SJ0PR11MB5181: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: brQ/fn7lIO11kTKoZ22bLqgnbyIXiS7XoUHmi+r6DQToOZ+rtHmulyhOBgF6r6Oc+ojJ4yNAAKLR+hNvEczT5H0zreAz9AGRRu5DiVKkU7Rnh62gb/t9gvaoqQJ2cHGL3jPzCk2pfGUyNCNmmDsfuUNK2bNAmpaqwSNUn55i+p/KQvbIY1ddIa3Pry6lr2pdRK9z43NDVZ3cqoFM6PPLG35O9DD7i7feOEAeE6dWrMxge1dtkbEB8b7VU8SGuvENsdGvXZfVWCKw2VKIfGxSm/kHFz09CZ5dbzdB/UBAlAG6NXdXI/x0l5LcjPLGN+T7w4iee/D9/rQ0mXi+60Vt7oABm3PJV+5qgqmPDmWH2YoqGG08Ke+L3FyfXwIaWNVP4eeuEA4tTRbZ0WrHYRNBCZrZqCe6J+G+YtMKVhdM3cdu3wy3/1aEAx9hetm9/bnIrIFmQ2RFNiixulbLPR63WvpFqQPacj/kKLFrUt+9AAuR/LWJQf/iHiOtkN54UWhj4Wkv2JMbK+GoI4S3VQgDBc6EmXaLXus3KjNUAd5KAuLFcdu8ECYdJwzQ1legGAOLSocMCmel8CT9K/WmNSv2JN7KgIaH9oTOO6vvPS2x5sc= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5055.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(396003)(136003)(346002)(39860400002)(366004)(33656002)(7696005)(478600001)(71200400001)(6506007)(110136005)(8936002)(186003)(8676002)(26005)(38100700002)(52536014)(316002)(66446008)(76116006)(86362001)(66556008)(107886003)(66476007)(64756008)(66946007)(2906002)(4744005)(55016002)(122000001)(4326008)(5660300002)(83380400001)(9686003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?dsXYjNTjI93NnDawjDJ9YQFBDX/+0SKFtsUOUnHw33L2wjWb52xWxrXc0b+j?= =?us-ascii?Q?oAw6dJ+GfvJF5RnfsVicmBLPsRTyChAoaaK0NIfkK3nHt9r30r9jFKyCMisp?= =?us-ascii?Q?F7nUF4fV5Cr6gPlYj6ttOkTCY+PWmMdpZS0ezxDVdIdD/yC6xv9hoJ64AHgq?= =?us-ascii?Q?5h7cZ+XTnJmuVxqjRs7pxxD2lKoSG2v0/Ntt22C/BIfVDSjmMEmq8Thkzkti?= =?us-ascii?Q?uRQ2wJZMtRQ2G5/tkX7rTftT4xI/5iVXgFNpOyGv9CCZcavEf0eJBBV5fNTI?= =?us-ascii?Q?gVsSj4QXSHnW3fe/gjXgj4psalCmywWg07tcJhllS1JF975SD6oA02vohm5m?= =?us-ascii?Q?bAChCADZN0aTAQs18pd1NV05F0GeF9t43L8enhjyOlr0i6zKhe2xL1EGC8C5?= =?us-ascii?Q?rQ2Nr+pMxdYtULx6hk4YvIwBTvV9+TBEOwoMQWsgKbcT3IlucUjK+BIgDE+9?= =?us-ascii?Q?MdOLikwKCzMMg9jDUwO2FdFHHYbM/wfnfFuFWpqxE6nycf4PV8C9WK76/WpX?= =?us-ascii?Q?h/6OdlPnJTK6b1rewhyVwK8hPyGfi6F2zqtd6dFORW237PwGxkbK1T3nhIlA?= =?us-ascii?Q?9IOFUt8fdL8sEeyEvnv0ikYNTJkrR80lin44ap35ko7HaRNAJNvUcQi3tl1E?= =?us-ascii?Q?E1ZMMoRFdAuPqqOWv20PaRbCdVVrUpVIjGFgR+V3euvqKpYNe/hljh6mQp5P?= =?us-ascii?Q?RmFJV00UPgbPf7z7vMeC1G4D0S/0z94qDEWRWG52BattS65lGP9CZtXH8n0a?= =?us-ascii?Q?r55ZnTusJ63td7dpEo8jVoyajTS9ZC4HlGQt0Emok79gSEafm32YdM7BGswb?= =?us-ascii?Q?H4CPoCSlBv0JMMw4xIAGjcFg1Q9ROBvm1V4Ezv/5wSHG46Ked/cV8zyNvn44?= =?us-ascii?Q?wg7ao3XM42XL95hPfuVrkYTwL42DkxkYAnZFOl7mEn3UFJ9tIu1pIloqgl6U?= =?us-ascii?Q?91taP35qKbK2cV8ATLJxHqfoYxn9wur41ozx2gfrsL0vdVVduRxjYU/T3eg+?= =?us-ascii?Q?483Es0QyCr/7x6qgw8UtNJ+A/FyBMkUvfya2wwMJxB6w//rU/jueyfXE9x/f?= =?us-ascii?Q?2+BTPMRLZx9jX5jZ3bz4pXbLmiq0Vn87JWVa6JKYCWzpH3usU6nkpIsxHlmL?= =?us-ascii?Q?ebXySqukCSpUELsfnQJK6ZuhzH+2cTXSWIvpJXimjPonYkRHSX0+QhG6rB3J?= =?us-ascii?Q?y+ABSKt47UXHMZ6ytTCFr4x07znkJxhXGfgVuXE81tYhjycCczVVqUSJrMrm?= =?us-ascii?Q?RkPOg7p901MgV6ZQRT30BD4XFI0uMfn77IU+zC7V95uMg8JJhAS4o0O8a0ic?= =?us-ascii?Q?GpA=3D?= 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: SJ0PR11MB5055.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8447a674-903b-4067-9dbc-08d91560a475 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 May 2021 16:11:46.8875 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: EBRoM2lmeWekmu0xKJaZeEmA9OnOpSoxKLDXb5SwfcNb++mECGznTHVKcjwzmdIQmKYdXf03RnsLD+8Dy96osg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5181 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 1/2] raw/ioat: fix ring space checks 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" > When enqueuing a descriptor, when checking that there is at least one > slot free for the current descriptor and a later batch descriptor, we > need to test for both two free and one free, in case the last write > was a batch descriptor which is allowed to use the "spare" slot. >=20 > Similarly, when computing the free space in the ring to return to the > user, we need to take account of the same condition, so that we do not > return a "-1" ring space value, by blindly subtracting "2". >=20 > Fixes: 245efe544d8e ("raw/ioat: report status of completed jobs") >=20 > Reported-by: Jiayu Hu > Signed-off-by: Bruce Richardson > --- <...> Acked-by: Kevin Laatz