direct-io.hg

changeset 15514:7486ab2b6ae6

Add accel option to vif xend config.
Signed-off-by: Kieran Mansley <kmansley@solarflare.com>
author kfraser@localhost.localdomain
date Mon Jul 09 18:10:48 2007 +0100 (2007-07-09)
parents 1d1ccf6b8614
children c64a59ff9880
files tools/python/xen/xend/server/netif.py tools/python/xen/xm/create.py
line diff
     1.1 --- a/tools/python/xen/xend/server/netif.py	Mon Jul 09 18:04:23 2007 +0100
     1.2 +++ b/tools/python/xen/xend/server/netif.py	Mon Jul 09 18:10:48 2007 +0100
     1.3 @@ -107,6 +107,7 @@ class NetifController(DevController):
     1.4          uuid    = config.get('uuid')
     1.5          ipaddr  = config.get('ip')
     1.6          model   = config.get('model')
     1.7 +        accel   = config.get('accel')
     1.8  
     1.9          if not typ:
    1.10              typ = xoptions.netback_type
    1.11 @@ -131,6 +132,8 @@ class NetifController(DevController):
    1.12              back['uuid'] = uuid
    1.13          if model:
    1.14              back['model'] = model
    1.15 +        if accel:
    1.16 +            back['accel'] = accel
    1.17  
    1.18          config_path = "device/%s/%d/" % (self.deviceClass, devid)
    1.19          for x in back:
    1.20 @@ -157,10 +160,10 @@ class NetifController(DevController):
    1.21          config_path = "device/%s/%d/" % (self.deviceClass, devid)
    1.22          devinfo = ()
    1.23          for x in ( 'script', 'ip', 'bridge', 'mac',
    1.24 -                   'type', 'vifname', 'rate', 'uuid', 'model' ):
    1.25 +                   'type', 'vifname', 'rate', 'uuid', 'model', 'accel'):
    1.26              y = self.vm._readVm(config_path + x)
    1.27              devinfo += (y,)
    1.28 -        (script, ip, bridge, mac, typ, vifname, rate, uuid, model) = devinfo
    1.29 +        (script, ip, bridge, mac, typ, vifname, rate, uuid, model, accel) = devinfo
    1.30  
    1.31          if script:
    1.32              result['script'] = script
    1.33 @@ -180,5 +183,7 @@ class NetifController(DevController):
    1.34              result['uuid'] = uuid
    1.35          if model:
    1.36              result['model'] = model
    1.37 +        if accel:
    1.38 +            result['accel'] = accel
    1.39              
    1.40          return result
     2.1 --- a/tools/python/xen/xm/create.py	Mon Jul 09 18:04:23 2007 +0100
     2.2 +++ b/tools/python/xen/xm/create.py	Mon Jul 09 18:10:48 2007 +0100
     2.3 @@ -710,7 +710,7 @@ def configure_vifs(config_devs, vals):
     2.4  
     2.5          def f(k):
     2.6              if k not in ['backend', 'bridge', 'ip', 'mac', 'script', 'type',
     2.7 -                         'vifname', 'rate', 'model']:
     2.8 +                         'vifname', 'rate', 'model', 'accel']:
     2.9                  err('Invalid vif option: ' + k)
    2.10  
    2.11              config_vif.append([k, d[k]])