|
Bugzilla – Full Text Bug Listing |
| Summary: | MacLow shall use a single TXVECTOR for all MPDUs belonging to a same A-MPDU | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | sebastien.deronne |
| Component: | wifi | Assignee: | sebastien.deronne |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | matis18, ns-bugs |
| Priority: | P5 | ||
| Version: | pre-release | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
proposed fix to solve this bug
proposed fix to solve this bug |
||
Created attachment 2313 [details]
proposed fix to solve this bug
Fixes crashed test
The patch looks good. Couldn't be also removed the call to GetDataTxVector in MacLow::AggregateToAmpdu? The one below this comment: //VHT single MPDU operation I found an issue. When interchanging RTS/CTS before a transmission, the m_currentTxVector is updated with the TxVector of the CTS received. Then the data is sent with this TxVector. Perhaps a solution is to maintain different txVectors for send and receive. (In reply to Matías Richart from comment #3) > I found an issue. > > When interchanging RTS/CTS before a transmission, the m_currentTxVector is > updated with the TxVector of the CTS received. > Then the data is sent with this TxVector. > > Perhaps a solution is to maintain different txVectors for send and receive. Indeed, this fixes the problem. Another solution that avoids to keep both tx and rx vector is to move the setting of m_currentTxVector only when receive A-MPDUs, as follows: diff -r 53de1ea14ea5 src/wifi/model/mac-low.cc --- a/src/wifi/model/mac-low.cc Tue Mar 01 21:57:36 2016 +0100 +++ b/src/wifi/model/mac-low.cc Tue Mar 01 22:02:56 2016 +0100 @@ -2793,13 +2793,13 @@ MacLow::DeaggregateAmpduAndReceive (Ptr<Packet> aggregatedPacket, double rxSnr, WifiTxVector txVector, WifiPreamble preamble) { NS_LOG_FUNCTION (this); - m_currentTxVector = txVector; AmpduTag ampdu; bool normalAck = false; bool ampduSubframe = false; //flag indicating the packet belongs to an A-MPDU and is not a VHT single MPDU if (aggregatedPacket->RemovePacketTag (ampdu)) { ampduSubframe = true; + m_currentTxVector = txVector; MpduAggregator::DeaggregatedMpdus packets = MpduAggregator::Deaggregate (aggregatedPacket); MpduAggregator::DeaggregatedMpdusCI n = packets.begin (); For which solution do we go? (In reply to sebastien.deronne from comment #4) > (In reply to Matías Richart from comment #3) > > I found an issue. > > > > When interchanging RTS/CTS before a transmission, the m_currentTxVector is > > updated with the TxVector of the CTS received. > > Then the data is sent with this TxVector. > > > > Perhaps a solution is to maintain different txVectors for send and receive. > > Indeed, this fixes the problem. > > Another solution that avoids to keep both tx and rx vector is to move the > setting of m_currentTxVector only when receive A-MPDUs, as follows: > > diff -r 53de1ea14ea5 src/wifi/model/mac-low.cc > --- a/src/wifi/model/mac-low.cc Tue Mar 01 21:57:36 2016 +0100 > +++ b/src/wifi/model/mac-low.cc Tue Mar 01 22:02:56 2016 +0100 > @@ -2793,13 +2793,13 @@ > MacLow::DeaggregateAmpduAndReceive (Ptr<Packet> aggregatedPacket, double > rxSnr, WifiTxVector txVector, WifiPreamble preamble) > { > NS_LOG_FUNCTION (this); > - m_currentTxVector = txVector; > AmpduTag ampdu; > bool normalAck = false; > bool ampduSubframe = false; //flag indicating the packet belongs to an > A-MPDU and is not a VHT single MPDU > if (aggregatedPacket->RemovePacketTag (ampdu)) > { > ampduSubframe = true; > + m_currentTxVector = txVector; > MpduAggregator::DeaggregatedMpdus packets = > MpduAggregator::Deaggregate (aggregatedPacket); > MpduAggregator::DeaggregatedMpdusCI n = packets.begin (); > > For which solution do we go? Ok for me with your solution. changeset 11993:ea08bf94248b |
Created attachment 2312 [details] proposed fix to solve this bug GetDataTxVector is called at several places in MacLow while transmitting an A-MPDU. In case the decision of the rate manager changes within a same A-MPDU, different TXVECTORs will be used for the same A-MPDU, which is not correct. The attached patch adresses this bug.