From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f53.google.com (mail-pg0-f53.google.com [74.125.83.53]) by dpdk.org (Postfix) with ESMTP id 0FACB2946 for ; Mon, 9 Jan 2017 00:11:23 +0100 (CET) Received: by mail-pg0-f53.google.com with SMTP id 14so24361376pgg.1 for ; Sun, 08 Jan 2017 15:11:22 -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=LvEJxRn8IOulkaIDLNKw+oiMPaWJ5X4RAF5/GeBWgLo=; b=nIHa7pDtW1gUMbPu+EjpKzB7rMoXY581q44wnW1haQ9cL4ChsUr0jj7qTReBlbbSUb +3A1cmOaUTD7QbKghXUhHAYrUFFD1LjqfmLlSd1ZW6RhiZAm3JgkJSgtqR92JuOagkV/ N17/61XPbm9CiC44hoX7YCnMMBp7IUiQEY2m32sm4XKKMzH/cwxDHyr4HJGJUXEbHYtn EtpxWLts58otz8f80EAC8pxvrnJSPUHE/fFk6MkRQh3GFxqXCAvkO+Sy/l0UcIKnqbMQ KnRpE8rYCE3oAaIByUNXymSoTgHp0YJIzHH8tljYC+UIAd2/bz8U4U3x4zyh0X7aBJK6 D5Jw== 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=LvEJxRn8IOulkaIDLNKw+oiMPaWJ5X4RAF5/GeBWgLo=; b=V+ba5fQdMUMfG47eeNzfYHaK5xP1Zc9Hj8MFulJFLMH+94sF55gU+KkD90EpXeHelY st3VU6rFdOXIVlS/JzJLG3CZTV7PnwZqdFmMxoHolH5hYrZitb4kqyOnqH/sPqU4jd23 VcLkVNhBBMOKa9qbwPTyPTCisVSJ0AENBB018zUc6+YfZDPfqQBoNPGXKtE5HTdGDvLN toGEFhoSo4e/5QRI/9sMhv7ieKsUIfpqv7ubf7M2YTaImtBiBY6hspBYGoRw/r5rNrrU LiBPEwmnYpE419jnF6CFt7Zb8CEbjYdaNwcFKNFrbjCjfDNqC2hwrCPmqNSAEnrKJ342 L51A== X-Gm-Message-State: AIkVDXKrmfYDUFkOP4K0R1ie9ssI2fBbspnmhLq8BZgi1uKxnsM7xWSaVQ2A8truH8XpqA== X-Received: by 10.84.176.100 with SMTP id u91mr185956027plb.7.1483917082422; Sun, 08 Jan 2017 15:11:22 -0800 (PST) Received: from xeon-e3 (204-195-18-65.wavecable.com. [204.195.18.65]) by smtp.gmail.com with ESMTPSA id u14sm18705439pfg.18.2017.01.08.15.11.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 08 Jan 2017 15:11:22 -0800 (PST) Date: Sun, 8 Jan 2017 15:11:14 -0800 From: Stephen Hemminger To: Qiming Yang Cc: dev@dpdk.org, ferruh.yigit@intel.com, helin.zhang@intel.com, remy.horton@intel.com Message-ID: <20170108151114.2c2ecec0@xeon-e3> In-Reply-To: <1483848695-44643-6-git-send-email-qiming.yang@intel.com> References: <1483531428-14481-1-git-send-email-qiming.yang@intel.com> <1483848695-44643-1-git-send-email-qiming.yang@intel.com> <1483848695-44643-6-git-send-email-qiming.yang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v5 5/5] ethtool: display firmware version 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: Sun, 08 Jan 2017 23:11:23 -0000 On Sun, 8 Jan 2017 12:11:35 +0800 Qiming Yang wrote: > --- a/examples/ethtool/lib/rte_ethtool.c > +++ b/examples/ethtool/lib/rte_ethtool.c > @@ -54,6 +54,9 @@ rte_ethtool_get_drvinfo(uint8_t port_id, struct ethtool_drvinfo *drvinfo) > > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > > + rte_eth_dev_fw_version_get(port_id, drvinfo->fw_version, > + sizeof(drvinfo->fw_version)); > + > memset(&dev_info, 0, sizeof(dev_info)); > rte_eth_dev_info_get(port_id, &dev_info); That memset is redundant since dev_info_get() does memset as first thing.