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.


reverted naming changes to fix configuration breakage
[palacios.git] / palacios / src / devices / lnx_virtio_vnet.c
index fea13c6..0ce9cd6 100644 (file)
@@ -26,7 +26,7 @@
 #include <devices/pci.h>
 
 
-#ifndef CONFIG_DEBUG_VNET_BRG
+#ifndef CONFIG_LINUX_VIRTIO_VNET_DEBUG
 #undef PrintDebug
 #define PrintDebug(fmt, args...)
 #endif
@@ -75,21 +75,6 @@ struct vnet_ctrl_hdr {
     uint32_t num_cmds;
 } __attribute__((packed));
 
-#define VIRTIO_NET_S_LINK_UP   1       /* Link is up */
-#define VIRTIO_NET_MAX_BUFSIZE (sizeof(struct virtio_net_hdr) + (64 << 10))
-
-struct virtio_net_hdr {
-       uint8_t flags;
-
-#define VIRTIO_NET_HDR_GSO_NONE                0       /* Not a GSO frame */
-       uint8_t gso_type;
-       uint16_t hdr_len;               /* Ethernet + IP + tcp/udp hdrs */
-       uint16_t gso_size;              /* Bytes to append to hdr_len per frame */
-       uint16_t csum_start;    /* Position to start checksumming from */
-       uint16_t csum_offset;   /* Offset after that to place checksum */
-}__attribute__((packed));
-
-
 static int virtio_reset(struct virtio_vnet_state * vnet_brg) {
 
     memset(vnet_brg->queue, 0, sizeof(struct virtio_queue) * 2);
@@ -615,7 +600,7 @@ static struct v3_device_ops dev_ops = {
 };
 
 
-static int vnet_brg_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
+static int dev_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
     struct vm_device * pci_bus = v3_find_dev(vm, v3_cfg_val(cfg, "bus"));
     struct virtio_vnet_state * vbrg_state = NULL;
     struct pci_device * pci_dev = NULL;
@@ -726,4 +711,4 @@ static int vnet_brg_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
 }
 
 
-device_register("LNX_VNET_BRG", vnet_brg_init)
+device_register("LNX_VIRTIO_VNET", dev_init)