Thomas,

Thanks for the comments.

On 2012/09/05, at 11:56, Thomas Pedersen wrote:
> On Sun, Sep 2, 2012 at 1:20 PM, LEO Airwarosu Yoichi Shinoda
> <[email protected]> wrote:
>> 
>> An companion kernel patch to go with the iw-3.3 patch
>> (Message-Id: <[email protected]>)
>> 
>> The design of the patch is really ugly to avoid adding
>> additional cfg80211 calls;
>> the net/mac80211/mesh_pathtbl.c:mesh_path_lookup_by_idx()
>> was expanded to loop through mpp_paths and known_gates
>> lists in addition to the original mesh_paths.
> 
> known_gates is just an optimization to avoid iterating over all mpaths
> when looking for all gates, so you can avoid treating them as separate
> mpath entries.

Oh, I'm relieved to hear that. Then most of the known_gates stuff will
go away in the next update.

> The unattractive nature of this patch seems like a sign that we can
> simplify the mpath storage / semantics. mpath->dst would point to
> either a mesh destination, a mesh gate, or a proxied destination. We
> could then get rid of the mpp path table entirely. I guess we should
> also take care with how proxied paths are handled by the hwmp code.

One big Yea.

>> Despite the effort, and quite ironically, the
>> include/net/cfg80211.h had to be changed to increase
>> the mpath_info.flag bits (sigh).

Since I don't have to deal with known_gates list anymore, I can revert
mpath_info.flag to 8-bits so that we don't have to modify something
outside the net/mac80211 subtree.
However, I'm wondering if I should do this, since the expanded 32-bit
field is now also used to detect the un-patched kernel…

>> diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
>> index 13fd5b5..fe68140 100644
>> --- a/net/mac80211/mesh.h
>> +++ b/net/mac80211/mesh.h
>> @@ -135,6 +135,8 @@ struct mesh_path {
>>        unsigned long last_preq_to_root;
>>        bool is_root;
>>        bool is_gate;
>> +       bool is_mpppath;
>> +       bool is_known_gate;
> 
> I know there is legacy code using these is_* bools, but maybe these
> should just be mpath->flags bits? Also why is is_known_gate needed in
> addition to is_gate?

These is_* are used by mesh_path_lookup_by_idx() to tell
mesh_mpath_dump() which list a returned path is originated from;
mesh_paths or mpp_paths. The is_known_gates was used for the same
purpose; I noticed that all entries in is_known_gates list appear
in the mesh_paths as far as my experience tells, but I wasn't sure
this is always true, so I decided to list them also.
Now I know that these are fast-path to gates, it will go a way.

--- shinoda

_______________________________________________
Devel mailing list
[email protected]
http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel

Reply via email to