Fabrice, On Thu, May 12, 2011 at 6:36 PM, Fabrice Deyber <fabricedey...@agilemesh.com> wrote: > Hi all, > > The current mesh implementation uses a parameter called > "mesh_path_refresh_time" which defaults to 1000ms (1sec) to refresh > existing paths. > > My question is: does this mean that every second ONE path request is > sent out?
No. See mesh.h: /* * A path will be refreshed if it is used PATH_REFRESH_TIME milliseconds * before timing out. This way it will remain ACTIVE and no data frames * will be unnecessarily held in the pending queue. To limit the rate of PREQs you can use dot11MeshHWMPpreqMinInterval which is specified in the 11s draft and implemented. The current default is a whooping 10ms, which might be too fast. Javier > If that's the case the current code should be modified: > > in mesh_hwmp.c (mesh_nexthop_lookup()) > > > > ... > > if (mpath->flags & MESH_PATH_ACTIVE) { > > if (time_after(jiffies, > > mpath->exp_time - > > > > msecs_to_jiffies(sdata->u.mesh.mshcfg.path_refresh_time)) && > > !memcmp(sdata->vif.addr, hdr->addr4, ETH_ALEN) && > > !(mpath->flags & MESH_PATH_RESOLVING) && > > !(mpath->flags & MESH_PATH_FIXED)) { > > mesh_queue_preq(mpath, > > PREQ_Q_F_START | PREQ_Q_F_REFRESH); > > last_refresh = jiffies; > > } > > ... > > > > This will result in a burst of preq. (as long as "exp_time - > > refresh_time<jiffies<exp_time" preq is queued) > > > > I believe the code should look like this: > > > > ... > > static unsigned long last_refresh = INITIAL_JIFFIES; > > ... > > if (mpath->flags & MESH_PATH_ACTIVE) { > > if (time_after_eq(jiffies, > > last_refresh + > > > > msecs_to_jiffies(sdata->u.mesh.mshcfg.path_refresh_time)) && > > !memcmp(sdata->vif.addr, hdr->addr4, ETH_ALEN) && > > !(mpath->flags & MESH_PATH_RESOLVING) && > > !(mpath->flags & MESH_PATH_FIXED)) { > > mesh_queue_preq(mpath, > > PREQ_Q_F_START | PREQ_Q_F_REFRESH); > > last_refresh = jiffies; > > } > > ... > > > > This will insure that a single preq is sent out every refresh time. > > > > Does it make sense? > > > > --Fabrice > > _______________________________________________ > Devel mailing list > Devel@lists.open80211s.org > http://open80211s.com/mailman/listinfo/devel > > -- Javier Cardona cozybit Inc. http://www.cozybit.com _______________________________________________ Devel mailing list Devel@lists.open80211s.org http://open80211s.com/mailman/listinfo/devel