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 17163427E4; Mon, 20 Mar 2023 19:35:23 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3DB5410D0; Mon, 20 Mar 2023 19:35:22 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id E49E640A80 for ; Mon, 20 Mar 2023 19:35:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679337322; x=1710873322; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=C7f62GOiFTbIFlsT60cQ2P+0AGZBgNRZr6MMTOLfXP4=; b=gSeGOgV2OAEO7S1UQRxKHL58FH5TTVUEmVPIpbY9CO0myvbEkhgJ30CL qoaNbqbf8KJVjdBdeXjrht5LujbDA7qA/zNZNzBGk/qK5XoZsBUFJs4gP jm3oVyNxpb1rflUKKsmD0/k/glzhkv2JQlpGx+Y0+ZJGhc3GRqW4Eudzb vKhwSdteEDZR4v8X6l2JIdg9u1K5xh/w6s/drzmgNj+C89BkWLIVCeCW0 zz36eo72459fObsrbh0+1149P2hHhw6RCnb92zhiSyZ456iL8hTdOdjkD NQH906fmD65GrynxHIGiU+oQTPifmw3SdIr6SVWpMhwambF3RL0J9rPYd Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10655"; a="318396723" X-IronPort-AV: E=Sophos;i="5.98,276,1673942400"; d="scan'208";a="318396723" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2023 11:35:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10655"; a="770291064" X-IronPort-AV: E=Sophos;i="5.98,276,1673942400"; d="scan'208";a="770291064" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by FMSMGA003.fm.intel.com with ESMTP; 20 Mar 2023 11:35:20 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 20 Mar 2023 11:35:20 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 20 Mar 2023 11:35:20 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Mon, 20 Mar 2023 11:35:20 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.173) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Mon, 20 Mar 2023 11:35:19 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z4EAaYo2DDAdXU/ruAmFFaBVPgFmoowv/buxYWRVmd2EyHboI3wLyf7Hn5YKfzzfKIl5wCnzsrEg0BY04ehjZfCaVTVk3J9aCsLPtG/+ybSFhkl5e7iObb74RnCS9+ks3Wq1exGDzqcBiZa8xBqYf7ZefMR/NB6YFEt+TBi4fgxHKv1cvhtzDTzCGJdonRJPTa8VktPr9HUZJp7XxhF0KeAazRsctFJLhqn2hcuKT3687VJblDT5AwXmMCVRRYvxVAstBkVfO1yMCUXIbnmA06jTjw6U1Q0RF6d4b4U08CcLmHMhDZQE8Sno1hr1qe9JvO4YiuqH9W1oPutPBBeGrQ== 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=9Gzpuzcl2zez95Mpn/vkKaRYBSWAUEfdBUANGcYk/9U=; b=MYU7+P+dxq8Jl0r+se//1BCb8ehjGksX/ZmGxjFQWHsyqyHf33rMmhAfB/mVMJGHkTXy/kU0BTsHCej42xQvmTo3mRqKsoaYN8p9kzQMCUMK2sFyguIoA//9nclM9QFIbTd1KTpb+yYKBJOHcp4dAiWfnqbf20qQzcg/2C2vsHJE/ySGHw/sRkmawGTY2pWVQtpmU1qIqKr0V3zzsrlVQx9MMJhkZMzFO+8GBoOGFFiew8QUMR1FDlYdCV6CavRwLyUhXC0r2NMNDfoW2u+pmbuP2bpHYbDXcxPzQJsYN9rjx6PG9v04OqsZCWFpdH65XyZyEHyx0tqwWAbDenL5pQ== 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 Received: from BYAPR11MB3158.namprd11.prod.outlook.com (2603:10b6:a03:1c::29) by PH0PR11MB5879.namprd11.prod.outlook.com (2603:10b6:510:142::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Mon, 20 Mar 2023 18:35:17 +0000 Received: from BYAPR11MB3158.namprd11.prod.outlook.com ([fe80::2f9c:a84e:88c9:e857]) by BYAPR11MB3158.namprd11.prod.outlook.com ([fe80::2f9c:a84e:88c9:e857%4]) with mapi id 15.20.6178.037; Mon, 20 Mar 2023 18:35:17 +0000 From: "Sevincer, Abdullah" To: "Pattan, Reshma" , "dev@dpdk.org" CC: "jerinj@marvell.com" Subject: RE: [PATCH v12] app/procinfo: display eventdev xstats Thread-Topic: [PATCH v12] app/procinfo: display eventdev xstats Thread-Index: AQHZWtL0DsVppEDyx0Go98FTxcCryK8D7V4AgAAP66A= Date: Mon, 20 Mar 2023 18:35:17 +0000 Message-ID: References: <20230309185143.1006949-1-abdullah.sevincer@intel.com> <20230320022316.2298874-1-abdullah.sevincer@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BYAPR11MB3158:EE_|PH0PR11MB5879:EE_ x-ms-office365-filtering-correlation-id: a7abe5e0-aeff-45fa-afbd-08db2971da2a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: MQbYGeKy28KlsiASRL6YQ+305ZF9FZfltqhB9ZPtWJsFVDgfSJvhxvM8iod3NUq9ekcIL+JF+op9S4b2del2mzs1CFlE32XpVKu5+sGtlj+h9YuIKIeQlBTtGmJO2i9ImEhMaHSszNL7NGv5lg4rqzZArE9Ta5RxqM6uYTMpsYGQT4VIJZR/U6wnAVGIwf7m+W8Rd4NJLdGU2+8jgHTq+zfBL8wM40FjMzDqE4emMo7lH2f9r/R3TFTWa0WhelfLvhRZa0klYefxjdganWpSse229uhxq5DDF9TUgc96mJOWQEPbDa/NVCh1InBJiKG8FmOsFkrEOQ7FOs3BpCP7tsg237oekSrTtUmuJxt0jA+/gaL8J3Y0cGTqUW8GR1IM7R8j5HJkr8UNgyE17KpibL15chlonW9+OXg5cE9MGHjcUhUtfOZ5iIjFFMSSep4XuoSsvE6h1Om+zID6zEYOhxfvIbbSS/oZUKHqkmd3MjZjH8/PKYOBduQVBrZSU8SapYcfoViLPb9IONzuZ7s04uDa8XzWiJBJwrLUIB1E0CTL3KMX+nL3uq/nbof590egfmZmfvHiVplHJDepjf3ojWJoFPSnoTMpqDQJDsAiGQVlgneKxt2vMu6HXb1IsNXtsgodblIB5hYyaXRyGsJqqfDnAr/GvTzPNWnxEU6X4jBAI5a7qjsaA/5eNCAu/nxvPu1R7NzNaNZUmlROh0cTIA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3158.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(346002)(136003)(396003)(39860400002)(366004)(376002)(451199018)(41300700001)(38100700002)(4326008)(76116006)(8676002)(64756008)(66476007)(66446008)(66946007)(66556008)(82960400001)(2906002)(52536014)(55016003)(8936002)(122000001)(5660300002)(6506007)(26005)(71200400001)(7696005)(38070700005)(33656002)(186003)(9686003)(86362001)(83380400001)(316002)(478600001)(110136005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?aYuRr265n2jmleMcd/dFB+N5LgggykxsUAtpRjN4uR+h5A5rHhHLNLrJMxds?= =?us-ascii?Q?DNDaJuDgqQKnzFpLycKhSiIK/oBZmKXdqLFD3qqMDHIYgp1rUf/7hjuP2ZFG?= =?us-ascii?Q?Yc58iANRqfAjlYHH3OwiCA6xZuZhCaDiOAVNYTDF7nBpfZI5nOQhUE85OVP/?= =?us-ascii?Q?0WxaXz1id5Kclfk0nC7bjpBZ6Ve7wKGbNZEPMerffKVBbOCpmoh3ekH/IYkN?= =?us-ascii?Q?8cY4gI8Wq9yMTZJnVxeCc2qRvPOcFRzA8whdkFlRJZj6rMOtUfReRBfajBzJ?= =?us-ascii?Q?ItVoV5BX28n1t1Kr1Mq63U9kh6j5j9mhLPEiVmA4QhMaQV4XtRy1W4AfE2br?= =?us-ascii?Q?3N/N/6CMbYm3WOQEC+J8X1nRYLxo9L2MjKhQ2b6PT+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+1Vum3GxJI2Z/tO5VSJ4q78yop/CoXU9FypfU?= =?us-ascii?Q?pSeD00hMVimCTp8l6Fjhhp4wV8OVvFDYmaUo/BDKJ82flqbnM+dV57HZSy/u?= =?us-ascii?Q?x+SN5pwo+K33a91cZL9Xv/E99In6sjALIzDoQJwovyI5JVZ6UpCOyrUzJslC?= =?us-ascii?Q?p/GpmIAPUgl8Wu5Wqq9AtksI5rQJeE6HkPmhUSRDovVOT3l3py1emM45O2NQ?= =?us-ascii?Q?RP8glIIbsaJyLl3+aD0FYOFWfPGgHtxPGoKIaAJdJVFj4XboozqvkgmKG0jA?= =?us-ascii?Q?bD156g7/MlQ3LhMRN1lavC0Q92Ub3dsvpz7JeqIuufHPqtX+jbmfz6yW7egx?= =?us-ascii?Q?rQ=3D=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: BYAPR11MB3158.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a7abe5e0-aeff-45fa-afbd-08db2971da2a X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Mar 2023 18:35:17.0706 (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: BcS9Qpao7XJrlHEsXdRgz+zA1CGYBKQDU4NvYV8mmiycmN+DycSGR6j+G7fVvCdfaZVs6Ugw1JQrqVpnI+dtR5h7V/4qyhJKtsiCXPWe4PA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5879 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 > -----Original Message----- > From: Sevincer, Abdullah > +static uint8_t evdev_id; > +static uint8_t num_ports; > +static uint8_t ports[MAX_PORTS_QUEUES]; >+static uint8_t num_queues; > +static uint8_t queues[MAX_PORTS_QUEUES]; static uint32_t=20 > +enable_shw_all_eventdev_queues; static uint32_t > +enable_shw_all_eventdev_ports; static uint32_t=20 > +enable_dump_eventdev_xstats; static uint32_t=20 > +enable_eventdev_reset_xstats; static uint32_t=20 > +enable_shw_eventdev_device_xstats; >+How about keeping a struct to maintain all the data together that way y= ou know on which all ports and queues of eventdev we have requested display= .=20 >+You can refer the existing code "struct desc_param" to see how this is do= ne Then you can declare global variables of type struct eventdev_params eve= ntdev_var[MAX_EVENTDEV_DEV] to handle data of all evendev ids as an array, = instead of keeping >+many global variables. . >+Ex:=20 >+struct eventdev_params { >+ unit8_t eventdev_id; >+ unit8_t ports[MAX_PORTS_QUEUES] >+ unit8_t queues[MAX_PORTS_QUEUES] >+ static uint8_t num_queues >+ static uint8_t num_ports >+ >+ static uint32_t enable_shw_all_eventdev_queues; >+ static uint32_t enable_shw_all_eventdev_ports; >+ static uint32_t enable_dump_eventdev_xstats; >+ static uint32_t enable_eventdev_reset_xstats; >+ static uint32_t enable_shw_eventdev_device_xstats; >+} Also, all global variables are tied to a command itself like "static uint32= _t enable_shw_port_priv" or "static uint32_t enable_shw_ring" . I also want= the same for eventdev params to be called a command like the others in the= file. If user wants he/she can chain commands. The "struct desc_param" is = handling one command only but its 3 parameters (queue_id, offset and num) a= re put in the structure, for easy parsing. None of the command line argumen= ts, hence global variables are handled/put in a structure. Would you like t= o change that for proc app going forward?