Bug 662

Summary: the GetRequestedBandwidth() function doesn't return the correct value of BandwidthRequested
Product: ns-3 Reporter: Giuseppe Piro <peppe.piro>
Component: wimaxAssignee: Mohamed Amine ISMAIL <amine.ismail>
Status: RESOLVED FIXED    
Severity: normal CC: amine.ismail, craigdo
Priority: P3    
Version: pre-release   
Hardware: PC   
OS: Linux   

Description Giuseppe Piro 2009-08-14 07:05:18 UTC
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 Craig Dowell 2009-10-02 02:44:03 UTC
Cannot be P1 and block ns-3.6 if not in ns-3.6
Comment 2 Mohamed Amine ISMAIL 2009-10-16 09:37:01 UTC
Fixed in changeset:4567:1310f75a1e62
The problem was related to the serialize function of the bandwidthRequest header