Displaying 8 results from an estimated 8 matches for "try_fill_recv_maxbuf".
Did you mean:
try_fill_recv_maxbufs
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
2009 Aug 19
1
[PATCH v2 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>
---
v2:
return true/false instead of 1/0
drivers/virtio/virtio_ring.c | 8 ++++++++
include/linux/virtio.h |
2009 Aug 19
1
[PATCH v2 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>
---
v2:
return true/false instead of 1/0
drivers/virtio/virtio_ring.c | 8 ++++++++
include/linux/virtio.h |
2009 Sep 21
0
[PATCH 2/6] virtio: make add_buf return capacity remaining
..., sg, 0, 1, inbuf) != 0)
+ if (in_vq->vq_ops->add_buf(in_vq, sg, 0, 1, inbuf) < 0)
BUG();
in_vq->vq_ops->kick(in_vq);
}
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
@@ -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 vi...
2009 Sep 21
0
[PATCH 2/6] virtio: make add_buf return capacity remaining
..., sg, 0, 1, inbuf) != 0)
+ if (in_vq->vq_ops->add_buf(in_vq, sg, 0, 1, inbuf) < 0)
BUG();
in_vq->vq_ops->kick(in_vq);
}
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
@@ -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 vi...
2010 Jun 06
5
[PATCH] virtio_net: indicate oom when addbuf returns failure
...he work
forever. And I suspect I actually saw this at some 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+...
2010 Jun 06
5
[PATCH] virtio_net: indicate oom when addbuf returns failure
...he work
forever. And I suspect I actually saw this at some 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+...