svn commit: r361275 - in head/sys: conf dev/hyperv/hvsock dev/hyperv/include dev/hyperv/vmbus modules/hyperv modules/hyperv/hvsock sys

Wei Hu weh at microsoft.com
Fri May 29 17:08:13 UTC 2020



> -----Original Message-----
> > > [... 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.
> 
Sorry for my late response, Kyle. I read your comments last week. To be honest I am
not familiar to VNET and VIMAGE, so I don't quite understand. I got distracted
into other work so my response to this was delayed.

Do you mean to drop these two lines?
       if (!IS_DEFAULT_VNET(curvnet))
               return
I copied these from other socket init code. If they are not necessary I can remove them.

Thanks,
Wei


More information about the svn-src-head mailing list