test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] framework: add config option for vfio noiommu mode
@ 2017-08-09  6:32 Jianbo Liu
  2017-08-09  9:07 ` Liu, Yong
  2017-08-10 10:11 ` Liu, Yong
  0 siblings, 2 replies; 5+ messages in thread
From: Jianbo Liu @ 2017-08-09  6:32 UTC (permalink / raw)
  To: dts, herbert.guan; +Cc: Jianbo Liu

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
---
 framework/dts.py          |  9 +++++++++
 framework/project_dpdk.py | 30 +++++++++++++++++++++++++++++-
 framework/settings.py     |  1 +
 tools/setup.py            |  2 +-
 4 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/framework/dts.py b/framework/dts.py
index c821fc1..931bf38 100644
--- a/framework/dts.py
+++ b/framework/dts.py
@@ -81,6 +81,14 @@ def dts_parse_param(config, section):
     parameters = config.get(section, 'parameters').split(':')
     drivername = config.get(section, 'drivername').split('=')[-1]
 
+    driver = drivername.split(':')
+    if len(driver) == 2:
+        drivername = driver[0]
+        drivermode = driver[1]
+        settings.save_global_setting(settings.HOST_DRIVER_MODE_SETTING, drivermode)
+    else:
+        drivername = driver[0]
+
     settings.save_global_setting(settings.HOST_DRIVER_SETTING, drivername)
 
     paramDict = dict()
@@ -373,6 +381,7 @@ def dts_run_target(duts, tester, targets, test_suites):
     for dutobj in duts:
         dutobj.stop_ports()
         dutobj.restore_interfaces()
+        dutobj.restore_modules()
 
 
 def dts_run_suite(duts, tester, test_suites, target):
diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py
index b9a6d4a..402ac8d 100644
--- a/framework/project_dpdk.py
+++ b/framework/project_dpdk.py
@@ -33,7 +33,7 @@ import os
 import re
 
 from settings import NICS, load_global_setting, accepted_nic
-from settings import DPDK_RXMODE_SETTING, HOST_DRIVER_SETTING
+from settings import DPDK_RXMODE_SETTING, HOST_DRIVER_SETTING, HOST_DRIVER_MODE_SETTING
 from ssh_connection import SSHConnection
 from crb import Crb
 from dut import Dut
@@ -104,6 +104,11 @@ class DPDKdut(Dut):
             self.send_expect("modprobe vfio-pci", "#", 70)
             out = self.send_expect("lsmod | grep vfio_iommu_type1", "#")
             assert ("vfio_iommu_type1" in out), "Failed to setup vfio-pci"
+
+            drivermode = load_global_setting(HOST_DRIVER_MODE_SETTING)
+            if drivermode == "noiommu":
+                self.send_expect("echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode", "#", 70)
+
         else:
             self.send_expect("modprobe uio", "#", 70)
             out = self.send_expect("lsmod | grep igb_uio", "#")
@@ -130,6 +135,29 @@ class DPDKdut(Dut):
         out = self.send_expect("kldstat", "#")
         assert ("nic_uio" in out), "Failed to insmod nic_uio"
 
