Commit Graph

13 Commits

Author SHA1 Message Date
mentor ff673bb684 Rework monitor mode SKB handling, touching shared and cloned SKB handling in the TX path. This patch removes any such processing based on the assumption that the current processing is wrong even in the most conservative case (cloned SKB).
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3076 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-24 01:01:47 +00:00
mentor 59982ec746 Formatting changes:
* Remove comments that merely duplicate the code (i.e., they don't provide information on Why or explain the opaque)
 * Rename some variable for consistency
 * Line length -> 80 chars
 * Reorder non-dependent code blocks in a function to make it more readable (at least to me)


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3003 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-04 00:43:10 +00:00
mtaylor 369b43180b Make skb_destructor debug conditional, even within IEEE80211_DEBUG_REFCNT you need IEEE80211_DEBUG_REFCNT_SKBDEST now... until I figure it out. Reports of problems with aircrack-ng injection.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2972 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-26 07:58:30 +00:00
mtaylor 573cc60660 Uninstall skb debug destructor when skb is passed up
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2970 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-26 06:38:21 +00:00
mtaylor ec5e8e0a11 Re-enable skb debug destructor, chaining to original when present.
Split skb and node debug flags - one ending in _ref tracks minute changes to reference counts, while the non _ref flag trackes more coarse grained debug events.
Fix a node reference leak before skb_orphan detected by the debug destructor.
Fix debug flag display order for athdebug and 80211debug so that the shorter
name comes first and matches, otherwise only the _ref flags match.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2964 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-25 09:09:24 +00:00
mtaylor 4a2fbe421e Only install debug destructor if destructor is not already used by the kernel,
otherwise we can interfere with normal cleanup.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2955 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-25 07:39:48 +00:00
mentor 79e3ccd6ae Formatting changes, parentheses style this time
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2952 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-25 04:08:38 +00:00
mtaylor ea868797b6 Comment out some stuff added after 2.4 kernel. 2.6.0 is just a guess, but should serve as a starting point.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2927 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-22 07:57:43 +00:00
mtaylor c428bb7406 Remove references to skbuff.input_dev as it seems to have had a relatively short lifespan, despite the references in the textbooks on network internals. ;-)
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2925 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-22 06:57:45 +00:00
mentor 5afdef8cae Formatting changes. Mostly line lengths with some whitespace. Also, remove author info from any comments.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2915 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-22 02:08:35 +00:00
mtaylor 9dc2e2884a Wrap use of input_dev in preprocessor conditionals. Went away in 2.6.20.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2913 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-22 01:02:08 +00:00
mtaylor 54d2029f21 Fix sparse warnings and compile errors reported with includes in ieee80211_skb.h
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2908 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-22 00:24:26 +00:00
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