X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Flnx_virtio_nic.c;h=507ffc2f6af283da1bf7dec864346c05e0ffdc39;hb=8ca1d3b4d7a7266a92ef99afeee99097da838ae8;hp=fca709d0bfed22feed058facdbe537826531ccbe;hpb=6774bce4f94af0884dcaf9e13075068e19dd845d;p=palacios.releases.git diff --git a/palacios/src/devices/lnx_virtio_nic.c b/palacios/src/devices/lnx_virtio_nic.c index fca709d..507ffc2 100644 --- a/palacios/src/devices/lnx_virtio_nic.c +++ b/palacios/src/devices/lnx_virtio_nic.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -127,7 +127,7 @@ struct virtio_net_state { uint8_t mergeable_rx_bufs; struct v3_timer * timer; - void * poll_thread; + struct vnet_thread * poll_thread; struct nic_statistics stats; @@ -406,7 +406,7 @@ static int virtio_io_write(struct guest_info *core, virtio_setup_queue(core, virtio, &virtio->tx_vq, pfn, page_addr); if(virtio->tx_notify == 0){ disable_cb(&virtio->tx_vq); - V3_THREAD_WAKEUP(virtio->poll_thread); + vnet_thread_wakeup(virtio->poll_thread); } break; case 2: @@ -725,7 +725,7 @@ static int virtio_tx_flush(void * args){ handle_pkt_tx(&(virtio->vm->cores[0]), virtio); v3_yield(NULL); }else { - V3_THREAD_SLEEP(); + vnet_thread_sleep(0); } } @@ -831,7 +831,7 @@ static void virtio_nic_timer(struct guest_info * core, V3_Print("Virtio NIC: Switch TX to VMM driven mode\n"); disable_cb(&(net_state->tx_vq)); net_state->tx_notify = 0; - V3_THREAD_WAKEUP(net_state->poll_thread); + vnet_thread_wakeup(net_state->poll_thread); } if(tx_rate < RATE_LOWER_THRESHOLD && net_state->tx_notify == 0){ @@ -894,7 +894,7 @@ static int connect_fn(struct v3_vm_info * info, ops->frontend_data = net_state; memcpy(ops->fnt_mac, virtio->mac, ETH_ALEN); - net_state->poll_thread = V3_CREATE_THREAD(virtio_tx_flush, (void *)net_state, "Virtio_Poll"); + net_state->poll_thread = vnet_thread_create(virtio_tx_flush, (void *)net_state, "Virtio_Poll"); return 0; }