search for: big_packet

Displaying 20 results from an estimated 201 matches for "big_packet".

Did you mean: big_packets
2013 Dec 05
6
[PATCH v2] virtio-net: free bufs correctly on invalid packet length
...irtio_net.c @@ -426,10 +426,10 @@ static void receive_buf(struct receive_queue *rq, void *buf, unsigned int len) if (unlikely(len < sizeof(struct virtio_net_hdr) + ETH_HLEN)) { pr_debug("%s: short packet %i\n", dev->name, len); dev->stats.rx_length_errors++; - if (vi->big_packets) - give_pages(rq, buf); - else if (vi->mergeable_rx_bufs) + if (vi->mergeable_rx_bufs) put_page(virt_to_head_page(buf)); + else if (vi->big_packets) + give_pages(rq, buf); else dev_kfree_skb(buf); return; -- 1.8.5.1
2013 Dec 05
6
[PATCH v2] virtio-net: free bufs correctly on invalid packet length
...irtio_net.c @@ -426,10 +426,10 @@ static void receive_buf(struct receive_queue *rq, void *buf, unsigned int len) if (unlikely(len < sizeof(struct virtio_net_hdr) + ETH_HLEN)) { pr_debug("%s: short packet %i\n", dev->name, len); dev->stats.rx_length_errors++; - if (vi->big_packets) - give_pages(rq, buf); - else if (vi->mergeable_rx_bufs) + if (vi->mergeable_rx_bufs) put_page(virt_to_head_page(buf)); + else if (vi->big_packets) + give_pages(rq, buf); else dev_kfree_skb(buf); return; -- 1.8.5.1
2013 Dec 06
1
[PATCH 1/2] virtio-net: determine type of bufs correctly
On 12/05/2013 10:36 PM, Andrey Vagin wrote: > free_unused_bufs must check vi->mergeable_rx_bufs before > vi->big_packets, because we use this sequence in other places. > Otherwise we allocate buffer of one type, then free it as another > type. > > general protection fault: 0000 [#1] SMP > Dumping ftrace buffer: > (ftrace buffer empty) > Modules linked in: ip6table_filter ip6_tables iptable_fi...
2013 Dec 06
1
[PATCH 1/2] virtio-net: determine type of bufs correctly
On 12/05/2013 10:36 PM, Andrey Vagin wrote: > free_unused_bufs must check vi->mergeable_rx_bufs before > vi->big_packets, because we use this sequence in other places. > Otherwise we allocate buffer of one type, then free it as another > type. > > general protection fault: 0000 [#1] SMP > Dumping ftrace buffer: > (ftrace buffer empty) > Modules linked in: ip6table_filter ip6_tables iptable_fi...
2017 Jul 18
1
[PATCH net-next 3/5] virtio-net: switch to use new ctx API for small buffer
...void *buf, unsigned int len) > + void *buf, void *ctx, > + unsigned int len) > { > struct sk_buff *skb; > struct bpf_prog *xdp_prog; > @@ -773,7 +774,7 @@ static int receive_buf(struct virtnet_info *vi, struct receive_queue *rq, > else if (vi->big_packets) > skb = receive_big(dev, vi, rq, buf, len); > else > - skb = receive_small(dev, vi, rq, buf, len); > + skb = receive_small(dev, vi, rq, buf, ctx, len); > > if (unlikely(!skb)) > return 0; > @@ -812,6 +813,7 @@ static int add_recvbuf_small(struct virtnet_info...
2017 Jul 18
1
[PATCH net-next 3/5] virtio-net: switch to use new ctx API for small buffer
...void *buf, unsigned int len) > + void *buf, void *ctx, > + unsigned int len) > { > struct sk_buff *skb; > struct bpf_prog *xdp_prog; > @@ -773,7 +774,7 @@ static int receive_buf(struct virtnet_info *vi, struct receive_queue *rq, > else if (vi->big_packets) > skb = receive_big(dev, vi, rq, buf, len); > else > - skb = receive_small(dev, vi, rq, buf, len); > + skb = receive_small(dev, vi, rq, buf, ctx, len); > > if (unlikely(!skb)) > return 0; > @@ -812,6 +813,7 @@ static int add_recvbuf_small(struct virtnet_info...
2013 Dec 05
9
[PATCH 0/2] virtio-net: Fix two bugs on unloading the module
They can be easy to reproduce, if you try to unload virtio-net Andrey Vagin (2): virtio-net: determine type of bufs correctly virtio: delete napi objects from netdev before releasing memory drivers/net/virtio_net.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: "Michael S. Tsirkin" <mst at redhat.com>
2013 Dec 05
9
[PATCH 0/2] virtio-net: Fix two bugs on unloading the module
They can be easy to reproduce, if you try to unload virtio-net Andrey Vagin (2): virtio-net: determine type of bufs correctly virtio: delete napi objects from netdev before releasing memory drivers/net/virtio_net.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: "Michael S. Tsirkin" <mst at redhat.com>
2013 Dec 05
2
[PATCH] virtio-net: free bufs correctly on invalid packet length
...irtio_net.c @@ -426,10 +426,10 @@ static void receive_buf(struct receive_queue *rq, void *buf, unsigned int len) if (unlikely(len < sizeof(struct virtio_net_hdr) + ETH_HLEN)) { pr_debug("%s: short packet %i\n", dev->name, len); dev->stats.rx_length_errors++; - if (vi->big_packets) - give_pages(rq, buf); - else if (vi->mergeable_rx_bufs) + if (vi->mergeable_rx_bufs) put_page(virt_to_head_page(buf)); + else if (vi->big_packets) + give_pages(rq, buf); else dev_kfree_skb(buf); return; -- 1.8.5.1
2013 Dec 05
2
[PATCH] virtio-net: free bufs correctly on invalid packet length
...irtio_net.c @@ -426,10 +426,10 @@ static void receive_buf(struct receive_queue *rq, void *buf, unsigned int len) if (unlikely(len < sizeof(struct virtio_net_hdr) + ETH_HLEN)) { pr_debug("%s: short packet %i\n", dev->name, len); dev->stats.rx_length_errors++; - if (vi->big_packets) - give_pages(rq, buf); - else if (vi->mergeable_rx_bufs) + if (vi->mergeable_rx_bufs) put_page(virt_to_head_page(buf)); + else if (vi->big_packets) + give_pages(rq, buf); else dev_kfree_skb(buf); return; -- 1.8.5.1
2013 Dec 05
0
[PATCH 1/2] virtio-net: determine type of bufs correctly
On Thu, Dec 05, 2013 at 06:36:20PM +0400, Andrey Vagin wrote: > free_unused_bufs must check vi->mergeable_rx_bufs before > vi->big_packets, because we use this sequence in other places. > Otherwise we allocate buffer of one type, then free it as another > type. > > general protection fault: 0000 [#1] SMP > Dumping ftrace buffer: > (ftrace buffer empty) > Modules linked in: ip6table_filter ip6_tables iptable_f...
2013 Dec 25
2
[PATCH stable 2/2] virtio-net: make all RX paths handle erors consistently
...unlikely(len < sizeof(struct virtio_net_hdr) + ETH_HLEN)) { @@ -372,26 +399,15 @@ static void receive_buf(struct receive_queue *rq, void *buf, unsigned int len) dev_kfree_skb(buf); return; } + if (vi->mergeable_rx_bufs) + skb = receive_mergeable(dev, rq, buf, len); + else if (vi->big_packets) + skb = receive_big(dev, rq, buf); + else + skb = receive_small(buf, len); - if (!vi->mergeable_rx_bufs && !vi->big_packets) { - skb = buf; - len -= sizeof(struct virtio_net_hdr); - skb_trim(skb, len); - } else { - page = buf; - if (vi->mergeable_rx_bufs) { - skb = rec...
2013 Dec 25
2
[PATCH stable 2/2] virtio-net: make all RX paths handle erors consistently
...unlikely(len < sizeof(struct virtio_net_hdr) + ETH_HLEN)) { @@ -372,26 +399,15 @@ static void receive_buf(struct receive_queue *rq, void *buf, unsigned int len) dev_kfree_skb(buf); return; } + if (vi->mergeable_rx_bufs) + skb = receive_mergeable(dev, rq, buf, len); + else if (vi->big_packets) + skb = receive_big(dev, rq, buf); + else + skb = receive_small(buf, len); - if (!vi->mergeable_rx_bufs && !vi->big_packets) { - skb = buf; - len -= sizeof(struct virtio_net_hdr); - skb_trim(skb, len); - } else { - page = buf; - if (vi->mergeable_rx_bufs) { - skb = rec...
2011 Jul 29
1
[PATCH RFC net-next] virtio_net: refill buffer right after being used
...b/drivers/net/virtio_net.c @@ -429,6 +429,22 @@ static int add_recvbuf_mergeable(struct virtnet_info *vi, gfp_t gfp) return err; } +static bool fill_one(struct virtio_net *vi, gfp_t gfp) +{ + int err; + + if (vi->mergeable_rx_bufs) + err = add_recvbuf_mergeable(vi, gfp); + else if (vi->big_packets) + err = add_recvbuf_big(vi, gfp); + else + err = add_recvbuf_small(vi, gfp); + + if (err >= 0) + ++vi->num; + return err; +} + /* Returns false if we couldn't fill entirely (OOM). */ static bool try_fill_recv(struct virtnet_info *vi, gfp_t gfp) { @@ -436,17 +452,10 @@ static bool...
2011 Jul 29
1
[PATCH RFC net-next] virtio_net: refill buffer right after being used
...b/drivers/net/virtio_net.c @@ -429,6 +429,22 @@ static int add_recvbuf_mergeable(struct virtnet_info *vi, gfp_t gfp) return err; } +static bool fill_one(struct virtio_net *vi, gfp_t gfp) +{ + int err; + + if (vi->mergeable_rx_bufs) + err = add_recvbuf_mergeable(vi, gfp); + else if (vi->big_packets) + err = add_recvbuf_big(vi, gfp); + else + err = add_recvbuf_small(vi, gfp); + + if (err >= 0) + ++vi->num; + return err; +} + /* Returns false if we couldn't fill entirely (OOM). */ static bool try_fill_recv(struct virtnet_info *vi, gfp_t gfp) { @@ -436,17 +452,10 @@ static bool...
2013 Dec 26
1
[PATCH stable v2 2/3] virtio-net: make all RX paths handle errors consistently
...unlikely(len < sizeof(struct virtio_net_hdr) + ETH_HLEN)) { @@ -372,26 +399,15 @@ static void receive_buf(struct receive_queue *rq, void *buf, unsigned int len) dev_kfree_skb(buf); return; } + if (vi->mergeable_rx_bufs) + skb = receive_mergeable(dev, rq, buf, len); + else if (vi->big_packets) + skb = receive_big(dev, rq, buf); + else + skb = receive_small(buf, len); - if (!vi->mergeable_rx_bufs && !vi->big_packets) { - skb = buf; - len -= sizeof(struct virtio_net_hdr); - skb_trim(skb, len); - } else { - page = buf; - if (vi->mergeable_rx_bufs) { - skb = rec...
2013 Dec 26
1
[PATCH stable v2 2/3] virtio-net: make all RX paths handle errors consistently
...unlikely(len < sizeof(struct virtio_net_hdr) + ETH_HLEN)) { @@ -372,26 +399,15 @@ static void receive_buf(struct receive_queue *rq, void *buf, unsigned int len) dev_kfree_skb(buf); return; } + if (vi->mergeable_rx_bufs) + skb = receive_mergeable(dev, rq, buf, len); + else if (vi->big_packets) + skb = receive_big(dev, rq, buf); + else + skb = receive_small(buf, len); - if (!vi->mergeable_rx_bufs && !vi->big_packets) { - skb = buf; - len -= sizeof(struct virtio_net_hdr); - skb_trim(skb, len); - } else { - page = buf; - if (vi->mergeable_rx_bufs) { - skb = rec...
2017 Jul 17
0
[PATCH net-next 3/5] virtio-net: switch to use new ctx API for small buffer
...struct receive_queue *rq, - void *buf, unsigned int len) + void *buf, void *ctx, + unsigned int len) { struct sk_buff *skb; struct bpf_prog *xdp_prog; @@ -773,7 +774,7 @@ static int receive_buf(struct virtnet_info *vi, struct receive_queue *rq, else if (vi->big_packets) skb = receive_big(dev, vi, rq, buf, len); else - skb = receive_small(dev, vi, rq, buf, len); + skb = receive_small(dev, vi, rq, buf, ctx, len); if (unlikely(!skb)) return 0; @@ -812,6 +813,7 @@ static int add_recvbuf_small(struct virtnet_info *vi, struct receive_queue *rq, struct...
2017 May 31
1
remove function pointer casts and constify function tables
...i->rq[i].vq); > > and add something like > printk(KERN_ERR, "min buf = 0x%x expected 0x%x size 0x%x big %d\n", > vi->rq[i].min_buf_len, GOOD_PACKET_LEN, > virtqueue_get_vring_size(vi->rq[i].vq), > (int)vi->big_packets); > > after it? > Then boot and capture the output. Doesn't look like that code's run on boot; apply the below, boot, and: $ dmesg|grep expected gives no output. --b. diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 9320d96a1632..b10014f7b480 100644 --...
2017 May 31
1
remove function pointer casts and constify function tables
...i->rq[i].vq); > > and add something like > printk(KERN_ERR, "min buf = 0x%x expected 0x%x size 0x%x big %d\n", > vi->rq[i].min_buf_len, GOOD_PACKET_LEN, > virtqueue_get_vring_size(vi->rq[i].vq), > (int)vi->big_packets); > > after it? > Then boot and capture the output. Doesn't look like that code's run on boot; apply the below, boot, and: $ dmesg|grep expected gives no output. --b. diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 9320d96a1632..b10014f7b480 100644 --...