linux/arch/arm
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
..
boot kbuild: use INSTALLKERNEL to select customized installkernel script 2009-09-20 12:18:14 +02:00
common ARM: 5735/1: sa1111: CodingStyle cleanups 2009-10-02 22:32:33 +01:00
configs Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/xscaleiop 2009-10-02 22:31:04 +01:00
include/asm net: Generalize socket rx gap / receive queue overflow cmsg 2009-10-12 13:26:31 -07:00
kernel ARM: 5727/1: Pass IFSR register to do_PrefetchAbort() 2009-10-02 22:34:32 +01:00
lib Merge branch 'for-rmk' of git://linux-arm.org/linux-2.6 2009-09-19 13:47:57 +01:00
mach-aaec2000
mach-at91 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-25 07:22:11 -07:00
mach-bcmring ARM: 5733/1: fix bcmring compile error 2009-10-01 16:26:16 +01:00
mach-clps711x
mach-davinci ARM: includecheck fix: mach-davinci, board-dm365-evm.c 2009-09-28 18:06:20 +01:00
mach-ebsa110
mach-ep93xx ep93xx video driver platform support 2009-09-23 07:39:51 -07:00
mach-footbridge
mach-gemini Gemini: Fix SRAM/ROM location after memory swap 2009-05-28 16:42:25 +03:00
mach-h720x
mach-integrator ARM: Fix section mismatch warning in Integrator pci_v3 2009-09-28 18:04:32 +01:00
mach-iop13xx Merge branch 'iop-raid6' into async-tx-next 2009-09-08 17:53:57 -07:00
mach-iop32x iop3xx: ATU and PCI memory configuration corrected 2009-08-18 13:48:35 -07:00
mach-iop33x iop3xx: ATU and PCI memory configuration corrected 2009-08-18 13:48:35 -07:00
mach-ixp4xx ixp4xx: arch_idle() documentation fixup 2009-09-21 19:20:03 +02:00
mach-ixp23xx
mach-ixp2000
mach-kirkwood Merge branch 'master' into devel 2009-09-12 12:04:37 +01:00
mach-ks8695 ARM: 5637/1: [KS8695] Don't reference CLOCK_TICK_RATE in drivers 2009-08-05 22:06:56 +01:00
mach-l7200
mach-lh7a40x
mach-loki
mach-mmp [ARM] pxa: add PWM devices support for pxa168/910 2009-06-05 10:32:06 +08:00
mach-msm
mach-mv78xx0 [ARM] orion: convert gpio to use gpiolib 2009-06-08 13:04:57 -04:00
mach-mx1 ARM: mxc: Fix i2c_board_info definitions 2009-08-14 12:40:37 +02:00
mach-mx2 mx21ads: Fix framebuffer platform data 2009-08-14 12:41:16 +02:00
mach-mx3 Merge branch 'master' into devel 2009-09-12 12:04:37 +01:00
mach-mx25 Freescale i.MX25 PDK (3ds) board support 2009-08-14 12:40:43 +02:00
mach-mxc91231 MXC: add iomux pins configuration support for MXC91231 2009-08-14 12:40:47 +02:00
mach-netx netx: Use get_irqnr_preamble to initialize base register 2009-08-13 20:34:36 +02:00
mach-nomadik mtd: OneNand support for Nomadik 8815 SoC (on NHK8815 board) 2009-09-20 06:00:27 -07:00
mach-ns9xxx const: constify remaining file_operations 2009-10-01 16:11:11 -07:00
mach-omap1 omap: Fix wrong jtag_id for 850 2009-09-24 16:23:13 -07:00
mach-omap2 omap: Fix wrong condition check in while loop for mailbox and iommu2 2009-09-28 09:21:26 -07:00
mach-orion5x [ARM] orion5x: Add LaCie NAS 2Big Network support 2009-09-08 14:10:35 -04:00
mach-pnx4008
mach-pxa Merge branch 'master' into for-linus 2009-09-22 21:01:40 +01:00
mach-realview ARM: 5720/1: Move MMCI header to amba include dir 2009-09-22 20:49:04 +01:00
mach-rpc
mach-s3c24a0/include/mach ARM: S3C: move s3c_device_nand from plat-s3c24xx to plat-s3c 2009-07-31 00:10:24 +01:00
mach-s3c2400
mach-s3c2410 ARM: S3C: Add missing selection of S3C_DEV_NAND in machine Kconfigs. 2009-09-17 10:12:28 +01:00
mach-s3c2412 ARM: S3C: Add missing selection of S3C_DEV_NAND in machine Kconfigs. 2009-09-17 10:12:28 +01:00
mach-s3c2440 ARM: S3C: Add missing selection of S3C_DEV_NAND in machine Kconfigs. 2009-09-17 10:12:28 +01:00
mach-s3c2442 [ARM] GTA02: build fixes (s3c2410_nand_set usage) 2009-06-24 00:10:46 +01:00
mach-s3c2443
mach-s3c6400 ARM: S3C: Add missing selection of S3C_DEV_NAND in machine Kconfigs. 2009-09-17 10:12:28 +01:00
mach-s3c6410 ARM: S3C: Add missing selection of S3C_DEV_NAND in machine Kconfigs. 2009-09-17 10:12:28 +01:00
mach-s5pc100 ARM: S5PC100: Board and configuration file 2009-08-16 23:40:39 +01:00
mach-sa1100 ARM: Remove unused CONFIG SA1100_H3XXX 2009-09-28 18:06:20 +01:00
mach-shark
mach-stmp37xx [ARM] 5539/1: Freescale STMP: onboard devices declaration 2009-06-04 14:16:45 +01:00
mach-stmp378x [ARM] 5539/1: Freescale STMP: onboard devices declaration 2009-06-04 14:16:45 +01:00
mach-u300 ARM: 5731/2: Fix U300 generic GPIO, remove ifdefs from MMCI v3 2009-10-01 16:26:15 +01:00
mach-versatile ARM: 5720/1: Move MMCI header to amba include dir 2009-09-22 20:49:04 +01:00
mach-w90x900 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2009-09-14 17:56:51 -07:00
mm ARM: 5728/1: Proper prefetch abort handling on ARMv6 and ARMv7 2009-10-02 22:34:32 +01:00
nwfpe
oprofile RealView: Move the IRQ_* definitions out of the board-*.h files 2009-05-30 14:00:17 +01:00
plat-iop Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/xscaleiop 2009-10-02 22:31:04 +01:00
plat-mxc spi: add SPI driver for most known i.MX SoCs 2009-09-23 07:39:43 -07:00
plat-omap omap: Fix MMC gpio_wp for BeagleBoard C2 and above 2009-09-24 16:23:17 -07:00
plat-orion [ARM] Kirkwood: __init requires linux/init.h 2009-08-24 11:55:59 -04:00
plat-pxa [ARM] pxa/dma: add debugfs entries 2009-09-10 18:49:29 +08:00
plat-s3c ARM: s3c: fix check of index into s3c_gpios[] 2009-09-19 12:14:06 +01:00
plat-s3c24xx s3cmci: add better support for no card detect or write protect available 2009-10-01 16:11:15 -07:00
plat-s3c64xx Merge branch 'next-s3c-fixes' of git://aeryn.fluff.org.uk/bjdooks/linux 2009-09-18 20:55:56 +01:00
plat-s5pc1xx ARM: S5PC100: Kconfigs and Makefiles 2009-08-16 23:35:19 +01:00
plat-stmp3xxx ARM: STMP3xxx: deallocation with negative index of descriptors[] 2009-09-19 12:14:05 +01:00
tools [ARM] Update mach-types 2009-09-18 21:42:01 +01:00
vfp Thumb-2: Implement the unified VFP support 2009-07-24 12:32:57 +01:00
Kconfig ARM: 5580/2: ARM TCM (Tightly-Coupled Memory) support v3 2009-09-15 22:11:05 +01:00
Kconfig-nommu
Kconfig.debug Thumb-2: Add Thumb-2 support to the build files 2009-07-24 12:33:02 +01:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next 2009-09-23 15:37:02 -07:00