]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_vxlan_private.h
zebra: Convert zrmac->host_list list to a RB Tree
[mirror_frr.git] / zebra / zebra_vxlan_private.h
index b4a8b5d4803ac5e9f29f3bdbe9f2dd4c616da87a..c5f6b783aaad7c12dc89f4126577cadf4fc1d8b3 100644 (file)
@@ -215,6 +215,15 @@ static inline void zl3vni_get_rmac(zebra_l3vni_t *zl3vni, struct ethaddr *rmac)
                memcpy(rmac->octet, zl3vni->svi_if->hw_addr, ETH_ALEN);
 }
 
+struct host_rb_entry {
+       RB_ENTRY(host_rb_entry) hl_entry;
+
+       struct prefix p;
+};
+
+RB_HEAD(host_rb_entry_rb, host_rb_entry);
+RB_PROTOTYPE(host_rb_entry_rb, host_rb_entry, hl_entry,
+            host_rb_entry_compare);
 /*
  * MAC hash table.
  *
@@ -253,7 +262,7 @@ struct zebra_mac_t_ {
        struct list *neigh_list;
 
        /* list of hosts pointing to this remote RMAC */
-       struct list *host_list;
+       struct host_rb_entry_rb host_rb;
 };
 
 /*