bfields at fieldses.org
2017-May-26 19:31 UTC
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.
Michael S. Tsirkin
2017-May-30 16:58 UTC
remove function pointer casts and constify function tables
On Tue, May 30, 2017 at 07:26:37PM +0300, Michael S. Tsirkin wrote:> On Fri, May 26, 2017 at 03:31:33PM -0400, bfields at fieldses.org wrote: > > 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. > > 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->big_packets); > > after it? > Then boot and capture the output. > > Thanks! >Also, can you pls print the mergeable_rx_buffer_size attribute from sysfs for this device?> -- > MST
bfields at fieldses.org
2017-May-31 21:00 UTC
remove function pointer casts and constify function tables
On Tue, May 30, 2017 at 08:03:12PM +0300, Michael S. Tsirkin wrote:> On Fri, May 26, 2017 at 03:31:33PM -0400, bfields at fieldses.org wrote: > > 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. > > > So I think I know what caused this: looks like some hypervisors > aren't prepared to deal with a situation where packet size > becomes very small. > > But which hypervisors exactly? I'd like to know in order to detect these > and decide whether I blacklist bad ones or whitelist known-good ones.I'm running this under KVM on a Fedora 25 host (4.10.15-200.fc25.x86_64). Let me know if any more details about the setup would be useful. --b.
bfields at fieldses.org
2017-May-31 21:09 UTC
remove function pointer casts and constify function tables
On Tue, May 30, 2017 at 07:26:37PM +0300, Michael S. Tsirkin wrote:> On Fri, May 26, 2017 at 03:31:33PM -0400, bfields at fieldses.org wrote: > > 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. > > 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->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 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2212,6 +2212,10 @@ static int virtnet_find_vqs(struct virtnet_info *vi) for (i = 0; i < vi->max_queue_pairs; i++) { vi->rq[i].vq = vqs[rxq2vq(i)]; vi->rq[i].min_buf_len = mergeable_min_buf_len(vi, vi->rq[i].vq); + 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); vi->sq[i].vq = vqs[txq2vq(i)]; }
Possibly Parallel Threads
- remove function pointer casts and constify function tables
- remove function pointer casts and constify function tables
- remove function pointer casts and constify function tables
- remove function pointer casts and constify function tables
- [PATCH] virtio_net: lower limit on buffer size