From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Aug 2018 20:54:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,236,1531810800"; d="scan'208";a="76492996" Received: from nikhilr-mobl1.amr.corp.intel.com (HELO [10.106.138.14]) ([10.106.138.14]) by fmsmga002.fm.intel.com with ESMTP; 13 Aug 2018 20:53:59 -0700 To: Neil Horman , dev@dpdk.org Cc: thomas@monjalon.net, john.mcnamara@intel.com, bruce.richardson@intel.com, Ferruh Yigit , Stephen Hemminger , nikhil.rao@intel.com References: <20180115190545.25687-1-nhorman@tuxdriver.com> <20180627180101.16442-1-nhorman@tuxdriver.com> From: "Rao, Nikhil" Message-ID: <8f70946a-d777-6d52-ff9d-51a0c957e40c@intel.com> Date: Tue, 14 Aug 2018 09:23:59 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180627180101.16442-1-nhorman@tuxdriver.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v9] checkpatches.sh: Add checks for ABI symbol addition X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 03:54:23 -0000 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