summaryrefslogtreecommitdiff
path: root/datapath/datapath.c
diff options
context:
space:
mode:
authorPravin Shelar <pshelar@nicira.com>2011-09-12 17:12:52 -0700
committerPravin Shelar <pshelar@nicira.com>2011-09-12 17:12:52 -0700
commit9b02078077b62e4277e84c7f39382ce09986cf6b (patch)
treeff856186d8a966ca69b98d669c655eef66723701 /datapath/datapath.c
parent2f2df2f4dafada02f022c2900f7a17628af7a0d1 (diff)
downloadopenvswitch-9b02078077b62e4277e84c7f39382ce09986cf6b.tar.gz
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>
Diffstat (limited to 'datapath/datapath.c')
-rw-r--r--datapath/datapath.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/datapath/datapath.c b/datapath/datapath.c
index 6abd69185..79df5f898 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -1551,7 +1551,6 @@ static const struct nla_policy vport_policy[OVS_VPORT_ATTR_MAX + 1] = {
[OVS_VPORT_ATTR_STATS] = { .minlen = sizeof(struct rtnl_link_stats64) },
[OVS_VPORT_ATTR_ADDRESS] = { .minlen = ETH_ALEN },
#endif
- [OVS_VPORT_ATTR_MTU] = { .type = NLA_U32 },
[OVS_VPORT_ATTR_OPTIONS] = { .type = NLA_NESTED },
};
@@ -1574,7 +1573,6 @@ static int ovs_vport_cmd_fill_info(struct vport *vport, struct sk_buff *skb,
struct ovs_header *ovs_header;
struct nlattr *nla;
int ifindex;
- int mtu;
int err;
ovs_header = genlmsg_put(skb, pid, seq, &dp_vport_genl_family,
@@ -1596,10 +1594,6 @@ static int ovs_vport_cmd_fill_info(struct vport *vport, struct sk_buff *skb,
NLA_PUT(skb, OVS_VPORT_ATTR_ADDRESS, ETH_ALEN, vport_get_addr(vport));
- mtu = vport_get_mtu(vport);
- if (mtu)
- NLA_PUT_U32(skb, OVS_VPORT_ATTR_MTU, mtu);
-
err = vport_get_options(vport, skb);
if (err == -EMSGSIZE)
goto error;
@@ -1679,8 +1673,6 @@ static int change_vport(struct vport *vport, struct nlattr *a[OVS_VPORT_ATTR_MAX
err = vport_set_stats(vport, nla_data(a[OVS_VPORT_ATTR_STATS]));
if (!err && a[OVS_VPORT_ATTR_ADDRESS])
err = vport_set_addr(vport, nla_data(a[OVS_VPORT_ATTR_ADDRESS]));
- if (!err && a[OVS_VPORT_ATTR_MTU])
- err = vport_set_mtu(vport, nla_get_u32(a[OVS_VPORT_ATTR_MTU]));
return err;
}