libxl: wire the libxl_device_nic 'mtu' value into xenstore
authorPaul Durrant <pdurrant@amazon.com>
Tue, 11 Aug 2020 08:01:59 +0000 (09:01 +0100)
committerWei Liu <wl@xen.org>
Thu, 27 Aug 2020 10:04:17 +0000 (10:04 +0000)
commit22cdff931d1239156dea74d8b4a50e91e44c5817
tree02e200d7ea0b72b9c00f5948714a92a2c28e14a5
parentb51715f02bf916c9cd6740b1047ba4396d85bbb0
libxl: wire the libxl_device_nic 'mtu' value into xenstore

Currently the 'mtu' field of libxl_device_nic objects is effectively ignored:
It is set by libxl__device_nic_setdefault() to a slightly odd default value of
1492 but otherwise ignored.

This patch changes the default value to a more conventional 1500 and modifies
libxl__set_xenstore_nic() to write the value into an 'mtu' node in the
xenstore backend area (if it is a non-default value), as well as a read-only
node of the same name in the frontend area.

The backend node is used to set the value of 'mtu' in
libxl__nic_from_xenstore(), when retrieving the configuration.

NOTE: There is currently no way to set a non-default value of 'mtu', hence
      the backend node is never written. This, however, will be addressed
      by a subsequent patch.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Acked-by: Wei Liu <wl@xen.org>
tools/libxl/libxl_nic.c