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 9F4D8A0C4C; Thu, 14 Oct 2021 09:43:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2940D40042; Thu, 14 Oct 2021 09:43:43 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 7569240041 for ; Thu, 14 Oct 2021 09:43:41 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10136"; a="288492416" X-IronPort-AV: E=Sophos;i="5.85,371,1624345200"; d="scan'208";a="288492416" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2021 00:43:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,371,1624345200"; d="scan'208";a="461094742" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga002.jf.intel.com with ESMTP; 14 Oct 2021 00:43:39 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 14 Oct 2021 00:43:39 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 14 Oct 2021 00:43:39 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Thu, 14 Oct 2021 00:43:39 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.168) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Thu, 14 Oct 2021 00:43:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IUer7Oplml0oXC6oIB6ySNHgEJ1N02bhjy73c9/lZb2ODUb9IJJkpI0eEIUAh9bCX1IjjIPWEIDqykeiQ/04tm6Sa5f4eYg1+910iftRk61JaHhzYNnZEUr8EV8YjYXC2IbBHPMYbGamzAUMMDxkg/R/4ObRPYruHIa3F9xIlVak2QM3SV1DPYJHEihdzChhIhLjYj0TJxdMmTArFh/vbxoYJbfZVOHfKccqXyeeS0IC3HXbZ5QjYlU/p0CQqgXBS2bPGcn6KVnCoQTuxQUuAL1DsS/g6B3N1QtPoncnnrqS7iSSwOBdnsiVqRD/fXkt0YUMX4JjC2jRpYLfXGOrCw== 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=n0n6lNW0ZBTxuVAMPpDn8jOtDB37qJOp1YESChZVA2Y=; b=WxccxrGhXp3vXvdZLo3EiMHvRgSegdH4Jo2l6QXJxSG+7Hc6Rr8FW9w6mfhtTLDhO8ZhVJdytJmclw5T2UbzRBhAqthPG0pNUtxYfq+r+exn/dIpvtx0e1/53tkY+3jtz9JothBgkfBXoZI5ZBysJCGvEqsy4J0rBrn1GQ01bui5dXhoyEZHEjreFriWlmp6iX2caSmJJbJkQHCKHk4iIyAAS2LZrRvAe64A35EjmLmCVGMU/FgxvVIjLT7H8Sq80ppsdsSryIQ98G5cHlLgru6u62ptaQJiMD1VPwk7VGKWFUoRGAIr0LyIy8jl/Oel+a2Zvx2MTJ2TxE5T5fVdTA== 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=n0n6lNW0ZBTxuVAMPpDn8jOtDB37qJOp1YESChZVA2Y=; b=BemG/jPDv0lGoAR68vAlpP0hAG5uS44Uu6PMR/73p/22Fov2JXlvGZ39wrNtQg13EQFFW177GmQXtzfzYwnlGqR7VOW/i89JqbsalENi8OdbNJrQBemuuJypyAYmBsVt6t/tCPBZSV4R+QsonZSkC0wb9xCeWCsGkkXPtvO6Sxc= Authentication-Results: oktetlabs.ru; dkim=none (message not signed) header.d=none;oktetlabs.ru; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5158.namprd11.prod.outlook.com (2603:10b6:510:3b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Thu, 14 Oct 2021 07:43:38 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c%5]) with mapi id 15.20.4608.016; Thu, 14 Oct 2021 07:43:38 +0000 Message-ID: <5a9658e0-d860-f63e-524d-a75ab29a2ea2@intel.com> Date: Thu, 14 Oct 2021 08:43:29 +0100 Content-Language: en-US To: Andrew Rybchenko , Xiaoyun Li CC: , Ivan Ilchenko , Ajit Khaparde References: <20210723131515.2317168-12-andrew.rybchenko@oktetlabs.ru> <20210915112733.3838024-1-andrew.rybchenko@oktetlabs.ru> From: Ferruh Yigit X-User: ferruhy In-Reply-To: <20210915112733.3838024-1-andrew.rybchenko@oktetlabs.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DU2PR04CA0348.eurprd04.prod.outlook.com (2603:10a6:10:2b4::9) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DU2PR04CA0348.eurprd04.prod.outlook.com (2603:10a6:10:2b4::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16 via Frontend Transport; Thu, 14 Oct 2021 07:43:36 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 703e677c-9a28-4401-c770-08d98ee65582 X-MS-TrafficTypeDiagnostic: PH0PR11MB5158: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yhmIjfwp5UY3xGQ4phSbkJIOcrD59GF1OMnByqEtVQimCSK7MEiRCkeYQsrq5UWtAnbJI4YNTYq213lOR0Ctouo+f8uQNCukxyGQy6okw9WqaAv/qfAIo2+oLVp2D5vO3kA/YcBGrE/aPOe+untndFKP3rlTlEq//W8Ovtqj7T2QnVw6RZQCvEM0Oe5WCrx/8MWN2Dx0UjfUeOu5OBcDthcHPKx6/ZCwj4vU9J3BWMpDAkMydwOGoic3sU+uZbJ9NviYvZi4iBQzOyHLukaX/yEo2pya3aCtT+FM4fShBeqk9lomtbubqmeyg+pnPd8kPsyijpk8r5xYP5GeEgjYUz1pm6P+VQoxTKhCsxWwXW4SatAod/4TCbG/A/0O0DoSYooADwjzxL2S6bb3VOM3P5W454y8sW+KPkp5edtSFD+v8g8G1H97+ZycIJA/ENhAUIFPwu+bPwkFAWhip0C9eUsVYGHAygOr/IJW3vwQQSaFnJ1lUMtXBtUF6y5CmTuZBwi123TqwRqoTi/ygY17ueOdgmETkR6+drf8S8FCn4MK1oi1cRaBNXVF831+V5GRFtiGTrnoIaAYRqInGz35RScgPewZhvUPSUz9rEr+4R3PaW9NhqVHKdykX82zpUrLOtqmsLh/NvooidIjInGwUjfHqQ4UIMvwpwnPwWeB73TsKcL3YdcKxHY0HdPvt81lMeHloAhzKOBEyWuXvvuR5Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(316002)(26005)(8676002)(5660300002)(31696002)(2906002)(16576012)(508600001)(83380400001)(6636002)(66556008)(66476007)(66946007)(54906003)(110136005)(38100700002)(86362001)(6486002)(53546011)(6666004)(956004)(2616005)(44832011)(186003)(82960400001)(8936002)(31686004)(4326008)(36756003)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SVpPUUYveGxwMC9JZ2N3VUVTbGMyTS9VRHNaOVhLRkN5SVQ3VVJVbHovYzNp?= =?utf-8?B?WlB1NGkza0VoU0ZwVWxIM2h3UHk0UGYrc2hMS2FYSzNpcnZTVGR5ZGpIVFd4?= =?utf-8?B?bFdXSGFwNzdjNkNkblRLVXVrY2Z1WjVZOFRKY3Bld1ZXbzVUYlBLY2M1bmp1?= =?utf-8?B?SnpBdzNHek1pWVVETTdMdVdNNUUraTQwOFh5MDUzQ2N0MXpxMWVONTcyN2lw?= =?utf-8?B?V3VuQXFiQUx4UUZsK3dIYVRZRU5qakYyYUgwSmU4SDB2WllIaHVZcDh2SlV1?= =?utf-8?B?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MFVvbzBEaDZBQWZ0VGtE?= =?utf-8?B?UTJQV1lnTTY1cHB3UEpKSEpEb2cwRjdjUnZ6bHFGZy9FQStRM2NLZ2ZaNFhP?= =?utf-8?B?WXoyTUZCdDU5TERvWmtNUXJ2MGtYOGNQTlB1SzROQTV5ZS85U1NnRWtJS2Fh?= =?utf-8?B?cFFmQ3BRQ2FOdU0vMkQreFR2NGpXNWNCR3k1aE5wZGwydWx4bGFvajZXUUxH?= =?utf-8?B?MXRySHc4aXNiTlZvWnlEcExPSW1zSXU0WXY3TEhLQUh4em84U1p5YTFYdGNB?= =?utf-8?B?cWF2OXpodDdOMStUS1BrSUVSN2s2a0hJbmJVNEJrN2IxNUpzSkV3K21FaC9S?= =?utf-8?B?WEFYdklFcGJSZ0hMUklMWGdYL0w3alAvbERlR2I0NktkeEczOElod1FZQzNz?= =?utf-8?B?anhPVzZyVHprSVpNOEJLWFZQc3owa0FrYkRpV3dkN0taR2pIbUV6elhua2JI?= =?utf-8?B?N0s4TCs3RVlHM09EZHNhRkp5eWZ3K212TVRiVGZ2YUZkelFZSU1oWXB4N3JF?= =?utf-8?B?aXNHMWs3dFZkWURvaCtMTmUyWHZLbXVKZXBQMXZJczJFTVlNMzNHdERhMkZO?= =?utf-8?Q?EYMINF6x91/1BKk2OFMt2hrrQw3/Q9HU7rsuzYH?= X-MS-Exchange-CrossTenant-Network-Message-Id: 703e677c-9a28-4401-c770-08d98ee65582 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2021 07:43:38.1048 (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: tSWl39GQtrYj5XGP12ETKZxTJB69PVE29OSzqXFGUE4FOPgyPTKNtxqOEMgh/SyPHactiT8y8Ovp/qHHrPGTcQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5158 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v5] app/testpmd: add option to display extended statistics 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" On 9/15/2021 12:27 PM, Andrew Rybchenko wrote: > From: Ivan Ilchenko > > Add 'display-xstats' option for using in accompanying with Rx/Tx statistics > (i.e. 'stats-period' option or 'show port stats' interactive command) to > display specified list of extended statistics. > > Signed-off-by: Ivan Ilchenko > Signed-off-by: Andrew Rybchenko > Acked-by: Ajit Khaparde <...> > +static int > +alloc_xstats_display_info(portid_t pi) > +{ > + uint64_t **ids_supp = &ports[pi].xstats_info.ids_supp; > + uint64_t **prev_values = &ports[pi].xstats_info.prev_values; > + uint64_t **curr_values = &ports[pi].xstats_info.curr_values; > + > + if (xstats_display_num == 0) > + return 0; > + > + *ids_supp = calloc(xstats_display_num, sizeof(**ids_supp)); > + if (*ids_supp == NULL) > + return -ENOMEM; > + > + *prev_values = calloc(xstats_display_num, > + sizeof(**prev_values)); > + if (*prev_values == NULL) > + return -ENOMEM; > + > + *curr_values = calloc(xstats_display_num, > + sizeof(**curr_values)); > + if (*curr_values == NULL) > + return -ENOMEM; Can be good to free above allocated memory before return. <...> > @@ -2886,6 +2990,7 @@ close_port(portid_t pid) > > if (is_proc_primary()) { > port_flow_flush(pi); > + free_xstats_display_info(pi); Why free only for primary process? Aren't these allocated in testpmd level per process? <...> > + > +#define XSTAT_ID_INVALID UINT64_MAX Is this macro used at all?