Re: XDP maintainer match (Was [PATCH v2 0/2] hwmon: (max127) Add Maxim MAX127 hardware monitoring)

2020-11-19 Thread Jesper Dangaard Brouer
On Thu, 19 Nov 2020 09:59:28 -0800
Jakub Kicinski  wrote:

> On Thu, 19 Nov 2020 09:09:53 -0800 Joe Perches wrote:
> > On Thu, 2020-11-19 at 17:35 +0100, Jesper Dangaard Brouer wrote:  
> > > On Thu, 19 Nov 2020 07:46:34 -0800 Jakub Kicinski  
> > > wrote:
> >   
> > > I think it is a good idea to change the keyword (K:), but I'm not sure
> > > this catch what we want, maybe it does.  The pattern match are meant to
> > > catch drivers containing XDP related bits.
> > > 
> > > Previously Joe Perches  suggested this pattern match,
> > > which I don't fully understand... could you explain Joe?
> > > 
> > >   (?:\b|_)xdp(?:\b|_)
> > 
> > This regex matches only:
> > 
> > xdp
> > xdp_
> > _xdp_
> > _xdp
> >   
> > > For the filename (N:) regex match, I'm considering if we should remove
> > > it and list more files explicitly.  I think normal glob * pattern
> > > works, which should be sufficient.
> > 
> > Lists are generally more specific than regex globs.  
> 
> Checking like Alexei did it seems Joe's version is faster and better:
> 
> $ git grep -l -E "[^a-z0-9]xdp[^a-z0-9]" | wc -l
> 295
> $ git grep -l -E '(\b|_)xdp(\b|_)' | wc -l
> 297
> $ time git grep -l -E '(\b|_)xdp(\b|_)' > /tmp/a

Okay, I guess this is the pattern you want: '(\b|_)xdp(\b|_)'

 
> Joe would you like to send a patch, or should I?

As you noticed I already send out a patch, I can send a new with your
pattern, as it seems to be faster.

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



Re: XDP maintainer match (Was [PATCH v2 0/2] hwmon: (max127) Add Maxim MAX127 hardware monitoring)

2020-11-19 Thread Jakub Kicinski
On Thu, 19 Nov 2020 09:09:53 -0800 Joe Perches wrote:
> On Thu, 2020-11-19 at 17:35 +0100, Jesper Dangaard Brouer wrote:
> > On Thu, 19 Nov 2020 07:46:34 -0800 Jakub Kicinski  wrote:  
> 
> > I think it is a good idea to change the keyword (K:), but I'm not sure
> > this catch what we want, maybe it does.  The pattern match are meant to
> > catch drivers containing XDP related bits.
> > 
> > Previously Joe Perches  suggested this pattern match,
> > which I don't fully understand... could you explain Joe?
> > 
> >   (?:\b|_)xdp(?:\b|_)  
> 
> This regex matches only:
> 
>   xdp
>   xdp_
>   _xdp_
>   _xdp
> 
> > For the filename (N:) regex match, I'm considering if we should remove
> > it and list more files explicitly.  I think normal glob * pattern
> > works, which should be sufficient.  
> 
> Lists are generally more specific than regex globs.

Checking like Alexei did it seems Joe's version is faster and better:

$ git grep -l -E "[^a-z0-9]xdp[^a-z0-9]" | wc -l
295
$ git grep -l -E '(\b|_)xdp(\b|_)' | wc -l
297
$ time git grep -l -E '(\b|_)xdp(\b|_)' > /tmp/a

real0m5.171s
user0m32.657s
sys 0m0.664s
$ time git grep -l -E "[^a-z0-9]xdp[^a-z0-9]" > /tmp/b

real0m16.627s
user1m48.149s
sys 0m0.977s
09:56 linux$ diff /tmp/a /tmp/b
4d3
< Documentation/networking/index.rst
189d187
< samples/bpf/.gitignore


Joe would you like to send a patch, or should I?


Re: XDP maintainer match (Was [PATCH v2 0/2] hwmon: (max127) Add Maxim MAX127 hardware monitoring)

