conf/170098: virtual access points with Atheros ath driver

Adrian Chadd adrian at freebsd.org
Wed Aug 15 17:00:27 UTC 2012


The following reply was made to PR kern/170098; it has been noted by GNATS.

From: Adrian Chadd <adrian at freebsd.org>
To: Kim Culhan <w8hdkim at gmail.com>, PseudoCylon <moonlightakkiy at yahoo.ca>
Cc: bug-followup at freebsd.org
Subject: Re: conf/170098: virtual access points with Atheros ath driver
Date: Wed, 15 Aug 2012 09:50:53 -0700

 Hi,
 
 I'm just testing out the patch(es) now. The basic spirit of them
 works, but there are some improvements to be made.
 
 * The node generation count doesn't have to be checked. We know the
 node table is locked; the reason the node generation is there is
 because in the older way of doing it, the node table lock is released
 each trip through the loop.
 * 'goto restart' on each successful addition to the node table turns
 an O(n) operation into an O(n^2) operation. That's just plain going to
 suck.
 * It's always good practice to alloc and free memory in the same
 function or module and doing it consistently. The patch allocates it
 in iterate_nodes() but frees it in iterate_nt() if there's an error.
 That kind of inconsistent handling could cause problems.
 * There's no need to decrement the node scan generation on error. It's
 fine the way it is.
 * .. which means if you don't decrement the scangen in each node, you
 can release the node table / node iteration table locks earlier,
 avoiding any LOR with ieee80211_node_free().
 
 I have a replacement patch which I'm currently testing out. I'll push
 it into -HEAD today.
 
 Thanks again to Kim and PseudoCylon for finding and fixing the problem!
 
 
 
 Adrian


More information about the freebsd-wireless mailing list