From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f180.google.com (mail-pf0-f180.google.com [209.85.192.180]) by dpdk.org (Postfix) with ESMTP id 0839F152A for ; Mon, 9 Jan 2017 18:23:19 +0100 (CET) Received: by mail-pf0-f180.google.com with SMTP id y143so11386477pfb.0 for ; Mon, 09 Jan 2017 09:23:19 -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=KJ3SzX35KDk3rVV0ZDNRrfiMgJ/FzJoo5TaS7z7XfoU=; b=f/CQn4BXtD9Cud9gtblmzY9jIrwvARd/TsIex+GUFG3aug5YOMtqm6WG+HUkfSOA15 D2OsZD09JFcDT+bTDn7ogkPjH1MppTczrI0tpI4nxbL6hNYDKxQC+3ZLEnAHc6iYDCH5 9FLFkLwV2gp/akJTFKayxf0HywmdvshknCcpeFj0C7y3XWgpISSASryRu0u8ICYU+eoO 9VBKJ+xKzDghXWzwvXjtS3+sF9D21ppQwXAlvA9J21STHsYzNikf5kEPezHnIakvjBpw q6wEHXpR/kCsm+4tp7ZqkNnALltHdRzQCB3Fu1Sv3bZ4Pz284oxAki8wcEafoh49vdDl AKeg== 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=KJ3SzX35KDk3rVV0ZDNRrfiMgJ/FzJoo5TaS7z7XfoU=; b=kQ+vT2lob5lRId7h7MdBz1EIP7HWMwTX3TxIDHnOVi++E0GB5BZTVBbZPhrJCNIEZp ti4JRKi3JSSzea0DyF4c6hdPUYJAd5+I6qc/g2/LLO8r7vWhnTi+EbvF4odR3TjifIoB hipcg1UWhRi4iSWwL96OgPFcsZMt7pKXyQVZbDPHEtTLP1+ajMbhuxxQDGgQhFeBmq+g HaYMMnZdyCZ3/UeTWSFf3QmUW+DG49fW20Mh+y9pE+UymufccbQlGRsU3vq7mkH6TcT9 5gFmftS5l8kt8Rb9li8gTIHj3APLTBaJ9DxfRnOp9Ks8qG6SlHXjYICWPNsH1SHw8YpJ Axxg== X-Gm-Message-State: AIkVDXIRCYkBz8IURQKHIvzON1EO7PsZDc7K6eSBVLbI2BwzDadp5jVrxPDsQxBUEJTgPA== X-Received: by 10.84.162.204 with SMTP id o12mr197679226plg.17.1483982599192; Mon, 09 Jan 2017 09:23:19 -0800 (PST) Received: from xeon-e3 (204-195-18-65.wavecable.com. [204.195.18.65]) by smtp.gmail.com with ESMTPSA id b2sm19008660pfb.43.2017.01.09.09.23.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2017 09:23:19 -0800 (PST) Date: Mon, 9 Jan 2017 09:23:16 -0800 From: Stephen Hemminger To: Remy Horton Cc: "Yang, Qiming" , "dev@dpdk.org" , "Yigit, Ferruh" , "Zhang, Helin" Message-ID: <20170109092316.6dfb971f@xeon-e3> In-Reply-To: <8c746d3c-abb2-9ec5-80d0-2315f854e5bf@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-2-git-send-email-qiming.yang@intel.com> <20170108150513.6a57d4f0@xeon-e3> <8c746d3c-abb2-9ec5-80d0-2315f854e5bf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 17:23:20 -0000 On Mon, 9 Jan 2017 10:01:40 +0000 Remy Horton wrote: > On 09/01/2017 07:16, Yang, Qiming wrote: > > -----Original Message----- > > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > [..] > >> void > >> +rte_eth_dev_fw_version_get(uint8_t port_id, char *fw_version, int > >> +fw_length) { > >> + struct rte_eth_dev *dev; > >> + > >> + RTE_ETH_VALID_PORTID_OR_RET(port_id); > >> + dev = &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? > > why should add 'const'? both two are OK, but we usually use struct rte_eth_dev *dev. > > Does seem a bit odd to me as I don't think any of the other rte_dev_ops > entrypoints use const. Maybe they should but if that's now policy (I've > been under a rock recently) probably better to do them all in a seperate > cleanup patchset.. DPDK is somewhat lazy about using const.