Quality of Service

Browse source code on GitHub

Overview

The purpose of this sample is to show quality-of-service (QoS) on the ethernet layer.

Building and Running

Build like this:

west build -b <board_to_use> samples/net/qos/ethernet

This sample only works with the native simulator. After the sample starts, it fakes incoming network packets on a fake network interface and prints statistics about it.

Run with:

west build -b native_sim samples/net/qos/ethernet
west build -t run

Statistics (With Quality of Service Filtering)

c (x) := command service for priority x (high means higher priority)

e (x) := echo service for priority x (high means higher priority)

work us

c(7)

e(7)

c(6)

e(6)

c(5)

e(5)

c(4)

e(4)

c(3)

e(3)

c(2)

e(2)

c(1)

e(1)

c(0)

e(0)

800

100

100

100

100

100

100

100

100

100

100

100

100

100

100

100

100

850

100

100

100

100

100

100

100

100

100

100

100

100

100

100

99

53

900

100

100

100

100

100

100

100

100

100

100

100

100

100

100

35

0

950

100

100

100

100

100

100

100

100

100

100

100

100

100

100

2

0

1000

100

100

100

100

100

100

100

100

100

100

100

100

99

0

0

0

1100

100

100

100

100

100

100

100

100

100

100

100

100

9

0

0

0

1200

100

100

100

100

100

100

100

100

100

100

75

0

0

0

0

0

1300

100

100

100

100

100

100

100

100

100

100

10

0

0

0

0

0

1400

100

100

100

100

100

100

100

100

99

29

0

0

0

0

0

0

1600

100

100

100

100

100

100

100

100

10

0

0

0

0

0

0

0

1800

100

100

100

100

100

100

100

11

0

0

0

0

0

0

0

0

2000

100

100

100

100

100

100

15

0

0

0

0

0

0

0

0

0

3000

100

100

100

100

12

0

0

0

0

0

0

0

0

0

0

0

4000

100

100

99

0

0

0

0

0

0

0

0

0

0

0

0

0

5000

100

100

15

0

0

0

0

0

0

0

0

0

0

0

0

0

6000

100

100

9

0

0

0

0

0

0

0

0

0

0

0

0

0

7000

100

85

0

0

0

0

0

0

0

0

0

0

0

0

0

0

8000

100

49

0

0

0

0

0

0

0

0

0

0

0

0

0

0

9000

100

22

0

0

0

0

0

0

0

0

0

0

0

0

0

0

10000

99

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

15000

44

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

Statistics (No Quality of Service Filtering)

c (x) := command service for priority x (high means higher priority)

e (x) := echo service for priority x (high means higher priority)

work us

c(7)

e(7)

c(6)

e(6)

c(5)

e(5)

c(4)

e(4)

c(3)

e(3)

c(2)

e(2)

c(1)

e(1)

c(0)

e(0)

800

100

100

100

100

100

100

100

100

100

100

100

100

100

100

100

100

850

100

53

100

99

100

100

100

100

100

100

100

100

100

100

100

100

900

100

1

100

23

100

99

100

99

100

100

100

100

100

100

100

100

950

100

1

100

1

100

7

100

99

100

99

100

99

100

99

100

100

1000

100

1

100

1

100

1

100

1

100

98

100

99

100

99

100

99

1100

100

1

100

1

100

1

100

1

100

1

100

19

100

97

100

97

1200

100

1

100

1

100

1

100

1

100

1

100

1

100

1

100

59

1300

39

0

100

0

100

0

100

0

100

0

100

0

100

0

100

0

1400

1

0

99

0

100

0

100

0

100

0

100

0

100

0

100

0

1600

1

0

1

0

99

0

99

0

100

0

100

0

100

0

100

0

1800

1

0

1

0

12

0

99

0

99

0

100

0

100

0

100

0

2000

1

0

1

0

1

0

99

0

99

0

99

0

99

0

100

0

3000

1

0

1

0

1

0

1

0

1

0

98

0

98

0

99

0

4000

1

0

1

0

1

0

1

0

1

0

1

0

97

0

98

0

5000

1

0

1

0

1

0

1

0

1

0

1

0

96

0

97

0

6000

1

0

1

0

1

0

1

0

1

0

1

0

33

0

96

0

7000

1

0

1

0

1

0

1

0

1

0

1

0

1

0

95

0

8000

1

0

1

0

1

0

1

0

1

0

1

0

1

0

94

0

9000

1

0

1

0

1

0

1

0

1

0

1

0

1

0

93

0

10000

1

0

1

0

1

0

1

0

1

0

1

0

1

0

92

0

15000

1

0

1

0

1

0

1

0

1

0

1

0

1

0

30

0

See also

Ethernet Support Functions