search for: skb_recv_don

Displaying 20 results from an estimated 96 matches for "skb_recv_don".

Did you mean: skb_recv_done
2008 Feb 11
1
[PATCH] virtio_net: Fix oops on early interrupts - introduced by virtio reset code
...e kernel pointer dereference at virtual kernel address 0000000000000000 Oops: 0004 [#1] PREEMPT SMP Modules linked in: CPU: 1 Not tainted 2.6.24zlive-guest-10577-g63f5307-dirty #168 Process swapper (pid: 0, task: 000000000f866040, ksp: 000000000f86fd78) Krnl PSW : 0404100180000000 000000000047598a (skb_recv_done+0x52/0x98) R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0 EA:3 Krnl GPRS: 0000000000000001 0000000000000000 000000000efd0e60 0000000000000001 0000000000000000 000000000f866040 0000000000000000 0000000000000000 00000000008de4c8 0000000000001237 0000000000001237...
2008 Feb 11
1
[PATCH] virtio_net: Fix oops on early interrupts - introduced by virtio reset code
...e kernel pointer dereference at virtual kernel address 0000000000000000 Oops: 0004 [#1] PREEMPT SMP Modules linked in: CPU: 1 Not tainted 2.6.24zlive-guest-10577-g63f5307-dirty #168 Process swapper (pid: 0, task: 000000000f866040, ksp: 000000000f86fd78) Krnl PSW : 0404100180000000 000000000047598a (skb_recv_done+0x52/0x98) R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0 EA:3 Krnl GPRS: 0000000000000001 0000000000000000 000000000efd0e60 0000000000000001 0000000000000000 000000000f866040 0000000000000000 0000000000000000 00000000008de4c8 0000000000001237 0000000000001237...
2007 Dec 11
1
[PATCH resent] virtio_net: Fix stalled inbound traffic on early packets
...io on s390 I found a problem in virtio_net: The current virtio_net driver has a startup race, which prevents any incoming traffic: If try_fill_recv submits buffers to the host system data might be filled in and an interrupt is sent, before napi_enable finishes. In that case the interrupt will kick skb_recv_done which will then call netif_rx_schedule. netif_rx_schedule checks, if NAPI_STATE_SCHED is set - which is not as we did not run napi_enable. No poll routine is scheduled. Furthermore, skb_recv_done returns false, we disables interrupts for this device. One solution is the enable napi before inbound...
2007 Dec 11
1
[PATCH resent] virtio_net: Fix stalled inbound traffic on early packets
...io on s390 I found a problem in virtio_net: The current virtio_net driver has a startup race, which prevents any incoming traffic: If try_fill_recv submits buffers to the host system data might be filled in and an interrupt is sent, before napi_enable finishes. In that case the interrupt will kick skb_recv_done which will then call netif_rx_schedule. netif_rx_schedule checks, if NAPI_STATE_SCHED is set - which is not as we did not run napi_enable. No poll routine is scheduled. Furthermore, skb_recv_done returns false, we disables interrupts for this device. One solution is the enable napi before inbound...
2007 Dec 06
0
[PATCH] virtio_net: Fix stalled inbound traffic on early packets
The current virtio_net driver has a startup race, which prevents any incoming traffic: If try_fill_recv submits buffers to the host system data might be filled in and an interrupt is sent, before napi_enable finishes. In that case the interrupt will kick skb_recv_done which will then call netif_rx_schedule. netif_rx_schedule checks, if NAPI_STATE_SCHED is set - which is not as we did not run napi_enable. No poll routine is scheduled. Furthermore, skb_recv_done returns false, we disables interrupts for this device. One solution is the enable napi before inbound...
2007 Dec 06
0
[PATCH] virtio_net: Fix stalled inbound traffic on early packets
The current virtio_net driver has a startup race, which prevents any incoming traffic: If try_fill_recv submits buffers to the host system data might be filled in and an interrupt is sent, before napi_enable finishes. In that case the interrupt will kick skb_recv_done which will then call netif_rx_schedule. netif_rx_schedule checks, if NAPI_STATE_SCHED is set - which is not as we did not run napi_enable. No poll routine is scheduled. Furthermore, skb_recv_done returns false, we disables interrupts for this device. One solution is the enable napi before inbound...
2008 Feb 05
1
[PATCH] virtio_net: Fix open <-> interrupt race
...ception in interrupt <4> After looking at the 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 b...
2008 Feb 05
1
[PATCH] virtio_net: Fix open <-> interrupt race
...ception in interrupt <4> After looking at the 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 b...
2008 May 26
2
virtio_net: another race with virtio_net and enable_cb
...goto again; } } If an interrupt arrives after netif_rx_complete, a second poll routine can run on a different cpu. The second check for napi_schedule_prep would prevent any 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(r...
2008 May 26
2
virtio_net: another race with virtio_net and enable_cb
...goto again; } } If an interrupt arrives after netif_rx_complete, a second poll routine can run on a different cpu. The second check for napi_schedule_prep would prevent any 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(r...
2008 Jan 05
1
[PATCH][RESEND] Relax BUG_ON()s when enabling/disabling virt_ring interrupts
Currently, the virt_ring->enable_cb and virt_ring->disable_cb functions enforce that they were called only when callbacks were disabled and enabled respectively. However, in the current vring implementation, this isn't actually a bug. What's more, the virtio_net driver does not guard against double enabling or double disabling. All that needs to happen is for an rx notification to
2008 Jan 05
1
[PATCH][RESEND] Relax BUG_ON()s when enabling/disabling virt_ring interrupts
Currently, the virt_ring->enable_cb and virt_ring->disable_cb functions enforce that they were called only when callbacks were disabled and enabled respectively. However, in the current vring implementation, this isn't actually a bug. What's more, the virtio_net driver does not guard against double enabling or double disabling. All that needs to happen is for an rx notification to
2011 Feb 10
2
[PATCH] virtio_net: Add schedule check to napi_enable call
...at rustcorp.com.au> --- drivers/net/virtio_net.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -446,6 +446,20 @@ static void skb_recv_done(struct virtque } } +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...
2011 Feb 10
2
[PATCH] virtio_net: Add schedule check to napi_enable call
...at rustcorp.com.au> --- drivers/net/virtio_net.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -446,6 +446,20 @@ static void skb_recv_done(struct virtque } } +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...
2012 Jan 04
2
[PATCH 1/2] virtio: net: Move vq initialization into separate function
...0 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -966,15 +966,38 @@ static void virtnet_config_changed(struct virtio_device *vdev) virtnet_update_status(vi); } +static int init_vqs(struct virtnet_info *vi) +{ + struct virtqueue *vqs[3]; + vq_callback_t *callbacks[] = { skb_recv_done, skb_xmit_done, NULL}; + const char *names[] = { "input", "output", "control" }; + int nvqs, err; + + /* We expect two virtqueues, receive then send, + * and optionally control. */ + nvqs = virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ) ? 3 : 2; + + err = vi-&...
2012 Jan 04
2
[PATCH 1/2] virtio: net: Move vq initialization into separate function
...0 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -966,15 +966,38 @@ static void virtnet_config_changed(struct virtio_device *vdev) virtnet_update_status(vi); } +static int init_vqs(struct virtnet_info *vi) +{ + struct virtqueue *vqs[3]; + vq_callback_t *callbacks[] = { skb_recv_done, skb_xmit_done, NULL}; + const char *names[] = { "input", "output", "control" }; + int nvqs, err; + + /* We expect two virtqueues, receive then send, + * and optionally control. */ + nvqs = virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ) ? 3 : 2; + + err = vi-&...
2007 Jun 07
4
[PATCH RFC 0/3] Virtio draft II
Hi again all, It turns out that networking really wants ordered requests, which the previous patches didn't allow. This patch changes it to a callback mechanism; kudos to Avi. The downside is that locking is more complicated, and after a few dead ends I implemented the simplest solution: the struct virtio_device contains the spinlock to use, and it's held when your callbacks get
2007 Jun 07
4
[PATCH RFC 0/3] Virtio draft II
Hi again all, It turns out that networking really wants ordered requests, which the previous patches didn't allow. This patch changes it to a callback mechanism; kudos to Avi. The downside is that locking is more complicated, and after a few dead ends I implemented the simplest solution: the struct virtio_device contains the spinlock to use, and it's held when your callbacks get
2007 Jun 07
4
[PATCH RFC 0/3] Virtio draft II
Hi again all, It turns out that networking really wants ordered requests, which the previous patches didn't allow. This patch changes it to a callback mechanism; kudos to Avi. The downside is that locking is more complicated, and after a few dead ends I implemented the simplest solution: the struct virtio_device contains the spinlock to use, and it's held when your callbacks get
2023 Apr 13
1
[PATCH net-next V2 2/2] virtio-net: sleep instead of busy waiting for cvq command
...ry_fill_recv(struct virtnet_info *vi, struct receive_queue *rq, > return !oom; > } > > +static void virtnet_cvq_done(struct virtqueue *cvq) > +{ > + struct virtnet_info *vi = cvq->vdev->priv; > + > + complete(&vi->completion); > +} > + > static void skb_recv_done(struct virtqueue *rvq) > { > struct virtnet_info *vi = rvq->vdev->priv; > @@ -2169,12 +2179,8 @@ static bool virtnet_send_command(struct virtnet_info *vi, u8 class, u8 cmd, > if (unlikely(!virtqueue_kick(vi->cvq))) > return vi->ctrl->status == VIRTIO_NET_OK; &...