kernel_optimize_test/net/atm
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
..
addr.c atm: use const where reasonable 2008-06-17 16:20:06 -07:00
addr.h atm: use const where reasonable 2008-06-17 16:20:06 -07:00
atm_misc.c [ATM]: atm_pcr_goal() doesn't modify its argument's contents -- mark it as const 2005-11-29 16:13:55 -08:00
atm_sysfs.c net: struct device - replace bus_id with dev_name(), dev_set_name() 2008-11-10 13:55:14 -08:00
br2684.c atm/br2684: netif_stop_queue() when atm device busy and netif_wake_queue() when we can send packets again. 2009-09-02 23:46:10 -07:00
clip.c net: make neigh_ops constant 2009-09-01 17:40:57 -07:00
common.c net: Generalize socket rx gap / receive queue overflow cmsg 2009-10-12 13:26:31 -07:00
common.h net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
ioctl.c atm: sk_wmem_alloc initial value is one 2009-06-18 00:29:12 -07:00
Kconfig [ATM]: atm is no longer experimental 2008-01-28 15:00:11 -08:00
lec_arpc.h [ATM]: [lec] add reference counting to lec_arp entries 2006-09-29 17:16:48 -07:00
lec.c convert ATM drivers to netdev_tx_t 2009-09-01 01:13:10 -07:00
lec.h lec: convert to internal network_device_stats 2009-01-21 14:02:00 -08:00
Makefile [ATM]: Kill ipcommon.[ch] 2006-12-02 21:32:08 -08:00
mpc.c convert ATM drivers to netdev_tx_t 2009-09-01 01:13:10 -07:00
mpc.h atm: convert mpc device to using netdev_ops 2009-03-21 19:19:12 -07:00
mpoa_caches.c net: replace NIPQUAD() in net/*/ 2008-10-31 00:54:56 -07:00
mpoa_caches.h [NET] ATM: Fix whitespace errors. 2007-02-10 23:19:16 -08:00
mpoa_proc.c proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
pppoatm.c [ATM]: Replace DPRINTK() with pr_debug(). 2007-10-10 16:48:27 -07:00
proc.c net: mark read-only arrays as const 2009-08-05 10:42:58 -07:00
protocols.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pvc.c net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
raw.c atm: sk_wmem_alloc initial value is one 2009-06-18 00:29:12 -07:00
resources.c atm: 32-bit ioctl compatibility 2008-12-03 22:12:38 -08:00
resources.h atm: 32-bit ioctl compatibility 2008-12-03 22:12:38 -08:00
signaling.c [NET]: sparse warning fixes 2007-10-10 16:54:48 -07:00
signaling.h [NET] ATM: Fix whitespace errors. 2007-02-10 23:19:16 -08:00
svc.c net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00