[dts] [PATCH] fix bug that after enable ipv6, ipv6 address still not appear on FVL

Yong Liu yong.liu at intel.com
Tue Jul 14 07:15:41 CEST 2015


From: Marvin Liu <yong.liu at intel.com>

With i40e driver version 1.2.38, sometimes need down and up the interface to
make sure ipv6 address appear.

Signed-off-by: Marvin Liu <yong.liu at intel.com>

diff --git a/framework/dts.py b/framework/dts.py
index 40a3c42..b9cd370 100644
--- a/framework/dts.py
+++ b/framework/dts.py
@@ -258,7 +258,7 @@ def dts_crbs_init(crbInst, skip_setup, read_cache, project, base_dir, nic, virtt
 
 def dts_crbs_exit():
     """
-    Remove logger handler when exit.
+    Call dut and tester exit function after execution finished
     """
     dut.crb_exit()
     tester.crb_exit()
diff --git a/framework/net_device.py b/framework/net_device.py
index a2ccc30..6796269 100644
--- a/framework/net_device.py
+++ b/framework/net_device.py
@@ -367,6 +367,10 @@ class NetDevice(object):
         """
         self.__send_expect("sysctl net.ipv6.conf.%s.disable_ipv6=0" %
                            intf, "# ")
+        # FVL interface need down and up for re-enable ipv6
+        if self.default_driver == 'i40e':
+            self.__send_expect("ifconfig %s down" % intf, "# ")
+            self.__send_expect("ifconfig %s up" % intf, "# ")
 
     def enable_ipv6_freebsd(self, intf):
         pass
@@ -374,7 +378,7 @@ class NetDevice(object):
     @nic_has_driver
     def disable_ipv6(self):
         """
-        Enable ipv6 address of specified pci device.
+        Disable ipv6 address of specified pci device.
         """
         if self.current_driver != self.default_driver:
             return
@@ -384,7 +388,7 @@ class NetDevice(object):
 
     def disable_ipv6_linux(self, intf):
         """
-        Enable ipv6 address of specified pci device on linux.
+        Disable ipv6 address of specified pci device on linux.
         """
         self.__send_expect("sysctl net.ipv6.conf.%s.disable_ipv6=1" %
                            intf, "# ")
-- 
1.9.3



More information about the dts mailing list