dpdk: add qat gen4-b device support
[vpp.git] / test / test_srv6_ad.py
index 40cc190..2627df3 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import unittest
 import binascii
@@ -16,8 +16,6 @@ from scapy.layers.l2 import Ether, Dot1Q
 from scapy.layers.inet6 import IPv6, UDP, IPv6ExtHdrSegmentRouting
 from scapy.layers.inet import IP, UDP
 
-from scapy.utils import inet_pton, inet_ntop
-
 from util import ppp
 
 
@@ -28,6 +26,10 @@ class TestSRv6(VppTestCase):
     def setUpClass(self):
         super(TestSRv6, self).setUpClass()
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestSRv6, cls).tearDownClass()
+
     def setUp(self):
         """ Perform test setup before each test case.
         """
@@ -113,7 +115,7 @@ class TestSRv6(VppTestCase):
         if any(ipv6):
             self.logger.debug(self.vapi.cli("show ip6 neighbors"))
         if any(ipv4):
-            self.logger.debug(self.vapi.cli("show ip arp"))
+            self.logger.debug(self.vapi.cli("show ip4 neighbors"))
         self.logger.debug(self.vapi.cli("show interface"))
         self.logger.debug(self.vapi.cli("show hardware"))
 
@@ -147,8 +149,7 @@ class TestSRv6(VppTestCase):
         route = VppIpRoute(self, self.sid_list[self.test_sid_index + 1], 128,
                            [VppRoutePath(self.pg0.remote_ip6,
                                          self.pg0.sw_if_index,
-                                         proto=DpoProto.DPO_PROTO_IP6)],
-                           is_ip6=1)
+                                         proto=DpoProto.DPO_PROTO_IP6)])
         route.add_vpp_config()
 
         # configure SRv6 localSID behavior
@@ -282,8 +283,7 @@ class TestSRv6(VppTestCase):
         route = VppIpRoute(self, self.sid_list[self.test_sid_index + 1], 128,
                            [VppRoutePath(self.pg0.remote_ip6,
                                          self.pg0.sw_if_index,
-                                         proto=DpoProto.DPO_PROTO_IP6)],
-                           is_ip6=1)
+                                         proto=DpoProto.DPO_PROTO_IP6)])
         route.add_vpp_config()
 
         # configure SRv6 localSID behavior
@@ -425,8 +425,7 @@ class TestSRv6(VppTestCase):
         route = VppIpRoute(self, self.sid_list[self.test_sid_index + 1], 128,
                            [VppRoutePath(self.pg0.remote_ip6,
                                          self.pg0.sw_if_index,
-                                         proto=DpoProto.DPO_PROTO_IP6)],
-                           is_ip6=1)
+                                         proto=DpoProto.DPO_PROTO_IP6)])
         route.add_vpp_config()
 
         # configure SRv6 localSID behavior
@@ -719,7 +718,7 @@ class TestSRv6(VppTestCase):
 
         p = IPv6(src=srcaddr, dst=sidlist[segleft]) / \
             IPv6ExtHdrSegmentRouting(addresses=sidlist,
-                                     segleft=segleft, nh=59) / \
+                                     segleft=segleft, nh=143) / \
             eth
         return p