linux-sg2042/arch/avr32/include/asm
Neil Horman 3b885787ea net: Generalize socket rx gap / receive queue overflow cmsg
Create a new socket level option to report number of queue overflows

Recently I augmented the AF_PACKET protocol to report the number of frames lost
on the socket receive queue between any two enqueued frames.  This value was
exported via a SOL_PACKET level cmsg.  AFter I completed that work it was
requested that this feature be generalized so that any datagram oriented socket
could make use of this option.  As such I've created this patch, It creates a
new SOL_SOCKET level option called SO_RXQ_OVFL, which when enabled exports a
SOL_SOCKET level cmsg that reports the nubmer of times the sk_receive_queue
overflowed between any two given frames.  It also augments the AF_PACKET
protocol to take advantage of this new feature (as it previously did not touch
sk->sk_drops, which this patch uses to record the overflow count).  Tested
successfully by me.

Notes:

1) Unlike my previous patch, this patch simply records the sk_drops value, which
is not a number of drops between packets, but rather a total number of drops.
Deltas must be computed in user space.

2) While this patch currently works with datagram oriented protocols, it will
also be accepted by non-datagram oriented protocols. I'm not sure if thats
agreeable to everyone, but my argument in favor of doing so is that, for those
protocols which aren't applicable to this option, sk_drops will always be zero,
and reporting no drops on a receive queue that isn't used for those
non-participating protocols seems reasonable to me.  This also saves us having
to code in a per-protocol opt in mechanism.

3) This applies cleanly to net-next assuming that commit
977750076d (my af packet cmsg patch) is reverted

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12 13:26:31 -07:00
..
mach avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
Kbuild byteorder: make swab.h include asm/swab.h like a regular header 2009-01-14 19:56:50 -08:00
addrspace.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
asm.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
atomic.h asm-generic: rename atomic.h to atomic-long.h 2009-06-11 21:02:17 +02:00
auxvec.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
bitops.h avr32: define __fls 2009-01-01 10:12:16 +10:30
bitsperlong.h asm-generic: introduce asm/bitsperlong.h 2009-06-11 21:02:14 +02:00
bug.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
bugs.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
byteorder.h byteorder: make swab.h include asm/swab.h like a regular header 2009-01-14 19:56:50 -08:00
cache.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
cachectl.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
cacheflush.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
checksum.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
cputime.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
current.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
delay.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
device.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
div64.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
dma-mapping.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
dma.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
elf.h [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY 2008-10-16 15:40:05 +02:00
emergency-restart.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
errno.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
fb.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
fcntl.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
ftrace.h tracing: make CALLER_ADDRx overwriteable 2009-03-02 16:49:37 -05:00
futex.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
gpio.h avr32: Use <mach/foo.h> instead of <asm/arch/foo.h> 2008-08-05 14:36:57 +02:00
hardirq.h preempt-count: force hardirq-count to max of 10 2009-02-12 11:19:05 -05:00
hw_irq.h avr32: remove obsolete hw_interrupt_type 2009-05-13 16:53:48 +02:00
io.h avr32: Implement {read,write}[bwl]_be 2008-10-08 18:44:57 +02:00
ioctl.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
ioctls.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
ipcbuf.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
irq.h avr32: Use <mach/foo.h> instead of <asm/arch/foo.h> 2008-08-05 14:36:57 +02:00
irq_regs.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
irqflags.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
kdebug.h avr32: Define DIE_OOPS 2009-01-07 10:40:30 +01:00
kmap_types.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
kprobes.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
linkage.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
local.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
mman.h mm: remove duplicate asm/mman.h files 2009-09-22 07:17:42 -07:00
mmu.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
mmu_context.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
module.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
msgbuf.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
mutex.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
numnodes.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
ocd.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
page.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
param.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
pci.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
percpu.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
pgalloc.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
pgtable-2level.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
pgtable.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
poll.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
posix_types.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
processor.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
ptrace.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
resource.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
scatterlist.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
sections.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
sembuf.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
serial.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
setup.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
shmbuf.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
shmparam.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
sigcontext.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
siginfo.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
signal.h asm-generic: rename termios.h, signal.h and mman.h 2009-06-11 21:01:52 +02:00
socket.h net: Generalize socket rx gap / receive queue overflow cmsg 2009-10-12 13:26:31 -07:00
sockios.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
stat.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
statfs.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
string.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
swab.h headers_check fix: avr32, swab.h 2009-02-01 11:01:23 +05:30
syscalls.h avr32: Move syscalls.h under arch/avr32/include/asm/ 2009-01-07 11:28:15 +01:00
sysreg.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
system.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
termbits.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
termios.h asm-generic: rename termios.h, signal.h and mman.h 2009-06-11 21:01:52 +02:00
thread_info.h KEYS: Extend TIF_NOTIFY_RESUME to (almost) all architectures [try #6] 2009-09-02 21:29:19 +10:00
timex.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
tlb.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
tlbflush.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
topology.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
traps.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
types.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
uaccess.h avr32: fix out-of-range rjmp instruction on large kernels 2009-01-16 09:38:05 +01:00
ucontext.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
unaligned.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
unistd.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
user.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00
xor.h avr32: Move include/asm-avr32 to arch/avr32/include/asm 2008-08-05 13:35:07 +02:00