|
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.
Total comments: 1
Total comments: 1
|
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
|
Total messages: 26
|