OpenCloudOS-Kernel/arch/mn10300/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
..
Kbuild Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
atomic.h asm-generic: rename atomic.h to atomic-long.h 2009-06-11 21:02:17 +02:00
auxvec.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
bitops.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
bitsperlong.h asm-generic: introduce asm/bitsperlong.h 2009-06-11 21:02:14 +02:00
bug.h MN10300: Stop gcc from generating uninitialised variable warnings after BUG() 2009-04-15 13:55:13 -07:00
bugs.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
busctl-regs.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
byteorder.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
cache.h Separate out the proc- and unit-specific header directories from the general 2009-04-10 14:33:48 +01:00
cacheflush.h trivial: fix typos "man[ae]g?ment" -> "management" 2009-09-21 15:14:56 +02:00
checksum.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
cpu-regs.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
cputime.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
current.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
delay.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
device.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
div64.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
dma-mapping.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
dma.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
dmactl-regs.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
elf.h MN10300: Add support for new ELF relocs in kernel modules 2009-06-18 13:10:33 -07:00
emergency-restart.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
errno.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
exceptions.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
fb.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
fcntl.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
fpu.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
frame.inc Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
ftrace.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
futex.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
gdb-stub.h misc: remove redundant start_kernel prototypes 2009-09-23 10:05:22 -07:00
hardirq.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
highmem.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
hw_irq.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
intctl-regs.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
io.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
ioctl.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
ioctls.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
ipc.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
ipcbuf.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
irq.h Separate out the proc- and unit-specific header directories from the general 2009-04-10 14:33:48 +01:00
irq_regs.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
kdebug.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
kmap_types.h kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
kprobes.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
linkage.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
local.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
mc146818rtc.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
mman.h mm: remove duplicate asm/mman.h files 2009-09-22 07:17:42 -07:00
mmu.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
mmu_context.h cpumask: use mm_cpumask() wrapper: mn10300 2009-09-24 09:34:50 +09:30
module.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
msgbuf.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
mutex.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
nmi.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
page.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
page_offset.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
param.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
pci.h PCI: remove pcibios_scan_all_fns() 2009-09-09 13:29:18 -07:00
percpu.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
pgalloc.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
pgtable.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
pio-regs.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
poll.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
posix_types.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
processor.h MN10300: Add utrace/tracehooks support 2009-06-11 09:02:20 -07:00
ptrace.h headers_check fix: mn10300, ptrace.h 2009-06-14 11:49:41 +05:30
reset-regs.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
resource.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
rtc-regs.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
rtc.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
scatterlist.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
sections.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
sembuf.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
serial-regs.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
serial.h Separate out the proc- and unit-specific header directories from the general 2009-04-10 14:33:48 +01:00
setup.h headers_check fix: mn10300, setup.h 2009-06-14 11:51:12 +05:30
shmbuf.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
shmparam.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
sigcontext.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
siginfo.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
signal.h asm-generic: rename termios.h, signal.h and mman.h 2009-06-11 21:01:52 +02:00
smp.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
socket.h net: Generalize socket rx gap / receive queue overflow cmsg 2009-10-12 13:26:31 -07:00
sockios.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
spinlock.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
stat.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
statfs.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
string.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
swab.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
system.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
termbits.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
termios.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
thread_info.h sched: INIT_PREEMPT_COUNT 2009-07-10 14:24:05 -07:00
timer-regs.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
timex.h Separate out the proc- and unit-specific header directories from the general 2009-04-10 14:33:48 +01:00
tlb.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
tlbflush.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
topology.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
types.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
uaccess.h mn10300: fix kernel build failures when using gcc-4.x 2009-10-01 16:11:12 -07:00
ucontext.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
unaligned.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
unistd.h perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
user.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
vga.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00
xor.h Move arch headers from include/asm-mn10300/ to arch/mn10300/include/asm/. 2009-04-10 14:19:03 +01:00