Subject: Re: [PATCH net-next] MAINTAINERS: Update XDP and AF_XDP entries

From: Jesper Dangaard Brouer <[email-masked]>
Date: Fri, 20 Nov 2020 09:47:46 +0100

On Thu, 19 Nov 2020 14:16:20 -0800
Joe Perches <[email-masked]> wrote:

> On Thu, 2020-11-19 at 21:50 +0100, Jesper Dangaard Brouer wrote:
> > On Thu, 19 Nov 2020 10:02:10 -0800
> > Jakub Kicinski <[email-masked]> wrote:
> >   
> > > On Thu, 19 Nov 2020 18:26:40 +0100 Jesper Dangaard Brouer wrote:  
> > > > Getting too many false positive matches with current use
> > > > of the content regex K: and file regex N: patterns.
> > > > 
> > > > This patch drops file match N: and makes K: more restricted.
> > > > Some more normal F: file wildcards are added.
> > > > 
> > > > Notice that AF_XDP forgot to some F: files that is also
> > > > updated in this patch.
> > > > 
> > > > Suggested-by: Jakub Kicinski <[email-masked]>
> > > > Signed-off-by: Jesper Dangaard Brouer <[email-masked]>    
> > > 
> > > Ah! Sorry, I missed that you sent this before replying to Joe.
> > > 
> > > Would you mind respining with his regex?  
> > 
> > Sure, I just send it... with your adjusted '(\b|_)xdp(\b|_)' regex, as
> > it seems to do the same thing (and it works with egrep).  
> 
> The regexes in MAINTAINERS are perl not egrep and using (\b|_)
> creates unnecessary capture groups.
> 
> It _really_ should be (?:\b|_)xdp(?:\b|_)

Okay, I will send a V3 patch.

I was trying to write a perl oneliner to tests this, but I realized
that git-grep supports this directly via --perl-regexp.

$ time git grep --files-with-matches --perl-regexp '(\b|_)xdp(\b|_)' | wc -l
297

real	0m2,225s
user	0m0,832s
sys	0m2,762s

$ time git grep --files-with-matches --perl-regexp '(?:\b|_)xdp(?:\b|_)' | wc -l
297

real	0m2,261s
user	0m0,788s
sys	0m2,714s

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer