madwifi/net80211
mtaylor ebe8ee9736 This patch augments the current reference counting code with:
* Counters for total outstanding instances for each resource type (skb, ath_node and ath_buf)
* One pair of acquisition/release functions per resource type in unlocked and one in locked
* Adds some more _debug versions of functions in the call chain that acquire/release resources so that the original func/line in the driver as well as the func/line that affected the resource use can be shown in the trace.  Intermediate stack frames aren't necessary to trace the leaks.
* Changes naming convention for "lock-required" functions to suffix _locked for the versions that expect locking, to be consistent with some other places in the code.
* Consolidate debug messages to the helper functions that actually affect the reference count or acquire/release a resource
* Additional sanity checks and leak detection (esp for detecting node ref leaks through skb)
* skb references are nulled out by the new sbk unref/free function.

I've tested these changes extensively and found lots of cases where we didn't get enough node references when cloning skbuff, and where the kernel drops packets due to performance issues and leaks our node references.

With these changes and the tracing enabled I have verified that:

* TX BUF: tx buffers always go down to zero when the tx queue is done, and you can watch tx queue usage ratio go up and down again as the driver is working.  There are no leaks here at the moment, although there *are* some in the madwifi-dfs branch during CAC at the moment.

* skbuff leaks in all the common flows are fixed.  We were leaking node references in a lot of places where kernel was dropping skb's due to congestion and we were failing to increment node references when cloning skbuffs.  These are now detected, as are skbuffs that are reaped by the kernel while still holding a node reference.

* the ath_node count works correctly and on an idle system we get about 5 references per station table node, with 2 node instances per VAP.  One for the bss and one for the node in the station table, I believe.  The ath_node count goes up and down but always lands back at the stable number based on the vaps you have configured and the number of actual stations in the station table.  The point here is that it's pretty constant what you will see over time, despite excessive node creation/release in our code during input (esp input_all).  Thank god for the slab allocator.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2902 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-21 20:14:11 +00:00
..
_ieee80211.h Merge tools/wlanconfig.c changes from the DFS branch 2007-11-20 17:33:41 +00:00
ieee80211_acl.c Restructuring the repository layout in response to ath5k. 2007-10-04 13:07:51 +00:00
ieee80211_beacon.c This patch augments the current reference counting code with: 2007-11-21 20:14:11 +00:00
ieee80211_crypto_ccmp.c Fix for a false replay detection when seq was initialized to zero and first packet is also seq zero. 2007-10-28 20:40:04 +00:00
ieee80211_crypto_none.c Restructuring the repository layout in response to ath5k. 2007-10-04 13:07:51 +00:00
ieee80211_crypto_tkip.c Fix for a false replay detection when seq was initialized to zero and first packet is also seq zero. 2007-10-28 20:40:04 +00:00
ieee80211_crypto_wep.c Restructuring the repository layout in response to ath5k. 2007-10-04 13:07:51 +00:00
ieee80211_crypto.c Unexpand tabs in the lines different from the DFS branch 2007-11-20 20:33:58 +00:00
ieee80211_crypto.h Our ABI for hostapd currently uses an old structure that only has one byte for the key index. This means that the 'magic value' of -1 (255) for NONE is passed rather than the larger type we actually use internally. To make comparisons work properly, I'm putting the magic value back at (uint8_t)-1 again so that a key index of 'none' with a MAC address that is passed into madwifi is interpreted correctly and the keys for that station are properly removed, rather than errors returned. 2007-10-29 22:33:03 +00:00
ieee80211_debug.h Support for setting default VAP debug flags at module load time, so you can 2007-11-21 10:45:58 +00:00
ieee80211_input.c This patch augments the current reference counting code with: 2007-11-21 20:14:11 +00:00
ieee80211_ioctl.h Backport of continous transmit function from madwifi-dfs. 2007-11-21 11:08:51 +00:00
ieee80211_linux.c This patch augments the current reference counting code with: 2007-11-21 20:14:11 +00:00
ieee80211_linux.h This patch augments the current reference counting code with: 2007-11-21 20:14:11 +00:00
ieee80211_monitor.c This patch augments the current reference counting code with: 2007-11-21 20:14:11 +00:00
ieee80211_monitor.h Restructuring the repository layout in response to ath5k. 2007-10-04 13:07:51 +00:00
ieee80211_node.c This patch augments the current reference counting code with: 2007-11-21 20:14:11 +00:00
ieee80211_node.h This patch augments the current reference counting code with: 2007-11-21 20:14:11 +00:00
ieee80211_output.c This patch augments the current reference counting code with: 2007-11-21 20:14:11 +00:00
ieee80211_power.c This patch augments the current reference counting code with: 2007-11-21 20:14:11 +00:00
ieee80211_power.h Restructuring the repository layout in response to ath5k. 2007-10-04 13:07:51 +00:00
ieee80211_proto.c Port some formatting fixes from DFS branch 2007-11-21 17:18:09 +00:00
ieee80211_proto.h Restructuring the repository layout in response to ath5k. 2007-10-04 13:07:51 +00:00
ieee80211_radiotap.h Restructuring the repository layout in response to ath5k. 2007-10-04 13:07:51 +00:00
ieee80211_rate.c Restructuring the repository layout in response to ath5k. 2007-10-04 13:07:51 +00:00
ieee80211_rate.h Restructuring the repository layout in response to ath5k. 2007-10-04 13:07:51 +00:00
ieee80211_scan_ap.c If a rates information element is received that is larger than we will accept, simply take the first maximum size elements and continue, rather than BUG'ing out. 2007-10-11 15:40:49 +00:00
ieee80211_scan_sta.c If a rates information element is received that is larger than we will accept, simply take the first maximum size elements and continue, rather than BUG'ing out. 2007-10-11 15:40:49 +00:00
ieee80211_scan.c Add missing symbols used by txcont 2007-11-21 11:20:36 +00:00
ieee80211_scan.h Restructuring the repository layout in response to ath5k. 2007-10-04 13:07:51 +00:00
ieee80211_skb.c This patch augments the current reference counting code with: 2007-11-21 20:14:11 +00:00
ieee80211_skb.h This patch augments the current reference counting code with: 2007-11-21 20:14:11 +00:00
ieee80211_var.h This patch augments the current reference counting code with: 2007-11-21 20:14:11 +00:00
ieee80211_wireless.c This patch augments the current reference counting code with: 2007-11-21 20:14:11 +00:00
ieee80211_xauth.c Restructuring the repository layout in response to ath5k. 2007-10-04 13:07:51 +00:00
ieee80211.c Missed checkin for new debug flags 2007-11-21 11:16:05 +00:00
ieee80211.h Backport some additional 802.11 defines from madwifi-dfs 2007-11-21 10:24:35 +00:00
if_athproto.h Support for setting default VAP debug flags at module load time, so you can 2007-11-21 10:45:58 +00:00
if_ethersubr.h Restructuring the repository layout in response to ath5k. 2007-10-04 13:07:51 +00:00
if_llc.h Restructuring the repository layout in response to ath5k. 2007-10-04 13:07:51 +00:00
if_media.c Restructuring the repository layout in response to ath5k. 2007-10-04 13:07:51 +00:00
if_media.h Merge some whitespace changes from the DFS branch 2007-11-20 17:18:36 +00:00
Makefile This patch augments the current reference counting code with: 2007-11-21 20:14:11 +00:00
Makefile.kernel This patch augments the current reference counting code with: 2007-11-21 20:14:11 +00:00
version.h Restructuring the repository layout in response to ath5k. 2007-10-04 13:07:51 +00:00