DPDK patches and discussions
 help / color / mirror / Atom feed
From: Neil Horman <nhorman@tuxdriver.com>
To: "Rao, Nikhil" <nikhil.rao@intel.com>
Cc: dev@dpdk.org, thomas@monjalon.net, john.mcnamara@intel.com,
	bruce.richardson@intel.com, Ferruh Yigit <ferruh.yigit@intel.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	"hange-folder>?" <toggle-mailboxes@hmswarspite.think-freely.org>
Subject: Re: [dpdk-dev] [PATCH v9] checkpatches.sh: Add checks for ABI symbol addition
Date: Tue, 14 Aug 2018 07:04:41 -0400	[thread overview]
Message-ID: <20180814105208.GA24870@hmswarspite.think-freely.org> (raw)
In-Reply-To: <8f70946a-d777-6d52-ff9d-51a0c957e40c@intel.com>

On Tue, Aug 14, 2018 at 09:23:59AM +0530, Rao, Nikhil wrote:
> 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@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 ?
> 
I was about to say that its because you've not got enough context to let the awk
file figure out what your section name is, but that doesn't appear to be the
case. Can you provide the exact command line you are running to do your symbol
check, as well as the full patch that you are checking?  I'd like to try
recreate the issue here

Best
Neil

> 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
> 

  reply	other threads:[~2018-08-14 11:05 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15 19:05 [dpdk-dev] [PATCH] " Neil Horman
2018-01-15 21:52 ` Thomas Monjalon
2018-01-16  0:37   ` Neil Horman
2018-01-15 22:20 ` Stephen Hemminger
2018-01-16  0:36   ` Neil Horman
2018-01-16 18:22 ` [dpdk-dev] [PATCH v2] " Neil Horman
2018-01-21 20:29   ` Thomas Monjalon
2018-01-22  1:54     ` Neil Horman
2018-01-22  2:05       ` Thomas Monjalon
2018-01-31 17:27 ` [dpdk-dev] [PATCH v3] " Neil Horman
2018-02-04 14:44   ` Thomas Monjalon
2018-02-05 17:29 ` [dpdk-dev] [PATCH v4] " Neil Horman
2018-02-05 17:57   ` Thomas Monjalon
2018-02-09 15:21 ` [dpdk-dev] [PATCH v5] " Neil Horman
2018-02-13 22:57   ` Thomas Monjalon
2018-02-14 19:19 ` [dpdk-dev] [PATCH v6] " Neil Horman
2018-05-27 19:34   ` Thomas Monjalon
2018-05-27 21:00     ` Neil Horman
2018-05-27 22:01       ` Thomas Monjalon
2018-05-28 17:08         ` Neil Horman
2018-06-05 12:21 ` [dpdk-dev] [PATCH v7] " Neil Horman
2018-06-14 13:30 ` [dpdk-dev] [PATCH v8] " Neil Horman
2018-06-25 23:04   ` Thomas Monjalon
2018-06-27 17:58     ` Neil Horman
2018-06-27 18:01 ` [dpdk-dev] [PATCH v9] " Neil Horman
2018-07-15 23:12   ` Thomas Monjalon
2018-08-14  3:53   ` Rao, Nikhil
2018-08-14 11:04     ` Neil Horman [this message]
2018-08-15  6:10       ` Nikhil Rao
2018-08-15 10:48         ` Neil Horman
2018-08-16  6:19           ` Rao, Nikhil
2018-08-16 10:42             ` Neil Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180814105208.GA24870@hmswarspite.think-freely.org \
    --to=nhorman@tuxdriver.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=john.mcnamara@intel.com \
    --cc=nikhil.rao@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    --cc=toggle-mailboxes@hmswarspite.think-freely.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).