2016-03-08 08:36, Dumitrescu, Cristian:
> From: Thomas Monjalon [mailto:thomas.monjalon at 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.

Reply via email to