linux_old1/net/core
Rusty Russell c45d286e72 [NET]: Inline net_device_stats
Network drivers which keep stats allocate their own stats structure
then write a get_stats() function to return them.  It would be nice if
this were done by default.

1) Add a new "stats" field to "struct net_device".
2) Add a new feature field to say "this driver uses the internal one"
3) Have a default "get_stats" which returns NULL if that feature not set.
4) Change callers to check result of get_stats call for NULL, not if
   ->get_stats is set.

This should not break backwards compatibility with older drivers, yet
allow modern drivers to shed some boilerplate code.

Lightly tested: works for a modified lguest network driver.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-25 22:28:26 -07:00
..
Makefile [NET]: The scheduled removal of the frame diverter. 2006-12-02 21:22:23 -08:00
datagram.c [UDP]: Clean up UDP-Lite receive checksum 2007-04-25 22:23:51 -07:00
dev.c [NET]: Inline net_device_stats 2007-04-25 22:28:26 -07:00
dev_mcast.c [NET]: make seq_operations const 2007-04-25 22:25:03 -07:00
dst.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
ethtool.c [NET] core: whitespace cleanup 2007-04-25 22:24:09 -07:00
fib_rules.c [NET] fib_rules: Flush route cache after rule modifications 2007-04-25 22:28:18 -07:00
filter.c [SK_BUFF]: Convert skb->tail to sk_buff_data_t 2007-04-25 22:26:28 -07:00
flow.c [IPSEC] flow: Fix potential memory leak 2007-01-23 20:25:39 -08:00
gen_estimator.c [NET] CORE: Fix whitespace errors. 2007-02-10 23:19:25 -08:00
gen_stats.c [SK_BUFF]: Convert skb->tail to sk_buff_data_t 2007-04-25 22:26:28 -07:00
iovec.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
kmap_skb.h [PATCH] severing skbuff.h -> highmem.h 2006-12-04 02:00:29 -05:00
link_watch.c [NET] CORE: Fix whitespace errors. 2007-02-10 23:19:25 -08:00
neighbour.c [NEIGH]: Use rtnl registration interface 2007-04-25 22:27:06 -07:00
net-sysfs.c [NET] core: whitespace cleanup 2007-04-25 22:24:09 -07:00
netevent.c [NET]: Network Event Notifier Mechanism. 2006-08-02 13:38:20 -07:00
netpoll.c [SK_BUFF]: Introduce udp_hdr(), remove skb->h.uh 2007-04-25 22:25:22 -07:00
pktgen.c [SK_BUFF]: Convert skb->tail to sk_buff_data_t 2007-04-25 22:26:28 -07:00
request_sock.c [NET]: Size listen hash tables using backlog hint 2006-12-02 21:21:44 -08:00
rtnetlink.c [NETLINK]: Directly return -EINTR from netlink_dump_start() 2007-04-25 22:27:33 -07:00
scm.c [NET] CORE: Fix whitespace errors. 2007-02-10 23:19:25 -08:00
skbuff.c [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset} 2007-04-25 22:28:23 -07:00
sock.c [NET]: make seq_operations const 2007-04-25 22:25:03 -07:00
stream.c [NET] CORE: Fix whitespace errors. 2007-02-10 23:19:25 -08:00
sysctl_net_core.c [NET]: Replace CONFIG_NET_DEBUG with sysctl. 2007-04-25 22:24:05 -07:00
user_dma.c [NET] CORE: Fix whitespace errors. 2007-02-10 23:19:25 -08:00
utils.c [NET]: New sysctls should use __read_mostly tags 2007-04-25 22:24:19 -07:00
wireless.c [NETLINK]: Use nlmsg_trim() where appropriate 2007-04-25 22:26:37 -07:00