From owner-svn-src-all@freebsd.org Tue May 19 21:47:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CF4E2F61E3; Tue, 19 May 2020 21:47:12 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49RTxX2B2Xz4BC5; Tue, 19 May 2020 21:47:12 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 2CB372F1BC; Tue, 19 May 2020 21:47:12 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id A546D44D10; Tue, 19 May 2020 23:47:10 +0200 (CEST) From: "Kristof Provost" To: "Andrew Gallatin" Cc: "Eric Joyner" , "Jacob Keller" , shurd@FreeBSD.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r347418 - head/sys/net Date: Tue, 19 May 2020 23:47:10 +0200 X-Mailer: MailMate (1.13.1r5671) Message-ID: In-Reply-To: References: <201905100041.x4A0fhNT083122@repo.freebsd.org> <3BBFB371-EA44-4EE9-8A55-542CDE273CC4@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed; markup=markdown Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 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: Tue, 19 May 2020 21:47:12 -0000 On 19 May 2020, at 17:02, Andrew Gallatin wrote: > On 2020-05-19 04:21, Kristof Provost wrote: > >> The if_bnxt driver initialises |.isc_nrxd_max = {INT32_MAX, >> INT32_MAX, INT32_MAX},|, so presumably that’s the cause. >> I don’t know what a sane value would be though. I’ve defaulted to >> 4096 (because that’s what some other iflib users seems to do) for >> now, and that seems to work. It doesn’t panic and I can get traffic >> through it at least: > > You seem to be setting the max, not the default, and 4K max > descriptors on a 100g device is going to basically cripple it. > Yeah, I just grabbed whatever number other iflib users used. My immediate concern was to get it to stop panicking. > How about setting to the next power of 2 below max int so as to keep > with the authors intent? > Makes sense, yes. > If we don't already have a macro, something like (INT32_MAX >> 1) + 1 > https://reviews.freebsd.org/D24922 Best regards, Kristof