search for: drop_mergeable_buff

Displaying 9 results from an estimated 9 matches for "drop_mergeable_buff".

Did you mean: drop_mergeable_buffer
2013 Nov 20
1
[PATCH net 1/3] virtio-net: drop the rest of buffers when we can't allocate skb
...gt; index 7bab4de..24fd502 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -222,6 +222,17 @@ static void skb_xmit_done(struct virtqueue *vq) > > netif_wake_subqueue(vi->dev, vq2txq(vq)); > > } > > > > +static void drop_mergeable_buffer(struct receive_queue *rq, int num_buf) > > +{ > > + char *buf; > > + int len; > > + > > + while (--num_buf && (buf = virtqueue_get_buf(rq->vq, &len)) != NULL) { > > + --rq->num; > > + put_page(virt_to_head_page(buf)); > > + } &gt...
2013 Nov 20
1
[PATCH net 1/3] virtio-net: drop the rest of buffers when we can't allocate skb
...gt; index 7bab4de..24fd502 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -222,6 +222,17 @@ static void skb_xmit_done(struct virtqueue *vq) > > netif_wake_subqueue(vi->dev, vq2txq(vq)); > > } > > > > +static void drop_mergeable_buffer(struct receive_queue *rq, int num_buf) > > +{ > > + char *buf; > > + int len; > > + > > + while (--num_buf && (buf = virtqueue_get_buf(rq->vq, &len)) != NULL) { > > + --rq->num; > > + put_page(virt_to_head_page(buf)); > > + } &gt...
2013 Nov 20
7
[PATCH net 1/3] virtio-net: drop the rest of buffers when we can't allocate skb
...tion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 7bab4de..24fd502 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -222,6 +222,17 @@ static void skb_xmit_done(struct virtqueue *vq) netif_wake_subqueue(vi->dev, vq2txq(vq)); } +static void drop_mergeable_buffer(struct receive_queue *rq, int num_buf) +{ + char *buf; + int len; + + while (--num_buf && (buf = virtqueue_get_buf(rq->vq, &len)) != NULL) { + --rq->num; + put_page(virt_to_head_page(buf)); + } +} + /* Called from bottom half context */ static struct sk_buff *page_to_skb(str...
2013 Nov 20
7
[PATCH net 1/3] virtio-net: drop the rest of buffers when we can't allocate skb
...tion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 7bab4de..24fd502 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -222,6 +222,17 @@ static void skb_xmit_done(struct virtqueue *vq) netif_wake_subqueue(vi->dev, vq2txq(vq)); } +static void drop_mergeable_buffer(struct receive_queue *rq, int num_buf) +{ + char *buf; + int len; + + while (--num_buf && (buf = virtqueue_get_buf(rq->vq, &len)) != NULL) { + --rq->num; + put_page(virt_to_head_page(buf)); + } +} + /* Called from bottom half context */ static struct sk_buff *page_to_skb(str...
2013 Nov 20
0
[PATCH net 1/3] virtio-net: drop the rest of buffers when we can't allocate skb
..._net.c b/drivers/net/virtio_net.c > index 7bab4de..24fd502 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -222,6 +222,17 @@ static void skb_xmit_done(struct virtqueue *vq) > netif_wake_subqueue(vi->dev, vq2txq(vq)); > } > > +static void drop_mergeable_buffer(struct receive_queue *rq, int num_buf) > +{ > + char *buf; > + int len; > + > + while (--num_buf && (buf = virtqueue_get_buf(rq->vq, &len)) != NULL) { > + --rq->num; > + put_page(virt_to_head_page(buf)); > + } > +} > + This is the same code we ha...
2013 Nov 20
2
[PATCH RFC] virtio_net: fix error handling for mergeable buffers
...ton <mwdalton at google.com> > > Cc: Eric Dumazet <edumazet at google.com> > > Cc: Shirley Ma <xma at us.ibm.com> > > Signed-off-by: Jason Wang <jasowang at redhat.com> > > Just to clarify my previous comment: it was not about the > idea of adding drop_mergeable_buffer - rather, I think that > adding knowledge about mergeable buffers into page_to_skb creates an > ugly internal API. > > Let's move the call to page_to_skb within receive_mergeable instead: > it's also nice that int offset = buf - page_address(page) logic > is not spread...
2013 Nov 20
2
[PATCH RFC] virtio_net: fix error handling for mergeable buffers
...ton <mwdalton at google.com> > > Cc: Eric Dumazet <edumazet at google.com> > > Cc: Shirley Ma <xma at us.ibm.com> > > Signed-off-by: Jason Wang <jasowang at redhat.com> > > Just to clarify my previous comment: it was not about the > idea of adding drop_mergeable_buffer - rather, I think that > adding knowledge about mergeable buffers into page_to_skb creates an > ugly internal API. > > Let's move the call to page_to_skb within receive_mergeable instead: > it's also nice that int offset = buf - page_address(page) logic > is not spread...
2013 Nov 20
0
[PATCH RFC] virtio_net: fix error handling for mergeable buffers
...> > > > Cc: Eric Dumazet <edumazet at google.com> > > > Cc: Shirley Ma <xma at us.ibm.com> > > > Signed-off-by: Jason Wang <jasowang at redhat.com> > > > > Just to clarify my previous comment: it was not about the > > idea of adding drop_mergeable_buffer - rather, I think that > > adding knowledge about mergeable buffers into page_to_skb creates an > > ugly internal API. > > > > Let's move the call to page_to_skb within receive_mergeable instead: > > it's also nice that int offset = buf - page_address(page)...
2013 Nov 20
0
[PATCH RFC] virtio_net: fix error handling for mergeable buffers
...t.com> > Cc: Michael Dalton <mwdalton at google.com> > Cc: Eric Dumazet <edumazet at google.com> > Cc: Shirley Ma <xma at us.ibm.com> > Signed-off-by: Jason Wang <jasowang at redhat.com> Just to clarify my previous comment: it was not about the idea of adding drop_mergeable_buffer - rather, I think that adding knowledge about mergeable buffers into page_to_skb creates an ugly internal API. Let's move the call to page_to_skb within receive_mergeable instead: it's also nice that int offset = buf - page_address(page) logic is not spread around like it was. Also, it&...