netback: allow arbitrary mtu size until frontend connects
Allow arbitrary mtu size until the frontend is connected. Once the
connection is established, adjust mtu by checking if the backend
supports the 'feature-sg'. If the backend does support it, keep the
current mtu. Otherwise set it to the default value, which is 1500.
based on two commits from
https://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git
bee2eec2355c4bf4e149a426d5e30527162de566
This allows large MTU to be configured by the VIF hotplug
script. Previously this would fail because at the point the hotplug
script runs the VIF features have most likely not been negotiated with
the frontend and so SG has not yet been enabled. Invert this behaviour
so that SG is assumed present until negotiations prove otherwise and
reduce MTU at that point.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
d532fa93d4eeabbfc0176a6a9a93b0d6ade3f6c4
Make sure that if a feature flag is disabled by ethtool on netback
that we do not gratuitously re-enabled it when we check the frontend
features during ring connection.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Olaf Hering <olaf@aepfle.de>