Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 May 2020 09:48:58 -0500
From:      Kyle Evans <kevans@freebsd.org>
To:        Wei Hu <whu@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>,  svn-src-head <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r361275 - in head/sys: conf dev/hyperv/hvsock dev/hyperv/include dev/hyperv/vmbus modules/hyperv modules/hyperv/hvsock sys
Message-ID:  <CACNAnaHPwpERt9ipy17c%2BSfVQ-EhrtmW7rwhoxTRWwQCCbx%2BoA@mail.gmail.com>
In-Reply-To: <CACNAnaFJ5b-LoCCa7RZFuHKhsZ5mxd1hwmyXv-h3%2BQ26s0hGzQ@mail.gmail.com>
References:  <202005201103.04KB3xTp013965@repo.freebsd.org> <CACNAnaFJ5b-LoCCa7RZFuHKhsZ5mxd1hwmyXv-h3%2BQ26s0hGzQ@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

On Fri, May 22, 2020 at 11:12 AM Kyle Evans <kevans@freebsd.org> wrote:
>
> On Wed, May 20, 2020 at 6:04 AM Wei Hu <whu@freebsd.org> 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


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaHPwpERt9ipy17c%2BSfVQ-EhrtmW7rwhoxTRWwQCCbx%2BoA>