[dpdk-dev] [RFC PATCH] detect missing experimental tags in headers

David Marchand david.marchand at redhat.com
Mon Apr 1 09:10:06 CEST 2019


On Wed, Dec 19, 2018 at 2:45 PM David Marchand <david.marchand at redhat.com>
wrote:

> Add a little script to get the symbols of a given section looking at a
> library map file, then, on installation, inspect the sources headers to
> check that the declaration of the EXPERIMENTAL symbols are prefixed with
> a __rte_experimental tag.
>
> Signed-off-by: David Marchand <david.marchand at redhat.com>
> ---
>
> For now, the check is not fatal, since this is just a draft.
> Finding out the right headers could be improved.
> We could also move this check to checkpatches so that it is enforced by
> maintainers.
>

Never got any review/comment, if you try with current origin/master, there
is a little update to do for the eal directory hack:
-               if [ "$${srcdir%%linuxapp/eal}" != "$$srcdir" ]; then \
-                       srcdir="$$srcdir $${srcdir%%linuxapp/eal}common"; \
+               if [ "$${srcdir%%/eal}" != "$$srcdir" ]; then \
+                       srcdir="$$srcdir $${srcdir%/*/eal}/common"; \

I did not catch false positive so far.
Surely there could be problems with the grep regexp, but if we have this in
the build framework, people will get errors before submitting.



Btw, I caught some warnings in the following components.
CC relevant maintainers, can you look at this ?


== Build lib/librte_bbdev
ERROR: rte_bbdev_devices is not marked as experimental in this library
headers

This symbol is in the map file but is neither marked in header nor in the
code.
This is an array, does it qualify as an experimental API?

== Build lib/librte_cryptodev
ERROR: rte_crypto_asym_op_strings is not marked as experimental in this
library headers
ERROR: rte_crypto_asym_xform_strings is not marked as experimental in this
library headers

Idem.


== Build lib/librte_vhost
ERROR: rte_vhost_va_from_guest_pa is not marked as experimental in this
library headers

This symbol is in the map file but is neither marked in header nor in the
code.
Here, this is an inline, not sure the experimental tag is that useful
(except documenting it is experimental?).


-- 
David Marchand


More information about the dev mailing list