Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Merge branch 'devel' of palacios@newskysaw.cs.northwestern.edu:/home/palacios/palacio...
[palacios.git] / palacios / include / palacios / vmm_vnet.h
index 9748674..1750fff 100644 (file)
@@ -75,6 +75,15 @@ struct v3_vnet_pkt {
     } __attribute__((packed));
 } __attribute__((packed));
 
+
+struct vnet_stat{
+    uint64_t tx_bytes;
+    uint32_t tx_pkts;
+    uint64_t rx_bytes;
+    uint32_t rx_pkts;
+};
+
+
 struct v3_vnet_bridge_ops {
     int (*input)(struct v3_vm_info * vm, 
                struct v3_vnet_pkt * pkt,
@@ -93,23 +102,21 @@ int v3_vnet_add_bridge(struct v3_vm_info * vm,
 int v3_vnet_add_route(struct v3_vnet_route route);
 int v3_vnet_send_pkt(struct v3_vnet_pkt * pkt, void * private_data);
 int v3_vnet_find_dev(uint8_t  * mac);
+int v3_vnet_stat(struct vnet_stat * stats);
 
 #ifdef __V3VEE__
 
-#define VMM_DRIVERN    1
-#define GUEST_DRIVERN  0
-
 struct v3_vnet_dev_ops {
     int (*input)(struct v3_vm_info * vm, 
                struct v3_vnet_pkt * pkt, 
                void * dev_data);
-    void (*poll) (struct v3_vm_info * vm, void * dev_data);
+    void (*poll) (struct v3_vm_info * vm, int budget, void * dev_data);
 };
 
 int v3_init_vnet(void);        
 void v3_deinit_vnet(void);
 
-void v3_vnet_poll(struct v3_vm_info * vm);
+void v3_vnet_do_poll(struct v3_vm_info * vm);
 
 int v3_vnet_add_dev(struct v3_vm_info * info, uint8_t * mac, 
                    struct v3_vnet_dev_ops * ops,