Bug 2920

Summary: Default MaxSlrc and fragmentation threshold values differ from standard
Product: ns-3 Reporter: Szymon Szott <szott>
Component: wifiAssignee: sebastien.deronne
Status: RESOLVED FIXED    
Severity: minor CC: ns-bugs, tomh
Priority: P3    
Version: ns-3.28   
Hardware: All   
OS: All   
Attachments: Patch to fix default MaxSlrc and default fragmentation threshold

Description Szymon Szott 2018-05-18 12:19:30 UTC
The WifiRemoteStationManager module uses 7 as the default value of MaxSlrc. According to the 802.11-2016 standard it should be 4 because:

1) MaxSlrc is mapped to dot11LongRetryLimit as stated in 802.11-2016 on page 1324: 

"The CW shall be reset to aCWmin after every successful attempt to transmit a frame containing all or part of an MSDU or MMPDU, when SLRC reaches dot11LongRetryLimit, or when SSRC reaches dot11ShortRetryLimit."

2) the default value of dot11LongRetryLimit is 4 as stated in 802.11-2016 on page 3087:

    dot11LongRetryLimit OBJECT-TYPE
    SYNTAX Unsigned32 (1..255)
    MAX-ACCESS read-write
    STATUS current
    DESCRIPTION
    "This is a control variable.
    It is written by an external management entity.
    Changes take effect as soon as practical in the implementation.
    This attribute indicates the maximum number of transmission attempts of a
    frame, in a PSDU of length that is greater than dot11RTSThreshold, that is
    made before a failure condition is indicated."
    DEFVAL { 4 }
    ::= { dot11OperationEntry 4 }
Comment 1 sebastien.deronne 2018-05-19 04:54:07 UTC
I will have a look at the standard. This default value of 7 is there for long time, I have no idea how it was chosen at the time.
Comment 2 sebastien.deronne 2018-05-25 15:37:52 UTC
You are correct, I will fix this and eventually have to need to adapt regression.
Comment 3 sebastien.deronne 2018-05-29 03:58:43 UTC
Created attachment 3098 [details]
Patch to fix default MaxSlrc and default fragmentation threshold

I fixed it and regression is updated, I noticed the default fragmentation threshold was also not set as per standard.
Comment 4 Tom Henderson 2018-05-29 09:49:03 UTC
Do you mind to extend the patch to cover the following?

- update CHANGES.html for changed behavior (and RELEASE_NOTES listing the bug)
- in the examples/wireless directory (perhaps others), there are many statements such as the following; can they all be cleaned out?

e.g. wifi-simple-adhoc.cc

  // disable fragmentation for frames below 2200 bytes
  Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("2200"));
Comment 5 sebastien.deronne 2018-05-29 10:00:24 UTC
(In reply to Tom Henderson from comment #4)
> Do you mind to extend the patch to cover the following?
> 
> - update CHANGES.html for changed behavior (and RELEASE_NOTES listing the
> bug)
> - in the examples/wireless directory (perhaps others), there are many
> statements such as the following; can they all be cleaned out?
> 
> e.g. wifi-simple-adhoc.cc
> 
>   // disable fragmentation for frames below 2200 bytes
>   Config::SetDefault
> ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue
> ("2200"));

Tom, sure I will check those points.
Comment 6 sebastien.deronne 2018-05-31 17:10:13 UTC
Working on Tom's comment, then pushing.
Comment 7 sebastien.deronne 2018-05-31 17:19:14 UTC
Fixed in changeset 13609:9f6cce4ac842