From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id E93971E2B for ; Mon, 9 Jan 2017 08:18:09 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP; 08 Jan 2017 23:18:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,339,1477983600"; d="scan'208";a="920382308" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga003.jf.intel.com with ESMTP; 08 Jan 2017 23:18:05 -0800 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 8 Jan 2017 23:17:46 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 8 Jan 2017 23:17:45 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.177]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0248.002; Mon, 9 Jan 2017 15:16:54 +0800 From: "Yang, Qiming" To: Stephen Hemminger CC: "dev@dpdk.org" , "Yigit, Ferruh" , "Zhang, Helin" , "Horton, Remy" Thread-Topic: [dpdk-dev] [PATCH v5 1/5] ethdev: add firmware version get Thread-Index: AQHSaWYjRfDAQTFCsEuc34whubcsNKEurm2AgAEOqPA= Date: Mon, 9 Jan 2017 07:16:52 +0000 Message-ID: References: <1483531428-14481-1-git-send-email-qiming.yang@intel.com> <1483848695-44643-1-git-send-email-qiming.yang@intel.com> <1483848695-44643-2-git-send-email-qiming.yang@intel.com> <20170108150513.6a57d4f0@xeon-e3> In-Reply-To: <20170108150513.6a57d4f0@xeon-e3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v5 1/5] ethdev: 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: Mon, 09 Jan 2017 07:18:10 -0000 -----Original Message----- From: Stephen Hemminger [mailto:stephen@networkplumber.org]=20 Sent: Monday, January 9, 2017 7:05 AM To: Yang, Qiming Cc: dev@dpdk.org; Yigit, Ferruh ; Zhang, Helin ; Horton, Remy Subject: Re: [dpdk-dev] [PATCH v5 1/5] ethdev: add firmware version get On Sun, 8 Jan 2017 12:11:31 +0800 Qiming Yang wrote: > void > +rte_eth_dev_fw_version_get(uint8_t port_id, char *fw_version, int=20 > +fw_length) { > + struct rte_eth_dev *dev; > + > + RTE_ETH_VALID_PORTID_OR_RET(port_id); > + dev =3D &rte_eth_devices[port_id]; > + > + RTE_FUNC_PTR_OR_RET(*dev->dev_ops->fw_version_get); > + (*dev->dev_ops->fw_version_get)(dev, fw_version, fw_length); } Maybe dev argument to fw_version_get should be: const struct rte_eth_dev *dev Qiming: do you means the argument to ops fw_version_get?=20 why should add 'const'? both two are OK, but we usually use struct rte_eth_= dev *dev.