[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xl: add 'mtu' option to network configuration
commit 812c8e01dbb352b93ae93d24cd0df7dee139c290 Author: Paul Durrant <pdurrant@xxxxxxxxxx> AuthorDate: Tue Aug 11 09:02:01 2020 +0100 Commit: Wei Liu <wl@xxxxxxx> CommitDate: Thu Aug 27 10:04:25 2020 +0000 xl: add 'mtu' option to network configuration This patch adds code to parse a value for MTU from the network configuration if it is present. The documentation in xl-network-configuration.5.pod is also modified accordingly. Signed-off-by: Paul Durrant <pdurrant@xxxxxxxxxx> Acked-by: Wei Liu <wl@xxxxxxx> --- docs/man/xl-network-configuration.5.pod | 6 ++++++ tools/xl/xl_cmdtable.c | 2 +- tools/xl/xl_parse.c | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/man/xl-network-configuration.5.pod b/docs/man/xl-network-configuration.5.pod index 0ac24c4a18..af058d4d3c 100644 --- a/docs/man/xl-network-configuration.5.pod +++ b/docs/man/xl-network-configuration.5.pod @@ -249,3 +249,9 @@ on the underlying netback implementation. Specifies the devid manually instead of letting xl choose the lowest index available. NOTE: This should not be set unless you have a reason to. + +=head2 mtu + +Specifies the MTU (i.e. the maximum size of an IP payload, exclusing headers). The +default value is 1500 but, if the VIF is attached to a bridge, it will be set to match +unless overridden by this parameter. diff --git a/tools/xl/xl_cmdtable.c b/tools/xl/xl_cmdtable.c index 08335394e5..2b8e1b321a 100644 --- a/tools/xl/xl_cmdtable.c +++ b/tools/xl/xl_cmdtable.c @@ -338,7 +338,7 @@ struct cmd_spec cmd_table[] = { "Create a new virtual network device", "<Domain> [type=<type>] [mac=<mac>] [bridge=<bridge>] " "[ip=<ip>] [script=<script>] [backend=<BackDomain>] [vifname=<name>] " - "[rate=<rate>] [model=<model>] [accel=<accel>]", + "[rate=<rate>] [model=<model>] [accel=<accel>] [mtu=<mtu>]", }, { "network-list", &main_networklist, 0, 0, diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c index 61b4ef7b7e..cae8eb679c 100644 --- a/tools/xl/xl_parse.c +++ b/tools/xl/xl_parse.c @@ -563,6 +563,8 @@ int parse_nic_config(libxl_device_nic *nic, XLU_Config **config, char *token) fprintf(stderr, "the accel parameter for vifs is currently not supported\n"); } else if (MATCH_OPTION("devid", token, oparg)) { nic->devid = parse_ulong(oparg); + } else if (MATCH_OPTION("mtu", token, oparg)) { + nic->mtu = parse_ulong(oparg); } else { fprintf(stderr, "unrecognized argument `%s'\n", token); return 1; -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |