From owner-svn-src-all@freebsd.org Fri May 29 14:49:10 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 BA41933A8F7; Fri, 29 May 2020 14:49:10 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49YSBZ4Z1lz3bYn; Fri, 29 May 2020 14:49:10 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 92D3D10233; Fri, 29 May 2020 14:49:10 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f54.google.com with SMTP id p15so1154650qvr.9; Fri, 29 May 2020 07:49:10 -0700 (PDT) X-Gm-Message-State: AOAM533LTXbhZEEoy+LMjd8pI5Ed7ezDH7DuDZqYowoE5Bl+O8B6dpsl IHeP4V0pYefik5RcxJ5dZoxO7lS+BZbyMpUE4NI= X-Google-Smtp-Source: ABdhPJxE6jIdwSe3Rf83oVShRmjdoWRJ91/hmkwQZOIUEfNjtbFJq4NRZWn7Tw0PdtLoajc3aoKzZ+CKMnZnUnSHW2Y= X-Received: by 2002:a0c:ba22:: with SMTP id w34mr8424573qvf.129.1590763750039; Fri, 29 May 2020 07:49:10 -0700 (PDT) MIME-Version: 1.0 References: <202005201103.04KB3xTp013965@repo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Fri, 29 May 2020 09:48:58 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r361275 - in head/sys: conf dev/hyperv/hvsock dev/hyperv/include dev/hyperv/vmbus modules/hyperv modules/hyperv/hvsock sys To: Wei Hu Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" 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: Fri, 29 May 2020 14:49:10 -0000 On Fri, May 22, 2020 at 11:12 AM Kyle Evans wrote: > > On Wed, May 20, 2020 at 6:04 AM Wei Hu wrote: > > > > Author: whu > > Date: Wed May 20 11:03:59 2020 > > New Revision: 361275 > > URL: https://svnweb.freebsd.org/changeset/base/361275 > > > > Log: > > HyperV socket implementation for FreeBSD > > > > This change adds Hyper-V socket feature in FreeBSD. New socket address > > family AF_HYPERV and its kernel support are added. > > > > [... snip ...] > > +void > > +hvs_trans_init(void) > > +{ > > + /* Skip initialization of globals for non-default instances. */ > > + if (!IS_DEFAULT_VNET(curvnet)) > > + return; > > + > > + if (vm_guest != VM_GUEST_HV) > > + return; > > + > > + HVSOCK_DBG(HVSOCK_DBG_VERBOSE, > > + "%s: HyperV Socket hvs_trans_init called\n", __func__); > > + > > + /* Initialize Globals */ > > + previous_auto_bound_port = MAX_PORT; > > + sx_init(&hvs_trans_socks_sx, "hvs_trans_sock_sx"); > > + mtx_init(&hvs_trans_socks_mtx, > > + "hvs_trans_socks_mtx", NULL, MTX_DEF); > > + LIST_INIT(&hvs_trans_bound_socks); > > + LIST_INIT(&hvs_trans_connected_socks); > > +} > > + > > I have a suspicion that all of these should really be per-vnet for > correct semantics with VIMAGE, with the IS_DEFAULT_VNET check earlier > dropped completely. I haven't read around the rest all that much, but > this would at least seem to prevent port re-use by a different vnet, > which is perhaps "good enough" but I think this is something that > should be fixed in the mid-term. > I have a follow-up concern about whether this is actually going to be maintained... it's been a full week with not even an acknowledgement or rebuttal of any of the concerns I've raised, with some of them being completely trivial to address in the short-term. I don't think that we really want this in the tree in its current state given this level of engagement. Thanks, Kyle Evans