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

Issue 277230044: class of service

Can't Edit
Can't Publish+Mail
Start Review
Created:
8 years, 4 months ago by Tom Henderson
Modified:
3 years, 7 months ago
CC:
ns-3-reviews_googlegroups.com
Visibility:
Public.

Description

In ns-3-dev, we do not have a way to express class of service at the application layer so that packets are prioritized in the Wi-Fi layer. This is a proposal for how to pass PIEEE802.1p class of service value from IP layer (IPv4 only right now) to Wi-Fi so that Wi-Fi access category can be set without Wi-Fi having to peek at the IP header (Wi-Fi does not have an internet module dependency). This is implemented as a tag that is passed from IP to Wi-Fi; it is stripped in most legacy NetDevice types but converted to Wi-Fi QoS tag. Thoughts on the approach in general? We now have a somewhat clumsy way to pass TOS from socket to the device-- there is a SocketIpTosTag to get this info from the socket level to Ipv4L3Protocol, then converted to a ClassOfServiceTag to get from IPv4 to Wi-Fi, then converted internal to Wi-Fi to a QosTag. Should we get rid of some, or all, of these tags (seems to me that QosTag could be retired if we just kept ClassOfService tag deeper into this device)? Tags were introduced to avoid API change between layers, but we could do it a different way (have WifiNetDevice expose a special Send() method, and use GetObject<>() at the Ipv4L3Protocol to see if the device supported that special interface). If you don't have time to look at all files, look at ipv4-l3-protocol.cc, wifi-net-device.cc, udp-client.cc, and class-of-service-tag.{cc,h} for the main modifications and example of how it is plumbed into an application. I also added proposed documentation on setting TOS to socket.h. See https://codereview.appspot.com/277570043/ for an alternative implementation.

