mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
bitkeeper revision 1.1159.56.1 (412f28f2oorf9i_6akPMKOUodxF7qg)
Towards new device-interface setup code for the frontend drivers. Added a synchronous send-and-get-response call to the control interface API. Modified and extended the domain-controller messaging protocol.
This commit is contained in:
1 parent
004d796c34
commit
dcb731aad7
6 files changed
+143
-36
No files matched your search
@@ -325,10 +325,10 @@ static PyObject *xu_message_set_response_fields(PyObject *self, PyObject *args)
|
||||
switch ( TYPE(xum->msg.type, xum->msg.subtype) )
|
||||
{
|
||||
case TYPE(CMSG_BLKIF_FE, CMSG_BLKIF_FE_DRIVER_STATUS_CHANGED):
|
||||
P2C(blkif_fe_driver_status_changed_t, nr_interfaces, u32);
|
||||
P2C(blkif_fe_driver_status_changed_t, max_handle, u32);
|
||||
break;
|
||||
case TYPE(CMSG_NETIF_FE, CMSG_NETIF_FE_DRIVER_STATUS_CHANGED):
|
||||
P2C(netif_fe_driver_status_changed_t, nr_interfaces, u32);
|
||||
P2C(netif_fe_driver_status_changed_t, max_handle, u32);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -435,7 +435,7 @@ static PyObject *xu_message_get_payload(PyObject *self, PyObject *args)
|
||||
return dict;
|
||||
case TYPE(CMSG_NETIF_FE, CMSG_NETIF_FE_DRIVER_STATUS_CHANGED):
|
||||
C2P(netif_fe_driver_status_changed_t, status, Int, Long);
|
||||
C2P(netif_fe_driver_status_changed_t, nr_interfaces, Int, Long);
|
||||
C2P(netif_fe_driver_status_changed_t, max_handle, Int, Long);
|
||||
return dict;
|
||||
case TYPE(CMSG_NETIF_FE, CMSG_NETIF_FE_INTERFACE_CONNECT):
|
||||
C2P(netif_fe_interface_connect_t, handle, Int, Long);
|
||||
@@ -630,7 +630,7 @@ static PyObject *xu_message_new(PyObject *self, PyObject *args)
|
||||
break;
|
||||
case TYPE(CMSG_NETIF_FE, CMSG_NETIF_FE_DRIVER_STATUS_CHANGED):
|
||||
P2C(netif_fe_driver_status_changed_t, status, u32);
|
||||
P2C(netif_fe_driver_status_changed_t, nr_interfaces, u32);
|
||||
P2C(netif_fe_driver_status_changed_t, max_handle, u32);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -333,8 +333,9 @@ class NetifController(controller.SplitController):
|
||||
def recv_fe_driver_status_changed(self, msg, req):
|
||||
if not req: return
|
||||
msg = packMsg('netif_fe_driver_status_changed_t',
|
||||
{ 'status' : NETIF_DRIVER_STATUS_UP,
|
||||
'nr_interfaces' : len(self.devices) })
|
||||
{ 'status' : NETIF_DRIVER_STATUS_UP,
|
||||
## FIXME: max_handle should be max active interface id
|
||||
'max_handle' : len(self.devices) })
|
||||
self.writeRequest(msg)
|
||||
for dev in self.devices.values():
|
||||
dev.attach_fe_device()
|
||||
|
||||