[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201120094746.31e90c91@carbon>
Date: Fri, 20 Nov 2020 09:47:46 +0100
From: Jesper Dangaard Brouer <brouer@...hat.com>
To: Joe Perches <joe@...ches.com>
Cc: Jakub Kicinski <kuba@...nel.org>, bpf@...r.kernel.org,
netdev@...r.kernel.org, Daniel Borkmann <borkmann@...earbox.net>,
Alexei Starovoitov <alexei.starovoitov@...il.com>,
John Fastabend <john.fastabend@...il.com>,
Magnus Karlsson <magnus.karlsson@...el.com>,
Björn Töpel <bjorn.topel@...el.com>,
brouer@...hat.com
Subject: Re: [PATCH net-next] MAINTAINERS: Update XDP and AF_XDP entries
On Thu, 19 Nov 2020 14:16:20 -0800
Joe Perches <joe@...ches.com> 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 <kuba@...nel.org> 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 <kuba@...nel.org>
> > > > Signed-off-by: Jesper Dangaard Brouer <brouer@...hat.com>
> > >
> > > 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
Powered by blists - more mailing lists