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 76723A0A0C; Fri, 23 Apr 2021 22:29:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 442C1410E7; Fri, 23 Apr 2021 22:29:50 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150070.outbound.protection.outlook.com [40.107.15.70]) by mails.dpdk.org (Postfix) with ESMTP id E3E1F410E5 for ; Fri, 23 Apr 2021 22:29:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5N/6LE/6s43Wxu1jgKXdSZbYaoGI7OY9KvVzd76Fcxs=; b=vxpmtVgHmc+ZSiYv0fuHGsGQbT5bhtjqylqBpFqAwPv4ZLGOXiy3R1nzSfzmNfhrO9Zm7qVQX4Yrs9b9YnJmMH76t2GwWkLd2kM78kKGHk+QmpGX083z5Ivaqq2b09TW5bygKGcLWXeMTSKhEVVEUQaKkfetp9uzfvoBk2QkN5U= Received: from AM6P191CA0047.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:7f::24) by VI1PR08MB2863.eurprd08.prod.outlook.com (2603:10a6:802:1f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.23; Fri, 23 Apr 2021 20:29:43 +0000 Received: from AM5EUR03FT045.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:7f:cafe::6) by AM6P191CA0047.outlook.office365.com (2603:10a6:209:7f::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.20 via Frontend Transport; Fri, 23 Apr 2021 20:29:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT045.mail.protection.outlook.com (10.152.17.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21 via Frontend Transport; Fri, 23 Apr 2021 20:29:42 +0000 Received: ("Tessian outbound 47ca92dabae7:v90"); Fri, 23 Apr 2021 20:29:42 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b32a73d14757f6b5 X-CR-MTA-TID: 64aa7808 Received: from a1383f2faab5.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A1965A21-7764-41A2-8413-2934F653A2BA.1; Fri, 23 Apr 2021 20:29:36 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a1383f2faab5.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 23 Apr 2021 20:29:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XI/CwzhJm7lkv4kdiYZUvJ2MQLOVhbxwgY7UrC6R7dhuvgR6YG8ukoYyeOwKTp06TYrS/ITNiam+ddnYsPg6R+2tInrF2ObLyWgiif2lKqRjAD0iRD1yxXHfW6jugnokGzdu3Vc/0U1ES0yKuCxPo/zvlhFrsIFl0bKTYMg7DgHIXc6lBWbNW8nK1bR0dKFLpkZdbSv0ICslEPhJ6QKQgDA4MAZNvKFADw9LAV6MA/DdMQrWy2qO4lBTZpwgOAI1v+gf/v9/SAsJQWiyHPrRRumOYsefom6YgQNB1ZQ5QCflVXDdCuYeZRszG4IgmVuj6TofUgaNjHppxtZaEjaYxg== 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=5N/6LE/6s43Wxu1jgKXdSZbYaoGI7OY9KvVzd76Fcxs=; b=iqxwmQ9OSMFHHUH8zFnPexGQFZSA7MRtciQ5WkbHZ/MxkX4QvUdmteif2QUXAtaXNmGE18d5KD1D5RMSy916KdvzBDYiIErB2AywhvKT3up8VQmr31yE+RsNAG+4FtZy6pDqwoQB0tDYQ5eH8OFbbf9e9TAv6A5D20VkzEPz00Z2/YbrIZoFXykj9Esoz1CyzjK2XSFYJCTamkBmPvYmJ9Iw+eJ5qvDzuywhJhMnkgnHUI0rq3sSsQtyc0JvE7T3s9LG/3DUfeGgWFNHOLyfKKIp+OnouH0wZgdv7a1IFIaURflWakjA71cUYnaxFV3esCdkxlznNPjVlsbJ5eCJgQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5N/6LE/6s43Wxu1jgKXdSZbYaoGI7OY9KvVzd76Fcxs=; b=vxpmtVgHmc+ZSiYv0fuHGsGQbT5bhtjqylqBpFqAwPv4ZLGOXiy3R1nzSfzmNfhrO9Zm7qVQX4Yrs9b9YnJmMH76t2GwWkLd2kM78kKGHk+QmpGX083z5Ivaqq2b09TW5bygKGcLWXeMTSKhEVVEUQaKkfetp9uzfvoBk2QkN5U= Received: from VI1PR08MB4622.eurprd08.prod.outlook.com (2603:10a6:803:bc::17) by VI1PR0802MB2462.eurprd08.prod.outlook.com (2603:10a6:800:ad::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21; Fri, 23 Apr 2021 20:29:33 +0000 Received: from VI1PR08MB4622.eurprd08.prod.outlook.com ([fe80::5dfd:11c6:9af8:555c]) by VI1PR08MB4622.eurprd08.prod.outlook.com ([fe80::5dfd:11c6:9af8:555c%2]) with mapi id 15.20.4065.021; Fri, 23 Apr 2021 20:29:33 +0000 From: Dharmik Thakkar To: Olivier Matz , Andrew Rybchenko CC: dev , nd , Joyce Kong , Honnappa Nagarahalli Thread-Topic: [PATCH v4 2/2] lib/mempool: distinguish debug counters from cache and pool Thread-Index: AQHXN+AzJX/Ka7Af40OVFfglYfQBJKrCjvqA Date: Fri, 23 Apr 2021 20:29:32 +0000 Message-ID: <364A908F-0BFE-49FD-BFFE-6A2CCC13F654@arm.com> References: <20210420000800.1504-1-dharmik.thakkar@arm.com> <20210423012938.24770-1-dharmik.thakkar@arm.com> <20210423012938.24770-3-dharmik.thakkar@arm.com> In-Reply-To: <20210423012938.24770-3-dharmik.thakkar@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Authentication-Results-Original: 6wind.com; dkim=none (message not signed) header.d=none;6wind.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [72.182.76.215] x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: b478c753-cf13-4629-d784-08d9069686fd x-ms-traffictypediagnostic: VI1PR0802MB2462:|VI1PR08MB2863: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:8273;OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: /0hbXiwh20SuXjJYg4bA5QpXkCwpeiGZeYWW6noRuDI2cCfHYoD1Nj6OgZPZTFOHF8YKSzpu4uTIKo3tn5XS9u9jluPjYJ1VTfDi/GQN4bo5kkqFPa5ON4pNCH+0+bQ8i1XZisYuVX75jlanGrkZFeRvbCM/vTefWdhee0YlUsHAulqAeUPYPLBSJAll/6AI9jCVg+nFhhfuiTgn1xHtpQkK30v/yy51SyCqsyRXvj5DUClZ9x7lbL3+UBTOQxJGWuC3RoaJdH0iYHSB2g8OAvX4ondhNUkdrvXVJUrz6U9izrg1RySIsl3w0Anz6E4TVco4wLbRk+zJ0y6xRw4d0N0V8SfIVxww9XvjZOfw3BtfbfEm/7NHfnDsCsXgTv+Jdellmw/x7cGvUcDJovd1SqS4M4zQXBLd+fcHL6LZEDEZ8eSQEEswIPb7mSJTam/mzaiI39oMMs9wBgPkhFfrxWZf/HD+vAuLTQkIc0J97pMeFjdwa3fnBmtUdp1uVPn71tX9W8tEwKTUFL5vzwgg9bBtal2GcNvl3K8s9TBbmet4f4cO9uyX4Gmbg+6lPTx5gDusBe/u2IGxxTp5AkqL29GJk7/KefpazIlGGAKxQMEJHhv0svgQZLcfteGiZpcYxL/7DtkU6/3UwfAOvh0rFS3puhqfAiHcmc9n+1MKusI= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB4622.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(376002)(39850400004)(366004)(396003)(346002)(26005)(110136005)(186003)(54906003)(8936002)(8676002)(86362001)(2906002)(316002)(6512007)(33656002)(4326008)(38100700002)(66556008)(91956017)(122000001)(53546011)(71200400001)(66946007)(76116006)(5660300002)(66446008)(6486002)(83380400001)(36756003)(66476007)(2616005)(478600001)(6506007)(64756008)(45980500001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?G4G0W2bJtTZskSc/49Tku2aZymY20iV5L8jXIn2d7lL6gtH7MVkeT+w6S/pR?= =?us-ascii?Q?jQWa+HKRuP2Mn2X9LuAdmogor6rCCDfyhBwsJZE2ZsG9AeOMFloOGPB2H/bo?= =?us-ascii?Q?wb+urEbRvl32Vp+C3B86PTt27FkQDFHW1uMsWlGXFwsHcG8k1p2+zplttm2P?= =?us-ascii?Q?FJqEbsW/v+uN+BWqWN5hGbhVuNvMtWvIJxG3K44YFvwrdEU7W9x8esGoCxKS?= =?us-ascii?Q?tZyLaD0t6r5eufEEKCLrrxhNqzqxSiKZ2tuA3foyd9hki9aFDq4G/rYUzMCb?= =?us-ascii?Q?ZkTG9u181VgfwnIdJzDDssRm3B6Vj3z3GC07kzwILW7uLmdvQa+Ji2orK5V4?= =?us-ascii?Q?uIAlMeF+Mmn4iQmny4vyaaH2BzquzS/x7h5YpxqRmD3/4FEGIiBUMty/6try?= =?us-ascii?Q?twthNEz0P2WNX3rVQfog26w/ccOBjq4cZlmFtZmosmCTSVFHEQ15hd/fMdt5?= =?us-ascii?Q?Q+GeUTfzHT9qB7sv/nYtsEIm+sgjG81Jv3CBjpAuvqfSb+mv9gP4w46OyHVg?= =?us-ascii?Q?vmICOVGIJcr2foK3Pqfa/6QSHzhby/I+pP6BOSDUSnKrXczMMjiiQTseewSj?= =?us-ascii?Q?7sxjmC9HyKWKIQw1xVTK6yVwBC0cFNvgaLpuWZ2wc4JETc+wX5qDHG/sj2q6?= =?us-ascii?Q?/yfZM1/o/XRQSAewnQ6YLt8i7sXpaT7ip0d3TnZ/wiyCqdyUAs9Sb6G2QkM6?= =?us-ascii?Q?NPZjMTm0kYMkOtXAGssGfXfBWeJuPBO+KoHRb6cVElS/h+tvy+rwY692iq4X?= =?us-ascii?Q?3BsF7ox1TcxkhQ0iI+Pi5/Md8qo/hMCUbBA4ySPO8DlxlQsLm+CaHv9/VTa9?= =?us-ascii?Q?rHz5kO/NQdsHvYv52vrThIh72amXlIxLegWuzc19hKqR2FkqtzCoD1zR8NEc?= =?us-ascii?Q?hcqt1AgOWV+3AaF50qU3wcSArPvNOdE3vYIVZBa+IudKt76wkpIDjIvd4ppi?= =?us-ascii?Q?VqiCiDNUdw3XUYGq+lnm72xRRmnu8MfypZmef2idOJX1OXJS6wScvf96pEmM?= =?us-ascii?Q?o1DTcUOgX2JPQ84EJazR7XBVgzpHxzhg0PBElfK7vseHoH3YVC5ugolVRHBj?= =?us-ascii?Q?dJFDLVoNOcofIvkWBMQ1zjynWQY6hAYV1LNxEPAU7W3VdORz8QLZPYNlvbLh?= =?us-ascii?Q?BROiUdHgtXqQZkvyELDpTxkmRJoTELdPzMiYHdb2bh2KhX2f52cD0nYa04AE?= =?us-ascii?Q?hLQ6FeVmr+V9KizCnRYVKzJIr7Hq2UqFmZvR+CjTbjxlHsWu3pcGQ0X/9J2p?= =?us-ascii?Q?UyjJkwpI2sV+VZ6NaYVhNQMR/5HAUHRb4dlUC/FJCSRbjKruXNgJ1xeBAGgI?= =?us-ascii?Q?nA6/nLuL7HolyFBwiQKjFB7c?= Content-Type: text/plain; charset="us-ascii" Content-ID: <3733446E383C1340916141E8093FFE36@eurprd08.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2462 Original-Authentication-Results: 6wind.com; dkim=none (message not signed) header.d=none;6wind.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT045.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 547417e2-d3d6-40f7-5e62-08d90696811c X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 63FKIzcSNC04hTmIVX6CHdbDVrWsw8MyaZeJAGRUXYwPezsV+hZVDL9SeJ4qKJ7s6MFDzCo6AYgZEXoHn4GCvFuVVjnrYNZR+21TamsKpLvWXcVSLIc8GwFAN4gRZVhyRWsxUBGZ9wUWUzw/zNTdKJjxFNnb+rGpZbVBMHqGz0npNUx1Aj2RJgMGLoSUmft67khsWOvpmfwyblpys5y18BI8f6gI94pvp9fjAidaaW4o2u8DfzEt5tiRrJq2Lnytxa6DVW/BYI8YyJZLrH1A+uWzgbvhW+aoxZiVIvv3dPNz5m4LJIiQvXKkS9OMuJwFz29KRac7XQpAUSaKZI6n/jYG9pBC5DJwIFJGCk7qkUuYGL5/OqbYM/Ilp2K8133C/bUTaDDQ3IAPdAhmRVY0JOHHTGSStTVOxxDxMjhm7oTqGYyU+PcyIfepWwWMsHA5NXxEGZxH+pbBIqSQxx38kGwWvxWfD4Clnc1ZAODLYlA+XzpBNuCSYSaLyihFo1fp+hD52wN/4wJLkdarwrLXmJxUp20sVQ74szj4rdKnphW7iLzs7thGuN/XnkQbc7hL48Fw+NP0FOm4NeSA8DvquyrLFQKoxVfKgmEjHBq6ijK5370O+s40rCaPMSXIdhxZTHOWybvPGL3baDU7qhwuIrEbf5dtAXRxgxnB+6Ll2hVnCrMR8bpdAjWxa6sAq4x/ X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(346002)(376002)(39850400004)(136003)(396003)(46966006)(36840700001)(2616005)(82740400003)(336012)(356005)(81166007)(5660300002)(83380400001)(6486002)(26005)(54906003)(186003)(478600001)(86362001)(6506007)(316002)(53546011)(4326008)(110136005)(2906002)(36756003)(82310400003)(70586007)(36860700001)(70206006)(6512007)(8676002)(8936002)(47076005)(34020700004)(33656002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2021 20:29:42.8559 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b478c753-cf13-4629-d784-08d9069686fd X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT045.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2863 Subject: Re: [dpdk-dev] [PATCH v4 2/2] lib/mempool: distinguish debug counters from cache and pool 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" +Honnappa > On Apr 22, 2021, at 8:29 PM, Dharmik Thakkar wr= ote: >=20 > From: Joyce Kong >=20 > If cache is enabled, objects will be retrieved/put from/to cache, > subsequently from/to the common pool. Now the debug stats calculate > the objects retrieved/put from/to cache and pool together, it is > better to distinguish them. >=20 > Signed-off-by: Joyce Kong > Signed-off-by: Dharmik Thakkar > Reviewed-by: Ruifeng Wang > Reviewed-by: Honnappa Nagarahalli > --- > lib/mempool/rte_mempool.c | 16 +++++++++++++++ > lib/mempool/rte_mempool.h | 43 ++++++++++++++++++++++++++------------- > 2 files changed, 45 insertions(+), 14 deletions(-) >=20 > diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c > index afb1239c8d48..e9343c2a7f6b 100644 > --- a/lib/mempool/rte_mempool.c > +++ b/lib/mempool/rte_mempool.c > @@ -1244,6 +1244,14 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp) > for (lcore_id =3D 0; lcore_id < RTE_MAX_LCORE; lcore_id++) { > sum.put_bulk +=3D mp->stats[lcore_id].put_bulk; > sum.put_objs +=3D mp->stats[lcore_id].put_objs; > + sum.put_common_pool_bulk +=3D > + mp->stats[lcore_id].put_common_pool_bulk; > + sum.put_common_pool_objs +=3D > + mp->stats[lcore_id].put_common_pool_objs; > + sum.get_common_pool_bulk +=3D > + mp->stats[lcore_id].get_common_pool_bulk; > + sum.get_common_pool_objs +=3D > + mp->stats[lcore_id].get_common_pool_objs; > sum.get_success_bulk +=3D mp->stats[lcore_id].get_success_bulk; > sum.get_success_objs +=3D mp->stats[lcore_id].get_success_objs; > sum.get_fail_bulk +=3D mp->stats[lcore_id].get_fail_bulk; > @@ -1254,6 +1262,14 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp) > fprintf(f, " stats:\n"); > fprintf(f, " put_bulk=3D%"PRIu64"\n", sum.put_bulk); > fprintf(f, " put_objs=3D%"PRIu64"\n", sum.put_objs); > + fprintf(f, " put_common_pool_bulk=3D%"PRIu64"\n", > + sum.put_common_pool_bulk); > + fprintf(f, " put_common_pool_objs=3D%"PRIu64"\n", > + sum.put_common_pool_objs); > + fprintf(f, " get_common_pool_bulk=3D%"PRIu64"\n", > + sum.get_common_pool_bulk); > + fprintf(f, " get_common_pool_objs=3D%"PRIu64"\n", > + sum.get_common_pool_objs); > fprintf(f, " get_success_bulk=3D%"PRIu64"\n", sum.get_success_bulk); > fprintf(f, " get_success_objs=3D%"PRIu64"\n", sum.get_success_objs); > fprintf(f, " get_fail_bulk=3D%"PRIu64"\n", sum.get_fail_bulk); > diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h > index 848a19226149..4343b287dc4e 100644 > --- a/lib/mempool/rte_mempool.h > +++ b/lib/mempool/rte_mempool.h > @@ -64,14 +64,21 @@ extern "C" { > #ifdef RTE_LIBRTE_MEMPOOL_DEBUG > /** > * A structure that stores the mempool statistics (per-lcore). > + * Note: Cache stats (put_cache_bulk/objs, get_cache_bulk/objs) are not > + * captured since they can be calculated from other stats. > + * For example: put_cache_objs =3D put_objs - put_common_pool_objs. > */ > struct rte_mempool_debug_stats { > - uint64_t put_bulk; /**< Number of puts. */ > - uint64_t put_objs; /**< Number of objects successfully put. */ > - uint64_t get_success_bulk; /**< Successful allocation number. */ > - uint64_t get_success_objs; /**< Objects successfully allocated. */ > - uint64_t get_fail_bulk; /**< Failed allocation number. */ > - uint64_t get_fail_objs; /**< Objects that failed to be allocated. */ > + uint64_t put_bulk; /**< Number of puts. */ > + uint64_t put_objs; /**< Number of objects successfully put. */ > + uint64_t put_common_pool_bulk; /**< Number of bulks enqueued in commo= n pool. */ > + uint64_t put_common_pool_objs; /**< Number of objects enqueued in com= mon pool. */ > + uint64_t get_common_pool_bulk; /**< Number of bulks dequeued from co= mmon pool. */ > + uint64_t get_common_pool_objs; /**< Number of objects dequeued from c= ommon pool. */ > + uint64_t get_success_bulk; /**< Successful allocation number. */ > + uint64_t get_success_objs; /**< Objects successfully allocated. */ > + uint64_t get_fail_bulk; /**< Failed allocation number. */ > + uint64_t get_fail_objs; /**< Objects that failed to be allocated. */ > /** Successful allocation number of contiguous blocks. */ > uint64_t get_success_blks; > /** Failed allocation number of contiguous blocks. */ > @@ -699,10 +706,18 @@ rte_mempool_ops_dequeue_bulk(struct rte_mempool *mp= , > void **obj_table, unsigned n) > { > struct rte_mempool_ops *ops; > + int ret; >=20 > rte_mempool_trace_ops_dequeue_bulk(mp, obj_table, n); > ops =3D rte_mempool_get_ops(mp->ops_index); > - return ops->dequeue(mp, obj_table, n); > + ret =3D ops->dequeue(mp, obj_table, n); > + if (ret =3D=3D 0) { > + __MEMPOOL_STAT_ADD(mp, get_common_pool_bulk, 1); > + __MEMPOOL_STAT_ADD(mp, get_common_pool_objs, n); > + __MEMPOOL_STAT_ADD(mp, get_success_bulk, 1); > + __MEMPOOL_STAT_ADD(mp, get_success_objs, n); > + } > + return ret; > } >=20 > /** > @@ -749,6 +764,8 @@ rte_mempool_ops_enqueue_bulk(struct rte_mempool *mp, = void * const *obj_table, > { > struct rte_mempool_ops *ops; >=20 > + __MEMPOOL_STAT_ADD(mp, put_common_pool_bulk, 1); > + __MEMPOOL_STAT_ADD(mp, put_common_pool_objs, n); > rte_mempool_trace_ops_enqueue_bulk(mp, obj_table, n); > ops =3D rte_mempool_get_ops(mp->ops_index); > return ops->enqueue(mp, obj_table, n); > @@ -1297,9 +1314,10 @@ __mempool_generic_put(struct rte_mempool *mp, void= * const *obj_table, >=20 > /* Add elements back into the cache */ > rte_memcpy(&cache_objs[0], obj_table, sizeof(void *) * n); > - > cache->len +=3D n; >=20 > + __MEMPOOL_STAT_ADD(mp, put_cache_bulk, 1); > + > if (cache->len >=3D cache->flushthresh) { > rte_mempool_ops_enqueue_bulk(mp, &cache->objs[cache->size], > cache->len - cache->size); > @@ -1430,6 +1448,9 @@ __mempool_generic_get(struct rte_mempool *mp, void = **obj_table, > } >=20 > cache->len +=3D req; > + } else { > + __MEMPOOL_STAT_ADD(mp, get_success_bulk, 1); > + __MEMPOOL_STAT_ADD(mp, get_success_objs, n); > } >=20 > /* Now fill in the response ... */ > @@ -1438,9 +1459,6 @@ __mempool_generic_get(struct rte_mempool *mp, void = **obj_table, >=20 > cache->len -=3D n; >=20 > - __MEMPOOL_STAT_ADD(mp, get_success_bulk, 1); > - __MEMPOOL_STAT_ADD(mp, get_success_objs, n); > - > return 0; >=20 > ring_dequeue: > @@ -1451,9 +1469,6 @@ __mempool_generic_get(struct rte_mempool *mp, void = **obj_table, > if (ret < 0) { > __MEMPOOL_STAT_ADD(mp, get_fail_bulk, 1); > __MEMPOOL_STAT_ADD(mp, get_fail_objs, n); > - } else { > - __MEMPOOL_STAT_ADD(mp, get_success_bulk, 1); > - __MEMPOOL_STAT_ADD(mp, get_success_objs, n); > } >=20 > return ret; > --=20 > 2.17.1 >=20