From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rao, Nikhil" Subject: Re: [PATCH v9] checkpatches.sh: Add checks for ABI symbol addition Date: Tue, 14 Aug 2018 09:23:59 +0530 Message-ID: <8f70946a-d777-6d52-ff9d-51a0c957e40c@intel.com> References: <20180115190545.25687-1-nhorman@tuxdriver.com> <20180627180101.16442-1-nhorman@tuxdriver.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: thomas@monjalon.net, john.mcnamara@intel.com, bruce.richardson@intel.com, Ferruh Yigit , Stephen Hemminger , nikhil.rao@intel.com To: Neil Horman , dev@dpdk.org Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 1CDD82661 for ; Tue, 14 Aug 2018 05:54:22 +0200 (CEST) In-Reply-To: <20180627180101.16442-1-nhorman@tuxdriver.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > + > +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