search for: skb_unlink

Displaying 19 results from an estimated 19 matches for "skb_unlink".

2009 Sep 21
0
[PATCH 2/6] virtio: make add_buf return capacity remaining
...ers/net/virtio_net.c --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -320,7 +320,7 @@ static bool try_fill_recv_maxbufs(struct skb_queue_head(&vi->recv, skb); err = vi->rvq->vq_ops->add_buf(vi->rvq, sg, 0, num, skb); - if (err) { + if (err < 0) { skb_unlink(skb, &vi->recv); trim_pages(vi, skb); kfree_skb(skb); @@ -373,7 +373,7 @@ static bool try_fill_recv(struct virtnet skb_queue_head(&vi->recv, skb); err = vi->rvq->vq_ops->add_buf(vi->rvq, sg, 0, 1, skb); - if (err) { + if (err < 0) { skb_unlink(skb,...
2009 Sep 21
0
[PATCH 2/6] virtio: make add_buf return capacity remaining
...ers/net/virtio_net.c --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -320,7 +320,7 @@ static bool try_fill_recv_maxbufs(struct skb_queue_head(&vi->recv, skb); err = vi->rvq->vq_ops->add_buf(vi->rvq, sg, 0, num, skb); - if (err) { + if (err < 0) { skb_unlink(skb, &vi->recv); trim_pages(vi, skb); kfree_skb(skb); @@ -373,7 +373,7 @@ static bool try_fill_recv(struct virtnet skb_queue_head(&vi->recv, skb); err = vi->rvq->vq_ops->add_buf(vi->rvq, sg, 0, 1, skb); - if (err) { + if (err < 0) { skb_unlink(skb,...
2009 Aug 18
2
[PATCH 1/2] virtio: Add a can_add_buf helper
This helper returns 1 if a call to add_buf will not fail with -ENOSPC. This will help callers that do while(1) { alloc() if (add_buf()) { free(); break; } } This will result in one less alloc/free exercise. Signed-off-by: Amit Shah <amit.shah at redhat.com> --- drivers/virtio/virtio_ring.c | 8 ++++++++ include/linux/virtio.h | 5 +++++ 2 files changed, 13
2009 Aug 18
2
[PATCH 1/2] virtio: Add a can_add_buf helper
This helper returns 1 if a call to add_buf will not fail with -ENOSPC. This will help callers that do while(1) { alloc() if (add_buf()) { free(); break; } } This will result in one less alloc/free exercise. Signed-off-by: Amit Shah <amit.shah at redhat.com> --- drivers/virtio/virtio_ring.c | 8 ++++++++ include/linux/virtio.h | 5 +++++ 2 files changed, 13
2010 Jun 06
5
[PATCH] virtio_net: indicate oom when addbuf returns failure
...e point on one of my systems: observed BW would drop with high CPU usage until reboot. Can't reproduce it now anymore .. > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > > @@ -318,6 +318,7 @@ static bool try_fill_recv_maxbufs(struct > skb_unlink(skb, &vi->recv); > trim_pages(vi, skb); > kfree_skb(skb); > + oom = true; > break; > } > vi->num++; > @@ -368,6 +369,7 @@ static bool try_fill...
2010 Jun 06
5
[PATCH] virtio_net: indicate oom when addbuf returns failure
...e point on one of my systems: observed BW would drop with high CPU usage until reboot. Can't reproduce it now anymore .. > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > > @@ -318,6 +318,7 @@ static bool try_fill_recv_maxbufs(struct > skb_unlink(skb, &vi->recv); > trim_pages(vi, skb); > kfree_skb(skb); > + oom = true; > break; > } > vi->num++; > @@ -368,6 +369,7 @@ static bool try_fill...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 6/13] [Mostly resend] virtio additions
...rt_xmit(struct sk_buff *skb, struct net_device *dev) { struct virtnet_info *vi = netdev_priv(dev); @@ -273,11 +294,25 @@ static int start_xmit(struct sk_buff *skb, struct net_device *dev) if (err) { pr_debug("%s: virtio not prepared to send\n", dev->name); skb_unlink(skb, &vi->send); + if (vi->out_max != vi->out_num) + printk("%s: out_max changed from %u to %u\n", + dev->name, vi->out_max, vi->out_num); + vi->out_max = vi->out_num; + vi->out_num = 0; + /* Kick off...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 6/13] [Mostly resend] virtio additions
...rt_xmit(struct sk_buff *skb, struct net_device *dev) { struct virtnet_info *vi = netdev_priv(dev); @@ -273,11 +294,25 @@ static int start_xmit(struct sk_buff *skb, struct net_device *dev) if (err) { pr_debug("%s: virtio not prepared to send\n", dev->name); skb_unlink(skb, &vi->send); + if (vi->out_max != vi->out_num) + printk("%s: out_max changed from %u to %u\n", + dev->name, vi->out_max, vi->out_num); + vi->out_max = vi->out_num; + vi->out_num = 0; + /* Kick off...
2007 Nov 18
3
[PATCH 1/2] virtio: fix net driver loop case where we fail to restart
skb is only NULL the first time around: it's more correct to test for being under-budget. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> diff -r 2a94425ac7d5 drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c Thu Nov 15 13:47:28 2007 +1100 +++ b/drivers/net/virtio_net.c Thu Nov 15 23:10:44 2007 +1100 @@ -198,8 +198,8 @@ again: if (vi->num < vi->max / 2)
2007 Nov 18
3
[PATCH 1/2] virtio: fix net driver loop case where we fail to restart
skb is only NULL the first time around: it's more correct to test for being under-budget. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> diff -r 2a94425ac7d5 drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c Thu Nov 15 13:47:28 2007 +1100 +++ b/drivers/net/virtio_net.c Thu Nov 15 23:10:44 2007 +1100 @@ -198,8 +198,8 @@ again: if (vi->num < vi->max / 2)
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
2008 Dec 14
5
[PATCH] AF_VMCHANNEL address family for guest<->host communication.
..._KERNEL); + if (unlikely(!skb)) + break; + + skb_put(skb, max_packet_len); + vmchannel_desc_to_sg(sg, skb); + skb_to_sgvec(skb, sg + 1, 0, skb->len); + skb_queue_head(&vmc_dev.rx_skbuff_q, skb); + + err = vmc_dev.rq->vq_ops->add_buf(vmc_dev.rq, sg, 0, 2, skb); + if (err) { + skb_unlink(skb, &vmc_dev.rx_skbuff_q); + kfree_skb(skb); + break; + } + num++; + } + + if (num) + vmc_dev.rq->vq_ops->kick(vmc_dev.rq); + + return num; +} + +static void vmchannel_rx(unsigned long data) +{ + struct sk_buff *skb; + unsigned int l; + + while ((skb = vmc_dev.rq->vq_ops->ge...
2008 Dec 14
5
[PATCH] AF_VMCHANNEL address family for guest<->host communication.
..._KERNEL); + if (unlikely(!skb)) + break; + + skb_put(skb, max_packet_len); + vmchannel_desc_to_sg(sg, skb); + skb_to_sgvec(skb, sg + 1, 0, skb->len); + skb_queue_head(&vmc_dev.rx_skbuff_q, skb); + + err = vmc_dev.rq->vq_ops->add_buf(vmc_dev.rq, sg, 0, 2, skb); + if (err) { + skb_unlink(skb, &vmc_dev.rx_skbuff_q); + kfree_skb(skb); + break; + } + num++; + } + + if (num) + vmc_dev.rq->vq_ops->kick(vmc_dev.rq); + + return num; +} + +static void vmchannel_rx(unsigned long data) +{ + struct sk_buff *skb; + unsigned int l; + + while ((skb = vmc_dev.rq->vq_ops->ge...
2007 Jul 03
6
[PATCH 1/3] Virtio draft IV
In response to Avi's excellent analysis, I've updated virtio as promised (apologies for the delay, travel got in the way). === This attempts to implement a "virtual I/O" layer which should allow common drivers to be efficiently used across most virtual I/O mechanisms. It will no-doubt need further enhancement. The details of probing the device are left to hypervisor-specific
2007 Jul 03
6
[PATCH 1/3] Virtio draft IV
In response to Avi's excellent analysis, I've updated virtio as promised (apologies for the delay, travel got in the way). === This attempts to implement a "virtual I/O" layer which should allow common drivers to be efficiently used across most virtual I/O mechanisms. It will no-doubt need further enhancement. The details of probing the device are left to hypervisor-specific
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c