From f915f1a8ca180828983ef22cf2fd21b8f010b972 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 1 Feb 2011 11:32:06 -0800 Subject: datapath: Consider tunnels to have no MTU, fixing jumbo frame support. Until now, tunnel vports have had a specific MTU, in the same way that ordinary network devices have an MTU, but treating them this way does not always make sense. For example, consider a datapath that has three ports: the local port, a GRE tunnel to another host, and a physical port. If the physical port is configured with a jumbo MTU, it should be possible to send jumbo packets across the tunnel: the tunnel can do fragmentation or the physical port traversed by the tunnel might have a jumbo MTU. However, until now, tunnels always had a 1500-byte MTU by default. It could be adjusted using ODP_VPORT_MTU_SET, but nothing actually did this. One alternative would be to make ovs-vswitchd able to set the vport's MTU. This commit, however, takes a different approach, of dropping the concept of MTU entirely for tunnel vports. This also solves the problem described above, without making any additional work for anyone. I tested that, without this change, I could not send 1600-byte "pings" between two machines whose NICs had 2000-byte MTUs that were connected to vswitches that were in turn connected over GRE tunnels with the default 1500-byte MTU. With this change, it worked OK, regardless of the MTU of the network traversed by the GRE tunnel. This patch also makes "patch" ports MTU-less. It might make sense to remove vport_set_mtu() and the associated callback now, since ordinary network devices are the only vports that support it now. Signed-off-by: Ben Pfaff Suggested-by: Jesse Gross Acked-by: Jesse Gross Bug #3728. --- include/openvswitch/datapath-protocol.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/openvswitch/datapath-protocol.h b/include/openvswitch/datapath-protocol.h index 8645096ab..eafc80032 100644 --- a/include/openvswitch/datapath-protocol.h +++ b/include/openvswitch/datapath-protocol.h @@ -237,7 +237,8 @@ enum odp_vport_cmd { * @ODP_VPORT_ATTR_STATS: A &struct rtnl_link_stats64 giving statistics for * packets sent or received through the vport. * @ODP_VPORT_ATTR_ADDRESS: A 6-byte Ethernet address for the vport. - * @ODP_VPORT_ATTR_MTU: MTU for the vport. + * @ODP_VPORT_ATTR_MTU: MTU for the vport. Omitted if the vport does not have + * an MTU as, e.g., some tunnels do not. * @ODP_VPORT_ATTR_IFINDEX: ifindex of the underlying network device, if any. * @ODP_VPORT_ATTR_IFLINK: ifindex of the device on which packets are sent (for * tunnels), if any. -- cgit v1.2.1