Attached patch does three things:
1) Fixed the formatting in logState and added a log line for the current transmission (which makes it much easier to see what happens as we are trying to send a packet).
2) Added two new transitions to WAITACK to handle the case where we receive a packet that is not the ack we expected. Per the last bit in section 9.2.8 of the standard, "The recognition of anything [but the ack we expected] shall be interpreted as failure of the MPDU transmission". The PS-POLL special case is still not handled.
3) Always do the fixFSM code (so I removed the flag altogether). Fixed IDLE so that it does not invalidate the backoff if we've suspended a backoff.
The motivation for the backoff changes is that unicast sends were completely broken with and without fixFSM (tho the original fixFSM patch looked better than what is in 1.99.1).
In the default case if we were in WAITAIFS because our ack timed out, and we receive a unicast packet, then when we send the ack we would reset our state and go to IDLE. IDLE would then try to send the current packet but it would begin all over with a retryCount of zero. So in a busy environment the mac would get stuck and try to send a packet way too many times.
The fixFSM case was better but still had major issues. If we went to IDLE because of a scenario like the above the retry period would be invalidated which means that our original backoff would not be properly resumed.
One way to see this is to setup 20 nodes in the same broadcast domain and have each of them send traffic at higher than the channel's bitrate to a peer. Then use the gui to follow the state transitions of the mac. Doing that makes it very clear (especially with the logState changes in the patch) that the non fixFSM case is broken.
Additional Information Note that I forgot to remove fixFSM from the ned file in the attached patch.
Attached patch does three things: 1) Fixed the formatting in logState and added a log line for the current transmission (which makes it much easier to see what happens as we are trying to send a packet). 2) Added two new transitions to WAITACK to handle the case where we receive a packet that is not the ack we expected. Per the last bit in section 9.2.8 of the standard, "The recognition of anything [but the ack we expected] shall be interpreted as failure of the MPDU transmission". The PS-POLL special case is still not handled. 3) Always do the fixFSM code (so I removed the flag altogether). Fixed IDLE so that it does not invalidate the backoff if we've suspended a backoff.
The motivation for the backoff changes is that unicast sends were completely broken with and without fixFSM (tho the original fixFSM patch looked better than what is in 1.99.1).
In the default case if we were in WAITAIFS because our ack timed out, and we receive a unicast packet, then when we send the ack we would reset our state and go to IDLE. IDLE would then try to send the current packet but it would begin all over with a retryCount of zero. So in a busy environment the mac would get stuck and try to send a packet way too many times.
The fixFSM case was better but still had major issues. If we went to IDLE because of a scenario like the above the retry period would be invalidated which means that our original backoff would not be properly resumed.
One way to see this is to setup 20 nodes in the same broadcast domain and have each of them send traffic at higher than the channel's bitrate to a peer. Then use the gui to follow the state transitions of the mac. Doing that makes it very clear (especially with the logState changes in the patch) that the non fixFSM case is broken. Additional Information Note that I forgot to remove fixFSM from the ned file in the attached patch.
patch is at: http://dev.omnetpp.org/bugs/view.php?id=387