Bug 2543 - fdmt-ff-mac-scheduler dead assignment and bug
fdmt-ff-mac-scheduler dead assignment and bug
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: lte
unspecified
PC Linux
: P5 minor
Assigned To: Biljana Bojović
:
: 2544 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-06 06:06 UTC by natale.patriciello
Modified: 2016-11-21 05:40 UTC (History)
2 users (show)

See Also:


Attachments
patch (1.03 KB, patch)
2016-11-06 06:06 UTC, natale.patriciello
Details | Diff
Patch including fix in all the schedulers (Biljana) (6.54 KB, patch)
2016-11-07 11:09 UTC, Biljana Bojović
Details | Diff
Patch including fix in all the schedulers (8.29 KB, patch)
2016-11-07 11:19 UTC, Biljana Bojović
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description natale.patriciello 2016-11-06 06:06:34 UTC
Created attachment 2661 [details]
patch

The patch fixes a bug in which you could store the value NO_SINR as minSinr.
Comment 1 Biljana Bojović 2016-11-07 09:20:15 UTC
*** Bug 2544 has been marked as a duplicate of this bug. ***
Comment 2 Biljana Bojović 2016-11-07 11:09:57 UTC
Created attachment 2664 [details]
Patch including fix in all the schedulers (Biljana)

Hi,

I have applied the change according to Natale's patch to all the schedulers (see schedulers_sinr.patch). I tested it and all test pass.

Natale, could you please explain why did you change sinr to be a "referenced variable"? In the patch that I did based on yours, I removed this, but I would like to confirm with you that it is ok without it.

Marco, could you please double check the patch?

If you both confirm, I think that the patch is ready to be pushed.

Cheers,
Biljana
Comment 3 Biljana Bojović 2016-11-07 11:19:50 UTC
Created attachment 2665 [details]
Patch including fix in all the schedulers


Marco, please note that I have applied the patch also for Round Robin, and this scheduler was the only one to not have NO_SINR and EstimateUlSinr function implemented, so I added to it these.
Comment 4 natale.patriciello 2016-11-07 13:25:34 UTC
(In reply to Biljana Bojović from comment #2)
> 
> Natale, could you please explain why did you change sinr to be a "referenced
> variable"? In the patch that I did based on yours, I removed this, but I
> would like to confirm with you that it is ok without it.
> 
> Marco, could you please double check the patch?

Hi Biljana,

I used a referenced variable to update also the value inside (*itCqi).second. With your patch, you're saving the estimated sinr into a temporary variable, and then (if the condition applies) into minSinr, and after that the estimated value is destroyed (leaving NO_SINR inside (*itCqi).second.at (i)). If having two distinct object is the desidered behaviour, leaving NO_SINR inside the vector, then the patch is correct; otherwise, you should use a reference, or update the value located at (*itCqi).second.at (i), after you call EstimateSinr.

Have a nice day!

Natale
Comment 5 Marco Miozzo 2016-11-08 05:38:26 UTC
A couple of comments.
The value it seems already stored within the EstimateUlSinr, line 1335: 

// store the value
(*itCqi).second.at (rb) = estimatedSinr;

Secondly, the RR was not using the Estimate, since it is using the wideband CQIs.
Comment 6 Biljana Bojović 2016-11-21 05:40:06 UTC
Natale, thanks for reporting and suggesting the patch.
Marco, thanks for revising the patch and suggesting the final version.

The final patch is pushed into the changeset: 12415:37d38dd860e0