diff -u linux-2.6.31/debian/changelog linux-2.6.31/debian/changelog --- linux-2.6.31/debian/changelog +++ linux-2.6.31/debian/changelog @@ -1,3 +1,12 @@ +linux (2.6.31-22.73ubuntu1~ppa1~karmic1) karmic; urgency=low + + * [PATCH] KVM: add schedule check to napi_enable call + - http://kerneltrap.org/mailarchive/linux-netdev/2010/6/4/6278660 + * Tracking Bug + - LP: #579276 + + -- nutznboltz Wed, 02 Mar 2011 20:13:49 -0500 + linux (2.6.31-22.73) karmic-proposed; urgency=low [ Steve Conklin ] diff -u linux-2.6.31/debian.master/changelog linux-2.6.31/debian.master/changelog --- linux-2.6.31/debian.master/changelog +++ linux-2.6.31/debian.master/changelog @@ -1,3 +1,12 @@ +linux (2.6.31-22.73ubuntu1~ppa1~karmic1) karmic; urgency=low + + * [PATCH] KVM: add schedule check to napi_enable call + - http://kerneltrap.org/mailarchive/linux-netdev/2010/6/4/6278660 + * Tracking Bug + - LP: #579276 + + -- nutznboltz Wed, 02 Mar 2011 20:13:49 -0500 + linux (2.6.31-22.73) karmic-proposed; urgency=low [ Steve Conklin ] --- linux-2.6.31.orig/drivers/net/virtio_net.c +++ linux-2.6.31/drivers/net/virtio_net.c @@ -396,6 +396,20 @@ } } +static void virtnet_napi_enable(struct virtnet_info *vi) +{ + napi_enable(&vi->napi); + + /* If all buffers were filled by other side before we napi_enabled, we + * won't get another interrupt, so process any outstanding packets + * now. virtnet_poll wants re-enable the queue, so we disable here. + * We synchronize against interrupts via NAPI_STATE_SCHED */ + if (napi_schedule_prep(&vi->napi)) { + vi->rvq->vq_ops->disable_cb(vi->rvq); + __napi_schedule(&vi->napi); + } +} + static void refill_work(struct work_struct *work) { struct virtnet_info *vi; @@ -405,7 +419,7 @@ napi_disable(&vi->napi); try_fill_recv(vi, GFP_KERNEL); still_empty = (vi->num == 0); - napi_enable(&vi->napi); + virtnet_napi_enable(vi); /* In theory, this can happen: if we don't get any buffers in * we will *never* try to fill again. */ @@ -624,16 +638,7 @@ { struct virtnet_info *vi = netdev_priv(dev); - napi_enable(&vi->napi); - - /* If all buffers were filled by other side before we napi_enabled, we - * won't get another interrupt, so process any outstanding packets - * now. virtnet_poll wants re-enable the queue, so we disable here. - * We synchronize against interrupts via NAPI_STATE_SCHED */ - if (napi_schedule_prep(&vi->napi)) { - vi->rvq->vq_ops->disable_cb(vi->rvq); - __napi_schedule(&vi->napi); - } + virtnet_napi_enable(vi); return 0; }