linux/arch/sparc/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
..
agp.h agp: kill phys_to_gart() and gart_to_phys() 2009-08-03 09:05:00 +01:00
apb.h
apc.h
asi.h sparc,leon: Redefine MMU register access asi if CONFIG_LEON 2009-08-17 18:32:09 -07:00
asm.h sparc: Add asm/asm.h 2008-12-09 00:50:13 -08:00
asmmacro.h sparc: remove CONFIG_SUN4 2008-08-31 20:59:37 -07:00
atomic.h
atomic_32.h asm-generic: rename atomic.h to atomic-long.h 2009-06-11 21:02:17 +02:00
atomic_64.h asm-generic: rename atomic.h to atomic-long.h 2009-06-11 21:02:17 +02:00
auxio.h
auxio_32.h
auxio_64.h
auxvec.h
backoff.h
bbc.h
bitext.h
bitops.h
bitops_32.h sparc: asm/bitops.h should define __fls 2008-12-03 16:04:52 -08:00
bitops_64.h sparc64: Stop using memory barriers for atomics and locks. 2008-12-04 09:16:47 -08:00
bitsperlong.h asm-generic: introduce asm/bitsperlong.h 2009-06-11 21:02:14 +02:00
btfixup.h
bug.h
bugs.h sparc64: Implement SSTATE purely using notifiers and initcalls. 2008-09-02 00:49:38 -07: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
cacheflush.h
cacheflush_32.h
cacheflush_64.h
chafsr.h
checksum.h
checksum_32.h
checksum_64.h
chmctrl.h
clock.h
cmt.h
compat.h x86-64: seccomp: fix 32/64 syscall hole 2009-03-02 15:41:30 -08:00
compat_signal.h
contregs.h
cpudata.h
cpudata_32.h
cpudata_64.h sparc64: Move trap_block[] definitions into a new header file. 2009-06-16 04:56:08 -07:00
cputime.h
current.h
cypress.h
dcr.h
dcu.h
delay.h
delay_32.h
delay_64.h
device.h Driver Core: Add platform device arch data V3 2009-07-22 00:28:38 +02:00
display7seg.h
div64.h
dma-mapping.h sparc: Add CONFIG_DMA_API_DEBUG support 2009-08-10 09:35:00 +02:00
dma.h sparc: Kill now spurious includes of sbus.h 2008-08-29 02:15:23 -07:00
ebus_dma.h sparc: Move EBUS DMA interfaces into seperate header file. 2008-08-29 23:10:21 -07:00
ecc.h
eeprom.h
elf.h
elf_32.h [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY 2008-10-16 15:40:05 +02:00
elf_64.h sparc64: Fix SET_PERSONALITY to not clip bits outside of PER_MASK. 2009-05-07 15:36:13 -07:00
emergency-restart.h
envctrl.h
errno.h cfg80211: errno.h: define ERFKILL 2009-06-07 05:01:00 -07:00
estate.h
fb.h
fbio.h
fcntl.h
fhc.h sparc64: Rewrite central driver. 2008-08-31 20:56:15 -07:00
fixmap.h
floppy.h
floppy_32.h sparc: Convert remaining sbus_ioremap() and sbus_iounmap() users. 2008-08-29 02:15:13 -07:00
floppy_64.h sparc64: Convert EBUS floppy support to pure OF driver. 2008-08-29 23:26:23 -07:00
fpumacro.h
ftrace.h sparc64: Add proper dynamic ftrace support. 2009-06-16 04:56:53 -07:00
futex.h
futex_32.h
futex_64.h sparc64: FUTEX_OP_ANDN fix 2008-07-30 15:40:50 -07:00
gpio.h sparc: Add GPIO layer support. 2008-08-24 20:33:56 -07:00
hardirq.h
hardirq_32.h
hardirq_64.h
head.h
head_32.h
head_64.h
highmem.h
hugetlb.h
hvtramp.h
hw_irq.h
hypervisor.h sparc64: Add performance counter hypervisor calls for sun4v. 2008-12-04 09:17:09 -08:00
ide.h
idprom.h
intr_queue.h
io-unit.h sparc32: Kill iounit_map_dma_*(). 2008-08-29 02:15:23 -07:00
io.h
io_32.h sparc: Kill sbus_ioremap() and sbus_iounmap(). 2008-08-29 02:15:13 -07:00
io_64.h sparc: Kill sbus_ioremap() and sbus_iounmap(). 2008-08-29 02:15:13 -07:00
ioctl.h
ioctls.h
iommu.h
iommu_32.h sparc: Remove generic SBUS probing layer. 2008-08-29 02:15:21 -07:00
iommu_64.h sparc64: Get rid of pci_controller_info. 2008-09-10 23:07:41 -07:00
ipcbuf.h sparc: unify ipcbuf.h 2009-01-04 15:44:52 -08:00
irq.h
irq_32.h sparc: fix sparse warnings in irq_32.c 2008-12-08 01:08:24 -08:00
irq_64.h debug lockups: Improve lockup detection, fix generic arch fallback 2009-08-03 09:56:52 +02:00
irq_regs.h
irqflags.h
irqflags_32.h
irqflags_64.h sparc64: Make %pil level 15 a pseudo-NMI. 2008-12-04 09:17:02 -08:00
jsflash.h sparc: fix warning in userspace header jsflash.h 2009-01-02 21:31:13 -08:00
Kbuild byteorder: make swab.h include asm/swab.h like a regular header 2009-01-14 19:56:50 -08:00
kdebug.h
kdebug_32.h sparc32: kernel/trace/trace.c wants DIE_OOPS 2008-11-01 21:44:01 -07:00
kdebug_64.h sparc64: Implement NMI watchdog on capable cpus. 2009-01-30 00:03:53 -08:00
kgdb.h
kmap_types.h kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
kprobes.h
ldc.h
leon.h sparc,leon: CONFIG_SPARC_LEON option and leon specific files. 2009-08-17 18:32:09 -07:00
leon_amba.h sparc,leon: CONFIG_SPARC_LEON option and leon specific files. 2009-08-17 18:32:09 -07:00
linkage.h
lmb.h
local.h
lsu.h
machines.h sparc,leon: Introduce the sparc-leon CPU type. 2009-08-17 18:32:10 -07:00
mbus.h
mc146818rtc.h
mc146818rtc_32.h
mc146818rtc_64.h sparc64: Use generic CMOS driver. 2008-08-29 14:16:48 -07:00
mdesc.h sparc64: Make mdesc_fill_in_cpu_data take a cpumask_t pointer. 2009-06-16 04:56:21 -07:00
memctrl.h sparc64: Add generic interface for registering a dimm printing handler. 2008-08-24 22:08:34 -07:00
memreg.h
mman.h mm: add MAP_HUGETLB for mmaping pseudo-anonymous huge page regions 2009-09-22 07:17:41 -07:00
mmu.h
mmu_32.h
mmu_64.h
mmu_context.h
mmu_context_32.h
mmu_context_64.h cpumask: use mm_cpumask() wrapper: sparc 2009-03-16 14:40:39 +10:30
mmzone.h numa, cpumask: move numa_node_id default implementation to topology.h, fix 2009-03-19 12:51:25 +01:00
module.h sparc: unify module.h 2008-12-26 15:35:41 -08:00
mpmbox.h
msgbuf.h
msi.h
mutex.h
mxcc.h
nmi.h sparc64: Initial hw perf counter support. 2009-09-10 06:28:20 -07:00
ns87303.h
obio.h sparc32: Move sun4d show_leds() out of asm/obio.h 2008-09-08 15:40:45 -07:00
of_device.h sparc: Add OF archdata propagation helper. 2008-08-29 02:15:20 -07:00
of_platform.h sparc: Kill ebus_bus_type. 2008-08-30 00:37:36 -07:00
openprom.h sparc: unify openprom.h 2009-01-02 21:15:25 -08:00
openpromio.h
oplib.h
oplib_32.h sparc: Kill exports of prom internal functions 2009-01-08 16:58:42 -08:00
oplib_64.h sparc: Kill exports of prom internal functions 2009-01-08 16:58:42 -08:00
page.h
page_32.h asm-generic: rename page.h and uaccess.h 2009-06-11 21:02:17 +02:00
page_64.h asm-generic: rename page.h and uaccess.h 2009-06-11 21:02:17 +02:00
param.h
parport.h parport: Fix various uses of parport_pc 2009-04-14 08:48:50 -07:00
pbm.h
pci.h sparc: Use asm-generic/pci-dma-compat 2009-08-10 09:35:00 +02:00
pci_32.h Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-09-16 07:49:54 -07:00
pci_64.h Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-09-16 07:49:54 -07:00
pcic.h
pcr.h sparc64: Implement NMI watchdog on capable cpus. 2009-01-30 00:03:53 -08:00
percpu.h
percpu_32.h
percpu_64.h sparc64: Get rid of real_setup_per_cpu_areas(). 2009-06-16 04:56:23 -07:00
perf_event.h perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
perfctr.h
pgalloc.h
pgalloc_32.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
pgalloc_64.h
pgtable.h
pgtable_32.h sparc: remove CONFIG_SUN4 2008-08-31 20:59:37 -07:00
pgtable_64.h sparc64: Validate linear D-TLB misses. 2009-08-25 16:47:46 -07:00
pgtsrmmu.h sparc,leon: Introduce the sparc-leon CPU type. 2009-08-17 18:32:10 -07:00
pgtsun4.h
pgtsun4c.h
pil.h sparc64: Reschedule KGDB capture to a software interrupt. 2009-03-18 23:51:57 -07:00
poll.h
posix_types.h sparc: unify posix_types.h 2009-01-02 18:35:29 -08:00
processor.h
processor_32.h sparc: add '32' suffix to reg_window, sigcontext, __siginfo_t 2009-01-02 19:32:59 -08:00
processor_64.h sparc64: Kill annoying warning when building compat_binfmt_elf.o 2008-11-02 00:15:38 -07:00
prom.h sparc,leon: Introduce the sparc-leon CPU type. 2009-08-17 18:32:10 -07:00
psr.h
psrcompat.h
pstate.h
ptrace.h sparc: unify ptrace.h 2009-01-02 19:42:12 -08:00
resource.h
ross.h
rwsem-const.h
rwsem.h
sbi.h
scatterlist.h sparc: use sparc64 version of scatterlist.h 2008-12-11 20:24:58 -08:00
scratchpad.h
seccomp.h x86-64: seccomp: fix 32/64 syscall hole 2009-03-02 15:41:30 -08:00
sections.h sparc: unify sections.h 2008-12-27 00:35:12 -08:00
sembuf.h
serial.h serial: allow 8250 to be used on sparc 2008-10-13 09:51:40 -07:00
setup.h
sfafsr.h
sfp-machine.h
sfp-machine_32.h
sfp-machine_64.h
shmbuf.h
shmparam.h
shmparam_32.h
shmparam_64.h
sigcontext.h sparc: unify sigcontext.h 2009-01-02 19:34:46 -08:00
siginfo.h sparc: unify siginfo.h 2009-01-02 21:10:04 -08:00
signal.h asm-generic: rename termios.h, signal.h and mman.h 2009-06-11 21:01:52 +02:00
smp.h
smp_32.h sparc: remove NO_PROC_ID - it is no longer used 2009-01-02 21:33:54 -08:00
smp_64.h cpumask: remove arch_send_call_function_ipi 2009-09-24 09:34:47 +09:30
smpprim.h
socket.h net: Generalize socket rx gap / receive queue overflow cmsg 2009-10-12 13:26:31 -07:00
sockios.h
sparsemem.h
spinlock.h
spinlock_32.h locking, sparc: Rename __spin_try_lock() and friends 2009-08-31 18:08:48 +02:00
spinlock_64.h locking, sparc: Rename __spin_try_lock() and friends 2009-08-31 18:08:48 +02:00
spinlock_types.h
spitfire.h sparc: unify kernel/cpu 2008-12-07 00:04:30 -08:00
stacktrace.h
starfire.h sparc64: Delete starfire_cpu_setup(). 2008-08-31 01:40:12 -07:00
stat.h sparc: unify stat.h 2009-01-02 18:48:21 -08:00
statfs.h SPARC: Use <asm-generic/statfs.h> 2008-09-06 19:30:17 +01:00
string.h
string_32.h
string_64.h
sunbpp.h
swab.h sparc: introduce asm/swab.h 2009-01-06 18:10:27 -08:00
swift.h
syscall.h sparc: Add asm/syscall.h 2008-07-27 17:31:48 -07:00
syscalls.h
sysen.h
system.h
system_32.h sparc,leon: Introduce the sparc-leon CPU type. 2009-08-17 18:32:10 -07:00
system_64.h sparc64: Provide extern decls for sparc_??u_type strings. 2009-09-10 05:55:17 -07:00
termbits.h sparc: Fix tty compile warnings. 2008-11-12 23:51:54 -08:00
termios.h
thread_info.h
thread_info_32.h sched: INIT_PREEMPT_COUNT 2009-07-10 14:24:05 -07:00
thread_info_64.h sched: INIT_PREEMPT_COUNT 2009-07-10 14:24:05 -07:00
timer.h
timer_32.h sparc32: Delete master_l10_limit. 2008-09-19 21:18:03 -07:00
timer_64.h sparc64: Use unsigned long long for u64. 2009-01-06 13:19:28 -08:00
timex.h
timex_32.h
timex_64.h
tlb.h
tlb_32.h
tlb_64.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
tlbflush.h
tlbflush_32.h
tlbflush_64.h
topology.h
topology_32.h
topology_64.h cpumask: remove obsolete topology_core_siblings and topology_thread_siblings: sparc 2009-09-24 09:34:41 +09:30
trap_block.h sparc64: Store per-cpu offset in trap_block[] 2009-06-16 04:56:11 -07:00
traps.h sparc: drop get_tbr() in traps.h 2009-01-02 21:33:05 -08:00
tsb.h sparc64: Stop using memory barriers for atomics and locks. 2008-12-04 09:16:47 -08:00
tsunami.h
ttable.h sparc64: Make special trap return path for TRAP_NMI(). 2008-12-04 09:17:03 -08:00
turbosparc.h
types.h SPARC: fix duplicate declaration 2009-08-16 18:25:00 -07:00
uaccess.h
uaccess_32.h module: trim exception table on init free. 2009-06-12 21:47:04 +09:30
uaccess_64.h sparc64: cheaper asm/uaccess.h inclusion 2009-08-16 18:25:53 -07:00
uctx.h
unaligned.h
unistd.h perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
upa.h
user.h
utrap.h
vac-ops.h sparc: remove CONFIG_SUN4 2008-08-31 20:59:37 -07:00
vaddrs.h
vga.h
viking.h
vio.h BUILD_BUG_ON(): fix it and a couple of bogus uses of it 2009-09-23 07:39:29 -07:00
visasm.h sparc64: Fix sparse warnings in visemul.c 2008-09-11 23:46:40 -07:00
watchdog.h
winmacro.h
xor.h
xor_32.h
xor_64.h