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

Issue 302880043: Introduce QoS support in Wifi (Closed)

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

Description

This is my attempt to introduce QoS support in wifi. This code review obsoletes code review 294280043. The changes can also be viewed on github: https://github.com/stavallo/ns-3-dev-git/commits/qos-wifi Here is a list of changes: - a tos field has been added to InetSockAddress. This work is basically the one presented in code review 294280043, with some changes suggested by Tom and some other added to support tcp sockets too - a SocketPriority tag has been introduced to carry the priority of a packet (what Linux stores in skb->priority). The priority of a socket can be set directly with a method of the Socket class. In case of IPv4, setting the TOS also sets the priority (see the Socket::IpTos2Priority method, which reproduces what is done by Linux). A SocketPriority tag is attached to the packet by UDP and TCP sockets in case the priority is not null. Since the priority must be used by netdevices, too, the SocketPriority tag is removed by the remote endpoint of the socket. Like Linux, if the packet is forwarded, the SocketPriority tag is updated based on the TOS field of the packet (in case of IPv4). - The Socket::IsManualIpTos method is removed as it can be replaced by the Socket::GetIpTos method: a SocketIpTos tag is only added if the tos is not null. Given the changes above, I believe that allowing Ipv4L3Protocol to set a default TOS value makes no sense anymore and hence I removed the DefaultTos attribute - before enqueuing a packet into a queue disc, the Traffic Control layer has to determine the netdevice queue in which the packet will be enqueued. To this purpose, multi-queue devices can register a select queue callback. One of the commits makes a little change here, i.e., the callback is stored by the traffic control layer itself so that the tc layer can directly invoke the callback (as opposed to the current situation where the callback is stored by the netdevice queue interface, hence the tc layer calls a netdevice queue interface method which invokes the callback). This change also allows the possibility to handle the future case of multi-queue devices that do not set a select queue callback, in which case the tc layer has to select a queue by means of a hash function. - the function used by the Linux wireless stack to select the netdevice queue (i.e., the access category) makes use of the DS field (ToS for IPv4, Traffic class for IPv6). To this end, a GetUint8Value method is added to the QueueItem class, which allows to get the correct content of the DS field, if any, thanks to the specialization of QueueDiscItem in Ipv4QueueDiscItem and Ipv6QueueDiscItem - finally, the WifiNetDevice::SelectQueue is added, which returns the Access Category based on the DS field of the packet (again, as Linux does). This function modifies the priority of the packet. Such priority turns out to be the user priority defined in 802.11 and hence the SocketPriority tag can replace the QosTag (there is also a commit which completely removes the QosTag). Some new methods could be avoided if RegularWifiMac::GetQosSupported was public instead of protected.

Patch Set 1 #

Total comments: 1

Patch Set 2 : Address comments #

Total comments: 1

