From nobody Fri Apr 07 14:10:27 2023 X-Original-To: current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PtKyx5M3pz44gYG for ; Fri, 7 Apr 2023 14:10:49 +0000 (UTC) (envelope-from gallatin@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PtKyx4FzTz3Cdv; Fri, 7 Apr 2023 14:10:49 +0000 (UTC) (envelope-from gallatin@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680876649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gGORO/9psbbsfhHiPy77wEk7ap9ymsE4afsQWFF92Ss=; b=fGTJQ6ZEySZq+Nnz31pdw6RON/2HuFYjiQgd1eQmK6DUp8YKelhmoRcPc33mHOv3dQyGik pgtMGtFal36XgNOyeJefZb8FOShd44aAIjijJk0u3yQ8+zlqlMFzbCRBfPfaYDLT/aPZX8 0N2kVSbVoRdBzSItaEQtNVw9p0YFBfuCISvGX2+gO06BToAYx7ywqkVz9dOEgK41VxoMHg E7B+AVZynDQCe7+3GCHaq5IcBVGFnXwVGtp/m/JpE2A0HEadCzL9JmENSnw1iyPYanCFGu 2+ppjnn/KKRhnZT2SyuL8LZDoGgd2sm7ayNc/9EnxRJUGycaa58rYUdHbPLyLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680876649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gGORO/9psbbsfhHiPy77wEk7ap9ymsE4afsQWFF92Ss=; b=yuYsTEaIX8+/UyUNtylqmHE1GI8lNsDG5c3nI9kl4y064e0uGllivWHjT1BPgp4gZcgw1q ooODLXEvMc7pj3W7ReFQSpjgcJk+jJvFNwrPOEhP+NAcJp0uyEGmPd9gg8VIiLZwEn/278 LSbY5tmXZ+s9m5fEifZnSn9ZLIE+iQaRm6cmjOG+1qiNoDDJbNkrwVb1ANfEBeHdO0E4aV 7o8rVGq2nyRiE63mgRhXfrewWv1k8/zb1TIzgiHgPbnB7uZ+PCNR4xYRY3RAjEj5Dn/8LS +9ndG9EazNuCxRMwMMUrww8/3FdbxFylMXUA/uouZo0FurJRAphB9vm+zenJhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680876649; a=rsa-sha256; cv=none; b=LuKyEtTWi1IWIPbkvsZG1S/jO3OYgASl85uBhM0k272fIeN6LNb600jvcmwkEwRXqy0/be fPW5U1KALHqv7Kv3FkHAed40zUXCyCVKF384vrLLJDdC+Q/a5gySYsEJhKr2l7R3ph3TUX 5yurwC39sKdnnruaqv3J1pzeEUo5cPFfQs7b04lc0439XLU3qGDdA5u1YUxuali2k3IQ8v ypOrHEXEMqRoGboIbdR2pkAJgEszlDt/bgf+akveEfG2xE9Xj+3GSXXtMSg+dRKqIq0dFX NhSsFdAhDEP5EedR7icelvQq2HAZFWa3ETEKutNVCq4NeWEAtIJFtvNO+8qlJA== Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (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 did not present a certificate) (Authenticated sender: gallatin) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PtKyx31qRz16GK; Fri, 7 Apr 2023 14:10:49 +0000 (UTC) (envelope-from gallatin@freebsd.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 3605127C0054; Fri, 7 Apr 2023 10:10:49 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Fri, 07 Apr 2023 10:10:49 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejhedgjeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvvefutgesrg dtreerreertdenucfhrhhomhepfdffrhgvficuifgrlhhlrghtihhnfdcuoehgrghllhgr thhinhesfhhrvggvsghsugdrohhrgheqnecuggftrfgrthhtvghrnhepgefgueegveeutd euvdelfeffudetgedtffduieehhffggeefkeffieeuveekuedunecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghgrlhhlrghtihhnodhmvghsmh htphgruhhthhhpvghrshhonhgrlhhithihqddufeefheelvddvudeiqddvleehtdegudek gedqghgrlhhlrghtihhnpeepfhhrvggvsghsugdrohhrghesfhgrshhtmhgrihhlrdgtoh hm X-ME-Proxy: Feedback-ID: i41414658:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 13C52B60098; Fri, 7 Apr 2023 10:10:48 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-334-g8c072af647-fm-20230330.001-g8c072af6 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 Message-Id: <540b450c-ea31-4f8f-be87-db99d86d2e85@app.fastmail.com> In-Reply-To: References: Date: Fri, 07 Apr 2023 10:10:27 -0400 From: "Drew Gallatin" To: "Gleb Smirnoff" , zlei@freebsd.org, hselasky@freebsd.org, kib@freebsd.org, bz@freebsd.org Cc: current@freebsd.org Subject: Re: IFF_KNOWSEPOCH -> IFF_NEEDSEPOCH Content-Type: multipart/alternative; boundary=2c4baf6487604194a585d590f9328120 X-ThisMailContainsUnwantedMimeParts: N --2c4baf6487604194a585d590f9328120 Content-Type: text/plain This sounds like a good plan to me On Thu, Apr 6, 2023, at 2:34 PM, Gleb Smirnoff wrote: > Hi, > > recently we had several drivers marked with IFF_KNOWSEPOCH > which reminded me that this flag was supposed to be temporary. > > Here is the change that introduced it e87c4940156. It was > caused by several drivers sending packets from non-interrupt > context and thus triggering NET_EPOCH_ASSERT(). It was about > 10 - 20 drivers having this problem initially and reduced down > to a few after 4426b2e64bd. We had a pretty heated dicussion > back then and I apologize for that. > > May I suggest before entering FreeBSD 14.0-RELEASE cycle we > will get back to what was there before e87c4940156? > > To avoid the driver fallout that we used to have back in > early 2020, here is the plan. In ether_input() where we > now conditionally on the IFF_KNOWSEPOCH flag enter/exit the > epoch with INVARIANTS we will also conditionally enter/exit > in case we are supposed to be in the epoch wrt the flag, but > we are not. We will also print a warning once, like "interface > foo0 called if_input without epoch". This handling will be > converted to normal assertion after a couple months. > > If everybody is fine with this suggestion I will post > a review. Otherwise please express your concerns. > > -- > Gleb Smirnoff > --2c4baf6487604194a585d590f9328120 Content-Type: text/html Content-Transfer-Encoding: quoted-printable
This sounds lik= e a good plan to me

On Thu, Apr 6, 2023, at= 2:34 PM, Gleb Smirnoff wrote:
  Hi,

recently we = had several drivers marked with IFF_KNOWSEPOCH
which remin= ded me that this flag was supposed to be temporary.

Here is the change that introduced it e87c4940156. It was
caused by several drivers sending packets from non-interrupt
context and thus triggering NET_EPOCH_ASSERT(). It was about=
10 - 20 drivers having this problem initially and reduced= down
to a few after 4426b2e64bd. We had a pretty heated d= icussion
back then and I apologize for that.

May I suggest before entering FreeBSD 14.0-RELEASE cycle= we
will get back to what was there before e87c4940156?

To avoid the driver fallout that we used to h= ave back in
early 2020, here is the plan. In ether_input()= where we
now conditionally on the IFF_KNOWSEPOCH flag ent= er/exit the
epoch with INVARIANTS we will also conditional= ly enter/exit
in case we are supposed to be in the epoch w= rt the flag, but
we are not. We will also print a warning = once, like "interface
foo0 called if_input without epoch".= This handling will be
converted to normal assertion after= a couple months.

If everybody is fine with= this suggestion I will post
a review. Otherwise please ex= press your concerns.

-- 
Gleb Smirnoff

--2c4baf6487604194a585d590f9328120--