ia64/xen-unstable

changeset 2349:cdffed58ec5d

bitkeeper revision 1.1159.1.108 (412e0764N-PIybRvZOXrgV9F-pj5nQ)

Add a 'domid' field to device-interface status messages, informing
the front end of the identity of the backend to which it is connecting.
author kaf24@labyrinth.cl.cam.ac.uk
date Thu Aug 26 15:53:08 2004 +0000 (2004-08-26)
parents 4cbe16ee99d3
children 5f62249f3584 cfa99735b637
files tools/python/xen/lowlevel/xu/xu.c tools/python/xen/xend/server/blkif.py tools/python/xen/xend/server/netif.py xen/include/hypervisor-ifs/io/domain_controller.h
line diff
     1.1 --- a/tools/python/xen/lowlevel/xu/xu.c	Thu Aug 26 14:59:55 2004 +0000
     1.2 +++ b/tools/python/xen/lowlevel/xu/xu.c	Thu Aug 26 15:53:08 2004 +0000
     1.3 @@ -547,6 +547,7 @@ static PyObject *xu_message_new(PyObject
     1.4          P2C(blkif_fe_interface_status_changed_t, handle, u32);
     1.5          P2C(blkif_fe_interface_status_changed_t, status, u32);
     1.6          P2C(blkif_fe_interface_status_changed_t, evtchn, u16);
     1.7 +        P2C(blkif_fe_interface_status_changed_t, domid,  u16);
     1.8          break;
     1.9      case TYPE(CMSG_BLKIF_BE, CMSG_BLKIF_BE_CREATE):
    1.10          P2C(blkif_be_create_t, domid,        u32);
    1.11 @@ -594,6 +595,7 @@ static PyObject *xu_message_new(PyObject
    1.12          P2C(netif_fe_interface_status_changed_t, handle, u32);
    1.13          P2C(netif_fe_interface_status_changed_t, status, u32);
    1.14          P2C(netif_fe_interface_status_changed_t, evtchn, u16);
    1.15 +        P2C(netif_fe_interface_status_changed_t, domid,  u16);
    1.16          P2C(netif_fe_interface_status_changed_t, mac[0], u8);
    1.17          P2C(netif_fe_interface_status_changed_t, mac[1], u8);
    1.18          P2C(netif_fe_interface_status_changed_t, mac[2], u8);
     2.1 --- a/tools/python/xen/xend/server/blkif.py	Thu Aug 26 14:59:55 2004 +0000
     2.2 +++ b/tools/python/xen/xend/server/blkif.py	Thu Aug 26 15:53:08 2004 +0000
     2.3 @@ -121,6 +121,7 @@ class BlkifBackendController(controller.
     2.4          msg = packMsg('blkif_fe_interface_status_changed_t',
     2.5                        { 'handle' : self.handle,
     2.6                          'status' : BLKIF_INTERFACE_STATUS_CONNECTED,
     2.7 +                        'domid'  : 0, ## FIXME: should be domid of backend
     2.8                          'evtchn' : self.evtchn['port2'] })
     2.9          self.controller.writeRequest(msg, response=response)
    2.10          
    2.11 @@ -382,6 +383,7 @@ class BlkifController(controller.SplitCo
    2.12          msg = packMsg('blkif_fe_interface_status_changed_t',
    2.13                        { 'handle' : 0,
    2.14                          'status' : BLKIF_INTERFACE_STATUS_DISCONNECTED,
    2.15 +                        'domid'  : 0, ## FIXME: should be domid of backend
    2.16                          'evtchn' : 0 })
    2.17          self.writeRequest(msg)
    2.18  
     3.1 --- a/tools/python/xen/xend/server/netif.py	Thu Aug 26 14:59:55 2004 +0000
     3.2 +++ b/tools/python/xen/xend/server/netif.py	Thu Aug 26 15:53:08 2004 +0000
     3.3 @@ -234,6 +234,7 @@ class NetDev(controller.SplitDev):
     3.4                        { 'handle' : self.vif,
     3.5                          'status' : NETIF_INTERFACE_STATUS_CONNECTED,
     3.6                          'evtchn' : self.evtchn['port2'],
     3.7 +                        'domid'  : 0, ## FIXME: should be domid of backend
     3.8                          'mac'    : self.mac })
     3.9          self.controller.writeRequest(msg)
    3.10  
    3.11 @@ -242,6 +243,7 @@ class NetDev(controller.SplitDev):
    3.12                        { 'handle' : self.vif,
    3.13                          'status' : NETIF_INTERFACE_STATUS_DISCONNECTED,
    3.14                          'evtchn' : 0,
    3.15 +                        'domid'  : 0, ## FIXME: should be domid of backend
    3.16                          'mac'    : self.mac })
    3.17          self.controller.writeRequest(msg)
    3.18          
     4.1 --- a/xen/include/hypervisor-ifs/io/domain_controller.h	Thu Aug 26 14:59:55 2004 +0000
     4.2 +++ b/xen/include/hypervisor-ifs/io/domain_controller.h	Thu Aug 26 15:53:08 2004 +0000
     4.3 @@ -96,7 +96,8 @@ typedef struct {
     4.4      u32 handle; /*  0 */
     4.5      u32 status; /*  4 */
     4.6      u16 evtchn; /*  8: (only if status == BLKIF_INTERFACE_STATUS_CONNECTED). */
     4.7 -} PACKED blkif_fe_interface_status_changed_t; /* 10 bytes */
     4.8 +    domid_t domid; /* 10: status != BLKIF_INTERFACE_STATUS_DESTROYED */
     4.9 +} PACKED blkif_fe_interface_status_changed_t; /* 12 bytes */
    4.10  
    4.11  /*
    4.12   * CMSG_BLKIF_FE_DRIVER_STATUS_CHANGED:
    4.13 @@ -347,7 +348,8 @@ typedef struct {
    4.14      u32        status; /*  4 */
    4.15      u16        evtchn; /*  8: status == NETIF_INTERFACE_STATUS_CONNECTED */
    4.16      u8         mac[6]; /* 10: status == NETIF_INTERFACE_STATUS_CONNECTED */
    4.17 -} PACKED netif_fe_interface_status_changed_t; /* 16 bytes */
    4.18 +    domid_t    domid;  /* 16: status != NETIF_INTERFACE_STATUS_DESTROYED */
    4.19 +} PACKED netif_fe_interface_status_changed_t; /* 18 bytes */
    4.20  
    4.21  /*
    4.22   * CMSG_NETIF_FE_DRIVER_STATUS_CHANGED: