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 7C421A0093; Tue, 4 Jan 2022 18:16:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 06C3040042; Tue, 4 Jan 2022 18:16:51 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id BF46E40040; Tue, 4 Jan 2022 18:16:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641316610; x=1672852610; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=8rHZFFXiwEjqj+DvjCGHGvhwnRy3hXlNHd0pWp7MlC4=; b=KABeQxM47lmYmS373qYnB30amWkJJC+ZxZ5kSh1iGLoJtDm9P4tE+fCa 0WW+RXZqiNxu7wvkK4jt/TYD/1K1veSfs8TbAmR1/njU7HegpTGUdgTL/ 607t0RVDN/VeckpLYA3YA1sJrkDeLeqNIt3iH6jwMQI1U068GQ9hiJUzj hFaIfCfsmHWN70qppw3NgwwP30LygjCK21CtTxPG6aq6VavGIHmS/J+XB 7dPvVClzgROrqk6hZu7FETjKHMnqDtTltuuwy0WjUra0sZzIxkc5IwvEe Lkn1rZFGSTWyAtThBE9VEZh8fXnkr7G24ypzm0/e0Xpyr5/RHBHu+ZbM0 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10216"; a="266531907" X-IronPort-AV: E=Sophos;i="5.88,261,1635231600"; d="scan'208";a="266531907" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2022 09:16:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,261,1635231600"; d="scan'208";a="667807496" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga001.fm.intel.com with ESMTP; 04 Jan 2022 09:16:48 -0800 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 4 Jan 2022 09:16:48 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 4 Jan 2022 09:16:48 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.49) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Tue, 4 Jan 2022 09:16:47 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nJZcNXYr4WMTV4LZ3gWXlfbS8hMD60QwBkdQnBLOI6owrZlX8YFAxWraIyJogfy58kbzvnISX+tAgllxpqXh011DJDjrduMCdsTWq7rzEQHMRRt0UjV3J4xkW7+s9lz0UqT8TC81hmwHg1TUZ0gRpadPC04KsIwsjARKPMT2HTImX2CYdUJ93WvTZox2PZ0mAn+t9PtMQEbAY+3tm2yMuOxLeRmUUuDH2yQhdLBGSsbjuN8uj7LJTAYv+DUHbBCCcTh5+orWdwA3eHy+bR2nqBkVKCFpFOEAnpMobd3Jkk2vuAWS/SkdTmw2H4w2OTcaa8TQxjXwwARBEQ4ppDXY1A== 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=L/coEvAwLuBKrF35lrNiamtSYaJ32tHr7SGkB6A/Bi0=; b=IKCBGIJ1sP8PB0jzA7M5ZA307v54hlDXGpsRtREVecEBTyxo8iOZulJd5+D8vAP23/zBcIwvAO8sbw+DlxO1xQaFVQj22iIeagHiM7ugUJersoMIwkw4vSEl2h787Lufoi/nYyIPWCaG/8XTuyxoGJSokbySGqdHJh3ifhPO3cSRJed6wyKg4K1nDrrlcHrxGfWZmYh80UmPuIdV/ZcN4AtvoJ8P5wLqOAAU2aQNLjZ+sQhYiPOmykkaka/6xZwvv27s40Taqd2Ao5txbnKfjoHaLhf//iFf3VmDN4ACQYSxhyUConesqgEaf0K4A02UyrCg2pyWrEDixyLo7X30Kw== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by CO1PR11MB5154.namprd11.prod.outlook.com (2603:10b6:303:95::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4844.15; Tue, 4 Jan 2022 17:16:44 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::b8a9:e4f7:e037:771b]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::b8a9:e4f7:e037:771b%7]) with mapi id 15.20.4844.016; Tue, 4 Jan 2022 17:16:44 +0000 Message-ID: <41ede89c-ba50-a775-b3e3-8024ec05b8cd@intel.com> Date: Tue, 4 Jan 2022 17:16:38 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH] dma/idxd: fix burst capacity calculation To: Bruce Richardson , CC: References: <20211220170514.736732-1-bruce.richardson@intel.com> From: Kevin Laatz In-Reply-To: <20211220170514.736732-1-bruce.richardson@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LNXP123CA0023.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:d2::35) To MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d668448c-85ce-4a61-2f03-08d9cfa5fb6c X-MS-TrafficTypeDiagnostic: CO1PR11MB5154:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7R851Q/kG5tDrlPjc7vzhY6J9HJd4LRVQT3Lsy/7wWIfYHWyaazmgDQJHQyfIxhV5+lnun4gg1o6pBFLU63PRCkSf0VvPP7jD1S/mq99eTENFMPgggv2ycU5TINP8U8HaH9dwjMdGpmx7pDDXCpk2pAu3zjXtTqVSq6pTj8DXja0xAIIfnG9aXH+wFMrbnwyDp8iX949E0Bv9gGg2waD0hpXCjMSByRO8OHDEGOAnW2yaFTzN2CMxvRciB6GZ0L50YQVuv0kKJHcLJGGhOZjozMyLjBi+QF2ruX/ulaEs3ESE45MkzVv4acOl33K6htGGWtAEcl0576kVEPZrE9S5r3Szt/gr6iAym84pQRt7rX2Ja4jXMynqus9H8yVlpSYGUK6bYfqfFCwfIS+98ssL6O+/eRkFIdRUqNAqW/JTGegUcGpYLqBRKLTRfcsbFH0QLoBn3hHzhtlThn9g1OscPnbZa6e3JC2seZVPvqmT1leoZcSE9VJwcFVZm5zU6eSYkBUuEr1XIrEFGYCD1c+2391IDQgE35q9bv63iWElThAfb1c+1bUW9B+pqKfKiKgRzbXwDkVwQZdoN43gMRFnjT2NfY4Y9SHaNTLLIVgeQ3MtWuGxRV4j+FXsPXgWVBtzTuydo7p90Nm6yYBZenqTmXGkpyESKqzdGKJg9vVwQ0AvRfDEAdE3XXrMUYFvBUcpWgl0ObDGDSqzKHP1Xa4lzfLAJQ0IPgJoZCXlGG/hd+Afs3UXmJbotNOwoGubClbdCO9Nw2ny35AgmoxVyYQGg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR11MB5872.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(6666004)(66476007)(66556008)(53546011)(2906002)(8676002)(316002)(508600001)(8936002)(4326008)(66946007)(38100700002)(6506007)(82960400001)(44832011)(186003)(26005)(6512007)(83380400001)(31686004)(5660300002)(36756003)(450100002)(86362001)(4744005)(31696002)(6486002)(2616005)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TFFRNG13N2tvTVpMNTI1UWQwQm9XWHU5T3BXZjVaMEQ4QlJBd0ZHK0trQklQ?= =?utf-8?B?eFdFbjMwYm1UWnFFc0x2NU5ZYTAxSFNSQ2s0a2loWlp1Z1ovZVR2aGVxUE10?= =?utf-8?B?ZmZkckpZK05QRUhTOHUrbUlhMHlTRGI3eWVnQTZnMmx5aWtHSTNCcjREUG1F?= =?utf-8?B?Vk82TSs5MTk1ZVJJOFgzNHRlOTZVME1GYkRxWUE5dGlBam5NY3VWTXpFR1FX?= =?utf-8?B?Q0N1c2h2VFhzTVlmZWZDV3FnQlBaR3pkNVlZSnkySlBLVnVrcmtyTjZZMXlB?= =?utf-8?B?OUxxR0VkbytIQ29GNkZ6cFFZV21BeHYrUWFvaVpsQmJLZEFNY0JVQmxCN2du?= =?utf-8?B?UEVHR0Nsd1ViNk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Ru?= =?utf-8?Q?r7FTOetSXsA+2pCmQR8TV7s=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: d668448c-85ce-4a61-2f03-08d9cfa5fb6c X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2022 17:16:44.6547 (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: gVNg2tG1svA4hPsuhO4BtOHI/R6tweozo/x17NuEGsQBPLpYdpG3W2PA+qzFmX5OjsnuhmVrVP9SsgZSFD4HAg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB5154 X-OriginatorOrg: intel.com 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 On 20/12/2021 17:05, Bruce Richardson wrote: > When the maximum burst size supported by HW is less than the available > ring space, incorrect capacity was returned when there was already some > jobs queued up for submission. This was because the capacity calculation > failed to subtract the number of already-enqueued jobs from the max > burst size. After subtraction is done, ensure that any negative values > (which should never occur if the user respects the reported limits), are > clamped to zero. > > Fixes: 9459de4edc99 ("dma/idxd: add burst capacity") > Cc: kevin.laatz@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson > --- > drivers/dma/idxd/idxd_common.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > Acked-by: Kevin Laatz