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 4E01E42B9B; Thu, 25 May 2023 17:24:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF23540DF8; Thu, 25 May 2023 17:24:10 +0200 (CEST) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mails.dpdk.org (Postfix) with ESMTP id 5E9AA40DDB for ; Thu, 25 May 2023 17:24:09 +0200 (CEST) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-64d3bc502ddso2721910b3a.0 for ; Thu, 25 May 2023 08:24:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1685028248; x=1687620248; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=BQPz4JLkCHy9eFEnyP41on07ESk0AOz+IGvats5VK6Y=; b=zqVU3afNy9453a1rj+331RZTlcEVpoMRkkjFXcxRxwevXM85ONTL9PllAC8L1k8YUw WOHAdtfkY2r821BSEJgvkTdjBv0/K2m8LtJcmEHeVXlG5v7/dj+pHcRcu9GWkPuFPvHE thnj+N1fijAymmH8WNszpAw7SJqXcMB4J93QAI4zUiNsGFD9r1b0BWxh0OO3ZARDNQQY zmsY0iQdn5XmV3RrozMKJoDXn2xHUfxCctFWjLduH5JYKNldNJWjKl8+Ow2hWHD+7dag GzrFWqu3EWuXrjYhhEJyYUlQeXHQ8MWLoBIVs4PGlhLvZPT4k1NUuJ2jyMt1AojjZXdL IrdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685028248; x=1687620248; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BQPz4JLkCHy9eFEnyP41on07ESk0AOz+IGvats5VK6Y=; b=EVCZGBMkZnoR0oAjnaCwOZBkAZkjNm8RoAe3vx75CyGbFdtUKhPg1uE2+K/lDGg555 qbbfQvHuyEzGx6fOjBLw0MlldRPZUoONbyi2tDPTToEmA0OGDvpw0mnyLGya5CNXWwQk E6yVVLAyvovD8jXaCUJ4UQK/Xn1mKxFI4SBwwF9BYILgo+Qlp6j26E7eKkwdOPwEbp28 7Ee/nWgRIJx+3IAs4ROxABCFouyGmfkb3W+bfYrZAFRFHt4qa+DP3e5VSemDcAuh+//n RWFb5DygFOmI8SdDtqnIUQUu5To7UNCtRNhB5sKC9+0oR5U1X558hS4TygSTto4CUSYl Jn3w== X-Gm-Message-State: AC+VfDwSBAGHnuSMwsITnzjja5U59f7aSRjq5U+sPQWAXNEzyg7wfhOv uCQVjfKSxYEcEBFSFWY+ocrzng== X-Google-Smtp-Source: ACHHUZ63cADndW+V/8EGvmkYJJLpmHfQhPA0JS3jcbcDRPlYqYa3+pAIuL19bonel8YY49zIHDNQ8A== X-Received: by 2002:a05:6a21:918c:b0:100:3964:6cb with SMTP id tp12-20020a056a21918c00b00100396406cbmr18913594pzb.40.1685028248373; Thu, 25 May 2023 08:24:08 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id b189-20020a6367c6000000b00530704f3a53sm1318001pgc.30.2023.05.25.08.24.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 May 2023 08:24:08 -0700 (PDT) Date: Thu, 25 May 2023 08:24:06 -0700 From: Stephen Hemminger To: Abdullah Sevincer Cc: dev@dpdk.org, jerinj@marvell.com, reshma.pattan@intel.com Subject: Re: [PATCH v15] app/procinfo: display eventdev xstats Message-ID: <20230525082406.08d30d05@hermes.local> In-Reply-To: <20230525060851.3010561-1-abdullah.sevincer@intel.com> References: <20230517223724.2417630-1-abdullah.sevincer@intel.com> <20230525060851.3010561-1-abdullah.sevincer@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Thu, 25 May 2023 01:08:51 -0500 Abdullah Sevincer wrote: > This commit extends proc-info application to > display xstats for the eventdev devices. > > New command line arguments are introduced to > display xstats for eventdev devices. The command > example is like: > > For displaying a specific port stats (e.g. port 1): > ./dpdk-proc-info -- --show-edev-port-xstats=1:0 > > If any xstats parameters for eventdev passed through > proc-info command line, proc-info will only display > requested eventdev data and exit. > > Users should not pass any eventdev xstats parameters > if they desire to dump other proc-info data such as > Rx/Tx descriptor dump. > More information can be found in proc-info app doc. > > Signed-off-by: Abdullah Sevincer > --- Looks good, here are some minor touchup feedbacks. > +static int > +parse_eventdev_reset_xstats_params(char *list) Could be "const char *list" here > +{ > + uint16_t evdev_id; > + > + if (sscanf(list, "%hu", &evdev_id) == 1) { sscanf has less error checking than other methods. It also allows inputs like "0A" to be confused as 0 followed by A ignored. Better to use strtoul() and have one fuction rather than copy paste the same code in three places. > + if (evdev_id >= RTE_EVENT_MAX_DEVS) { > + printf("Invalid eventdev id: %d\n", evdev_id); > + return -EINVAL; > + } > + } > + > + eventdev_var[evdev_id].reset_xstats = 1; > + > + if (evdev_id >= rte_event_dev_count()) > + rte_panic("invalid event device %hu\n", evdev_id); > + > + return 0; > +} > +