Okay, I understand the mechanism behind the huge exp_time value.

It's in the net/mac80211/net/cfg.c:mpath_set_pinfo().

If the given mpath is expired, the pinfo->exptime is never set,
e.g: assignment to pinfo->exptime is only done when the mpath is
not expired:

        if (time_before(jiffies, mpath->exp_time))
                pinfo->exptime = jiffies_to_msecs(mpath->exp_time - jiffies);

And I guess the pinfo points to some local storage in the caller's stack,
giving exptime a random and/or pointer like value.

Initializing the *pinfo to zeros will fixed this problem, unless
the huge value has something to tell for the users of iw mpath dump.

--- shinoda


On 2012/08/20, at 0:19, Yeoh Chun-Yeow wrote:

> The mpath that is expired and waits for deletion seems to have the
> high value consistent for a while, such as 3242852032 in my case.
> 
> DEST ADDR         NEXT HOP          IFACE       SN      METRIC  QLEN
> EXPTIME         DTIM    DRET    FLAGS
> 0a:0b:6b:b6:5c:1e 0a:0b:6b:b6:5c:1e mesh0       236     71      0
> 3242852032      0       0       0x14
> 00:15:6d:b0:e6:b7 00:15:6d:b0:e6:b7 mesh0       0       79      0
> 3242852032      0       0       0x10
> 0a:15:6d:b0:e7:07 00:15:6d:b0:e6:b7 mesh0       7465    150     0
> 3242852032      0       0       0x14
> 0a:0b:6b:b6:5b:11 0a:0b:6b:b6:5b:11 mesh0       4252    64      0
> 3242852032      0       0       0x14
> 
> Whenever the mpath is expired, pinfo->exptime is not update due to if
> condition.
> 
> --
> Chun-Yeow
> 
> On Sun, Aug 19, 2012 at 5:01 PM, LEO Airwarosu Yoichi Shinoda
> <[email protected]> wrote:
>> 
>> I noticed that net/mac80211/cfg.c translates the values
>> to msecs in mpath_set_pinfo().
>> 
>> But my last question is still valid:
>>> So, if 1 jiffie = 1 msec in my system, 2176653824 is 25 days.
>>> Is this correct?
>> 
>> I have another question, which is:
>> 
>> Why huge timer values do not down count, as opposed to
>> small values (usually less than 5000), which look rapidly
>> down count and reset to 5000.
>> 
>> --- shinoda
>> 
>> On 2012/08/19, at 17:50, LEO Airwarosu Yoichi Shinoda wrote:
>> 
>>> 
>>> Chun-Yeow,
>>> 
>>> Oh, I see that the example in the explanation page also list
>>> huge values.
>>> 
>>> So, if 1 jiffie = 1 msec in my system, 2176653824 is 25 days.
>>> Is this correct?
>>> 
>>> --- shinoda
>>> 
>>> On 2012/08/19, at 13:34, Yeoh Chun-Yeow wrote:
>>> 
>>>> You can refer here for the explanation.
>>>> https://github.com/cozybit/open80211s/wiki/mpath
>>>> 
>>>> Time when this Mesh Path will expire, in jiffies.
>>>> 
>>>> --
>>>> Chun-Yeow
>>>> 
>>>> On Sat, Aug 18, 2012 at 2:29 AM, LEO Airwarosu Yoichi Shinoda
>>>> <[email protected]> wrote:
>>>>> Hi.
>>>>> 
>>>>> I have been observing huge EXPTIME in iw mpath dump outputs.
>>>>> They do not change over time.
>>>>> Any idea what they are?
>>>>> 
>>>>> Here are three examples from 3 different mp (or mpp)s.
>>>>> 
>>>>> root@gn4:~# iw wlan0 mpath dump
>>>>> DEST ADDR         NEXT HOP          IFACE       SN      METRIC  QLEN    
>>>>> EXPTIMEDTIM     DRET    FLAGS
>>>>> 4e:e6:76:a9:5b:9e 4c:e6:76:aa:51:a8 wlan0       2095    16386   0       
>>>>> 2176653824      0       0       0x14
>>>>> 00:01:8e:10:bc:79 00:01:8e:10:bc:79 wlan0       13727   8513    0       
>>>>> 4430    200     1       0x15
>>>>> … rest of the line truncated
>>>>> 
>>>>> root@wlae1:~# iw wlan0 mpath dump
>>>>> DEST ADDR         NEXT HOP          IFACE       SN      METRIC  QLEN    
>>>>> EXPTIMEDTIM     DRET    FLAGS
>>>>> 4c:e6:76:44:9b:04 4c:e6:76:aa:51:a8 wlan0       120807  16386   0       
>>>>> 2180848128      0       0       0x14
>>>>> 4c:e6:76:44:9a:e8 4c:e6:76:44:9a:e8 wlan0       2601    8193    0       
>>>>> 3180    0x15
>>>>> … rest of the line truncated
>>>>> 
>>>>> root@gn1:~# iw wlan0 mpath dump
>>>>> DEST ADDR         NEXT HOP          IFACE       SN      METRIC  QLEN    
>>>>> EXPTIMEDTIM     DRET    FLAGS
>>>>> 4c:e6:76:44:9a:d5 4c:e6:76:97:d7:01 wlan0       20353   24579   0       
>>>>> 2176653824      0       0       0x14
>>>>> 4c:e6:76:aa:51:a8 4c:e6:76:aa:51:a8 wlan0       0       15649   0       
>>>>> 2176653824      0       0       0x10
>>>>> 4c:e6:76:97:d7:01 4c:e6:76:97:d7:01 wlan0       1834    8193    0       
>>>>> 4280    0x15
>>>>> … rest of the line truncated
>>>>> 
>>>>> 
>>>>> --- shinoda
>>>>> 
>>>>> _______________________________________________
>>>>> Devel mailing list
>>>>> [email protected]
>>>>> http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel
>>>> _______________________________________________
>>>> Devel mailing list
>>>> [email protected]
>>>> http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel
>>> 
>>> _______________________________________________
>>> Devel mailing list
>>> [email protected]
>>> http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel
>> 
>> _______________________________________________
>> Devel mailing list
>> [email protected]
>> http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel
> _______________________________________________
> Devel mailing list
> [email protected]
> http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel

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

Reply via email to