+    def restore_modules(self):
+        """
+        Restore DPDK kernel module on DUT.
+        """
+        restore_modules = getattr(self, 'restore_modules_%s' % self.get_os_type())
+        restore_modules()
+
+    def restore_modules_linux(self):
+        """
+        Restore DPDK Linux kernel module on DUT.
+        """
+        drivername = load_global_setting(HOST_DRIVER_SETTING)
+        if drivername == "vfio-pci":
+            drivermode = load_global_setting(HOST_DRIVER_MODE_SETTING)
+            if drivermode == "noiommu":
+                self.send_expect("echo 0 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode", "#", 70)
+
+    def restore_modules_freebsd(self):
+        """
+        Restore DPDK Freebsd kernel module on DUT.
+        """
+        pass
+
     def set_rxtx_mode(self):
         """
         Set default RX/TX PMD function,
diff --git a/framework/settings.py b/framework/settings.py
index d306de2..e5b7746 100644
--- a/framework/settings.py
+++ b/framework/settings.py
@@ -204,6 +204,7 @@ DTS_ENV_PAT = r"DTS_*"
 PERF_SETTING = "DTS_PERF_ONLY"
 FUNC_SETTING = "DTS_FUNC_ONLY"
 HOST_DRIVER_SETTING = "DTS_HOST_DRIVER"
+HOST_DRIVER_MODE_SETTING = "DTS_HOST_DRIVER_MODE"
 HOST_NIC_SETTING = "DTS_HOST_NIC"
 DEBUG_SETTING = "DTS_DEBUG_ENABLE"
 DEBUG_CASE_SETTING = "DTS_DEBUGCASE_ENABLE"
diff --git a/tools/setup.py b/tools/setup.py
index 9fcd70e..c6c72bc 100755
--- a/tools/setup.py
+++ b/tools/setup.py
@@ -280,7 +280,7 @@ def config_execution():
     driver_option = {'prompt': 'Choose one of them',
                      'type': 'choice',
                      'help': 'Choose one of dpdk support driver',
-                     'options': ['igb_uio', 'vfio-pci'],
+                     'options': ['igb_uio', 'vfio-pci', 'vfio-pci:noiommu'],
                      'default': '0'}
     opt = Option(**driver_option)
     driver_name = opt.parse_input()
-- 
1.9.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dts] [PATCH] framework: add config option for vfio noiommu mode
  2017-08-09  6:32 [dts] [PATCH] framework: add config option for vfio noiommu mode Jianbo Liu
@ 2017-08-09  9:07 ` Liu, Yong
  2017-08-09  9:43   ` Jianbo Liu
  2017-08-10 10:11 ` Liu, Yong
  1 sibling, 1 reply; 5+ messages in thread
From: Liu, Yong @ 2017-08-09  9:07 UTC (permalink / raw)
  To: Jianbo Liu, dts, herbert.guan

Hi Jianbo,
I am curious about your environment, what kind of environment you're using and required for NOIMMU mode?

Thanks,
Marvin

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jianbo Liu
> Sent: Wednesday, August 09, 2017 2:32 PM
> To: dts@dpdk.org; herbert.guan@arm.com
> Cc: Jianbo Liu <jianbo.liu@linaro.org>
> Subject: [dts] [PATCH] framework: add config option for vfio noiommu mode
> 
> Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
> ---
>  framework/dts.py          |  9 +++++++++
>  framework/project_dpdk.py | 30 +++++++++++++++++++++++++++++-
>  framework/settings.py     |  1 +
>  tools/setup.py            |  2 +-
>  4 files changed, 40 insertions(+), 2 deletions(-)
> 
> diff --git a/framework/dts.py b/framework/dts.py
> index c821fc1..931bf38 100644
> --- a/framework/dts.py
> +++ b/framework/dts.py
> @@ -81,6 +81,14 @@ def dts_parse_param(config, section):
>      parameters = config.get(section, 'parameters').split(':')
>      drivername = config.get(section, 'drivername').split('=')[-1]
> 
> +    driver = drivername.split(':')
> +    if len(driver) == 2:
> +        drivername = driver[0]
> +        drivermode = driver[1]
> +        settings.save_global_setting(settings.HOST_DRIVER_MODE_SETTING,
> drivermode)
> +    else:
> +        drivername = driver[0]
> +
>      settings.save_global_setting(settings.HOST_DRIVER_SETTING, drivername)
> 
>      paramDict = dict()
> @@ -373,6 +381,7 @@ def dts_run_target(duts, tester, targets, test_suites):
>      for dutobj in duts:
>          dutobj.stop_ports()
>          dutobj.restore_interfaces()
> +        dutobj.restore_modules()
> 
> 
>  def dts_run_suite(duts, tester, test_suites, target):
> diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py
> index b9a6d4a..402ac8d 100644
> --- a/framework/project_dpdk.py
> +++ b/framework/project_dpdk.py
> @@ -33,7 +33,7 @@ import os
>  import re
> 
>  from settings import NICS, load_global_setting, accepted_nic
> -from settings import DPDK_RXMODE_SETTING, HOST_DRIVER_SETTING
> +from settings import DPDK_RXMODE_SETTING, HOST_DRIVER_SETTING,
> HOST_DRIVER_MODE_SETTING
>  from ssh_connection import SSHConnection
>  from crb import Crb
>  from dut import Dut
> @@ -104,6 +104,11 @@ class DPDKdut(Dut):
>              self.send_expect("modprobe vfio-pci", "#", 70)
>              out = self.send_expect("lsmod | grep vfio_iommu_type1", "#")
>              assert ("vfio_iommu_type1" in out), "Failed to setup vfio-
> pci"
> +
> +            drivermode = load_global_setting(HOST_DRIVER_MODE_SETTING)
> +            if drivermode == "noiommu":
> +                self.send_expect("echo 1 >
> /sys/module/vfio/parameters/enable_unsafe_noiommu_mode", "#", 70)
> +
>          else:
>              self.send_expect("modprobe uio", "#", 70)
>              out = self.send_expect("lsmod | grep igb_uio", "#")
> @@ -130,6 +135,29 @@ class DPDKdut(Dut):
>          out = self.send_expect("kldstat", "#")
>          assert ("nic_uio" in out), "Failed to insmod nic_uio"
> 
> +    def restore_modules(self):
> +        """
> +        Restore DPDK kernel module on DUT.
> +        """
> +        restore_modules = getattr(self, 'restore_modules_%s' %
> self.get_os_type())
> +        restore_modules()
> +
> +    def restore_modules_linux(self):
> +        """
> +        Restore DPDK Linux kernel module on DUT.
> +        """
> +        drivername = load_global_setting(HOST_DRIVER_SETTING)
> +        if drivername == "vfio-pci":
> +            drivermode = load_global_setting(HOST_DRIVER_MODE_SETTING)
> +            if drivermode == "noiommu":
> +                self.send_expect("echo 0 >
> /sys/module/vfio/parameters/enable_unsafe_noiommu_mode", "#", 70)
> +
> +    def restore_modules_freebsd(self):
> +        """
> +        Restore DPDK Freebsd kernel module on DUT.
> +        """
> +        pass
> +
>      def set_rxtx_mode(self):
>          """
>          Set default RX/TX PMD function,
> diff --git a/framework/settings.py b/framework/settings.py
> index d306de2..e5b7746 100644
> --- a/framework/settings.py
> +++ b/framework/settings.py
> @@ -204,6 +204,7 @@ DTS_ENV_PAT = r"DTS_*"
>  PERF_SETTING = "DTS_PERF_ONLY"
>  FUNC_SETTING = "DTS_FUNC_ONLY"
>  HOST_DRIVER_SETTING = "DTS_HOST_DRIVER"
> +HOST_DRIVER_MODE_SETTING = "DTS_HOST_DRIVER_MODE"
>  HOST_NIC_SETTING = "DTS_HOST_NIC"
>  DEBUG_SETTING = "DTS_DEBUG_ENABLE"
>  DEBUG_CASE_SETTING = "DTS_DEBUGCASE_ENABLE"
> diff --git a/tools/setup.py b/tools/setup.py
> index 9fcd70e..c6c72bc 100755
> --- a/tools/setup.py
> +++ b/tools/setup.py
> @@ -280,7 +280,7 @@ def config_execution():
>      driver_option = {'prompt': 'Choose one of them',
>                       'type': 'choice',
>                       'help': 'Choose one of dpdk support driver',
> -                     'options': ['igb_uio', 'vfio-pci'],
> +                     'options': ['igb_uio', 'vfio-pci', 'vfio-
> pci:noiommu'],
>                       'default': '0'}
>      opt = Option(**driver_option)
>      driver_name = opt.parse_input()
> --
> 1.9.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dts] [PATCH] framework: add config option for vfio noiommu mode
  2017-08-09  9:07 ` Liu, Yong
@ 2017-08-09  9:43   ` Jianbo Liu
  2017-08-10  1:30     ` Liu, Yong
  0 siblings, 1 reply; 5+ messages in thread
From: Jianbo Liu @ 2017-08-09  9:43 UTC (permalink / raw)
  To: Liu, Yong; +Cc: dts, herbert.guan

Hi Marvin,
It's for some arm64 platforms which do not support IOMMU.
And it's also can be a temp solution for the device inside VM without vIOMMU.

Thanks!
Jianbo

On 9 August 2017 at 17:07, Liu, Yong <yong.liu@intel.com> wrote:
> Hi Jianbo,
> I am curious about your environment, what kind of environment you're using and required for NOIMMU mode?
>
> Thanks,
> Marvin
>
>> -----Original Message-----
>> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jianbo Liu
>> Sent: Wednesday, August 09, 2017 2:32 PM
>> To: dts@dpdk.org; herbert.guan@arm.com
>> Cc: Jianbo Liu <jianbo.liu@linaro.org>
>> Subject: [dts] [PATCH] framework: add config option for vfio noiommu mode
>>
>> Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
>> ---
>>  framework/dts.py          |  9 +++++++++
>>  framework/project_dpdk.py | 30 +++++++++++++++++++++++++++++-
>>  framework/settings.py     |  1 +
>>  tools/setup.py            |  2 +-
>>  4 files changed, 40 insertions(+), 2 deletions(-)
>>
>> diff --git a/framework/dts.py b/framework/dts.py
>> index c821fc1..931bf38 100644
>> --- a/framework/dts.py
>> +++ b/framework/dts.py
>> @@ -81,6 +81,14 @@ def dts_parse_param(config, section):
>>      parameters = config.get(section, 'parameters').split(':')
>>      drivername = config.get(section, 'drivername').split('=')[-1]
>>
>> +    driver = drivername.split(':')
>> +    if len(driver) == 2:
>> +        drivername = driver[0]
>> +        drivermode = driver[1]
>> +        settings.save_global_setting(settings.HOST_DRIVER_MODE_SETTING,
>> drivermode)
>> +    else:
>> +        drivername = driver[0]
>> +
>>      settings.save_global_setting(settings.HOST_DRIVER_SETTING, drivername)
>>
>>      paramDict = dict()
>> @@ -373,6 +381,7 @@ def dts_run_target(duts, tester, targets, test_suites):
>>      for dutobj in duts:
>>          dutobj.stop_ports()
>>          dutobj.restore_interfaces()
>> +        dutobj.restore_modules()
>>
>>
>>  def dts_run_suite(duts, tester, test_suites, target):
>> diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py
>> index b9a6d4a..402ac8d 100644
>> --- a/framework/project_dpdk.py
>> +++ b/framework/project_dpdk.py
>> @@ -33,7 +33,7 @@ import os
>>  import re
>>
>>  from settings import NICS, load_global_setting, accepted_nic
>> -from settings import DPDK_RXMODE_SETTING, HOST_DRIVER_SETTING
>> +from settings import DPDK_RXMODE_SETTING, HOST_DRIVER_SETTING,
>> HOST_DRIVER_MODE_SETTING
>>  from ssh_connection import SSHConnection
>>  from crb import Crb
>>  from dut import Dut
>> @@ -104,6 +104,11 @@ class DPDKdut(Dut):
>>              self.send_expect("modprobe vfio-pci", "#", 70)
>>              out = self.send_expect("lsmod | grep vfio_iommu_type1", "#")
>>              assert ("vfio_iommu_type1" in out), "Failed to setup vfio-
>> pci"
>> +
>> +            drivermode = load_global_setting(HOST_DRIVER_MODE_SETTING)
>> +            if drivermode == "noiommu":
>> +                self.send_expect("echo 1 >
>> /sys/module/vfio/parameters/enable_unsafe_noiommu_mode", "#", 70)
>> +
>>          else:
>>              self.send_expect("modprobe uio", "#", 70)
>>              out = self.send_expect("lsmod | grep igb_uio", "#")
>> @@ -130,6 +135,29 @@ class DPDKdut(Dut):
>>          out = self.send_expect("kldstat", "#")
>>          assert ("nic_uio" in out), "Failed to insmod nic_uio"
>>
>> +    def restore_modules(self):
>> +        """
>> +        Restore DPDK kernel module on DUT.
>> +        """
>> +        restore_modules = getattr(self, 'restore_modules_%s' %
>> self.get_os_type())
>> +        restore_modules()
>> +
>> +    def restore_modules_linux(self):
>> +        """
>> +        Restore DPDK Linux kernel module on DUT.
>> +        """
>> +        drivername = load_global_setting(HOST_DRIVER_SETTING)
>> +        if drivername == "vfio-pci":
>> +            drivermode = load_global_setting(HOST_DRIVER_MODE_SETTING)
>> +            if drivermode == "noiommu":
>> +                self.send_expect("echo 0 >
>> /sys/module/vfio/parameters/enable_unsafe_noiommu_mode", "#", 70)
>> +
>> +    def restore_modules_freebsd(self):
>> +        """
>> +        Restore DPDK Freebsd kernel module on DUT.
>> +        """
>> +        pass
>> +
>>      def set_rxtx_mode(self):
>>          """
>>          Set default RX/TX PMD function,
>> diff --git a/framework/settings.py b/framework/settings.py
>> index d306de2..e5b7746 100644
>> --- a/framework/settings.py
>> +++ b/framework/settings.py
>> @@ -204,6 +204,7 @@ DTS_ENV_PAT = r"DTS_*"
>>  PERF_SETTING = "DTS_PERF_ONLY"
>>  FUNC_SETTING = "DTS_FUNC_ONLY"
>>  HOST_DRIVER_SETTING = "DTS_HOST_DRIVER"
>> +HOST_DRIVER_MODE_SETTING = "DTS_HOST_DRIVER_MODE"
>>  HOST_NIC_SETTING = "DTS_HOST_NIC"
>>  DEBUG_SETTING = "DTS_DEBUG_ENABLE"
>>  DEBUG_CASE_SETTING = "DTS_DEBUGCASE_ENABLE"
>> diff --git a/tools/setup.py b/tools/setup.py
>> index 9fcd70e..c6c72bc 100755
>> --- a/tools/setup.py
>> +++ b/tools/setup.py
>> @@ -280,7 +280,7 @@ def config_execution():
>>      driver_option = {'prompt': 'Choose one of them',
>>                       'type': 'choice',
>>                       'help': 'Choose one of dpdk support driver',
>> -                     'options': ['igb_uio', 'vfio-pci'],
>> +                     'options': ['igb_uio', 'vfio-pci', 'vfio-
>> pci:noiommu'],
>>                       'default': '0'}
>>      opt = Option(**driver_option)
>>      driver_name = opt.parse_input()
>> --
>> 1.9.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dts] [PATCH] framework: add config option for vfio noiommu mode
  2017-08-09  9:43   ` Jianbo Liu
