Multicast may be handled in user-space (but isn't yet).

Cc: Kyle Mestery <kmest...@cisco.com>
Signed-off-by: Simon Horman <ho...@verge.net.au>

---

v5
* No Change

v4
* No Change

v3
* Initial posting
---
 datapath/tunnel.c | 22 ----------------------
 datapath/tunnel.h |  3 ---
 2 files changed, 25 deletions(-)

diff --git a/datapath/tunnel.c b/datapath/tunnel.c
index 29fce82..fce0594 100644
--- a/datapath/tunnel.c
+++ b/datapath/tunnel.c
@@ -162,21 +162,6 @@ static void free_cache_rcu(struct rcu_head *rcu)
        free_cache(c);
 }
 
-/* Frees the portion of 'mutable' that requires RTNL and thus can't happen
- * within an RCU callback.  Fortunately this part doesn't require waiting for
- * an RCU grace period.
- */
-static void free_mutable_rtnl(struct tnl_mutable_config *mutable)
-{
-       ASSERT_RTNL();
-       if (ipv4_is_multicast(mutable->key.daddr) && mutable->mlink) {
-               struct in_device *in_dev;
-               in_dev = inetdev_by_index(port_key_get_net(&mutable->key), 
mutable->mlink);
-               if (in_dev)
-                       ip_mc_dec_group(in_dev, mutable->key.daddr);
-       }
-}
-
 static void assign_config_rcu(struct vport *vport,
                              struct tnl_mutable_config *new_config)
 {
@@ -186,7 +171,6 @@ static void assign_config_rcu(struct vport *vport,
        old_config = rtnl_dereference(tnl_vport->mutable);
        rcu_assign_pointer(tnl_vport->mutable, new_config);
 
-       free_mutable_rtnl(old_config);
        call_rcu(&old_config->rcu, free_config_rcu);
 }
 
@@ -1374,8 +1358,6 @@ static int tnl_set_config(struct net *net,
        if (old_vport && old_vport != cur_vport)
                return -EEXIST;
 
-       mutable->mlink = 0;
-
        return 0;
 }
 
@@ -1428,7 +1410,6 @@ struct vport *ovs_tnl_create(const struct vport_parms 
*parms,
        return vport;
 
 error_free_mutable:
-       free_mutable_rtnl(mutable);
        kfree(mutable);
 error_free_vport:
        ovs_vport_free(vport);
@@ -1453,7 +1434,6 @@ void ovs_tnl_destroy(struct vport *vport)
 
        mutable = rtnl_dereference(tnl_vport->mutable);
        port_table_remove_port(vport);
-       free_mutable_rtnl(mutable);
        call_rcu(&tnl_vport->rcu, free_port_rcu);
 }
 
@@ -1467,8 +1447,6 @@ int ovs_tnl_set_addr(struct vport *vport, const unsigned 
char *addr)
        if (!mutable)
                return -ENOMEM;
 
-       old_mutable->mlink = 0;
-
        memcpy(mutable->eth_addr, addr, ETH_ALEN);
        assign_config_rcu(vport, mutable);
 
diff --git a/datapath/tunnel.h b/datapath/tunnel.h
index 1cf5a35..6fafc43 100644
--- a/datapath/tunnel.h
+++ b/datapath/tunnel.h
@@ -117,9 +117,6 @@ struct tnl_mutable_config {
        u32     flags;
        u8      tos;
        u8      ttl;
-
-       /* Multicast configuration. */
-       int     mlink;
 };
 
 struct tnl_ops {
-- 
1.7.10.2.484.gcd07cc5

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to