Support accelerated network plugin modules
PATCH 2/4 Support accelerated network plugin modules
Add accel option to vif xend config
tools/python/xen/xend/server/netif.py +7 -2
@@ -107,6 +107,7 @@ class NetifController(DevController): uuid = config.get('uuid') ipaddr = config.get('ip') model = config.get('model') + accel = config.get('accel') if not typ: typ = xoptions.netback_type
@@ -131,6 +132,8 @@ class NetifController(DevController): back['uuid'] = uuid if model: back['model'] = model + if accel: + back['accel'] = accel config_path = "device/%s/%d/" % (self.deviceClass, devid) for x in back:
@@ -157,10 +160,10 @@ class NetifController(DevController): config_path = "device/%s/%d/" % (self.deviceClass, devid) devinfo = () for x in ( 'script', 'ip', 'bridge', 'mac', - 'type', 'vifname', 'rate', 'uuid', 'model' ): + 'type', 'vifname', 'rate', 'uuid', 'model', 'accel'): y = self.vm._readVm(config_path + x) devinfo += (y,) - (script, ip, bridge, mac, typ, vifname, rate, uuid, model) = devinfo + (script, ip, bridge, mac, typ, vifname, rate, uuid, model, accel) = devinfo if script: result['script'] = script
@@ -180,5 +183,7 @@ class NetifController(DevController): result['uuid'] = uuid if model: result['model'] = model + if accel: + result['accel'] = accel return result
tools/python/xen/xm/create.py +1 -1
@@ -710,7 +710,7 @@ def configure_vifs(config_devs, vals): def f(k): if k not in ['backend', 'bridge', 'ip', 'mac', 'script', 'type', - 'vifname', 'rate', 'model']: + 'vifname', 'rate', 'model', 'accel']: err('Invalid vif option: ' + k) config_vif.append([k, d[k]])
Add accel option to vif xend config
tools/python/xen/xend/server/netif.py +7 -2
@@ -107,6 +107,7 @@ class NetifController(DevController): uuid = config.get('uuid') ipaddr = config.get('ip') model = config.get('model') + accel = config.get('accel') if not typ: typ = xoptions.netback_type
@@ -131,6 +132,8 @@ class NetifController(DevController): back['uuid'] = uuid if model: back['model'] = model + if accel: + back['accel'] = accel config_path = "device/%s/%d/" % (self.deviceClass, devid) for x in back:
@@ -157,10 +160,10 @@ class NetifController(DevController): config_path = "device/%s/%d/" % (self.deviceClass, devid) devinfo = () for x in ( 'script', 'ip', 'bridge', 'mac', - 'type', 'vifname', 'rate', 'uuid', 'model' ): + 'type', 'vifname', 'rate', 'uuid', 'model', 'accel'): y = self.vm._readVm(config_path + x) devinfo += (y,) - (script, ip, bridge, mac, typ, vifname, rate, uuid, model) = devinfo + (script, ip, bridge, mac, typ, vifname, rate, uuid, model, accel) = devinfo if script: result['script'] = script
@@ -180,5 +183,7 @@ class NetifController(DevController): result['uuid'] = uuid if model: result['model'] = model + if accel: + result['accel'] = accel return result
tools/python/xen/xm/create.py +1 -1
@@ -710,7 +710,7 @@ def configure_vifs(config_devs, vals): def f(k): if k not in ['backend', 'bridge', 'ip', 'mac', 'script', 'type', - 'vifname', 'rate', 'model']: + 'vifname', 'rate', 'model', 'accel']: err('Invalid vif option: ' + k) config_vif.append([k, d[k]])
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Re: [PATCH 2/4] [Net] Support accelerated network pluginmodules
Hi Kieran,
I have a request and a question.
Request:
I think that we need to fix the help message of xm create command for the accel option, so I wrote a patch for it. I attach the patch. Could you comment on the patch?
Question:
I ask you a question without understanding your patch enough. Why did not you add the accel option to xm network-attach command?
Best regards,
Kan
Quoted 61 lines
Add accel option to vif xend config
Signed-off-by Kieran Mansley <[email protected]>diff -r
405eb3e22887tools/python/xen/xend/server/netif.pytools/python/xen/xend/server/netif.py +5
-2@@ -107,6 +107,7 @@ class NetifController(DevController): uuid = config.get('uuid') ipaddr = config.get('ip') model = config.get('model') + accel = config.get('accel') if not typ: typ = xoptions.netback_type@@ -131,6 +132,8 @@ class NetifController(DevController): back['uuid'] = uuid if model: back['model'] = model + if accel: + back['accel'] = accel config_path = "device/%s/%d/" % (self.deviceClass, devid) for x in back:@@ -157,10 +160,10 @@ class NetifController(DevController): config_path = "device/%s/%d/" % (self.deviceClass, devid) devinfo = () for x in ( 'script', 'ip', 'bridge', 'mac', - 'type', 'vifname', 'rate', 'uuid', 'model' ): + 'type', 'vifname', 'rate', 'uuid', 'model', 'accel'): y = self.vm._readVm(config_path + x) devinfo += (y,) - (script, ip, bridge, mac, typ, vifname, rate, uuid, model) = devinfo + (script, ip, bridge, mac, typ, vifname, rate, uuid, model, accel)= devinfo
if script:
result['script'] = scripttools/python/xen/xend/server/netif.py +2
-0@@ -180,5 +183,7 @@ class NetifController(DevController): result['uuid'] = uuid if model: result['model'] = model + if accel: + result['accel'] = accel return resultdiff -r
405eb3e22887tools/python/xen/xm/create.pytools/python/xen/xm/create.py +1
-2@@ -710,7 +710,7 @@ def configure_vifs(config_devs, vals): def f(k): if k not in ['backend', 'bridge', 'ip', 'mac', 'script', 'type', - 'vifname', 'rate', 'model']: + 'vifname', 'rate', 'model', 'accel']: err('Invalid vif option: ' + k) config_vif.append([k, d[k]]) -------------------------------text/plain-------------------------------
Quoted 4 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
tools/python/xen/xm/create.py +5 -1
@@ -318,7 +318,8 @@ gopts.var('vfb', val="type={vnc,sdl},vnc given DISPLAY and XAUTHORITY, which default to the current user's ones.""") -gopts.var('vif', val="type=TYPE,mac=MAC,bridge=BRIDGE,ip=IPADDR,script=SCRIPT,backend=DOM,vifname=NAME", +gopts.var('vif', val="type=TYPE,mac=MAC,bridge=BRIDGE,ip=IPADDR,script=SCRIPT," + \ + "backend=DOM,vifname=NAME,rate=RATE,model=MODEL,accel=ACCEL", fn=append_value, default=[], use="""Add a network interface with the given MAC address and bridge. The vif is configured by calling the given configuration script.
@@ -330,6 +331,9 @@ gopts.var('vif', val="type=TYPE,mac=MAC, If backend is not specified the default backend driver domain is used. If vifname is not specified the backend virtual interface will have name vifD.N where D is the domain id and N is the interface id. + If rate is not specified the default rate is used. + If model is not specified the default model is used. + If accel is not specified an accelerator plugin module is not used. This option may be repeated to add more than one vif. Specifying vifs will increase the number of interfaces as needed.""")
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Re: [PATCH 2/4] [Net] Support accelerated network pluginmodules
Quoted 8 lines · Masaki Kanno
Hi Kieran,
I have a request and a question.
Request:
I think that we need to fix the help message of xm create command for the accel option, so I wrote a patch for it. I attach the patch. Could you comment on the patch?
Looks good to me, thanks for noticing that and providing the patch.
Keir: could you apply this as well?
Quoted 3 lines
Question:
I ask you a question without understanding your patch enough. Why did not you add the accel option to xm network-attach command?
I probably should have done: it's not a command I've ever used and so I overlooked it. I'll make a patch for that asap.
Thanks
Kieran