From owner-svn-src-head@freebsd.org Wed Feb 13 18:03:54 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F81D14D3FC9 for ; Wed, 13 Feb 2019 18:03:54 +0000 (UTC) (envelope-from rrs@netflix.com) Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A82C26E2B2 for ; Wed, 13 Feb 2019 18:03:53 +0000 (UTC) (envelope-from rrs@netflix.com) Received: by mail-qt1-x832.google.com with SMTP id p48so3685692qtk.2 for ; Wed, 13 Feb 2019 10:03:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=+2Dmb8VuC0haHrG2oJmgAciQReky7ifvu6tznJvfKD0=; b=Jn6CfEWh6FJeNxTgR6TASLbeAmQX5ACyCX7VGv20gHHkgttO9B1okqZ62tGQMw9qxW WYLBSB3w49Z8bjXGwK8Q3giYD+xsc/DOpXsf18xHt2vsW7G3kBLcIpPaiw/I00vjCSJY 23zH/DGJJCiINP3lQelL6Y+Jc3u8C67Xh/4Q5UGEVdgJl5SV6ka8r6e5kMnOMf1GVmbL EZgbxSrK5ClJYC9qAKSdB13OLXq79z6CiOx+9z2uUFA2CkTJhKfHdtGtVCfHRHCjp+6L LCvVfecz+FbaUGfBF7ZVNqssWIuLvC/WRzK2jhg9VhiO1MIGW8uTCNw3zNLsMlpC6rtK bd6g== X-Gm-Message-State: AHQUAuZIJaVOGlQB9hsXTtyHDr7YFGAbyILUXRCIQqv3P7q145SqMPa2 wu+t7TtOfV4RRN72QTXba4Iu6w== X-Google-Smtp-Source: AHgI3IarW43BhaHRuhKt1pX8vAnot29SX16uqAAXewSXWqAwJgzjh/zsMxqq8hYcZIwY1W2Uxa+Piw== X-Received: by 2002:a0c:8ecc:: with SMTP id y12mr1383551qvb.41.1550081032927; Wed, 13 Feb 2019 10:03:52 -0800 (PST) Received: from ?IPv6:2607:fb10:7061:7fd::8524? ([2607:fb10:7061:7fd::8524]) by smtp.gmail.com with ESMTPSA id c10sm8858436qtm.64.2019.02.13.10.03.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Feb 2019 10:03:52 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r344099 - head/sys/net From: Randall Stewart In-Reply-To: <80314D46-6FEC-462D-8EC5-FCE1ECFF81EF@netflix.com> Date: Wed, 13 Feb 2019 13:03:51 -0500 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201902131457.x1DEvx9V051533@repo.freebsd.org> <99453977-0f52-6050-3f40-e0fd7ea43d7f@FreeBSD.org> <80314D46-6FEC-462D-8EC5-FCE1ECFF81EF@netflix.com> To: John Baldwin X-Mailer: Apple Mail (2.3445.9.1) X-Rspamd-Queue-Id: A82C26E2B2 X-Spamd-Bar: ------ X-Spamd-Result: default: False [-7.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-1.00)[-0.997,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2019 18:03:54 -0000 oh and one other thing.. It was *not* a random IFP.. it was the IFP to the lagg. I.e. an alloc() was done to the lagg.. and the free was done back to the same IFP (that provided the allocate). R > On Feb 13, 2019, at 1:02 PM, Randall Stewart wrote: >=20 > I disagree. If you define an alloc it is only > reciprocal that you should define a free. >=20 > The code in question that hit this was changed (its in a version > of rack that has the rate-limit and TLS code).. but I think these > things *should* be balanced.. if you provide an Allocate, you > should also provide a Free=E2=80=A6=20 >=20 > R >=20 >=20 >> On Feb 13, 2019, at 12:09 PM, John Baldwin wrote: >>=20 >> On 2/13/19 6:57 AM, Randall Stewart wrote: >>> Author: rrs >>> Date: Wed Feb 13 14:57:59 2019 >>> New Revision: 344099 >>> URL: https://svnweb.freebsd.org/changeset/base/344099 >>>=20 >>> Log: >>> This commit adds the missing release mechanism for the >>> ratelimiting code. The two modules (lagg and vlan) did have >>> allocation routines, and even though they are indirect (and >>> vector down to the underlying interfaces) they both need to >>> have a free routine (that also vectors down to the actual = interface). >>>=20 >>> Sponsored by: Netflix Inc. >>> Differential Revision: https://reviews.freebsd.org/D19032 >>=20 >> Hmm, I don't understand why you'd ever invoke if_snd_tag_free from = anything >> but 'tag->ifp' rather than some other ifp. What if the route for a = connection >> moves so that a tag allocated on cc0 is now on a route that goes over = em0? >> You can't expect em0 to have an if_snd_tag_free routine that will = know to >> go invoke cxgbe's snd_tag_free. I think you should always be using >> 'tag->ifp->if_snd_tag_free' to free tags and never using any other = ifp. >>=20 >> That is, I think this should be reverted and that instead you need to = fix >> the code invoking if_snd_tag_free to invoke it on the tag's ifp = instead of >> some random other ifp. >>=20 >> --=20 >> John Baldwin >>=20 >>=20 >=20 > ------ > Randall Stewart > rrs@netflix.com >=20 >=20 >=20 ------ Randall Stewart rrs@netflix.com