diff options
| author | Pravin Shelar <pshelar@nicira.com> | 2011-09-08 15:18:42 -0700 |
|---|---|---|
| committer | Pravin Shelar <pshelar@nicira.com> | 2011-09-08 15:18:42 -0700 |
| commit | ff8d7a5e81625bbb13d33ca73888fc848b02db83 (patch) | |
| tree | cb19e04f80088ad76d6d1b9b805b28b663859cd0 /datapath | |
| parent | da3db88f3a7993a8e2a118542704e0babbe93fac (diff) | |
| download | openvswitch-ff8d7a5e81625bbb13d33ca73888fc848b02db83.tar.gz | |
Strip down vport interface : iflink
Remove iflink from vport interface. iflink is not used anywhere in
OVS. So there is not need to have iflink as vport attribute.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'datapath')
| -rw-r--r-- | datapath/datapath.c | 13 | ||||
| -rw-r--r-- | datapath/vport-internal_dev.c | 1 | ||||
| -rw-r--r-- | datapath/vport-netdev.c | 7 | ||||
| -rw-r--r-- | datapath/vport-netdev.h | 1 | ||||
| -rw-r--r-- | datapath/vport.c | 22 | ||||
| -rw-r--r-- | datapath/vport.h | 5 |
6 files changed, 1 insertions, 48 deletions
diff --git a/datapath/datapath.c b/datapath/datapath.c index 7c9ec3b28..749908185 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -142,16 +142,12 @@ static int dp_fill_ifinfo(struct sk_buff *skb, { struct datapath *dp = port->dp; int ifindex = vport_get_ifindex(port); - int iflink = vport_get_iflink(port); struct ifinfomsg *hdr; struct nlmsghdr *nlh; if (ifindex < 0) return ifindex; - if (iflink < 0) - return iflink; - nlh = nlmsg_put(skb, 0, 0, event, sizeof(*hdr), flags); if (nlh == NULL) return -EMSGSIZE; @@ -177,9 +173,6 @@ static int dp_fill_ifinfo(struct sk_buff *skb, NLA_PUT(skb, IFLA_ADDRESS, ETH_ALEN, vport_get_addr(port)); - if (ifindex != iflink) - NLA_PUT_U32(skb, IFLA_LINK,iflink); - return nlmsg_end(skb, nlh); nla_put_failure: @@ -1613,7 +1606,7 @@ static int ovs_vport_cmd_fill_info(struct vport *vport, struct sk_buff *skb, { struct ovs_header *ovs_header; struct nlattr *nla; - int ifindex, iflink; + int ifindex; int mtu; int err; @@ -1648,10 +1641,6 @@ static int ovs_vport_cmd_fill_info(struct vport *vport, struct sk_buff *skb, if (ifindex > 0) NLA_PUT_U32(skb, OVS_VPORT_ATTR_IFINDEX, ifindex); - iflink = vport_get_iflink(vport); - if (iflink > 0) - NLA_PUT_U32(skb, OVS_VPORT_ATTR_IFLINK, iflink); - return genlmsg_end(skb, ovs_header); nla_put_failure: diff --git a/datapath/vport-internal_dev.c b/datapath/vport-internal_dev.c index 8cb708344..f77763785 100644 --- a/datapath/vport-internal_dev.c +++ b/datapath/vport-internal_dev.c @@ -285,7 +285,6 @@ const struct vport_ops internal_vport_ops = { .is_running = netdev_is_running, .get_operstate = netdev_get_operstate, .get_ifindex = netdev_get_ifindex, - .get_iflink = netdev_get_iflink, .get_mtu = netdev_get_mtu, .send = internal_dev_recv, }; diff --git a/datapath/vport-netdev.c b/datapath/vport-netdev.c index d1e61bbdf..dbc8db2ca 100644 --- a/datapath/vport-netdev.c +++ b/datapath/vport-netdev.c @@ -257,12 +257,6 @@ int netdev_get_ifindex(const struct vport *vport) return netdev_vport->dev->ifindex; } -int netdev_get_iflink(const struct vport *vport) -{ - const struct netdev_vport *netdev_vport = netdev_vport_priv(vport); - return netdev_vport->dev->iflink; -} - int netdev_get_mtu(const struct vport *vport) { const struct netdev_vport *netdev_vport = netdev_vport_priv(vport); @@ -444,7 +438,6 @@ const struct vport_ops netdev_vport_ops = { .is_running = netdev_is_running, .get_operstate = netdev_get_operstate, .get_ifindex = netdev_get_ifindex, - .get_iflink = netdev_get_iflink, .get_mtu = netdev_get_mtu, .send = netdev_send, }; diff --git a/datapath/vport-netdev.h b/datapath/vport-netdev.h index 88a5f90f3..3f64767dc 100644 --- a/datapath/vport-netdev.h +++ b/datapath/vport-netdev.h @@ -36,7 +36,6 @@ unsigned netdev_get_dev_flags(const struct vport *); int netdev_is_running(const struct vport *); unsigned char netdev_get_operstate(const struct vport *); int netdev_get_ifindex(const struct vport *); -int netdev_get_iflink(const struct vport *); int netdev_get_mtu(const struct vport *); #endif /* vport_netdev.h */ diff --git a/datapath/vport.c b/datapath/vport.c index 2b5a0b4ed..bf6297e90 100644 --- a/datapath/vport.c +++ b/datapath/vport.c @@ -577,28 +577,6 @@ int vport_get_ifindex(const struct vport *vport) } /** - * vport_get_iflink - retrieve device system link index - * - * @vport: vport from which to retrieve index - * - * Retrieves the system link index of the given device. The link is the index - * of the interface on which the packet will actually be sent. In most cases - * this is the same as the ifindex but may be different for tunnel devices. - * Returns a negative index on error. - * - * Must be called with RTNL lock or rcu_read_lock. - */ -int vport_get_iflink(const struct vport *vport) -{ - if (vport->ops->get_iflink) - return vport->ops->get_iflink(vport); - - /* If we don't have an iflink, use the ifindex. In most cases they - * are the same. */ - return vport_get_ifindex(vport); -} - -/** * vport_get_mtu - retrieve device MTU * * @vport: vport from which to retrieve MTU diff --git a/datapath/vport.h b/datapath/vport.h index 388ba1cef..0a6d831c5 100644 --- a/datapath/vport.h +++ b/datapath/vport.h @@ -46,7 +46,6 @@ int vport_is_running(const struct vport *); unsigned char vport_get_operstate(const struct vport *); int vport_get_ifindex(const struct vport *); -int vport_get_iflink(const struct vport *); int vport_get_mtu(const struct vport *); @@ -172,9 +171,6 @@ struct vport_parms { * @get_operstate: Get the device's operating state. * @get_ifindex: Get the system interface index associated with the device. * May be null if the device does not have an ifindex. - * @get_iflink: Get the system interface index associated with the device that - * will be used to send packets (may be different than ifindex for tunnels). - * May be null if the device does not have an iflink. * @get_mtu: Get the device's MTU. May be %NULL if the device does not have an * MTU (as e.g. some tunnels do not). * @send: Send a packet on the device. Returns the length of the packet sent. @@ -209,7 +205,6 @@ struct vport_ops { unsigned char (*get_operstate)(const struct vport *); int (*get_ifindex)(const struct vport *); - int (*get_iflink)(const struct vport *); int (*get_mtu)(const struct vport *); |
