示例#1
0
static void free_port_rcu(struct rcu_head *rcu)
{
	struct patch_vport *patch_vport = container_of(rcu,
					  struct patch_vport, rcu);

	kfree((struct patch_config __force *)patch_vport->patchconf);
	ovs_vport_free(vport_from_priv(patch_vport));
}
示例#2
0
static void free_port_rcu(struct rcu_head *rcu)
{
	struct netdev_vport *netdev_vport = container_of(rcu,
					struct netdev_vport, rcu);

	dev_put(netdev_vport->dev);
	ovs_vport_free(vport_from_priv(netdev_vport));
}
示例#3
0
static void free_port_rcu(struct rcu_head *rcu)
{
	struct netdev_vport *netdev_vport = container_of(rcu,
					struct netdev_vport, rcu);

#ifdef HAVE_RHEL_OVS_HOOK
	rcu_assign_pointer(netdev_vport->dev->ax25_ptr, NULL);

	if (atomic_dec_and_test(&nr_bridges))
		rcu_assign_pointer(openvswitch_handle_frame_hook, NULL);
#endif
	dev_put(netdev_vport->dev);
	ovs_vport_free(vport_from_priv(netdev_vport));
}
示例#4
0
static void update_peers(struct net *net, const char *name, struct vport *vport)
{
	struct hlist_head *bucket = hash_bucket(net, name);
	struct patch_vport *peer_vport;
	struct hlist_node *node;

	hlist_for_each_entry(peer_vport, node, bucket, hash_node) {
		struct vport *curr_vport = vport_from_priv(peer_vport);
		const char *peer_name;

		peer_name = rtnl_dereference(peer_vport->patchconf)->peer_name;
		if (!strcmp(peer_name, name) && net_eq(ovs_dp_get_net(curr_vport->dp), net))
			rcu_assign_pointer(peer_vport->peer, vport);
	}
}
示例#5
0
static inline struct vport *tnl_vport_to_vport(const struct tnl_vport *tnl_vport)
{
	return vport_from_priv(tnl_vport);
}