[dpdk-dev] [PATCH v9] checkpatches.sh: Add checks for ABI symbol addition
Rao, Nikhil
nikhil.rao at intel.com
Tue Aug 14 05:53:59 CEST 2018
On 6/27/2018 11:31 PM, Neil Horman wrote:
> diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh
> new file mode 100755
> index 000000000..17d123cf4
> --- /dev/null
> +++ b/devtools/check-symbol-change.sh
> @@ -0,0 +1,159 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: BSD-3-Clause
> +# Copyright(c) 2018 Neil Horman <nhorman at tuxdriver.com>
> +
> +build_map_changes()
> +{
> + local fname=$1
> + local mapdb=$2
> +
> + cat $fname | awk '
> + # Initialize our variables
> + BEGIN {map="";sym="";ar="";sec=""; in_sec=0; in_map=0}
> +
> + # Anything that starts with + or -, followed by an a
> + # and ends in the string .map is the name of our map file
> + # This may appear multiple times in a patch if multiple
> + # map files are altered, and all section/symbol names
> + # appearing between a triggering of this rule and the
> + # next trigger of this rule are associated with this file
> + /[-+] a\/.*\.map/ {map=$2; in_map=1}
> +
> + # Same pattern as above, only it matches on anything that
> + # doesnt end in 'map', indicating we have left the map chunk.
> + # When we hit this, turn off the in_map variable, which
> + # supresses the subordonate rules below
> + /[-+] a\/.*\.^(map)/ {in_map=0}
> +
> + # Triggering this rule, which starts a line with a + and ends it
> + # with a { identifies a versioned section. The section name is
> + # the rest of the line with the + and { symbols remvoed.
> + # Triggering this rule sets in_sec to 1, which actives the
> + # symbol rule below
> + /+.*{/ {gsub("+","");
> + if (in_map == 1) {
> + sec=$1; in_sec=1;
> + }
> + }
> +
I am adding a symbol as shown below, however the rule above fails to
detect that the new symbol is being added to a pre-existing EXPERIMENTAL
block (picks up the section name as @@ instead).
Any suggestions ?
diff --git a/lib/librte_eventdev/rte_eventdev_version.map
b/lib/librte_eventdev/rte_eventdev_version.map
index 12835e9..4b8c55d 100644
--- a/lib/librte_eventdev/rte_eventdev_version.map
+++ b/lib/librte_eventdev/rte_eventdev_version.map
@@ -96,6 +96,7 @@ EXPERIMENTAL {
rte_event_crypto_adapter_stats_reset;
rte_event_crypto_adapter_stop;
rte_event_eth_rx_adapter_cb_register;
+ rte_event_eth_tx_adapter_caps_get;
rte_event_timer_adapter_caps_get;
rte_event_timer_adapter_create;
rte_event_timer_adapter_create_ext;
Thanks,
Nikhil
More information about the dev
mailing list