Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
ipsec: increment no-tunnel counter in ipsec-tun-input
[vpp.git]
/
test
/
test_qos.py
diff --git
a/test/test_qos.py
b/test/test_qos.py
index
149a9eb
..
02941a1
100644
(file)
--- a/
test/test_qos.py
+++ b/
test/test_qos.py
@@
-1,4
+1,4
@@
-#!/usr/bin/env python
+#!/usr/bin/env python
3
import unittest
import unittest
@@
-515,15
+515,27
@@
class TestQOS(VppTestCase):
UDP(sport=1234, dport=1234) /
Raw(scapy.compat.chb(100) * NUM_PKTS))
UDP(sport=1234, dport=1234) /
Raw(scapy.compat.chb(100) * NUM_PKTS))
+ p_v3 = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) /
+ Dot1Q(vlan=11, prio=1, id=1) /
+ IP(src="1.1.1.1", dst="10.0.0.2", tos=2) /
+ UDP(sport=1234, dport=1234) /
+ Raw(scapy.compat.chb(100) * NUM_PKTS))
+
rx = self.send_and_expect(self.pg1, p_v2 * NUM_PKTS, self.pg0)
for p in rx:
rx = self.send_and_expect(self.pg1, p_v2 * NUM_PKTS, self.pg0)
for p in rx:
- self.assertEqual(p[Dot1Q].prio, 6)
+ self.assertEqual(p[Dot1Q].prio, 7)
+ self.assertEqual(p[Dot1Q].id, 0)
+
+ rx = self.send_and_expect(self.pg0, p_v3 * NUM_PKTS, self.pg1)
+
+ for p in rx:
+ self.assertEqual(p[IP].tos, 252)
rx = self.send_and_expect(self.pg0, p_v1 * NUM_PKTS, self.pg1)
for p in rx:
rx = self.send_and_expect(self.pg0, p_v1 * NUM_PKTS, self.pg1)
for p in rx:
- self.assertEqual(p[IP].tos, 25
4
)
+ self.assertEqual(p[IP].tos, 25
3
)
p_v1 = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) /
Dot1Q(vlan=11, prio=2) /
p_v1 = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) /
Dot1Q(vlan=11, prio=2) /
@@
-539,12
+551,13
@@
class TestQOS(VppTestCase):
rx = self.send_and_expect(self.pg1, p_v2 * NUM_PKTS, self.pg0)
for p in rx:
rx = self.send_and_expect(self.pg1, p_v2 * NUM_PKTS, self.pg0)
for p in rx:
- self.assertEqual(p[Dot1Q].prio, 6)
+ self.assertEqual(p[Dot1Q].prio, 7)
+ self.assertEqual(p[Dot1Q].id, 0)
rx = self.send_and_expect(self.pg0, p_v1 * NUM_PKTS, self.pg1)
for p in rx:
rx = self.send_and_expect(self.pg0, p_v1 * NUM_PKTS, self.pg1)
for p in rx:
- self.assertEqual(p[IPv6].tc, 25
3
)
+ self.assertEqual(p[IPv6].tc, 25
1
)
#
# cleanup
#
# cleanup