From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by dpdk.org (Postfix) with ESMTP id E4E6A1B137 for ; Wed, 21 Nov 2018 21:22:03 +0100 (CET) Received: by mail-pl1-f196.google.com with SMTP id z23so7050594plo.0 for ; Wed, 21 Nov 2018 12:22:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CmiaOAA4DIGOzHQJhvoGNK6D1OID/a0vAyj3dYgA/Cg=; b=Sxz0CqZItyd9XtYkwUBewtzxGNB3FoG0t32uE37zfmqBRNjDzACYMZuXOcW3RLN2Wn oE32RGFW0hS945sZcg1Xeet5JJUJ5u8gCvecEjiBFbQaQLAyWlpTU+qt2vvihtvSKvFu +ZNzlBlkxlT03zQoxiBbwZks6oar5xyra2xCj/CalHXPBlyj2V3T+9aSxTjbU1n81r4X J2x3mZ3JMzls1FJjbcWWqIWnhIF3oCTxJkQzV3caKzzTLjamvfFY+CDsg1TpL99ULMHH S0FND1Znwo+TVkUIu1W3HfmlX28oeRDmQjFXuL3RqLIwlOHM6ol08qXKB212TEnzYYb8 PPrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CmiaOAA4DIGOzHQJhvoGNK6D1OID/a0vAyj3dYgA/Cg=; b=tvJiEL9DaHYRuHUsx7vxThch7yqEjJENljoOGlBWvQyW/mG8mKN4QUq8WxIPQoNBpf 5p393YkrzaQdyO+Y+QZrQjMHgfOnvLBkFeWH4unwdloJ1Lc7LfGWRraVm+yWDd6pfzxs F5OCh0ZAmRsyYdLcgePMWuATmPwua8iz+PvlrMas3QC5Gey4D2KB9aRKkTNd6ZUh1VcY FB+AEwBOliUIoyw3R/9Z1xIEF5OW/jNEupjVKQxotNZwONYzyvYiiynXBEhlHRxsusZ2 +TX5JsxVOnMHLsG7iGVCgZ9U658L0fO+KEZl+oRJpiMXHGLBysj+3uLCbF8oW+/8iiDo u4Xg== X-Gm-Message-State: AA+aEWZDZKU9Sk0r0jSKpA9UtoI1dM0XrEQfSBFvHFEINjxv0tKym4Rx lHzvFm9COKPy4FUzxkT/V03sfg== X-Google-Smtp-Source: AFSGD/VOIc7LKfwHKMeEPHruaL79C08czzgLix+qUGyYTwofBnPeI0pXUlbRrbdJJt+QFa2ObfhAcA== X-Received: by 2002:a17:902:e002:: with SMTP id ca2mr8384482plb.103.1542831722947; Wed, 21 Nov 2018 12:22:02 -0800 (PST) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id e65-v6sm61616878pfa.90.2018.11.21.12.22.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Nov 2018 12:22:02 -0800 (PST) Date: Wed, 21 Nov 2018 12:22:00 -0800 From: Stephen Hemminger To: Vipin Varghese Cc: dev@dpdk.org, thomas@monjalon.net, reshma.pattan@intel.com, john.mcnamara@intel.com, stephen1.byrne@intel.com, michael.j.glynn@intel.com, amol.patel@intel.com Message-ID: <20181121122200.786ffcd8@xeon-e3> In-Reply-To: <20181106124912.40700-4-vipin.varghese@intel.com> References: <20181106124912.40700-1-vipin.varghese@intel.com> <20181106124912.40700-4-vipin.varghese@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 4/9] app/procinfo: add support for show port X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2018 20:22:04 -0000 On Tue, 6 Nov 2018 18:19:07 +0530 Vipin Varghese wrote: Minor observations which are things that checkpatch etc won't see but make the code easier to read/maintain. > +/* border variable to hold for show */ > +char bdr_str[MAX_STRING_LEN]; Does this have to be global, could it just be static? > + memset(&link, 0, sizeof(link)); > + memset(&dev_info, 0, sizeof(dev_info)); > + memset(&queue_info, 0, sizeof(queue_info)); > + memset(&stats, 0, sizeof(stats)); > + memset(&rss_conf, 0, sizeof(rss_conf)); These memset's should be unnecessary. For example, dev_info is always cleared already inside rte_eth_dev_info_get(). > + if ((ret) || (rss_conf.rss_key == NULL)) > + continue; Unnecessary parenthesis hurt readability in this if statement.