[dpdk-dev] [PATCH v2 08/12] log: hide internal log structure

Kevin Traynor ktraynor at redhat.com
Fri Oct 25 11:19:13 CEST 2019


On 24/10/2019 17:30, Thomas Monjalon wrote:
> 23/10/2019 20:54, David Marchand:
>> No need to expose rte_logs, hide it and remove it from the current ABI.
>>
>> Signed-off-by: David Marchand <david.marchand at redhat.com>
>> Acked-by: Stephen Hemminger <stephen at networkplumber.org>
> [...]
>> --- a/lib/librte_eal/common/include/rte_log.h
>> +++ b/lib/librte_eal/common/include/rte_log.h
>> -struct rte_log_dynamic_type;
>> -
>> -/** The rte_log structure. */
>> -struct rte_logs {
>> -	uint32_t type;  /**< Bitfield with enabled logs. */
>> -	uint32_t level; /**< Log level. */
>> -	FILE *file;     /**< Output file set by rte_openlog_stream, or NULL. */
>> -	size_t dynamic_types_len;
>> -	struct rte_log_dynamic_type *dynamic_types;
>> -};
> 
> I like this kind of change, but the FILE stream is available only through
> the new experimental function. It is against the famous Mr Traynor rule:
> we cannot deprecate or remove an old stable symbol if the replacement is experimental.
> 
> 

For the change
Acked-by: Kevin Traynor <ktraynor at redhat.com>

++ for the rule (although s/we cannot/Thou shall not/ sounds more biblical)

As for accessor function being experimental, it is so simple I don't see
any issue with promoting it now. OTOH, if no one is planning to change
the struct anytime soon, it's probably fine to keep it public and
promote the fn. later.



More information about the dev mailing list