acrn-kernel/include/asm-generic
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
..
bitops
4level-fixup.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
Kbuild
Kbuild.asm KVM: export kvm_para.h 2009-09-10 10:46:47 +03:00
atomic-long.h
atomic.h
atomic64.h
audit_change_attr.h
audit_dir_write.h
audit_read.h
audit_signal.h
audit_write.h
auxvec.h
bitops.h
bitsperlong.h
bug.h
bugs.h
cache.h
cacheflush.h
checksum.h
cmpxchg-local.h
cmpxchg.h
cputime.h cputime: Optimize jiffies_to_cputime(1) 2009-08-03 14:48:36 +02:00
current.h
delay.h
device.h Driver Core: Add platform device arch data V3 2009-07-22 00:28:38 +02:00
div64.h
dma-coherent.h
dma-mapping-broken.h
dma-mapping-common.h dma-ops: Remove flush_write_buffers() in dma-mapping-common.h 2009-08-10 09:34:57 +02:00
dma.h
emergency-restart.h
errno-base.h
errno.h
fb.h
fcntl.h fcntl: add F_[SG]ETOWN_EX 2009-09-24 07:21:01 -07:00
futex.h
getorder.h
gpio.h asm-generic/gpio.h: pull in linux/kernel.h for might_sleep() 2009-10-01 16:11:11 -07:00
hardirq.h asm-generic: drop HARDIRQ_BITS definition from hardirq.h 2009-06-19 14:58:09 +02:00
hw_irq.h
ide_iops.h
int-l64.h
int-ll64.h
io.h
ioctl.h
ioctls.h
iomap.h
ipcbuf.h
irq.h
irq_regs.h
irqflags.h
kdebug.h
kmap_types.h kmap_types.h: rename D macro 2009-09-23 07:39:30 -07:00
libata-portmap.h
linkage.h
local.h
memory_model.h
mm_hooks.h
mman-common.h Merge branch 'hwpoison' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6 2009-09-24 07:53:22 -07:00
mman.h mm: add MAP_HUGETLB for mmaping pseudo-anonymous huge page regions 2009-09-22 07:17:41 -07:00
mmu.h
mmu_context.h
module.h
msgbuf.h
mutex-dec.h
mutex-null.h
mutex-xchg.h
mutex.h
page.h
param.h
parport.h
pci-dma-compat.h
pci.h PCI: remove pcibios_scan_all_fns() 2009-09-09 13:29:18 -07:00
percpu.h x86/i386: Put aligned stack-canary in percpu shared_aligned section 2009-09-04 07:10:31 +02:00
pgalloc.h
pgtable-nopmd.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
pgtable-nopud.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
pgtable.h asm-generic: add dummy pgprot_noncached() 2009-06-23 14:34:30 +02:00
poll.h
posix_types.h
resource.h
rtc.h
scatterlist.h
sections.h asm/sections: add text/data checking functions for arches to override 2009-09-23 07:39:30 -07:00
segment.h
sembuf.h
serial.h
setup.h
shmbuf.h
shmparam.h
siginfo.h HWPOISON: Add new SIGBUS error codes for hardware poison signals 2009-09-16 11:50:06 +02:00
signal-defs.h
signal.h
socket.h net: Generalize socket rx gap / receive queue overflow cmsg 2009-10-12 13:26:31 -07:00
sockios.h
spinlock.h
stat.h
statfs.h
string.h
swab.h
syscall.h asm-generic: syscall_get_nr returns int 2009-09-22 19:56:50 -07:00
syscalls.h
system.h
termbits.h
termios-base.h
termios.h
timex.h
tlb.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
tlbflush.h
topology.h cpumask: remove obsolete node_to_cpumask now everyone uses cpumask_of_node 2009-09-24 09:34:34 +09:30
types.h
uaccess-unaligned.h
uaccess.h asm-generic: uaccess: fix up local access_ok() usage 2009-06-19 14:58:08 +02:00
ucontext.h
unaligned.h
unistd.h perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
user.h
vga.h
vmlinux.lds.h Optimize the ordering of sections in RW_DATA_SECTION. 2009-09-24 17:16:21 -07:00
xor.h