From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2 1/4] lib/librte_port: add PCAP file support to source port Date: Tue, 08 Mar 2016 11:14:33 +0100 Message-ID: <2001717.PSgDvV64ge@xps13> References: <1455707490-13826-1-git-send-email-roy.fan.zhang@intel.com> <8203471.f1i4Yl96V2@xps13> <3EB4FA525960D640B5BDFFD6A3D8912647968D3E@IRSMSX108.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: "Dumitrescu, Cristian" Return-path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 9695F2C4C for ; Tue, 8 Mar 2016 11:16:11 +0100 (CET) Received: by mail-wm0-f54.google.com with SMTP id n186so124045819wmn.1 for ; Tue, 08 Mar 2016 02:16:11 -0800 (PST) In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D8912647968D3E@IRSMSX108.ger.corp.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-03-08 08:36, Dumitrescu, Cristian: > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > If this struct is used in a table, changing its size will break the ABI. > > This structure is already present in the API of the source port in file librte_port/rte_port_source_sink.h, this patch is simply adding two new fields at the end of it. I think we accepted adding parameters at the end of the API parameter structures in other parts of DPDK without considering them ABI breakages? It depends of the struct but generally it is considered an ABI break. > Per Panu's previous comment, this structure is indeed used within an array of unions in the ip_pipeline application, but (1) it is very unlikely a "regular" user application will use it this same way; and (2) somebody using the ip_pipeline application will upgrade both the library and the application at the same time. > > If you guys still think this is breaking the ABI, please let us know asap and we'll go with your suggestion. Yes it is. > > More generally, are you sure of the benefits of exposing a configuration > > structure in the API? > > This is not an internal (implementation side) structure, it is the external (API side) structure with the parameters required from the user for creating this object, I am not sure I understand your comment? There are 2 ways of passing parameters: struct or individual params. By using some functions with individual params, you can avoid ABI break (see librte_compat). In this case you would have a function pcap_config(). Just an idea.