[Tinyos-devel] [Tinyos-help] Regarding 4 bit link estimation
Rémi Villé
ville.remi at gmail.com
Fri Jul 17 07:47:13 PDT 2009
2009/7/17 Omprakash Gnawali <gnawali at usc.edu>
> 2009/7/13 Mehmet Akif Antepli <akifantepli at gmail.com>:
> > Hi Omprakash,
> >
> > About the inage field,
> > In the code below, first there is the check for the neighbor table entry
> to
> > update. Inage field is only decremented for the neighbor that sent beacon
> > msg !
> >
> > // update the inbound link quality by
> > // munging receive, fail count since last update
> > void updateNeighborTableEst(am_addr_t n) {
> > uint8_t i, totalPkt;
> > neighbor_table_entry_t *ne;
> > uint8_t newEst;
> > uint8_t minPkt;
> > minPkt = BLQ_PKT_WINDOW;
> > dbg("LI", "%s\n", __FUNCTION__);
> > for (i = 0; i < NEIGHBOR_TABLE_SIZE; i++) {
> > ne = &NeighborTable[i];
> > if (ne->ll_addr == n) {
> > if (ne->flags & VALID_ENTRY) {
> > if (ne->inage > 0)
> > ne->inage--;
> >
> > But i think inage field should be decremented when the following
> condition
> > holds, isn't it?
>
> You caught a bug. This code became a bug when we changed from updating
> all the entries in the link table to selectively updating the link
> table. When all the entries were updated periodically, we would
> decrement the age for all the entries and refresh the age only on the
> entries that were heard from recently. We don't do such wholesome
> periodic updates anymore. Thanks for catching this.
>
> - om_p
>
What could be the bad effect of this bug? Some good neighbors could be
evicted before a whole period?
What is the correct code (maybe on cvs)?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-devel/attachments/20090717/d6b41575/attachment.htm
More information about the Tinyos-devel
mailing list