Bug 2928 - BlockAckManager::NeedBarRetransmission returns "true" infinitely
BlockAckManager::NeedBarRetransmission returns "true" infinitely
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wifi
ns-3-dev
All All
: P3 normal
Assigned To: sebastien.deronne
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-06-13 11:00 EDT by Alexander Krotov
Modified: 2020-03-08 13:13 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Krotov 2018-06-13 11:00:26 EDT
I have added multiple packets to the queue, then manually deleted them.

NeedBarRetransmission checks

  if ((seqNumber + 63) < it->second.first.GetStartingSequence ())

where seqNumber is the sequence number of the statring sequence of the current block, while it->second.first.GetStartingSequence () is updated by the BlockAckManager::CleanupBuffers ().

Maybe manually removing packets is not expected, but what would happen if there are less that 64 packets in queue and they all expire? BlockAckRequest will be retried infinitely, even though there are no more packets left.

There is a comment saying

  //The standard says the BAR gets discarded when all MSDUs lifetime expires

in BlockAckManager::NeedBarRetransmission but I cannot find this in the standard.

According to "11.5.4 Error recovery upon a peer failure" there is simply a timeout after which DELBA is triggered if no Block ack is received in response to block ack requests.

Where exactly in the standard is the source of existing check?

I have also a patch for https://www.nsnam.org/bugzilla/show_bug.cgi?id=2470 applied.
Comment 1 Alexander Krotov 2018-06-13 11:38:25 EDT
I have pushed quick fix https://code.nsnam.org/index.cgi/ns-3-dev/rev/bb3ff81ea4b8 that fixes my case and should not do harm, but the first condition still looks wrong.

Need to add reference to the standard and consider the corner case when the queue becomes empty.
Comment 2 Stefano Avallone 2019-09-19 13:43:37 EDT
A proposed fix for this issue can be found here:

https://gitlab.com/stavallo/ns-3-dev/merge_requests/52
Comment 3 sebastien.deronne 2020-03-08 13:13:32 EDT
Fixed in changeset 1b96764eada39e03619a38b53a0efaa0417200d7