linux-stable/net/ipv6
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
..
netfilter netfilter: ip6t_eui: fix read outside array bounds 2009-08-31 15:30:31 +02:00
addrconf.c make TLLAO option for NA packets configurable 2009-10-07 01:10:45 -07:00
addrconf_core.c
addrlabel.c net: replace %p6 with %pI6 2008-10-29 12:52:50 -07:00
af_inet6.c net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
ah6.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
anycast.c net: replace %#p6 format specifier with %pi6 2008-10-29 12:50:24 -07:00
datagram.c IPv6: use ipv6_addr_set_v4mapped() 2009-10-07 13:58:25 -07:00
esp6.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
exthdrs.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
exthdrs_core.c
fib6_rules.c net: Remove unused parameter from fill method in fib_rules_ops. 2009-05-20 17:26:23 -07:00
icmp.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
inet6_connection_sock.c Use sk_mark for IPv6 routing lookups 2009-10-07 01:10:45 -07:00
inet6_hashtables.c ipv6: don't use tw net when accounting for recycled tw 2009-02-26 03:35:13 -08:00
ip6_fib.c xfrm: select sane defaults for xfrm[4|6] gc_thresh 2009-07-30 18:52:15 -07:00
ip6_flowlabel.c ipv6: Disallow rediculious flowlabel option sizes. 2009-02-06 00:49:55 -08:00
ip6_input.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
ip6_output.c ip: Report qdisc packet drops 2009-09-02 18:05:33 -07:00
ip6_tunnel.c tunnel: eliminate recursion field 2009-09-24 15:39:22 -07:00
ip6mr.c net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
ipcomp6.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
ipv6_sockglue.c Use sk_mark for IPv6 routing lookups 2009-10-07 01:10:45 -07:00
Kconfig IPv6: Fix 6RD typo 2009-10-07 14:50:30 -07:00
Makefile [IPV6] MROUTE: Support multicast forwarding. 2008-04-05 22:33:38 +09:00
mcast.c bonding: remap muticast addresses without using dev_close() and dev_open() 2009-09-15 02:37:40 -07:00
mip6.c ipv6: Use correct data types for ICMPv6 type and code 2009-06-23 04:31:07 -07:00
ndisc.c make TLLAO option for NA packets configurable 2009-10-07 01:10:45 -07:00
netfilter.c net: skb->dst accessors 2009-06-03 02:51:04 -07:00
proc.c net: mark read-only arrays as const 2009-08-05 10:42:58 -07:00
protocol.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
raw.c net: Generalize socket rx gap / receive queue overflow cmsg 2009-10-12 13:26:31 -07:00
reassembly.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
route.c IPv6: use ipv6_addr_copy() in ip6_route_redirect() 2009-10-07 13:58:01 -07:00
sit.c ipv6 sit: Set relay to 0.0.0.0 directly if relay_prefixlen == 0. 2009-10-11 23:41:10 -07:00
syncookies.c Use sk_mark for IPv6 routing lookups 2009-10-07 01:10:45 -07:00
sysctl_net_ipv6.c inet6: functions shadow global variable 2009-08-02 12:54:30 -07:00
tcp_ipv6.c IPv6: use ipv6_addr_set_v4mapped() 2009-10-07 13:58:25 -07:00
tunnel6.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
udp.c net: Generalize socket rx gap / receive queue overflow cmsg 2009-10-12 13:26:31 -07:00
udp_impl.h net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
udplite.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
xfrm6_input.c netns xfrm: per-netns MIBs 2008-11-25 17:59:52 -08:00
xfrm6_mode_beet.c ipsec: Interfamily IPSec BEET, ipv4-inner ipv6-outer 2008-08-06 02:40:25 -07:00
xfrm6_mode_ro.c [IPSEC]: Make x->lastused an unsigned long 2008-01-28 14:53:52 -08:00
xfrm6_mode_transport.c [IPSEC]: Use IPv6 calling convention as the convention for x->mode->output 2007-10-10 16:55:54 -07:00
xfrm6_mode_tunnel.c net: skb->dst accessors 2009-06-03 02:51:04 -07:00
xfrm6_output.c net: skb->dst accessors 2009-06-03 02:51:04 -07:00
xfrm6_policy.c xfrm6: Fix xfrm6_policy.c build when SYSCTL disabled. 2009-08-04 20:32:16 -07:00
xfrm6_state.c ipv6: fix sparse warning: Using plain integer as NULL pointer 2009-02-21 23:37:10 -08:00
xfrm6_tunnel.c ipv6: Use correct data types for ICMPv6 type and code 2009-06-23 04:31:07 -07:00