search for: receive_big

Displaying 20 results from an estimated 108 matches for "receive_big".

2013 Dec 25
2
[PATCH stable 2/2] virtio-net: make all RX paths handle erors consistently
...+297,34 @@ static struct sk_buff *page_to_skb(struct receive_queue *rq, return skb; } +static struct sk_buff *receive_small(void *buf, unsigned int len) +{ + struct sk_buff * skb = buf; + + len -= sizeof(struct virtio_net_hdr); + skb_trim(skb, len); + + return skb; +} + +static struct sk_buff *receive_big(struct net_device *dev, + struct receive_queue *rq, + void *buf) +{ + struct page *page = buf; + struct sk_buff *skb = page_to_skb(rq, page, 0); + + if (unlikely(!skb)) + goto err; + + return skb; + +err: + dev->stats.rx_dropped++; + give_pages(rq, page); + return NULL; +} + static...
2013 Dec 25
2
[PATCH stable 2/2] virtio-net: make all RX paths handle erors consistently
...+297,34 @@ static struct sk_buff *page_to_skb(struct receive_queue *rq, return skb; } +static struct sk_buff *receive_small(void *buf, unsigned int len) +{ + struct sk_buff * skb = buf; + + len -= sizeof(struct virtio_net_hdr); + skb_trim(skb, len); + + return skb; +} + +static struct sk_buff *receive_big(struct net_device *dev, + struct receive_queue *rq, + void *buf) +{ + struct page *page = buf; + struct sk_buff *skb = page_to_skb(rq, page, 0); + + if (unlikely(!skb)) + goto err; + + return skb; + +err: + dev->stats.rx_dropped++; + give_pages(rq, page); + return NULL; +} + static...
2013 Dec 26
1
[PATCH stable v2 2/3] virtio-net: make all RX paths handle errors consistently
...+297,34 @@ static struct sk_buff *page_to_skb(struct receive_queue *rq, return skb; } +static struct sk_buff *receive_small(void *buf, unsigned int len) +{ + struct sk_buff * skb = buf; + + len -= sizeof(struct virtio_net_hdr); + skb_trim(skb, len); + + return skb; +} + +static struct sk_buff *receive_big(struct net_device *dev, + struct receive_queue *rq, + void *buf) +{ + struct page *page = buf; + struct sk_buff *skb = page_to_skb(rq, page, 0); + + if (unlikely(!skb)) + goto err; + + return skb; + +err: + dev->stats.rx_dropped++; + give_pages(rq, page); + return NULL; +} + static...
2013 Dec 26
1
[PATCH stable v2 2/3] virtio-net: make all RX paths handle errors consistently
...+297,34 @@ static struct sk_buff *page_to_skb(struct receive_queue *rq, return skb; } +static struct sk_buff *receive_small(void *buf, unsigned int len) +{ + struct sk_buff * skb = buf; + + len -= sizeof(struct virtio_net_hdr); + skb_trim(skb, len); + + return skb; +} + +static struct sk_buff *receive_big(struct net_device *dev, + struct receive_queue *rq, + void *buf) +{ + struct page *page = buf; + struct sk_buff *skb = page_to_skb(rq, page, 0); + + if (unlikely(!skb)) + goto err; + + return skb; + +err: + dev->stats.rx_dropped++; + give_pages(rq, page); + return NULL; +} + static...
2014 Nov 24
0
[PATCH v3 19/41] virtio_net: pass vi around
...n, unsigned int truesize) { - struct virtnet_info *vi = rq->vq->vdev->priv; struct sk_buff *skb; struct skb_vnet_hdr *hdr; unsigned int copy, hdr_len, hdr_padded_len; @@ -328,12 +328,13 @@ static struct sk_buff *receive_small(void *buf, unsigned int len) } static struct sk_buff *receive_big(struct net_device *dev, + struct virtnet_info *vi, struct receive_queue *rq, void *buf, unsigned int len) { struct page *page = buf; - struct sk_buff *skb = page_to_skb(rq, page, 0, len, PAGE_SIZE); + struct sk_buff *skb = page_to_skb(vi, rq, page, 0, len, PAGE_SIZE...
2014 Nov 24
0
[PATCH v3 19/41] virtio_net: pass vi around
...n, unsigned int truesize) { - struct virtnet_info *vi = rq->vq->vdev->priv; struct sk_buff *skb; struct skb_vnet_hdr *hdr; unsigned int copy, hdr_len, hdr_padded_len; @@ -328,12 +328,13 @@ static struct sk_buff *receive_small(void *buf, unsigned int len) } static struct sk_buff *receive_big(struct net_device *dev, + struct virtnet_info *vi, struct receive_queue *rq, void *buf, unsigned int len) { struct page *page = buf; - struct sk_buff *skb = page_to_skb(rq, page, 0, len, PAGE_SIZE); + struct sk_buff *skb = page_to_skb(vi, rq, page, 0, len, PAGE_SIZE...
2014 Nov 27
0
[PATCH v5 22/45] virtio_net: pass vi around
...n, unsigned int truesize) { - struct virtnet_info *vi = rq->vq->vdev->priv; struct sk_buff *skb; struct skb_vnet_hdr *hdr; unsigned int copy, hdr_len, hdr_padded_len; @@ -328,12 +328,13 @@ static struct sk_buff *receive_small(void *buf, unsigned int len) } static struct sk_buff *receive_big(struct net_device *dev, + struct virtnet_info *vi, struct receive_queue *rq, void *buf, unsigned int len) { struct page *page = buf; - struct sk_buff *skb = page_to_skb(rq, page, 0, len, PAGE_SIZE); + struct sk_buff *skb = page_to_skb(vi, rq, page, 0, len, PAGE_SIZE...
2014 Nov 27
0
[PATCH v6 23/46] virtio_net: pass vi around
...n, unsigned int truesize) { - struct virtnet_info *vi = rq->vq->vdev->priv; struct sk_buff *skb; struct skb_vnet_hdr *hdr; unsigned int copy, hdr_len, hdr_padded_len; @@ -328,12 +328,13 @@ static struct sk_buff *receive_small(void *buf, unsigned int len) } static struct sk_buff *receive_big(struct net_device *dev, + struct virtnet_info *vi, struct receive_queue *rq, void *buf, unsigned int len) { struct page *page = buf; - struct sk_buff *skb = page_to_skb(rq, page, 0, len, PAGE_SIZE); + struct sk_buff *skb = page_to_skb(vi, rq, page, 0, len, PAGE_SIZE...
2014 Nov 30
0
[PATCH v7 23/46] virtio_net: pass vi around
...n, unsigned int truesize) { - struct virtnet_info *vi = rq->vq->vdev->priv; struct sk_buff *skb; struct skb_vnet_hdr *hdr; unsigned int copy, hdr_len, hdr_padded_len; @@ -328,12 +328,13 @@ static struct sk_buff *receive_small(void *buf, unsigned int len) } static struct sk_buff *receive_big(struct net_device *dev, + struct virtnet_info *vi, struct receive_queue *rq, void *buf, unsigned int len) { struct page *page = buf; - struct sk_buff *skb = page_to_skb(rq, page, 0, len, PAGE_SIZE); + struct sk_buff *skb = page_to_skb(vi, rq, page, 0, len, PAGE_SIZE...
2014 Dec 01
0
[PATCH v8 23/50] virtio_net: pass vi around
...n, unsigned int truesize) { - struct virtnet_info *vi = rq->vq->vdev->priv; struct sk_buff *skb; struct skb_vnet_hdr *hdr; unsigned int copy, hdr_len, hdr_padded_len; @@ -328,12 +328,13 @@ static struct sk_buff *receive_small(void *buf, unsigned int len) } static struct sk_buff *receive_big(struct net_device *dev, + struct virtnet_info *vi, struct receive_queue *rq, void *buf, unsigned int len) { struct page *page = buf; - struct sk_buff *skb = page_to_skb(rq, page, 0, len, PAGE_SIZE); + struct sk_buff *skb = page_to_skb(vi, rq, page, 0, len, PAGE_SIZE...
2014 Nov 27
0
[PATCH v5 22/45] virtio_net: pass vi around
...n, unsigned int truesize) { - struct virtnet_info *vi = rq->vq->vdev->priv; struct sk_buff *skb; struct skb_vnet_hdr *hdr; unsigned int copy, hdr_len, hdr_padded_len; @@ -328,12 +328,13 @@ static struct sk_buff *receive_small(void *buf, unsigned int len) } static struct sk_buff *receive_big(struct net_device *dev, + struct virtnet_info *vi, struct receive_queue *rq, void *buf, unsigned int len) { struct page *page = buf; - struct sk_buff *skb = page_to_skb(rq, page, 0, len, PAGE_SIZE); + struct sk_buff *skb = page_to_skb(vi, rq, page, 0, len, PAGE_SIZE...
2014 Nov 27
0
[PATCH v6 23/46] virtio_net: pass vi around
...n, unsigned int truesize) { - struct virtnet_info *vi = rq->vq->vdev->priv; struct sk_buff *skb; struct skb_vnet_hdr *hdr; unsigned int copy, hdr_len, hdr_padded_len; @@ -328,12 +328,13 @@ static struct sk_buff *receive_small(void *buf, unsigned int len) } static struct sk_buff *receive_big(struct net_device *dev, + struct virtnet_info *vi, struct receive_queue *rq, void *buf, unsigned int len) { struct page *page = buf; - struct sk_buff *skb = page_to_skb(rq, page, 0, len, PAGE_SIZE); + struct sk_buff *skb = page_to_skb(vi, rq, page, 0, len, PAGE_SIZE...
2014 Nov 30
0
[PATCH v7 23/46] virtio_net: pass vi around
...n, unsigned int truesize) { - struct virtnet_info *vi = rq->vq->vdev->priv; struct sk_buff *skb; struct skb_vnet_hdr *hdr; unsigned int copy, hdr_len, hdr_padded_len; @@ -328,12 +328,13 @@ static struct sk_buff *receive_small(void *buf, unsigned int len) } static struct sk_buff *receive_big(struct net_device *dev, + struct virtnet_info *vi, struct receive_queue *rq, void *buf, unsigned int len) { struct page *page = buf; - struct sk_buff *skb = page_to_skb(rq, page, 0, len, PAGE_SIZE); + struct sk_buff *skb = page_to_skb(vi, rq, page, 0, len, PAGE_SIZE...
2014 Dec 01
0
[PATCH v8 23/50] virtio_net: pass vi around
...n, unsigned int truesize) { - struct virtnet_info *vi = rq->vq->vdev->priv; struct sk_buff *skb; struct skb_vnet_hdr *hdr; unsigned int copy, hdr_len, hdr_padded_len; @@ -328,12 +328,13 @@ static struct sk_buff *receive_small(void *buf, unsigned int len) } static struct sk_buff *receive_big(struct net_device *dev, + struct virtnet_info *vi, struct receive_queue *rq, void *buf, unsigned int len) { struct page *page = buf; - struct sk_buff *skb = page_to_skb(rq, page, 0, len, PAGE_SIZE); + struct sk_buff *skb = page_to_skb(vi, rq, page, 0, len, PAGE_SIZE...
2014 Nov 25
1
[PATCH v4 20/42] virtio_net: pass vi around
...n, unsigned int truesize) { - struct virtnet_info *vi = rq->vq->vdev->priv; struct sk_buff *skb; struct skb_vnet_hdr *hdr; unsigned int copy, hdr_len, hdr_padded_len; @@ -328,12 +328,13 @@ static struct sk_buff *receive_small(void *buf, unsigned int len) } static struct sk_buff *receive_big(struct net_device *dev, + struct virtnet_info *vi, struct receive_queue *rq, void *buf, unsigned int len) { struct page *page = buf; - struct sk_buff *skb = page_to_skb(rq, page, 0, len, PAGE_SIZE); + struct sk_buff *skb = page_to_skb(vi, rq, page, 0, len, PAGE_SIZE...
2014 Nov 25
1
[PATCH v4 20/42] virtio_net: pass vi around
...n, unsigned int truesize) { - struct virtnet_info *vi = rq->vq->vdev->priv; struct sk_buff *skb; struct skb_vnet_hdr *hdr; unsigned int copy, hdr_len, hdr_padded_len; @@ -328,12 +328,13 @@ static struct sk_buff *receive_small(void *buf, unsigned int len) } static struct sk_buff *receive_big(struct net_device *dev, + struct virtnet_info *vi, struct receive_queue *rq, void *buf, unsigned int len) { struct page *page = buf; - struct sk_buff *skb = page_to_skb(rq, page, 0, len, PAGE_SIZE); + struct sk_buff *skb = page_to_skb(vi, rq, page, 0, len, PAGE_SIZE...
2016 Dec 23
1
[RFC PATCH] virtio_net: XDP support for adjust_head
...+395,7 @@ static u32 do_xdp_prog(struct virtnet_info *vi, else hdr_padded_len = sizeof(struct padded_vnet_hdr); + xdp.data_hard_start = buf - vi->headroom; xdp.data = buf + hdr_padded_len; xdp.data_end = xdp.data + (len - vi->hdr_len); @@ -430,9 +434,12 @@ static struct sk_buff *receive_big(struct net_device *dev, void *buf, unsigned int len) { - struct bpf_prog *xdp_prog; struct page *page = buf; + struct bpf_prog *xdp_prog; struct sk_buff *skb; + int offset; + + offset = vi->headroom; rcu_read_lock(); xdp_prog = rcu_dereference(rq->xdp_prog); @@ -442...
2016 Dec 23
1
[RFC PATCH] virtio_net: XDP support for adjust_head
...+395,7 @@ static u32 do_xdp_prog(struct virtnet_info *vi, else hdr_padded_len = sizeof(struct padded_vnet_hdr); + xdp.data_hard_start = buf - vi->headroom; xdp.data = buf + hdr_padded_len; xdp.data_end = xdp.data + (len - vi->hdr_len); @@ -430,9 +434,12 @@ static struct sk_buff *receive_big(struct net_device *dev, void *buf, unsigned int len) { - struct bpf_prog *xdp_prog; struct page *page = buf; + struct bpf_prog *xdp_prog; struct sk_buff *skb; + int offset; + + offset = vi->headroom; rcu_read_lock(); xdp_prog = rcu_dereference(rq->xdp_prog); @@ -442...
2014 Oct 23
6
[PATCH RFC 1/4] virtio_net: pass vi around
...n, unsigned int truesize) { - struct virtnet_info *vi = rq->vq->vdev->priv; struct sk_buff *skb; struct skb_vnet_hdr *hdr; unsigned int copy, hdr_len, hdr_padded_len; @@ -328,12 +328,13 @@ static struct sk_buff *receive_small(void *buf, unsigned int len) } static struct sk_buff *receive_big(struct net_device *dev, + struct virtnet_info *vi, struct receive_queue *rq, void *buf, unsigned int len) { struct page *page = buf; - struct sk_buff *skb = page_to_skb(rq, page, 0, len, PAGE_SIZE); + struct sk_buff *skb = page_to_skb(vi, rq, page, 0, len, PAGE_SIZE...
2014 Oct 23
6
[PATCH RFC 1/4] virtio_net: pass vi around
...n, unsigned int truesize) { - struct virtnet_info *vi = rq->vq->vdev->priv; struct sk_buff *skb; struct skb_vnet_hdr *hdr; unsigned int copy, hdr_len, hdr_padded_len; @@ -328,12 +328,13 @@ static struct sk_buff *receive_small(void *buf, unsigned int len) } static struct sk_buff *receive_big(struct net_device *dev, + struct virtnet_info *vi, struct receive_queue *rq, void *buf, unsigned int len) { struct page *page = buf; - struct sk_buff *skb = page_to_skb(rq, page, 0, len, PAGE_SIZE); + struct sk_buff *skb = page_to_skb(vi, rq, page, 0, len, PAGE_SIZE...