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.


Minimize the copies for vnet and Virtio bridge
[palacios.git] / palacios / src / devices / vnet_nic.c
index 86f5ba7..7290038 100644 (file)
@@ -49,7 +49,8 @@ static int vnet_send(uint8_t * buf, uint32_t len, void * private_data, struct vm
     pkt.size = len;
     pkt.src_type = LINK_INTERFACE;
     pkt.src_id = vnetnic->vnet_dev_id;
-    memcpy(pkt.data, buf, pkt.size);
+    memcpy(pkt.header, buf, ETHERNET_HEADER_LEN);
+    pkt.data = buf;
 
 #ifdef CONFIG_DEBUG_VNET_NIC
     {