Bug 662 - the GetRequestedBandwidth() function doesn't return the correct value of BandwidthRequested
: the GetRequestedBandwidth() function doesn't return the correct value of Ban...
Status: RESOLVED FIXED
: ns-3
wimax
: pre-release
: PC Linux
: P3 normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-08-14 07:05 EDT by
Modified: 2009-10-16 09:37 EDT (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-08-14 07:05:18 EDT
In uplink-scheduler.cc there are those lines code 
   454     uint32_t requiredBandwidth = record->GetRequestedBandwidth()

   455         - record->GetGrantedBandwidth();


to calculate the bandwidth required by the service flows.
The problem is that the value that GetRequestedBandwidth() returned isn't
correct.

I have printed its value befor the sending and after the reception of the
BandwidthRequest Messages.
An example are following written:

SS (Basic CID: 8) scheduling bandwidth request, bandwidth requested: 432 bytes,
service: rtPS, CID: 43521, SFID: 107
        GP_DEBUG: SendBandwidthRequest
                SetBr(bytesToRequest) = 432
                GetBr() = 432
ServiceFlowManager: enqueuing packet
SS (Basic CID: 8) sending burst, SFID: 107, pkts sent: 1, pkts rcvd: 0, bytes
sent: 6, bytes rcvd: 0
        GP_DEBUG: DoReceive MacHeaderType::HEADER_TYPE_BANDWIDTH
                GetBr() = 65712
        GP_DEBUG: ProcessBandwidthRequest
                GetBr() = 65712

In this example the SS requires 432 bytes but in the BandwidthRequest Messages,
received by BS, the requestedBandwidth is equal to 65712.
------- Comment #1 From 2009-10-02 02:44:03 EDT -------
Cannot be P1 and block ns-3.6 if not in ns-3.6
------- Comment #2 From 2009-10-16 09:37:01 EDT -------
Fixed in changeset:4567:1310f75a1e62
The problem was related to the serialize function of the bandwidthRequest
header