Patch Set 3 : Address further comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1254 lines, -874 lines) Patch
M doc/models/source/internet-models.rst View 1 1 chunk +1 line, -1 line 0 comments Download
M examples/tcp/tcp-variants-comparison.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M src/internet/model/ipv4-l3-protocol.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/internet/model/ipv4-l3-protocol.cc View 1 3 chunks +12 lines, -7 lines 0 comments Download
M src/internet/model/ipv4-packet-filter.h View 1 1 chunk +0 lines, -117 lines 0 comments Download
M src/internet/model/ipv4-packet-filter.cc View 1 1 chunk +0 lines, -132 lines 0 comments Download
M src/internet/model/ipv4-queue-disc-item.h View 1 chunk +9 lines, -0 lines 0 comments Download
M src/internet/model/ipv4-queue-disc-item.cc View 1 chunk +16 lines, -0 lines 0 comments Download
M src/internet/model/ipv6-l3-protocol.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/internet/model/ipv6-packet-filter.h View 1 1 chunk +0 lines, -59 lines 0 comments Download
M src/internet/model/ipv6-packet-filter.cc View 1 1 chunk +0 lines, -82 lines 0 comments Download
M src/internet/model/ipv6-queue-disc-item.h View 1 chunk +9 lines, -0 lines 0 comments Download
M src/internet/model/ipv6-queue-disc-item.cc View 1 chunk +16 lines, -0 lines 0 comments Download
M src/internet/model/tcp-socket-base.h View 1 chunk +9 lines, -0 lines 0 comments Download
M src/internet/model/tcp-socket-base.cc View 1 7 chunks +24 lines, -2 lines 0 comments Download
M src/internet/model/udp-socket-impl.h View 2 chunks +17 lines, -1 line 0 comments Download
M src/internet/model/udp-socket-impl.cc View 1 11 chunks +38 lines, -8 lines 0 comments Download
M src/internet/test/pfifo-fast-queue-disc-test-suite.cc View 1 13 chunks +63 lines, -88 lines 0 comments Download
M src/internet/test/tcp-general-test.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/internet/test/udp-test.cc View 1 12 chunks +90 lines, -21 lines 0 comments Download
M src/mesh/model/mesh-wifi-interface-mac.cc View 3 chunks +7 lines, -5 lines 0 comments Download
M src/network/doc/sockets-api.rst View 1 1 chunk +76 lines, -1 line 0 comments Download
M src/network/model/net-device.h View 1 2 3 chunks +26 lines, -11 lines 0 comments Download
M src/network/model/net-device.cc View 1 2 3 chunks +10 lines, -8 lines 0 comments Download
M src/network/model/socket.h View 1 5 chunks +164 lines, -11 lines 0 comments Download
M src/network/model/socket.cc View 5 chunks +122 lines, -9 lines 0 comments Download
M src/network/utils/inet-socket-address.h View 3 chunks +9 lines, -0 lines 0 comments Download
M src/network/utils/inet-socket-address.cc View 4 chunks +32 lines, -11 lines 0 comments Download
M src/network/utils/packet-socket.cc View 1 2 chunks +11 lines, -0 lines 0 comments Download
M src/network/utils/packet-socket-client.h View 1 2 3 chunks +13 lines, -0 lines 0 comments Download
M src/network/utils/packet-socket-client.cc View 1 2 3 chunks +27 lines, -0 lines 0 comments Download
M src/test/adaptive-red-queue-disc-test-suite.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
A src/test/ns3wifi/wifi-ac-mapping-test-suite.cc View 1 chunk +210 lines, -0 lines 0 comments Download
M src/test/wscript View 1 chunk +1 line, -0 lines 0 comments Download
M src/traffic-control/doc/pfifo-fast.rst View 1 2 chunks +27 lines, -12 lines 0 comments Download
M src/traffic-control/examples/adaptive-red-tests.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M src/traffic-control/examples/codel-vs-pfifo-asymmetric.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M src/traffic-control/examples/codel-vs-pfifo-basic-test.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M src/traffic-control/examples/red-tests.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M src/traffic-control/helper/traffic-control-helper.cc View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/traffic-control/model/pfifo-fast-queue-disc.h View 1 3 chunks +7 lines, -10 lines 0 comments Download
M src/traffic-control/model/pfifo-fast-queue-disc.cc View 1 4 chunks +11 lines, -17 lines 0 comments Download
M src/traffic-control/model/queue-disc.cc View 1 2 3 chunks +8 lines, -1 line 0 comments Download
M src/traffic-control/model/traffic-control-layer.h View 2 chunks +4 lines, -0 lines 0 comments Download
M src/traffic-control/model/traffic-control-layer.cc View 1 2 6 chunks +30 lines, -6 lines 0 comments Download
M src/wave/model/ocb-wifi-mac.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/wave/model/vsa-manager.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M src/wave/model/wave-net-device.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M src/wifi/doc/source/wifi-user.rst View 1 1 chunk +19 lines, -5 lines 0 comments Download
M src/wifi/model/adhoc-wifi-mac.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/wifi/model/ap-wifi-mac.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/wifi/model/mac-low.cc View 1 2 chunks +4 lines, -0 lines 0 comments Download
D src/wifi/model/qos-tag.h View 1 chunk +0 lines, -118 lines 0 comments Download
D src/wifi/model/qos-tag.cc View 1 chunk +0 lines, -101 lines 0 comments Download
M src/wifi/model/qos-utils.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M src/wifi/model/sta-wifi-mac.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/wifi/model/wifi-net-device.h View 2 chunks +41 lines, -0 lines 0 comments Download
M src/wifi/model/wifi-net-device.cc View 1 2 4 chunks +72 lines, -1 line 0 comments Download
M src/wifi/wscript View 2 chunks +0 lines, -2 lines 0 comments Download

Messages

