Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4947)

Issue 318310043: wifi: Make WifiMacQueue a subclass of Queue

Can't Edit
Can't Publish+Mail
Start Review
Created:
7 years, 3 months ago by Stefano Avallone
Modified:
7 years, 2 months ago
CC:
ns-3-reviews_googlegroups.com
Visibility:
Public.

Description

Being a subclass of Queue, WifiMacQueue gains the ability to trace enqueues, dequeues, and drops. The Cleanup() method has been removed by adopting the following strategy. Keep in mind that packets are timestamped when inserted in the queue, so packets are already sorted by increasing timestamp (from head to tail). When a dequeue or peek operation is requested, packets are processed one-by-one (starting from the head of the queue) until a packet is found that satisfies the requested conditions (e.g., tid and address) and whose time-to-live is not expired yet. Processed packets whose time-to-live is expired are clearly dropped. Given that packets are sorted by increasing timestamp and the time-to-live of the returned packet (if any) is not expired, we manage to remove all the expired packets from the queue. This comes at no additional cost (we necessarily have to walk the list until we find the packet to be returned). When packets are enqueued, just the oldest item (the one at the head of the tail) is processed. If its timer is expired, it is removed so as to make room for the new packet.

Patch Set 1 #

Patch Set 2 : Rebased on top of the recent wifi refactoring #

Unified diffs Side-by-side diffs Delta from patch set Stats (+543 lines, -439 lines) Patch
M src/test/ns3wifi/wifi-ac-mapping-test-suite.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/wifi/model/dca-txop.cc View 1 6 chunks +10 lines, -7 lines 0 comments Download
M src/wifi/model/edca-txop-n.cc View 1 17 chunks +68 lines, -41 lines 0 comments Download
M src/wifi/model/mac-low.cc View 1 18 chunks +56 lines, -29 lines 0 comments Download
M src/wifi/model/wifi-mac-queue.h View 1 7 chunks +151 lines, -146 lines 0 comments Download
M src/wifi/model/wifi-mac-queue.cc View 3 chunks +232 lines, -192 lines 0 comments Download
M src/wifi/test/wifi-aggregation-test.cc View 1 7 chunks +24 lines, -22 lines 0 comments Download

Messages

Total messages: 8
Stefano Avallone
7 years, 3 months ago (2017-01-19 23:34:59 UTC) #1
S. Deronne
Looks fine. Do we still need a timestamp since you now remove the oldest packet ...
7 years, 2 months ago (2017-02-02 10:00:38 UTC) #2
Stefano Avallone
On 2017/02/02 10:00:38, S. Deronne wrote: > Looks fine. Thanks for your review. > Do ...
7 years, 2 months ago (2017-02-02 10:08:38 UTC) #3
S. Deronne
On 2017/02/02 10:08:38, Stefano Avallone wrote: > On 2017/02/02 10:00:38, S. Deronne wrote: > > ...
7 years, 2 months ago (2017-02-02 10:10:05 UTC) #4
Stefano Avallone
On 2017/02/02 10:10:05, S. Deronne wrote: > I only see a getter, where is this ...
7 years, 2 months ago (2017-02-02 17:11:38 UTC) #5
S. Deronne
On 2017/02/02 17:11:38, Stefano Avallone wrote: > On 2017/02/02 10:10:05, S. Deronne wrote: > > ...
7 years, 2 months ago (2017-02-02 17:54:36 UTC) #6
Stefano Avallone
On 2017/02/02 17:54:36, S. Deronne wrote: > Yes I agree with that, but I expected ...
7 years, 2 months ago (2017-02-02 18:00:31 UTC) #7
S. Deronne
7 years, 2 months ago (2017-02-02 18:09:55 UTC) #8
On 2017/02/02 18:00:31, Stefano Avallone wrote:
> On 2017/02/02 17:54:36, S. Deronne wrote:
> > Yes I agree with that, but I expected this to be used in wifi mac queue.
> > But ok I agree this is better to keep the timestamp.
> 
> GetTimeStamp () is called within WifiMacQueue::TtlExceeded (), which is called
> by all the enqueue/dequeue/peek methods of WifiMacQueue.
> 
> I hope I made myself clear now.

Ok, now it is fully clear :-)
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b