From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 04E4AD592 for ; Wed, 11 Jan 2017 16:45:13 +0100 (CET) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP; 11 Jan 2017 07:45:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,346,1477983600"; d="scan'208";a="51824641" Received: from rhorton-mobl.ger.corp.intel.com (HELO [10.252.28.198]) ([10.252.28.198]) by orsmga005.jf.intel.com with ESMTP; 11 Jan 2017 07:45:11 -0800 To: Qiming Yang , dev@dpdk.org References: <1484039333-30074-2-git-send-email-qiming.yang@intel.com> <1484116905-57438-1-git-send-email-qiming.yang@intel.com> <1484116905-57438-3-git-send-email-qiming.yang@intel.com> Cc: ferruh.yigit@intel.com From: Remy Horton Organization: Intel Shannon Limited Message-ID: <2ecd0288-6f58-9f55-48fc-2dc3e4e97983@intel.com> Date: Wed, 11 Jan 2017 15:45:10 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <1484116905-57438-3-git-send-email-qiming.yang@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v7 2/5] net/e1000: add firmware version get 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, 11 Jan 2017 15:45:14 -0000 On 11/01/2017 06:41, Qiming Yang wrote: > This patch adds a new function eth_igb_fw_version_get. > > Signed-off-by: Qiming Yang [..] > +static int > +eth_igb_fw_version_get(struct rte_eth_dev *dev, char *fw_version, > + size_t fw_size) > +{ > + struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private); > + struct e1000_fw_version fw; > + > + if (fw_size < 16) { Magic number. Ought to be #define value (or at least a comment explaining the choice of size).. Otherwise looking good.. :) ..Remy