Patch Set 1 #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+458 lines, -0 lines) Patch
M examples/wireless/wscript View 1 chunk +3 lines, -0 lines 0 comments Download
M src/applications/model/onoff-application.h View 2 chunks +17 lines, -0 lines 0 comments Download
M src/applications/model/onoff-application.cc View 4 chunks +28 lines, -0 lines 0 comments Download
M src/applications/model/udp-client.h View 1 chunk +20 lines, -0 lines 0 comments Download
M src/applications/model/udp-client.cc View 4 chunks +29 lines, -0 lines 0 comments Download
M src/bridge/model/bridge-net-device.cc View 2 chunks +6 lines, -0 lines 0 comments Download
M src/csma/model/csma-net-device.cc View 2 chunks +5 lines, -0 lines 0 comments Download
M src/fd-net-device/model/fd-net-device.cc View 2 chunks +5 lines, -0 lines 0 comments Download
M src/internet/model/ipv4-header.h View 1 chunk +5 lines, -0 lines 0 comments Download
M src/internet/model/ipv4-header.cc View 1 chunk +41 lines, -0 lines 2 comments Download
M src/internet/model/ipv4-l3-protocol.cc View 4 chunks +11 lines, -0 lines 1 comment Download
M src/lte/model/lte-enb-net-device.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M src/lte/model/lte-ue-net-device.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/mesh/model/mesh-point-device.cc View 2 chunks +6 lines, -0 lines 0 comments Download
M src/network/model/socket.h View 1 chunk +36 lines, -0 lines 3 comments Download
A src/network/utils/class-of-service-tag.h View 1 chunk +96 lines, -0 lines 1 comment Download
A src/network/utils/class-of-service-tag.cc View 1 chunk +97 lines, -0 lines 0 comments Download
M src/network/wscript View 2 chunks +2 lines, -0 lines 0 comments Download
M src/point-to-point/model/point-to-point-net-device.cc View 2 chunks +5 lines, -0 lines 0 comments Download
M src/sixlowpan/model/sixlowpan-net-device.cc View 2 chunks +5 lines, -0 lines 3 comments Download
M src/uan/model/uan-net-device.cc View 2 chunks +5 lines, -0 lines 0 comments Download
M src/virtual-net-device/model/virtual-net-device.cc View 3 chunks +7 lines, -0 lines 0 comments Download
M src/wave/model/wave-net-device.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M src/wifi/model/ap-wifi-mac.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/wifi/model/wifi-net-device.cc View 3 chunks +15 lines, -0 lines 0 comments Download
M src/wimax/model/wimax-net-device.cc View 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 8
Tommaso Pecorella
https://codereview.appspot.com/277230044/diff/1/src/internet/model/ipv4-header.cc File src/internet/model/ipv4-header.cc (right): https://codereview.appspot.com/277230044/diff/1/src/internet/model/ipv4-header.cc#newcode113 src/internet/model/ipv4-header.cc:113: Ipv4Header::DscpTypeToClassOfService (DscpType dscp) const Please add to IPv6 header ...
8 years, 4 months ago (2015-12-05 12:18:48 UTC) #1
Tom Henderson
https://codereview.appspot.com/277230044/diff/1/src/network/model/socket.h File src/network/model/socket.h (right): https://codereview.appspot.com/277230044/diff/1/src/network/model/socket.h#newcode652 src/network/model/socket.h:652: * RFC 1349 specifies the following encoding of TOS ...
8 years, 3 months ago (2015-12-28 22:57:08 UTC) #2
Tommaso Pecorella
https://codereview.appspot.com/277230044/diff/1/src/network/model/socket.h File src/network/model/socket.h (right): https://codereview.appspot.com/277230044/diff/1/src/network/model/socket.h#newcode652 src/network/model/socket.h:652: * RFC 1349 specifies the following encoding of TOS ...
8 years, 3 months ago (2015-12-29 15:23:13 UTC) #3
Tom Henderson
On 2015/12/29 15:23:13, Tommaso Pecorella wrote: > https://codereview.appspot.com/277230044/diff/1/src/network/model/socket.h > File src/network/model/socket.h (right): > > https://codereview.appspot.com/277230044/diff/1/src/network/model/socket.h#newcode652 ...
8 years, 3 months ago (2015-12-29 19:16:27 UTC) #4
Stefano Avallone
The work we are doing on the introduction of a traffic control (TC) layer might ...
8 years, 3 months ago (2016-01-04 16:17:05 UTC) #5
Stefano Avallone
https://codereview.appspot.com/277230044/diff/1/src/internet/model/ipv4-header.cc File src/internet/model/ipv4-header.cc (right): https://codereview.appspot.com/277230044/diff/1/src/internet/model/ipv4-header.cc#newcode116 src/internet/model/ipv4-header.cc:116: switch (dscp) Did you take this mapping from: https://datatracker.ietf.org/doc/draft-szigeti-tsvwg-ieee-802-11e/ ...
8 years, 3 months ago (2016-01-04 16:17:32 UTC) #6
Tom Henderson
On 2016/01/04 16:17:05, Stefano Avallone wrote: > The work we are doing on the introduction ...
8 years, 3 months ago (2016-01-04 20:57:51 UTC) #7
Tom Henderson
8 years, 3 months ago (2016-01-04 21:00:06 UTC) #8
On 2016/01/04 16:17:32, Stefano Avallone wrote:
>
https://codereview.appspot.com/277230044/diff/1/src/internet/model/ipv4-heade...
> File src/internet/model/ipv4-header.cc (right):
> 
>
https://codereview.appspot.com/277230044/diff/1/src/internet/model/ipv4-heade...
> src/internet/model/ipv4-header.cc:116: switch (dscp)
> Did you take this mapping from:
> 
> https://datatracker.ietf.org/doc/draft-szigeti-tsvwg-ieee-802-11e/  ?
> 
> Maybe it might be worth to mention this IETF draft.

I did not know about this draft; will need to review and compare.

> 
> Moreover, I think this mapping is Wifi-specific and hence it should be moved
to
> WifiNetDevice (see the text of my email).

It is broader than wifi, it is IEEE P802.1p.  See
https://en.wikipedia.org/wiki/IEEE_P802.1p

> 
>
https://codereview.appspot.com/277230044/diff/1/src/network/utils/class-of-se...
> File src/network/utils/class-of-service-tag.h (right):
> 
>
https://codereview.appspot.com/277230044/diff/1/src/network/utils/class-of-se...
> src/network/utils/class-of-service-tag.h:96: #endif /* QOS_TAG_H */
> s/QOS_TAG_H/CLASS_OF_SERVICE_TAG_H
Sign in to reply to this message.

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