From owner-svn-src-all@freebsd.org Thu Jan 23 00:29:15 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 23D46223477; Thu, 23 Jan 2020 00:29:15 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48336y25FPz3FbN; Thu, 23 Jan 2020 00:29:13 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id 00N0T5xg001453 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 22 Jan 2020 16:29:05 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 00N0T39p001452; Wed, 22 Jan 2020 16:29:03 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Wed, 22 Jan 2020 16:29:03 -0800 From: Gleb Smirnoff To: Michael Tuexen Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r356989 - head/sys/netinet Message-ID: <20200123002903.GA1268@FreeBSD.org> References: <202001221719.00MHJrvq033961@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 48336y25FPz3FbN X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-0.84 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.87)[-0.874,0]; NEURAL_SPAM_LONG(0.03)[0.029,0]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 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, 23 Jan 2020 00:29:15 -0000 Hi Michael, On Wed, Jan 22, 2020 at 10:20:55PM +0100, Michael Tuexen wrote: M> > Log: M> > Plug possible calls into ip6?_output() without network epoch from SCTP M> > bluntly adding epoch entrance into the macro that SCTP uses to call M> > ip6?_output(). This definitely will introduce several epoch recursions. M> Can you specify under which condition NET_EPOCH_ENTER() should be called? M> Then I can try to figure out where these calls need to be made in the M> SCTP code. Thanks a lot for offering help! Basically the end goal is that any non-sleepable context associated with networking should be running in epoch. That means interrupts, callouts and taskqueues. Syscalls should enter epoch at some stage, depends on a syscall. Right now we are processing all incoming packets that came through ether_input() in the network epoch, so anytime we call sctp_output() as a _response_ to a packet that came via sctp_input() we already are in epoch. With r356989 it is going to be unnecessary recursion. When we do retransmits from a callout, then we aren't (yet) in epoch and r356989 addresses that. Same for syscalls that start SCTP connection or send data down SCTP socket. -- Gleb Smirnoff