]> xenbits.xensource.com Git - people/royger/linux-2.6.18-xen.git/commit
netback: allow arbitrary mtu size until frontend connects
authorKeir Fraser <keir@xen.org>
Wed, 9 Feb 2011 08:38:55 +0000 (08:38 +0000)
committerKeir Fraser <keir@xen.org>
Wed, 9 Feb 2011 08:38:55 +0000 (08:38 +0000)
commit5d9d0ec4f3a976f75864be0987508356b22626a2
tree950691f25088906891e937587e73ceb5bc1c7c93
parent66380edd3b752d9911259fb34179da599d9077c9
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>
drivers/xen/netback/common.h
drivers/xen/netback/interface.c
drivers/xen/netback/netback.c
drivers/xen/netback/xenbus.c