@@ -1303,13 +1303,22 @@ static void virtnet_napi_tx_enable(struct virtnet_info *vi,
return;
}
+ /* With napi_tx enabled, free_old_xmit_skbs() could be called from
+ * rx napi handler. Set no_interrupt_check to suppress bad irq warning
+ * for IRQ_NONE case from tx complete interrupt handler.
+ */
+ virtqueue_set_no_interrupt_check(vq, true);
+
return virtnet_napi_enable(vq, napi);
}
-static void virtnet_napi_tx_disable(struct napi_struct *napi)
+static void virtnet_napi_tx_disable(struct virtqueue *vq,
+ struct napi_struct *napi)
{
- if (napi->weight)
+ if (napi->weight) {
napi_disable(napi);
+ virtqueue_set_no_interrupt_check(vq, false);
+ }
}
static void refill_work(struct work_struct *work)
@@ -1835,7 +1844,7 @@ static int virtnet_close(struct net_device *dev)
for (i = 0; i < vi->max_queue_pairs; i++) {
xdp_rxq_info_unreg(&vi->rq[i].xdp_rxq);
napi_disable(&vi->rq[i].napi);
- virtnet_napi_tx_disable(&vi->sq[i].napi);
+ virtnet_napi_tx_disable(vi->sq[i].vq, &vi->sq[i].napi);
}
return 0;
@@ -2315,7 +2324,7 @@ static void virtnet_freeze_down(struct virtio_device *vdev)
if (netif_running(vi->dev)) {
for (i = 0; i < vi->max_queue_pairs; i++) {
napi_disable(&vi->rq[i].napi);
- virtnet_napi_tx_disable(&vi->sq[i].napi);
+ virtnet_napi_tx_disable(vi->sq[i].vq, &vi->sq[i].napi);
}
}
}
@@ -2440,7 +2449,7 @@ static int virtnet_xdp_set(struct net_device *dev, struct bpf_prog *prog,
if (netif_running(dev)) {
for (i = 0; i < vi->max_queue_pairs; i++) {
napi_disable(&vi->rq[i].napi);
- virtnet_napi_tx_disable(&vi->sq[i].napi);
+ virtnet_napi_tx_disable(vi->sq[i].vq, &vi->sq[i].napi);
}
}