[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Packet losses in SRM ?



Hi Syam,

you can perform the following patch: Edit srm.cc and look for the passage:


void SRMAgent::recv_data(int sender, int msgid, u_char*)
{
	Tcl& tcl = Tcl::instance();
	SRMinfo* sp = get_state(sender);
	if (msgid > sp->ldata_) {
                (void) request(sp, msgid - 1);
		sp->setReceived(msgid);
		sp->ldata_ = msgid;
        } else {
		tcl.evalf("%s recv data %d %d", name_, sender, msgid);
	}
}

This is where an SRM participant receives data packets. As you can see from 
the tcl.evalf statement, the tcl-function "recv-data" is only called for data 
packets which were previously detected as lost and for which consequently a 
request-timer was already scheduled; the timer is cancelled in the tcl 
function). This can have two reasons:

1.): The data packet arrives out-of-order wrt. other data packets
2.): The data packet was delayed so much that some request or repair packet
     with equal or higher sequence number than the data packet was received.

If you want to detect lost data packets, you should comment out the 
else-statement and log the reception of the data packet in recv-data (see 
srm.tcl file). Later, figure out from the logfile what data packets were 
received and the missing ones are your losses.


     -Chris.