From owner-svn-src-all@FreeBSD.ORG Thu Feb 19 20:36:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28BA9B10; Thu, 19 Feb 2015 20:36:39 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B9553E70; Thu, 19 Feb 2015 20:36:38 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t1JKaYR2081734 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 19 Feb 2015 23:36:34 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t1JKaYsV081733; Thu, 19 Feb 2015 23:36:34 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 19 Feb 2015 23:36:34 +0300 From: Gleb Smirnoff To: Navdeep Parhar Subject: Re: svn commit: r278977 - in head/sys: dev/cxgb dev/cxgb/sys dev/cxgb/ulp/tom dev/xen/netfront sys Message-ID: <20150219203634.GL15484@FreeBSD.org> References: <201502190119.t1J1JhSI025601@svn.freebsd.org> <54E62FB6.6050800@FreeBSD.org> <20150219200257.GK15484@FreeBSD.org> <54E64444.8030506@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <54E64444.8030506@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Roger Pau =?iso-8859-1?Q?Monn=E9?= , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 20:36:39 -0000 On Thu, Feb 19, 2015 at 12:15:00PM -0800, Navdeep Parhar wrote: N> On 02/19/15 12:02, Gleb Smirnoff wrote: N> > On Thu, Feb 19, 2015 at 07:47:18PM +0100, Roger Pau Monné wrote: N> > R> El 19/02/15 a les 2.19, Gleb Smirnoff ha escrit: N> > R> > Author: glebius N> > R> > Date: Thu Feb 19 01:19:42 2015 N> > R> > New Revision: 278977 N> > R> > URL: https://svnweb.freebsd.org/changeset/base/278977 N> > R> > N> > R> > Log: N> > R> > Provide a set of inline functions to manage simple mbuf(9) queues, based N> > R> > on queue(3)'s STAILQ. Utilize them in cxgb(4) and Xen, deleting home N> > R> > grown implementations. N> > R> > N> > R> > Sponsored by: Netflix N> > R> > Sponsored by: Nginx, Inc. N> > R> N> > R> Have you tested this commit on Xen? I'm getting the following: N> > R> N> > R> xn0: at device/vif/0 on xenbusb_front0 N> > R> xn0: Ethernet address: 00:16:3e:51:85:e3 N> > R> xenbusb_back0: on xenstore0 N> > R> xbd0: Back-end specified ring-pages of 15 is not a power of 2. Limited to 8. N> > R> xn0: backend features: feature-sg feature-gso-tcp4 N> > R> panic: no mbufs processed N> > R> cpuid = 0 N> > R> KDB: stack backtrace: N> > R> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe007adc3920 N> > R> vpanic() at vpanic+0x189/frame 0xfffffe007adc39a0 N> > R> kassert_panic() at kassert_panic+0x132/frame 0xfffffe007adc3a10 N> > R> network_alloc_rx_buffers() at network_alloc_rx_buffers+0x439/frame 0xfffffe007adc3ac0 N> > R> network_connect() at network_connect+0xac1/frame 0xfffffe007adc3b50 N> > R> netfront_backend_changed() at netfront_backend_changed+0xed/frame 0xfffffe007adc3b90 N> > R> xenwatch_thread() at xenwatch_thread+0x1a2/frame 0xfffffe007adc3bb0 N> > R> fork_exit() at fork_exit+0x84/frame 0xfffffe007adc3bf0 N> > R> fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe007adc3bf0 N> > R> --- trap 0, rip = 0, rsp = 0xfffffe007adc3cb0, rbp = 0 --- N> > R> KDB: enter: panic N> > R> [ thread pid 15 tid 100038 ] N> > R> Stopped at kdb_enter+0x3e: movq $0,kdb_why N> > N> > I guess the problem is that the queue limit isn't initialized. Please N> > try the attached patch. N> > N> > The problem with older mbufq was that it doesn't have any sane limit N> > on it. So, converting to new, I simply put INT_MAX, which is ugly. N> N> Is mq_len supposed to count the number of mbufs in the mbufq? Then it N> doesn't work for m_next linked chains. It pretends to enforce a cap on N> the number of mbufs in the mbufq while doing no such thing. If it's not N> trying to count the number of mbufs then I'd like to know exactly what N> it does? It counts number of packets. As it did the same in the previous version of mbufq. And as it did in struct ifqueue. So, new mbufq doesn't bring any new functionality, it converges what two copies of mbufq.h and one copy of ifq.h did. I am not against adding new features to it, if anyone wishes to. -- Totus tuus, Glebius.