static const struct vport_ops *base_vport_ops_list[] = {
&ovs_netdev_vport_ops,
&ovs_internal_vport_ops,
- &ovs_patch_vport_ops,
&ovs_gre_vport_ops,
- &ovs_gre_ft_vport_ops,
&ovs_gre64_vport_ops,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
- &ovs_capwap_vport_ops,
&ovs_vxlan_vport_ops,
+ &ovs_lisp_vport_ops,
#endif
};
{
struct hlist_head *bucket = hash_bucket(net, name);
struct vport *vport;
- struct hlist_node *node;
- hlist_for_each_entry_rcu(vport, node, bucket, hash_node)
+ hlist_for_each_entry_rcu(vport, bucket, hash_node)
if (!strcmp(name, vport->ops->get_name(vport)) &&
net_eq(ovs_dp_get_net(vport->dp), net))
return vport;
vport->ops->destroy(vport);
}
-/**
- * ovs_vport_set_addr - set device Ethernet address (for kernel callers)
- *
- * @vport: vport on which to set Ethernet address.
- * @addr: New address.
- *
- * Sets the Ethernet address of the given device. Some devices may not support
- * setting the Ethernet address, in which case the result will always be
- * -EOPNOTSUPP. RTNL lock must be held.
- */
-int ovs_vport_set_addr(struct vport *vport, const unsigned char *addr)
-{
- ASSERT_RTNL();
-
- if (!is_valid_ether_addr(addr))
- return -EADDRNOTAVAIL;
-
- if (vport->ops->set_addr)
- return vport->ops->set_addr(vport, addr);
- else
- return -EOPNOTSUPP;
-}
-
/**
* ovs_vport_set_stats - sets offset device stats
*
int ovs_vport_get_options(const struct vport *vport, struct sk_buff *skb)
{
struct nlattr *nla;
+ int err;
+
+ if (!vport->ops->get_options)
+ return 0;
nla = nla_nest_start(skb, OVS_VPORT_ATTR_OPTIONS);
if (!nla)
return -EMSGSIZE;
- if (vport->ops->get_options) {
- int err = vport->ops->get_options(vport, skb);
- if (err) {
- nla_nest_cancel(skb, nla);
- return err;
- }
+ err = vport->ops->get_options(vport, skb);
+ if (err) {
+ nla_nest_cancel(skb, nla);
+ return err;
}
nla_nest_end(skb, nla);
stats->rx_bytes += skb->len;
u64_stats_update_end(&stats->sync);
- if (!(vport->ops->flags & VPORT_F_FLOW))
- OVS_CB(skb)->flow = NULL;
-
if (!(vport->ops->flags & VPORT_F_TUN_ID))
OVS_CB(skb)->tun_key = NULL;