2020-11-19 Thread Joe Perches
On Thu, 2020-11-19 at 17:35 +0100, Jesper Dangaard Brouer wrote:
> On Thu, 19 Nov 2020 07:46:34 -0800 Jakub Kicinski  wrote:

> I think it is a good idea to change the keyword (K:), but I'm not sure
> this catch what we want, maybe it does.  The pattern match are meant to
> catch drivers containing XDP related bits.
> 
> Previously Joe Perches  suggested this pattern match,
> which I don't fully understand... could you explain Joe?
> 
>   (?:\b|_)xdp(?:\b|_)

This regex matches only:

xdp
xdp_
_xdp_
_xdp

> For the filename (N:) regex match, I'm considering if we should remove
> it and list more files explicitly.  I think normal glob * pattern
> works, which should be sufficient.

Lists are generally more specific than regex globs.




XDP maintainer match (Was [PATCH v2 0/2] hwmon: (max127) Add Maxim MAX127 hardware monitoring)

2020-11-19 Thread Jesper Dangaard Brouer
On Thu, 19 Nov 2020 07:46:34 -0800
Jakub Kicinski  wrote:

> On Wed, 18 Nov 2020 17:26:53 -0800 Guenter Roeck wrote:
> > On Wed, Nov 18, 2020 at 05:01:19PM -0800, Guenter Roeck wrote:  
> > > On Wed, Nov 18, 2020 at 03:42:53PM -0800, Tao Ren wrote:
> > > > On Thu, Nov 19, 2020 at 12:27:19AM +0100, Andrew Lunn wrote:
> > > > > On Wed, Nov 18, 2020 at 03:09:27PM -0800, rentao.b...@gmail.com 
> > > > > wrote:
> > > > > > From: Tao Ren 
> > > > > > 
> > > > > > The patch series adds hardware monitoring driver for the Maxim 
> > > > > > MAX127
> > > > > > chip.
> > > > > 
> > > > > Hi Tao
> > > > > 
> > > > > Why are using sending a hwmon driver to the networking mailing list?
> > > > > 
> > > > > Andrew
> > > > 
> > > > Hi Andrew,
> > > > 
> > > > I added netdev because the mailing list is included in 
> > > > "get_maintainer.pl
> > > > Documentation/hwmon/index.rst" output. Is it the right command to find
> > > > reviewers? Could you please suggest? Thank you.
> > > 
> > > I have no idea why running get_maintainer.pl on
> > > Documentation/hwmon/index.rst returns such a large list of mailing
> > > lists and people. For some reason it includes everyone in the XDP
> > > maintainer list. If anyone has an idea how that happens, please
> > > let me know - we'll want to get this fixed to avoid the same problem
> > > in the future.  
> > 
> > I found it. The XDP maintainer entry has:
> > 
> > K:xdp
> > 
> > This matches Documentation/hwmon/index.rst.
> > 
> > $ grep xdp Documentation/hwmon/index.rst
> >xdpe12284
> > 
> > It seems to me that a context match such as "xdp" in MAINTAINERS isn't
> > really appropriate. "xdp" matches a total of 348 files in the kernel.
> > The large majority of those is not XDP related. The maintainers
> > of XDP (and all the listed mailing lists) should not be surprised
> > to get a large number of odd review requests if they want to review
> > every single patch on files which include the term "xdp".  
> 
> Agreed, we should fix this. For maintainers with high patch volume life
> would be so much easier if people CCed the right folks to get reviews,
> so we should try our best to fix get_maintainer.
> 
> XDP folks, any opposition to changing the keyword / filename to:
> 
>   [^a-z0-9]xdp[^a-z0-9]
> 
> ?

I think it is a good idea to change the keyword (K:), but I'm not sure
this catch what we want, maybe it does.  The pattern match are meant to
catch drivers containing XDP related bits.

Previously Joe Perches  suggested this pattern match,
which I don't fully understand... could you explain Joe?

  (?:\b|_)xdp(?:\b|_)

For the filename (N:) regex match, I'm considering if we should remove
it and list more files explicitly.  I think normal glob * pattern
works, which should be sufficient.

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