[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[manet] FYI: Bug in ns-2 implementation of MAC802.11 still exists in 2.27
May be most of you are aware of this but nevertheless...
This bug concerns the following part of code in mac-802_11.cc (taken from
version 2.27, and present in 2.26).
In void Mac802_11::recvACK(Packet *p)
/*
* The successful reception of this ACK packet implies
* that our DATA transmission was successful. Hence,
* we can reset the Short/Long Retry Count and the CW.
*
* need to check the size of the packet we sent that's being
* ACK'd, not the size of the ACK packet.
*/
if((u_int32_t) HDR_CMN(pktTx_)->size() <= macmib_.getRTSThreshold())
ssrc_ = 0;
else
slrc_ = 0;
rst_cw();
Packet::free(pktTx_); pktTx_ = 0;
/*
* Backoff before sending again.
*/
On reception of MAC level ACK the condition in "if" is always false, resulting
in not reseting the Short Retry Counter (ssrc_). With every retransmission of
an RTS ssrc_ keeps on increasing even if previous packet was transmitted
successfuly. After 7 retransmissions (for different packets actually) an
unecessary data packet drop occurs with the reason
DROP_MAC_RETRY_COUNT_EXCEEDED. For MANET experiments this will result in lower
packet delivery ratio in experiments with large number of nodes/connections.
This bug was reported in December 2003 (see
http://mailman.isi.edu/pipermail/ns-users/2003-December/038074.html), but still
exists in version 2.27.
One can fix this problem by modifying "if" as follows.
if((u_int32_t) HDR_CMN(pktTx_)->size() <= macmib_.getRTSThreshold())
//report on erroneous ACK
else
{
ssrc_ = 0;
slrc_ = 0;
}
PS: The problem is really observable with even three nodes in a row where two
TCP connections are initiated from the central node to other two nodes. In such
a lightwieght scenario MAC should not drop data packets at all.
PPS: another useful fix:
http://www.tkt.cs.tut.fi/research/daci/ra_protocols_ns2fix.html
--
Evgeny Osipov, Tekn.Lic.
E-mail: Evgeny.Osipov at unibas.ch
Tel. +46(70)738 42 50
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
manet mailing list
manet at ietf.org
https://www1.ietf.org/mailman/listinfo/manet