Beispiel #1
0
void mlx5e_vxlan_del_port(struct mlx5e_priv *priv, u16 port)
{
	if (!mlx5e_vxlan_lookup_port(priv, port))
		return;

	__mlx5e_vxlan_core_del_port(priv, port);
}
Beispiel #2
0
static void mlx5e_vxlan_del_port(struct work_struct *work)
{
	struct mlx5e_vxlan_work *vxlan_work =
		container_of(work, struct mlx5e_vxlan_work, work);
	struct mlx5e_priv *priv = vxlan_work->priv;
	u16 port = vxlan_work->port;

	__mlx5e_vxlan_core_del_port(priv, port);

	kfree(vxlan_work);
}
Beispiel #3
0
void mlx5e_vxlan_cleanup(struct mlx5e_priv *priv)
{
	struct mlx5e_vxlan_db *vxlan_db = &priv->vxlan;
	struct mlx5e_vxlan *vxlan;
	unsigned int port = 0;

	spin_lock_irq(&vxlan_db->lock);
	while (radix_tree_gang_lookup(&vxlan_db->tree, (void **)&vxlan, port, 1)) {
		port = vxlan->udp_port;
		spin_unlock_irq(&vxlan_db->lock);
		__mlx5e_vxlan_core_del_port(priv, (u16)port);
		spin_lock_irq(&vxlan_db->lock);
	}
	spin_unlock_irq(&vxlan_db->lock);
}