android_kernel_xiaomi_sm8350/arch/mips/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
..
dec
emma MIPS: Eleminate filenames from comments 2009-08-03 17:52:40 +01:00
fw
ip32
lasat MIPS: Lasat: Fix compilation 2009-09-17 20:07:42 +02:00
mach-ar7 MIPS: Add support for Texas Instruments AR7 System-on-a-Chip 2009-07-03 15:45:23 +01:00
mach-au1x00 MIPS: Alchemy: add gpio_request/gpio_free stubs for CONFIG_GPIOLIB=n 2009-09-17 20:07:42 +02:00
mach-bcm47xx MIPS: BCM47xx: Fix gpio_direction_output 2009-06-17 11:06:28 +01:00
mach-bcm63xx MIPS: BCM63xx: Add PCMCIA & Cardbus support. 2009-09-30 21:47:01 +02:00
mach-cavium-octeon MIPS: Octeon: Set kernel_uses_llsc to false on non-SMP builds. 2009-09-17 20:07:50 +02:00
mach-cobalt Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
mach-db1x00
mach-dec
mach-emma2rh
mach-excite
mach-generic MIPS: Pass struct device to plat_dma_addr_to_phys() 2009-06-17 11:06:24 +01:00
mach-ip22
mach-ip27 cpumask: remove obsolete node_to_cpumask now everyone uses cpumask_of_node 2009-09-24 09:34:34 +09:30
mach-ip28
mach-ip32 MIPS: Pass struct device to plat_dma_addr_to_phys() 2009-06-17 11:06:24 +01:00
mach-jazz MIPS: Pass struct device to plat_dma_addr_to_phys() 2009-06-17 11:06:24 +01:00
mach-lasat
mach-loongson MIPS: Loongson: Add a machtype kernel command line argument 2009-09-17 20:07:47 +02:00
mach-malta MIPS: Malta: Remove pointless use use of CONFIG_CPU_HAS_LLSC 2009-09-17 20:07:49 +02:00
mach-mipssim
mach-pb1x00
mach-pnx833x
mach-pnx8550
mach-rc32434 MIPS: RB532: Cleanup cpu-features-overrides 2009-06-17 11:06:26 +01:00
mach-rm
mach-sibyte
mach-tx39xx
mach-tx49xx
mach-vr41xx
mach-wrppmc
mach-yosemite
mips-boards MIPS: Loongson: Change naming methods 2009-09-17 20:07:47 +02:00
octeon MIPS: Octeon: Add hardware RNG platform device. 2009-09-17 20:07:51 +02:00
pci
pmc-sierra/msp71xx MIPS: MSPxxxx: define MIPS34K_MISSED_ITLB_WAR for other PMC-Sierra SoC 2009-08-03 17:52:43 +01:00
sgi
sibyte
sn MIPS: Build fix - include <linux/smp.h> into all smp_processor_id() users. 2009-06-24 18:34:39 +01:00
txx9 MIPS: TXx9: Add TX4939 RNG support 2009-06-17 11:06:27 +01:00
vr41xx Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
xtalk
abi.h
addrspace.h
amon.h MIPS: CMP: activate CMP support 2009-07-03 15:45:26 +01:00
asm.h
asmmacro-32.h
asmmacro-64.h
asmmacro.h
atomic.h MIPS: Allow kernel use of LL/SC to be separate from the presence of LL/SC. 2009-09-17 20:07:50 +02:00
auxvec.h
barrier.h
bcache.h
bitops.h MIPS: Allow kernel use of LL/SC to be separate from the presence of LL/SC. 2009-09-17 20:07:50 +02:00
bitsperlong.h asm-generic: introduce asm/bitsperlong.h 2009-06-11 21:02:14 +02:00
bootinfo.h MIPS: Loongson: Add a machtype kernel command line argument 2009-09-17 20:07:47 +02:00
branch.h
break.h
bug.h MIPS: bug.h Build fix - include <linux/compiler.h>. 2009-06-24 18:34:38 +01:00
bugs.h MIPS: Build fix - include <linux/smp.h> into all smp_processor_id() users. 2009-06-24 18:34:39 +01:00
byteorder.h
cache.h
cachectl.h
cacheflush.h
cacheops.h
cevt-r4k.h
checksum.h
cmp.h
cmpxchg.h MIPS: Allow kernel use of LL/SC to be separate from the presence of LL/SC. 2009-09-17 20:07:50 +02:00
compat-signal.h
compat.h
compiler.h
cpu-features.h MIPS: Allow kernel use of LL/SC to be separate from the presence of LL/SC. 2009-09-17 20:07:50 +02:00
cpu-info.h MIPS: Outline udelay and fix a few issues. 2009-06-08 16:57:51 +01:00
cpu.h MIPS: BCM63xx: Add Broadcom 63xx CPU definitions. 2009-09-17 20:07:52 +02:00
cputime.h
current.h
debug.h
delay.h MIPS: Fix potencial build error in <asm/delay.h> 2009-09-17 20:07:41 +02:00
device.h
div64.h
dma-mapping.h
dma.h
ds1287.h Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
dsp.h
edac.h
elf.h MIPS: 64-bit: Fix o32 core dump 2009-07-03 15:45:27 +01:00
emergency-restart.h
errno.h
fb.h
fcntl.h
fixmap.h MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs. 2009-09-17 20:07:52 +02:00
floppy.h
fpregdef.h
fpu_emulator.h
fpu.h
ftrace.h
futex.h
gcmpregs.h MIPS: CMP: Move gcmp_probe to before the SMP ops 2009-07-03 15:45:26 +01:00
gic.h MIPS: Fix compile for !CONFIG_SMP 2009-08-03 17:52:40 +01:00
gpio.h
gt64120.h
hardirq.h MIPS: Convert to asm-generic/hardirq.h 2009-09-17 20:07:48 +02:00
hazards.h
highmem.h
hugetlb.h MIPS: Add support files for hugetlbfs. 2009-06-17 11:06:30 +01:00
hw_irq.h
i8253.h time: move PIT_TICK_RATE to linux/timex.h 2009-06-16 19:47:27 -07:00
i8259.h
ide.h
inst.h
io.h
ioctl.h MIPS: ioctl.h: Cleanup. 2009-06-17 11:06:28 +01:00
ioctls.h
ipcbuf.h
irq_cpu.h
irq_gt641xx.h Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
irq_regs.h
irq.h MIPS: Build fix - include <linux/smp.h> into all smp_processor_id() users. 2009-06-24 18:34:39 +01:00
irqflags.h
isadep.h
jazz.h
jazzdma.h
Kbuild
kdebug.h
kexec.h
kgdb.h
kmap_types.h kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
kspd.h
linkage.h
local.h MIPS: Allow kernel use of LL/SC to be separate from the presence of LL/SC. 2009-09-17 20:07:50 +02:00
m48t37.h
mc146818-time.h
mc146818rtc.h
mips_mt.h
mipsmtregs.h
mipsprom.h
mipsregs.h MIPS: Add hugetlbfs page defines. 2009-06-17 11:06:30 +01:00
mman.h mm: add MAP_HUGETLB for mmaping pseudo-anonymous huge page regions 2009-09-22 07:17:41 -07:00
mmu_context.h cpumask: use mm_cpumask() wrapper: mips 2009-09-24 09:34:51 +09:30
mmu.h
mmzone.h
module.h
msc01_ic.h
msgbuf.h
mutex.h
nile4.h
paccess.h
page.h MIPS: make page.h constants available to assembly. 2009-09-17 20:07:42 +02:00
param.h
parport.h
pci.h PCI: remove pcibios_scan_all_fns() 2009-09-09 13:29:18 -07:00
percpu.h
pgalloc.h mm: Remove duplicate definitions in MIPS and SH 2009-07-27 17:26:44 -07:00
pgtable-32.h
pgtable-64.h MIPS: Shrink the size of tlb handler 2009-09-17 20:07:51 +02:00
pgtable-bits.h MIPS: Add hugetlbfs page defines. 2009-06-17 11:06:30 +01:00
pgtable.h mm: ZERO_PAGE without PTE_SPECIAL 2009-09-22 07:17:41 -07:00
pmon.h
poll.h
posix_types.h
prefetch.h
processor.h MIPS: Avoid clobbering struct pt_regs in kthreads 2009-08-03 17:52:41 +01:00
ptrace.h
r4k-timer.h
r4kcache.h MIPS: Support 64-byte D-cache line size 2009-06-17 11:06:24 +01:00
reboot.h
reg.h MIPS: 64-bit: Fix o32 core dump 2009-07-03 15:45:27 +01:00
regdef.h
resource.h
rm9k-ocd.h
rtlx.h
scatterlist.h
seccomp.h
sections.h
segment.h
sembuf.h
serial.h
setup.h
sgialib.h
sgiarcs.h
sgidefs.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h asm-generic: rename termios.h, signal.h and mman.h 2009-06-11 21:01:52 +02:00
sim.h
smp-ops.h cpumask: arch_send_call_function_ipi_mask: mips 2009-09-24 09:34:45 +09:30
smp.h MIPS: SMP: Inline arch_send_call_function_{single_ipi,ipi_mask} 2009-09-30 21:47:00 +02:00
smtc_ipi.h
smtc_proc.h
smtc.h
smvp.h
sni.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_types.h
spinlock.h
stackframe.h
stacktrace.h
stat.h
statfs.h
string.h
suspend.h MIPS: Add hibernation support 2009-06-17 11:06:31 +01:00
swab.h MIPS: Define __arch_swab64 for all mips r2 cpus 2009-07-03 15:45:25 +01:00
sysmips.h
system.h MIPS: Allow kernel use of LL/SC to be separate from the presence of LL/SC. 2009-09-17 20:07:50 +02:00
termbits.h
termios.h
thread_info.h KEYS: Extend TIF_NOTIFY_RESUME to (almost) all architectures [try #6] 2009-09-02 21:29:19 +10:00
time.h
timex.h
titan_dep.h
tlb.h
tlbdebug.h
tlbflush.h
topology.h
traps.h
txx9irq.h
txx9pio.h
txx9tmr.h
types.h asm-generic: introduce asm/bitsperlong.h 2009-06-11 21:02:14 +02:00
uaccess.h
ucontext.h
unaligned.h MIPS: Avoid spurious make includecheck message 2009-09-30 21:47:02 +02:00
unistd.h perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
user.h
vga.h
vpe.h
war.h
watch.h
wbflush.h
xor.h