@ 2017-08-10  1:30     ` Liu, Yong
  0 siblings, 0 replies; 5+ messages in thread
From: Liu, Yong @ 2017-08-10  1:30 UTC (permalink / raw)
  To: Jianbo Liu; +Cc: dts, herbert.guan

Jianbo, thanks for your information. Your patch has been merged.

> -----Original Message-----
> From: Jianbo Liu [mailto:jianbo.liu@linaro.org]
> Sent: Wednesday, August 09, 2017 5:44 PM
> To: Liu, Yong <yong.liu@intel.com>
> Cc: dts@dpdk.org; herbert.guan@arm.com
> Subject: Re: [dts] [PATCH] framework: add config option for vfio noiommu
> mode
> 
> Hi Marvin,
> It's for some arm64 platforms which do not support IOMMU.
> And it's also can be a temp solution for the device inside VM without
> vIOMMU.
> 
> Thanks!
> Jianbo
> 
> On 9 August 2017 at 17:07, Liu, Yong <yong.liu@intel.com> wrote:
> > Hi Jianbo,
> > I am curious about your environment, what kind of environment you're
> using and required for NOIMMU mode?
> >
> > Thanks,
> > Marvin
> >
> >> -----Original Message-----
> >> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jianbo Liu
> >> Sent: Wednesday, August 09, 2017 2:32 PM
> >> To: dts@dpdk.org; herbert.guan@arm.com
> >> Cc: Jianbo Liu <jianbo.liu@linaro.org>
> >> Subject: [dts] [PATCH] framework: add config option for vfio noiommu
> mode
> >>
> >> Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
> >> ---
> >>  framework/dts.py          |  9 +++++++++
> >>  framework/project_dpdk.py | 30 +++++++++++++++++++++++++++++-
> >>  framework/settings.py     |  1 +
> >>  tools/setup.py            |  2 +-
> >>  4 files changed, 40 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/framework/dts.py b/framework/dts.py
> >> index c821fc1..931bf38 100644
> >> --- a/framework/dts.py
> >> +++ b/framework/dts.py
> >> @@ -81,6 +81,14 @@ def dts_parse_param(config, section):
> >>      parameters = config.get(section, 'parameters').split(':')
> >>      drivername = config.get(section, 'drivername').split('=')[-1]
> >>
> >> +    driver = drivername.split(':')
> >> +    if len(driver) == 2:
> >> +        drivername = driver[0]
> >> +        drivermode = driver[1]
> >> +        settings.save_global_setting(settings.HOST_DRIVER_MODE_SETTING,
> >> drivermode)
> >> +    else:
> >> +        drivername = driver[0]
> >> +
> >>      settings.save_global_setting(settings.HOST_DRIVER_SETTING,
> drivername)
> >>
> >>      paramDict = dict()
> >> @@ -373,6 +381,7 @@ def dts_run_target(duts, tester, targets,
> test_suites):
> >>      for dutobj in duts:
> >>          dutobj.stop_ports()
> >>          dutobj.restore_interfaces()
> >> +        dutobj.restore_modules()
> >>
> >>
> >>  def dts_run_suite(duts, tester, test_suites, target):
> >> diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py
> >> index b9a6d4a..402ac8d 100644
> >> --- a/framework/project_dpdk.py
> >> +++ b/framework/project_dpdk.py
> >> @@ -33,7 +33,7 @@ import os
> >>  import re
> >>
> >>  from settings import NICS, load_global_setting, accepted_nic
> >> -from settings import DPDK_RXMODE_SETTING, HOST_DRIVER_SETTING
> >> +from settings import DPDK_RXMODE_SETTING, HOST_DRIVER_SETTING,
> >> HOST_DRIVER_MODE_SETTING
> >>  from ssh_connection import SSHConnection
> >>  from crb import Crb
> >>  from dut import Dut
> >> @@ -104,6 +104,11 @@ class DPDKdut(Dut):
> >>              self.send_expect("modprobe vfio-pci", "#", 70)
> >>              out = self.send_expect("lsmod | grep vfio_iommu_type1",
> "#")
> >>              assert ("vfio_iommu_type1" in out), "Failed to setup vfio-
> >> pci"
> >> +
> >> +            drivermode = load_global_setting(HOST_DRIVER_MODE_SETTING)
> >> +            if drivermode == "noiommu":
> >> +                self.send_expect("echo 1 >
> >> /sys/module/vfio/parameters/enable_unsafe_noiommu_mode", "#", 70)
> >> +
> >>          else:
> >>              self.send_expect("modprobe uio", "#", 70)
> >>              out = self.send_expect("lsmod | grep igb_uio", "#")
> >> @@ -130,6 +135,29 @@ class DPDKdut(Dut):
> >>          out = self.send_expect("kldstat", "#")
> >>          assert ("nic_uio" in out), "Failed to insmod nic_uio"
> >>
> >> +    def restore_modules(self):
> >> +        """
> >> +        Restore DPDK kernel module on DUT.
> >> +        """
> >> +        restore_modules = getattr(self, 'restore_modules_%s' %
> >> self.get_os_type())
> >> +        restore_modules()
> >> +
> >> +    def restore_modules_linux(self):
> >> +        """
> >> +        Restore DPDK Linux kernel module on DUT.
> >> +        """
> >> +        drivername = load_global_setting(HOST_DRIVER_SETTING)
> >> +        if drivername == "vfio-pci":
> >> +            drivermode = load_global_setting(HOST_DRIVER_MODE_SETTING)
> >> +            if drivermode == "noiommu":
> >> +                self.send_expect("echo 0 >
> >> /sys/module/vfio/parameters/enable_unsafe_noiommu_mode", "#", 70)
> >> +
> >> +    def restore_modules_freebsd(self):
> >> +        """
> >> +        Restore DPDK Freebsd kernel module on DUT.
> >> +        """
> >> +        pass
> >> +
> >>      def set_rxtx_mode(self):
> >>          """
> >>          Set default RX/TX PMD function,
> >> diff --git a/framework/settings.py b/framework/settings.py
> >> index d306de2..e5b7746 100644
> >> --- a/framework/settings.py
> >> +++ b/framework/settings.py
> >> @@ -204,6 +204,7 @@ DTS_ENV_PAT = r"DTS_*"
> >>  PERF_SETTING = "DTS_PERF_ONLY"
> >>  FUNC_SETTING = "DTS_FUNC_ONLY"
> >>  HOST_DRIVER_SETTING = "DTS_HOST_DRIVER"
> >> +HOST_DRIVER_MODE_SETTING = "DTS_HOST_DRIVER_MODE"
> >>  HOST_NIC_SETTING = "DTS_HOST_NIC"
> >>  DEBUG_SETTING = "DTS_DEBUG_ENABLE"
> >>  DEBUG_CASE_SETTING = "DTS_DEBUGCASE_ENABLE"
> >> diff --git a/tools/setup.py b/tools/setup.py
> >> index 9fcd70e..c6c72bc 100755
> >> --- a/tools/setup.py
> >> +++ b/tools/setup.py
> >> @@ -280,7 +280,7 @@ def config_execution():
> >>      driver_option = {'prompt': 'Choose one of them',
> >>                       'type': 'choice',
> >>                       'help': 'Choose one of dpdk support driver',
> >> -                     'options': ['igb_uio', 'vfio-pci'],
> >> +                     'options': ['igb_uio', 'vfio-pci', 'vfio-
> >> pci:noiommu'],
> >>                       'default': '0'}
> >>      opt = Option(**driver_option)
> >>      driver_name = opt.parse_input()
> >> --
> >> 1.9.1
> >

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dts] [PATCH] framework: add config option for vfio noiommu mode
  2017-08-09  6:32 [dts] [PATCH] framework: add config option for vfio noiommu mode Jianbo Liu
  2017-08-09  9:07 ` Liu, Yong
@ 2017-08-10 10:11 ` Liu, Yong
  1 sibling, 0 replies; 5+ messages in thread
From: Liu, Yong @ 2017-08-10 10:11 UTC (permalink / raw)
  To: Jianbo Liu, dts, herbert.guan

Thanks, Jianbo. Applied.

On 08/09/2017 02:32 PM, Jianbo Liu wrote:
> Signed-off-by: Jianbo Liu<jianbo.liu@linaro.org>
> ---
>   framework/dts.py          |  9 +++++++++
>   framework/project_dpdk.py | 30 +++++++++++++++++++++++++++++-
>   framework/settings.py     |  1 +
>   tools/setup.py            |  2 +-
>   4 files changed, 40 insertions(+), 2 deletions(-)
>
> diff --git a/framework/dts.py b/framework/dts.py

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-10  1:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-09  6:32 [dts] [PATCH] framework: add config option for vfio noiommu mode Jianbo Liu
2017-08-09  9:07 ` Liu, Yong
2017-08-09  9:43   ` Jianbo Liu
2017-08-10  1:30     ` Liu, Yong
2017-08-10 10:11 ` Liu, Yong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).