From patchwork Wed May 31 21:09:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J. Bruce Fields" X-Patchwork-Id: 9758149 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AAA1D602BF for ; Wed, 31 May 2017 21:09:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C6FF26E1A for ; Wed, 31 May 2017 21:09:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 901B8284C8; Wed, 31 May 2017 21:09:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1977426E1A for ; Wed, 31 May 2017 21:09:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751004AbdEaVJY (ORCPT ); Wed, 31 May 2017 17:09:24 -0400 Received: from fieldses.org ([173.255.197.46]:50024 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750898AbdEaVJX (ORCPT ); Wed, 31 May 2017 17:09:23 -0400 Received: by fieldses.org (Postfix, from userid 2815) id 12892249A; Wed, 31 May 2017 17:09:23 -0400 (EDT) Date: Wed, 31 May 2017 17:09:23 -0400 From: "bfields@fieldses.org" To: "Michael S. Tsirkin" Cc: hch , Trond Myklebust , "anna.schumaker@netapp.com" , "jlayton@poochiereds.net" , "linux-nfs@vger.kernel.org" , virtualization@lists.linux-foundation.org Subject: Re: remove function pointer casts and constify function tables Message-ID: <20170531210923.GF23526@fieldses.org> References: <20170513072557.GA14602@lst.de> <1494691819.31377.1.camel@primarydata.com> <20170515152134.GC24547@fieldses.org> <20170515154450.GA18630@lst.de> <20170523081159.GA19216@lst.de> <20170523122334.GA4298@fieldses.org> <20170526150839.GA4593@fieldses.org> <20170526150956.GB4593@fieldses.org> <20170526193133.GA9874@fieldses.org> <20170530192544-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170530192544-mutt-send-email-mst@kernel.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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@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. --- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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)]; }