Date: Wed, 15 Aug 2012 17:00:26 GMT From: Adrian Chadd <adrian@freebsd.org> To: freebsd-wireless@FreeBSD.org Subject: Re: conf/170098: virtual access points with Atheros ath driver Message-ID: <201208151700.q7FH0QBu068886@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/170098; it has been noted by GNATS. From: Adrian Chadd <adrian@freebsd.org> To: Kim Culhan <w8hdkim@gmail.com>, PseudoCylon <moonlightakkiy@yahoo.ca> Cc: bug-followup@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208151700.q7FH0QBu068886>