linux/arch/frv
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 FRV: Drop 'TOPDIR' from Makefiles 2008-01-28 23:14:37 +01:00
include/asm net: Generalize socket rx gap / receive queue overflow cmsg 2009-10-12 13:26:31 -07:00
kernel sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -07:00
lib Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-09-22 07:51:45 -07:00
mb93090-mb00 FRV: Flash mappings for the MB93090-MB00 motherboard 2009-09-24 17:18:38 -07:00
mm Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
Kconfig perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
Kconfig.debug [PATCH] frv: drop unsupported debugging features 2006-01-08 20:13:36 -08:00
Makefile kbuild: enable 'make AFLAGS=...' to add additional options to AS 2007-10-15 21:59:31 +02:00
defconfig [PATCH] FRV: Add defconfig 2005-07-07 18:23:42 -07:00