hello, every one when i read the XCP code in ns2.30, i have two question: i)as to the WRR queue schedule method in xcp.cc, i think the router would serve all the queue in the same way no matter what was the queue's weight; the qToDq_'s value was just 0 1 2 and turn round; the weight didn't work;but in ns manual it say the XCP router would serve XCP queue and TCP queue in default. did i make mistake? int XCPWrapQ::queueToDeque() { int i = 0;
if (wrrTemp_[qToDq_] <= 0) { qToDq_ = ((qToDq_ + 1) % MAX_QNUM); wrrTemp_[qToDq_] = queueWeight_[qToDq_] - 1; } else { wrrTemp_[qToDq_] = wrrTemp_[qToDq_] -1; } while ((i < MAX_QNUM) && (q_[qToDq_]->length() == 0)) { wrrTemp_[qToDq_] = 0; qToDq_ = ((qToDq_ + 1) % MAX_QNUM); wrrTemp_[qToDq_] = queueWeight_[qToDq_] - 1; i++; } return (qToDq_); } ii)when the XCP end system initial the congestion header, it just define the MAX_THROUGHPUT to a constant value, it was different from the draft-falk-xcp-spec-02; did it mean the delta_throughput_'s value is not important, the router will change it anyway? void XcpEndsys::send(Packet *p, int datalen) { ...... if (xh->xcp_enabled_) { #define MAX_THROUGHPUT 1e24 if (srtt_estimate_ != 0) { tput = tcp_->window() * tcp_->size_ / srtt_estimate_; xh->x_ = srtt_estimate_/tcp_->window(); xh->delta_throughput_ = (MAX_THROUGHPUT - tput); } else { //XXX can do xh->xcp_enabled_ = hdr_xcp::XCP_DISABLED; xh->x_ = 0; xh->delta_throughput_ = 0; } } ........ } best regards.