Subject: Re: [PATCH/RFC] net: Don't save mid batch datagram processing error for next recvmmsg call

From: 'Arnaldo Carvalho de Melo' <[email-masked]>
Date: Tue, 22 Jul 2014 10:24:10 -0300

Em Tue, Jul 22, 2014 at 08:33:27AM +0000, David Laight escreveu:
> From: Arnaldo Carvalho de Melo 
> > 	I think this addresses the problems reported by David Laight and
> > others, where errors saved on a per socket area could be delivered to a
> > different thread, so I just followed David Laight's suggestion and
> > stopped saving it, we'll return it only if it happens for the first
> > datagram, else we return less entries than asked for.

> > 	Steven, IIRC you was the one that suggested using this
> > mechanism, no? Do you have anything against this move?
 
> +	return datagrams ?: err;
 
> Inline patches, don't attach them.

Oh well, ok, will do next time.
 
> Don't use non-C constructs.

We use it in many places, one could say the kernel isn't written in C
anyway:

[acme@zoo linux]$ find . -name "*.[ch]" | xargs grep '?:' | cut -d'/' -f -2 | sort | uniq -c | sort -nr
    189 ./drivers
     45 ./arch
     33 ./crypto
     30 ./fs
     25 ./net
     23 ./kernel
     22 ./tools
      9 ./sound
      8 ./include
      5 ./security
      5 ./mm
      3 ./block
      2 ./lib
      1 ./scripts
      1 ./ipc
[acme@zoo linux]$

Other than that, are you ok with the change?

- Arnaldo