From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 6372A10D79 for ; Thu, 22 Dec 2016 15:47:14 +0100 (CET) Received: by mail-wm0-f43.google.com with SMTP id g23so9575854wme.0 for ; Thu, 22 Dec 2016 06:47:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ffn2TpZIZjOu17mcsFjykni6nSsKPOUDnC06ONuQ+pA=; b=ljguPjPGrl3WWRJFXEcNz25l1KWFeaVJGjsu1qG4DxAB8jJCcWt7J1/9S7mizVLq9p 1CeW7lSEu600MFtvgr5fnyRjbSP+gmIye1NkBLmhTaJaIyvHfKUFFGA51Ek5b2exoy1u EN7AaqSiQunBtJIdN1GoNEQjUH7NHTXltJZsMFUYqiuEwaKaQYju9LRTcaLVDAMU6V+W yhPUdvvgRUVYgJVczqVGndQmDhLnBIpUnwg1Ral2Mnm//z1MG/g378DPR34c8YPckieI hTaQhevMbJB/MJI29zy6mK+6iht/el7EnBOg/hA8JvGnczNhZWfZfHKL0w4vLoTPP/9R K0qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=Ffn2TpZIZjOu17mcsFjykni6nSsKPOUDnC06ONuQ+pA=; b=s9WUxw/PjuMPtHqs0I7YnoiosIHgb8XjKlN9yZEND69X5/Qc5a97oV/F+90v6V0jlu gsB7Bh2dtPffmCv+Ar8R/VKcDH8+kgOXcL4waQ7sY2HQiztVMH2GNsZtH+0ECyWbL2jE qIkCulw+QPZDs0BmP9e+KtRY24Y0EYkJIVzVFvWKPpabddp2nNn95lFR1HeYgTAlwOJH rZvatXVkePmlhR9WYCLuC+8JPq73jX76wuhnt291VFPpZVx0UmnOZkB4A8Vmn7tflo5S qRIsPNIyHl5O/toW2u5fdGvf5gKvpxKx4qksEkoBuzSVzJkqyXHr6tNRpJ2a+A8w19XJ b1dQ== X-Gm-Message-State: AIkVDXImcw//GGPk/ycKoyJCT32p2DVkSE7aQxKyY1jhN5WurOHQpwCFei3Jj+P9So8aNyxi X-Received: by 10.28.7.197 with SMTP id 188mr1813115wmh.26.1482418033925; Thu, 22 Dec 2016 06:47:13 -0800 (PST) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id lr10sm4580957wjb.6.2016.12.22.06.47.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Dec 2016 06:47:13 -0800 (PST) From: Thomas Monjalon To: Ferruh Yigit Cc: Qiming Yang , dev@dpdk.org, Remy Horton Date: Thu, 22 Dec 2016 15:47:12 +0100 Message-ID: <6590239.9s5rXc1lKr@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: <1479375779-46629-2-git-send-email-qiming.yang@intel.com> <1578263.GeZ0IiYehl@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2 0/5] example/ethtool: add bus info and fw 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: Thu, 22 Dec 2016 14:47:14 -0000 2016-12-22 14:36, Ferruh Yigit: > On 12/22/2016 11:07 AM, Thomas Monjalon wrote: > > I think it is OK to add a new dev_ops and a new API function for firmware > > query. Generally speaking, it is a good thing to avoid putting all > > informations in the same structure (e.g. rte_eth_dev_info). > > OK. > > > However, there > > is a balance to find. Could we plan to add more info to this new query? > > Instead of > > rte_eth_dev_fwver_get(uint8_t port_id, char *fw_version, int fw_length) [...] > > could it fill a struct? > > rte_eth_dev_fw_info_get(uint8_t port_id, struct rte_eth_dev_fw_info *fw_info) > > I believe this is better. But the problem we are having with this usage > is: ABI breakage. > > Since this struct will be a public structure, in the future if we want > to add a new field to the struct, it will break the ABI, and just this > change will cause a new version for whole ethdev library! > > When all required fields received via arguments, one by one, instead of > struct, at least ABI versioning can be done on the API when new field > added, and can be possible to escape from ABI breakage. But this will be > ugly when number of arguments increased. > > Or any other opinion on how to define API to reduce ABI breakage? You're right. But I don't think we should have a function per data. Just because it would be ugly :) I hope the ABI could become stable with time.