2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

datapath: Strip down vport interface : OVS_VPORT_ATTR_MTU

There is no need to have vport attribute MTU (OVS_VPORT_ATTR_MTU) as
linux net-dev-ioctl can be used to get/set MTU for linux device.
Following patch removes OVS_VPORT_ATTR_MTU from datapath protocol.

This patch also adds netdev_set_mtu interface. So that MTU adjustments
can be done from OVS userspace. get_mtu() interface is also changed, now
get_mtu() returns EOPNOTSUPP rather than returning 0 and setting *pmtu
to INT_MAX in case there is no MTU attribute for given device.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
Pravin Shelar
2011-09-12 17:12:52 -07:00
parent 2f2df2f4da
commit 9b02078077
12 changed files with 88 additions and 51 deletions

View File

@@ -378,8 +378,8 @@ do_add_port(struct dp_netdev *dp, const char *devname, const char *type,
port->netdev = netdev;
port->internal = internal;
netdev_get_mtu(netdev, &mtu);
if (mtu != INT_MAX && mtu > max_mtu) {
error = netdev_get_mtu(netdev, &mtu);
if (!error) {
max_mtu = mtu;
}