Total messages: 26
Stefano Avallone
Just to let you know that I added another commit to the series (published on ...
7 years, 10 months ago (2016-07-01 13:45:56 UTC) #1
S. Deronne
Is it planned to be delivered in the mainstream in the coming days? I would ...
7 years, 10 months ago (2016-07-02 09:27:54 UTC) #2
Stefano Avallone
On 2016/07/02 09:27:54, S. Deronne wrote: > Is it planned to be delivered in the ...
7 years, 10 months ago (2016-07-02 11:02:33 UTC) #3
Tom Henderson
I will review the rest of the code as soon as possible, but I have ...
7 years, 10 months ago (2016-07-02 15:49:05 UTC) #4
Stefano Avallone
On 2016/07/02 15:49:05, Tom Henderson wrote: > I will review the rest of the code ...
7 years, 10 months ago (2016-07-02 17:12:16 UTC) #5
Tom Henderson
On 2016/07/02 17:12:16, Stefano Avallone wrote: > On 2016/07/02 15:49:05, Tom Henderson wrote: > > ...
7 years, 9 months ago (2016-07-06 04:55:37 UTC) #6
Tom Henderson
I didn't really spot any points for discussion (only one comment). To finish off, I ...
7 years, 9 months ago (2016-07-06 04:58:56 UTC) #7
S. Deronne
Looks ok, I do not have comments, just as mentioned Tom documentation should be extended.
7 years, 9 months ago (2016-07-06 20:22:11 UTC) #8
Stefano Avallone
Thanks for reviewing this work. Here is a second version, which differs from the previous ...
7 years, 9 months ago (2016-07-07 17:00:33 UTC) #9
S. Deronne
On 2016/07/07 17:00:33, Stefano Avallone wrote: > Thanks for reviewing this work. Here is a ...
7 years, 9 months ago (2016-07-07 17:52:05 UTC) #10
S. Deronne
https://codereview.appspot.com/302880043/diff/20001/src/wifi/model/mac-low.cc File src/wifi/model/mac-low.cc (right): https://codereview.appspot.com/302880043/diff/20001/src/wifi/model/mac-low.cc#newcode747 src/wifi/model/mac-low.cc:747: m_currentPacket->RemovePacketTag (priorityTag); Did you check tag is also removed ...
7 years, 9 months ago (2016-07-07 17:52:29 UTC) #11
Tom Henderson
> > A final observation. We introduced a public GetTxQueuesN method both in WifiMac > ...
7 years, 9 months ago (2016-07-07 17:53:35 UTC) #12
Tom Henderson
> > - packet sockets now support adding a priority tag if the socket has ...
7 years, 9 months ago (2016-07-07 17:58:19 UTC) #13
Stefano Avallone
On 2016/07/07 17:58:19, Tom Henderson wrote: > Is there still a way to test WiFi ...
7 years, 9 months ago (2016-07-07 18:07:36 UTC) #14
Stefano Avallone
On 2016/07/07 17:53:35, Tom Henderson wrote: > On this point specifically, I think that Get/SetQosSupported ...
7 years, 9 months ago (2016-07-07 18:18:27 UTC) #15
Stefano Avallone
On 2016/07/07 17:52:29, S. Deronne wrote: > Did you check tag is also removed in ...
7 years, 9 months ago (2016-07-07 18:24:08 UTC) #16
S. Deronne
On 2016/07/07 18:24:08, Stefano Avallone wrote: > On 2016/07/07 17:52:29, S. Deronne wrote: > > ...
7 years, 9 months ago (2016-07-07 18:45:38 UTC) #17
Stefano Avallone
On 2016/07/07 18:45:38, S. Deronne wrote: > On 2016/07/07 18:24:08, Stefano Avallone wrote: > > ...
7 years, 9 months ago (2016-07-08 12:11:58 UTC) #18
Stefano Avallone
Another version to address latest comments: - removed [Regular]WifiMac::GetTxQueuesN by using the QosSupported attribute - ...
7 years, 9 months ago (2016-07-08 14:28:08 UTC) #19
S. Deronne
Thanks I'll check the PacketSocketClient. If no other comments pop up, could it be delivered ...
7 years, 9 months ago (2016-07-12 17:33:24 UTC) #20
Tom Henderson
On 2016/07/12 17:33:24, S. Deronne wrote: > Thanks I'll check the PacketSocketClient. > If no ...
7 years, 9 months ago (2016-07-12 19:10:07 UTC) #21
Stefano Avallone
On 2016/07/12 19:10:07, Tom Henderson wrote: > My only remaining comment is on IPv6. I ...
7 years, 9 months ago (2016-07-12 21:47:38 UTC) #22
Tom Henderson
On 2016/07/12 21:47:38, Stefano Avallone wrote: > On 2016/07/12 19:10:07, Tom Henderson wrote: > > ...
7 years, 9 months ago (2016-07-12 23:08:26 UTC) #23
Stefano Avallone
On 2016/07/12 23:08:26, Tom Henderson wrote: > > Well, the only way to set the ...
7 years, 9 months ago (2016-07-13 13:07:11 UTC) #24
Tom Henderson
On 2016/07/13 13:07:11, Stefano Avallone wrote: > On 2016/07/12 23:08:26, Tom Henderson wrote: > > ...
7 years, 9 months ago (2016-07-13 17:21:36 UTC) #25
Stefano Avallone
7 years, 9 months ago (2016-07-14 15:41:37 UTC) #26
On 2016/07/13 17:21:36, Tom Henderson wrote:
> I think we have enough consensus to push now.

Pushed. Thanks for reviewing this patch series!
Sign in to reply to this message.

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