From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH] scripts: add check for net driver names without net prefix Date: Wed, 6 Jul 2016 11:28:24 +0100 Message-ID: <20160706102824.GA29480@bricha3-MOBL3> References: <1467729650-925-1-git-send-email-bruce.richardson@intel.com> <6142444.k3HLHFvhXo@xps13> <20160706092524.GC17404@bricha3-MOBL3> <22935387.s4eUy1AmSX@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, nelio.laranjeiro@6wind.com To: Thomas Monjalon Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 5ECCC69FE for ; Wed, 6 Jul 2016 12:28:28 +0200 (CEST) Content-Disposition: inline In-Reply-To: <22935387.s4eUy1AmSX@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Jul 06, 2016 at 11:46:23AM +0200, Thomas Monjalon wrote: > 2016-07-06 10:25, Bruce Richardson: > > On Wed, Jul 06, 2016 at 11:10:48AM +0200, Thomas Monjalon wrote: > > > 2016-07-05 15:40, Bruce Richardson: > > > > +# check headline label for net/ prefix if needed > > > > +bad=$(echo "$headlines" | grep -E --color=always \ > > > > + -e "^($(ls drivers/net | grep -v Makefile | tr '\n' '|')):" \ > > > > + | sed 's,^,\t,') > > > > +[ -z "$bad" ] || printf "Headline missing 'net/' prefix:\n$bad\n" > > > > > > This check is definitely a good idea. > > > We need the same thing for crypto. > > > Few nits: > > > - -E is not needed for this regex > > > - "/base:" cases are not handled because of the colon at the end > > > of the regex. > > > > Good point. Easy enough to fix, I suspect. > > > > > - patches touching several drivers are not handled. Examples: > > > "mlx:" -> "net/mlx:" > > > "drivers/net:" -> "net:" > > > > > Yes, however, those are in the minority of cases, and we can always add > > special case extra regex's for those - hardcoded like the other regex's in the > > file. I did the pulling directory list so we don't have to update the checks > > every time a new driver was added. > > Another issue: I suspect you will have false positives with librte_ring and > librte_vhost. Yep, good catch there. Need to tune up those filters if I proceed with this. > > > > By the way, I am looking at an idea, that Nelio sent me, based on > > > modified files. It can complete this check. > > > > Great. I'll look forward to seeing that. If it works out well, by all means > > drop this patch. If it's not coming any time soon though, I can do a V2 of > > this patch, but I won't bother right now in the expectation that a better > > solution is coming. > > My concern is that the file-based solution will handle only the patches where > every changes are in drivers/ (not config/ or anything else). > I'm thinking how to merge both solutions. > > I'm also concerned by the time passed developing these checks ;) "Time is an illusion. Lunchtime doubly so."