From nobody Mon Aug 15 00:50:01 2022 X-Original-To: dev-commits-src-all@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 4M5bJl6FH2z4ZN44; Mon, 15 Aug 2022 00:49:27 +0000 (UTC) (envelope-from kevans@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M5bJl5m2mz4GSX; Mon, 15 Aug 2022 00:49:27 +0000 (UTC) (envelope-from kevans@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660524567; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dbCZRLQFaC620fnP+mdyCZ9NqjLYjaRdtvMGEvMvMY4=; b=TkaPdQ9JNj7BxEZYUuiM8bcSkjOHZ87ddNnUpqfnA1B9cYbA8fDEZEaXwGKtg2+0d5PgJa a+EXxcVlJGsY6Rg5Ei8780N1dy0dEJE7HLosj2ihmeFMqG5OkdreIW+GbDfOkOnVGYGMwP cyXtLEK3GjWDQ9eDAQ/PNDjLqeCRFK1f6mAYIhYGRBLVj2KDSV8lBHhk7gJ7GFaoSCcj6N iTTFIodIX7xMKCH5cXx45GGsQh4LX15vX08ec1woGstBPkc7CJTmxf2eHgju/2HdxH4/gr PI2iWe3qN7JJmNpy7TAsdyONPvnMQEURACeu2kx7LT6QgrCDN1gMx/Qw1IkyfA== Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 4M5bJl4cR0z1KhS; Mon, 15 Aug 2022 00:49:27 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f170.google.com with SMTP id a4so4588645qto.10; Sun, 14 Aug 2022 17:49:27 -0700 (PDT) X-Gm-Message-State: ACgBeo1H12d9hfGGZXth6BldVkT4umuwuYW7vp8n4SV2eN4WTRfhkvi5 qK7y3CgsRat+KxMANCcXYlejvLAxBSEq6AfHITE= X-Google-Smtp-Source: AA6agR6UYomkIi8gYcgnZ1Dn9AyqW7Xq5HBkLfaIRQijBGm+6bJT0nPus7hw+pDftjvIQJaO6vyqAe7tLGgVviXoG78= X-Received: by 2002:a05:622a:11d6:b0:343:5e19:7488 with SMTP id n22-20020a05622a11d600b003435e197488mr12352850qtk.476.1660524567128; Sun, 14 Aug 2022 17:49:27 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202208140922.27E9Mewk097766@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Sun, 14 Aug 2022 17:50:01 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 9b967bd65de6 - main - domains: allow domains to be unloaded To: "Alexander V. Chernikov" Cc: "Alexander V. Chernikov" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660524567; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dbCZRLQFaC620fnP+mdyCZ9NqjLYjaRdtvMGEvMvMY4=; b=BgmF4oq6RpX7ORvJlBn5ClbxgirNEzj2WWpTqc4e/PaDqs58T++xjv20/murW7+a8me8KV tfWO4+lK5SnGrNtX1aPLuz45W3SURdEBO6PrtRP2vzo+IfZSIOJYftmzO7kJdcOOXF4DeC FOM3GKSycE1Uxe4ZQUaH2/mR+qoGjtgBXKcSohWEBRutyIcSW5Oiv5dTc8f3xSD1S2lyq8 jq1ihRBVwyJdqp8gHaIcwxAjU8KWXroAuoJMcaj2+GooJAcbPpkTj+6CeRVGbKCYax4nD5 rx5pBxnqc1MXL5ckmySistyQoOLMglCuCvFsgowNUF4xsYbk9TrapfPdbaNSnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660524567; a=rsa-sha256; cv=none; b=XFp9Ysnjq0QSoX7k3mwRK2yBuL3rwh3MRRxKdKBX6l17kgas5Kw/5eih5YutTZ1bzgWg0F ELJkFg8TxRCxGM8crw0npPYSr/Hztm9Lfht7rn34gxvI8ApT4OOMrrh2EDgLwq2GMoW7cv 1GJkhBRo1bjdydrisu4NTgqd4eLtTYl7Lg5PTNsTm8hqugzl4z30y1oZRek85qUV6p7gMQ JXSOI5aqzH04CZpMrNmz9fNvsqtyrqUNJTtA4V1qXXWTBHdW+V/VswdnkIToN0GZdXs8C/ ICW90PRGxmN1so7MBJQLvOD8fqf3Rmc4CWDLEsLgWv0m/qiaA2+QpwgZpkUTRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Sun, Aug 14, 2022 at 8:20 AM Alexander V. Chernikov w= rote: > > > > > On 14 Aug 2022, at 15:51, Kyle Evans wrote: > > > > On Sun, Aug 14, 2022 at 2:22 AM Alexander V. Chernikov > > wrote: > >> > >> The branch main has been updated by melifaro: > >> > >> URL: https://cgit.FreeBSD.org/src/commit/?id=3D9b967bd65de6647aed68a14= 1dc34f9b223a2593c > >> > >> commit 9b967bd65de6647aed68a141dc34f9b223a2593c > >> Author: Alexander V. Chernikov > >> AuthorDate: 2022-08-12 13:36:53 +0000 > >> Commit: Alexander V. Chernikov > >> CommitDate: 2022-08-14 09:22:33 +0000 > >> > >> domains: allow domains to be unloaded > >> > >> Add domain_remove() SYSUNINT callback that removes the domain > >> from the domain list if it has DOMF_UNLOADABLE flag set. > >> This change is required to support netlink ( D36002 ). > >> > >> Reviewed by: glebius > >> Differential Revision: https://reviews.freebsd.org/D36173 > >> --- > >> sys/kern/uipc_domain.c | 23 +++++++++++++++++++++++ > >> sys/sys/domain.h | 4 ++++ > >> 2 files changed, 27 insertions(+) > >> > >> diff --git a/sys/kern/uipc_domain.c b/sys/kern/uipc_domain.c > >> index c70b3150cbf0..2cae08be089a 100644 > >> --- a/sys/kern/uipc_domain.c > >> +++ b/sys/kern/uipc_domain.c > >> @@ -239,6 +239,29 @@ domain_add(void *data) > >> mtx_unlock(&dom_mtx); > >> } > >> > >> +void > >> +domain_remove(void *data) > >> +{ > >> + struct domain *dp =3D (struct domain *)data; > >> + > >> + if ((dp->dom_flags & DOMF_UNLOADABLE) =3D=3D 0) > >> + return; > >> + > >> + mtx_lock(&dom_mtx); > >> + if (domains =3D=3D dp) { > >> + domains =3D dp->dom_next; > >> + } else { > >> + struct domain *curr; > >> + for (curr =3D domains; curr !=3D NULL; curr =3D curr->= dom_next) { > >> + if (curr->dom_next =3D=3D dp) { > >> + curr->dom_next =3D dp->dom_next; > >> + break; > >> + } > >> + } > >> + } > >> + mtx_unlock(&dom_mtx); > >> +} > >> + > >> /* ARGSUSED*/ > >> static void > >> domaininit(void *dummy) > > > > While it's not important for the one domain you care about, this > > should likely also check if any contained protocols have > > pr_fasttimo/pr_slowtimo and purge them from the appropriate list, just > > to be technically correct. (Or at least assert under INVARIANTS that > > they do not) > That=E2=80=99s a good point! > I should have provided more context in the commit message. > There is some ongoing work glebius@ is doing in the domain space. > Specifically, there are plans to remove this callbacks in the near future= - https://reviews.freebsd.org/D36163 stack provides more reasoning and imp= lementation details. > Additionally, the KPI may be a bit fluid and may change in the near/mid-t= erm future - that=E2=80=99s why the minimal working version was committed. > Aha, disregard then. Thanks! :-)