search for: min_buf_len

Displaying 20 results from an estimated 34 matches for "min_buf_len".

2017 Jun 01
4
[PATCH] virtio_net: lower limit on buffer size
.../virtio_net.c index 87b5c20..60abb5d 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -842,7 +842,7 @@ static unsigned int get_mergeable_buf_len(struct receive_queue *rq, unsigned int len; len = hdr_len + clamp_t(unsigned int, ewma_pkt_len_read(avg_pkt_len), - rq->min_buf_len - hdr_len, PAGE_SIZE - hdr_len); + rq->min_buf_len, PAGE_SIZE - hdr_len); return ALIGN(len, L1_CACHE_BYTES); } @@ -2039,7 +2039,8 @@ static unsigned int mergeable_min_buf_len(struct virtnet_info *vi, struct virtqu unsigned int buf_len = hdr_len + ETH_HLEN + VLAN_HLEN + packet_len; un...
2017 Jun 01
4
[PATCH] virtio_net: lower limit on buffer size
.../virtio_net.c index 87b5c20..60abb5d 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -842,7 +842,7 @@ static unsigned int get_mergeable_buf_len(struct receive_queue *rq, unsigned int len; len = hdr_len + clamp_t(unsigned int, ewma_pkt_len_read(avg_pkt_len), - rq->min_buf_len - hdr_len, PAGE_SIZE - hdr_len); + rq->min_buf_len, PAGE_SIZE - hdr_len); return ALIGN(len, L1_CACHE_BYTES); } @@ -2039,7 +2039,8 @@ static unsigned int mergeable_min_buf_len(struct virtnet_info *vi, struct virtqu unsigned int buf_len = hdr_len + ETH_HLEN + VLAN_HLEN + packet_len; un...
2017 Mar 29
1
[PATCH v2] virtio_net: fix support for small rings
...; static int napi_weight = NAPI_POLL_WEIGHT; module_param(napi_weight, int, 0444); @@ -98,6 +99,9 @@ struct receive_queue { /* RX: fragments + linear part + virtio header */ struct scatterlist sg[MAX_SKB_FRAGS + 2]; + /* Min single buffer size for mergeable buffers case. */ + unsigned int min_buf_len; + /* Name of this receive queue: input.$index */ char name[40]; }; @@ -894,13 +898,14 @@ static int add_recvbuf_big(struct virtnet_info *vi, struct receive_queue *rq, return err; } -static unsigned int get_mergeable_buf_len(struct ewma_pkt_len *avg_pkt_len) +static unsigned int get_merge...
2017 Mar 29
1
[PATCH v2] virtio_net: fix support for small rings
...; static int napi_weight = NAPI_POLL_WEIGHT; module_param(napi_weight, int, 0444); @@ -98,6 +99,9 @@ struct receive_queue { /* RX: fragments + linear part + virtio header */ struct scatterlist sg[MAX_SKB_FRAGS + 2]; + /* Min single buffer size for mergeable buffers case. */ + unsigned int min_buf_len; + /* Name of this receive queue: input.$index */ char name[40]; }; @@ -894,13 +898,14 @@ static int add_recvbuf_big(struct virtnet_info *vi, struct receive_queue *rq, return err; } -static unsigned int get_mergeable_buf_len(struct ewma_pkt_len *avg_pkt_len) +static unsigned int get_merge...
2017 Mar 29
1
[PATCH] virtio_net: fix support for small rings
...9dc31dc..f6a379d 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -98,6 +98,9 @@ struct receive_queue { /* RX: fragments + linear part + virtio header */ struct scatterlist sg[MAX_SKB_FRAGS + 2]; + /* Min single buffer size for mergeable buffers case. */ + unsigned int min_buf_len; + /* Name of this receive queue: input.$index */ char name[40]; }; @@ -894,13 +897,14 @@ static int add_recvbuf_big(struct virtnet_info *vi, struct receive_queue *rq, return err; } -static unsigned int get_mergeable_buf_len(struct ewma_pkt_len *avg_pkt_len) +static unsigned int get_merge...
2017 Mar 29
1
[PATCH] virtio_net: fix support for small rings
...9dc31dc..f6a379d 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -98,6 +98,9 @@ struct receive_queue { /* RX: fragments + linear part + virtio header */ struct scatterlist sg[MAX_SKB_FRAGS + 2]; + /* Min single buffer size for mergeable buffers case. */ + unsigned int min_buf_len; + /* Name of this receive queue: input.$index */ char name[40]; }; @@ -894,13 +897,14 @@ static int add_recvbuf_big(struct virtnet_info *vi, struct receive_queue *rq, return err; } -static unsigned int get_mergeable_buf_len(struct ewma_pkt_len *avg_pkt_len) +static unsigned int get_merge...
2017 May 31
1
remove function pointer casts and constify function tables
...r a > > few minutes of testing. Before that patch, my server keeps working. > > > > --b. > > Others complained about that too. > I'm still trying to reproduce though. > > Meanwhile, could you please locate this line of code: > + vi->rq[i].min_buf_len = mergeable_min_buf_len(vi, vi->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), &g...
2017 May 31
1
remove function pointer casts and constify function tables
...r a > > few minutes of testing. Before that patch, my server keeps working. > > > > --b. > > Others complained about that too. > I'm still trying to reproduce though. > > Meanwhile, could you please locate this line of code: > + vi->rq[i].min_buf_len = mergeable_min_buf_len(vi, vi->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), &g...
2017 May 26
3
remove function pointer casts and constify function tables
Looks like the culprit is very likely d85b758f72b0 "virtio_net: fix support for small rings". After that patch, my NFS server VM stops responding to packets after a few minutes of testing. Before that patch, my server keeps working. --b.
2017 Jun 02
1
[PATCH v2] virtio_net: lower limit on buffer size
.../virtio_net.c index 87b5c20..60abb5d 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -842,7 +842,7 @@ static unsigned int get_mergeable_buf_len(struct receive_queue *rq, unsigned int len; len = hdr_len + clamp_t(unsigned int, ewma_pkt_len_read(avg_pkt_len), - rq->min_buf_len - hdr_len, PAGE_SIZE - hdr_len); + rq->min_buf_len, PAGE_SIZE - hdr_len); return ALIGN(len, L1_CACHE_BYTES); } @@ -2039,7 +2039,8 @@ static unsigned int mergeable_min_buf_len(struct virtnet_info *vi, struct virtqu unsigned int buf_len = hdr_len + ETH_HLEN + VLAN_HLEN + packet_len; un...
2017 Jun 02
1
[PATCH v2] virtio_net: lower limit on buffer size
.../virtio_net.c index 87b5c20..60abb5d 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -842,7 +842,7 @@ static unsigned int get_mergeable_buf_len(struct receive_queue *rq, unsigned int len; len = hdr_len + clamp_t(unsigned int, ewma_pkt_len_read(avg_pkt_len), - rq->min_buf_len - hdr_len, PAGE_SIZE - hdr_len); + rq->min_buf_len, PAGE_SIZE - hdr_len); return ALIGN(len, L1_CACHE_BYTES); } @@ -2039,7 +2039,8 @@ static unsigned int mergeable_min_buf_len(struct virtnet_info *vi, struct virtqu unsigned int buf_len = hdr_len + ETH_HLEN + VLAN_HLEN + packet_len; un...
2017 May 30
1
remove function pointer casts and constify function tables
...r a > > few minutes of testing. Before that patch, my server keeps working. > > > > --b. > > Others complained about that too. > I'm still trying to reproduce though. > > Meanwhile, could you please locate this line of code: > + vi->rq[i].min_buf_len = mergeable_min_buf_len(vi, vi->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), &g...
2017 May 30
1
remove function pointer casts and constify function tables
...r a > > few minutes of testing. Before that patch, my server keeps working. > > > > --b. > > Others complained about that too. > I'm still trying to reproduce though. > > Meanwhile, could you please locate this line of code: > + vi->rq[i].min_buf_len = mergeable_min_buf_len(vi, vi->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), &g...
2017 May 22
2
network performance degradation in virtio_net in 4.12-rc
Hi I see severe network performance degradation with the kernels 4.12-rc1 and 4.12-rc2 in the network virtio driver. Download rate drops down to about 100kB/s. I bisected it and it is caused by patch d85b758f72b05a774045545f24d70980e3e9aac4 ("virtio_net: fix support for small rings"). When I revert this patch, the problem goes away. The host is Debian Jessie with kernel 4.4.62,
2017 May 22
2
network performance degradation in virtio_net in 4.12-rc
Hi I see severe network performance degradation with the kernels 4.12-rc1 and 4.12-rc2 in the network virtio driver. Download rate drops down to about 100kB/s. I bisected it and it is caused by patch d85b758f72b05a774045545f24d70980e3e9aac4 ("virtio_net: fix support for small rings"). When I revert this patch, the problem goes away. The host is Debian Jessie with kernel 4.4.62,
2017 May 22
0
network performance degradation in virtio_net in 4.12-rc
...gt; The host is Debian Jessie with kernel 4.4.62, the guest is Debian Sid with > kernel 4.12-rc. > > Mikulas Thanks for the report! I'm not sure what causes it on this host. I'll try to reproduce. Meanwhile, could you please locate this line of code: + vi->rq[i].min_buf_len = mergeable_min_buf_len(vi, vi->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? The...
2017 May 30
0
remove function pointer casts and constify function tables
...FS server VM stops responding to packets after a > few minutes of testing. Before that patch, my server keeps working. > > --b. Others complained about that too. I'm still trying to reproduce though. Meanwhile, could you please locate this line of code: + vi->rq[i].min_buf_len = mergeable_min_buf_len(vi, vi->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->...
2017 May 26
3
remove function pointer casts and constify function tables
Probably should have cc'd virtualization at lists.linux-foundation.org too. On Fri, May 26, 2017 at 11:08:39AM -0400, bfields at fieldses.org wrote: > On Tue, May 23, 2017 at 08:23:34AM -0400, bfields at fieldses.org wrote: > > Unfortunately I can't get anything through testing. It's not your > > patches, it's something in -rc1. My server VM stops responding to
2017 May 26
3
remove function pointer casts and constify function tables
Probably should have cc'd virtualization at lists.linux-foundation.org too. On Fri, May 26, 2017 at 11:08:39AM -0400, bfields at fieldses.org wrote: > On Tue, May 23, 2017 at 08:23:34AM -0400, bfields at fieldses.org wrote: > > Unfortunately I can't get anything through testing. It's not your > > patches, it's something in -rc1. My server VM stops responding to
2023 Apr 30
1
[RFC PATCH net 2/3] virtio-net: allow usage of vrings smaller than MAX_SKB_FRAGS + 2
...default */ + if (vi->dev->max_mtu > ETH_DATA_LEN) + vi->dev->max_mtu = ETH_DATA_LEN; + if (vi->dev->mtu > ETH_DATA_LEN) + vi->dev->mtu = ETH_DATA_LEN; + + /* Don't use big packets */ + vi->big_packets = false; + vi->big_packets_num_skbfrags = 1; + + /* Fix min_buf_len for receive virtqueues */ + for (i = 0; i < vi->max_queue_pairs; i++) + vi->rq[i].min_buf_len = mergeable_min_buf_len(vi, vi->rq[i].vq); + + return 0; +} + static int virtnet_probe(struct virtio_device *vdev) { int i, err = -ENOMEM; @@ -4061,6 +4192,14 @@ static int virtnet_probe(s...