Displaying 5 results from an estimated 5 matches for "netif_rx_schedule_prep".
2008 Mar 03
0
[PATCH 1/3] Backward compat to replace napi in *rx_schedule*
...tif_rx_reschedule(vi->dev, received)) {";
print " skb = NULL;";
@@ -62,6 +62,32 @@
virtnet_poll = 1
}
+/\tnetif_rx_schedule\(/ {
+ print "#ifdef COMPAT_napi";
+ print " vi->rvq->vq_ops->enable_cb(vi->rvq);";
+ print " if (netif_rx_schedule_prep(vi->dev)) {";
+ print " vi->rvq->vq_ops->disable_cb(vi->rvq);";
+ print " __netif_rx_schedule(vi->dev);";
+ print " } else";
+ print " vi->rvq->vq_ops->enable_cb(vi->rvq);";
+ print "#else";
+...
2008 Feb 05
1
[PATCH] virtio_net: Fix open <-> interrupt race
...he code and the dump I think the following scenario
happened: Ifup was running on cpu2 and the interrupt arrived on cpu0.
Now virtnet_open on cpu 2 managed to execute napi_enable and disable_cb
but did not execute rx_schedule. Meanwhile on cpu 0 skb_recv_done was
called by vring_interrupt, executed netif_rx_schedule_prep, which
succeeded and therefore called disable_cb. This triggered the BUG_ON,
as interrupts were already disabled by cpu 2.
I think the proper solution is to make the call to disable_cb depend on
the atomic update of NAPI_STATE_SCHED by using netif_rx_schedule_prep
in the same way as skb_recv_done....
2008 Feb 05
1
[PATCH] virtio_net: Fix open <-> interrupt race
...he code and the dump I think the following scenario
happened: Ifup was running on cpu2 and the interrupt arrived on cpu0.
Now virtnet_open on cpu 2 managed to execute napi_enable and disable_cb
but did not execute rx_schedule. Meanwhile on cpu 0 skb_recv_done was
called by vring_interrupt, executed netif_rx_schedule_prep, which
succeeded and therefore called disable_cb. This triggered the BUG_ON,
as interrupts were already disabled by cpu 2.
I think the proper solution is to make the call to disable_cb depend on
the atomic update of NAPI_STATE_SCHED by using netif_rx_schedule_prep
in the same way as skb_recv_done....
2008 May 26
2
virtio_net: another race with virtio_net and enable_cb
...harm in the network stack, but we have called enable_cb possibly after the
disable_cb in skb_recv_done.
static void skb_recv_done(struct virtqueue *rvq)
{
struct virtnet_info *vi = rvq->vdev->priv;
/* Schedule NAPI, Suppress further interrupts if successful. */
if (netif_rx_schedule_prep(vi->dev, &vi->napi)) {
rvq->vq_ops->disable_cb(rvq);
__netif_rx_schedule(vi->dev, &vi->napi);
}
}
That means that the second poll routine runs with interrupts enabled, which is
ok, since we can handle additional interrupts. The pro...
2008 May 26
2
virtio_net: another race with virtio_net and enable_cb
...harm in the network stack, but we have called enable_cb possibly after the
disable_cb in skb_recv_done.
static void skb_recv_done(struct virtqueue *rvq)
{
struct virtnet_info *vi = rvq->vdev->priv;
/* Schedule NAPI, Suppress further interrupts if successful. */
if (netif_rx_schedule_prep(vi->dev, &vi->napi)) {
rvq->vq_ops->disable_cb(rvq);
__netif_rx_schedule(vi->dev, &vi->napi);
}
}
That means that the second poll routine runs with interrupts enabled, which is
ok, since we can handle additional interrupts. The pro...