[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH v2 4/4] tools/hotplug: modify set_mtu() to inform the frontend via xenstore


  • To: "Durrant, Paul" <pdurrant@xxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxx>
  • Date: Wed, 5 Aug 2020 11:13:24 +0100
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, 'Wei Liu' <wl@xxxxxxx>, "paul@xxxxxxx" <paul@xxxxxxx>
  • Delivery-date: Wed, 05 Aug 2020 10:13:38 +0000
  • Ironport-sdr: ablncfU/hRROiiFatEA3enkULTpRhqCFDPWlbDAwFm2fG0LCxhl/JF3sd8LkANW4vfRFIxxBE+ k/nw0YqgJbOsWqskSwXHJYPAw0OdmYpgMjYRFMI/mQA20poD/R+ULlVubKzssD7pfb5wM8dIzU 56DPeOjiq7slsjbRCS1zzmsVCTIvLgclZndanBteOVbpd4xNIgTQ3tvhfKg/GcLtdvtpqk40/x Jr9h++69hBj4B9f+Hq9UFnoiiWKmBSpan7bp6YL7jDNOm9UbtoF74bcl7QydbONESSZEKqq0T8 Cvw=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Durrant, Paul writes ("RE: [PATCH v2 4/4] tools/hotplug: modify set_mtu() to 
inform the frontend via xenstore"):
> > -----Original Message-----
> > From: Ian Jackson <ian.jackson@xxxxxxxxxx>
...
> Well, I guess we address the driver domain issue in this way
> too... I will add a patch to libxl to write the libxl_device_nic mtu
> value into xenstore,

Do you mean libxl in dom0 or libxl in the driver domain ?

libxl contains code that runs in both contexts.

See device_hotplug in libxl_device.c, in particular notice
    if (aodev->dev->backend_domid != domid) {

If you want the mtu to be read from the bridge, it can only be
determined by the driver domain, because the bridge is in the driver
domain.

In v2 of this series you arrange for the hotplug script to copy the
mtu from the bridge into the frontend path.  That won't work because
the hotplug script can't write to that xenstore node because (unlike a
domo0 backend) a driver domain backend doesn't have write access to
the frontend so can't create a new node there.

ISTM that it is correct that it is the hotplug script that does this
interface setup.  If it weren't for this erroneous use of the frontend
path I think the right design would be:
  * toolstack libxl reads the config file to find whether there is an MTU
  * toolstack libxl writes mtu node in backend iff one was in config
    (and leaves the node absent otherwise)
  * driver domain libxl runs hotplug script
  * driver domain hotplug script looks for mtu in backend; if there
    isn't one, it gets the value from the bridge and writes it to
    the backend in xenstore
  * driver domain backend driver reads mtu value from backend path
  * guest domain frontend driver reads mtu value from backend path
  * on domain save/migrate, toolstack libxl will record the mtu
    value as the actual configuration so that the migrated domain
    will get the same mtu

I don't think I understand what (in these kind of terms) you are
proposing, in order to support the frontends that want to read the mtu
from the frontend.

>  I think the current setting of 1492 can be changed to 1500 safely
> (since nothing appears to currently use that value).

Right, that seems correct to me.

> The hotplug script should then have sufficient access to update, and
> a subsequent patch can add a mechanism to set the value from the
> config.

I think what I am missing is how this "subsequent patch" would work ?
Ie what design are we aiming for, that we are now implementing part
of ?

Ian.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.