From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v4 1/5] ethdev: add firmware version get Date: Thu, 05 Jan 2017 14:44:56 +0100 Message-ID: <2775891.n5HL0JQtYk@xps13> References: <1482841816-54143-1-git-send-email-qiming.yang@intel.com> <1483531428-14481-1-git-send-email-qiming.yang@intel.com> <1483531428-14481-2-git-send-email-qiming.yang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, ferruh.yigit@intel.com, helin.zhang@intel.com, remy.horton@intel.com To: Qiming Yang Return-path: Received: from mail-wj0-f180.google.com (mail-wj0-f180.google.com [209.85.210.180]) by dpdk.org (Postfix) with ESMTP id 19ECF2C36 for ; Thu, 5 Jan 2017 14:44:58 +0100 (CET) Received: by mail-wj0-f180.google.com with SMTP id tn15so35407799wjb.1 for ; Thu, 05 Jan 2017 05:44:58 -0800 (PST) In-Reply-To: <1483531428-14481-2-git-send-email-qiming.yang@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2017-01-04 20:03, Qiming Yang: > This patch adds a new API 'rte_eth_dev_fw_version_get' for > fetching firmware version related information by a given device. [...] > /** > + * Retrieve the firmware version of a device. > + * > + * @param port_id > + * The port identifier of the device. > + * @param fw_major > + * A pointer to store the major firmware version of a device. > + * @param fw_minor > + * A pointer to store the minor firmware version of a device. > + * @param fw_patch > + * A pointer to store the firmware patch number of a device. > + * @param etrack_id > + * A pointer to store the nvm version of a device. > + */ > +void rte_eth_dev_fw_version_get(uint8_t port_id, uint32_t *fw_major, > + uint32_t *fw_minor, uint32_t *fw_patch, uint32_t *etrack_id); After reading few comments, I think it should just fill a string. There is no way the firmware version can be generalized or standardized. If the application wants to do some processing like number comparisons, it has to be aware of the specific firmware version string format. If you want to help the application to parse this string, it should be a PMD specific API.